id
int64 0
755k
| file_name
stringlengths 3
109
| file_path
stringlengths 13
185
| content
stringlengths 31
9.38M
| size
int64 31
9.38M
| language
stringclasses 1
value | extension
stringclasses 11
values | total_lines
int64 1
340k
| avg_line_length
float64 2.18
149k
| max_line_length
int64 7
2.22M
| alphanum_fraction
float64 0
1
| repo_name
stringlengths 6
65
| repo_stars
int64 100
47.3k
| repo_forks
int64 0
12k
| repo_open_issues
int64 0
3.4k
| repo_license
stringclasses 9
values | repo_extraction_date
stringclasses 92
values | exact_duplicates_redpajama
bool 2
classes | near_duplicates_redpajama
bool 2
classes | exact_duplicates_githubcode
bool 2
classes | exact_duplicates_stackv2
bool 1
class | exact_duplicates_stackv1
bool 2
classes | near_duplicates_githubcode
bool 2
classes | near_duplicates_stackv1
bool 2
classes | near_duplicates_stackv2
bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
751,070
|
hid_win.cxx
|
w1hkj_fldigi/src/cmedia/hid_win.cxx
|
/*******************************************************
HIDAPI - Multi-Platform library for
communication with HID devices.
Alan Ott
Signal 11 Software
8/22/2009
Copyright 2009, All Rights Reserved.
At the discretion of the user of this library,
this software may be licensed under the terms of the
GNU General Public License v3, a BSD-Style license, or the
original HIDAPI license as outlined in the LICENSE.txt,
LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt
files located at the root of the source distribution.
These files may also be found in the public source
code repository located at:
https://github.com/libusb/hidapi .
********************************************************/
#include "debug.h"
#include "hid_win.h"
#undef MIN
#define MIN(x,y) ((x) < (y)? (x): (y))
#ifdef _MSC_VER
/* Thanks Microsoft, but I know how to use strncpy(). */
#pragma warning(disable:4996)
#endif
void errtext(std::string s)
{
FILE *erf = fopen("erf.txt", "a");
fprintf(erf, "%s\n", s.c_str());
fclose(erf);
}
std::string wchar2str( const char *where, wchar_t *WC )
{
size_t count = wcstombs(NULL, WC, 1024);
char MB[count + 1];
memset(MB, 0, count + 1);
int ret = wcstombs(MB, WC, count);
if (ret == -1) {
LOG_DEBUG("Cannot convert %s: %ls", where, WC);
return "";
}
return MB;
}
hid_api_version api_version = {
HID_API_VERSION_MAJOR,
HID_API_VERSION_MINOR,
HID_API_VERSION_PATCH
};
void hid_device::register_error(const char *op)
{
WCHAR *ptr, *msg;
(void)op; // unreferenced param
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR)&msg, 0/*sz*/,
NULL);
/* Get rid of the CR and LF that FormatMessage() sticks at the
end of the message. Thanks Microsoft! */
ptr = msg;
while (*ptr) {
if (*ptr == '\r') {
*ptr = 0x0000;
break;
}
ptr++;
}
/* Store the message off in the Device entry so that
the hid_error() function can pick it up. */
LocalFree(last_error_str);
last_error_str = msg;
}
HANDLE open_device(const char *path, BOOL open_rw)
{
HANDLE handle;
DWORD desired_access = (open_rw)? (GENERIC_WRITE | GENERIC_READ): GENERIC_READ;
DWORD share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE;
handle = CreateFileA(path,
desired_access,
share_mode,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, //FILE_FLAG_OVERLAPPED,/*FILE_ATTRIBUTE_NORMAL,*/
NULL);
return handle;
}
const struct hid_api_version* hid_version()
{
return &api_version;
}
const char* hid_version_str()
{
return HID_API_VERSION_STR;
}
int hid_init(void)
{
/*
#ifndef HIDAPI_USE_DDK
if (!initialized) {
if (lookup_functions() < 0) {
hid_exit();
return -1;
}
initialized = TRUE;
}
#endif
*/
// initialized = TRUE;
return 0;
}
int hid_exit(void)
{
//#ifndef HIDAPI_USE_DDK
// if (lib_handle)
// FreeLibrary(lib_handle);
// lib_handle = NULL;
// initialized = FALSE;
//#endif
return 0;
}
hid_device_info * hid_enumerate(unsigned short vendor_id, unsigned short product_id)
{
BOOL res;
hid_device_info *root = NULL; /* return object */
hid_device_info *cur_dev = NULL;
/* Hard-coded GUID retreived by HidD_GetHidGuid */
GUID InterfaceClassGuid = {0x4d1e55b2, 0xf16f, 0x11cf, {0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30} };
/* Windows objects for interacting with the driver. */
SP_DEVINFO_DATA devinfo_data;
SP_DEVICE_INTERFACE_DATA device_interface_data;
SP_DEVICE_INTERFACE_DETAIL_DATA_A *device_interface_detail_data = NULL;
HDEVINFO device_info_set = INVALID_HANDLE_VALUE;
char driver_name[256];
int device_index = 0;
if (hid_init() < 0)
return NULL;
/* Initialize the Windows objects. */
memset(&devinfo_data, 0x0, sizeof(devinfo_data));
devinfo_data.cbSize = sizeof(SP_DEVINFO_DATA);
device_interface_data.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
/* Get information for all the devices belonging to the HID class. */
device_info_set = SetupDiGetClassDevsA(&InterfaceClassGuid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
/* Iterate over each device in the HID class, looking for the right one. */
for (;;) {
HANDLE query_handle = INVALID_HANDLE_VALUE;
DWORD required_size = 0;
HIDD_ATTRIBUTES attrib;
res = SetupDiEnumDeviceInterfaces(device_info_set,
NULL,
&InterfaceClassGuid,
device_index,
&device_interface_data);
if (!res) {
/* A return of FALSE from this function means that
there are no more devices. */
break;
}
/* Call with 0-sized detail size, and let the function
tell us how long the detail struct needs to be. The
size is put in &required_size. */
res = SetupDiGetDeviceInterfaceDetailA(device_info_set,
&device_interface_data,
NULL,
0,
&required_size,
NULL);
/* Allocate a long enough structure for device_interface_detail_data. */
device_interface_detail_data = (SP_DEVICE_INTERFACE_DETAIL_DATA_A*) malloc(required_size);
device_interface_detail_data->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_A);
/* Get the detailed data for this device. The detail data gives us
the device path for this device, which is then passed into
CreateFile() to get a handle to the device. */
res = SetupDiGetDeviceInterfaceDetailA(device_info_set,
&device_interface_data,
device_interface_detail_data,
required_size,
NULL,
NULL);
if (!res) {
/* register_error("Unable to call SetupDiGetDeviceInterfaceDetail");
Continue to the next device. */
goto cont;
}
/* Populate devinfo_data. This function will return failure
when the device with such index doesn't exist. We've already checked it does. */
res = SetupDiEnumDeviceInfo(device_info_set, device_index, &devinfo_data);
if (!res)
goto cont;
/* Make sure this device has a driver bound to it. */
res = SetupDiGetDeviceRegistryPropertyA(device_info_set, &devinfo_data,
SPDRP_DRIVER, NULL, (PBYTE)driver_name, sizeof(driver_name), NULL);
if (!res)
goto cont;
//wprintf(L"HandleName: %s\n", device_interface_detail_data->DevicePath);
/* Open a handle to the device */
query_handle = open_device(device_interface_detail_data->DevicePath, FALSE);
/* Check validity of query_handle. */
if (query_handle == INVALID_HANDLE_VALUE) {
/* Unable to open the device. */
//register_error("CreateFile");
goto cont_close;
}
/* Get the Vendor ID and Product ID for this device. */
attrib.Size = sizeof(HIDD_ATTRIBUTES);
HidD_GetAttributes(query_handle, &attrib);
//wprintf(L"Product/Vendor: %x %x\n", attrib.ProductID, attrib.VendorID);
/* Check the VID/PID to see if we should add this
device to the enumeration list. */
if ((vendor_id == 0x0 || attrib.VendorID == vendor_id) &&
(product_id == 0x0 || attrib.ProductID == product_id)) {
#define WSTR_LEN 512
const char *str;
hid_device_info *tmp;
PHIDP_PREPARSED_DATA pp_data = NULL;
HIDP_CAPS caps;
NTSTATUS nt_res;
/* VID/PID match. Create the record. */
tmp = new hid_device_info;
if (cur_dev) {
cur_dev->next = tmp;
}
else {
root = tmp;
}
cur_dev = tmp;
/* Get the Usage Page and Usage for this device. */
res = HidD_GetPreparsedData(query_handle, &pp_data);
if (res) {
nt_res = HidP_GetCaps(pp_data, &caps);
if (nt_res == HIDP_STATUS_SUCCESS) {
cur_dev->usage_page = caps.UsagePage;
cur_dev->usage = caps.Usage;
}
HidD_FreePreparsedData(pp_data);
}
/* Fill out the record */
cur_dev->next = NULL;
str = device_interface_detail_data->DevicePath;
if (str) {
cur_dev->path = str;
}
else
cur_dev->path.clear();
/* Serial Number */
static wchar_t WC[1024];
memset(WC, 0, sizeof(wchar_t) * 1024);
cur_dev->str_serial_number.clear();
res = HidD_GetSerialNumberString(query_handle, WC, 1024);
if (res) cur_dev->str_serial_number = wchar2str("HidD_GetSerialNumberString", WC);;
/* Manufacturer String */
memset(WC, 0, sizeof(wchar_t) * 1024);
cur_dev->str_manufacturer_string.clear();
res = HidD_GetManufacturerString(query_handle, WC, 1024);
if (res) cur_dev->str_manufacturer_string = wchar2str("HidD_GetManufacturerString", WC);;
/* Product String */
memset(WC, 0, sizeof(wchar_t) * 1024);
cur_dev->str_product_string.clear();
res = HidD_GetProductString(query_handle, WC, 1024);
if (res) cur_dev->str_product_string = wchar2str("HidD_GetProductString", WC);;
/* VID/PID */
cur_dev->vendor_id = attrib.VendorID;
cur_dev->product_id = attrib.ProductID;
/* Release Number */
cur_dev->release_number = attrib.VersionNumber;
/* Interface Number. It can sometimes be parsed out of the path
on Windows if a device has multiple interfaces. See
http://msdn.microsoft.com/en-us/windows/hardware/gg487473 or
search for "Hardware IDs for HID Devices" at MSDN. If it's not
in the path, it's set to -1. */
cur_dev->interface_number = -1;
// if (!cur_dev->path.empty()) {
// char *interface_component = strstr(cur_dev->path, "&mi_");
// if (interface_component) {
// char *hex_str = interface_component + 4;
// char *endptr = NULL;
// cur_dev->interface_number = strtol(hex_str, &endptr, 16);
// if (endptr == hex_str) {
// /* The parsing failed. Set interface_number to -1. */
// cur_dev->interface_number = -1;
// }
// }
// }
}
cont_close:
CloseHandle(query_handle);
cont:
/* We no longer need the detail data. It can be freed */
free(device_interface_detail_data);
device_index++;
}
/* Close the device information handle. */
SetupDiDestroyDeviceInfoList(device_info_set);
return root;
}
void hid_free_enumeration(hid_device_info *devs)
{
/* TODO: Merge this with the Linux version. This function is platform-independent. */
hid_device_info *d = devs;
while (d) {
hid_device_info *next = d->next;
// free(d->path);
// free(d->serial_number);
// free(d->manufacturer_string);
// free(d->product_string);
delete d;
d = next;
}
}
hid_device * hid_open(unsigned short vendor_id, unsigned short product_id, std::string serial_number)
{
/* TODO: Merge this functions with the Linux version. This function should be platform independent. */
hid_device_info *devs, *cur_dev;
std::string path_to_open;
hid_device *handle = NULL;
path_to_open.clear();
devs = hid_enumerate(vendor_id, product_id);
cur_dev = devs;
while (cur_dev) {
if (cur_dev->vendor_id == vendor_id &&
cur_dev->product_id == product_id) {
if (!cur_dev->str_serial_number.empty()) {
if (cur_dev->str_serial_number == serial_number) {
path_to_open = cur_dev->path;
break;
}
}
else {
path_to_open = cur_dev->path;
break;
}
}
cur_dev = cur_dev->next;
}
if (!path_to_open.empty()) {
/* Open the device */
handle = hid_open_path(path_to_open);
}
hid_free_enumeration(devs);
return handle;
}
hid_device * hid_open_path(std::string path)
{
hid_device *dev;
HIDP_CAPS caps;
PHIDP_PREPARSED_DATA pp_data = NULL;
BOOLEAN res;
NTSTATUS nt_res;
if (hid_init() < 0) {
return NULL;
}
dev = new hid_device;
/* Open a handle to the device */
dev->device_handle = open_device(path.c_str(), TRUE);
/* Check validity of write_handle. */
if (dev->device_handle == INVALID_HANDLE_VALUE) {
/* System devices, such as keyboards and mice, cannot be opened in
read-write mode, because the system takes exclusive control over
them. This is to prevent keyloggers. However, feature reports
can still be sent and received. Retry opening the device, but
without read/write access. */
dev->device_handle = open_device(path.c_str(), FALSE);
/* Check the validity of the limited device_handle. */
if (dev->device_handle == INVALID_HANDLE_VALUE) {
/* Unable to open the device, even without read-write mode. */
dev->register_error("CreateFile");
errtext("CreateFile for ro failed: INVALID_HANDLE");
goto err;
} else
errtext("CreateFile for ro OK");
} else
errtext("CreateFile for r/w OK");
/* Set the Input Report buffer size to 64 reports. */
res = HidD_SetNumInputBuffers(dev->device_handle, 64);
if (!res) {
dev->register_error("HidD_SetNumInputBuffers");
goto err;
}
/* Get the Input Report length for the device. */
res = HidD_GetPreparsedData(dev->device_handle, &pp_data);
if (!res) {
dev->register_error("HidD_GetPreparsedData");
goto err;
}
nt_res = HidP_GetCaps(pp_data, &caps);
if (nt_res != HIDP_STATUS_SUCCESS) {
dev->register_error("HidP_GetCaps");
goto err_pp_data;
}
dev->output_report_length = caps.OutputReportByteLength;
dev->input_report_length = caps.InputReportByteLength;
dev->feature_report_length = caps.FeatureReportByteLength;
HidD_FreePreparsedData(pp_data);
dev->read_buf = (char*) malloc(dev->input_report_length);
return dev;
err_pp_data:
HidD_FreePreparsedData(pp_data);
err:
return NULL;
}
int hid_device::hid_write(const unsigned char *data, size_t length)
{
DWORD bytes_written = 0;
int function_result = -1;
BOOL res;
BOOL overlapped = FALSE;
unsigned char *buf;
/* Make sure the right number of bytes are passed to WriteFile. Windows
expects the number of bytes which are in the _longest_ report (plus
one for the report number) bytes even if the data is a report
which is shorter than that. Windows gives us this value in
caps.OutputReportByteLength. If a user passes in fewer bytes than this,
use cached temporary buffer which is the proper size. */
if (length >= output_report_length) {
/* The user passed the right number of bytes. Use the buffer as-is. */
buf = (unsigned char *) data;
} else {
if (write_buf == NULL)
write_buf = (unsigned char *) malloc(output_report_length);
buf = write_buf;
memcpy(buf, data, length);
memset(buf + length, 0, output_report_length - length);
length = output_report_length;
}
res = WriteFile(device_handle, buf, (DWORD) length, NULL, &write_ol);
if (!res) {
if (GetLastError() != ERROR_IO_PENDING) {
/* WriteFile() failed. Return error. */
register_error("WriteFile");
goto end_of_function;
}
overlapped = TRUE;
}
if (overlapped) {
/* Wait for the transaction to complete. This makes
hid_write() synchronous. */
res = WaitForSingleObject(write_ol.hEvent, 1000);
if (res != WAIT_OBJECT_0) {
/* There was a Timeout. */
register_error("WriteFile/WaitForSingleObject Timeout");
goto end_of_function;
}
/* Get the result. */
res = GetOverlappedResult(device_handle, &write_ol, &bytes_written, FALSE/*wait*/);
if (res) {
function_result = bytes_written;
}
else {
/* The Write operation failed. */
register_error("WriteFile");
goto end_of_function;
}
}
end_of_function:
return function_result;
}
int hid_device::hid_read_timeout(unsigned char *data, size_t length, int milliseconds)
{
DWORD bytes_read = 0;
size_t copy_len = 0;
BOOL res = FALSE;
BOOL overlapped = FALSE;
/* Copy the handle for convenience. */
HANDLE ev = ol.hEvent;
if (!read_pending) {
/* Start an Overlapped I/O read. */
read_pending = TRUE;
memset(read_buf, 0, input_report_length);
ResetEvent(ev);
res = ReadFile(device_handle, read_buf, (DWORD) input_report_length, &bytes_read, &ol);
if (!res) {
if (GetLastError() != ERROR_IO_PENDING) {
/* ReadFile() has failed.
Clean up and return error. */
CancelIo(device_handle);
read_pending = FALSE;
goto end_of_function;
}
overlapped = TRUE;
}
}
else {
overlapped = TRUE;
}
if (overlapped) {
if (milliseconds >= 0) {
/* See if there is any data yet. */
res = WaitForSingleObject(ev, milliseconds);
if (res != WAIT_OBJECT_0) {
/* There was no data this time. Return zero bytes available,
but leave the Overlapped I/O running. */
return 0;
}
}
/* Either WaitForSingleObject() told us that ReadFile has completed, or
we are in non-blocking mode. Get the number of bytes read. The actual
data has been copied to the data[] array which was passed to ReadFile(). */
res = GetOverlappedResult(device_handle, &ol, &bytes_read, TRUE/*wait*/);
}
/* Set pending back to false, even if GetOverlappedResult() returned error. */
read_pending = FALSE;
if (res && bytes_read > 0) {
if (read_buf[0] == 0x0) {
/* If report numbers aren't being used, but Windows sticks a report
number (0x0) on the beginning of the report anyway. To make this
work like the other platforms, and to make it work more like the
HID spec, we'll skip over this byte. */
bytes_read--;
copy_len = length > bytes_read ? bytes_read : length;
memcpy(data, read_buf+1, copy_len);
}
else {
/* Copy the whole buffer, report number and all. */
copy_len = length > bytes_read ? bytes_read : length;
memcpy(data, read_buf, copy_len);
}
}
end_of_function:
if (!res) {
register_error("GetOverlappedResult");
return -1;
}
return (int) copy_len;
}
int hid_device::hid_read(unsigned char *data, size_t length)
{
return hid_read_timeout(data, length, (blocking)? -1: 0);
}
int hid_device::hid_set_nonblocking(int nonblock)
{
blocking = !nonblock;
return 0; /* Success */
}
int hid_device::hid_send_feature_report(const unsigned char *data, size_t length)
{
BOOL res = FALSE;
unsigned char *buf;
size_t length_to_send;
/* Windows expects at least caps.FeatureReportByteLength bytes passed
to HidD_SetFeature(), even if the report is shorter. Any less sent and
the function fails with error ERROR_INVALID_PARAMETER set. Any more
and HidD_SetFeature() silently truncates the data sent in the report
to caps.FeatureReportByteLength. */
if (length >= feature_report_length) {
buf = (unsigned char *) data;
length_to_send = length;
} else {
if (feature_buf == NULL)
feature_buf = (unsigned char *) malloc(feature_report_length);
buf = feature_buf;
memcpy(buf, data, length);
memset(buf + length, 0, feature_report_length - length);
length_to_send = feature_report_length;
}
res = HidD_SetFeature(device_handle, (PVOID)buf, (DWORD) length_to_send);
if (!res) {
register_error("HidD_SetFeature");
return -1;
}
return (int) length;
}
int hid_device::hid_get_feature_report(unsigned char *data, size_t length)
{
BOOL res;
#if 0
res = HidD_GetFeature(device_handle, data, length);
if (!res) {
register_error("HidD_GetFeature");
return -1;
}
return 0; /* HidD_GetFeature() doesn't give us an actual length, unfortunately */
#else
DWORD bytes_returned;
OVERLAPPED ol;
memset(&ol, 0, sizeof(ol));
res = DeviceIoControl(device_handle,
IOCTL_HID_GET_FEATURE,
data, (DWORD) length,
data, (DWORD) length,
&bytes_returned, &ol);
if (!res) {
if (GetLastError() != ERROR_IO_PENDING) {
/* DeviceIoControl() failed. Return error. */
register_error("Send Feature Report DeviceIoControl");
return -1;
}
}
/* Wait here until the write is done. This makes
hid_get_feature_report() synchronous. */
res = GetOverlappedResult(device_handle, &ol, &bytes_returned, TRUE/*wait*/);
if (!res) {
/* The operation failed. */
register_error("Send Feature Report GetOverLappedResult");
return -1;
}
/* bytes_returned does not include the first byte which contains the
report ID. The data buffer actually contains one more byte than
bytes_returned. */
bytes_returned++;
return bytes_returned;
#endif
}
int hid_device::hid_get_input_report(unsigned char *data, size_t length)
{
BOOL res;
#if 0
res = HidD_GetInputReport(device_handle, data, length);
if (!res) {
register_error("HidD_GetInputReport");
return -1;
}
return length;
#else
DWORD bytes_returned;
OVERLAPPED ol;
memset(&ol, 0, sizeof(ol));
res = DeviceIoControl(device_handle,
IOCTL_HID_GET_INPUT_REPORT,
data, (DWORD) length,
data, (DWORD) length,
&bytes_returned, &ol);
if (!res) {
if (GetLastError() != ERROR_IO_PENDING) {
/* DeviceIoControl() failed. Return error. */
register_error("Send Input Report DeviceIoControl");
return -1;
}
}
/* Wait here until the write is done. This makes
hid_get_feature_report() synchronous. */
res = GetOverlappedResult(device_handle, &ol, &bytes_returned, TRUE/*wait*/);
if (!res) {
/* The operation failed. */
register_error("Send Input Report GetOverLappedResult");
return -1;
}
/* bytes_returned does not include the first byte which contains the
report ID. The data buffer actually contains one more byte than
bytes_returned. */
bytes_returned++;
return bytes_returned;
#endif
}
void hid_device::hid_close()
{
CancelIo(device_handle);
}
std::string hid_device::hid_get_manufacturer_string()
{
BOOL res;
wchar_t WC[256];
res = HidD_GetManufacturerString(device_handle, WC, 256);
if (!res) {
register_error("HidD_GetManufacturerString");
return "";
}
return wchar2str("HidD_GetManufacturerString", WC);
}
std::string hid_device::hid_get_product_string()
{
BOOL res;
wchar_t WC[256];
res = HidD_GetProductString(device_handle, WC, 256);
if (!res) {
register_error("HidD_GetProductString");
return "";
}
return wchar2str("HidD_GetProductString", WC);
}
std::string hid_device::hid_get_serial_number_string()
{
BOOL res;
wchar_t WC[256];
res = HidD_GetSerialNumberString(device_handle, WC, 256);
if (!res) {
register_error("HidD_GetSerialNumberString");
return "";
}
return wchar2str("HidD_GetSerialNumberString", WC);
}
int hid_device::hid_get_indexed_string(int string_index, std::string string, size_t maxlen)
{
BOOL res;
wchar_t WC[maxlen+1];
res = HidD_GetIndexedString(device_handle, string_index, WC, maxlen);
if (!res) {
register_error("HidD_GetIndexedString");
string = "";
return -1;
}
string = wchar2str("HidD_Get_IndexedString", WC);
return 0;
}
const char * hid_device::hid_error()
{
return "hid_error for global errors is not implemented yet";
}
| 21,946
|
C++
|
.cxx
| 699
| 28.479256
| 112
| 0.695965
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,071
|
hid_mac.cxx
|
w1hkj_fldigi/src/cmedia/hid_mac.cxx
|
/***********************************************************************
HIDAPI - Multi-Platform library for communication with HID devices.
hid_mac.cxx
Alan Ott
Signal 11 Software
Copyright 2009, All Rights Reserved.
C++ implementation
* Copyright 2021
* David Freese, W1HKJ
* for use in fldigi
This software is licensed under the terms of the GNU General Public
License v3.
***********************************************************************/
/* See Apple Technical Note TN2187 for details on IOHidManager. */
/***********************************************************************
Tested on both Intel and M1 architecture
***********************************************************************/
#include <iostream>
#include "hidapi.h"
#define UTF8 134217984
std::string wchar2str( char *WC )
{
// size_t count = sizeof(WC);
// char MB[count + 1];
// memset(MB, 0, count + 1);
// size_t ret = wcstombs(MB, WC, count);
static std::string retstr;
// if (ret) retstr = MB;
return retstr;
}
int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count)
{
if(count == 0) {
errno = EINVAL;
return -1;
}
if(pthread_mutex_init(&barrier->mutex, 0) < 0) {
return -1;
}
if(pthread_cond_init(&barrier->cond, 0) < 0) {
pthread_mutex_destroy(&barrier->mutex);
return -1;
}
barrier->trip_count = count;
barrier->count = 0;
return 0;
}
int pthread_barrier_destroy(pthread_barrier_t *barrier)
{
pthread_cond_destroy(&barrier->cond);
pthread_mutex_destroy(&barrier->mutex);
return 0;
}
int pthread_barrier_wait(pthread_barrier_t *barrier)
{
pthread_mutex_lock(&barrier->mutex);
++(barrier->count);
if(barrier->count >= barrier->trip_count)
{
barrier->count = 0;
pthread_cond_broadcast(&barrier->cond);
pthread_mutex_unlock(&barrier->mutex);
return 1;
}
else
{
pthread_cond_wait(&barrier->cond, &(barrier->mutex));
pthread_mutex_unlock(&barrier->mutex);
return 0;
}
}
static IOHIDManagerRef hid_mgr = 0x0;
void hid_device::register_error(const char *op)
{
}
static int32_t get_int_property(IOHIDDeviceRef device, CFStringRef key)
{
CFTypeRef ref;
int32_t value;
ref = IOHIDDeviceGetProperty(device, key);
if (ref) {
if (CFGetTypeID(ref) == CFNumberGetTypeID()) {
CFNumberGetValue((CFNumberRef) ref, kCFNumberSInt32Type, &value);
return value;
}
}
return 0;
}
static unsigned short get_vendor_id(IOHIDDeviceRef device)
{
return get_int_property(device, CFSTR(kIOHIDVendorIDKey));
}
static unsigned short get_product_id(IOHIDDeviceRef device)
{
return get_int_property(device, CFSTR(kIOHIDProductIDKey));
}
static int32_t get_max_report_length(IOHIDDeviceRef device)
{
return get_int_property(device, CFSTR(kIOHIDMaxInputReportSizeKey));
}
static int get_string_property(IOHIDDeviceRef device, CFStringRef prop, char *buf, size_t len)
{
if (!len)
return 0;
CFStringRef str = reinterpret_cast<const __CFString *>(IOHIDDeviceGetProperty(device, prop));
UniChar ubuf[len];
memset(buf, 0, len);
if (str) {
CFIndex str_len = CFStringGetLength(str);
CFRange range;
range.location = 0;
range.length = ((size_t)str_len > len)? len: (size_t)str_len;
CFStringGetCharacters(
str,
range,
ubuf);
for (int i = 0; i < range.length; i++) buf[i] = ubuf[i];
return 0;
}
else
return -1;
}
static int get_serial_number(IOHIDDeviceRef device, char *buf, size_t len)
{
return get_string_property(device, CFSTR(kIOHIDSerialNumberKey), buf, len);
}
static int get_manufacturer_string(IOHIDDeviceRef device, char *buf, size_t len)
{
return get_string_property(device, CFSTR(kIOHIDManufacturerKey), buf, len);
}
static int get_product_string(IOHIDDeviceRef device, char *buf, size_t len)
{
return get_string_property(device, CFSTR(kIOHIDProductKey), buf, len);
}
/* hidapi_IOHIDDeviceGetService()
*
* Return the io_service_t corresponding to a given IOHIDDeviceRef, either by:
* - on OS X 10.6 and above, calling IOHIDDeviceGetService()
* - on OS X 10.5, extract it from the IOHIDDevice struct
*/
static io_service_t hidapi_IOHIDDeviceGetService(IOHIDDeviceRef device)
{
static void *iokit_framework = NULL;
static io_service_t (*dynamic_IOHIDDeviceGetService)(IOHIDDeviceRef device) = NULL;
/* Use dlopen()/dlsym() to get a pointer to IOHIDDeviceGetService() if it exists.
* If any of these steps fail, dynamic_IOHIDDeviceGetService will be left NULL
* and the fallback method will be used.
*/
if (iokit_framework == NULL) {
iokit_framework = dlopen("/System/Library/IOKit.framework/IOKit", RTLD_LAZY);
if (iokit_framework != NULL)
dynamic_IOHIDDeviceGetService = reinterpret_cast<unsigned int (*)(__IOHIDDevice *)>(dlsym(iokit_framework, "IOHIDDeviceGetService"));
}
if (dynamic_IOHIDDeviceGetService != NULL) {
/* Running on OS X 10.6 and above: IOHIDDeviceGetService() exists */
return dynamic_IOHIDDeviceGetService(device);
}
else
{
/* Running on OS X 10.5: IOHIDDeviceGetService() doesn't exist.
*
* Be naughty and pull the service out of the IOHIDDevice.
* IOHIDDevice is an opaque struct not exposed to applications, but its
* layout is stable through all available versions of OS X.
* Tested and working on OS X 10.5.8 i386, x86_64, and ppc.
*/
struct IOHIDDevice_internal {
/* The first field of the IOHIDDevice struct is a
* CFRuntimeBase (which is a private CF struct).
*
* a, b, and c are the 3 fields that make up a CFRuntimeBase.
* See http://opensource.apple.com/source/CF/CF-476.18/CFRuntime.h
*
* The second field of the IOHIDDevice is the io_service_t we're looking for.
*/
uintptr_t a;
uint8_t b[4];
#if __LP64__
uint32_t c;
#endif
io_service_t service;
};
struct IOHIDDevice_internal *tmp = (struct IOHIDDevice_internal *)device;
return tmp->service;
}
}
/* Initialize the IOHIDManager. Return 0 for success and -1 for failure. */
static int init_hid_manager(void)
{
/* Initialize all the HID Manager Objects */
hid_mgr = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
if (hid_mgr) {
IOHIDManagerSetDeviceMatching(hid_mgr, NULL);
IOHIDManagerScheduleWithRunLoop(hid_mgr, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
return 0;
}
return -1;
}
/* Initialize the IOHIDManager if necessary. This is the public function, and
it is safe to call this function repeatedly. Return 0 for success and -1
for failure. */
int hid_init(void)
{
if (!hid_mgr) {
return init_hid_manager();
}
/* Already initialized. */
return 0;
}
int hid_exit(void)
{
if (hid_mgr) {
/* Close the HID manager. */
IOHIDManagerClose(hid_mgr, kIOHIDOptionsTypeNone);
CFRelease(hid_mgr);
hid_mgr = NULL;
}
return 0;
}
static void process_pending_events(void) {
SInt32 res;
do {
res = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.001, FALSE);
} while(res != kCFRunLoopRunFinished && res != kCFRunLoopRunTimedOut);
}
hid_device_info *hid_enumerate(unsigned short vendor_id, unsigned short product_id)
{
hid_device_info *root = NULL; /* return object */
hid_device_info *cur_dev = NULL;
CFIndex num_devices;
int i;
/* Set up the HID Manager if it hasn't been done */
if (hid_init() < 0)
return NULL;
/* give the IOHIDManager a chance to update itself */
process_pending_events();
/* Get a list of the Devices */
IOHIDManagerSetDeviceMatching(hid_mgr, NULL);
CFSetRef device_set = IOHIDManagerCopyDevices(hid_mgr);
/* Convert the list into a C array so we can iterate easily. */
num_devices = CFSetGetCount(device_set);
IOHIDDeviceRef *device_array = reinterpret_cast<IOHIDDeviceRef *>(calloc(num_devices, sizeof(IOHIDDeviceRef)));
CFSetGetValues(device_set, (const void **) device_array);
/* Iterate over each device, making an entry for it. */
for (i = 0; i < num_devices; i++) {
unsigned short dev_vid;
unsigned short dev_pid;
#define BUF_LEN 256
char buf[BUF_LEN];
IOHIDDeviceRef dev = device_array[i];
if (!dev) {
continue;
}
dev_vid = get_vendor_id(dev);
dev_pid = get_product_id(dev);
/* Check the VID/PID against the arguments */
if ((vendor_id == 0x0 || vendor_id == dev_vid) &&
(product_id == 0x0 || product_id == dev_pid)) {
hid_device_info *tmp;
io_object_t iokit_dev;
kern_return_t res;
io_string_t path;
/* VID/PID match. Create the record. */
tmp = new hid_device_info;
if (cur_dev) {
cur_dev->next = tmp;
}
else {
root = tmp;
}
cur_dev = tmp;
/* Get the Usage Page and Usage for this device. */
cur_dev->usage_page = get_int_property(dev, CFSTR(kIOHIDPrimaryUsagePageKey));
cur_dev->usage = get_int_property(dev, CFSTR(kIOHIDPrimaryUsageKey));
/* Fill out the record */
cur_dev->next = NULL;
/* Fill in the path (IOService plane) */
iokit_dev = hidapi_IOHIDDeviceGetService(dev);
res = IORegistryEntryGetPath(iokit_dev, kIOServicePlane, path);
if (res == KERN_SUCCESS)
cur_dev->path = strdup(path);
else
cur_dev->path = strdup("");
/* Serial Number */
get_serial_number(dev, buf, BUF_LEN);
cur_dev->str_serial_number = buf;
/* Manufacturer and Product strings */
get_manufacturer_string(dev, buf, BUF_LEN);
cur_dev->str_manufacturer_string = buf;
get_product_string(dev, buf, BUF_LEN);
std::cout << buf << std::endl;
cur_dev->str_product_string = buf;
/* VID/PID */
cur_dev->vendor_id = dev_vid;
cur_dev->product_id = dev_pid;
/* Release Number */
cur_dev->release_number = get_int_property(dev, CFSTR(kIOHIDVersionNumberKey));
/* Interface Number (Unsupported on Mac)*/
cur_dev->interface_number = -1;
}
}
free(device_array);
CFRelease(device_set);
return root;
}
void hid_free_enumeration(hid_device_info *devs)
{
hid_device_info *d = devs;
while (d) {
hid_device_info *next = d->next;
delete d;
d = next;
}
}
hid_device * hid_open(unsigned short vendor_id, unsigned short product_id, std::string serial_number)
{
/* This function is identical to the Linux version. Platform independent. */
hid_device_info *devs, *cur_dev;
std::string path_to_open;
hid_device * handle = NULL;
path_to_open.clear();
devs = hid_enumerate(vendor_id, product_id);
cur_dev = devs;
while (cur_dev) {
if (cur_dev->vendor_id == vendor_id &&
cur_dev->product_id == product_id) {
if (!serial_number.empty() &&
(cur_dev->str_serial_number == serial_number) ) {
path_to_open = cur_dev->path;
break;
}
else {
path_to_open = cur_dev->path;
break;
}
}
cur_dev = cur_dev->next;
}
if (!path_to_open.empty()) {
/* Open the device */
handle = hid_open_path(path_to_open);
}
hid_free_enumeration(devs);
return handle;
}
static void hid_device_removal_callback(void *context, IOReturn result,
void *sender)
{
/* Stop the Run Loop for this device. */
hid_device *d = reinterpret_cast<hid_device *>(context);
d->disconnected = 1;
CFRunLoopStop(d->run_loop);
}
/* The Run Loop calls this function for each input report received.
This function puts the data into a linked list to be picked up by
hid_read(). */
static void hid_report_callback(void *context, IOReturn result, void *sender,
IOHIDReportType report_type, uint32_t report_id,
uint8_t *report, CFIndex report_length)
{
input_report *rpt;
hid_device *dev = reinterpret_cast<hid_device *>(context);
/* Make a new Input Report object */
rpt = reinterpret_cast<input_report *>(calloc(1, sizeof(input_report)));
rpt->data = reinterpret_cast<unsigned char *>(calloc(1, report_length));
memcpy(rpt->data, report, report_length);
rpt->len = report_length;
rpt->next = NULL;
/* Lock this section */
pthread_mutex_lock(&dev->mutex);
/* Attach the new report object to the end of the list. */
if (dev->input_reports == NULL) {
/* The list is empty. Put it at the root. */
dev->input_reports = rpt;
}
else {
/* Find the end of the list and attach. */
input_report *cur = dev->input_reports;
int num_queued = 0;
while (cur->next != NULL) {
cur = cur->next;
num_queued++;
}
cur->next = rpt;
/* Pop one off if we've reached 30 in the queue. This
way we don't grow forever if the user never reads
anything from the device. */
if (num_queued > 30) {
dev->return_data(NULL, 0);
}
}
/* Signal a waiting thread that there is data. */
pthread_cond_signal(&dev->condition);
/* Unlock */
pthread_mutex_unlock(&dev->mutex);
}
/* This gets called when the read_thread's run loop gets signaled by
hid_close(), and serves to stop the read_thread's run loop. */
static void perform_signal_callback(void *context)
{
hid_device *dev = reinterpret_cast<hid_device *>(context);
CFRunLoopStop(dev->run_loop); /*TODO: CFRunLoopGetCurrent()*/
}
static void *read_thread(void *param)
{
hid_device *dev = reinterpret_cast<hid_device *>(param);
SInt32 code;
/* Move the device's run loop to this thread. */
IOHIDDeviceScheduleWithRunLoop(dev->device_handle, CFRunLoopGetCurrent(), dev->run_loop_mode);
/* Create the RunLoopSource which is used to signal the
event loop to stop when hid_close() is called. */
CFRunLoopSourceContext ctx;
memset(&ctx, 0, sizeof(ctx));
ctx.version = 0;
ctx.info = dev;
ctx.perform = &perform_signal_callback;
dev->source = CFRunLoopSourceCreate(kCFAllocatorDefault, 0/*order*/, &ctx);
CFRunLoopAddSource(CFRunLoopGetCurrent(), dev->source, dev->run_loop_mode);
/* Store off the Run Loop so it can be stopped from hid_close()
and on device disconnection. */
dev->run_loop = CFRunLoopGetCurrent();
/* Notify the main thread that the read thread is up and running. */
pthread_barrier_wait(&dev->barrier);
/* Run the Event Loop. CFRunLoopRunInMode() will dispatch HID input
reports into the hid_report_callback(). */
while (!dev->shutdown_thread && !dev->disconnected) {
code = CFRunLoopRunInMode(dev->run_loop_mode, 1000/*sec*/, FALSE);
/* Return if the device has been disconnected */
if (code == kCFRunLoopRunFinished) {
dev->disconnected = 1;
break;
}
/* Break if The Run Loop returns Finished or Stopped. */
if (code != kCFRunLoopRunTimedOut &&
code != kCFRunLoopRunHandledSource) {
/* There was some kind of error. Setting
shutdown seems to make sense, but
there may be something else more appropriate */
dev->shutdown_thread = 1;
break;
}
}
/* Now that the read thread is stopping, Wake any threads which are
waiting on data (in hid_read_timeout()). Do this under a mutex to
make sure that a thread which is about to go to sleep waiting on
the condition actually will go to sleep before the condition is
signaled. */
pthread_mutex_lock(&dev->mutex);
pthread_cond_broadcast(&dev->condition);
pthread_mutex_unlock(&dev->mutex);
/* Wait here until hid_close() is called and makes it past
the call to CFRunLoopWakeUp(). This thread still needs to
be valid when that function is called on the other thread. */
pthread_barrier_wait(&dev->shutdown_barrier);
return NULL;
}
/* hid_open_path()
*
* path must be a valid path to an IOHIDDevice in the IOService plane
* Example: "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/EHC1@1D,7/AppleUSBEHCI/PLAYSTATION(R)3 Controller@fd120000/IOUSBInterface@0/IOUSBHIDDriver"
*/
hid_device * hid_open_path(std::string path)
{
hid_device *dev = NULL;
io_registry_entry_t entry = MACH_PORT_NULL;
IOReturn ret;
dev = new hid_device;
/* Set up the HID Manager if it hasn't been done */
if (hid_init() < 0)
return NULL;
/* Get the IORegistry entry for the given path */
entry = IORegistryEntryFromPath(kIOMasterPortDefault, path.c_str());
if (entry == MACH_PORT_NULL) {
/* Path wasn't valid (maybe device was removed?) */
goto return_error;
}
/* Create an IOHIDDevice for the entry */
dev->device_handle = IOHIDDeviceCreate(kCFAllocatorDefault, entry);
if (dev->device_handle == NULL) {
/* Error creating the HID device */
goto return_error;
}
/* Open the IOHIDDevice */
ret = IOHIDDeviceOpen(dev->device_handle, kIOHIDOptionsTypeSeizeDevice);
if (ret == kIOReturnSuccess) {
char str[32];
/* Create the buffers for receiving data */
dev->max_input_report_len = (CFIndex) get_max_report_length(dev->device_handle);
dev->input_report_buf = reinterpret_cast<uint8_t *>(calloc(dev->max_input_report_len, sizeof(uint8_t)));
/* Create the Run Loop Mode for this device.
printing the reference seems to work. */
sprintf(str, "HIDAPI_%p", dev->device_handle);
dev->run_loop_mode =
CFStringCreateWithCString(NULL, str, kCFStringEncodingASCII);
/* Attach the device to a Run Loop */
IOHIDDeviceRegisterInputReportCallback(
dev->device_handle, dev->input_report_buf, dev->max_input_report_len,
&hid_report_callback, dev);
IOHIDDeviceRegisterRemovalCallback(dev->device_handle, hid_device_removal_callback, dev);
/* Start the read thread */
pthread_create(&dev->thread, NULL, read_thread, dev);
/* Wait here for the read thread to be initialized. */
pthread_barrier_wait(&dev->barrier);
IOObjectRelease(entry);
return dev;
}
else {
goto return_error;
}
return_error:
if (dev->device_handle != NULL)
CFRelease(dev->device_handle);
if (entry != MACH_PORT_NULL)
IOObjectRelease(entry);
delete dev;
return NULL;
}
int hid_device::set_report(IOHIDReportType type, const unsigned char *data, size_t length)
{
const unsigned char *data_to_send;
size_t length_to_send;
IOReturn res;
/* Return if the device has been disconnected. */
if (disconnected)
return -1;
if (data[0] == 0x0) {
/* Not using numbered Reports.
Don't send the report number. */
data_to_send = data+1;
length_to_send = length-1;
}
else {
/* Using numbered Reports.
Send the Report Number */
data_to_send = data;
length_to_send = length;
}
if (!disconnected) {
res = IOHIDDeviceSetReport(device_handle,
type,
data[0], /* Report ID*/
data_to_send, length_to_send);
if (res == kIOReturnSuccess) {
return length;
}
else
return -1;
}
return -1;
}
int hid_device::hid_write(const unsigned char *data, size_t length)
{
return set_report(kIOHIDReportTypeOutput, data, length);
}
/* Helper function, so that this isn't duplicated in hid_read(). */
int hid_device::return_data(unsigned char *data, size_t length)
{
/* Copy the data out of the linked list item (rpt) into the
return buffer (data), and delete the liked list item. */
input_report *rpt = input_reports;
size_t len = (length < rpt->len)? length: rpt->len;
memcpy(data, rpt->data, len);
input_reports = rpt->next;
free(rpt->data);
free(rpt);
return len;
}
int hid_device::cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
while (!input_reports) {
int res = pthread_cond_wait(cond, mutex);
if (res != 0)
return res;
/* A res of 0 means we may have been signaled or it may
be a spurious wakeup. Check to see that there's acutally
data in the queue before returning, and if not, go back
to sleep. See the pthread_cond_timedwait() man page for
details. */
if (shutdown_thread || disconnected)
return -1;
}
return 0;
}
int hid_device::cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
{
while (!input_reports) {
int res = pthread_cond_timedwait(cond, mutex, abstime);
if (res != 0)
return res;
/* A res of 0 means we may have been signaled or it may
be a spurious wakeup. Check to see that there's acutally
data in the queue before returning, and if not, go back
to sleep. See the pthread_cond_timedwait() man page for
details. */
if (shutdown_thread || disconnected)
return -1;
}
return 0;
}
int hid_device::hid_read_timeout(unsigned char *data, size_t length, int milliseconds)
{
int bytes_read = -1;
/* Lock the access to the report list. */
pthread_mutex_lock(&mutex);
/* There's an input report queued up. Return it. */
if (input_reports) {
/* Return the first one */
bytes_read = return_data(data, length);
goto ret;
}
/* Return if the device has been disconnected. */
if (disconnected) {
bytes_read = -1;
goto ret;
}
if (shutdown_thread) {
/* This means the device has been closed (or there
has been an error. An error code of -1 should
be returned. */
bytes_read = -1;
goto ret;
}
/* There is no data. Go to sleep and wait for data. */
if (milliseconds == -1) {
/* Blocking */
int res;
res = cond_wait(&condition, &mutex);
if (res == 0)
bytes_read = return_data(data, length);
else {
/* There was an error, or a device disconnection. */
bytes_read = -1;
}
}
else if (milliseconds > 0) {
/* Non-blocking, but called with timeout. */
int res;
struct timespec ts;
struct timeval tv;
gettimeofday(&tv, NULL);
TIMEVAL_TO_TIMESPEC(&tv, &ts);
ts.tv_sec += milliseconds / 1000;
ts.tv_nsec += (milliseconds % 1000) * 1000000;
if (ts.tv_nsec >= 1000000000L) {
ts.tv_sec++;
ts.tv_nsec -= 1000000000L;
}
res = cond_timedwait(&condition, &mutex, &ts);
if (res == 0)
bytes_read = return_data(data, length);
else if (res == ETIMEDOUT)
bytes_read = 0;
else
bytes_read = -1;
}
else {
/* Purely non-blocking */
bytes_read = 0;
}
ret:
/* Unlock */
pthread_mutex_unlock(&mutex);
return bytes_read;
}
int hid_device::hid_read(unsigned char *data, size_t length)
{
return hid_read_timeout(data, length, (blocking)? -1: 0);
}
int hid_device::hid_set_nonblocking(int nonblock)
{
/* All Nonblocking operation is handled by the library. */
blocking = !nonblock;
return 0;
}
int hid_device::hid_send_feature_report(const unsigned char *data, size_t length)
{
return set_report(kIOHIDReportTypeFeature, data, length);
}
int hid_device::hid_get_feature_report(unsigned char *data, size_t length)
{
CFIndex len = length;
IOReturn res;
/* Return if the device has been unplugged. */
if (disconnected)
return -1;
res = IOHIDDeviceGetReport(device_handle,
kIOHIDReportTypeFeature,
data[0], /* Report ID */
data, &len);
if (res == kIOReturnSuccess)
return len;
else
return -1;
}
void hid_device::hid_close()
{
/* Disconnect the report callback before close. */
if (!disconnected) {
IOHIDDeviceRegisterInputReportCallback(
device_handle, input_report_buf, max_input_report_len,
NULL, this);
IOHIDDeviceRegisterRemovalCallback(device_handle, NULL, this);
IOHIDDeviceUnscheduleFromRunLoop(device_handle, run_loop, run_loop_mode);
IOHIDDeviceScheduleWithRunLoop(device_handle, CFRunLoopGetMain(), kCFRunLoopDefaultMode);
}
/* Cause read_thread() to stop. */
shutdown_thread = 1;
/* Wake up the run thread's event loop so that the thread can exit. */
CFRunLoopSourceSignal(source);
CFRunLoopWakeUp(run_loop);
/* Notify the read thread that it can shut down now. */
pthread_barrier_wait(&shutdown_barrier);
/* Wait for read_thread() to end. */
pthread_join(thread, NULL);
/* Close the OS handle to the device, but only if it's not
been unplugged. If it's been unplugged, then calling
IOHIDDeviceClose() will crash. */
if (!disconnected) {
IOHIDDeviceClose(device_handle, kIOHIDOptionsTypeSeizeDevice);
}
/* Clear out the queue of received reports. */
pthread_mutex_lock(&mutex);
while (input_reports) {
return_data(NULL, 0);
}
pthread_mutex_unlock(&mutex);
CFRelease(device_handle);
// delete dev;
}
const char * hid_device::hid_error()
{
return "HID error string not implemented";
}
| 23,641
|
C++
|
.cxx
| 733
| 29.24693
| 159
| 0.698893
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| true
| false
|
751,072
|
qrunner.cxx
|
w1hkj_fldigi/src/qrunner/qrunner.cxx
|
// ----------------------------------------------------------------------------
// qrunner.cxx
//
// Copyright (C) 2007-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <unistd.h>
#include <errno.h>
#if defined(__CYGWIN__)
# include <sys/types.h>
# include <sys/socket.h>
#elif defined(__MINGW32__)
# include "compat.h"
#endif
#include <fcntl.h>
#include <FL/Fl.H>
#include "fqueue.h"
#include "qrunner.h"
#ifndef __MINGW32__
# define QRUNNER_EAGAIN() (errno == EAGAIN)
#else
# define QRUNNER_EAGAIN() ((errno = WSAGetLastError()) == WSAEWOULDBLOCK)
#endif
// qrunner threads
const char *sztid[] = {
"INVALID_TID",
"TRX_TID",
"TOD_TID",
"QRZ_TID",
"RIGCTL_TID",
"NORIGCTL_TID",
"EQSL_TID",
"ADIF_RW_TID",
"ADIF_MERGE_TID",
"XMLRPC_TID",
"ARQ_TID",
"ARQSOCKET_TID",
"MACLOGGER_TID",
"KISS_TID",
"KISSSOCKET_TID",
"PSM_TID",
"AUDIO_ALERT_TID",
"FD_TID",
"N3FJP_TID",
"DXCC_TID",
"WKEY_TID",
"CWIO_TID",
"FSK_TID",
"FMT_TID",
"FLMAIN_TID"
};
void qrunner_debug(int tid, const char *name)
{
if (tid > ((int)sizeof(sztid)-1)) tid = 0;
else tid++;
if (tid < 2) return;
FILE *fd = (FILE *)0;
fd = fl_fopen("qrunner.txt", "a");
if(fd) {
fprintf(fd, "%s, %s\n", sztid[tid], name);
fclose(fd);
}
}
qrunner::qrunner() : attached(false), inprog(false), drop_flag(false)
{
fifo = new fqueue(FIFO_SIZE);
#ifndef __WOE32__
if (pipe(pfd) == -1)
#else
if (socketpair(PF_INET, SOCK_STREAM, 0, pfd) == -1)
#endif
throw qexception(errno);
set_cloexec(pfd[0], 1);
set_cloexec(pfd[1], 1);
if (set_nonblock(pfd[0], 1) == -1)
throw qexception(errno);
#ifdef __WOE32__
set_nodelay(pfd[1], 1);
#endif
}
qrunner::~qrunner()
{
detach();
close(pfd[0]);
close(pfd[1]);
delete fifo;
}
void qrunner::attach(int id_no, std::string id_string)
{
Fl::add_fd(pfd[0], FL_READ, reinterpret_cast<Fl_FD_Handler>(qrunner::execute), this);
attached = true;
_id_no = id_no;
_id_string.assign(id_string);
}
void qrunner::attach(void)
{
Fl::add_fd(pfd[0], FL_READ, reinterpret_cast<Fl_FD_Handler>(qrunner::execute), this);
attached = true;
}
void qrunner::detach(void)
{
attached = false;
Fl::remove_fd(pfd[0], FL_READ);
}
static unsigned char rbuf[FIFO_SIZE];
void qrunner::execute(int fd, void *arg)
{
qrunner *qr = reinterpret_cast<qrunner *>(arg);
if (qr->inprog)
return;
qr->inprog = true;
long n = QRUNNER_READ(fd, rbuf, FIFO_SIZE);
switch (n) {
case -1:
if (!QRUNNER_EAGAIN()) {
throw qexception(errno);
}
// else fall through
case 0:
break;
default:
while (n--) {
qr->fifo->execute();
}
}
qr->inprog = false;
}
void qrunner::flush(void)
{
execute(pfd[0], this);
}
| 3,405
|
C++
|
.cxx
| 147
| 21.421769
| 86
| 0.649892
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,073
|
cmd_debug.cxx
|
w1hkj_fldigi/src/synop-src/cmd_debug.cxx
|
// ----------------------------------------------------------------------------
// cmd_debug.cxx version which excludes fltk calls
//
// Copyright (C) 2008-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#ifdef __MINGW32__
# include "compat.h"
#endif
#include <sstream>
#include <fstream>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdarg>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include "debug.h"
#include "gettext.h"
static FILE* wfile = 0;
static FILE* rfile = 0;
static int rfd;
static bool tty;
static string linebuf;
debug* debug::inst = 0;
debug::level_e debug::level = debug::INFO_LEVEL;
uint32_t debug::mask = ~0u;
static const char* prefix[] = {
_("Quiet"), _("Error"), _("Warning"), _("Info"), _("Verbose"), _("Debug")
};
void debug::rotate_log(const char* filename)
{
const int n = 5; // rename existing log files to keep up to 5 old versions
ostringstream oldfn, newfn;
ostringstream::streampos p;
oldfn << filename << '.';
newfn << filename << '.';
p = oldfn.tellp();
for (int i = n - 1; i > 0; i--) {
oldfn.seekp(p);
newfn.seekp(p);
oldfn << i;
newfn << i + 1;
rename(oldfn.str().c_str(), newfn.str().c_str());
}
rename(filename, oldfn.str().c_str());
}
void debug::start(const char* filename)
{
if (debug::inst)
return;
rotate_log(filename);
inst = new debug(filename);
}
void debug::stop(void)
{
if (inst) {
delete inst;
inst = 0;
}
}
static char fmt[1024];
void debug::log(level_e level, const char* func, const char* srcf, int line, const char* format, ...)
{
if (!inst)
return;
if (unlikely(debug::level == DEBUG_LEVEL)) {
time_t t = time(NULL);
struct tm stm;
(void)localtime_r(&t, &stm);
snprintf(fmt, sizeof(fmt), "%c: [%02d:%02d:%02d] %s:%d: %s\n",
*prefix[level], stm.tm_hour, stm.tm_min, stm.tm_sec, srcf, line, format);
}
else
snprintf(fmt, sizeof(fmt), "%c: %s: %s\n", *prefix[level], func, format);
va_list args;
va_start(args, format);
intptr_t nw = vfprintf(wfile, fmt, args);
va_end(args);
if (tty) {
if (level <= DEBUG_LEVEL && level > QUIET_LEVEL) {
va_start(args, format);
vfprintf(stderr, fmt, args);
va_end(args);
}
}
#ifdef __MINGW32__
fflush(wfile);
#endif
sync_text(&nw);
}
void debug::elog(const char* func, const char* srcf, int line, const char* text)
{
log(ERROR_LEVEL, func, srcf, line, "%s: %s", text, strerror(errno));
}
static char buf[BUFSIZ+1];
void debug::sync_text(void* arg)
{
intptr_t toread = (intptr_t)arg;
size_t block = MIN((size_t)toread, sizeof(buf) - 1);
ssize_t n;
while (toread > 0) {
if ((n = read(rfd, buf, block)) <= 0)
break;
buf[n] = '\0';
linebuf = buf;
if (linebuf[linebuf.length() - 1] != '\n')
linebuf += '\n';
size_t p1 = 0, p2 = linebuf.find("\n");
while( p2 != string::npos) {
p1 = p2 + 1;
p2 = linebuf.find("\n", p1);
}
toread -= n;
}
}
debug::debug(const char* filename)
{
if ((wfile = fl_fopen(filename, "w")) == NULL)
throw strerror(errno);
setvbuf(wfile, (char*)NULL, _IOLBF, 0);
set_cloexec(fileno(wfile), 1);
if ((rfile = fl_fopen(filename, "r")) == NULL)
throw strerror(errno);
rfd = fileno(rfile);
set_cloexec(rfd, 1);
#ifndef __MINGW32__
int f;
if ((f = fcntl(rfd, F_GETFL)) == -1)
throw strerror(errno);
if (fcntl(rfd, F_SETFL, f | O_NONBLOCK) == -1)
throw strerror(errno);
#endif
tty = isatty(fileno(stderr));
}
debug::~debug()
{
if (wfile) fclose(wfile);
if (rfile) fclose(rfile);
}
| 4,263
|
C++
|
.cxx
| 158
| 25.006329
| 101
| 0.637233
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,074
|
synop_tool.cxx
|
w1hkj_fldigi/src/synop-src/synop_tool.cxx
|
// ----------------------------------------------------------------------------
// synop.cxx -- SYNOP decoding
//
// Copyright (C) 2012
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include "synop.h"
#include "kmlserver.h"
#include "field_def.h"
#define G_N_ELEMENTS(arr) sizeof(arr)/sizeof(*arr)
// ----------------------------------------------------------------------------
static std::ostream * dbg_strm = &std::cout ;
struct tst_callback : public synop_callback {
// Callback for writing decoded synop messages.
void print(const char * str, size_t nb, bool bold ) const {
dbg_strm->write( str, nb );
}
bool log_adif(void) const { return true ;}
bool log_kml(void) const { return true ;}
};
// ----------------------------------------------------------------------------
static void test_coordinates()
{
CoordinateT::Pair jn45op( "JN45op" );
if( (int)( jn45op.longitude().angle() * 100 ) != 920 ) {
std::cout << "Bad longitude\n" ;
exit(EXIT_FAILURE);
}
if( (int)( jn45op.latitude().angle() * 100 ) != 4564 ) {
std::cout << "Bad latitude\n" ;
exit(EXIT_FAILURE);
}
std::cout << "Coordinates OK\n";
}
// ----------------------------------------------------------------------------
static const struct {
int m_wmo_indicator ;
const char * m_name ;
} wmo_tests[] = {
{ 62722, "Aroma" },
{ 95613, "Pemberton" },
{ 41939, "Madaripur" },
{ 71121, "Edmonton Namao Alta." }
};
static const size_t wmo_tests_nb = G_N_ELEMENTS(wmo_tests);
static void test_wmo(void)
try
{
for( size_t i = 0; i < wmo_tests_nb; ++i )
{
const std::string & wmo_name = SynopDB::IndicatorToName( wmo_tests[i].m_wmo_indicator );
std::cout << "wmo_name=" << wmo_name << "\n";
std::cout << SynopDB::IndicatorToCoordinates( wmo_tests[i].m_wmo_indicator ) << "\n";
if( wmo_name != wmo_tests[i].m_name ) {
std::cout << wmo_name << '\n';
std::cout << wmo_tests[i].m_name << '\n';
std::cout << "ERROR\n";
exit(1) ;
}
}
std::cout << "Tested " << wmo_tests_nb << " records\n";
}
catch(...) {
std::cout << "Error when testing wmo loading\n";
return ;
}
// ----------------------------------------------------------------------------
static const struct {
const char * m_buoy_id ;
const char * m_name ;
} buoy_tests[] = {
{ "44022", "Execution Rocks" },
{ "kcmb", "East Cameron 47JP (Apache Corp)" }
};
static const size_t buoy_tests_nb = G_N_ELEMENTS(buoy_tests);
static void test_buoy(void)
try
{
for( size_t i = 0; i < buoy_tests_nb; ++i )
{
const std::string & buoy_name = SynopDB::BuoyToName( buoy_tests[i].m_buoy_id );
std::cout << "buoy_name=" << buoy_name << "\n";
if( buoy_name != buoy_tests[i].m_name ) {
std::cout << buoy_name << '\n';
std::cout << buoy_tests[i].m_name << '\n';
std::cout << "ERROR\n";
exit(1) ;
}
}
std::cout << "Tested " << buoy_tests_nb << " records\n";
}
catch(...) {
std::cout << "Error when testing buoy loading\n";
return ;
}
// ----------------------------------------------------------------------------
static const struct {
const char * m_ship_callsign ;
const char * m_name ;
} ship_tests[] = {
{ "3EPD8", "Trinity Arrow" },
{ "WYP8657", "James R. Barker" }
};
static const size_t ship_tests_nb = G_N_ELEMENTS(ship_tests);
static void test_ship(void)
try
{
for( size_t i = 0; i < ship_tests_nb; ++i )
{
const std::string & ship_name = SynopDB::ShipToName( ship_tests[i].m_ship_callsign );
std::cout << "ship_name=" << ship_name << "\n";
if( ship_name != ship_tests[i].m_name ) {
std::cout << ship_tests[i].m_ship_callsign << ".\n";
std::cout << ship_name << ".\n";
std::cout << ship_tests[i].m_name << ".\n";
std::cout << "ERROR\n";
exit(1) ;
}
}
std::cout << "Tested " << ship_tests_nb << " records\n";
}
catch(...) {
std::cout << "Error when testing ship loading\n";
return ;
}
// ----------------------------------------------------------------------------
static const struct {
const char * m_jcomm_callsign ;
const char * m_name ;
} jcomm_tests[] = {
{ "13002", "TAO21N23W" },
{ "13590", "ARGOS:71125" }
};
static const size_t jcomm_tests_nb = G_N_ELEMENTS(jcomm_tests);
static void test_jcomm(void)
try
{
for( size_t i = 0; i < jcomm_tests_nb; ++i )
{
const std::string & jcomm_name = SynopDB::JCommToName( jcomm_tests[i].m_jcomm_callsign );
std::cout << "jcomm_name=" << jcomm_name << "\n";
if( jcomm_name != jcomm_tests[i].m_name ) {
std::cout << jcomm_tests[i].m_jcomm_callsign << ".\n";
std::cout << jcomm_name << ".\n";
std::cout << jcomm_tests[i].m_name << ".\n";
std::cout << "ERROR\n";
exit(1) ;
}
}
std::cout << "Tested " << jcomm_tests_nb << " records\n";
}
catch(...) {
std::cout << "Error when testing jcomm loading\n";
return ;
}
// ----------------------------------------------------------------------------
// Used in a special mode where the synop decoder just prints output the name of the tokens.
struct synop_test {
int m_expected_nb_msgs ;
const char * m_input ;
const char * m_output ;
};
static const synop_test tests_arr_full[] = {
{ 1,
"08495 12575 72512 10171 20128 30242 40250 57005 60002 83502 91750\n"
" 333 10182 81622 83633 87072=\n",
"Day of the month: 11 Observation time: 18 hr\n"
"Weather station: 08495 LXGB GIBRALTAR (CIV/MIL) GI\n"
"Latitude: 3609N Longitude: 00521W Elevation: 5 m\n"
"Cloud base: 600 - 999 m (2000 - 3333 ft).\n"
"Horizontal visibility: 25 km.\n"
"Total cloud cover: 7/8ths or more, but not 8/8ths.\n"
"Wind direction: 250°.\n"
"Wind speed: 12 knots, from anemometer.\n"
"Air temperature: 17.1 °C.\n"
"Dewpoint temperature: 12.8 °C.\n"
"Sea level pressure: 1025.0 hPa.\n"
"Pressure change over last 3 hours: -0.5 hPa, decreasing steadily.\n"
"Present weather: not significant.\n"
"Past weather: not significant.\n"
"Low cloud type: stratocumulus other than stratocumulus cumulogenitus.\n"
"Middle cloud type: no altocumulus, altostratus or nimbostratus.\n"
"High cloud type: cirrus spissatus, or cirrus castellanus or cirrus floccus.\n"
"Maximum temperature: 18.2 °C.\n"
}, { 1,
"16597 32562 33113 10139 20097 30053 40140 53022 81130 333 10170 81826\n"
" 83357 91132 91531 =\n",
"Day of the month: 11 Observation time: 18 hr\n"
"Weather station: 16597 LMML LUQA/MALTA ML\n"
"Latitude: 3551N Longitude: 01429E Elevation: 91 m\n"
"Cloud base: 600 - 999 m (2000 - 3333 ft).\n"
"Horizontal visibility: 12 km.\n"
"Total cloud cover: 3/8ths.\n"
"Wind direction: 310°.\n"
"Wind speed: 13 knots, from anemometer.\n"
"Air temperature: 13.9 °C.\n"
"Dewpoint temperature: 9.7 °C.\n"
"Sea level pressure: 1014.0 hPa.\n"
"Pressure change over last 3 hours: 2.2 hPa, decreasing or steady, then increasing.\n"
"Precipitation amount: 0.0 mm.\n"
"Present weather: not significant.\n"
"Past weather: not significant.\n"
"Low cloud type: cumulus humulis or fractus (no vertical development).\n"
"Middle cloud type: altocumulus translucidous at one level.\n"
"High cloud type: no cirrus, cirrocumulus or cirrostratus.\n"
"Maximum temperature: 17.0 °C.\n"
}
};
static const size_t nb_tests_full = G_N_ELEMENTS(tests_arr_full);
/*
* TODO: Put apart the tests with errors. Ideally we should generate them starting from good patterns.
*/
static const synop_test tests_arr[] = {
{ 0,
"a b c d\n\ne f\n",
"a b c d\n\ne f\n"
}, { 0,
"a b 20123 99536 e f\n20123 99536\ng h\n",
"a b YYGGi+99LLL+ e f\nYYGGi+99LLL+\ng h\n"
}, { 0,
"20123\txyz 20123 30101\nx",
"20123\txyz IIiii+YYGGi+\nx"
}, { 1,
"a b 20123 99536 70307 d e f\n",
"a b YYGGi+99LLL+QLLLL+ d e f\n"
}, { 0,
"0393) 32375 71902 10140 20081 30101 40125 57007 878//\n",
"0393) iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+\n"
}, { 1,
"AMOUK36 20184 99556 70051 46/// ///// 10114 20068 40134 54001;\n",
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+\n"
}, { 0,
"81/1/ 222// 00156 2//// 3//// 4//// 5//// 6//// 80220 ICE /////;\n",
"81/1/ 222Dv+0sTTT+2PPHH+3dddd+4PPHH+5PPHH+6IEER+8aTTT+ICE+cSbDz+\n"
}, { 1,
"03075 15981 /1212 10086 20041 30090 40134 56007 60002 91750\n"
"333 10099 82/68;\n\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+9GGgg+\n"
"333+1sTTT_max+8NChh+\n\n"
}, { 0,
"333 69937 81/14 87/60;\n",
"333+6RRRt+8NChh+8NChh+\n"
}, { 0,
"22273 ICE 52//2;\n",
"222Dv+ICE+cSbDz+\n"
}, { 1,
"03204 12580 12505 10117 20064 30103 40123 57006 60002 81100 91750\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+9GGgg+\n"
}, { 0,
"333 21153 42021 70000 91105;\n",
"333+2sTTT_min+4Esss+7RRRR+9SSss+\n"
}, { 0,
"333 21061 43094 70000 91102;\n",
"333+2sTTT_min+4Esss+7RRRR+9SSss+\n"
}, { 0,
"10015 21014 30134 40152 52009 333 21006 91114;\n",
"1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+2sTTT_min+9SSss+\n"
}, { 1,
"01102 46/// /1410 10058 20006 30069 40089 52006 333 20051 91116;\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+2sTTT_min+9SSss+\n"
}, { 0,
"333 20085 91710;\n",
"333+2sTTT_min+9SSss+\n"
}, { 1,
"SNCN19 CWAO 280023\n"
"OOXX\n"
"MRP43 27221 99181 70159 ///// 00101\n"
"26/// /2504 10242 29081 30139 92200 333 60000=\n",
"TTAAii+CCCC+YYGGgg+\n"
"OOXX+IIIII+YYGGi+99LLL+QLLLL+MMMULaULo+h0h0h0h0im+\n"
"iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+9GGgg+ 333+6RRRt+\n"
}, { 0, // Cannot find WMO station:72358
"ZCZC\n"
"SM 190600\n"
"AAXX 19064\n"
"72358 14/// /1019 10244 29095 60071 7////\n"
"333 10297 20236 3/025 55300 2//// 70082 91129 91219\n"
"555 00245 1011/ 20255 91129 91219\n"
"666 10245 20242 7////=\n"
"NNNN\n",
"ZCZC+\n"
"SM 190600\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+6RRRt+7wwWW+\n"
"333+1sTTT_max+2sTTT_min+3Ejjj+553SS+2FFFF+7RRRR+9SSss+9SSss+\n"
"555+0sTTT_land+1RRRr+2sTTT_avg+911ff+912ff+\n"
"666+1snTxTxTx+2snTxTxTx+7VVVV+\n"
"NNNN+\n"
}, { 1,
"04202 NIL;\n"
"04203 46/// /1510 11048 21067 30142 40160 52006;\n",
"IIiii+NIL+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
}, { 1,
"01482 46/// /0510 10059 20014 30021 40030 57005 333 20059 91115;\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+2sTTT_min+9SSss+\n"
}, { 1,
"03091 15981 /1208 10090 20044 30053 40133 57007 60002 91750\n"
"333 10107 55310 21294 8//99;\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+9GGgg+\n"
"333+1sTTT_max+553SS+2FFFF+8NChh+\n"
}, { 1,
"AAXX 15064\n\n"
"06011 05584 50805 10064 20008 30136 40205 57012 6///2\n",
"AAXX+YYGGi+\n\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+\n"
}, { 1,
"AAXX 27064\n\n"
"04018 42584 62909 10061 20035 40224 52020 86500 555 3//11 8662.04048 4211 QWOQU QPPYU WPPYE\n",
"AAXX+YYGGi+\n\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+8NCCC+ 555+3Ejjj+ 8662.04048 4211 QWOQU QPPYU WPPYE\n"
}, { 1,
"AAXX 26184\n\n"
"04018 21245 82021 10080 20076 40173 58016 72052 886// 333 10107 20079 69918 555 3//22 88703;\n",
"AAXX+YYGGi+\n\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+8NCCC+ 333+1sTTT_max+2sTTT_min+6RRRt+ 555+3Ejjj+8NChh+\n"
}, { 1,
"06060 01675 60809 10191 20126 30053 40115895000 69902 72162 82172\n\n"
" 333 10228 20130 69907 82840 85358;\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+ 40115895000 6RRRt+7wwWW+8NCCC+\n\n"
" 333+1sTTT_max+2sTTT_min+6RRRt+8NChh+ 85358;\n"
}, { 1,
"06070 05970 50506 10163 20104 30096 40126 57003 6///2\n\n"
" 333 10201 20122 6///7 85/67;\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+\n\n"
" 333+1sTTT_max+2sTTT_min+6RRRt+8NChh+\n"
}, { 2,
"BSH03 20001 99540 10081 46/// ///// 22200 00067 20501 70003;\n\n"
"BSH05 20001 99549 10082 46/// ///// 22200 20601 70003;\n",
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+ 222Dv+0sTTT+2PPHH+70HHH+\n\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+ 222Dv+2PPHH+70HHH+\n"
}, { 1,
"13600 20123 99328 70293 46/// ///// 40331 52003\n"
"222// 00200;\n",
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+4PPPP+5appp+\n"
"222Dv+0sTTT+\n"
}, { 1,
"SMMJ01 LWOH 190000\n"
"AAXX 1900\n"
"13579 32998 03606 11106 21153 39397 40298 52004=\n",
"TTAAii+CCCC+YYGGgg+\n"
"AAXX 1900\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
}, { 1,
"SMML01 LMMM 190000\n"
"AAXX 19004\n"
"16597 32670 10403 10069 21015 30177 40268 52009 81500 333 81640 =\n",
"TTAAii+CCCC+YYGGgg+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+ 333+8NChh+ =\n"
}, { 5,
"SMOS01 LOWM 190000\n"
"AAXX 19001\n"
"11036 32565 73208 10000 21038 30065 40306 57008 8353/ 333 83629\n"
"86360 91013 91113 91209=\n"
"11010 35561 /2504 11031 21043 39946 40345 57009=\n"
"11120 36/17 /9901 11111 21112 39620 40386 57005=\n"
"11150 36429 /1802 11050 21055 39790 40363 57005=\n"
"11240 36966 /1703 11031 21060 39870 40310 57004=\n",
"TTAAii+CCCC+YYGGgg+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+ 333+8NChh+8NChh+9SSss+9SSss+9SSss+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
}, { 1,
"SNVD01 KWBC 190700\n"
"BBXX\n"
"S6IG 19071 99278 70923 41/9/ /2603 10193 20100 40160 50001 7////\n"
"22234 04239=\n",
"TTAAii+CCCC+YYGGgg+\n"
"BBXX+IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+\n"
"222Dv+0sTTT+\n"
}, { 1,
"AAXX 23004 47411 15/84 /3603 10144 20114 30043 40074 50000 60012 333 20126=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+ 333+2sTTT_min+\n"
}, { 1,
"AAXX 22184 47409 11/50 80501 10090 20086 30023 40076 57002 69951 78085 887//=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+\n"
}, { 1,
"SMDL40 EDZW 201800\n"
"AAXX 20181\n"
"10004 46/60 /0408 10124 20107 30077 40077 57015\n"
"222// 00103\n"
"333 10141 20106 55304;\n",
"TTAAii+CCCC+YYGGgg+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
"222Dv+0sTTT+\n"
"333+1sTTT_max+2sTTT_min+553SS+\n"
}, { 1,
"10147 12882 50605 10213 20111 30048 40065 58008 69902 81031\n"
"333 10265 20152 30017 55304 20454 30310 41284 81358 84076;\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+\n"
"333+1sTTT_max+2sTTT_min+3Ejjj+553SS+2FFFF+3FFFF+4FFFF+8NChh+8NChh+\n"
}, { 1,
"10200 07961 20503 10204 20155 30065 40063 55009 69932 70060\n"
"333 10215 20130 3/012 553// 2//// 3//// 69907 82/60;\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+\n"
"333+1sTTT_max+2sTTT_min+3Ejjj+553SS+2FFFF+3FFFF+6RRRt+8NChh+\n"
}, { 1,
"03302 15973 /0106 10133 20069 30105 40117 57002 60002 91750\n"
"333 10143 55310 21364 8//99;\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+9GGgg+\n"
"333+1sTTT_max+553SS+2FFFF+8NChh+\n"
// "333+1sTTT_max+55jjj+jjjjj+8NChh+\n"
}, { 0,
"333 10188 91107;\n",
"333+1sTTT_max+9SSss+\n"
}, { 1,
"AAXX 23061 15108 02298 62702 10135 20135 38165 48563 53002 60022 86500 333 10151 20131 30/// 60007 70022 95080 444 86154=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+2sTTT_min+3Ejjj+6RRRt+7RRRR+9SSss+ 444+NCHHC+\n"
}, { 1,
"AAXX 23051 15346 22997 03601 10237 20171 39879 40154 52011 333 60005 91002 91102 95090=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+6RRRt+9SSss+9SSss+9SSss+\n"
}, { 1,
"AAXX 23034 47090 32665 61407 10231 20206 30062 40083 57008 82501=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+\n"
}, { 1,
"AAXX 23004 47155 32962 60903 10241 20175 30051 40093 57004 80001 333 20194 30034=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+ 333+2sTTT_min+3Ejjj+\n"
}, { 1,
"AAXX 22124 47090 12668 60000 10200 20189 30080 40101 51003 69912 86500 333 10227 31020 92020=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+3Ejjj+9SSss+\n"
}, { 1,
"AAXX 22124 47104 11650 62902 10193 20174 30008 40099 53003 69952 71022 85500 333 10247 30020=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+ 333+1sTTT_max+3Ejjj+\n"
}, { 1,
"AAXX 23004 47127 329// /0001 10248 20175 39959 40090 57009 333 20189 3/028=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+2sTTT_min+3Ejjj+\n"
}, { 1,
"AAXX 22181 26029 27/70 /0704 10155 20073 30150 40178 57008 70000 333 10167 20133 60007 91109 555 20133 50142= \n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+ 333+1sTTT_max+2sTTT_min+6RRRt+9SSss+ 555+2sTTT_avg+5jjjj+ \n"
}, { 1,
"AAXX 22151 26045 27/81 00505 10187 20068 30193 40195 56008 70000 80/// 333 10190 20104 60007 80/// 555 1/036 20104 3/010 50134=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+8NCCC+ 333+1sTTT_max+2sTTT_min+6RRRt+8NChh+ 555+1VVff+2sTTT_avg+3Ejjj+5jjjj+\n"
}, { 1,
"AAXX 22181 26058 27/84 00505 10176 20076 30175 40182 58007 70000 80/// 333 10199 20158 60007 80/// 91109 555 1/018 20158 3/018 50162 52018=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+8NCCC+ 333+1sTTT_max+2sTTT_min+6RRRt+8NChh+9SSss+ 555+1VVff+2sTTT_avg+3Ejjj+5jjjj+5jjjj+\n"
}, { 1,
"AAXX 22124 47407 11/60 82904 10150 20130 39900 40065 53006 69902 72582 886// 333 10188=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+ 333+1sTTT_max+\n"
}, { 1,
"AAXX 23034 08055 NIL=\n",
"AAXX+YYGGi+ IIiii+NIL+\n"
}, { 1,
"AAXX 23074 08045 46/// /2102 10139 20110 39933 40241 53003 555 60005=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 555+6GGmm+\n"
}, { 1,
"AAXX 22184 08042 02680 23609 10161 20084 39815 40246 53003 60002 81508 333 10183 60007=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+6RRRt+\n"
}, { 1,
"AAXX 22184 08140 12970 33006 10260 21017 39231 48564 55001 60002 80001 333 10269=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+\n"
}, { 1,
"AAXX 22124 08085 02580 23210 10221 20100 39696 40213 57005 60001 81101 333 60007=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+6RRRt+\n"
}, { 1,
"AAXX 22124 08130 12970 00406 10220 20070 39462 40213 58005 60001 333 50620=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+ 333+5jjjj+\n"
}, { 1,
"AAXX 23064 08141 12960 23504 10106 20077 39383 40240 52007 60002 80008 333 20103 30009 55141 70000=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+2sTTT_min+3Ejjj+55jjj+jjjjj+\n"
}, { 1,
"AAXX 23064 08160 12970 52812 10163 20102 39928 40232 53004 60002 80008 333 20157 55138 70000=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+2sTTT_min+55jjj+jjjjj+\n"
}, { 1,
"AAXX 23064 08184 02980 20000 10204 20125 30068 40219 5//// 60002 80001 333 20152 3/015 55087 60007 70000=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+2sTTT_min+3Ejjj+55jjj+jjjjj+7RRRR+\n"
}, { 1,
"AAXX 22124 08202 02970 11104 10243 20044 39301 42842 58006 60001 80001 333 50880 60007=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+5jjjj+6RRRt+\n"
}, { 1,
"AAXX 22154 07330 22680 32612 10198 20110 30165 40237 52003 83100 333 60007 83840 90710 91121 93100 555 60005=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+ 333+6RRRt+8NChh+9SSss+9SSss+9SSss+ 555+6GGmm+\n"
}, { 1,
"AAXX 23064 70174 32766 60000 10206 20044 39892 40131 56007 90553 333 10217 20067 555 92306=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+9GGgg+ 333+1sTTT_max+2sTTT_min+ 555+9SSss+\n"
}, { 0, // Cannot find WMO station:91320
"AAXX 22124 91320 32474 80808 10283 20261 30122 40127 83101 333 562/9 58007 83815 85073 555 92212=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+8NCCC+ 333+5jjjj+5jjjj+8NChh+8NChh+ 555+9SSss+\n"
}, { 1,
"AAXX 22214 47409 41/50 80102 10094 20091 30030 40083 51007 72588 887//=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+8NCCC+\n"
}, { 1,
"AAXX 22184 08015 12560 80204 10146 20100 39854 40255 54000 60002 8277/ 333 10178=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+\n"
}, { 1,
"AAXX 22181 26124 01/84 10504 10188 20047 30140 40169 57002 60002 70200 80008 333 10227 20178 60007 80/// 91110 555 1/023 20178 3/022 50160 52020=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+ 333+1sTTT_max+2sTTT_min+6RRRt+8NChh+9SSss+ 555+1VVff+2sTTT_avg+3Ejjj+5jjjj+5jjjj+\n"
}, { 1,
"AAXX 22091 26231 21/81 00605 10206 20078 30173 40187 57007 70200 333 10211 20060 60007 80/// 91008 91108 555 1/049 20060 3/005 50160= \n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+ 333+1sTTT_max+2sTTT_min+6RRRt+8NChh+9SSss+9SSss+ 555+1VVff+2sTTT_avg+3Ejjj+5jjjj+ \n"
}, { 1,
"AAXX 22154 64500 42460 42006 10275 20211 30108 40120 84500 333 58008 83611 84630=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+8NCCC+ 333+5jjjj+8NChh+8NChh+\n"
}, { 1,
"AAXX 22184 64550 32458 8//// 10248 20231 30//0 40//0 885// 333 10274 5//// 84610 88623=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+8NCCC+ 333+1sTTT_max+5jjjj+8NChh+8NChh+\n"
}, { 1,
"AAXX 22094 64550 42460 8//// 10250 20234 30//0 40//0 888// 333 5//// 84813 88626 94939 95839=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+8NCCC+ 333+5jjjj+8NChh+8NChh+9SSss+9SSss+\n"
}, { 1,
"AAXX 22134 61901 41580 71116 10189 20127 39699 40205 72582 878// 91250 333 58003 81822 87635 91026 90710 91133=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+7wwWW+8NCCC+9GGgg+ 333+5jjjj+8NChh+8NChh+9SSss+9SSss+9SSss+\n"
}, { 1,
"AAXX 27064 65222 11458 70000 10237 20234 3//// 4//// 60092 76066 86538 333 20233 5//// 86610=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+6RRRt+7wwWW+8NCCC+ 333+2sTTT_min+5jjjj+8NChh+\n"
}, { 0, // Cannot find WMO station:65213
"AAXX 27094 65213 42460 72004 10265 20236 3//// 4//// 875// 333 5//// 87612=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+8NCCC+ 333+5jjjj+8NChh+\n"
}, { 1,
"AAXX 27094 91582 24570 /0810 10227 20178 30135 40170 50009 700// 333 69907 90710 91120 555 60005=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+ 333+6RRRt+9SSss+9SSss+ 555+6GGmm+\n"
}, { 1,
"AAXX 27094 62318 32560 43110 10300 20231 40104 54000 84800=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+8NCCC+\n"
}, { 1,
"AAXX 22154 08015 41558 80306 10148 20094 39854 40255 52003 70522 8271/=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+8NCCC+\n"
}, { 1,
"AAXX 23064 08015 11550 52802 10122 20113 39848 40252 54000 60002 71022 82806 333 20118 30010 50144 55016 70000=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+ 333+2sTTT_min+3Ejjj+5jjjj+55jjj+jjjjj+\n"
}, { 1,
"AAXX 22154 08001 42475 13207 10183 20109 30168 40248 55000 81541=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+\n"
}, { 1,
"AAXX 22124 72654 15966 60000 10167 20150 39718 40175 53006 69931 91155 333 10278 20139 70003 555 92212=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+9GGgg+ 333+1sTTT_max+2sTTT_min+7RRRR+ 555+9SSss+\n"
}, { 1,
"AAXX 22181 15015 02598 53502 10239 20169 39573 42804 52009 60002 84301 333 10269 20226 30042 60007 91003 91105=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+2sTTT_min+3Ejjj+6RRRt+9SSss+9SSss+\n"
}, { 1,
"AAXX 22184 08213 12770 23108 10273 21007 39056 48560 53001 60002 81041 333 10293=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+\n"
}, { 1,
"AAXX 22184 08215 12870 12210 10201 21023 38179 48556 53002 60002 80005 333 10230 95000=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+9SSss+\n"
}, { 1,
"AAXX 23064 08231 12967 12401 10161 20130 39150 48569 53005 60002 80001 333 20161 30016 50904 55109 70000=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+2sTTT_min+3Ejjj+5jjjj+55jjj+jjjjj+\n"
}, { 1,
"AAXX 23064 08284 02470 12802 10216 20159 30154 40227 53013 60002 81600 333 20195 30019 50484 55082 60007 70000=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+2sTTT_min+3Ejjj+5jjjj+55jjj+jjjjj+7RRRR+\n"
}, { 1,
"AAXX 23061 10004 46/29 /2313 10143 20114 30153 40153 53011 222// 00140 333 10153 20137 55069 55308 91117 91214=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 222Dv+0sTTT+ 333+1sTTT_max+2sTTT_min+55jjj+jjjjj+9SSss+9SSss+\n"
}, { 1,
"AAXX 23021 10004 46/60 /2213 10147 20124 30139 40139 53002 222// 00140 333 55300 91116 91213=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 222Dv+0sTTT+ 333+553SS+9SSss+9SSss+\n"
}, { 1,
"AAXX 22091 10004 46/58 /2011 10145 20113 30110 40110 51013 222// 00137 333 20133 55306 91117 91213=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 222Dv+0sTTT+ 333+2sTTT_min+553SS+9SSss+9SSss+\n"
}, { 1,
"AAXX 23061 10007 46/59 /2110 10138 20116 30158 40158 51008 222// 00130 333 10151 20133 55068 55300 91114 91211=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 222Dv+0sTTT+ 333+1sTTT_max+2sTTT_min+55jjj+jjjjj+9SSss+9SSss+\n"
}, { 1,
"AAXX 22181 10007 46/57 /1903 10142 20113 30145 40145 51002 222// 00136 333 10147 20125 55301 91116 91212=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 222Dv+0sTTT+ 333+1sTTT_max+2sTTT_min+553SS+9SSss+9SSss+\n"
}, { 1,
"AAXX 23081 10015 42560 72111 10145 20120 30162 40172 53010 81275 333 55307 21589 30922 81828 84366 85071 91113 91211=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+ 333+553SS+2FFFF+3FFFF+8NChh+8NChh+8NChh+9SSss+9SSss+\n"
}, { 1,
"AAXX 22151 10015 21580 52303 10156 20110 30138 40148 51008 72598 82972 333 55304 21373 30784 60017 82930 83075 91114 91211 96481=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+8NCCC+ 333+553SS+2FFFF+3FFFF+6RRRt+8NChh+8NChh+9SSss+9SSss+9SSss+\n"
}, { 1,
"AAXX 23081 10022 47466 82109 10149 20125 30161 40170 53009 72365 333 55301 20826 30718 85/16 87/21 88/30 91113=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+7wwWW+ 333+553SS+2FFFF+3FFFF+8NChh+8NChh+8NChh+9SSss+\n"
}, { 1,
"AAXX 22171 10022 45977 02105 10169 20109 30142 40151 50002 333 55307 21236 30490=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+553SS+2FFFF+3FFFF+\n"
}, { 1,
"AAXX 22081 10022 45571 52207 10161 20123 30116 40125 53018 333 55303 21177 30689 83/23 84/29 85/35=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+553SS+2FFFF+3FFFF+8NChh+8NChh+8NChh+\n"
}, { 1,
"AAXX 23064 07005 02475 22307 10128 20105 30143 40233 53013 60002 82201 333 10163 20107 31010 55053 60007 70012 82816 90710 91113 555 60005=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+ 333+1sTTT_max+2sTTT_min+3Ejjj+55jjj+jjjjj+7RRRR+8NChh+9SSss+9SSss+ 555+6GGmm+\n"
}, { 1,
"AAXX 27094 96315 41459 72207 10273 20236 40089 72582 83968 333 82816 81917 85277=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+7wwWW+8NCCC+ 333+8NChh+8NChh+8NChh+\n"
}, { 1,
"SNVD17 CWTO 261300 \n"
"BBXX \n"
"45142 26131 99427 70793 46/// /0006 10171 39936 40142 52008 \n"
"22200 00202 10301 70003 333 91207 =\n",
"TTAAii+CCCC+YYGGgg+ \n"
"BBXX+IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+3PPPP+4PPPP+5appp+ \n"
"222Dv+0sTTT+1PPHH+70HHH+ 333+9SSss+ =\n"
}, { 2,
"SNVD22 KWNB 261300 RRR\n"
"BBXX\n"
"46232 26131 99325 71174 46/// ///// 1//// 91330 22200 00190 10703\n"
"20703 320// 41201 70015=\n"
"46247 26131 99378 71228 46/// ///// 1//// 91321 22200 00139 10802\n"
"20802 322// 41301 70012=\n",
"TTAAii+CCCC+YYGGgg+RRx+\n"
"BBXX+IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+9GGgg+ 222Dv+0sTTT+1PPHH+2PPHH+3dddd+4PPHH+70HHH+\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+9GGgg+ 222Dv+0sTTT+1PPHH+2PPHH+3dddd+4PPHH+70HHH+\n"
}, { 1,
"641 \n"
"SMVE01 KWBC 141800 RRA\n"
"BBXX\n"
"A8OK5 14183 99132 51250 41598 50816 10280 20229 40152 51014 70222\n"
"83145 22214 04273 20302 316// 40504 5//// 80245=\n",
"641 \n"
"TTAAii+CCCC+YYGGgg+RRx+\n"
"BBXX+IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+8NCCC+ 222Dv+0sTTT+2PPHH+3dddd+4PPHH+5PPHH+8aTTT+\n"
}, { 1,
"765 \n"
"SMCA02 KWBC 141800\n"
"AAXX 14184\n"
"78255 42559 51603 10269 20148 39972 40136 52200 84502 333 10270\n"
"20195 84620=\n"
"78317 NIL=\n"
"78318 NIL=\n",
"765 \n"
"TTAAii+CCCC+YYGGgg+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+ 333+1sTTT_max+2sTTT_min+8NChh+\n"
"IIiii+NIL+\n"
"IIiii+NIL+\n"
}, { 2,
"965 \n"
"SMVD20 KWNB 141800\n"
"BBXX\n"
"44097 14181 99410 70711 46/// ///// 1//// 91731 22200 00040 11308\n"
"21005 317// 41306 70042=\n"
"572 \n"
"SMJD50 OJAM 141800\n"
"AAXX 14184\n"
"40255 32960 00000 10252 20115 39382 40065 54002 333 10310=\n",
"965 \n"
"TTAAii+CCCC+YYGGgg+\n"
"BBXX\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+9GGgg+ 222Dv+0sTTT+1PPHH+2PPHH+3dddd+4PPHH+70HHH+\n"
"572 \n"
"TTAAii+CCCC+YYGGgg+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+1sTTT_max+\n"
}, { 6,
"SNVD01 KWBC 261300 RRK\n"
"BBXX\n"
"46036 26131 99484 71339 46/// /2103 10107 40103 57005 22200 00095\n"
"11403 70013 333 91203=\n"
"41024 26131 99338 70785 46/// /0510 10225 40094 53030 91300=\n"
"44022 26131 99409 70737 46/// /3107 10178 20113 40067 91330 22200\n"
"00199 333 91209 555 11072 22072=\n"
"44140 26131 99429 70515 46/// ///// 1//// 4//// 5//// 22200 0////\n"
"1//// 70/// 333 912//=\n"
"PCHM 26134 99525 71298 41298 81617 10110 20100 40132 53001 7//22\n"
"8/7// 22234 00120 20402 80105=\n"
"PDAN 26134 99552 71314 41298 51909 10090 20045 40120 58020 7//11\n"
"8/7// 22273 00080 2//// 30000 80070=\n",
"TTAAii+CCCC+YYGGgg+RRx+\n"
"BBXX\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+4PPPP+5appp+ 222Dv+0sTTT+1PPHH+70HHH+ 333+9SSss+\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+4PPPP+5appp+9GGgg+\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+9GGgg+ 222Dv+0sTTT+ 333+9SSss+ 555+110ff+220ff+\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+4PPPP+5appp+ 222Dv+0sTTT+1PPHH+70HHH+ 333+9SSss+\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+8NCCC+ 222Dv+0sTTT+2PPHH+8aTTT+\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+8NCCC+ 222Dv+0sTTT+2PPHH+3dddd+8aTTT+\n"
}, { 1,
"AAXX 28091 11464 42470 53204 10168 20133 39196 42792 50005 83272\n"
"333 83813 555 380//=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+\n"
"333+8NChh+ 555+3Ejjj+\n"
}, { 1,
"AAXX 28091 06490 45981 01408 10225 20146 39561 40097 58015\n"
"333 91112 91209=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
"333+9SSss+9SSss+\n"
}, { 1,
"AAXX 28091 06479 42970 41202 10257 20173 30028 40102 58016 83031\n"
"333 83364 83072 91105 91203=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+\n"
"333+8NChh+8NChh+9SSss+9SSss+\n"
}, { 1,
"AAXX 28064 71048 16/// /2511 10119 20091 60001\n"
"333 10209 20088 70347\n"
"555 32948 40133=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+6RRRt+\n"
"333+1sTTT_max+2sTTT_min+7RRRR+\n"
"555+3Ejjj+4Esss+\n"
}, { 1,
"AAXX 28094 71050 36/// /3003 10062 20031 39083 40136 58005\n"
"333 60001=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
"333+6RRRt+\n"
}, { 1,
"AAXX 28064 71079 11574 61403 10153 20131 39624 49887 58011 69981 78082 86100\n"
"333 10278 20150 70104 90932\n"
"555 10000 20000 31628 40231=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+\n"
"333+1sTTT_max+2sTTT_min+7RRRR+9SSss+\n"
"555+1VVff+2sTTT_avg+3Ejjj+4Esss+\n"
}, { 0, // Cannot find WMO station:27020
"AAXX 28061 27020 32698 72202 10158 20127 39885 40026 52009 69950 87500\n"
"333 20099 876//=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+8NCCC+\n"
"333+2sTTT_min+8NChh+\n"
}, { 1,
"AAXX 28064 71133 17/// /2613 10151 20104 39343 40026 51025 69921 7//4/\n"
"333 10170 20115 70012\n"
"555 32833 40212=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+\n"
"333+1sTTT_max+2sTTT_min+7RRRR+\n"
"555+3Ejjj+4Esss+\n"
}, { 0, // Cannot find WMO station:71547
"AAXX 28064 71547 16/// /2513 10129 20046 60001\n"
"333 10184 20098 70000\n"
"555 32428 40022=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+6RRRt+\n"
"333+1sTTT_max+2sTTT_min+7RRRR+\n"
"555+3Ejjj+4Esss+\n"
}, { 3,
"599 \n"
"SNCN19 CWAO 141806\n"
"OOXX\n"
"ARP01 14161 99345 50585 ///// 00681\n"
"26/// /0000 10114 29029 30044 91610 333 60000=\n"
"ARP01 14161 99345 50585 ///// 00681\n"
"26/// /0000 10114 29028 30044 91620 333 60000=\n"
"ARP01 14161 99345 50585 ///// 00681\n"
"26/// /0000 10115 29028 30043 91630 333 60000=\n",
"599 \n"
"TTAAii+CCCC+YYGGgg+\n"
"OOXX+IIIII+YYGGi+99LLL+QLLLL+MMMULaULo+h0h0h0h0im+\n"
"iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+9GGgg+ 333+6RRRt+\n"
"IIIII+YYGGi+99LLL+QLLLL+MMMULaULo+h0h0h0h0im+\n"
"iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+9GGgg+ 333+6RRRt+\n"
"IIIII+YYGGi+99LLL+QLLLL+MMMULaULo+h0h0h0h0im+\n"
"iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+9GGgg+ 333+6RRRt+\n"
}, { 1,
"SMVA13 LFPW 280000\n"
"BBXX\n"
"BAREU65 28004 99202 70180 46/// ///// 40137 52005\n"
"22283=\n",
"TTAAii+CCCC+YYGGgg+\n"
"BBXX+IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+4PPPP+5appp+\n"
"222Dv+\n"
}, { 2,
"SNCN19 CWAO 280016\n"
"OOXX\n"
"ARP01 27221 99345 50585 ///// 00311\n"
"26/// /0000 10070 29040 30084 92220 333 60000=\n"
"ARP01 27221 99345 50585 ///// 00311\n"
"26/// /0000 10070 29041 30087 92230 333 60000=\n",
"TTAAii+CCCC+YYGGgg+\n"
"OOXX+IIIII+YYGGi+99LLL+QLLLL+MMMULaULo+h0h0h0h0im+\n"
"iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+9GGgg+ 333+6RRRt+\n"
"IIIII+YYGGi+99LLL+QLLLL+MMMULaULo+h0h0h0h0im+\n"
"iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+9GGgg+ 333+6RRRt+\n"
}, { 1,
"AAXX 28091 11146 42/86 33201 10071 20018 37029 47148 53009 81202\n"
"333 55310 818//=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+\n"
"333+553SS+8NChh+\n"
}, { 1,
"AAXX 28061 11406 01465 39901 10182 20150 39593 40153 52003 60002 703// 83101\n"
"333 20135 30009 50254 60005 70000 83813\n"
"555 382// 50176 60175 70179 80170 90150=\n",
"\n"
}, { 1,
"AAXX 23001 15090 02997 23001 10250 20177 30067 40154 52013 60001 81041 333 55300 10173 20000 3//// 55131 01487 22929 30369 60007 91005 91106=\n",
"\n"
}, { 1,
"391\n"
"SNVF01 KWBC 190700\n"
"BBXX\n"
"9VBL 19071 99514 10028 41/9/ /3009 10076 20023 40319 57012 7////\n"
"22263 04074=\n",
"391\n"
"TTAAii+CCCC+YYGGgg+\n"
"BBXX+IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+\n"
"222Dv+0sTTT+\n"
}, { 2,
"439\n"
"SNVD15 KWBC 190700\n"
"BBXX\n"
"41009 19071 99285 70802 46/// /2601 10205 40140 54000 90650 22200\n"
"00251 10802 70011 333 91201 555 11007 22007=\n"
"42002 19071 99259 70936 46/// /1602 10215 20136 40156 50000 90650\n"
"22200 00244 10801 70007 333 91203 555 11021 22021 30602 41304\n"
"60649 159018 136007 135016 139014 136023 132012=\n",
"439\n"
"TTAAii+CCCC+YYGGgg+\n"
"BBXX\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+4PPPP+5appp+9GGgg+ 222Dv+0sTTT+1PPHH+70HHH+ 333+9SSss+ 555+110ff+220ff+\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+9GGgg+\n"
"222Dv+0sTTT+1PPHH+70HHH+ 333+9SSss+ 555+110ff+220ff+3GGmm+4ddff+6GGmm+dddfff+dddfff+dddfff+dddfff+dddfff+dddfff+\n"
}, { 1,
"AAXX 22191 15420 22997 03401 10225 20204 30015 40121 52010 333 55300 0//// 20030 3//// 60005 91001 91101 99706=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+55jjj+jjjjj+2sTTT_min+3Ejjj+6RRRt+9SSss+9SSss+9SSss+\n"
}, { 1,
"AAXX 23001 15420 02997 03201 10189 20176 30028 40135 52007 60001 333 55300 0//// 20000 3//// 55129 0//// 22868 3//// 60007 91002 91102=\n",
"\n"
}, { 0, // Cannot find WMO station:11244
"AAXX 28091 11244 36/// /1402 10268 20170 39835 40140 57007\n"
"333 55310=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
"333+553SS+\n"
}, { 1,
"AAXX 23001 10015 01465 72110 10144 20119 30144 40154 54000 60021 72586 878// 333 31/// 55/// 21817 30776 55300 20000 30000 69927 83816 86631 91115 91213 96481=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+ 333+3Ejjj+55jjj+jjjjj+3FFFF+553SS+2FFFF+3FFFF+6RRRt+8NChh+8NChh+9SSss+9SSss+9SSss+\n"
}, { 1,
"AAXX 22181 10022 07780 82204 10158 20112 30148 40157 53008 60022 76160 333 10187 20133 3/012 55302 20414 30270 69907 85/50 87/58 88/62=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+ 333+1sTTT_max+2sTTT_min+3Ejjj+553SS+2FFFF+3FFFF+6RRRt+8NChh+8NChh+8NChh+\n"
}, { 5,
"SMSQ10 LZIB 190000\n"
"AAXX 19001\n"
"11816 32565 63603 10006 21030 30124 40294 57006 83830\n"
"333 55002 82820 86360=\n"
"11826 35/64 /3304 10002 21020 30086 40294 57006\n"
"333 55000=\n"
"11903 32970 71501 11019 21044 39874 40271 58006 87070\n"
"333 55047 87360=\n"
"11934 11658 82710 11023 21050 39412 42834 56004 69911 77077 8452/\n"
"333 55031 84646 88458=\n"
"11968 11335 80000 11063 21070 39978 40276 58003 69901 77172 8652/\n"
"333 55000 83708 85638 88461=\n",
"TTAAii+CCCC+YYGGgg+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+\n"
"333+55jjj+jjjjj+8NChh+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+\n"
"333+55jjj+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+8NCCC+\n"
"333+55jjj+jjjjj+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+\n"
"333+55jjj+jjjjj+8NChh+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+\n"
"333+55jjj+jjjjj+8NChh+8NChh+\n"
}, { 7,
"SMVF01 EGRR 261200 RRE\n"
"BBXX\n"
"62107 26124 99501 70061 46/// /2515 10139 20139 40207 52008 22200\n"
"00137 10702 70008=\n"
"AMOUK12 26124 99533 70062 46/// ///// 10183 20144 40164 57017=\n"
"AMOUK06 26124 99534 10017 46/// ///// 10143 20113 40214 54003=\n"
"AMOUK03 26124 99513 10032 46/// ///// 10198 20129 40227 52007=\n"
"AMOUK34 26124 99513 10032 46/// ///// 10203 20108 4//// 52005=\n"
"63106 26124 99610 10017 46/// /3309 10106 40167 51009 22200=\n"
"63105 26124 99610 10017 47/98 /3310 10132 20048 40167 51008 700// 22200=\n",
"TTAAii+CCCC+YYGGgg+RRx+\n"
"BBXX\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+ 222Dv+0sTTT+1PPHH+70HHH+\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+4PPPP+5appp+ 222Dv+\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+ 222Dv+\n"
}, { 1,
"AAXX 23044 61901 461// /1319 10151 20148 39710 40224 58010 90350 333 87/02 91028 90710 91128 555 7/097=\n",
"\n"
}, { 3,
"628 \n"
"SMVC01 KWBC 141800 RRA\n"
"BBXX\n"
"MZBN2 14183 99530 50772 41497 82328 10075 20040 40110 54000 70288\n"
"887// 22233 00090 20201 323// 40808 5//// 80060=\n"
"NWS0020 14184 99008 50903 43/// /1103 10270 20250 40103 5////\n"
"7//// 8//// 222// 04276 2//// 3//// 4//// 5//// 6//// 8//// ICE ////=\n"
"NWS0029 14184 99039 50376 43/// /0711 10254 20227 40116 5////\n"
"7//// 8//// 222// 04295 2//// 3//// 4//// 5//// 6//// 8//// ICE\n"
"////=\n",
"628 \n"
"TTAAii+CCCC+YYGGgg+RRx+\n"
"BBXX+IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+8NCCC+ 222Dv+0sTTT+2PPHH+3dddd+4PPHH+5PPHH+8aTTT+\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+8NCCC+ 222Dv+0sTTT+2PPHH+3dddd+4PPHH+5PPHH+6IEER+8aTTT+ICE+cSbDz+\n"
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+8NCCC+ 222Dv+0sTTT+2PPHH+3dddd+4PPHH+5PPHH+6IEER+8aTTT+ICE+cSbDz+\n"
}, { 1,
"04018 42588 60507 10006 21025 40109 51002 81258 555 3//07 81830 83357 85363\n",
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+8NCCC+ 555+3Ejjj+8NChh+8NChh+8NChh+\n"
}, { 1,
"ZCZC 412\n"
"SIGL26 EKMI 252100\n"
"AAXX 25214\n"
"04418 46/// /1914 11150 21169 57011\n"
" 333 553// 21328 ;\n"
"04425 NIL ;\n"
// "02 NIL ;\n"
"04436 46/// /0107 11158 21202 ;\n"
"04464 46/// /1610 11137 21171\n"
" 333 553// 21530 ;\n"
"04485 46/// /2503 11152 21175 37398 52006\n"
" 333 553// 21624 ;\n"
"04488 46/// /2810 11067 21094 37452 52013\n"
" 333 553// 21310 ;\n"
"NNNN\n",
"ZCZC+ZCZC_id+\n"
"TTAAii+CCCC+YYGGgg+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+5appp+\n"
" 333+553SS+2FFFF+ ;\n"
"IIiii+NIL+ ;\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+ ;\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+\n"
" 333+553SS+2FFFF+ ;\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+5appp+\n"
" 333+553SS+2FFFF+ ;\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+5appp+\n"
" 333+553SS+2FFFF+ ;\n"
"NNNN+\n"
}, { 1,
"ZCZC 440\n"
"SIGL26 EKMI 260300\n"
"AAXX 26034\n"
"04418 46/// /2615 11258 21285 57007\n"
" 333 553// 20104 ;\n"
"04425 NIL ;\n"
"04432 NIL ;\n"
"04436 NIL ;\n"
"04464 46/// /1711 11236 21257 57128\n"
" 333 553// 20011 ;\n"
"04485 NIL ;\n"
"NNNN\n",
"ZCZC+ZCZC_id+\n"
"TTAAii+CCCC+YYGGgg+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+5appp+\n"
" 333+553SS+2FFFF+ ;\n"
"IIiii+NIL+ ;\n"
"IIiii+NIL+ ;\n"
"IIiii+NIL+ ;\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+5appp+\n"
" 333+553SS+2FFFF+ ;\n"
"IIiii+NIL+ ;\n"
"NNNN+\n"
}, { 1,
"ZCZC 506\n"
"SMEN43 EDZW 261200 CCB\n"
"AAXX 26121\n"
"01001 11275 32514 10065 21022 30096 40108 57005 69911 70161 81641\n"
" 222// 00004 333 91123;\n"
"NNNN\n",
"ZCZC+ZCZC_id+\n"
"TTAAii+CCCC+YYGGgg+CCx+\n"
"AAXX+YYGGi+\n"
"IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+6RRRt+7wwWW+8NCCC+\n"
" 222Dv+0sTTT+ 333+9SSss+\n"
"NNNN+\n"
}, { 1,// Must check that one message only is created.
"ZCZC 616\n"
"SMVX41 EDZW 151800 RRC\n"
"BBXX\n"
"62119 05184\n",
"ZCZC+ZCZC_id+\n"
"TTAAii+CCCC+YYGGgg+RRx+\n"
"BBXX\n"
"IIiii+YYGGi+\n"
}, { 1,// Must check that one message only is created.
"ZCZC 619\n"
"SMEN43 EDZW 15180 CCB\n"
"AAXX 1518\n"
"00271 17/82 0040 10870 20040 0116 4 16 57017 60002 700// 333\n"
" 10180 91108;\n"
"NNNN\n",
"\n"
}, { 1,
"AAXX 22231 15420 22997 03200 10194 20178 30027 40134 52009 333 55300 0//// 20000 3//// 60005 91001 91102=\n",
"AAXX+YYGGi+ IIiii+iihVV+Nddff+1sTTT_air+2sTTT_dew+3PPPP+4PPPP+5appp+ 333+55jjj+jjjjj+2sTTT_min+3Ejjj+6RRRt+9SSss+9SSss+\n"
}, { 1,
"62144 20184 99534 10017 47297 /3612 10086 20080 40104#580\n",
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+ 40104#580\n"
}, { 1,
"63057 20004 99592 100-#110)6 10084 20028 49967 51002 700// 22200 10605 70024;\n\n"
"63110 20004 99595 10015 47697 /1122 10080 20031 49979 50000 700// 22200 10504 70021;\n",
"IIiii+YYGGi+99LLL+ 100-#110)6 1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+ 222Dv+1PPHH+70HHH+\n\n"
"IIiii+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+ 222Dv+1PPHH+70HHH+\n"
}, { 1,
"DGEN 20004 99547 10078 41/96 22215 10085 20013 49950 54000 74100\n",
"IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+\n"
}
};
static const size_t nb_tests = G_N_ELEMENTS(tests_arr);
// TODO: Test this command to detect unpublished messages:
// egrep "No publish2" flsynop.log | more
// ----------------------------------------------------------------------------
static void tstone( synop * ptr_synop, const synop_test * tst_arr, int tstnb )
{
std::stringstream strm_tst ;
dbg_strm = &strm_tst ;
int nb_errors_parse = 0 ;
int nb_errors_msg = 0 ;
for(int i = 0; i < tstnb; ++i )
{
strm_tst.str(std::string());
ptr_synop->cleanup();
KmlServer::GetInstance()->Reset();
for( const char * pc = tst_arr[i].m_input; *pc != '\0'; ++pc )
ptr_synop->add( *pc );
ptr_synop->flush(true);
bool diff_parse = ( strm_tst.str() != tst_arr[i].m_output );
if(diff_parse) ++nb_errors_parse;
bool diff_msg = ( KmlServer::GetInstance()->NbBroadcasts() != tst_arr[i].m_expected_nb_msgs );
if( diff_msg ) ++nb_errors_msg;
if( diff_parse || diff_msg ) {
std::cout << "Input [" << tst_arr[i].m_input << "]\n" ;
}
if( diff_parse ) {
std::cout << "Expect [" << tst_arr[i].m_output << "]\n" ;
std::cout << "Actual [" << strm_tst.str() << "]\n" ;
}
if( diff_msg ) {
std::cout << "Expected messages :" << tst_arr[i].m_expected_nb_msgs << "\n" ;
std::cout << "Actual :" << KmlServer::GetInstance()->NbBroadcasts() << "\n" ;
}
std::cout << "=============================================================\n";
}
std::cout << "Nb tests=" << tstnb
<< " nb errors_parse=" << nb_errors_parse
<< " nb errors_msg=" << nb_errors_msg
<< '\n' ;
}
// ----------------------------------------------------------------------------
/* TODO: For testing detection on strings with errors, we will corrupt the existing strings,
* and try to decode them with one or two insertions/deletions/changes. */
static void process_file( synop * ptr_synop, const char * namin )
{
std::cout << "Processing:" << namin << "\n";
ptr_synop->cleanup();
std::ifstream filin( namin );
std::string namout = namin + std::string(".out");
std::ofstream filout( namout.c_str() );
dbg_strm = &filout ;
char c;
int nb = 0 ;
while( filin.get(c) )
{
ptr_synop->add( c );
++nb ;
}
ptr_synop->flush(true);
filin.close();
filout.close();
std::cout << "====== " << nb << " chars =======================================================\n";
}
// ----------------------------------------------------------------------------
//
// These stub definitions so we do not link with too much fldigi code.
//
static std::ofstream g_adif_file;
QsoHelper::QsoHelper(int the_mode)
: qso_rec( NULL )
{
}
QsoHelper::~QsoHelper()
{
g_adif_file << "========================================\n";
}
void QsoHelper::Push( ADIF_FIELD_POS pos, const std::string & value )
{
#define QSO_TITLE(n) case n : g_adif_file << #n ; break ;
switch(pos) {
QSO_TITLE(FREQ)
QSO_TITLE(CALL)
QSO_TITLE(MODE)
QSO_TITLE(NAME)
QSO_TITLE(QSO_DATE)
QSO_TITLE(QSO_DATE_OFF)
QSO_TITLE(TIME_OFF)
QSO_TITLE(TIME_ON)
QSO_TITLE(QTH)
QSO_TITLE(RST_RCVD)
QSO_TITLE(RST_SENT)
QSO_TITLE(STATE)
QSO_TITLE(VE_PROV)
QSO_TITLE(NOTES)
QSO_TITLE(QSLRDATE)
QSO_TITLE(QSLSDATE)
QSO_TITLE(GRIDSQUARE)
QSO_TITLE(BAND)
QSO_TITLE(CNTY)
QSO_TITLE(COUNTRY)
QSO_TITLE(CQZ)
QSO_TITLE(DXCC)
QSO_TITLE(IOTA)
QSO_TITLE(ITUZ)
QSO_TITLE(CONT)
QSO_TITLE(MYXCHG)
QSO_TITLE(XCHG1)
QSO_TITLE(SRX)
QSO_TITLE(STX)
QSO_TITLE(TX_PWR)
QSO_TITLE(EXPORT)
default: g_adif_file << pos ;
}
g_adif_file << ":" << value << "\n";
#undef QSO_TITLE
}
// ----------------------------------------------------------------------------
// Test program: Text files containing synop samples are given on the command line.
// Do we run a couple of internal self-test functions ?
static bool internal_test = false ;
static bool kml_balloon_as_matrix = false ;
// If set, the output document, instead of having Synop messages, will get only
// the regular expressions names. This helps for debugging and the output
// is locale-independent.
static bool regex_output_only = false ;
// If set, at the end of the execution, prints all the regular expression
// and the number of times each of them was used.
static bool display_synop_usage = false ;
// Where the CSV files for Synop decoding are loaded from.
static std::string data_dir = "data/";
// Where the KML files are periodically written to.
static std::string kml_dir = "kml/";
// Where the KML files are loaded from at startup.
static std::string load_dir ;
// Contains the output of all logged nformation.
static std::string dbg_file = "FlSynop.log";
// This command must be executed each time KML files are saved to disk.
static std::string exec_cmd = "echo Subprocess called; date";
static const char * g_adif_name = "adif.txt";
int main(int argC, char * argV[] )
try {
int option_index = 0 ;
opterr = 0;
for(;;) {
static const char shortopts[] = "b:k:l:d:utmrvwh";
static const struct option longopts[] = {
{ "data_dir", required_argument, 0, 'b' },
{ "kml_dir", required_argument, 0, 'k' },
{ "load_dir", required_argument, 0, 'l' },
{ "dbg", required_argument, 0, 'd' },
{ "usage", no_argument, 0, 'u' },
{ "test", no_argument, 0, 't' },
{ "matrix", no_argument, 0, 'm' },
{ "regex", no_argument, 0, 'r' },
{ "version", no_argument, 0, 'v' },
{ "help", no_argument, 0, 'h' },
{ NULL, 0, 0, 0 }
};
int c = getopt_long(argC, (char * const *)argV, shortopts, longopts, &option_index);
switch (c) {
case -1:
break;
case 0:
// handle options with non-0 flag here
if (longopts[option_index].flag != 0)
continue;
printf ("option %s", longopts[option_index].name);
if (optarg)
printf (" with arg %s", optarg);
printf ("\n");
continue;
case 'b':
data_dir = optarg;
continue;
case 'k':
kml_dir = optarg;
continue;
case 'l':
load_dir = optarg;
continue;
case 'd':
dbg_file = optarg;
continue;
case 't':
internal_test = true ;
continue ;
case 'm':
kml_balloon_as_matrix = true;
continue;
case 'r':
regex_output_only = true ;
continue ;
case 'u':
display_synop_usage = true ;
continue ;
case 'v':
std::cout << "version 1.0\n";
exit(EXIT_SUCCESS);
case ':':
default:
std::cerr << "Unrecognized option\n";
exit(EXIT_FAILURE);
case 'h':
case '?':
std::cout << "Valid options are:\n" ;
for( size_t i = 0; longopts[i].name != NULL; ++i ) {
std::cout << " " << longopts[i].name << "\n" ;
}
exit(EXIT_SUCCESS);
}
break;
}
g_adif_file.open( g_adif_name, std::ios_base::out );
/// Where the warning, informational and error messages are written.
// debug::start(dbg_file.c_str());
/// Just for testing the loading. We load from one dir and save in another.
if( ! load_dir.empty() ) {
std::cout << "Loading from " << load_dir << "\n";
KmlServer::GetInstance()->InitParams( exec_cmd, load_dir );
}
KmlServer::GetInstance()->InitParams( exec_cmd, kml_dir, 10000, 0, 120, kml_balloon_as_matrix );
if( ! load_dir.empty() ) {
std::cout << "Loading tested: Destination=" << kml_dir << "\n";
exit(0);
}
// Must be done before any use of WMO stations data.
// http://weather.noaa.gov/data/nsd_bbsss.txt
std::cout << "Opening:" << data_dir << "\n";
if( ! SynopDB::Init(data_dir) ) {
std::cerr << "Error opening:" << data_dir << ":" << strerror(errno) << "\n";
exit(EXIT_FAILURE);
}
// Serializer::SetSrl( & fldigiSerial );
if( internal_test ) {
test_coordinates();
test_wmo();
test_buoy();
test_ship();
test_jcomm();
}
synop::setup<tst_callback>();
synop * ptr_synop = synop::instance();
if( internal_test ) {
KmlServer::GetInstance()->Reset();
synop::SetTestMode(false);
tstone( ptr_synop, tests_arr_full, nb_tests_full );
synop::SetTestMode(true);
tstone( ptr_synop, tests_arr, nb_tests );
KmlServer::GetInstance()->Reset();
}
synop::SetTestMode(regex_output_only);
while (optind < argC)
process_file( ptr_synop, argV[optind++] );
if( display_synop_usage ) {
synop::regex_usage();
}
KmlServer::Exit();
g_adif_file.close();
// std::cin.get();
return 0 ;
}
catch( const std::exception & exc )
{
std::cout << "Exception:" << exc.what() << '\n';
exit(EXIT_FAILURE);
}
// ----------------------------------------------------------------------------
| 54,358
|
C++
|
.cxx
| 1,267
| 40.133386
| 175
| 0.67293
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,075
|
synop.cxx
|
w1hkj_fldigi/src/synop-src/synop.cxx
|
// ----------------------------------------------------------------------------
// synop.cxx -- SYNOP decoding
//
// Copyright (C) 2012
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <memory.h>
#include <time.h>
#include "re.h"
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <map>
#include <set>
#include <list>
#include <vector>
#include <stdexcept>
#include <typeinfo>
#include <memory>
#include "config.h"
#include "synop.h"
#include "kmlserver.h"
#include "configuration.h"
#include "fl_digi.h"
#include "gettext.h"
#include "debug.h"
#include "field_def.h"
#include "record_loader.h"
#include "coordinate.h"
#include "strutil.h"
#include "FL/fl_ask.H"
LOG_FILE_SOURCE(debug::LOG_SYNOP);
// ----------------------------------------------------------------------------
// RTTY is 850 Hz shift, 75 baud, ITA2 Baudot code.
// 3231.0 KAWN RTTY (Tune in LSB)
// 7784.0 KAWN RTTY
// 11120.0 KAWN RTTY (Tune in LSB)
// 13530.0 KAWN RTTY
// 19324.5 KAWN RTTY
// 19530.0 KAWN RTTY (Usually "fox" marker)
// ----------------------------------------------------------------------------
/// Writes a string range to the current print callback.
static void disp_range( std::string::const_iterator b, std::string::const_iterator e, bool bold = false) {
const char * first = &( *b );
const char * last = &( *e );
assert( first <= last );
size_t nb = last - first ;
synop::ptr_callback->print( first, nb, bold );
};
// ----------------------------------------------------------------------------
/// Builds a time with Synop messages which just have event's day/hour/min.
static time_t DayHourMin2Tm( int day, int hour, int min ) {
// TODO: Check that time() is UTC too.
time_t tmpTime = time(NULL);
tm aTm = *gmtime(&tmpTime);
// Maybe observation from previous month.
if( day > aTm.tm_mday ) {
aTm.tm_mon-- ;
if( aTm.tm_mon < 0 ) {
aTm.tm_mon = 11 ;
aTm.tm_year-- ;
}
}
aTm.tm_mday = day ;
aTm.tm_hour = hour ;
aTm.tm_min = min ;
time_t my_time = mktime( & aTm );
if( my_time <= 0 ) throw std::runtime_error("Invalid time");
return my_time ;
}
/// Absolute time difference in number of days.
static int diffTm( time_t tim1, time_t tim2 )
{
if( (tim1 <= 0 ) || (tim2 <= 0 ) ) throw std::runtime_error("Invalid times");
double nbSecs = difftime( tim1, tim2 );
return fabs( 0.5 + nbSecs * ( 1.0 / ( 24 * 3600 ) ) );
}
/// We could use any other time as long as it is clear.
static std::string Tm2SynopTime( time_t tim ) {
return KmlServer::Tm2Time( tim );
}
// ----------------------------------------------------------------------------
/// Base class for displaying the key-value pairs read from Synop broadcast.
class Serializer {
/// It returns the previous value which can therefore be restored.
Serializer * m_prevSerial ;
/// This happens when switching temporarily to this serializer.
static Serializer * m_srl ;
public:
/// It registers itself as a serializer.
Serializer() {
m_prevSerial = m_srl ;
m_srl = this ;
}
/// It restores the previous serializer.
virtual ~Serializer() {
m_srl = m_prevSerial ;
}
virtual void StartSection( const std::string & section_name ) = 0 ;
virtual void AddItem( const char * key, const char * value, const char * unit ) = 0;
static Serializer * Instance(void) {
if( m_srl == NULL ) throw std::runtime_error("Null m_srl");
return m_srl;
}
};
// Current serializer, that is, the object which prints Synop attributes.
Serializer * Serializer::m_srl = NULL;
// ----------------------------------------------------------------------------
static const char * Unit_hPa = "hPa";
static const char * Unit_degrees = "degrees";
static const char * Unit_hours = "hours";
static const char * Unit_minutes = "mn";
static const char * Unit_seconds = "seconds";
static const char * Unit_Celsius = "°C";
static const char * Unit_knots = "knots";
static const char * Unit_feet = "feet";
static const char * Unit_km = "km";
static const char * Unit_meters = "meters";
static const char * Unit_centimeters = "cm";
static const char * Unit_mm = "mm";
static const char * Unit_meters_second = "m/s";
// ----------------------------------------------------------------------------
/// Compile-time number of elements of a static array.
#ifndef G_N_ELEMENTS
#define G_N_ELEMENTS(arr) ((sizeof(arr))/(sizeof(arr[0])))
#endif
/// For documentation only. Tells the WMO code table of an information.
#define FM12CodeTable( arr, num, txt )
// ----------------------------------------------------------------------------
/// Used to select from lookup tables.
template< class Key > struct choice {
const Key m_key;
const char * m_val;
};
// Simple lookup.
template< class Key, class Dflt >
const char * choice_map( const choice< Key > * choices, size_t nb_choices, const Key & key, const Dflt & dflt )
{
for( ; nb_choices; --nb_choices, ++choices )
{
if( key == choices->m_key ) return choices->m_val ;
}
return dflt ;
}
// ----------------------------------------------------------------------------
// There are about 11000 records, so memory usage is an issue.
class RecordWmoStation
{
/// Block Number :2 digits representing the WMO-assigned block.
int m_block ;
/// Station Number :3 digits representing the WMO-assigned station.
int m_station ;
/// ICAO Location Indicator :4 alphanumeric characters,
/// not all stations in this file have an assigned location indicator.
/// The value "----" is used for stations that do not have an assigned location indicator.
char m_icao_indicator[5]; // TODO: Not used at the moment.
/// Place Name :Common name of station location.
std::string m_name ;
// State :2 character abbreviation (included for stations located in the United States only).
// Country Name :Country name is ISO short English form.
// TODO: Consider replacing it with an ISO integer key.
std::string m_country;
// WMO Region :digits 1 through 6 representing the corresponding WMO region, 7 stands for the WMO Antarctic region.
// Station Latitude or Latitude :DD-MM-SSH where DD is degrees, MM is minutes, SS is seconds
// and H is N for northern hemisphere or S for southern hemisphere or
// E for eastern hemisphere or W for western hemisphere.
// The seconds value is omitted for those stations where the seconds value is unknown.
CoordinateT::Pair m_station_coordinates ;
/// Upper Air Latitude :DD-MM-SSH.
/// Station Elevation (Ha) :The station elevation in meters. Value is omitted if unknown.
int m_station_elevation ;
/// Upper Air Elevation (Hp) :The upper air elevation in meters. Value is omitted if unknown.
/// RBSN indicator :P if station is defined by the WMO as belonging to the Regional Basic Synoptic Network, omitted otherwise.
/// Delimiter between values in a record.
static const char m_delim = ';';
public:
/// More information here: http://weather.noaa.gov/tg/site.shtml
RecordWmoStation()
: m_block(0)
, m_station(0)
{}
int wmo_indicator() const { return m_block * 1000 + m_station; }
const CoordinateT::Pair & station_coordinates() const { return m_station_coordinates; }
int station_elevation(void) const { return m_station_elevation; }
const std::string & country() const { return m_country; }
/// This garantees an unique name.
const std::string & station_name() const { return m_name; }
void rename_station( const std::string & nam ) {
LOG_VERBOSE("Renaming %s to %s", m_name.c_str(), nam.c_str() );
m_name = nam;
}
// http://weather.noaa.gov/data/nsd_bbsss.txt
// 01;023;ENDU;Bardufoss;;Norway;6;69-04N;018-32E;;;7;79;P
// Wrong record:
// 71;113;CWZA;Agassiz Automated Reporting Station ;;Canada;;49-15N;121-46W;;;15;;
friend std::istream & operator>>( std::istream & istrm, RecordWmoStation & rec )
{
if( read_until_delim( m_delim, istrm, rec.m_block )
&& read_until_delim( m_delim, istrm, rec.m_station )
&& read_until_delim( m_delim, istrm, rec.m_icao_indicator )
&& read_until_delim( m_delim, istrm, rec.m_name )
&& read_until_delim( m_delim, istrm /* State */ )
&& read_until_delim( m_delim, istrm, rec.m_country )
&& read_until_delim( m_delim, istrm /* WMO region */ )
&& read_until_delim( m_delim, istrm, rec.m_station_coordinates.latitude() )
&& read_until_delim( m_delim, istrm, rec.m_station_coordinates.longitude() )
&& read_until_delim( m_delim, istrm /* Upper air latitude */ )
&& read_until_delim( m_delim, istrm /* Upper air longitude */ )
&& read_until_delim( m_delim, istrm, rec.m_station_elevation, 0 )
&& read_until_delim( m_delim, istrm /* Upper air elevation */ )
&& read_until_delim( m_delim, istrm /* Rsbn indicator */ )
&& ( rec.m_station_coordinates.latitude().is_lon() == false )
&& ( rec.m_station_coordinates.longitude().is_lon() == true )
)
{
strtrim( rec.m_name );
return istrm ;
}
istrm.setstate(std::ios::badbit);
return istrm ;
}
friend std::ostream & operator<< ( std::ostream & ostrm, const RecordWmoStation & rec )
{
ostrm << rec.m_name ;
return ostrm;
}
}; // RecordWmoStation
// ----------------------------------------------------------------------------
// srst2;29.683 N;94.033 W;0.7;Sabine Pass, TX;NDBC;NDBC Meteorological/Ocean;fixed
// ssbn7;33.842 N;78.476 W;;Sunset Beach Nearshore Waves;CORMP;IOOS Partners;other
// Adapted from http://www.ndbc.noaa.gov/ndbcmapstations.json
// ftp://tgftp.nws.noaa.gov/data/observations/marine/stations/station_table.txt
// # STATION_ID | OWNER | TTYPE | HULL | NAME | PAYLOAD | LOCATION | TIMEZONE | FORECAST | NOTE
// #
// 0y2w3|CG|Weather Station||Sturgeon Bay CG Station, WS||44.794 N 87.313 W (44°47'40" N 87°18'47" W)|C| |
// 13001|PR|Atlas Buoy|PM-595|NE Extension||12.000 N 23.000 W (12°0'0" N 23°0'0" W)|| |
/// This allows to find a buoy characteristics.
class RecordBuoy {
std::string m_id ;
std::string m_owner ; /// "UW" : University of Washington etc...
std::string m_type ; /// "Offshore Buoy", "6-meter NOMAD buoy" etc...
std::string m_hull; /// "PM-599", "3D37"
std::string m_name ; /// "Ecuador INOCAR", "150 NM East of Cape HATTERAS"
std::string m_payload; /// "AMPS payload"
CoordinateT::Pair m_location ; /// "32.501 N 79.099 W (32°30'2" N 79°5'58" W)"
std::string m_timezone ; /// "E"
std::string m_forecast; /// "FZUS52.KCHS FZNT22.KWBC"
std::string m_note; /// "This buoy was removed ..."
/// From the CVS file.
static const char m_delim = '|';
public:
/// Unique identifier in a catalog.
const std::string & id() const { return m_id; }
const CoordinateT::Pair & station_coordinates() const { return m_location; }
/// The name coming from the file might not be unique.
const std::string & buoy_name(void) const { return m_name;}
/// Needed because buoy names are not unique
void rename_buoy( const std::string & new_buoy_name ) { m_name = new_buoy_name ; }
const std::string & owner(void) const { return m_owner;}
const std::string & payload(void) const { return m_payload;}
const std::string & note(void) const { return m_note;}
/// TODO: Speedup by doing that once only.
std::string title(void) const {
std::string title = m_type ;
if( ! m_name.empty() ) title += ":" + m_name ;
if( ! m_payload.empty() ) title += ":" + m_payload ;
if( ! m_owner.empty() ) title += ":" + m_owner ;
return title ;
}
/// fixed, other, dart, buoy, oilrig, tao
const std::string & type(void) const { return m_type;}
friend std::istream & operator>>( std::istream & istrm, RecordBuoy & rec )
{
if( read_until_delim( m_delim, istrm, rec.m_id )
&& read_until_delim( m_delim, istrm, rec.m_owner )
&& read_until_delim( m_delim, istrm, rec.m_type )
&& read_until_delim( m_delim, istrm, rec.m_hull )
&& read_until_delim( m_delim, istrm, rec.m_name )
&& read_until_delim( m_delim, istrm, rec.m_payload )
&& read_until_delim( m_delim, istrm, rec.m_location )
&& read_until_delim( m_delim, istrm, rec.m_timezone )
&& read_until_delim( m_delim, istrm, rec.m_forecast )
&& read_until_delim( m_delim, istrm, rec.m_note )
)
{
// std::cout << "id=" << rec.m_id << " name=" << rec.m_name << "\n";
return istrm ;
}
istrm.setstate(std::ios::badbit);
return istrm ;
}
}; // RecordBuoy
// ----------------------------------------------------------------------------
// http://www.metoffice.gov.uk/media/csv/e/7/ToR-Stats-SHIP.csv
// June 2012,,,,,,,,
// CTRY,CALLSIGN,NAME,Observations,N<30,N<60,N<120,N>360,Average (R-O) (mins)
// , B2M1297, ,1,1,1,1,0,30
// , B2M1303, ,17,16,17,17,0,17.9
// , BATEU00, ,366,366,366,366,0,5
class RecordShip {
std::string m_callsign;
std::string m_country;
std::string m_name ;
static const char m_delim = ',';
public:
const std::string & callsign(void) const { return m_callsign; }
const std::string & country(void) const { return m_country; }
const std::string & name(void) const { return m_name; }
friend std::istream & operator>>( std::istream & istrm, RecordShip & rec )
{
if( read_until_delim( m_delim, istrm, rec.m_country )
&& read_until_delim( m_delim, istrm, rec.m_callsign )
&& read_until_delim( m_delim, istrm, rec.m_name )
&& read_until_delim( m_delim, istrm )
&& read_until_delim( m_delim, istrm )
&& read_until_delim( m_delim, istrm )
&& read_until_delim( m_delim, istrm )
&& read_until_delim( m_delim, istrm )
&& read_until_delim( m_delim, istrm )
)
{
strtrim( rec.m_country );
strtrim( rec.m_callsign );
strtrim( rec.m_name );
// std::cout << "id=" << rec.m_callsign << " name=" << rec.m_name << "\n";
strcapitalize( rec.m_name );
// std::cout << "id=" << rec.m_callsign << " name=" << rec.m_name << "\n";
return istrm ;
}
istrm.setstate(std::ios::badbit);
return istrm ;
}
}; // RecordShip
// ----------------------------------------------------------------------------
/**
Huge file, but contains many information.
There are many duplicates for each WMO indicator, it does not matter for us.
ftp://ftp.jcommops.org/JCOMMOPS/GTS/wmo/wmo_list.txt
GTS stands for Global Telecommunications System
JCOMMOPS WMO-PLATFORM cross reference list as of 2012-09-08 for WMO number still allocated in the last 6 months (with WMO Ids that are numerical)
WMO;TELECOM ID;TELECOM SYSTEM;PTFM NAME;PTFM FAMILY;PTFM TYPE;CONTACT NAME;EMAIL;PROGRAM;ROLE;AGENCY;COUNTRY;ALLOC_DATE;DEALLOC_DATE;ARGOS_PROG
10044;BSH:10044;METEOSAT;MB:10044;FIXED;METSTATION;;;GERMANY MB;Program Manager;KIEL UNIVERSITY;DEU;2001-01-01;3000-01-01;
10044;BSH:10044;METEOSAT;MB:10044;FIXED;METSTATION;;;GERMANY MB;Programme GTS Coordinator;KIEL UNIVERSITY;DEU;2001-01-01;3000-01-01;
11908;88671;ARGOS;ARGOS:88671;DB;SVPBD2;;;AOML-GDP;Programme GTS Coordinator;NOAA/AOML;USA;2011-07-19;3000-01-01;
Apparently, special codes here:
http://www.meds-sdmm.dfo-mpo.gc.ca/isdm-gdsi/international-internationale/j-comm/CODES/wmotable_e.htm
*/
/// JComm stands for Joint Commission on Oceanography and Marine Meteorology (J-COMM)
class RecordJComm {
std::string m_wmo ; // TODO: This could be an integer.
std::string m_telecom_system ;
std::string m_ptfm_name ;
std::string m_ptfm_family ;
std::string m_ptfm_type ;
std::string m_program ;
std::string m_agency ;
std::string m_country ;
static const char m_delim = ';';
public:
/// TODO: This could be an integer.
const std::string & wmo() const { return m_wmo; }
const std::string & telecom_system() const { return m_telecom_system; }
const std::string & ptfm_name() const { return m_ptfm_name; }
const std::string & ptfm_family() const { return m_ptfm_family; }
const std::string & ptfm_type() const { return m_ptfm_type; }
const std::string & program() const { return m_program; }
const std::string & agency() const { return m_agency; }
const std::string & country() const { return m_country; }
friend std::istream & operator>>( std::istream & istrm, RecordJComm & rec )
{
if( read_until_delim( m_delim, istrm, rec.m_wmo )
&& read_until_delim( m_delim, istrm /* Telecom Id */ )
&& read_until_delim( m_delim, istrm, rec.m_telecom_system )
&& read_until_delim( m_delim, istrm, rec.m_ptfm_name )
&& read_until_delim( m_delim, istrm, rec.m_ptfm_family )
&& read_until_delim( m_delim, istrm, rec.m_ptfm_type )
&& read_until_delim( m_delim, istrm /* Contact Name */ )
&& read_until_delim( m_delim, istrm /* Email */ )
&& read_until_delim( m_delim, istrm, rec.m_program )
&& read_until_delim( m_delim, istrm /* Role */ )
&& read_until_delim( m_delim, istrm, rec.m_agency )
&& read_until_delim( m_delim, istrm, rec.m_country )
&& read_until_delim( m_delim, istrm /* Alloc Date */ )
&& read_until_delim( m_delim, istrm /* Dealloc Date */ )
&& read_until_delim( m_delim, istrm /* Argos Prog */ )
)
{
return istrm ;
}
istrm.setstate(std::ios::badbit);
return istrm ;
}
// Unfortunately the physical type of the station is embedded in the ptfm_name.
// So we rearrange data, to have a decent icon name. Handles cases such as:
// 42365;Ursa809;IRIDIUM;PLATFORM:42365;FIXED;FIXED
// 62130;IRID:62130;IRIDIUM;OILPLAT:62130;MB;MB;
// Very rough solution, quite OK for the moment.
void SetJCommFields( std::string & kmlNam, std::string & iconNam ) const {
if(
( strstr( m_ptfm_name.c_str(), "PLATFORM" ) )
|| ( strstr( m_ptfm_name.c_str(), "OILPLAT" ) )
) {
kmlNam = agency() + ":(" + m_wmo + ")";
iconNam = "Oil Platform";
} else if(
( strstr( m_ptfm_name.c_str(), "BUOY" ) )
) {
kmlNam = agency() + ":(" + m_wmo + ")";
iconNam = "Buoy";
} else {
kmlNam = ptfm_name() + "," + agency();
iconNam = telecom_system();
}
strcapitalize(kmlNam);
}
}; // RecordJComm
// ----------------------------------------------------------------------------
/// This wraps a record type and allows to load a cvs file and access it using a key.
template< class Key, class Record, Key (Record::*Method)(void) const, class Terminal >
class Catalog : public RecordLoader< Terminal >
{
/// The keying method might return a reference instead of a value.
template< class Type > struct deref { typedef Type type ; };
template< class Type > struct deref< Type & > { typedef Type type ; };
/// If the return value of the indexing function is for example a reference
/// to a const string, then KeyType is a string.
template< class Type > struct deref< const Type & > { typedef Type type ; };
protected:
typedef typename deref< Key >::type KeyType ;
typedef std::map< KeyType, Record > CatalogType ;
typedef typename CatalogType::iterator IteratorType ;
CatalogType m_catalog ;
bool FillAndTest() {
int nbRec = this->LoadAndRegister();
if( nbRec < 0 ) {
return false ;
}
else {
LOG_VERBOSE("record=%s nb_recs=%d", typeid(Record).name(), nbRec );
return true ;
}
}
public:
void Clear() {
m_catalog.clear();
}
bool ReadRecord( std::istream & istrm ) {
Record tmp ;
istrm >> tmp ;
if( istrm || istrm.eof() ) {
m_catalog[ (tmp.*Method)() ] = tmp ;
return true ;
}
return false;
}
/// Returns a station with wmo_indicator to zero if cannot find the right one.
static const Record * FindFromKey( Key key )
{
CatalogType & refCat = RecordLoader< Terminal >::InstCatalog().m_catalog;
typename CatalogType::const_iterator it = refCat.find( key );
return ( it == refCat.end() ) ? NULL : &it->second ;
}
bool Fill() {
return FillAndTest();
}
}; // Catalog
// ----------------------------------------------------------------------------
/// This contains all WMO stations records read from the file.
class CatalogWmoStations : public Catalog< int, RecordWmoStation, &RecordWmoStation::wmo_indicator, CatalogWmoStations >
{
public:
// After data loading, there is an extra step to ensure that names are unique.
// 85;196;SLCP;Concepcion;;Bolivia;3;16-09S;062-01W;;;497;;
// 85;682;SCIE;Concepcion;;Chile;3;36-46S;073-03W;;;12;;P
// 86;134;SGCO;Concepcion;;Paraguay;3;23-25S;057-18W;;;74;74;
bool Fill()
{
if( ! FillAndTest() ) return false ;
typedef std::multimap< std::string, IteratorType > HashT ;
HashT allNames ;
// First take the names
LOG_VERBOSE("Eliminating duplicates out of %d elements",
static_cast<int>(m_catalog.size()));
for( IteratorType it = m_catalog.begin(), en = m_catalog.end(); it != en; ++it )
{
RecordWmoStation & refWmo = it->second ;
allNames.insert( allNames.end(), HashT::value_type( refWmo.station_name(), it ) );
}
size_t nbDupl = 0 ;
// Iterates on all names, take only the duplicates.
for( HashT::iterator itH = allNames.begin(), itNextH = itH, enH = allNames.end(); itH != enH; itH = itNextH )
{
LOG_VERBOSE("Name=%s", itH->first.c_str() );
size_t nbKeys = 1 ;
for(;;) {
++itNextH;
if( itNextH == enH ) break ;
if( itNextH->first != itH->first ) break ;
++nbKeys;
}
LOG_VERBOSE("Name=%s nb=%d",
itH->first.c_str(),
static_cast<int>(nbKeys) );
// If no duplicates, then try next one.
if( nbKeys == 1 ) continue ;
++nbDupl ;
LOG_VERBOSE("%d: Name %s %d occurrences",
static_cast<int>(nbDupl),
itH->first.c_str(),
static_cast<int>(nbKeys) );
// There should not be many elements, two or three duplicates, maximum five apparently.
typedef std::set< std::string > DiffNamesT ;
DiffNamesT differentNames ;
// Check that all countries are different.
for( HashT::iterator itSubH = itH; itSubH != itNextH; ++itSubH ) {
RecordWmoStation & refWmo = itSubH->second->second ;
LOG_VERBOSE("Trying %s", refWmo.station_name().c_str() );
// Appends the country.
refWmo.rename_station( refWmo.station_name() + "," + refWmo.country() );
std::pair< DiffNamesT::iterator, bool > tmpPair = differentNames.insert( refWmo.station_name() );
if( tmpPair.second ) continue ;
// Appends the WMO
refWmo.rename_station( strformat( "%s,%05d", refWmo.station_name().c_str(), refWmo.wmo_indicator() ) );
tmpPair = differentNames.insert( refWmo.station_name() );
if( tmpPair.second ) continue ;
LOG_ERROR("This should never happen because WMO indicator is unique");
return false ;
}
}
if(nbDupl) {
LOG_VERBOSE("Eliminated %d duplicates out of %d elements",
(int)nbDupl, (int)m_catalog.size());
}
return true ;
}
/// A static file with the same name is also installed in directory data.
const char * Url(void) const {
return "http://weather.noaa.gov/data/nsd_bbsss.txt";
}
const char * Description() const {
return _("WMO stations");
}
}; // CatalogWmoStations
// ----------------------------------------------------------------------------
/// This contains all WMO stations records read from the file.
/// Derived class necessary because names are not unique and must be revised.
class CatalogBuoy : public Catalog< const std::string &, RecordBuoy, &RecordBuoy::id, CatalogBuoy >
{
public:
/// After data loading, there is an extra step to ensure that names are unique.
bool Fill()
{
if( ! FillAndTest() ) return false ;
typedef std::multimap< std::string, IteratorType > HashT ;
HashT allNames ;
LOG_VERBOSE("Eliminating duplicates out of %d elements",
static_cast<int>(m_catalog.size()));
/// First take the names
for( IteratorType it = m_catalog.begin(), en = m_catalog.end(); it != en; ++it )
{
RecordBuoy & refWmo = it->second ;
allNames.insert( allNames.end(), HashT::value_type( refWmo.buoy_name(), it ) );
}
size_t nbDupl = 0 ;
/// Iterates on all names, take only the duplicates.
for( HashT::iterator itH = allNames.begin(), itNextH = itH, enH = allNames.end(); itH != enH; itH = itNextH )
{
LOG_VERBOSE("Name=%s", itH->first.c_str() );
size_t nbKeys = 1 ;
for(;;) {
++itNextH;
if( itNextH == enH ) break ;
if( itNextH->first != itH->first ) break ;
++nbKeys;
}
LOG_VERBOSE("Name=%s nb=%d",
itH->first.c_str(),
static_cast<int>(nbKeys) );
// If no duplicates, then try next one.
if( nbKeys == 1 ) continue ;
++nbDupl ;
LOG_VERBOSE("%d: Buoy name %s %d occurrences",
static_cast<int>(nbDupl),
itH->first.c_str(),
static_cast<int>(nbKeys) );
// There should not be many elements, two or three duplicates, maximum five apparently.
typedef std::set< std::string > DiffNamesT ;
DiffNamesT differentNames ;
// Check that all countries are different.
for( HashT::iterator itSubH = itH; itSubH != itNextH; ++itSubH ) {
RecordBuoy & refBuoy = itSubH->second->second ;
// Appends the id
if( refBuoy.buoy_name().empty() )
refBuoy.rename_buoy( refBuoy.id().c_str() );
else
refBuoy.rename_buoy( strformat( "%s-%s", refBuoy.buoy_name().c_str(), refBuoy.id().c_str() ) );
std::pair< DiffNamesT::iterator, bool > tmpPair = differentNames.insert( refBuoy.buoy_name() );
LOG_VERBOSE("Buoy set to %s", refBuoy.buoy_name().c_str() );
if( tmpPair.second ) continue ;
LOG_ERROR("This should never happen because buoy id is unique");
return false ;
}
}
if(nbDupl) {
LOG_VERBOSE("Eliminated %d duplicates out of %d elements",
(int)nbDupl, (int)m_catalog.size());
}
return true ;
}
/// A static file with the same name is also installed in directory data.
const char * Url(void) const {
return "ftp://tgftp.nws.noaa.gov/data/observations/marine/stations/station_table.txt";
}
const char * Description() const {
return _("Weather buoys");
}
}; // CatalogBuoy
// ----------------------------------------------------------------------------
/// Known list of VOS weather ships, Volunteer Observing Ships.
struct CatalogShip : public Catalog< const std::string &, RecordShip, &RecordShip::callsign, CatalogShip >
{
/// A static file with the same name is also installed in directory data.
const char * Url(void) const {
return "http://www.metoffice.gov.uk/media/csv/e/7/ToR-Stats-SHIP.csv";
}
const char * Description() const {
return _("Weather ships");
}
};
/// Another public-domain file, returns information given a WMO-like key.
struct CatalogJComm : public Catalog< const std::string &, RecordJComm, &RecordJComm::wmo, CatalogJComm >
{
/// A static file with the same name is also installed in directory data.
const char * Url(void) const {
return "ftp://ftp.jcommops.org/JCOMMOPS/GTS/wmo/wmo_list.txt";
}
const char * Description() const {
return _("Argos & Iridium");
}
};
// ----------------------------------------------------------------------------
// Returns true if properly initialised.
// TODO: Have all the derived class link to the base class so the initialisation
// can be done without having to enumerate the sub-classes.
bool SynopDB::Init( const std::string & data_dir )
{
try
{
return CatalogWmoStations::InstCatalog().Fill()
&& CatalogBuoy::InstCatalog().Fill ()
&& CatalogShip::InstCatalog().Fill ()
&& CatalogJComm::InstCatalog().Fill ();
}
catch( const std::exception & exc )
{
fl_alert("Could not load SYNOP data files: Exception=%s", exc.what() );
return false ;
}
return true;
}
/// For testing purpose only in stand-alone program flsynop.
const std::string & SynopDB::IndicatorToName( int wmo_indicator )
{
const RecordWmoStation * ptrWmo = CatalogWmoStations::FindFromKey( wmo_indicator );
static const std::string empty_str ;
return ( ptrWmo == NULL ) ? empty_str : ptrWmo->station_name();
}
/// For testing purpose only in stand-alone program flsynop.
const std::string SynopDB::IndicatorToCoordinates( int wmo_indicator )
{
const RecordWmoStation * ptrWmo = CatalogWmoStations::FindFromKey( wmo_indicator );
if ( ptrWmo == NULL ) return "No coordinates";
std::stringstream strm ;
strm << ptrWmo->station_coordinates() << " " ;
strm << ptrWmo->station_coordinates().longitude().angle() << " " ;
strm << ptrWmo->station_coordinates().latitude().angle() << " " ;
return strm.str();
}
/// For testing purpose only in stand-alone program flsynop.
const std::string & SynopDB::BuoyToName( const char * buoy_id )
{
const RecordBuoy * ptrBuoy = CatalogBuoy::FindFromKey( buoy_id );
static const std::string empty_str ;
return ( ptrBuoy == NULL ) ? empty_str : ptrBuoy->buoy_name();
}
/// For testing purpose only in stand-alone program flsynop.
const std::string & SynopDB::ShipToName( const char * ship_id )
{
const RecordShip * ptrShip = CatalogShip::FindFromKey( ship_id );
static const std::string empty_str ;
return ( ptrShip == NULL ) ? empty_str : ptrShip->name();
}
/// For testing purpose only in stand-alone program flsynop.
const std::string & SynopDB::JCommToName( const char * wmo )
{
const RecordJComm * ptrJComm = CatalogJComm::FindFromKey( wmo );
static const std::string empty_str ;
return ( ptrJComm == NULL ) ? empty_str : ptrJComm->ptfm_name();
}
// ----------------------------------------------------------------------------
/// Intrusive reference counter associated with RefCntPtr.
template<class Obj>
class WithRefCnt {
size_t m_ref_cnt ;
public:
WithRefCnt() : m_ref_cnt(0) {};
template<class Obj2>
friend class RefCntPtr;
};
/// Intrusive smart pointer with reference counting.
template< class Obj >
class RefCntPtr {
/// This must derive from the class WithRefCnt.
Obj * m_ptr ;
public:
RefCntPtr() : m_ptr(NULL) {}
/// The reference counter is incremented.
RefCntPtr( Obj * ptr ) : m_ptr(ptr) {
if( ptr ) ++ptr->m_ref_cnt ;
}
/// Deletes the pointed object if reference count reaches zero.
~RefCntPtr() {
if( m_ptr ) {
--m_ptr->m_ref_cnt ;
if( m_ptr->m_ref_cnt == 0 ) delete m_ptr ;
}
}
/// The reference counter is incremented.
RefCntPtr( const RefCntPtr & ptr ) : m_ptr( ptr.m_ptr ) {
if( m_ptr ) ++m_ptr->m_ref_cnt ;
}
/// The reference counter is incremented.
RefCntPtr & operator=( const RefCntPtr & ptr ) {
if( this != &ptr ) {
m_ptr = ptr.m_ptr ;
if( m_ptr ) ++m_ptr->m_ref_cnt ;
}
return *this;
}
const Obj * operator->() const { return m_ptr;}
Obj * operator->() { return m_ptr;}
operator bool() const { return m_ptr; }
};
// ----------------------------------------------------------------------------
/// Synop section number.
enum section_t {
SECTION_ZCZC_DLM=0,
SECTION_HEAD_GRP,
SECTION_IDENTLOC, // 000
SECTION_LAND_OBS, // 111
SECTION_SEA_SURF, // 222
SECTION_CLIM_DAT, // 333
SECTION_NATCLOUD, // 444
SECTION_NAT_CODE, // 555
SECTION_AUTO_DAT,
SECTION_NNNN_DLM,
SECTION_SECT_NBR
};
static const char * SectionToString( section_t group_number ) {
switch(group_number) {
case SECTION_ZCZC_DLM : return _("Bulletin start");
case SECTION_HEAD_GRP : return _("Header");
case SECTION_IDENTLOC : return _("Identification and location");
case SECTION_LAND_OBS : return _("Land observations");
case SECTION_SEA_SURF : return _("Sea surface observations");
case SECTION_CLIM_DAT : return _("Climatological data");
case SECTION_NATCLOUD : return _("National data, clouds");
case SECTION_NAT_CODE : return _("National data");
case SECTION_AUTO_DAT : return _("Automatisch erzeugte Daten");
case SECTION_NNNN_DLM : return _("Bulletin end");
default : return _("Unknown Synop group");
}
}
/// [nextSec][predSec] : Indicates that section Next can be preceded by section Pred.
static const char sectionTransitions[SECTION_SECT_NBR][SECTION_SECT_NBR] = {
// ZCZC_DLM HEAD_GRP IDENTLOC LAND_OBS SEA_SURF CLIM_DAT NATCLOUD NAT_CODE AUTO_DAT NNNN_DLM
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // ZCZC_DLM
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // HEAD_GRP
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, // IDENTLOC
{ 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, // LAND_OBS
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, // SEA_SURF
{ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // CLIM_DAT
{ 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, // NATCLOUD
{ 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 }, // NAT_CODE
{ 0, 0, 0, 1, 1, 1, 1, 1, 0, 0 }, // AUTO_DAT
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 } // NNNN_DLM
};
// ----------------------------------------------------------------------------
/// Priority helps to classify regular expressions matching the same work.
typedef double priority_t ;
/// Minimum priorities sum to be accepted as a valid chain of tokens.
static const priority_t MIN_PRIO = 2.0 ;
/// This models a Synop token, that is, a group of (Most of time) five digits.
class TokenProxy : public std::string, public WithRefCnt< TokenProxy >
{
public:
typedef RefCntPtr< TokenProxy > Ptr ;
/// List of pointers to TokenProxy, each of them associated to a token and its regex.
class TokVec : public std::vector< Ptr > , public WithRefCnt< TokVec >
{
TokVec( const TokVec & );
TokVec & operator=(const TokVec &);
/// For debugging, writes the regular expression.
void DumpTotal(section_t group_number, bool kml_mode) const {
// This information is not needed at the moment,
// but it is not possible to discard it if the section is empty, because
// we do not know that yet.
Serializer * ptrSerial = Serializer::Instance();
if(kml_mode) {
ptrSerial->StartSection( SectionToString(group_number) );
}
for( size_t i = 0; i < size(); ++ i ) {
TokenProxy & prox = *const_cast< TokenProxy *>( at(i).operator->() );
/// If set, this adds in the output which regular expression was detected.
static const bool addRegexToOutput = false ;
if( addRegexToOutput && ! kml_mode ) {
ptrSerial->AddItem( "Regex", prox.RegexName(), prox.c_str() );
}
if(kml_mode) {
prox.DrawKml();
} else {
prox.Print();
}
}
}
public:
typedef RefCntPtr< TokVec > Ptr ;
private:
/// Chains (sections) are linked so that any section can search the previous ones.
TokVec::Ptr m_previous_container ;
public:
TokVec() {};
/// Used to find a preceding token containing a specific information in a previous tokens chain.
TokVec::Ptr previous() const { return m_previous_container; }
void previous(TokVec::Ptr prev) { m_previous_container = prev; }
/// Debugging purpose: It outputs the concatenation of all regular expressions names.
std::string MiniDump(section_t group_number,bool disp_all = false) const {
std::stringstream strm ;
for( size_t i = 0; i < size(); ++ i ) {
TokenProxy & prox = *const_cast< TokenProxy *>( at(i).operator->() );
strm << prox.RegexName() ;
if( disp_all ) {
strm << "#" << static_cast<const std::string &>(prox);
}
strm << '+';
}
return strm.str();
}
void DumpTokVec(bool test_mode, section_t group_number, bool kml_mode) const {
if( test_mode )
{
// Just displays the regular expression name, for debugging.
std::string str( MiniDump(group_number) );
disp_range( str.begin(), str.end() );
}
else
{
DumpTotal(group_number, kml_mode);
}
}
};
private:
/// The index of the regular expression that this token uses.
int m_regex_idx;
/// Pointer to the chain of TokenProxy.
TokVec::Ptr m_container ;
/// Offset in the input buffer which indicates the end of what is parsed.
size_t m_offset_end ;
virtual bool Parse( const char * str ) = 0 ;
/* TODO: Output style.
10035 [Germany, 54ø32'N 009ø33'E SCHLESWIG]
11575 [manned] [cloud height:600-1000m] [visibility:25km]
42905 [cloud cover:4/8] [wind dir:290 deg, speed:5]
10066 [air temp:+6.6]
21022 [dew-point temp:-2.2]
30131 [pressure at station level:1013.1hPa]
40190 [pressure at sea level:1019.0hPa]
53014 [pressure:increasing rapidly] [change in 3h:1.4hPa]
69922 [precipitation:0.2mm during last 12 hours]
70181 [past wx: shower(s), cloud cover 1/2 of sky]
[wx now: Clouds generally dissolving or becoming less developed]
84801 [cloud info]
333 [section 3]
10094 [maximum temp:+9.4]
20029 [minimum temp:+2.9]
55307 81823 [clouds:1/8 or less, cumulus, 690m]
83633 [clouds:3/8, stratocumulus, 990m]
The method Append() will print the five-digits group.
Later on, duplicate and consecutive groups will be suppressed.
*/
void ItemAdd( const char * key, const char * value, const char * unit ) const {
Serializer::Instance()->AddItem( key, value, unit );
}
virtual void Print() const = 0 ;
virtual void DrawKml() const { Print() ; }
TokenProxy & operator=(const TokenProxy & );
protected:
void disp_arr(const char ** array,size_t arrsz,int idx,int offset,const char * title) const
{
/// It is a Synop convention that slashes mean no information.
if( idx == '/' ) return ;
size_t idx_array = idx - offset;
char buffer[64];
const char * val;
if( idx_array < arrsz )
val = array[idx_array];
else {
snprintf( buffer, sizeof(buffer),
_("Unknown index %d/%d/%d"), (int)idx, (int)idx_array, (int)arrsz );
val = buffer ;
}
Append( title, val );
}
TokenProxy() : m_regex_idx(-1), m_offset_end(0) {}
public:
virtual ~TokenProxy() {}
/// The boolean flag allows to search only in the current chain but also
/// in the previous ones backward. This could be faster by restricting
/// only to given section numbers.
template< class TokenDerived >
const TokenDerived * get_ptr(bool previous_chains) const ;
template< class TokenDerived >
static Ptr Generator( int rgx_idx, const std::string & wrd, size_t off ) {
TokenProxy * ptr = new TokenDerived ;
ptr->m_regex_idx = rgx_idx ;
static_cast< std::string & >(*ptr) = wrd ;
ptr->m_offset_end = off ;
return Ptr(ptr);
};
void Section( const char * key ) const {
Serializer::Instance()->StartSection( key );
}
static const bool tstDisp = false ;
template< class Val >
void Append( const char * key, const Val & val, const char * unit = NULL ) const
{
std::stringstream strm ;
strm << val ;
ItemAdd( key, strm.str().c_str(), unit );
}
void Append( const char * key, const std::string & val, const char * unit = NULL ) const
{
ItemAdd( key, val.c_str(), unit );
}
void Append( const char * key, const char * val, const char * unit = NULL ) const
{
ItemAdd( key, val, unit );
}
void Append( const char * key, double val, const char * unit = NULL ) const
{
char buf[20];
snprintf( buf, sizeof(buf), "%.1lf", val );
ItemAdd( key, buf, unit );
}
void Append( const char * key, int val, const char * unit = NULL ) const
{
char buf[12];
snprintf( buf, sizeof(buf), "%d", val );
ItemAdd( key, buf, unit );
}
/// This ensures that each token points to the chain containing it.
friend void PushItself( Ptr mySelf, TokVec::Ptr ptr ) {
mySelf->m_container = ptr ;
ptr->push_back( mySelf );
};
size_t offset_begin(void) const {
assert( m_offset_end >= size() );
return m_offset_end - size();
}
size_t offset_end(void) const { return m_offset_end; }
const char * RegexName(void) const ;
bool ParseItself(void) {
return Parse( c_str() );
}
/// It is dependent on the previous token.
// TODO: This should be explicitely dependent on a preceding regex.
virtual bool CanComeFirst(void) const { return true; }
}; // TokenProxy
typedef TokenProxy::Ptr (*ProxyGen)( int reg_idx, const std::string & wrd, size_t txt_offset);
/// Stores the regular expression associated to a Synop code,
/// plus a factory to create an object modelizing this code.
class RegexT : public WithRefCnt< RegexT >
{
const char * m_str ;
const char * m_name ;
regex_t m_regex ;
ProxyGen m_generator ;
priority_t m_priority ;
void treat_error(int stat) const {
char errbuf[512];
size_t lenbuf = snprintf( errbuf, sizeof(errbuf), "%s:", m_str );
regerror(stat, &m_regex, errbuf + lenbuf, sizeof(errbuf) - lenbuf );
throw std::runtime_error(errbuf);
}
RegexT();
RegexT(const RegexT &);
/// Token now just need an integer to point to their regular expression.
/// It is therefore very fast to create/copy a token.
typedef std::vector< const RegexT * > StorageT ;
/// Where we store all created and compiled regexes, indexed with an integer.
static StorageT & storage(void) {
static StorageT s_storage ;
return s_storage ;
}
public:
RegexT( const char * reg, const char * name, ProxyGen gener, priority_t priority )
: m_str(reg)
, m_name(name)
, m_generator(gener)
, m_priority(priority) {
char tmpbuf[ 3 + strlen(m_str) ];
snprintf( tmpbuf, sizeof(tmpbuf), "^%s$", m_str );
int stat = regcomp( &m_regex, tmpbuf, REG_EXTENDED|REG_NOSUB);
if(stat) treat_error(stat);
}
~RegexT() {
regfree( &m_regex );
}
/// Returns the regular expression given its index.
static const RegexT * Find(size_t idx ) {
assert( idx < Nb() );
return storage()[ idx ];
}
static size_t Nb(void) {
return RegexT::storage().size();
}
/// Given a regular expression patterns, creates and compile the regular expression and stores it with an integer.
static int CreateRgx( const char * reg, const char * name, ProxyGen gener, priority_t priority )
{
typedef std::map< const char *, int > Name2idxT ;
static Name2idxT name2idx ;
Name2idxT::iterator it = name2idx.find(name);
if( it != name2idx.end() ) return it->second ;
int new_idx = storage().size();
storage().push_back( new RegexT( reg, name, gener, priority ) );
// The name is later used for easier retrieval from a Synop token.
name2idx[ name ] = new_idx ;
return new_idx ;
};
static TokenProxy::Ptr CreateTokenProxy( int reg_idx, const std::string & wrd, size_t txt_offset ) {
return Find(reg_idx)->m_generator( reg_idx, wrd, txt_offset );
}
const char * Name(void) const { return m_name; }
static const char * Name(size_t idx) { return Find(idx)->m_name; }
// If two different tokens, with different regular expressions, match for the
// same word, the priority tells which one to take. Default value is one.
static priority_t Priority( size_t idx ) {
assert( idx < Nb() );
return storage()[ idx ]->m_priority;
}
bool Match( const std::string & str ) const {
int stat = regexec( &m_regex, str.c_str(), 0, 0, 0 );
switch(stat) {
case 0:
//std::cout << "DEBUG: Matched [" << str << "] with [" << m_str << "] (" << m_name << ")\n";
return true ;
case REG_NOMATCH:
// std::cout << "DEBUG: NoMatch [" << str << "] with [" << m_str << "]\n";
return false ;
default: break ;
}
treat_error(stat);
return 0 ; // Will never be reached.
}
/// Stores the match result for each regular expression.
class Context {
// First bit to store whether we tried to match. Next bit for the result.
std::vector<bool> m_flags ;
/// TODO: Consider a compile-time size because we know the number of regular expressions.
static size_t NbElts() { return RegexT::Nb(); };
public:
Context() : m_flags( NbElts() * 2, false ) {}
virtual ~Context() {}
// This helps performance because the same regex appears in several chains.
virtual bool Mtch( size_t reg_idx, const std::string & str ) {
assert( m_flags.size() == NbElts() * 2 );
assert( m_flags.size() > 2 * reg_idx + 1 );
if( m_flags.at( 2 * reg_idx ) ) return m_flags[ 2 * reg_idx + 1 ];
m_flags[ 2 * reg_idx ] = true ;
bool res = RegexT::Find(reg_idx)->Match( str );
m_flags[ 2 * reg_idx + 1 ] = res;
return res;
}
};
}; // RegexT
/// Loops in the tokens held by the container, for a precise type.
template< class TokenDerived >
const TokenDerived * TokenProxy::get_ptr(bool previous_chains) const
{
for(
TokVec::Ptr curr_container = m_container ;
curr_container ;
curr_container = curr_container->previous() )
{
for( TokVec::const_iterator it = curr_container->begin(), en = curr_container->end();
it != en ;
++it )
{
const TokenDerived * ptr = dynamic_cast< const TokenDerived * >( it->operator->() );
if( ptr != NULL ) return ptr ;
}
if( ! previous_chains ) break ;
}
return NULL ;
}
const char * TokenProxy::RegexName(void) const { return RegexT::Name(m_regex_idx); };
/// Transforms a token nickname into a classname, intentionaly small to reduce symbol table size.
#define CLASSTK(a) Tk_##a
/// Each Synop group (aka Token° is associated to a regular expression, and a priority.
#define GENTK_PRIORITY( TokDrv, Rgx, prio ) \
static int MakeRegex() { return RegexT::CreateRgx( Rgx, #TokDrv, TokenProxy::Generator< CLASSTK(TokDrv) >, prio ); }
/// TODO: It is not necessary to add "=" or ";" at the end of the regular expressions.
#define GENTK( TokDrv, Rgx ) GENTK_PRIORITY( TokDrv, Rgx, 1.0 )
/// Definition of a derived class associated to a five-digits group (Most of times) and a regular expression.
/// Virtual inheritance because it might derive from another TokenProxy derived class.
#define HEADTK(a) class CLASSTK(a) : virtual public TokenProxy
/// For defining chains of tokens. Some tokens might be repeated, hence TKn.
#define TKx(a) CLASSTK(a)::MakeRegex()
/// If this token appears once and once only.
#define TK1(a) {TKx(a),false}
/// If this token can be repeated.
#define TKn(a) {TKx(a),true}
/// One element in a chain of token which forms a Synop line.
struct TOKGEN {
int m_rgx_idx; // Index to a regular expression.
bool m_many; // If this token can be repeated or appears once only.
};
// ----------------------------------------------------------------------------
/// Matches the usual message begin.
HEADTK(ZCZC) {
public:
GENTK_PRIORITY( ZCZC, "ZCZC", MIN_PRIO )
bool Parse( const char * str )
{
return 0 == strcmp( str, "ZCZC" );
}
void Print() const {
Section( "Bulletin preamble" );
}
};
/// The id which might come after ZCZC.
HEADTK(ZCZC_id) {
int m_id ;
public:
GENTK( ZCZC_id, "[0-9]{2,4}" )
bool Parse( const char * str )
{
return 1 == sscanf( str, "%d", &m_id );
}
void Print() const {
Append( _("Report number"), m_id );
}
/// Can come only after ZCZC
bool CanComeFirst(void) const { return false ; }
};
/// Usual end of weather message.
HEADTK(NNNN) {
public:
GENTK_PRIORITY( NNNN, "NNNN", MIN_PRIO )
bool Parse( const char * str )
{
return 0 == strcmp( str, "NNNN" );
}
void Print() const {
Section( "Bulletin end" );
}
};
/// Any coding will work if we store two chars in an integer.
#define CHR2(x1,x2) (unsigned char)x1 * 256 + (unsigned char)x2
static const char * wx_code_to_txt( const char * strwx )
{
int two_chars = CHR2(strwx[0],strwx[1]);
switch( two_chars ) {
case CHR2('S','H'): return _("Synoptic ship reports");
case CHR2('S','I'): return _("Intermediate synoptic reports");
case CHR2('S','M'): return _("Synoptic observations");
case CHR2('S','N'): return _("Non-standard synoptic hour");
default : return NULL;
}
}
#undef CHR2
HEADTK(TTAAii) {
char m_datatype[3];
char m_geographical[3] ;
int m_number ;
public:
/**
SH:Synoptic ship reports
SI:Intermediate synoptic reports
SM:Synoptic observations
*/
GENTK( TTAAii, "S[HIMN][A-Z0-9]{2}[0-9]{2}" )
bool Parse( const char * str )
{
return 3 == sscanf( str, "%2s%2s%2d", m_datatype, m_geographical, &m_number );
}
void Print() const {
const char * dt_type = wx_code_to_txt(m_datatype);
if(dt_type) {
Append(_("Data type"), dt_type );
} else {
std::stringstream strm ;
strm << _("Unknown") << ':' << m_datatype << '.';
Append(_("WX data type"), strm.str() );
}
Append(_("Geographical"), m_geographical );
const char * num = NULL ;
switch( m_number ) {
case 1 ... 19 : num = _("Inclusive for global distribution"); break;
case 20 ... 39 : num = _("Inclusive for regional and interregional distribution"); break;
case 40 ... 89 : num = _("Inclusive for national and bilaterally agreed distribution"); break;
default : num = _("Reserved"); break;
}
Append(_("Number"), num );
}
};
/// ICAO location. Found in document 7910.
/// Or here: http://www.wmo.int/pages/prog/www/ois/Operational_Information/VolumeC1/CCCC_en.html
/// http://weather.rap.ucar.edu/surface/stations.txt
/// ftp://www.wmo.ch/wmo-ddbs/OperationalInfo/VolumeC1/To_WMO/
HEADTK(CCCC) {
char m_icao[5];
public:
GENTK( CCCC, "[A-Z]{4}" )
/// All these comparisons, because there might be confusion with other four-letters groups.
bool Parse( const char * str )
{
return 1 == sscanf( str, "%4s", m_icao )
&& strcmp( m_icao, "AAXX" )
&& strcmp( m_icao, "BBXX" )
&& strcmp( m_icao, "OOXX" )
&& strcmp( m_icao, "ZCZC" )
&& strcmp( m_icao, "NNNN" );
}
/// TODO: Lookup in wmo file.
void Print() const {
Append( _("ICAO indicator"), m_icao );
}
};
static std::string hour_min( int hour, int min ) {
char buf[10];
snprintf( buf, sizeof(buf), "%02d:%02d", hour, min );
return buf ;
}
HEADTK(YYGGgg) {
/// Default date is today.
time_t m_time;
public:
GENTK( YYGGgg, "[0-3][0-9][0-2][0-9][0-5][0-9]" )
bool Parse( const char * str )
{
int day_of_month ;
int UTC_observation_hour ;
int UTC_observation_minute ;
bool time_ok = ( 3 == sscanf( str, "%02d%02d%02d", &day_of_month, &UTC_observation_hour, &UTC_observation_minute ) );
time_ok = time_ok && ( day_of_month <= 31 ) && ( UTC_observation_hour <= 24 ) && ( UTC_observation_minute <= 59 );
if( ! time_ok ) return false ;
m_time = DayHourMin2Tm( day_of_month, UTC_observation_hour, UTC_observation_minute );
return true ;
}
void Print() const {
Append( _("UTC observation time"), Tm2SynopTime( m_time ) );
}
/// Does not display anything because all the information is in the UTC time stamp.
void DrawKml() const {}
time_t ObservationTimeUTC() const { return m_time ; }
};
/** BBB Forms
The four forms of the BBB indicator group are:
* RRx - Delayed (Retard)
* CCx - Correction
* AAx - Amendment
* Pxx - Segment number
*
*/
HEADTK(Numbered) {
const char * m_format ;
char m_number[3];
public:
CLASSTK(Numbered)( const char * fmt ) : m_format(fmt) {};
void Print() const {
Append( _("Segment number"), m_number );
}
bool Parse( const char * str )
{
return 1 == sscanf( str, m_format, m_number );
}
const char * Number() const { return m_number ; }
};
HEADTK(RRx), virtual CLASSTK(Numbered) {
public:
/** http://www.wmo.int/pages/prog/www/ois/Operational_Information/Publications/WMO_386/AHLsymbols/bbb_en.html
"x=A for the first bulletin after the issuance of the initial bulletin;
B, if another bulletin needs to be issued;
and so on up to and including x = X; "
This seems to be wrong, actually messages up to Y and Z are seen.
GENTK( RRx, "RR[A-X]" )
*/
GENTK( RRx, "RR[A-Z]" )
CLASSTK(RRx)() : CLASSTK(Numbered)( "RR%1s" ) {}
};
HEADTK(CCx), virtual CLASSTK(Numbered) {
public:
GENTK( CCx, "CC[A-X]" )
CLASSTK(CCx)() : CLASSTK(Numbered)( "CC%1s" ) {}
};
HEADTK(AAx), virtual CLASSTK(Numbered) {
public:
GENTK( AAx, "AA[A-X]" )
CLASSTK(AAx)() : CLASSTK(Numbered)( "AA%1s" ) {}
};
/// Pxx is the segmentation BBB group as defined in the WMO document Guidelines For The Use Of The Indicator BBB
HEADTK(Pxx), virtual CLASSTK(Numbered) {
public:
/// Details here: http://www.nws.noaa.gov/tg/bbb.php
GENTK( Pxx, "P[A-Z]{2}" )
CLASSTK(Pxx)() : CLASSTK(Numbered)( "P%2s" ) {}
};
/// ISMCS WMO STATION NUMBER LIST
/// http://www.ncdc.noaa.gov/oa/climate/rcsg/cdrom/ismcs/alphanum.html
/// http://www.weather.unisys.com/wxp/Appendices
/// http://weather.unisys.com/wxp/Appendices/Formats/SYNOP.html
/// 000 Group - Identification and Location
///
/// IIiii The WMO number of the station.
HEADTK(IIiii) {
int m_wmo_indicator ;
int m_region_number ;
const char * m_region_name ;
public:
GENTK( IIiii, "[0-9]{5}" )
// GENTK( IIiii, "[0-9]{5}", MIN_PRIO )
/**
The IIiii Structure
The II or block number is allocated to the services within each Region by regional agreement.
Station numbers iii corresponding to a common block number (II)
except 89 are usually distributed so that the zone covered by a
block number is divided into horizontal strips; e.g. one of several
degrees of latitude. Where possible, station numbers within each strip increase
from west to east and the first figure of the 3-figure station number increases from north to south.
Station index numbers for station in the Antarctic are allocated by the Secretary-General
in accordance with the following scheme:
Each station has an international number 89xxy, where xx indicated the nearest 10 degree
meridian which is numerically lower than the station longitude. For east longitudes,
50 is added; e.g. 89124 indicated a station between 120 degrees and 130 degrees west
and 89654 indicates a station between longitudes 150 degrees and 160 degrees east.
The figure "y" is allocated roughly according to the latitude of the station
with "y" increasing towards the south.
For station for which an international numbers are no longer available within the
above scheme, the algorithm will be expanded by adding 20 to xx for west longitudes
(range of index numbers 200-380) and 70 for east longitudes (range of index numbers 700-880)
to provide new index numbers.
Antarctic station which held numbers before the introduction of this scheme in 1957
retain their previously allocated index numbers.
*/
bool Parse( const char * str )
{
// std::cout << "wmo=" << str << "\n";
/* Station index numbers consisting of one figure repeated five times, e.g. 55555, 77777, etc.,
or ending with 0000 or 9999, or duplicating special code indicators, e.g. 10001, 77744, 19191,
89998, etc., are not assigned to meteorological stations. We might check if the code exists or not. */
if( 1 != sscanf( str, "%d", &m_wmo_indicator ) ) return false ;
m_region_name = "";
m_region_number = 0 ;
// http://weather.noaa.gov/tg/site.shtml
switch(m_wmo_indicator) {
case 00000:
case 11111:
case 22222:
case 33333:
case 44444:
case 55555:
case 66666:
case 77777:
case 88888:
case 99999: m_region_name = _("Unassigned");
return false ;
default : break ;
}
/// More special codes.
switch(m_wmo_indicator%10000) {
case 0000:
case 9999: return false ;
default : break ;
}
switch(m_wmo_indicator) {
case 60000 ... 69999:
m_region_name = _("Africa");
m_region_number = 1 ;
break;
case 20000 ... 20099:
case 20200 ... 21999:
case 23000 ... 25999:
case 28000 ... 32999:
case 35000 ... 36999:
case 38000 ... 39999:
case 40350 ... 48599:
case 48800 ... 49999:
case 50000 ... 59999:
m_region_name = _("Asia");
m_region_number = 2 ;
break;
case 80000 ... 88999:
m_region_name = _("South America");
m_region_number = 3 ;
break;
case 70000 ... 79999:
m_region_name = _("North and Central America");
m_region_number = 4 ;
break;
case 48600 ... 48799:
case 90000 ... 98999:
m_region_name = _("South-West Pacific");
m_region_number = 5 ;
break;
case 00000 ... 19999:
case 20100 ... 20199:
case 22000 ... 22999:
case 26000 ... 27999:
case 33000 ... 34999:
case 37000 ... 37999:
case 40000 ... 40349:
m_region_name = _("Europe");
m_region_number = 6 ;
break;
case 89000 ... 89999:
m_region_name = _("Antarctic");
m_region_number = 9 ;
break;
}
/* NOT SURE THIS IS REALLY USEFUL <<<<<<<<<<<================== */
// std::cout << "region=" << m_region_name << "\n";
return true ;
}
/// Huge list: http://www.ncdc.noaa.gov/oa/climate/rcsg/cdrom/ismcs/alphanum.html
int WmoIndicator(void) const { return m_wmo_indicator; }
/// Official file: http://weather.noaa.gov/data/nsd_bbsss.txt
void Print() const {
std::stringstream strm ;
strm << std::setfill('0') << std::setw(5) << m_wmo_indicator ;
std::string wmo_str = strm.str();
Append( _("WMO Station"), wmo_str );
const RecordWmoStation * ptrWmo = CatalogWmoStations::FindFromKey( m_wmo_indicator );
if( ptrWmo )
Append( _("WMO station"), *ptrWmo );
else {
Append( _("WMO station"), "WMO_" + wmo_str );
}
}
void DrawKml() const {}
};
HEADTK(AAXX) {
public:
GENTK( AAXX, "AAXX" )
bool Parse( const char * str )
{
return 0 == strcmp( str, "AAXX" );
}
void Print() const {
Section( _("Land station observation") );
}
};
/// SHIP report.
HEADTK(BBXX) {
public:
GENTK( BBXX, "BBXX" )
bool Parse( const char * str )
{
return 0 == strcmp( str, "BBXX" );
}
void Print() const {
Section( _("Ship observation") );
}
};
/// SYNOP MOBILE.
HEADTK(OOXX) {
public:
GENTK( OOXX, "OOXX" )
bool Parse( const char * str )
{
return 0 == strcmp( str, "OOXX" );
}
void Print() const {
Section( _("Mobile observation") );
}
};
/// http://metaf2xml.sourceforge.net/parser.pm.html#trends
HEADTK(MMMULaULo) {
/// See decoding here: http://icoads.noaa.gov/Release_1/suppG.html
int m_Marsden_square ;
double m_latitude;
double m_longitude;
public:
/// Lower priority because it should not be selected against any other chain beginning.
GENTK_PRIORITY( MMMULaULo, "[0-9/]{5}", 0.5 )
/// TODO: Marsden square was not tested enough.
bool Parse( const char * str )
{
m_Marsden_square = -1;
m_latitude = 0.0 ;
m_longitude = 0.0 ;
if( 0 == strncmp( str, "/////", 5 ) ) return true ;
// Only slashes or no slash at all.
if ( NULL != strchr( str, '/' ) ) return false ;
char char_lat ;
char char_lon ;
if ( 3 != sscanf( str, "%3d%c%c", &m_Marsden_square, &char_lat, &char_lon ) ) return false;
m_latitude = 90.0 - ( m_Marsden_square / 36.0 ) ;
m_longitude = ( m_Marsden_square % 36 ) - 30.0 ;
m_latitude += char_lat - '0' ;
m_longitude += char_lon - '0' ;
/// East longitude is positive, West is negative.
return true;
}
void Print() const {
/// Very approximate.
if( m_Marsden_square > 0 ) {
Append( _("Marsden latitude"), m_latitude );
Append( _("Marsden longitude"), m_longitude );
} else {
Append( _("Coordinates"), _("Marsden square not defined") );
}
}
bool MarsdenValid(void) const { return m_Marsden_square >= 0; }
double Latitude(void) const {
assert( MarsdenValid() );
return m_latitude;
}
double Longitude(void) const {
assert( MarsdenValid() );
return m_longitude;
}
bool CanComeFirst(void) const { return false ; }
};
/// Position of the station (Marsden square, height)
/// http://metaf2xml.sourceforge.net/parser.pm.html#trends
/// h0h0h0h0im elevation of mobile land station, units of elevation, and elevation accuracy
/// h0hoh0h0 elevation if meters or feet as indicated by im
/// im indicator for units of elevation and confidence factor of accuracy
HEADTK(h0h0h0h0im) {
/// See decoding here: http://icoads.noaa.gov/Release_1/suppG.html
int m_height ;
char m_indicator ;
public:
GENTK( h0h0h0h0im, "[0-9/]{4}[1-8]" )
bool Parse( const char * str )
{
m_height = 0;
m_indicator = '0';
return ( 2 == sscanf( str, "%4d%c", &m_height, &m_indicator ) );
}
void Print() const {
const char * unit = "";
switch(m_indicator) {
case '1' ... '4' : unit = Unit_meters; break;
case '5' ... '8' : unit = Unit_feet; break;
default: ;
}
Append( _("Height"), m_height, unit );
const char * indicators[] = {
_("Not Used"),
_("Excellent (within 3 meters)"),
_("Good (within 10 meters)"),
_("Fair (within 20 meters)"),
_("Poor (more than 20 meters)"),
_("Excellent (within 10 feet)"),
_("Good (within 30 feet)"),
_("Fair (within 60 feet)"),
_("Poor (more than 60 feet)") };
disp_arr(indicators,G_N_ELEMENTS(indicators),m_indicator,'0',_("Precision"));
}
/// It is dependent on the previous token, MMMUL.
bool CanComeFirst(void) const { return false ; }
};
/// NIL
HEADTK(NIL) {
public:
GENTK( NIL, "NIL[;=]?" )
bool Parse( const char * str )
{
return 0 == strncmp( str, "NIL", 3 );
}
void Print() const {
Append( _("Token"), _("End of section") );
}
void DrawKml() const {}
};
/// Ship or Buoy Observations: IIIII The ship or buoy identifier
HEADTK(IIIII) {
static const size_t maxsz = 20 ;
char m_ship_buoy_identifier[maxsz] ;
public:
GENTK( IIIII, "[A-Z0-9]{3,9}" )
/// We filter some identifiers.
bool Parse( const char * str )
{
// If this is a five-digits string, it cannot reasonably be an identifier.
if( ( 5 == strlen( str ) ) &&
( 5 == strspn( str, "0123456789" ) ) ) {
return false ;
}
/// Due to parsing error, we might take the next group header (333 or 555) as a ship name.
bool resu =
( 1 == sscanf( str, "%9s", m_ship_buoy_identifier ) )
&& ( strcmp( m_ship_buoy_identifier, "333" ) )
&& ( strcmp( m_ship_buoy_identifier, "555" ) );
if( resu ) {
// Some ships are apparently anonymous, we give them an unique name.
if( 0 == strcmp( "SHIP", m_ship_buoy_identifier ) ) {
static int ship_counter = 0 ;
++ship_counter ;
snprintf( m_ship_buoy_identifier, sizeof(m_ship_buoy_identifier),
"SHIP_%d", ship_counter );
}
} else {
m_ship_buoy_identifier[0] = '\0';
}
return resu;
}
void Print() const {
Append( _("Ship/Buoy identifier"), m_ship_buoy_identifier );
}
void DrawKml() const {}
/// Information about buoys:
/// http://www.ndbc.noaa.gov/marine_notice.shtml
/// http://www.ndbc.noaa.gov/stndesc.shtml
/// http://www.hpc.ncep.noaa.gov/html/stationplot_buoy.shtml
const char * ShipIdentifier(void) const { return m_ship_buoy_identifier; }
};
/// ff -- wind speed in units determined by wind type indicator (see above)
static const choice< char > wind_speed_units[] = {
{ '0',_("m/s (Estimated)") },
{ '1',_("m/s (Anemometer)") },
{ '3',_("knots (Estimated)") },
{ '4',_("knots (Anemometer)") } };
FM12CodeTable( wind_speed_units, 1855, _("Indicator for source and units of wind speed") );
/// Apparently one can also find YYGGggi:
/// YY -- Monatstag (UTC)
/// GG -- Beobachtungszeit (UTC) in vollen Stunden
/// gg -- Beobachtungszeit in Minuten (wird nur bei Halbstundenterminen benutzt: gg = 30)
/// iw -- Indikator für Windangaben:
/// YYGGi
/// YY -- The day of the month
/// GG -- The hour of the observation (UTC)
/// iw -- Wind type indicator
/// For more safety, we could search today's date only, but testing is more difficult.
HEADTK(YYGGi) {
time_t m_time;
char m_wind_type_indicator ;
public:
GENTK( YYGGi, "[0-3][0-9][0-2][0-9][0134]" )
bool Parse( const char * str )
{
int day_of_month;
int UTC_observation_hour;
if ( 3 != sscanf( str, "%02d%02d%c",
&day_of_month,
&UTC_observation_hour,
&m_wind_type_indicator ) ) return false ;
if ( ( day_of_month > 31 )
|| ( day_of_month < 1 )
|| ( UTC_observation_hour > 24 )
|| ( NULL == strchr( "0134", m_wind_type_indicator ) ) ) return false;
// std::cout << __FUNCTION__ << ":" << UTC_observation_hour << " " << day_of_month << "\n";
m_time = DayHourMin2Tm( day_of_month, UTC_observation_hour, 0 );
return true;
}
void Print() const {
Append( _("UTC observation time"), Tm2SynopTime( m_time ) );
// No need to display it twice because it will appear after the speed value.
if( tstDisp ) {
Append( _("Wind type indicator"),
choice_map( wind_speed_units, G_N_ELEMENTS( wind_speed_units ),
m_wind_type_indicator, _("Unknown speed unit type") ) );
}
}
/// Does not display anything because all the information is displayed later.
void DrawKml() const {}
time_t ObservationTimeUTC() const { return m_time ; }
friend class CLASSTK(Nddff);
};
/// 99LLL QLLLL
/// LLL -- Latitude of observation to .1 degrees
/// Q -- Quadrant of observation
HEADTK(99LLL) {
int m_latit_10deg ;
public:
GENTK( 99LLL, "99[0-9]{3}" )
bool Parse( const char * str )
{
// The latitude starts at the third char, after "99".
if ( 1 != sscanf( str + 2, "%d", &m_latit_10deg ) ) return false;
// Latitudes are between 0 and 90 degrees.
return ( m_latit_10deg <= 900 );
}
void Print() const {
Append( _("QLLLL token"), _("Present") );
}
/// Does not display anything because all the information is displayed later as coordinates.
void DrawKml() const {}
/// It is dependent on the previous token.
bool CanComeFirst(void) const { return false ; }
friend class CLASSTK(QLLLL);
};
/// LLLL -- Longitude of observation to .1 degrees
HEADTK(QLLLL) {
char m_quadrant ;
int m_longit_10deg ;
mutable bool m_calc_done ;
mutable bool m_coordinates_ok ;
mutable double m_Longitude ;
mutable double m_Latitude ;
/// Can be called only once this token is inserted in a group.
void Calc(void) const {
if( m_calc_done ) return ;
m_calc_done = true ;
const CLASSTK(99LLL) * ptr_99LLL = TokenProxy::get_ptr< CLASSTK(99LLL) >(false);
if( ptr_99LLL ) {
m_Longitude = 0.0;
m_Latitude = 0.0;
m_coordinates_ok = false ;
}
double lat = ptr_99LLL ? (double)ptr_99LLL->m_latit_10deg * 0.1 : 0.0 ;
double lon = (double)m_longit_10deg * 0.1 ;
m_coordinates_ok = true ;
// East longitude and north latitude are positive.
switch( m_quadrant ) {
case '1': break ; // North-East
case '3': lat = -lat; break ; // South-East
case '5': lon = -lon; lat = -lat; break ; // South-West
case '7': lon = -lon; break ; // North-West
default : m_coordinates_ok = false; break;
}
m_Longitude = lon;
m_Latitude = lat;
}
public:
CLASSTK(QLLLL) () : m_calc_done(false), m_coordinates_ok(false) {}
GENTK( QLLLL, "[1357][0-9]{4}" )
bool Parse( const char * str )
{
// Check that longitude is smaller than 180 in tenth of degrees.
return ( 2 == sscanf( str, "%c%d", &m_quadrant, &m_longit_10deg ) )
&& ( m_longit_10deg <= 1800 );
}
void Print() const {
Calc();
if(m_coordinates_ok) {
Append( _("Longitude"), m_Longitude );
Append( _("Latitude"), m_Latitude );
} else {
Append( _("Coordinates"), _("Wrong coordinates format") );
}
}
/// Does not display anything because all the information is displayed as coordinates.
void DrawKml() const {}
bool CanComeFirst(void) const { return false ; }
const bool CoordinatesOK() const { return m_coordinates_ok; }
double Longitude() const {
Calc();
assert( m_coordinates_ok );
return m_Longitude;
}
double Latitude () const {
Calc();
assert( m_coordinates_ok );
return m_Latitude ;
}
};
static const char * cloud_bases[]= {
_("0 to 50 m"),
_("50 to 100 m"),
_("100 to 200 m"),
_("200 to 300 m"),
_("300 to 600 m"),
_("600 to 1000 m"),
_("1000 to 1500 m"),
_("1500 to 2000 m"),
_("2000 to 2500 m"),
_("above 2500 m"),
_("unknown") };
FM12CodeTable( cloud_bases, 1600, _("Height above surface of the base of the lowest cloud seen") );
/// 111 Group - Land Observations
/// Apparently there are differences between FM12 and FM13X which is more recent.
/// iihVV
HEADTK(iihVV) {
char m_precipitation ;
char m_station_type ;
char m_cloud_base ;
int m_visibility ;
public:
GENTK( iihVV, "[0-4][1-7][0-9/][0-9/]{2}" )
bool Parse( const char * str )
{
// TODO; Frequently mismatched with "222//" . Should add a special case.
int nbMtch = sscanf( str, "%c%c%c%d", &m_precipitation, &m_station_type, &m_cloud_base, &m_visibility );
// "46///" is a valid string.
// std::cout << __FUNCTION__ << ":" << str << " " << nbMtch << "\n";
switch(nbMtch) {
case 4 : return true ;
case 3 : m_visibility = -1; // i.e. "missing"
return 0 == strcmp( str + 3, "//" );
default: return false ;
}
}
bool isAutomated(void) const {
switch( m_station_type ) {
default : return false ;
case '4':
case '5':
case '6':
case '7': return true;
}
}
void Print() const {
/// iR -- Precipitation indicator
static const char * precipitations[] = {
_("In groups 1 and 3"),
_("In group 1 only"),
_("In group 3 only"),
_("Omitted, no precipitation"),
_("Omitted, no observation") };
FM12CodeTable( precipitations, 1819, _("Indicator for inclusion or mossion of precipitation data") );
disp_arr(precipitations,G_N_ELEMENTS(precipitations),m_precipitation,'0',_("Precipitations"));
/// ix -- Station type and present and past weather indicator. Tells if the group 7WW is included.
static const char * station_types[] = {
_("Manned station (With 7WW)"),
_("Manned station. Not significant (No 7WW)"),
_("Manned station. No observation (No 7WW)"),
_("Automated station (With 7WW)"),
_("Automated station. Not significant (No 7WW)"),
_("Automated station. No observation (No 7WW)"),
_("Automated station (With 7WW)") };
FM12CodeTable( stations_types, 1860, _("Indicator for type of station operation and for present and past weather data") );
disp_arr(station_types,G_N_ELEMENTS(station_types),m_station_type,'1',_("Station type"));
/// h -- Cloud base of lowest cloud seen (meters above ground)
disp_arr(cloud_bases,G_N_ELEMENTS(cloud_bases),m_cloud_base,'0',_("Cloud base"));
/// VV -- Visibility
const char *vis = _("Visibility");
switch( m_visibility ) {
case 0 : Append( vis, _("Less than 0.1"), Unit_km ); break ;
case 1 ...50 : Append( vis, m_visibility / 10, Unit_km ); break ;
case 51 ...79 : Append( vis, m_visibility - 50, Unit_km ); break ;
case 80 ...88 : Append( vis, 30 + 5 * ( m_visibility - 80 ), Unit_km ); break ;
case 89 : Append( vis, _("Greater than 70"), Unit_km ); break;
case 90 : Append( vis, _("Less than 0.05"), Unit_km ); break;
case 91 : Append( vis, 0.05, Unit_km ); break;
case 92 : Append( vis, 0.2, Unit_km ); break;
case 93 : Append( vis, 0.5, Unit_km ); break;
case 94 : Append( vis, 1, Unit_km ); break;
case 95 : Append( vis, 2, Unit_km ); break;
case 96 : Append( vis, 4, Unit_km ); break;
case 97 : Append( vis, 10, Unit_km ); break;
case 98 : Append( vis, 20, Unit_km ); break;
case 99 : Append( vis, _("Greater than 50"), Unit_km ); break;
default : Append( vis, _("Missing") ); break;
}
}
};
/// TODO: Use these graphic symbols: http://www.hpc.ncep.noaa.gov/html/stationplot_buoy.shtml
static const char * cloud_covers[]= {
_("0 eighths (clear)"),
_("1/8"),
_("2/8"),
_("3/8"),
_("4/8"),
_("5/8"),
_("6/8"),
_("7/8"),
_("8/8 (overcast)"),
_("Sky obscured"),
_("No observation") };
FM12CodeTable( cloud_covers, 2700, _("Amount of cloud cover") );
/// Nddff
HEADTK(Nddff) {
char m_cloud_cover ;
/// In ten of degrees.
int m_wind_direction ;
int m_wind_speed ;
public:
GENTK( Nddff, "[0-9/][0-9/]{2}[0-9/]{2}" )
bool Parse( const char * str )
{
m_cloud_cover = '/';
m_wind_direction = 0;
m_wind_speed = 0 ;
// Can be "/////" or "8////" plus trailing characters.
if ( 0 == strncmp( str + 1, "////", 4) ) return true ;
return ( 3 == sscanf( str, "%c%2d%2d", &m_cloud_cover, &m_wind_direction, &m_wind_speed ) )
&& ( ( m_wind_direction <= 36 ) || ( m_wind_direction == 99 ) );
}
void Print() const {
// N -- Total cloud cover
disp_arr(cloud_covers,G_N_ELEMENTS(cloud_covers),m_cloud_cover,'0',_("Cloud cover"));
// dd -- wind direction in 10s of degrees
if( m_wind_direction == 99 )
Append( _("Wind direction"), _("Variable, all directions, confused, indeterminate direction") );
else if( m_wind_direction == 0 )
Append( _("Wind direction"), _("No motion or no waves") );
else
Append( _("Wind direction"), m_wind_direction * 10 - 5 , Unit_degrees );
FM12CodeTable( xxx, 0877, _("True direction in tenth of degrees") );
// We search for this token not only in this section but in the previous ones.
const CLASSTK(YYGGi) * ptr_YYGGi = TokenProxy::get_ptr< CLASSTK(YYGGi) >(true);
const char * wind_speed_title = _("Wind speed");
if( ptr_YYGGi ) {
Append( wind_speed_title, m_wind_speed,
choice_map( wind_speed_units, G_N_ELEMENTS( wind_speed_units ),
ptr_YYGGi->m_wind_type_indicator, _("Unknown speed unit type") ) );
} else {
Append( wind_speed_title, m_wind_speed, _("No unit (YYGGi missing)") );
}
}
bool CanComeFirst(void) const { return false ; }
};
/// 00fff (optional)
HEADTK(00fff) {
int m_wind_speed ;
public:
/// Lower priority than Nddff
GENTK_PRIORITY( 00fff, "00[0-9]{3}", 0.5 )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "00%3d", &m_wind_speed ) );
}
void Print() const {
// fff -- wind speed if value greater than 100
Append( _("Wind speed"), m_wind_speed );
}
};
/// Returns true if this temperature makes sense.
static bool CheckCelsius( char sign, int temperature_tenth )
{
switch( sign ) {
case '1' : return temperature_tenth < 700 ;
case '0' : return temperature_tenth < 600 ;
case '/' : return true ;
default : return false ;
}
}
/// Prints the temperature or relative humidity.
static void AppCelsius( const TokenProxy * ptrTok, const char * title, char sign, int temperature_tenth )
{
if( title == NULL ) title = "No title";
switch( sign ) {
case '1' : temperature_tenth = -temperature_tenth ;
case '0' : ptrTok->Append( title, temperature_tenth * 0.10, Unit_Celsius );
break;
case '9' : ptrTok->Append( _("Relative humidity"), (double)temperature_tenth * 0.10 , "%" );
break;
case '/' : ptrTok->Append( title, _("Undefined") );
break;
default : ptrTok->Append( title, _("Unexpected case") );
break;
}
}
/// 1sTTT_air -- Temperature
HEADTK(1sTTT_air) {
char m_temperature_sign ;
int m_temperature ;
public:
GENTK( 1sTTT_air, "1[01/][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
m_temperature_sign = '/';
m_temperature = 0;
if( 0 == strncmp( str, "1////", 5 ) ) return true ;
return ( 2 == sscanf( str, "1%c%3d", &m_temperature_sign, &m_temperature) )
&& ( strchr( "01", m_temperature_sign ) != NULL )
&& CheckCelsius( m_temperature_sign, m_temperature );
}
/// s: sign of temperature (0=positive, 1=negative). TTT: Temperature in .1 C
void Print() const {
AppCelsius( this, _("Temperature"), m_temperature_sign, m_temperature );
}
};
/// 2sTTT_dew -- Dewpoint
HEADTK(2sTTT_dew) {
char m_temperature_sign ;
int m_temperature ;
public:
GENTK( 2sTTT_dew, "2[019/][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
m_temperature = 0;
int nbMtch = sscanf( str, "2%c%3d", &m_temperature_sign, &m_temperature);
switch( nbMtch) {
case 0 : return false;
case 1 : return 0 == strcmp( str + 1, "////" );
// Temperature check does not apply if humidity.
case 2 : return ( m_temperature_sign == '9' ) || CheckCelsius( m_temperature_sign, m_temperature );
default: return false;
}
}
/// TTT -- Dewpoint temperature in .1 C (if sign is 9, TTT is relative humidity)
void Print() const {
// s -- sign of temperature (0=positive, 1=negative, 9 = Relative humidity)
AppCelsius( this, _("Dewpoint temperature"), m_temperature_sign, m_temperature );
}
};
/// Station pressure in 0.1 mb (thousandths digit omitted, last digit can be slash, then pressure in full mb)
static void thousands_omitted( const TokenProxy * ptrTok, const char * pressure, const char * title )
{
char buf[7];
int idx = 0 ;
if( pressure[0] == '0' ) buf[idx++] = '1' ;
strcpy( buf + idx, pressure );
char *slashpos = strchr( buf, '/' );
if( slashpos != NULL ) *slashpos = '0' ;
double tmpPres ;
// Checks reasonable values for a pressure.
if( ( 1 != sscanf( buf, "%lf", &tmpPres ) )
|| ( tmpPres > 12000 )
|| ( tmpPres < 7000 ) ) {
ptrTok->Append( title, _("Inconsistent:") + std::string(pressure) );
} else {
ptrTok->Append( title, (int)( tmpPres / 10.0 ), Unit_hPa );
}
};
/// 3PPPP -- Station pressure in 0.1 mb (thousandths digit omitted, last digit can be slash, then pressure in full mb)
HEADTK(3PPPP) {
char m_station_pressure[5];
public:
GENTK( 3PPPP, "3[0789/][0-9/]{3}" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "3%s", m_station_pressure ) );
}
void Print() const {
thousands_omitted( this, m_station_pressure, _("Station pressure") );
}
};
/** 4PPPP -- Sea level pressure in 0.1 mb (thousandths digit omitted, last digit can be slash, then pressure in full mb)
Can be as well 4ahhh http://metaf2xml.sourceforge.net/parser.pm.html :
a3 Isobaric surface (CT 0264), hhh Geopotential of isobaric surface
*/
HEADTK(4PPPP) {
bool m_4PPPP ;
char m_sea_level_pressure[5];
char m_isobaric_surface ;
int m_geopotential ;
public:
GENTK( 4PPPP, "4[0912378/][0-9/]{3}" )
bool Parse( const char * str )
{
m_4PPPP = false;
m_sea_level_pressure[0] = '\0';
m_isobaric_surface = '/';
m_geopotential = -1;
switch( str[1] ) {
case '0':
case '9': m_4PPPP = true ;
return ( 1 == sscanf( str, "4%s", m_sea_level_pressure ) );
case '1':
case '2':
case '3':
case '7':
case '8': m_4PPPP = false ;
return ( 2 == sscanf( str, "4%c%3d", &m_isobaric_surface, &m_geopotential ) );
case '/': m_4PPPP = true ;
return ( 0 == strcmp( str, "4////" ) );
default : return false ;
}
}
void Print() const {
if(m_4PPPP) {
thousands_omitted( this, m_sea_level_pressure, _("Sea level pressure") );
} else {
int iso_surf = 0 ;
switch( m_isobaric_surface ) {
case '1': iso_surf = 1000; break; // 100 meters.
case '2': iso_surf = 925; break; // 800 meters.
case '3': iso_surf = 500; break; // 5000 meters
case '7': iso_surf = 700; break; // 3000 meters
case '8': iso_surf = 850; break; // 1500 meters.
default : break ;
}
FM12CodeTable( xxx, 0264, _("Standard Isobaric surface for which the geopotential is reported") );
Append( _("Isobaric surface"), iso_surf, Unit_hPa );
}
}
};
/// 4ahhh -- Geopotential of nearest mandatory pressure level
HEADTK(4ahhh) {
char m_mandatory_pressure_level ;
char m_geopotential_height[4] ;
public:
GENTK( 4ahhh, "4[12579][0-9]{3}" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "4%c%s", &m_mandatory_pressure_level, m_geopotential_height ) );
}
void Print() const {
/// a3 -- mandatory pressure level
static const choice< char > mandatory_pressure_levels[] = {
{ '1', "1000" },
{ '2', "925" },
{ '5', "500" },
{ '7', "700" },
{ '8', "850" } };
Append( _("Mandatory pressure level"),
choice_map( mandatory_pressure_levels, G_N_ELEMENTS( mandatory_pressure_levels ),
m_mandatory_pressure_level, _("Unknown mandatory pressure level") ),
_("millibar") );
/// hhh -- geopotential height omitting thousandths digit
thousands_omitted( this, m_geopotential_height, _("Geopotential height") );
}
};
/// 5appp -- Pressure tendency over 3 hours
HEADTK(5appp) {
char m_pressure_tendency ;
int m_pressure_change ;
public:
GENTK( 5appp, "5[0-8/][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
// std::cout << "str=" << str << "\n";
int nbMtch = sscanf( str, "5%c%d", &m_pressure_tendency, &m_pressure_change );
switch( nbMtch ) {
case 0 : return false;
case 1 : return 0 == strcmp( str, "5////");
case 2 : return true;
default: return false;
}
}
/// Symbols associated to each value: http://www.hpc.ncep.noaa.gov/html/stationplot_buoy.shtml
void Print() const {
/// a -- characteristics of pressure tendency
static const char * pressure_tendencies[] = {
_("Increasing, then decreasing. Same or higher"),
_("Increasing, then steady. Raises"),
_("Increasing steadily. Raises"),
_("Decreasing or steady, then increasing. Raises"),
_("Steady. Resultant same"),
_("Decreasing, then increasing. Lowers"),
_("Decreasing, then steady. Lowers"),
_("Decreasing steadily. Lowers"),
_("Increasing or steady, then decreasing. Lowers") };
FM12CodeTable( pressure_tendencies, 0200, _("Characteristics of pressure tendency during three last hours") );
disp_arr(pressure_tendencies,G_N_ELEMENTS(pressure_tendencies),m_pressure_tendency,'0',_("Pressure tendency"));
/// ppp -- 3 hour pressure change in 0.1 mb
if( m_pressure_tendency == '/' ) {
Append( _("Pressure change"), _("Not specified") );
} else {
Append( _("Pressure change"), m_pressure_change / 10.0, Unit_hPa );
}
}
};
static void display_precipitation( const TokenProxy * ptrTok, char precipitation_duration )
{
int nb_hours ;
/// This could be replaced by a table like the other codes tables.
switch( precipitation_duration ) {
case '1': nb_hours = 6; break;
case '2': nb_hours = 12; break;
case '3': nb_hours = 18; break;
case '4': nb_hours = 24; break;
case '5': nb_hours = 1; break;
case '6': nb_hours = 2; break;
case '7': nb_hours = 3; break;
case '8': nb_hours = 9; break;
case '9': nb_hours = 15; break;
case '/': nb_hours = 24; break;
default : nb_hours = -1; break;
}
FM12CodeTable( xxx, 4019, _("Duration of period of precipitation") );
if( nb_hours < 0 )
ptrTok->Append( _("Precipitation duration"), _("Undetermined") );
else
ptrTok->Append( _("Precipitation duration"), nb_hours, Unit_hours );
}
/// 6RRRt -- Liquid precipitation
HEADTK(6RRRt) {
int m_precipitation_amount ;
char m_precipitation_duration ;
public:
GENTK( 6RRRt, "6[0-9/]{3}[0-9/][;=]?" )
bool Parse( const char * str )
{
m_precipitation_amount = -1 ;
m_precipitation_duration = '0' ;
return ( 2 == sscanf( str, "6%3d%c", &m_precipitation_amount, &m_precipitation_duration ) )
|| ( 1 == sscanf( str, "6///%c", &m_precipitation_duration ) )
|| ( 0 == strncmp( str, "60000", 5 ) );
}
void Print() const {
/// RRR -- Precipitation amount in mm
const char * precip = _("Precipitation amount");
switch( m_precipitation_amount ) {
case 0 ... 988 : Append( precip, m_precipitation_amount, Unit_mm );break;
case 989 : Append( precip, _("989 mm or more") );break;
case 990 : Append( precip, _("Traces") );break;
case 991 ... 999 : Append( precip, ( m_precipitation_amount - 990 ) / 10.0, Unit_mm );break;
default : Append( precip, m_precipitation_amount, _("Inconsistent") ); break;
}
FM12CodeTable( xxx, 3590, _("Amount of precipitation") );
/// t -- Duration over which precipitation amount measured
display_precipitation( this, m_precipitation_duration );
}
};
/// 7wwWW -- Present and past weather
HEADTK(7wwWW) {
int m_present_weather ;
char m_past_weather_1 ;
char m_past_weather_2 ;
mutable bool m_calc_done ;
mutable bool m_automated ;
/// Can be called only once this token is inserted in a group.
void Calc(void) const {
if( m_calc_done ) return ;
m_calc_done = true ;
const CLASSTK(iihVV) * ptr_iihVV = TokenProxy::get_ptr< CLASSTK(iihVV) >(false);
if( ptr_iihVV ) {
m_automated = ptr_iihVV->isAutomated();
} else m_automated = false ;
}
void PrintPastWeather( char weather, const char * title ) const {
static const char * past_weathers_manned[] = {
_("Cloud covering less than half of sky"),
_("Cloud covering more than half of sky during part of period and more than half during part of period"),
_("Cloud covering more than half of sky"),
_("Sandstorm, duststorm or blowing snow"),
_("Fog, or thick haze"),
_("Drizzle"),
_("Rain"),
_("Snow or mixed rain and snow"),
_("Showers"),
_("Thunderstorms") };
FM12CodeTable( past_weathers_manned, 4561, _("Past weather reported from a manned weather station") );
static const char * past_weathers_automated[] = {
_("No significant weather"),
_("Visibility reduced"),
_("Blowing phenomena, visibility reduced"),
_("Fog"),
_("Precipitation"),
_("Drizzle"),
_("Rain"),
_("Snow, or Ice pellets"),
_("Showers or intermittent precipitation"),
_("Thunderstorm") };
FM12CodeTable( past_weathers_automated, 4532, _("Past weather reported from an automated weather station") );
// http://fr.scribd.com/doc/86346935/Land-Synoptic-Code
// http://atmo.tamu.edu/class/atmo251/LandSynopticCode.pdf "Land Synoptic Code"
if( m_automated ) {
disp_arr(past_weathers_automated,G_N_ELEMENTS(past_weathers_automated),weather,'0',title);
} else {
disp_arr(past_weathers_manned,G_N_ELEMENTS(past_weathers_manned),weather,'0',title);
}
}
public:
CLASSTK(7wwWW) () : m_calc_done(false), m_automated(false) {}
GENTK( 7wwWW, "7[0-9/]{2}[0-9/][0-9/]" )
bool Parse( const char * str )
{
m_present_weather = '/' ;
m_past_weather_1 = m_past_weather_2 = '/';
return ( 0 == strcmp( "7////", str ) ) ||
( 2 == sscanf( str, "7//%c%c", &m_past_weather_1, &m_past_weather_2 ) ) ||
( 3 == sscanf( str, "7%2d%c%c", &m_present_weather, &m_past_weather_1, &m_past_weather_2 ) );
}
void Print() const {
Calc();
/// ww -- Present weather
static const char * present_weathers_manned[] = {
_("Clear skies"),
_("Clouds dissolving"),
_("State of sky unchanged"),
_("Clouds developing"),
// Haze, smoke, dust or sand
_("Visibility reduced by smoke"),
_("Haze"),
_("Widespread dust in suspension not raised by wind"),
_("Dust or sand raised by wind"),
_("Well developed dust or sand whirls"),
_("Dust or sand storm within sight but not at station"),
// Non-precipitation events
_("Mist"),
_("Patches of shallow fog"),
_("Continuous shallow fog"),
_("Lightning visible, no thunder heard"),
_("Precipitation within sight but not hitting ground"),
_("Distant precipitation but not falling at station"),
_("Nearby precipitation but not falling at station"),
_("Thunderstorm but no precipitation falling at station"),
_("Squalls within sight but no precipitation falling at station"),
_("Funnel clouds within sight"),
// Precipitation within past hour but not at observation time
_("Drizzle"),
_("Rain"),
_("Snow"),
_("Rain and snow"),
_("Freezing rain"),
_("Rain showers"),
_("Snow showers"),
_("Hail showers"),
_("Fog"),
_("Thunderstorms"),
// Duststorm, sandstorm, drifting or blowing snow
_("Slight to moderate duststorm, decreasing in intensity"),
_("Slight to moderate duststorm, no change"),
_("Slight to moderate duststorm, increasing in intensity"),
_("Severe duststorm, decreasing in intensity"),
_("Severe duststorm, no change"),
_("Severe duststorm, increasing in intensity"),
_("Slight to moderate drifting snow, below eye level"),
_("Heavy drifting snow, below eye level"),
_("Slight to moderate drifting snow, above eye level"),
_("Heavy drifting snow, above eye level"),
// Fog or ice fog
_("Fog at a distance"),
_("Patches of fog"),
_("Fog, sky visible, thinning"),
_("Fog, sky not visible, thinning"),
_("Fog, sky visible, no change"),
_("Fog, sky not visible, no change"),
_("Fog, sky visible, becoming thicker"),
_("Fog, sky not visible, becoming thicker"),
_("Fog, depositing rime, sky visible"),
_("Fog, depositing rime, sky not visible"),
// Drizzle
_("Intermittent light drizzle"),
_("Continuous light drizzle"),
_("Intermittent moderate drizzle"),
_("Continuous moderate drizzle"),
_("Intermittent heavy drizzle"),
_("Continuous heavy drizzle"),
_("Light freezing drizzle"),
_("Moderate to heavy freezing drizzle"),
_("Light drizzle and rain"),
_("Moderate to heavy drizzle and rain"),
// Rain
_("Intermittent light rain"),
_("Continuous light rain"),
_("Intermittent moderate rain"),
_("Continuous moderate rain"),
_("Intermittent heavy rain"),
_("Continuous heavy rain"),
_("Light freezing rain"),
_("Moderate to heavy freezing rain"),
_("Light rain and snow"),
_("Moderate to heavy rain and snow"),
// Snow
_("Intermittent light snow"),
_("Continuous light snow"),
_("Intermittent moderate snow"),
_("Continuous moderate snow"),
_("Intermittent heavy snow"),
_("Continuous heavy snow"),
_("Diamond dust"),
_("Snow grains"),
_("Snow crystals"),
_("Ice pellets"),
// Showers
_("Light rain showers"),
_("Moderate to heavy rain showers"),
_("Violent rain showers"),
_("Light rain and snow showers"),
_("Moderate to heavy rain and snow showers"),
_("Light snow showers"),
_("Moderate to heavy snow showers"),
_("Light snow/ice pellet showers"),
_("Moderate to heavy snow/ice pellet showers"),
_("Light hail showers"),
_("Moderate to heavy hail showers"),
// Thunderstorms
_("Thunderstorm in past hour, currently only light rain"),
_("Thunderstorm in past hour, currently only moderate to heavy rain"),
_("Thunderstorm in past hour, currently only light snow or rain/snow mix"),
_("Thunderstorm in past hour, currently only moderate to heavy snow or rain/snow mix"),
_("Light to moderate thunderstorm"),
_("Light to moderate thunderstorm with hail"),
_("Heavy thunderstorm"),
_("Heavy thunderstorm with duststorm"),
_("Heavy thunderstorm with hail") };
FM12CodeTable( present_weathers_manned, 4677, _("Present weather reported from a manned weather station") );
/// http://near-goos1.jodc.go.jp/rdmdb/format/JMA/wawa.html
static const char * present_weathers_automated[] = {
_("No significant weather observed"),
_("Clouds generally dissolving or becoming less developed during the past hour"),
_("State of sky on the whole unchanged during the past hour"),
_("Clouds generally forming or developing during the past hour"),
_("Haze or smoke, or dust in suspension in the air, visibility equal to, or greater than, 1 km"),
_("Haze or smoke, or dust in suspension in the air, visibility less than 1 km"),
_("Reserved"),
_("Reserved"),
_("Reserved"),
_("Reserved"),
_("Mist"),
_("Diamond dust"),
_("Distant lightning"),
_("Reserved"),
_("Reserved"),
_("Reserved"),
_("Reserved"),
_("Squalls"),
_("Reserved"),
// Code figures 20–26 are used to report precipitation, fog (or ice fog)
// or thunderstorm at the station during the preceding hour but not at the time of observation.
_("Fog"),
_("PRECIPITATION"),
_("Drizzle (not freezing) or snow grains"),
_("Rain (not freezing)"),
_("Snow"),
_("Freezing drizzle or freezing rain"),
_("Thunderstorm (with or without precipitation)"),
_("BLOWING OR DRIFTING SNOW OR SAND"),
_("Blowing or drifting snow or sand, visibility equal to, or greater than, 1 km"),
_("Blowing or drifting snow or sand, visibility less than 1 km"),
_("FOG"),
_("Fog or ice fog in patches"),
_("Fog or ice fog, has become thinner during the past hour"),
_("Fog or ice fog, no appreciable change during the past hour"),
_("Fog or ice fog, has begun or become thicker during the past hour"),
_("Fog, depositing rime"),
_("Reserved"),
_("Reserved"),
_("Reserved"),
_("Reserved"),
_("PRECIPITATION"),
_("Precipitation, slight or moderate"),
_("Precipitation, heavy"),
_("Liquid precipitation, slight or moderate"),
_("Liquid precipitation, heavy"),
_("Solid precipitation, slight or moderate"),
_("Solid precipitation, heavy"),
_("Freezing precipitation, slight or moderate"),
_("Freezing precipitation, heavy"),
_("Reserved"),
_("DRIZZLE"),
_("Drizzle, not freezing, slight"),
_("Drizzle, not freezing, moderate"),
_("Drizzle, not freezing, heavy"),
_("Drizzle, freezing, slight"),
_("Drizzle, freezing, moderate"),
_("Drizzle, freezing, heavy"),
_("Drizzle and rain, slight"),
_("Drizzle and rain, moderate or heavy"),
_("Reserved"),
_("RAIN"),
_("Rain, not freezing, slight"),
_("Rain, not freezing, moderate"),
_("Rain, not freezing, heavy"),
_("Rain, freezing, slight"),
_("Rain, freezing, moderate"),
_("Rain, freezing, heavy"),
_("Rain (or drizzle) and snow, slight"),
_("Rain (or drizzle) and snow, moderate or heavy"),
_("Reserved"),
_("SNOW"),
_("Snow, slight"),
_("Snow, moderate"),
_("Snow, heavy"),
_("Ice pellets, slight"),
_("Ice pellets, moderate"),
_("Ice pellets, heavy"),
_("Snow grains"),
_("Ice crystals"),
_("Reserved"),
_("SHOWER(S) or INTERMITTENT PRECIPITATION"),
_("Rain shower(s) or intermittent rain, slight"),
_("Rain shower(s) or intermittent rain, moderate"),
_("Rain shower(s) or intermittent rain, heavy"),
_("Rain shower(s) or intermittent rain, violent"),
_("Snow shower(s) or intermittent snow, slight"),
_("Snow shower(s) or intermittent snow, moderate"),
_("Snow shower(s) or intermittent snow, heavy"),
_("Reserved"),
_("Hail"),
_("THUNDERSTORM"),
_("Thunderstorm, slight or moderate, with no precipitation"),
_("Thunderstorm, slight or moderate, with rain showers and/or snow showers"),
_("Thunderstorm, slight or moderate, with hail"),
_("Thunderstorm, heavy, with no precipitation"),
_("Thunderstorm, heavy, with rain showers and/or snow showers"),
_("Thunderstorm, heavy, with hail"),
_("Reserved"),
_("Reserved"),
_("Tornado") };
FM12CodeTable( present_weathers_automated, 4680, _("Present weather reported from an automated weather station") );
// http://fr.scribd.com/doc/86346935/Land-Synoptic-Code
if( m_automated ) {
disp_arr(present_weathers_manned,
G_N_ELEMENTS(present_weathers_manned),
m_present_weather,0,_("Present weather - Manned"));
PrintPastWeather( m_past_weather_1, _("Past weather type 1 - Manned"));
PrintPastWeather( m_past_weather_2, _("Past weather type 2 - Automated"));
} else {
disp_arr(present_weathers_automated,
G_N_ELEMENTS(present_weathers_automated),
m_present_weather,0,_("Present weather - Automated"));
PrintPastWeather( m_past_weather_1, _("Past weather type 1 - Automated"));
PrintPastWeather( m_past_weather_2, _("Past weather type 2 - Automated"));
}
}
};
/// 8NCCC -- Cloud type information
HEADTK(8NCCC) {
char m_low_clouds_amount ;
char m_low_cloud_type ;
char m_mid_cloud_type ;
char m_high_cloud_type ;
public:
GENTK( 8NCCC, "8[0-9/][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
return ( 4 == sscanf( str, "8%c%c%c%c",
&m_low_clouds_amount,
&m_low_cloud_type,
&m_mid_cloud_type,
&m_high_cloud_type ) );
}
void Print() const {
/// N -- Amount of low clouds covering sky, if no low clouds, the amount of the middle clouds
const char * low_cloud_title = m_low_cloud_type != '0' ? _("Amount of low clouds") : _("Amount of middle clouds");
if( m_low_clouds_amount == '/' )
Append( low_cloud_title, _("Unspecified") );
else
Append( low_cloud_title, m_low_clouds_amount - '0' );
/// CL -- Low cloud type
static const choice< char > arr_low_clouds[] = {
{ '0', _("No low clouds") },
{ '1', _("Cumulus humulis or fractus (no vertical development)") },
{ '2', _("Cumulus mediocris or congestus (moderate vertical development)") },
{ '3', _("Cumulonimbus calvus (no outlines nor anvil)") },
{ '4', _("Stratocumulus cumulogenitus (formed by spreading of cumulus)") },
{ '5', _("Stratocumulus") },
{ '6', _("Stratus nebulosus (continuous sheet)") },
{ '7', _("Stratus or cumulus fractus (bad weather)") },
{ '8', _("Cumulus and stratocumulus (multilevel)") },
{ '9', _("Cumulonimbus with anvil") },
{ '/', _("Low clouds unobserved due to darkness or obscuration") }
};
Append( _("Low clouds type"),
choice_map( arr_low_clouds, G_N_ELEMENTS( arr_low_clouds ), m_low_cloud_type, _("unknown low clouds type") ) );
FM12CodeTable( arr_low_clouds, 0513, _("Clouds of the genera stratocumulus, stratus,cumulus, and cumulonimbus") );
/// CM -- Middle cloud type
static const choice< char > arr_mid_clouds[] = {
{ '0', _("No middle clouds") },
{ '1', _("Altostratus translucidous (mostly transparent)") },
{ '2', _("Altostratus opacus or nimbostratus") },
{ '3', _("Altocumulus translucidous (mostly transparent)") },
{ '4', _("Patches of altocumulus (irregular, lenticular)") },
{ '5', _("Bands of altocumulus") },
{ '6', _("Altocumulus cumulogenitus (formed by spreading of cumulus)") },
{ '7', _("Altocumulus (multilayers)") },
{ '8', _("Altocumulus castellanus (having cumuliform tufts)") },
{ '9', _("Altocumulus of a chaotic sky") },
{ '/', _("Middle clouds unobserved due to darkness or obscuration ") },
};
Append( _("Middle clouds type"),
choice_map( arr_mid_clouds, G_N_ELEMENTS( arr_mid_clouds ), m_mid_cloud_type, _("unknown middle clouds type") ) );
FM12CodeTable( arr_mid_clouds, 0515, _("Clouds of the genera altocumulus,altostratus, and nimbostratus") );
/// CH -- High cloud type
static const choice< char > arr_high_clouds[] = {
{ '0', _("No high clouds") },
{ '1', _("Cirrus fibratus (wispy)") },
{ '2', _("Cirrus spissatus (dense in patches)") },
{ '3', _("Cirrus spissatus cumulogenitus (formed out of anvil)") },
{ '4', _("Cirrus unicus or fibratus (progressively invading sky)") },
{ '5', _("Bands of cirrus or cirrostratus invading sky (less than 45 degree above horizon)") },
{ '6', _("Bands of cirrus or cirrostratus invading sky (more than 45 degree above horizon)") },
{ '7', _("Cirrostratus covering whole sky") },
{ '8', _("Cirrostratus not covering sky but not invading") },
{ '9', _("Cirrocumulus") },
{ '/', _("High clouds unobserved due to darkness or obscuration") }
};
Append( _("High clouds type"),
choice_map( arr_high_clouds, G_N_ELEMENTS( arr_high_clouds ), m_high_cloud_type, _("unknown high clouds type") ) );
FM12CodeTable( arr_mid_clouds, 0509, _("Clouds of the genera cirrus,cirrocumulus, and cirrostratus") );
}
};
/// 9GGgg -- Time of observation in hours and minutes
HEADTK(9GGgg) {
int m_hours;
int m_minutes;
public:
GENTK( 9GGgg, "9[0-2][0-9][0-5][0-9][;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "9%2d%2d", &m_hours, &m_minutes ) );
}
void Print() const {
Append( _("Observation time"), hour_min( m_hours, m_minutes ) );
}
};
/// 222 Group - Sea Surface Observations
///
/// 222Dv
HEADTK(222Dv) {
char m_ship_direction;
char m_ship_average_speed;
public:
/// Not only it is selected before similar tokens, but also it can be kept at the end like two tokens together.
GENTK_PRIORITY( 222Dv, "222[0-9/][0-9/][;=]?", MIN_PRIO )
// GENTK( 222Dv, "222[0-9/][0-9/][;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "222%c%c", &m_ship_direction, &m_ship_average_speed ) );
}
void Print() const {
/// D -- direction of ship movement
const char * ship_directions[] = {
_("Calm"),
_("North-East"),
_("East"),
_("South-East"),
_("South"),
_("South-West"),
_("West"),
_("North-West"),
_("North"),
_("Unknown") };
disp_arr(ship_directions,G_N_ELEMENTS(ship_directions),m_ship_direction,'0',_("Ship direction") );
/// * v -- ship's average speed
const char * ship_average_speeds[] = {
_("0 knots"),
_("1 to 5 knots"),
_("6 to 10 knots"),
_("11 to 15 knots"),
_("16 to 20 knots"),
_("21 to 25 knots"),
_("26 to 30 knots"),
_("31 to 35 knots"),
_("36 to 40 knots"),
_("over 40 knots ") };
disp_arr(ship_average_speeds,G_N_ELEMENTS(ship_average_speeds),m_ship_average_speed,'0',_("Ship average speed") );
}
};
/// 0sTTT -- Sea surface temperature
HEADTK(0sTTT) {
/// s -- sign of temperature (0=positive, 1=negative)
char m_temperature_sign ;
/// TTT -- Temperature in .1 C
int m_temperature ;
const char * m_temperature_type ;
bool CheckParams() {
switch(m_temperature_sign) {
case '0':
case '1': m_temperature_type = _("Intake measurement"); break;
case '2':
case '3': m_temperature_type = _("Bucket measurement"); break;
case '4':
case '5': m_temperature_type = _("Hull contact sensor"); break;
case '6':
case '7': m_temperature_type = _("Other"); break;
default : m_temperature_type = _("Inconsistent"); break ;
}
switch(m_temperature_sign) {
case '1':
case '3':
case '5':
case '7': m_temperature_sign = '1' ;
break ;
case '0':
case '2':
case '4':
case '6': m_temperature_sign = '0' ;
break ;
default : return false ;
}
return true ;
}
public:
/// TODO: Group terminator (=;) is detected before and could be removed from regular expressions.
GENTK( 0sTTT, "0[01234567/][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
m_temperature_sign = '/';
m_temperature = 999;
m_temperature_type = NULL;
if( 0 == strncmp( str, "0////", 5 ) ) return true ;
return ( 2 == sscanf( str, "0%c%3d", &m_temperature_sign, &m_temperature ) )
&& CheckParams()
&& CheckCelsius( m_temperature_sign, m_temperature );
}
/// TTT -- Temperature in .1 C. s -- sign of temperature (0=positive, 1=negative)
void Print() const {
if( m_temperature_sign != '/' )
AppCelsius( this, _("Sea surface temperature"), m_temperature_sign, m_temperature );
else
Append( _("Sea surface temperature"), _("Unspecified") );
if( m_temperature_type == NULL )
Append( _("Temperature type"), _("Unspecified") );
else
Append( _("Temperature type"), m_temperature_type );
}
};
/// 1PPHH -- Wave heights in 0.5 m increments
HEADTK(1PPHH) {
/// PP -- Period of waves in seconds
int m_waves_period;
/// HH -- Height of waves in 0.5 m increments
int m_waves_height;
public:
GENTK( 1PPHH, "1[0-9/]{2}[0-9/]{2}" )
bool Parse( const char * str )
{
m_waves_period = 0;
m_waves_height = 0;
return ( 0 == strncmp( str, "1////", 5 ) )
|| ( 2 == sscanf( str, "1%2d%2d", &m_waves_period, &m_waves_height ) );
}
void Print() const {
Append( _("Waves period"), m_waves_period, Unit_seconds );
Append( _("Waves height"), 0.5 * m_waves_height, Unit_meters );
}
};
/// http://www.top-wetter.de/themen/synopschluessel.htm says that 1PPHH is instrumented,
/// that 2PPHH is not and 70HHH is not instrumented either. Figures should be close however.
HEADTK(2PPHH) {
int m_waves_period;
int m_waves_height;
public:
/// 2PPHH -- Wave period and heights (instrumented)
GENTK( 2PPHH, "2[0-9/]{2}[0-9/]{2}" )
bool Parse( const char * str )
{
m_waves_period = -1;
m_waves_height = -1;
if( 0 == strcmp( str, "2////") ) return true;
int nbMtch = sscanf( str, "2%2d%2d", &m_waves_period, &m_waves_height );
if(nbMtch != 2) return false ;
/// Wave heights must be realistic, forty meters is too high..
if( m_waves_height > 80 ) return false ;
return true;
}
void Print() const {
if( m_waves_period >= 0 )
Append( _("Instrumented waves period"), m_waves_period, Unit_seconds );
if( m_waves_height >= 0 )
Append( _("Instrumented waves height"), 0.5 * m_waves_height, Unit_meters );
}
};
/** Generally speaking:
Any element not reported are normally reported with a slash.
If an entire group of elements is not reported,
skip the group completely (Do not report a group as ///// )
*/
/// 3dddd -- Direction of swells (up to 2 swells)
HEADTK(3dddd) {
int m_wind_direction1 ;
int m_wind_direction2 ;
/// TODO: The direction should be smaller than 36.
void wind_dir( const char * title, int dir ) const {
if( dir >= 0 )
Append( title, dir * 10, Unit_degrees );
}
public:
GENTK( 3dddd, "3[0-9/]{4}" )
bool Parse( const char * str )
{
m_wind_direction1 = -1;
m_wind_direction2 = -1;
if( 0 == strcmp( str, "3////") ) return true;
return ( 2 == sscanf( str, "3%2d%2d", &m_wind_direction1, &m_wind_direction2 ) )
|| ( 1 == sscanf( str, "3//%2d", &m_wind_direction2 ) )
|| ( 1 == sscanf( str, "3%2d//", &m_wind_direction1 ) );
}
void Print() const {
wind_dir( _("Direction of primary swell waves"), m_wind_direction1 );
wind_dir( _("Direction of secondary swell waves"), m_wind_direction2 );
}
};
/// 4PPHH -- Period and direction of first set of swells
HEADTK(4PPHH) {
int m_swell_waves_period ;
int m_swell_waves_height ;
public:
GENTK( 4PPHH, "4[0-9/]{4}" )
bool Parse( const char * str )
{
m_swell_waves_period = -1;
m_swell_waves_height = -1;
if( 0 == strcmp( str, "4////") ) return true;
return ( 2 == sscanf( str, "4%2d%2d", &m_swell_waves_period, &m_swell_waves_height ) )
|| ( 1 == sscanf( str, "4%2d//", &m_swell_waves_period ) );
}
void Print() const {
if( m_swell_waves_period >= 0 )
Append( _("Primary swell waves period"), m_swell_waves_period, Unit_seconds );
if( m_swell_waves_height >= 0 )
Append( _("Primary swell waves height"), 0.5 * m_swell_waves_height, Unit_meters );
}
};
/// 5PPHH -- Period and direction of second set of swells
HEADTK(5PPHH) {
int m_swell_waves_period ;
int m_swell_waves_height ;
public:
GENTK( 5PPHH, "5[0-9/]{4}" )
bool Parse( const char * str )
{
m_swell_waves_period = -1;
m_swell_waves_height = -1;
if( 0 == strcmp( str, "5////") ) return true;
int nbMtch = sscanf( str, "5%2d%2d", &m_swell_waves_period, &m_swell_waves_height );
if( nbMtch != 2 ) return false ;
/// Realistic values only. Waves are not 40 meters high.
if( m_swell_waves_height > 80 ) return false ;
return true ;
}
void Print() const {
if( m_swell_waves_period >= 0 )
Append( _("Secondary swell waves period"), m_swell_waves_period, Unit_seconds );
if( m_swell_waves_height >= 0 )
Append( _("Secondary swell waves height"), 0.5 * m_swell_waves_height, Unit_meters );
}
};
/// 6IEER -- Ice accretion on ships
HEADTK(6IEER) {
char m_ice_accretion_code;
int m_ice_accretion_thickness;
char m_ice_accretion_rate;
public:
GENTK( 6IEER, "6[0-5/][0-9/]{2}[0-4/]" )
bool Parse( const char * str )
{
m_ice_accretion_code = '_';
m_ice_accretion_thickness = -1;
m_ice_accretion_rate = '_';
if( 0 == strcmp( str, "6////" ) ) return true;
return ( 3 == sscanf( str, "6%c%2d%c", &m_ice_accretion_code, &m_ice_accretion_thickness, &m_ice_accretion_rate ) );
}
void Print() const {
static const char * ice_accretion_codes[] = {
_("Not relevant"), // Should not happen, but it does.
_("Icing from ocean spray"),
_("Icing from fog"),
_("Icing from spray and fog"),
_("Icing from rain"),
_("Icing from spray and rain") };
disp_arr(ice_accretion_codes,G_N_ELEMENTS(ice_accretion_codes),m_ice_accretion_code,'0',_("Ice accretion code") );
if( m_ice_accretion_thickness >= 0 )
Append( _("Ice accretion thickness"), m_ice_accretion_thickness, Unit_centimeters );
else
Append( _("Ice accretion thickness"), _("Not relevant") );
static const char * ice_accretion_rates[] = {
_("Ice not building up"),
_("Ice building up slowly"),
_("Ice building up rapidly"),
_("Ice melting or breaking up slowly"),
_("Ice melting or breaking up rapidly") };
disp_arr(ice_accretion_rates,G_N_ELEMENTS(ice_accretion_rates),m_ice_accretion_rate,'0',_("Ice accretion rate") );
}
};
/// 70HHH -- Wave heights to 0.1 m (instrumented)
HEADTK(70HHH) {
int m_wave_height ;
public:
/// This group does not appear in NWSOH document.
GENTK( 70HHH, "70[0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
m_wave_height = -1;
return ( 0 == strncmp( str, "70///", 5 ) )
|| ( 1 == sscanf( str, "70%3d", &m_wave_height ) );
}
void Print() const {
const char * txt = _("Wave height");
if( m_wave_height >= 0 )
Append( txt, m_wave_height * 0.1, Unit_meters );
else
Append( txt, _("Undetermined"), Unit_meters );
}
};
/// 8aTTT -- Wet bulb temperature
HEADTK(8aTTT) {
char m_wet_bulb_sign_type ;
char m_temperature_sign ;
int m_wet_bulb_temperature ;
const char * m_title ;
/// Called once we managed to extract the arguments.
bool CheckParams() {
switch( m_wet_bulb_sign_type ) {
case '0':
m_temperature_sign = '0';
m_title = _("Positive or zero measured");
break;
case '1':
m_temperature_sign = '1';
m_title = _("Negative measured");
break;
case '2':
m_temperature_sign = '1';
m_title = _("Iced bulb measured");
break;
case '5':
m_temperature_sign = '0';
m_title = _("Positive or zero computed");
break;
case '6':
m_temperature_sign = '1';
m_title = _("Negative computed");
break;
case '7':
m_temperature_sign = '1';
m_title = _("Iced bulb computed");
break;
default :
m_temperature_sign = '/';
m_title = _("Inconsistent");
return false;
};
return true;
}
public:
GENTK( 8aTTT, "8[0-9/]{4}[;=]?" )
bool Parse( const char * str )
{
m_wet_bulb_sign_type = '/';
m_temperature_sign = '/';
m_wet_bulb_temperature = 0 ;
m_title = "Not specified";
if( 0 == strncmp( str, "8////", 5 ) ) return true;
return ( 2 == sscanf( str, "8%c%3d", &m_wet_bulb_sign_type, &m_wet_bulb_temperature ) )
&& CheckParams();
}
void Print() const {
static const std::string sep(":");
std::string title = _("Web bulb temperature") + sep + m_title ;
AppCelsius( this, title.c_str(), m_temperature_sign, m_wet_bulb_temperature );
}
};
/// Separator for ice detection.
HEADTK(ICE) {
public:
// TODO: It is possible to have free text after the string ICE.
GENTK( ICE, "ICE" )
bool Parse( const char * str )
{
return 0 == strcmp( str, "ICE" );
}
void Print() const {
Append( _("Type"), "{ICE}" );
}
bool CanComeFirst(void) const { return false ; }
};
/// Appears only in NWSOH document.
/// http://www.ndbc.noaa.gov/ice/sea_ice.shtml
/// Data reported in Ships Synoptic Code, Group 2 ICE section (ciSibiDizi).
HEADTK(cSbDz) {
char m_sea_ice_arrangement;
char m_sea_ice_development_stage;
char m_ice_of_land_origin;
char m_bearing_of_principle_ice_edge;
char m_sea_ice_situation ;
public:
/// There might be four chars only ??
GENTK( cSbDz, "[0-9/]{4}[0-9/]?[;=]?" )
bool Parse( const char * str )
{
return ( 5 == sscanf( str, "%c%c%c%c%c",
&m_sea_ice_arrangement,
&m_sea_ice_development_stage,
&m_ice_of_land_origin,
&m_bearing_of_principle_ice_edge,
&m_sea_ice_situation ) );
}
void Print() const {
/// ci = Concentration or Arrangement of Sea Ice
static const char * sea_ice_arrangements[] = {
_("No sea ice in sight"),
_("Ship in open lead more than 1 nautical mile wide, or ship in fast ice with no boundary beyond limit of visibility"),
_("Sea ice present in concentrations less than 3/10 (3/8); open water or very open pack ice"),
_("4/10 to 6/10 (3/8 to less than 6/8); open pack ice"),
_("7/10 to 8/10 (6/8 to less than 7/8); close pack ice"),
_("9/10 or more, but not 10/10 (7/8 to less than 8/8); very close pack ice"),
_("Strips and patches of pack ice with open water between"),
_("Strips and patches of close or very close pack ice with areas of lesser concentration between"),
_("Fast ice with open water, very open or open pack ice to seaward of the ice boundary"),
_("Fast ice with close or very close pack ice to seaward of the ice boundary") };
disp_arr(sea_ice_arrangements,G_N_ELEMENTS(sea_ice_arrangements),m_sea_ice_arrangement,'0',
_("Concentration or arrangement of Sea Ice") );
/// Si = Sea Ice Stage of Development
static const char * sea_ice_development_stages[] = {
_("New ice only (frail ice, grease ice, slush ice, shuga)"),
_("Nilas or ice rind, less than 10 cm thick"),
_("Young ice (grey ice, grey-white ice), 10-30 cm thick"),
_("Predominantly new and/or young ice with some first year ice"),
_("Predominantly thin first-year ice with some new and/or young ice"),
_("All thin first-year ice (30-70 cm thick)"),
_("Predominantly medium first-year ice (70-120 cm thick) and thick first-year ice (more than 120 cm thick) with some thinner (younger) first-year ice"),
_("All medium and first-year ice"),
_("Predominantly medium and thick first-year ice with some old ice (usually more than 2 meters thick)"),
_("Predominantly old ice") };
disp_arr(sea_ice_development_stages,G_N_ELEMENTS(sea_ice_development_stages),m_sea_ice_development_stage,'0',
_("Sea Ice Stage of Development") );
/// bi = Ice of Land Origin
static const char * ice_of_land_origins[] = {
_("No ice of land origin"),
_("1-5 icebergs, no growlers or bergy bits"),
_("6-10 icebergs, no growlers or bergy bits"),
_("11-20 icebergs, no growlers or bergy bits"),
_("Up to and including 10 growlers and bergy bits - no icebergs"),
_("More than 10 growlers and bergy bits - no icebergs"),
_("1-5 icebergs with growlers and bergy bits"),
_("6-10 icebergs with growlers and bergy bits"),
_("11-20 icebergs with growlers and bergy bits"),
_("More than 20 icebergs with growlers and bergy bits - a major hazard to navigation") };
disp_arr(ice_of_land_origins,G_N_ELEMENTS(ice_of_land_origins),m_ice_of_land_origin,'0',
_("Ice of Land Origin") );
/// Di = Bearing of Principle Ice Edge
static const char * bearing_of_principle_ice_edges[] = {
_("Ship in shore or flaw lead"),
_("Principle ice edge towards NE"),
_("Principle ice edge towards E"),
_("Principle ice edge towards SE"),
_("Principle ice edge towards S"),
_("Principle ice edge towards SW"),
_("Principle ice edge towards W"),
_("Principle ice edge towards NW"),
_("Principle ice edge towards N"),
_("Not determined (ship in ice)") };
disp_arr(bearing_of_principle_ice_edges,G_N_ELEMENTS(bearing_of_principle_ice_edges),m_bearing_of_principle_ice_edge,'0',
_("Bearing of Principle Ice Edge") );
/// zi = Present Sea Ice Situation and Three Hour Trend
static const char * sea_ice_situations[] = {
_("Ship in open water with floating ice in sight"),
_("Ship in easily penetrable ice; conditions improving"),
_("Ship in easily penetrable ice; conditions not changing"),
_("Ship in easily penetrable ice; conditions worsening"),
_("Ship in ice difficult to penetrate; conditions improving"),
_("Ship in ice difficult to penetrate; conditions not changing"),
_("Ice forming and floes freezing together"),
_("Ice under slight pressure"),
_("Ice under moderate or severe pressure"),
_("Ship beset") };
disp_arr(sea_ice_situations,G_N_ELEMENTS(sea_ice_situations),m_sea_ice_situation,'0',
_("Present Sea Ice Situation and Three Hour Trend") );
}
/// In fact, completely dependent on the previous token. THIS SHOULD BE ENFORCED.
bool CanComeFirst(void) const { return false ; }
};
/// 333 Group - Special / Climatological Data
HEADTK(333) {
public:
GENTK( 333, "333" )
bool Parse( const char * str )
{
return 0 == strcmp( str, "333" );
}
void Print() const {
Section( _("Special or climatological data") );
}
};
/// 0.... -- Regionally developed data
HEADTK(0____) {
char m_not_decoded_yet[5] ;
public:
GENTK( 0____, "0[0-9A-Z/]{2}[0-9A-Z]{2}" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "0%4s", m_not_decoded_yet ) );
}
void Print() const {
Append( _("Regionally developed data"), m_not_decoded_yet );
}
};
/// 1sTTT_max -- Maximum temperature over previous 24 hours
HEADTK(1sTTT_max) {
/// s -- sign of temperature (0=positive, 1=negative)
char m_temperature_sign ;
/// TTT -- Temperature in .1 C
int m_temperature ;
public:
GENTK( 1sTTT_max, "1[01/][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
m_temperature_sign = '/';
m_temperature = 0;
if( 0 == strncmp( str, "1////", 5 ) ) return true ;
return ( 2 == sscanf( str, "1%c%3d", &m_temperature_sign, &m_temperature) )
&& ( strchr( "01", m_temperature_sign ) != NULL )
&& CheckCelsius( m_temperature_sign, m_temperature );
}
/// s -- sign of temperature (0=positive, 1=negative). TTT -- Temperature in .1 C
void Print() const {
AppCelsius( this, _("Maximum 24 hours temperature"), m_temperature_sign, m_temperature );
}
};
/// 2sTTT_min -- Minimum temperature over previous 24 hours
HEADTK(2sTTT_min) {
/// s -- sign of temperature (0=positive, 1=negative)
char m_temperature_sign ;
/// TTT -- Temperature in .1 C
int m_temperature ;
public:
/// 12- bzw. 15-stündige Minimumtemperatur (wird nur um 06, 09 und 18 UTC gemeldet)
GENTK( 2sTTT_min, "2[01/][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
int nbMtch = sscanf( str, "2%c%3d", &m_temperature_sign, &m_temperature);
switch( nbMtch) {
case 0 : return false;
case 1 : return 0 == strcmp( str + 1, "////" );
case 2 : return CheckCelsius( m_temperature_sign, m_temperature );
default: return false;
}
}
/// s -- sign of temperature (0=positive, 1=negative)
/// TTT -- Minimum temperature over previous 24 hours in .1 C (if sign is 9, TTT is relative humidity)
void Print() const {
AppCelsius( this, _("Minimum temperature over previous 24 hours"), m_temperature_sign, m_temperature );
}
};
/// Not sure of how it should be decoded.
#ifdef DECODED_3Ejjj
/// Can be 3EssTgTg : http://www.ogimet.com/docs/WMO306vol-II.pdf
/// TgTg Ground (grass) minimum temperature of the preceding night, in whole degrees Celsius, its sign being given by sn.
/// (3-group in Section 3 of FM 12)
HEADTK(3Ejjj) {
char m_ground_state ;
int m_temperature ;
bool m_valid_temperature ;
public:
GENTK( 3Ejjj, "3[0-9/][/01][/0-9]{2}[;=]?" )
// No regional decision has been made for the use of these letters so they will be encoded as solidi (///).
bool Parse( const char * str )
{
char char_sign, d1, d2 ;
int r = sscanf( str, "3%c%c%c%c", &m_ground_state, &char_sign, &d1, &d2 );
if( r != 4 ) return false ;
if( ( d1 == '/' ) ^ ( d2 == '/' ) ) return false ;
if( ( d1 == '/' ) == ( d2 == '/' ) ) {
m_valid_temperature = false ;
return true ;
}
m_valid_temperature = true ;
m_temperature = 10 * ( d1 - '0' ) + ( d2 - '0' );
if( char_sign == '1' ) m_temperature = -m_temperature ;
return true ;
}
void Print() const {
/// Code table 0901 E: State of the ground without snow or measurable ice cover
static const char * ground_without_snow[] = {
_("Surface of ground dry (without cracks and no appreciable amount of dust or loose sand)"),
_("Surface of ground moist"),
_("Surface of ground wet (standing water in small or large pools on surface)"),
_("Flooded"),
_("Surface of ground frozen"),
_("Glaze on ground"),
_("Loose dry dust or sand not covering ground completely"),
_("Thin cover of loose dry dust or sand covering ground completely"),
_("Moderate or thick cover of loose dry dust or sand covering ground completely"),
_("Extremely dry with cracks") };
FM12CodeTable( ground_without_snow, 0901, _("State of the ground without snow or measurable ice cover") );
disp_arr(ground_without_snow,G_N_ELEMENTS(ground_without_snow),m_ground_state,'0',_("State of the ground without snow or measurable ice cover") );
if( m_valid_temperature ) {
Append( _("Ground grass minimum temperature of preceding night"), m_temperature, Unit_Celsius );
}
}
};
#else
/// 3Ejjj -- Regionally developed data
HEADTK(3Ejjj) {
char m_not_decoded_yet[5] ;
public:
/// TODO: See here: http://www.met.fu-berlin.de/~stefan/fm12.html#32
GENTK( 3Ejjj, "3[0-9A-Z/]{4}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "3%4s", m_not_decoded_yet ) );
}
void Print() const {
Append( _("Regionally developed data"), m_not_decoded_yet );
}
};
#endif
/// 4Esss -- Snow depth
HEADTK(4Esss) {
char m_snow_cover ;
int m_snow_depth ;
public:
GENTK( 4Esss, "4[0-9/][0-9]{3}[;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "4%c%3d", &m_snow_cover, &m_snow_depth ) );
}
// http://fr.scribd.com/doc/86346935/Land-Synoptic-Code
void Print() const {
/// E-prime -- State of ground with snow cover
static const char *snow_covers[] = {
_("Predominantly covered with ice"),
_("Compact or wet snow covering less than half of ground"),
_("Compact or wet snow covering more than half of ground but not completely covered"),
_("Even layer of compact or wet snow covering entire ground"),
_("Uneven layer of compact or wet snow covering entire ground"),
_("Loose dry snow covering less than half of ground"),
_("Loose dry snow covering more than half of ground but not completely covered"),
_("Even layer of loose dry snow covering entire ground"),
_("Uneven layer of loose dry snow covering entire ground"),
_("Snow covering ground completely with deep drifts ") };
disp_arr(snow_covers,G_N_ELEMENTS(snow_covers),m_snow_cover,'0',_("State of ground with snow cover") );
FM12CodeTable( snow_covers, 0975, _("State of the ground with snow cover or measurable ice cover") );
/// sss -- snow depth in cm: Code table 3889 sss : Total depth of snow
switch( m_snow_depth ) {
case 0 :
Append( _("Snow depth"), _("Not used") );
break;
default :
Append( _("Snow depth"), m_snow_depth, Unit_centimeters );
break;
case 997 :
Append( _("Snow depth"), _("Less than 0.5 cm") );
break;
case 998 :
Append( _("Snow depth"), _("Snow cover, not continuous") );
break;
case 999 :
Append( _("Snow depth"), _("Measurement impossible or inaccurate") );
break;
}
FM12CodeTable( , 3889, _("Total depth of snow") );
}
};
/// 5jjjj -- Additional information
HEADTK(5jjjj) {
char m_not_decoded_yet[5] ;
public:
GENTK( 5jjjj, "5[012346789/][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "5%4s", m_not_decoded_yet ) )
|| ( 0 == strncmp( str, "5////", 5 ) );
}
void Print() const {
Append( _("Additional information"), m_not_decoded_yet );
}
};
/// 553SS -- Sonnenscheindauer der letzten ganzen bzw. halben* Stunde in 1/10 Stunden
HEADTK(553SS) {
int m_Sonnenscheindauer;
public:
GENTK( 553SS, "553[0-9/]{2}[;=]?" )
bool Parse( const char * str )
{
m_Sonnenscheindauer = -1;
return ( 0 == strncmp( str, "553//", 5 ) )
|| ( 1 == sscanf( str, "553%2d", &m_Sonnenscheindauer ) );
}
void Print() const {
const char * txt = _("Sonnenscheindauer der letzten ganzen");
if( m_Sonnenscheindauer < 0 )
Append( txt, _("Undetermined"), Unit_hours );
else
Append( txt, m_Sonnenscheindauer / 10.0, Unit_hours );
}
};
/* Not sure: http://www.met.fu-berlin.de/~stefan/fm12.html#32
* 55SSS -- Sonnenscheindauer des Vortags in 1/10 Stunden (wird nur um 06 UTC gemeldet)
* 553SS -- Sonnenscheindauer der letzten ganzen bzw. halben* Stunde in 1/10 Stunden
*/
/// 55jjj jjjjj -- Additional information (can be multiple groups)
HEADTK(55jjj) {
char m_not_decoded_yet[5] ;
public:
// Not sure it can really have four chars.
GENTK( 55jjj, "55[012456789/][0-9/]{2}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "55%3s", m_not_decoded_yet ) );
}
void Print() const {
Append( _("Undecoded extra information"), m_not_decoded_yet );
}
};
/// Can be added several times after 55jjj
HEADTK(jjjjj) {
char m_not_decoded_yet[5] ;
public:
GENTK( jjjjj, "[0-9/]{5}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "%5s", m_not_decoded_yet ) );
}
void Print() const {
Append( _("Undecoded extra information"), m_not_decoded_yet );
}
/// It is dependent on the previous token.
bool CanComeFirst(void) const { return false ; }
};
/// 2FFFF -- Summe der Globalstrahlung des Vortags in J/cm2
HEADTK(2FFFF) {
int m_global_strahlung;
public:
GENTK( 2FFFF, "2[0-9/]{4}[;=]?" )
bool Parse( const char * str )
{
m_global_strahlung = -1;
return ( 0 == strncmp( str, "2////", 5 ) )
|| ( 1 == sscanf( str, "2%4d", &m_global_strahlung ) );
}
void Print() const {
/// Global Strahlung
const char * txt = _("Global radiation");
if( m_global_strahlung >= 0 )
Append( txt, m_global_strahlung, "J/cm2" );
else
Append( txt, _("Undetermined") );
}
};
/// 3FFFF -- Diffuse Himmelsstrahlung der letzten ganzen bzw. halben* Stunde in kJ/m2 = 1/10 J/cm2
HEADTK(3FFFF) {
int m_himmel_strahlung;
public:
GENTK( 3FFFF, "3[0-9/]{4}[;=]?" )
bool Parse( const char * str )
{
m_himmel_strahlung = -1;
return ( 0 == strncmp( str, "3////", 5 ) )
|| ( 1 == sscanf( str, "3%4d", &m_himmel_strahlung ) );
}
/// Diffuse Himmelsstrahlung der letzten ganzen bzw. halben* Stunde
void Print() const {
Append( _("Diffuse sky radiation of last half hour"),
m_himmel_strahlung, "kJ/m2" );
}
};
/// 4FFFF -- Atmosphärische Wärmestrahlung der letzten ganzen bzw. halben* Stunde
HEADTK(4FFFF) {
int m_waerme_strahlung;
public:
GENTK( 4FFFF, "4[0-9/]{4}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "4%4d", &m_waerme_strahlung ) );
}
/// Atmosphärische Wärmestrahlung der letzten ganzen bzw. halben* Stunde
void Print() const {
Append( _("Atmospheric thermal radiation of last half hour"),
m_waerme_strahlung, "kJ/m2" );
}
};
/// 6RRRtb -- Liquid precipitation
typedef CLASSTK(6RRRt) CLASSTK(6RRRtb);
/// 7RRRR -- 24 hour precipitation in mm
HEADTK(7RRRR) {
int m_24h_precipitations_mm ;
public:
GENTK( 7RRRR, "7[0-9]{4}=?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "7%4d", &m_24h_precipitations_mm ) );
}
void Print() const {
const char * precip = _("24 hours precipitations");
if( m_24h_precipitations_mm == 9999 )
Append( precip, _("None") );
else
Append( precip, m_24h_precipitations_mm, Unit_mm );
}
};
static const char * cloud_genuses[] = {
_("Cirrus (Ci)"),
_("Cirrocumulus (Cc)"),
_("Cirrostratus (Cs)"),
_("Altocumulus (Ac)"),
_("Altostratus (As)"),
_("Nimbostratus (Ns)"),
_("Stratocumulus (Sc)"),
_("Stratus (St)"),
_("Cumulus (Cu)"),
_("Cumulonimbus (Cb)") };
/// 8NChh -- Cloud layer data
HEADTK(8NChh) {
char m_cloud_cover ;
char m_cloud_genus ;
int m_cloud_base_height ;
public:
GENTK( 8NChh, "8[0-9/][0-9/][0-9/]{2}[;=]?" )
bool Parse( const char * str )
{
m_cloud_cover = '0';
m_cloud_genus = '/';
m_cloud_base_height = 0 ;
return ( 3 == sscanf( str, "8%c%c%2d", &m_cloud_cover, &m_cloud_genus, &m_cloud_base_height ) )
|| ( 2 == sscanf( str, "8%c%c//", &m_cloud_cover, &m_cloud_genus ) )
|| ( 0 == strncmp( str, "80///", 5 ) );
}
void Print() const {
// N -- cloud cover
disp_arr(cloud_covers,G_N_ELEMENTS(cloud_covers),m_cloud_cover,'0',_("Cloud cover"));
// C -- genus of cloud
disp_arr(cloud_genuses,G_N_ELEMENTS(cloud_genuses),m_cloud_genus,'0',_("Cloud genus") );
// * hh -- height of cloud base
const char * title = _("Cloud base height");
switch( m_cloud_base_height ) {
case 0 : Append( title, _("Less than 30 meters") ); break;
case 1 ... 50 : Append( title, m_cloud_base_height * 30, Unit_meters ); break;
case 51 ... 56 : Append( title, 1500 + ( m_cloud_base_height - 50 ) * 50, Unit_meters ); break;
case 57 ... 80 : Append( title, 1800 + ( m_cloud_base_height - 56 ) * 300, Unit_meters ); break;
case 81 ... 88 : Append( title, 9000 + ( m_cloud_base_height - 80 ) * 1500, Unit_meters ); break;
case 89 : Append( title, _("Greater than 21000 m") ); break;
case 90 ... 99 : disp_arr(cloud_bases,G_N_ELEMENTS(cloud_bases),m_cloud_base_height,90,title );
break;
default : break;
}
}
};
/// 9SSss -- Supplementary information
/// http://www.met.fu-berlin.de/~stefan/fm12.html#32
/// 9SPSPspsp -- Besondere Wettererscheinungen und zusätzliche Informationen (Gruppe kann mehrmals verschlüsselt werden)
HEADTK(9SSss) {
int m_figure ;
int m_value ;
public:
GENTK( 9SSss, "9[0-9]{2}[0-9/]{2}[;=]?" )
bool Parse( const char * str )
{
m_value = -1 ;
return ( 2 == sscanf( str, "9%2d%2d", &m_figure, &m_value ) )
|| ( 1 == sscanf( str, "9%2d//", &m_figure ) );
}
// TODO: Description of decoding alone takes about 100 lines.
// http://www.met.fu-berlin.de/~stefan/fm12.html#32
void Print() const {
Append( _("Figure"), m_figure );
Append( _("Value"), m_value );
}
};
/// 444 Group - National data, clouds.
HEADTK(444) {
public:
GENTK( 444, "444" )
bool Parse( const char * str )
{
return 0 == strcmp( str, "444" );
}
void Print() const {
Section( "National data, clouds" );
}
};
/// NCHHC
/// The coding can be more complicated, with several groups.
/// http://www.top-wetter.de/themen/synopschluessel.htm#444
HEADTK(NCHHC) {
char m_cloud_cover ;
char m_cloud_genus ;
int m_cloud_top_height ;
char m_cloud_characteristics ;
public:
GENTK( NCHHC, "[0-9][0-9][0-9]{2}[0-9][;=]?" )
bool Parse( const char * str )
{
m_cloud_cover = '0';
m_cloud_genus = '/';
m_cloud_top_height = 0 ;
m_cloud_characteristics = '/';
return ( 4 == sscanf( str, "%c%c%2d%c", &m_cloud_cover, &m_cloud_genus, &m_cloud_top_height, &m_cloud_characteristics ) );
}
void Print() const {
// N -- cloud cover
disp_arr(cloud_covers,G_N_ELEMENTS(cloud_covers),m_cloud_cover,'0',_("Cloud cover"));
// C -- genus of cloud
disp_arr(cloud_genuses,G_N_ELEMENTS(cloud_genuses),m_cloud_genus,'0',_("Cloud genus") );
// * hh -- height of cloud top
Append( _("Cloud top height"), m_cloud_top_height * 100, Unit_meters );
static const char * cloud_characteristics[] = {
_("Scattered clouds"), // Vereinzelte Wolken
_("Flat, closed cloud cover"), // Flache, geschlossene Wolkendecke
_("Shallow clouds with small apertures"), // Flache Wolkendecke mit kleinen Durchbrüchen
_("Shallow clouds with large openings"), // Flache Wolkendecke mit großen Durchbrüchen
_("Corrugated, solid cloud cover"), // Gewellte, geschlossene Wolkendecke
_("Undulating clouds with small apertures"), // Gewellte Wolkendecke mit kleinen Durchbrüchen
_("Undulating clouds with large openings"), // Gewellte Wolkendecke mit großen Durchbrüchen
_("Closed billows clouds"), // Geschlossene Wogenwolkendecke
_("Groups of waves of clouds"), // Gruppen von Wogenwolken
_("Several layers of clouds at different altitudes") // Mehrere Wolkenschichten in verschiedenen Höhen
};
disp_arr(cloud_characteristics,G_N_ELEMENTS(cloud_characteristics),m_cloud_characteristics,'0',_("Cloud characteristics") );
}
};
/// 555 Group - National code group
HEADTK(555) {
public:
GENTK( 555, "555" )
bool Parse( const char * str )
{
return 0 == strcmp( str, "555" );
}
void Print() const {
Section( _("National code group") );
}
};
/// 0sTTT_land -- Land surface temperature
/// s -- sign of temperature (0=positive, 1=negative)
/// TTT -- Temperature in .1 C
HEADTK(0sTTT_land) {
char m_temperature_sign ;
int m_temperature ;
public:
// TODO: Do not know why, string finished by a semicolon.
GENTK( 0sTTT_land, "0[01][0-9/]{3}[;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "0%c%3d", &m_temperature_sign, &m_temperature ) )
&& ( strchr( "01", m_temperature_sign ) != NULL )
&& CheckCelsius( m_temperature_sign, m_temperature );
}
void Print() const {
// s -- sign of temperature (0=positive, 1=negative)
// TTT -- Temperature in .1 C
AppCelsius( this, _("Land temperature 5 cm over surface"), m_temperature_sign, m_temperature );
}
};
/// 1RRRr -- Niederschlagsmenge in der letzten ganzen bzw. halben* Stunde
HEADTK(1RRRr) {
int m_precipitation_amount ;
char m_precipitation_duration ;
public:
GENTK( 1RRRr, "1[0-9/]{3}[0-9/][;=]?" )
bool Parse( const char * str )
{
m_precipitation_amount = -1 ;
m_precipitation_duration = '0' ;
return ( 2 == sscanf( str, "1%3d%c", &m_precipitation_amount, &m_precipitation_duration ) );
}
void Print() const {
// RRR -- Precipitation amount in mm : Niederschlagsmenge
const char * precip_amount = _("Precipitation amount");
switch( m_precipitation_amount ) {
default : Append( precip_amount, m_precipitation_amount / 10.0, Unit_mm );break;
case 999 : Append( precip_amount, _("Not measurable") );break;
}
const char * precip_dur = _("Precipitation duration");
// t -- Duration over which precipitation amount measured
switch( m_precipitation_duration ) {
case '0' ... '9' : Append( precip_dur, 6 * ( m_precipitation_duration - '0' ), Unit_minutes ); break;
default : Append( precip_dur, _("Undetermined") ); break;
}
}
};
/// 2sTTT_avg -- Tagesmittel der Lufttemperatur des Vortages
HEADTK(2sTTT_avg) {
char m_temperature_sign ;
int m_temperature ;
public:
GENTK( 2sTTT_avg, "2[01][0-9]{3}[;=]?" )
bool Parse( const char * str )
{
int nbMtch = sscanf( str, "2%c%3d", &m_temperature_sign, &m_temperature);
switch( nbMtch) {
case 0 : return false;
case 1 : return 0 == strcmp( str + 1, "////" );
case 2 : return CheckCelsius( m_temperature_sign, m_temperature );
default: return false;
}
}
/// s: sign of temperature (0=positive, 1=negative, 9 = RH). TTT: Temperature in .1 C (if sign is 9, TTT is relative humidity)
void Print() const {
AppCelsius( this, _("Daily mean air temperature of the previous day"), m_temperature_sign, m_temperature );
}
};
HEADTK(22fff) {
int m_wind_speed_meter_second;
public:
GENTK( 22fff, "22[0-9]{3}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "22%3d", &m_wind_speed_meter_second ) );
}
void Print() const {
Append( _("Wind speed 10 minutes average"), m_wind_speed_meter_second / 10.0, Unit_meters_second );
}
};
HEADTK(23SS) {
int m_sun_shine_duration;
public:
GENTK( 23SS, "23[0-9]{2}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "23%2d", &m_sun_shine_duration ) );
}
void Print() const {
Append( _("Total hours of sunshine duration"), m_sun_shine_duration, Unit_minutes );
}
};
HEADTK(24Wt) {
char m_precipitation_indicator;
char m_precipitation_duration;
public:
GENTK( 24Wt, "24[01236789]{2}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "24%c%c", &m_precipitation_indicator, &m_precipitation_duration ) );
}
void Print() const {
// WR -- Indikator zur Niederschlagsgruppe und Kennzeichnung der Niederschlagsform
static const char * Niederschlagsgruppen[] = {
_("Kein Niederschlag"),
_("Nur abgesetzte Niederschläge"),
_("Nur flüssige abgesetzte Niederschläge"),
_("Nur feste abgesetzte Niederschläge"),
_("Undefined"),
_("Undefined"),
_("Niederschlag in flüssiger Form"),
_("Niederschlag in fester Form"),
_("Niederschlag in flüssiger und fester Form"),
_("Niederschlagsmessung ausgefallen") };
// TODO: TRANSLATION
disp_arr(Niederschlagsgruppen,G_N_ELEMENTS(Niederschlagsgruppen),m_precipitation_indicator,'0',_("Precipitations group") );
// t -- Duration over which precipitation amount measured
display_precipitation( this, m_precipitation_duration );
}
};
/// 25wzwz -- zusätzliche Wettererscheinung (Gruppe kann bis zu 4-mal verschlüsselt werden):
HEADTK(25ww) {
int m_wetter_erscheinung;
public:
GENTK( 25ww, "25[0-9]{2}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "25%2d", &m_wetter_erscheinung ) );
}
void Print() const {
static const choice< int > wettererscheinungen[] = {
// Kondensstreifen
{ 1, _("Sich schnell auflösende Kondensstreifen (Lebensdauer < 1 Minute)") },
{ 2, _("Sich langsam auflösende Kondensstreifen (Lebensdauer 1 bis 14 Minuten)") },
{ 3, _("Beständige Kondensstreifen (Lebensdauer > 15 Minuten)") },
{ 4, _("Aufgelöste, vollständig in Cirrusbewölkung übergegangene Kondensstreifen") },
// Reif
{ 5, _("Strahlungsreif") },
{ 6, _("Advektionsreif") },
{ 7, _("Rauhreif") },
{ 8, _("Rauheis") },
{ 9, _("Klareis") },
// Decken aus festen Niederschlägen (> 50 % des Erdbodens bedeckend)
{15, _("Grieseldecke") },
{16, _("Eiskörnerdecke") },
{17, _("Graupeldecke") },
{18, _("Hageldecke") },
// Wettererscheinungen
{23, _("Eiskörner in der letzten Stunde") },
{24, _("Glatteisbildung in der letzten Stunde") },
{31, _("Sandfegen (unter Augenhöhe)") },
{32, _("Sandtreiben (über Augenhöhe)") },
{33, _("Sandverwehungen > 5 cm") },
{36, _("Schneeverwehungen > 20 cm") },
{45, _("nässender Nebel") },
// Glätteerscheinungen
{71, _("Reifglätte") },
{75, _("Schneeglätte") },
{76, _("Eisglätte (überfrierende Nässe)") },
{77, _("Glatteis (gefrierender Regen/Sprühregen)") },
{81, _("Gefrierender Schauerniederschlag") },
// sonstige Erscheinungen
{99, _("Böenwalze") }
};
Append( _("Zusätzliche Wettererscheinung"),
choice_map( wettererscheinungen, G_N_ELEMENTS(wettererscheinungen), m_wetter_erscheinung, _("Undefined") ) );
// TODO: TRANSLATION
}
};
/// 26fff -- mittlere Windgeschwindigkeit der letzten Stunde in 1/10 m/s
HEADTK(26fff) {
int m_wind_speed_meter_second;
public:
GENTK( 26fff, "22[0-9]{3}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "26%3d", &m_wind_speed_meter_second ) );
}
void Print() const {
Append( _("Last hour average wind speed"),
m_wind_speed_meter_second / 10.0, Unit_meters_second );
}
};
/// 3LGLGLsLs -- Anzahl der registrierten Blitze in den letzten 30 Minuten
/// LG LG -- Gesamtzahl der Blitze
/// Ls Ls -- Anzahl der Blitze starker Intensität
HEADTK(3LLLL) {
int m_Gesamtzahl_der_Blitze;
int m_Anzahl_der_Blitze_starker_Intensitaet;
public:
GENTK( 3LLLL, "3[0-9]{4}[;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "2%2d%2d", &m_Gesamtzahl_der_Blitze, &m_Anzahl_der_Blitze_starker_Intensitaet ) );
}
void Print() const {
Append( _("Number of flashes"), m_Gesamtzahl_der_Blitze );
Append( _("Number of high-intensity flashes"), m_Anzahl_der_Blitze_starker_Intensitaet );
}
};
/*
* 4RwRwwzwz -- Wasseräquivalent der Schneedecke und zusätzliche Wettererscheinungen
Rw Rw -- Spezifisches Wasseräquivalent der Schneedecke in 1/10 mm/cm
wz wz -- zusätzliche Wettererscheinung:
Kondensstreifen
01 -- sich schnell auflösende Kondensstreifen
02 -- sich langsam auflösende Kondensstreifen
03 -- beständige Kondensstreifen
04 -- aufgelöste, in Cirrusbewölkung übergegangene Kondensstreifen
Reif
05 -- Strahlungsreif
06 -- Advektionsreif
07 -- Rauhreif
08 -- Rauheis
09 -- Klareis
Decken aus festen Niederschlägen (> 50 % des Erdbodens bedeckend)
15 -- Grieseldecke
16 -- Eiskörnerdecke
17 -- Graupeldecke
18 -- Hageldecke
Wettererscheinungen
23 -- Eiskörner in der letzten Stunde
24 -- Glatteisbildung in der letzten Stunde
31 -- Sandfegen, unter Augenhöhe
32 -- Sandtreiben, über Augenhöhe
33 -- Sandverwehungen > 5 cm
36 -- Schneeverwehungen > 20 cm
Glätteerscheinungen
71 -- Reifglätte
75 -- Schneeglätte
76 -- Eisglätte (überfrierende Nässe)
77 -- Glatteis (gefrierender Regen/Sprühregen)
81 -- gefrierender Schauerniederschlag
sonstige Erscheinungen
99 -- Böenwalze
* 5s's's'tR -- Neuschneehöhe
Hinweis: Mit dieser Gruppe wird in der Regel um 06 UTC die 24-stündige und um 18 UTC die 12-stündige Neuschneehöhe gemeldet.
s's's' -- Neuschneehöhe in cm (997 = < 0.5 cm, 998 = Flecken oder Reste, 999 = Angabe nicht möglich)
tR -- Bezugszeitraum, über welche die Neuschneehöhe gemessen wurde:
0 -- nicht aufgeführter oder vor dem Termin endender Zeitraum
1 -- 6 Stunden
2 -- 12 Stunden
3 -- 18 Stunden
4 -- 24 Stunden
5 -- 1 Stunde bzw. 30 Minuten (bei Halbstundenterminen)
6 -- 2 Stunden
7 -- 3 Stunden
8 -- 9 Stunden
9 -- 15 Stunden
/ -- Sondermessung wegen Überschreitung des Schwellenwerts (> 5 cm bzw. 10 cm in < 12 Stunden)
* 7h'h'ZD' -- Dunst, Talnebel und Wolken unterhalb des Stationsniveaus
h'h' -- Höhe der Obergrenze der Erscheinung über NN
Z -- Entwicklung von Dunst, Talnebel und Wolken unterhalb des Stationsniveaus
D' -- Sektor des Hauptanteils der Bedeckung mit der Erscheinung
* 8Ns/hshs -- automatisch ermittelte Höhe von Wolkenschichten (Gruppe kann mehrmals verschlüsselt werden)
Ns -- Bedeckungsgrad der Wolkenschicht in Achteln
hs hs -- Höhe der Wolkenuntergrenze:
00 -- < 30 m (< 100 ft)
01 -- 30 m (100 ft)
02 -- 60 m (200 ft)
03 -- 90 m (300 ft)
...
50 -- 1500 m (5000 ft)
======================
56 -- 1800 m (6000 ft)
57 -- 2100 m (7000 ft)
...
80 -- 9000 m (30000 ft)
=======================
81 -- 10500 m (35000 ft)
82 -- 12000 m (40000 ft)
...
88 -- 21000 m (70000 ft)
89 -- höher als 21000 m (> 70000 ft)
====================================
90 -- 0 bis 49 m (0 - 166 ft)
91 -- 50 bis 99 m (167 - 333 ft)
92 -- 100 bis 199 m (334 - 666 ft)
93 -- 200 bis 299 m (667 - 999 ft)
94 -- 300 bis 599 m (1000 - 1999 ft)
95 -- 600 bis 999 m (2000 - 3333 ft)
96 -- 1000 bis 1499 m (3334 - 4999 ft)
97 -- 1500 bis 1999 m (5000 - 6666 ft)
98 -- 2000 bis 2499 m (6667 - 8333 ft)
99 -- 2500 m oder höher (> 8334 ft)
* 910ff -- Höchste Windspitze in den letzten 10 Minuten (wird immer gemeldet!)
*/
/// 911ff -- Höchste Windspitze in der letzten Stunde (wird immer gemeldet!)
HEADTK(911ff) {
int m_hoechste_windspitze_letzten_stunde;
public:
GENTK( 911ff, "911[0-9]{2}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "911%2d", &m_hoechste_windspitze_letzten_stunde ) );
}
void Print() const {
Append( _("Last hour maximum wind speed"),
m_hoechste_windspitze_letzten_stunde, Unit_meters_second );
}
};
/// 912ff -- Höchstes 10-Minuten-Mittel der Windgeschwindigkeit in der letzten Stunde (wird immer gemeldet!)
HEADTK(912ff) {
int m_hoechste_10mn_wind_geschwindigkeit_letzten_stunde;
public:
GENTK( 912ff, "912[0-9]{2}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "912%2d", &m_hoechste_10mn_wind_geschwindigkeit_letzten_stunde ) );
}
void Print() const {
Append( _("Last hour ten minutes average wind speed"),
m_hoechste_10mn_wind_geschwindigkeit_letzten_stunde, Unit_meters_second );
}
};
/*
* PIC INp -- Wolkenbedeckung von Bergen (Gruppe kann bis zu 2-mal verschlüsselt werden)
I -- Kennziffer und Richtung des Berges
Np -- Bedeckungsgrad des Berges mit Wolken in Achteln
* BOT hesnTTT -- Temperaturen im Erdboden (werden immer gemeldet!)
he -- Meßtiefe:
0 -- 0 cm
1 -- 5 cm
2 -- 10 cm
3 -- 20 cm
4 -- 50 cm
5 -- 100 cm
6 -- 200 cm
sn -- Vorzeichen der Erdbodentemperatur (0 = positiv, 1 = negativ)
TTT -- Erdbodentemperatur der angegebenen Meßtiefe in 1/10 Grad Celsius
* 80000 -- Kenngruppe für ergänzende klimatologische Meß- und Beobachtungsdaten für die Klimaroutinen
* 1RRRRWR -- 6-stündiger Niederschlag
Hinweis: Diese Gruppe wird zu den Hauptterminen (00, 06, 12, 18 UTC) gemeldet.
RRRR -- Niederschlagsmenge in 1/10 mm (0000 = trocken, 9999 = < 0.05 mm)
WR -- Indikator zur Niederschlagsgruppe und Kennzeichnung der Niederschlagsform:
0 -- kein Niederschlag
1 -- nur abgesetzte Niederschläge (flüssig und fest)
2 -- nur flüssige abgesetzte Niederschläge
3 -- nur feste abgesetzte Niederschläge
6 -- gefallener Niederschlag in flüssiger Form
7 -- gefallener Niederschlag in fester Form
8 -- gefallener Niederschlag in flüssiger und fester Form
9 -- Niederschlagsmessung ausgefallen
* 2SSSS -- Tagessumme der Sonnenscheindauer des Vortags in Minuten (wird um 06 UTC gemeldet)
* 3fkfkfk< -- Höchste Windspitze des Vortags (00 - 24 UTC) in 1/10 m/s (wird um 06 UTC gemeldet)
* 4fxkfxkfxk -- Höchstes 10-Minuten-Mittel der Windgeschwindigkeit des Vortags (00 - 24 UTC) in 1/10 m/s (wird um 06 UTC gemeldet)
* 5RwRw -- Spezifisches Wasseräquivalent der Schneedecke in 1/10 mm/cm (wird nur montags, mittwochs und freitags um 06 UTC gemeldet, wenn die Schneehöhe mindestens 5 cm beträgt)
* 6VAVAVBVBV CVC --
Niederschläge und Wettererscheinungen des Vortags (werden um 06 UTC gemeldet)
VAVA -- Gefallener Niederschlag des Vortags (00 - 24 UTC):
000 -- kein gefallener Niederschlag
001 -- Regen (Sprüh-/Nieselregen, Regen, Regentropfen)
002 -- gefrierender Regen (gefrierender Sprüh-/Nieselregen, gefrierender Regen)
004 -- Schnee (Schnee, Schneekristalle, Schneeflocken)
008 -- Graupel (Schneegriesel, Reifgraupel, Frostgraupel, Eiskörner)
016 -- Hagel
Hinweis: Bei gleichzeitigem Auftreten mehrerer Niederschlagsarten werden die jeweiligen Schlüsselzahlen addiert, z. B.: Regen und Schnee und Graupel = 001 + 004 + 008 = 013
VBVB -- Abgesetzter oder abgelagerter Niederschlag des Vortags (00 - 24 UTC):
000 -- kein abgesetzter oder abgelagerter Niederschlag
001 -- Tau (Strahlungstau, Advektionstau, weißer Tau)
002 -- Reif (Strahlungsreif, Advektionsreif)
004 -- Rauhreif/Rauhfrost
008 -- Rauheis/Klareis
016 -- Glatteis/Eisglätte
032 -- Decke aus festen Niederschlägen (mindestens 50 % des Bodens bedeckend)
Hinweis: Bei gleichzeitigem Auftreten mehrerer abgesetzter Niederschläge werden die jeweiligen Schlüsselzahlen addiert, z. B.: Tau und Reif sowie Schneedecke = 001 + 002 + 032 = 035
VCVC -- Sonstige Wettererscheinungen des Vortags (00 - 24 UTC):
000 -- keine sonstigen Wettererscheinungen
001 -- Nebel (Nebel, Nebeltreiben)
002 -- Gewitter (Nahgewitter, Ferngewitter)
004 -- starker Wind (Windstärke 6 und 7 im 10-Min.-Mittel)
008 -- stürmischer Wind (Windstärke > 8 im 10-Min.-Mittel)
Hinweis: Bei gleichzeitigem Auftreten mehrerer Wettererscheinungen werden die jeweiligen Schlüsselzahlen addiert, z. B.: Gewitter und stürmischer Wind = 002 + 008 = 010
* 7snTxkTxkTxk -- Maximumtemperatur des Vortags (00 - 24 UTC) (wird um 06 UTC gemeldet)
sn -- Vorzeichen der Temperatur (0 = positiv, 1 = negativ)
Txk Txk Txk -- Maximumtemperatur in 1/10 Grad Celsius
* 8snTnkTnkTnk -- Minimumtemperatur des Vortags (00 - 24 UTC) (wird um 06 UTC gemeldet)
sn -- Vorzeichen der Temperatur (0 = positiv, 1 = negativ)
Tnk Tnk Tnk -- Minimumtemperatur in 1/10 Grad Celsius
* 9snTgTgTgsTg -- Minimumtemperatur des Vortags (00 - 24 UTC) 5 cm über dem Erdboden bzw. der Schneedecke (wird um 06 UTC gemeldet)
sn -- Vorzeichen der Temperatur (0 = positiv, 1 = negativ)
Tg Tg Tg -- Erdbodenminimumtemperatur in 1/10 Grad Celsius
sTg -- Bedeckung des Temperaturmeßfühlers 5 cm über dem Erdboden mit Schnee oder Eis am Vortag (0 = nein, 1 = ja, / = Angabe nicht möglich)
*/
/// Abschnitt 6 - Automatisch erzeugte Daten
HEADTK(666) {
public:
GENTK( 666, "666" )
bool Parse( const char * str )
{
return 0 == strcmp( str, "666" );
}
void Print() const {
Section( _("Automatisch erzeugte Daten") );
}
};
/// 1snTxTxTx -- Maximumtemperatur der letzten Stunde
/// sn -- Vorzeichen der Temperatur (0 = positiv, 1 = negativ)
/// Tx Tx Tx -- Maximumtemperatur in 1/10 Grad Celsius
HEADTK(1snTxTxTx) {
char m_temperature_sign ;
int m_temperature;
public:
GENTK( 1snTxTxTx, "1[01][0-9]{3}[;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "1%c%3d", &m_temperature_sign, &m_temperature) )
&& CheckCelsius( m_temperature_sign, m_temperature );
}
void Print() const {
AppCelsius( this, _("Last hour maximum temperature"), m_temperature_sign, m_temperature );
}
};
/// 2snTnTnTn -- Minimumtemperatur der letzten Stunde
/// sn -- Vorzeichen der Temperatur (0 = positiv, 1 = negativ)
/// Tn Tn Tn -- Minimumtemperatur in 1/10 Grad Celsius
HEADTK(2snTxTxTx) {
char m_temperature_sign ;
int m_temperature;
public:
GENTK( 2snTxTxTx, "2[01][0-9]{3}[;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "2%c%3d", &m_temperature_sign, &m_temperature) )
&& CheckCelsius( m_temperature_sign, m_temperature );
}
void Print() const {
AppCelsius( this, _("Last hour minimum temperature"), m_temperature_sign, m_temperature );
}
};
/// 3snTnTnTn -- Minimumtemperatur 5 cm über dem Erdboden bzw. der Schneedecke in der letzten Stunde
/// sn -- Vorzeichen der Temperatur (0 = positiv, 1 = negativ)
/// Tn Tn Tn -- Erdbodenminimumtemperatur in 1/10 Grad Celsius
/// 6VMxVMxVMxVMx/ VMnVMnVMnVMn> -- automatisch gemessene maximale/minimale meteorologische Sichtweite (MOR) der letzten ganzen bzw. halben Stunde (nur bei Halbstundenterminen) in m
/// 7VMVMVMVM -- automatisch gemessene meteorologische Sichtweite (MOR) in m
HEADTK(7VVVV) {
int m_MOR;
public:
GENTK( 7VVVV, "7[0-9/]{4}[;=]?" )
bool Parse( const char * str )
{
m_MOR = -1;
return ( 1 == sscanf( str, "7%4d", &m_MOR ) )
|| ( 0 == strncmp( str, "7////", 5 ) );
}
void Print() const {
if(m_MOR >= 0)
Append( _("MOR"), m_MOR, Unit_meters );
else
Append( _("MOR"), _("Undetermined") );
}
};
/*
* 80000 -- Kenngruppe für automatisch erzeugte Niederschlagsdaten
* 0RRRrx 1RRRrx 2RRRrx 3RRRrx 4RRRrx 5RRRrx
0, 1, 2, 3, 4, 5 (Gruppenkennziffer) -- Kennung der Zeitabschnitte der letzten Stunde:
0 -- 0. bis 9. Minute
1 -- 10. bis 19. Minute
2 -- 20. bis 29. Minute
3 -- 30. bis 39. Minute
4 -- 40. bis 49. Minute
5 -- 50. bis 59. Minute
RRR -- 10-minütige Niederschlagshöhe in 1/10 mm
rx -- Niederschlagsdauer im jeweiligen Zeitabschnitt in Minuten (0 = 10 Minuten bzw. kein Niederschlag gemessen)
*/
HEADTK(1VVff) {
int m_visibility_metres;
int m_gust_speed_knots;
public:
GENTK( 1VVff, "1[0-9/][0-9/]{3}" )
bool Parse( const char * str )
{
m_visibility_metres = 0;
m_gust_speed_knots = 0;
if( 0 == strcmp( str, "1////" ) ) return true ;
if( str[1] == '/' ) {
return ( 1 == sscanf( str, "1/%3d", &m_gust_speed_knots ) );
} else {
return ( 2 == sscanf( str, "1%2d%2d", &m_visibility_metres, &m_gust_speed_knots ) );
}
}
void Print() const {
Append( _("Visibility"), m_visibility_metres, Unit_meters );
Append( _("Maximum gust speed in past 24 hours"), m_gust_speed_knots, Unit_knots );
}
};
HEADTK(110ff) {
int m_wind_speed_knots;
public:
GENTK( 110ff, "110[0-9]{2}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "110%2d", &m_wind_speed_knots ) );
}
void Print() const {
Append( _("Wind speed at 10 meters"), m_wind_speed_knots, Unit_knots );
}
};
HEADTK(220ff) {
int m_wind_speed_knots;
public:
GENTK( 220ff, "220[0-9]{2}[;=]?" )
bool Parse( const char * str )
{
return ( 1 == sscanf( str, "220%2d", &m_wind_speed_knots ) );
}
void Print() const {
Append( _("Wind speed at 20 meters"), m_wind_speed_knots, Unit_knots );
}
};
HEADTK(3GGmm) {
int m_end_measure_hour;
int m_end_measure_minute;
public:
GENTK( 3GGmm, "3[0-2][0-9][0-5][0-9][;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "3%2d%2d", &m_end_measure_hour, &m_end_measure_minute ) )
&& ( m_end_measure_hour < 25 );
}
void Print() const {
Append( _("Time of peak wind since last observation"), hour_min( m_end_measure_hour, m_end_measure_minute ) );
}
};
HEADTK(4ddff) {
int m_peak_direction_degrees;
int m_peak_speed_knots;
public:
GENTK( 4ddff, "4[0-9]{4}[;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "4%3d%3d", &m_peak_direction_degrees, &m_peak_speed_knots ) );
}
void Print() const {
Append( _("Direction"), 10.0 * m_peak_direction_degrees, Unit_degrees );
Append( _("Speed"), m_peak_speed_knots, Unit_knots );
}
};
/// End time in hours and minutes of the latest 10-minute continuous wind measurements.
HEADTK(6GGmm) {
int m_end_measure_hour;
int m_end_measure_minute;
public:
/// More details: http://atmo.tamu.edu/class/atmo251/BuoyCode.pdf
GENTK( 6GGmm, "6[0-2][0-9][0-5][0-9][;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "6%2d%2d", &m_end_measure_hour, &m_end_measure_minute ) )
&& ( m_end_measure_hour < 25 );
}
void Print() const {
Append( _("End time of latest 10-minute continuous wind measurement"), hour_min( m_end_measure_hour, m_end_measure_minute ) );
}
};
/// 6 10-minute continuous wind measurements
HEADTK(dddfff) {
int m_direction_degrees;
int m_speed_knots;
public:
GENTK( dddfff, "[0-9]{6}[;=]?" )
bool Parse( const char * str )
{
return ( 2 == sscanf( str, "%3d%3d", &m_direction_degrees, &m_speed_knots ) );
}
void Print() const {
Append( _("Direction"), m_direction_degrees, _("degrees") );
Append( _("Speed"), m_speed_knots, _("knots") );
}
};
// ----------------------------------------------------------------------------
/// Contains a Synop group and its length.
struct synop_group {
size_t m_usage_counter; // How many times did it match an input section. For debugging.
section_t m_section ;
size_t m_nb_toks ;
const TOKGEN * m_tks ;
synop_group( section_t g, size_t n, const TOKGEN * t )
: m_usage_counter(0), m_section(g), m_nb_toks(n), m_tks(t) {}
friend std::ostream & operator<<( std::ostream & ostrm, const synop_group & syn ) {
for( size_t i =0 ; i < syn.m_nb_toks; ++i ) {
ostrm << RegexT::Name( syn.m_tks[i].m_rgx_idx ) << "-";
}
return ostrm;
}
};
/// Contains all patterns of Synop sections. We hold a buffer of the last words and try to match
/// it against all known patterns.
static std::vector< synop_group > arrSynopGroups ;
/// This defines a pattern which might mpatch a list of Synop tokens, i.e. a Synop section.
#define TKLST(g, ... ) \
{ \
static const TOKGEN hiddenTokGen[] = { __VA_ARGS__ }; \
arrSynopGroups.push_back( synop_group( g, G_N_ELEMENTS(hiddenTokGen), hiddenTokGen ) ); \
}
static const void init_patterns(void)
{
static bool init = false ;
if( init ) return ;
init = true ;
TKLST( SECTION_ZCZC_DLM,TK1(ZCZC),TK1(ZCZC_id) );
TKLST( SECTION_NNNN_DLM,TK1(NNNN) );
// http://www.nws.noaa.gov/tg/segment.html
TKLST( SECTION_HEAD_GRP,TK1(TTAAii),TK1(CCCC),TK1(YYGGgg),TK1(RRx) );
TKLST( SECTION_HEAD_GRP,TK1(TTAAii),TK1(CCCC),TK1(YYGGgg),TK1(CCx) );
TKLST( SECTION_HEAD_GRP,TK1(TTAAii),TK1(CCCC),TK1(YYGGgg),TK1(AAx) );
TKLST( SECTION_HEAD_GRP,TK1(TTAAii),TK1(CCCC),TK1(YYGGgg),TK1(Pxx) );
TKLST( SECTION_IDENTLOC,TK1(IIiii),TK1(YYGGi),TK1(99LLL),TK1(QLLLL) );
// http://atmo.tamu.edu/class/atmo251/LandSynopticCode.pdf
// TODO: NOT SURE IIiii should be added at the end.
TKLST( SECTION_IDENTLOC,TK1(AAXX),TK1(YYGGi) );
// http://www.ominous-valve.com/wx_codes.txt
// Can be followed by the callsign or the station id.
TKLST( SECTION_IDENTLOC,TK1(BBXX),TK1(IIIII),TK1(YYGGi),TK1(99LLL),TK1(QLLLL) );
// IIIII is the callsign.
// OOXX D....D YYGGiw 99LaLaLa QcLoLoLoLo MMMULaULo h0h0h0h0im
TKLST( SECTION_IDENTLOC,TK1(OOXX),TK1(IIIII),TK1(YYGGi),TK1(99LLL),TK1(QLLLL),TK1(MMMULaULo),TK1(h0h0h0h0im) );
// According to http://atmo.tamu.edu/class/atmo251/LandSynopticCode.pdf
// - 00fff is optional.
// - 2sTTT_dew can be replaced by 29UUU
// - 4PPPP can be replaced by 4a3hhh
// - 7WWWW can be replaced by 7wwWW
// - 9GGgg is optional
TKLST( SECTION_LAND_OBS,TK1(iihVV),TK1(Nddff),TK1(00fff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(6RRRt),TK1(7wwWW),TK1(8NCCC),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(NIL) ); // 10
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(6RRRt),TK1(7wwWW),TK1(8NCCC),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(6RRRt),TK1(8NCCC),TKn(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(7wwWW),TK1(8NCCC),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(7wwWW),TK1(9GGgg) ); // 61
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(6RRRt),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(8NCCC),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(6RRRt),TK1(7wwWW),TK1(8NCCC),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(7wwWW),TK1(8NCCC),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(4PPPP),TK1(8NCCC),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(5appp) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(3PPPP),TK1(9GGgg) );
// http://allaboutweather.tripod.com/synopcode.htm
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(4PPPP),TK1(5appp),TK1(6RRRt),TK1(7wwWW),TK1(8NCCC) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(4PPPP),TK1(5appp),TK1(6RRRt),TK1(8NCCC) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(4PPPP),TK1(5appp),TK1(7wwWW),TK1(8NCCC),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(4PPPP),TK1(5appp),TK1(8NCCC) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(4PPPP),TK1(5appp),TK1(9GGgg) );
// 01078 11470 30310 11045 21077 5//// 69941 70182 82360 333 91114=
// A: Publish: Error, no coordinates. kmlNam= descrTxt= m_nb_tokens=5:Land observations=6RRRt#69941+7wwWW#70182+8NCCC#82360+;Climatological data=333#333+9SSss#91114+;
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(4PPPP),TK1(7wwWW),TK1(8NCCC) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(4PPPP),TK1(8NCCC) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(4PPPP),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(5appp),TK1(6RRRt),TK1(7wwWW),TK1(8NCCC) ); // 21
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(6RRRt),TK1(7wwWW),TK1(8NCCC) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(2sTTT_dew),TK1(6RRRt),TK1(8NCCC) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(3PPPP),TK1(4PPPP),TK1(5appp),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(4PPPP),TK1(5appp),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(1sTTT_air),TK1(9GGgg) );
TKLST( SECTION_LAND_OBS,TK1(IIiii),TK1(iihVV),TK1(Nddff),TK1(4PPPP),TK1(5appp),TK1(9GGgg) );
// According to http://atmo.tamu.edu/class/atmo251/LandSynopticCode.pdf
// - 0sTTT is optional.
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(1PPHH),TK1(2PPHH),TK1(3dddd),TK1(4PPHH),TK1(5PPHH),TK1(6IEER),TK1(70HHH),TK1(8aTTT) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(1PPHH),TK1(2PPHH),TK1(3dddd),TK1(4PPHH),TK1(5PPHH),TK1(6IEER),TK1(8aTTT),TK1(ICE),TK1(cSbDz) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(1PPHH),TK1(2PPHH),TK1(3dddd),TK1(4PPHH),TK1(70HHH),TK1(8aTTT) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(1PPHH),TK1(70HHH),TK1(8aTTT) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(2PPHH),TK1(3dddd),TK1(4PPHH),TK1(5PPHH),TK1(6IEER),TK1(8aTTT),TK1(ICE),TK1(cSbDz) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(2PPHH),TK1(3dddd),TK1(4PPHH),TK1(5PPHH),TK1(8aTTT),TK1(ICE),TK1(cSbDz) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(2PPHH),TK1(3dddd),TK1(4PPHH),TK1(8aTTT),TK1(ICE),TK1(cSbDz) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(2PPHH),TK1(3dddd),TK1(8aTTT) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(2PPHH),TK1(70HHH) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(2PPHH),TK1(8aTTT) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(3dddd),TK1(4PPHH) ); // 66
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(0sTTT),TK1(8aTTT),TK1(ICE),TK1(cSbDz) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(1PPHH),TK1(2PPHH),TK1(3dddd),TK1(4PPHH),TK1(5PPHH),TK1(6IEER),TK1(70HHH),TK1(8aTTT) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(1PPHH),TK1(70HHH) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(2PPHH),TK1(3dddd),TK1(4PPHH),TK1(8aTTT) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(2PPHH),TK1(70HHH) );
TKLST( SECTION_SEA_SURF,TK1(222Dv),TK1(ICE),TK1(cSbDz) );
// http://allaboutweather.tripod.com/synopcode.htm
// 333 1snTxTxTx (at 1800 UTC) 2snTnTnTn (at 0600 UTC) 3EsnTgTg (at 0600 UTC) 4E'sss (at 0600 UTC) 8NsChshs 9SpSpspsp
// - SECTION 5
// 555 1V'f'/V'f''f'' 2snTwTwTw iiirrr
/// BEWARE: jjjjj COULD BE REPEATED ! Or only with 55jjj ??
// According to http://atmo.tamu.edu/class/atmo251/LandSynopticCode.pdf
// - 0____ is optional.
// - jjjjj is optional.
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(0____),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(0____),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(4Esss),TK1(55jjj),TK1(jjjjj),TK1(6RRRtb),TK1(7RRRR),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(0____),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(4Esss),TK1(5jjjj),TK1(6RRRtb),TK1(7RRRR),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(0____),TK1(55jjj),TK1(jjjjj),TK1(8NChh),TK1(9SSss) );
// http://www.top-wetter.de/themen/synopschluessel.htm
// 333 0.... 1sTTT 2sTTT 3EsTT 4E'sss 55SSS 2FFFF 3FFFF 4FFFF 553SS 2FFFF 3FFFF 4FFFF 6RRRt 7RRRR 8NChh 9SSss
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(553SS),TK1(2FFFF),TK1(3FFFF),TK1(4FFFF),TKn(8NChh) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(553SS),TK1(2FFFF),TK1(3FFFF),TK1(6RRRt),TKn(8NChh) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(553SS),TK1(2FFFF),TK1(7RRRR),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(55jjj),TK1(jjjjj),TK1(6RRRtb),TK1(7RRRR),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(55jjj),TK1(jjjjj),TK1(7RRRR),TK1(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(6RRRtb),TK1(7RRRR),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(3Ejjj),TK1(6RRRtb),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(4Esss),TK1(7RRRR) ); // 51
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(553SS),TK1(2FFFF),TK1(3FFFF),TK1(6RRRt),TK1(8NChh) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(553SS),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(6RRRtb),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(55jjj),TK1(jjjjj),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(6RRRtb),TK1(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(7RRRR),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(2sTTT_min),TK1(8NChh) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(3Ejjj),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(553SS),TK1(2FFFF),TK1(8NChh) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(55jjj),TK1(jjjjj),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TKn(5jjjj),TKn(8NChh),TK1(9SSss) ); // 61
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TKn(5jjjj),TK1(6RRRtb),TKn(8NChh),TK1(9SSss) ); // 63
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(6RRRtb) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TKn(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(1sTTT_max),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(3Ejjj),TK1(4Esss),TK1(5jjjj),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(3Ejjj),TK1(55jjj),TK1(jjjjj),TK1(7RRRR) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(3Ejjj),TK1(5jjjj),TK1(55jjj),TK1(jjjjj),TK1(7RRRR),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(3Ejjj),TK1(5jjjj),TK1(6RRRtb),TK1(7RRRR),TK1(8NChh) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(4Esss),TK1(7RRRR),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(5jjjj),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(55jjj),TK1(jjjjj),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(553SS),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(2sTTT_min),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(3Ejjj),TK1(4Esss),TK1(55jjj),TK1(jjjjj),TK1(3FFFF),TK1(553SS),TK1(2FFFF),TK1(3FFFF),TK1(6RRRt) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(3Ejjj),TK1(4Esss),TK1(553SS),TK1(6RRRt),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(3Ejjj),TK1(553SS),TK1(6RRRtb),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(3Ejjj),TK1(553SS),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(3Ejjj),TK1(55jjj),TK1(jjjjj),TK1(3FFFF),TK1(553SS),TK1(2FFFF),TK1(3FFFF),TK1(6RRRt),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(3Ejjj),TK1(55jjj),TK1(jjjjj),TK1(553SS),TK1(2FFFF),TK1(6RRRt),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(3Ejjj),TK1(55jjj),TK1(jjjjj),TK1(7RRRR),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(3Ejjj),TK1(55jjj),TK1(jjjjj),TK1(553SS),TK1(6RRRtb),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(4Esss),TK1(553SS),TK1(6RRRtb),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(4Esss),TK1(55jjj),TK1(jjjjj),TK1(553SS),TK1(6RRRtb),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(4Esss),TK1(6RRRtb),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(553SS),TK1(2FFFF),TK1(3FFFF),TK1(6RRRt),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(553SS),TK1(2FFFF),TK1(3FFFF),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(553SS),TK1(2FFFF),TK1(6RRRt),TKn(8NChh) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(553SS),TK1(2FFFF),TKn(8NChh) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(553SS),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(553SS),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(5jjjj),TK1(6RRRtb) );
TKLST( SECTION_CLIM_DAT,TK1(333),TKn(5jjjj),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(55jjj),TK1(jjjjj),TK1(2sTTT_min),TK1(3Ejjj),TK1(6RRRtb),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(55jjj),TK1(jjjjj),TK1(3Ejjj),TK1(6RRRtb),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(55jjj),TK1(jjjjj),TK1(3Ejjj),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(55jjj),TK1(jjjjj),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(6RRRtb),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TK1(6RRRtb),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TKn(8NChh),TKn(9SSss) );
TKLST( SECTION_CLIM_DAT,TK1(333),TKn(9SSss) );
// http://www.top-wetter.de/themen/synopschluessel.htm#444
TKLST( SECTION_NATCLOUD,TK1(444),TK1(NCHHC) );
// NOT SURE AT ALL.
// http://allaboutweather.tripod.com/synopcode.htm
TKLST( SECTION_NAT_CODE,TK1(555),TK1(1VVff),TK1(2sTTT_avg),TK1(3Ejjj),TK1(4Esss),TKn(5jjjj),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_NAT_CODE,TK1(555),TK1(1VVff),TK1(2sTTT_avg),TK1(3Ejjj),TKn(5jjjj),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_NAT_CODE,TK1(555),TK1(1VVff),TKn(8NChh),TK1(9SSss) );
TKLST( SECTION_NAT_CODE,TK1(555),TK1(2sTTT_avg),TK1(5jjjj),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_NAT_CODE,TK1(555),TK1(3Ejjj),TK1(4Esss),TK1(55jjj),TK1(jjjjj),TK1(8NChh),TK1(9SSss) );
TKLST( SECTION_NAT_CODE,TK1(555),TK1(3Ejjj),TKn(8NChh),TK1(9SSss) );
TKLST( SECTION_NAT_CODE,TK1(555),TK1(9SSss) );
// http://metaf2xml.sourceforge.net/parser.pm.html
// AT: 1snTxTxTx 6RRR/
// 1snTxTxTx : maximum temperature on the previous day from 06:00 to 18:00 UTC
// 6RRR/ : amount of precipitation on the previous day from 06:00 to 18:00 UTC
// BE: 1snTxTxTx 2snTnTnTn
// 1snTxTxTx : maximum temperature on the next day from 00:00 to 24:00 UTC
// 2snTnTnTn : minimum temperature on the next day from 00:00 to 24:00 UTC
// CA: 1ssss 2swswswsw 3dmdmfmfm 4fhftftfi
// 1ssss : amount of snowfall, in tenths of a centimeter, for the 24-hour period ending at 06:00 UTC
// 2swswswsw : amount of water equivalent, in tenths of a millimeter, for the 24-hour snowfall ending at 06:00 UTC
// 3dmdmfmfm : maximum (mean or gust) wind speed, in knots, for the 24-hour period ending at 06:00 UTC and its direction
// 4fhftftfi : together with the previous group, the hundreds digit of the maximum wind speed (in knots),
// the time of occurrence of the maximum wind speed, and the speed range
// of the maximum two-minute mean wind speed, for the 24-hour period ending at 06:00 UTC and its direction
// US land: RECORD* 0ittDtDtD 1snTT snTxTxsnTnTn RECORD* 2R24R24R24R24 44snTwTw 9YYGG
// RECORD : indicator for temperature record(s)
// 0ittDtDtD : tide data
// 1snTT snTxTxsnTnTn RECORD* 2R24R24R24R24 : city data: temperature, maximum and minimum temperature,
// indicator for temperature record(s), precipitation last 24 hours
// 44snTwTw : water temperature
// 9YYGG : additional day and hour of observation (repeated from Section 0)
// US sea: 11fff 22fff 3GGgg 4ddfmfm 6GGgg dddfff dddfff dddfff dddfff dddfff dddfff 8ddfmfm 9GGgg
// 11fff 22fff : equivalent wind speeds at 10 and 20 meters
// 3GGgg 4ddfmfm : maximum wind speed since the last observation and the time when it occurred
// 6GGgg : end time of the latest 10-minute continuous wind measurements
// 6 x dddfff : 6 10-minute continuous wind measurements
// 8ddfmfm 9GGgg : highest 1-minute wind speed and the time when it occurred
// CZ: 1dsdsfsfs 2fsmfsmfsxfsx 3UU// 5snT5T5T5 6snT10T10T10 7snT20T20T20 8snT50T50T50 9snT100T100T100
// 1dsdsfsfs : wind direction and speed from tower measurement
// 2fsmfsmfsxfsx : maximum wind gust speed over 10 minute period and the period W1W2
// 3UU// : relative humidity
// 5snT5T5T5 6snT10T10T10 7snT20T20T20 8snT50T50T50 9snT100T100T100 : soil temperature at the depths of 5, 10, 20, 50, and 100 cm
// RU: 1EsnT'gT'g 2snTnTnTn 3EsnTgTg 4E'sss 52snT2T2 6RRRtR 7R24R24R24/ 88R24R24R24
// 1EsnT'gT'g : state of the ground without snow or measurable ice cover, temperature of the ground surface
// 2snTnTnTn : minimum temperature last night
// 3EsnTgTg : state of the ground without snow or measurable ice cover, minimum temperature of the ground surface last night
// 4E'sss : state of the ground if covered with snow or ice, snow depth
// 6RRRtR : amount of precipitation for given period
// 7R24R24R24/ : amount of daily precipitation
// 88R24R24R24 : amount of daily precipitation if 30 mm or more
// http://atmo.tamu.edu/class/atmo251/BuoyCode.pdf
// 6GGgg is also called 6GGmm
TKLST( SECTION_NAT_CODE,TK1(555),TK1(6GGmm) ); // Or 6snT10T10T10
/// Applies to CMAN messages but apparently to others too.
// 3GGgg 4ddfmfm: maximum wind speed since the last observation and the time when it occurred
TKLST( SECTION_NAT_CODE,TK1(555),TK1(110ff),TK1(220ff),TK1(3GGmm),TK1(4ddff),TK1(6GGmm),TKn(dddfff) );
// http://www.top-wetter.de/themen/synopschluessel.htm
#ifdef FULL_SYNOP_555
TKLST( SECTION_NAT_CODE,TK1(555),TK1(0sTTT_land),TK1(1RRRr),TK1(2sTTT_avg),TK1(22fff),TK1(23SS),TK1(24Wt),TKn(25ww),TK1(26fff),TK1(3LLLL),TK1(5ssst),TK1(7hhZD),TK1(8N_hh),TK1(910ff),TK1(911ff),TK1(912ff),TK1(PIC),TK1(IN),TK1(BOT),TK1(hsTTT) );
#else
TKLST( SECTION_NAT_CODE,TK1(555),TK1(0sTTT_land),TK1(1RRRr),TK1(2sTTT_avg),TK1(911ff),TK1(912ff) );
#endif
// TODO: Consider optional tokens.
// manfred@met.fu-berlin.de Joerg Wichmann
// http://www.top-wetter.de/themen/synopschluessel.htm
// 666 1sTTT 2sTTT 3sTTT 6VVVV/VVVV 7VVVV
TKLST( SECTION_AUTO_DAT,TK1(666),TK1(1snTxTxTx),TK1(2snTxTxTx),TK1(7VVVV) );
// http://www.top-wetter.de/themen/synopschluessel.htm
// 80000 0RRRr 1RRRr 2RRRr 3RRRr 4RRRr 5RRRr
};
#undef TK
/// Actual implementation of the synop objet. Details are hidden.
class synop_impl
: public synop
{
/// All characters which are not flushed yet.
std::string m_buf ;
/// Words being read (Between spaces, tabs etc...)
std::string m_current_word ;
/// When disabled, chars pass through the object without change.
bool m_enabled ;
/// A chain of Synop tokens, which tries to match a group.
class Chain {
size_t m_idxGroup ; // Index of the Synop group.
size_t m_idxTok ; // Index of the first Synop token in the group.
size_t m_nxtTok ; // Index of the next Synop token in the group.
priority_t m_sum_prios ;
TokenProxy::TokVec::Ptr m_tokens ;
Chain();
void PushElement(TokenProxy::Ptr tp) {
if( ! m_tokens ) m_tokens = TokenProxy::TokVec::Ptr( new TokenProxy::TokVec );
PushItself( tp, m_tokens );
}
public:
/// TODO: Allocates m_tokens only if appending a first token is possible.
Chain( int i, int j)
: m_idxGroup(i), m_idxTok(j), m_nxtTok(j), m_sum_prios(0.0) {}
const TokenProxy::TokVec::Ptr & Tokens() const {
assert( m_tokens );
return m_tokens;
}
section_t section(void) const {
return arrSynopGroups[m_idxGroup].m_section;
}
/// Beware that some elements might have been repeated.
bool IsFinished(void) const {
// TODO: Our synop_group element should be copied here.
const synop_group * ptrSynopGroup = &arrSynopGroups[m_idxGroup];
if( m_nxtTok == m_idxTok ) return false ;
size_t nbToks = ptrSynopGroup->m_nb_toks ;
if( m_nxtTok > nbToks ) return true ;
if( m_nxtTok < nbToks ) return false ;
return ! ptrSynopGroup->m_tks[ m_nxtTok - 1 ].m_many;
}
/// Tries to add a new word at the end of a chain of tokens.
TokenProxy::Ptr TryPush( RegexT::Context & rgxCtxt, const std::string & str, size_t txt_offset )
{
if( IsFinished() ) return TokenProxy::Ptr();
const synop_group * ptrSynopGroup = &arrSynopGroups[m_idxGroup];
assert( m_nxtTok <= ptrSynopGroup->m_nb_toks );
if( m_nxtTok < ptrSynopGroup->m_nb_toks ) {
const int reg_idx = ptrSynopGroup->m_tks[ m_nxtTok ].m_rgx_idx;
if( rgxCtxt.Mtch( reg_idx, str ) ) {
TokenProxy::Ptr tp = RegexT::CreateTokenProxy( reg_idx, str, txt_offset );
/// Maybe a token which must not be at the beginning of a sequence.
if( ( m_nxtTok == m_idxTok ) && ( false == tp->CanComeFirst() ) ) {
return TokenProxy::Ptr() ;
}
/// It must parse the current word and the priority must be high enough.
if( tp->ParseItself() ) {
PushElement( tp );
m_sum_prios += RegexT::Priority( reg_idx );
++m_nxtTok ;
/*
std::cout << "DEBUG:" << __FUNCTION__
<< " m_idxGroup=" << m_idxGroup << " m_idxTok=" << m_idxTok
<< " reg=" << reg.Name() << " str=" << str
<< " m_nxtTok=" << m_nxtTok
<< " priority=" << m_sum_prios << "\n" ;
*/
return tp ;
}
}
}
/// Maybe the previous pattern can be repeated if "m_many" flag ?
if( m_nxtTok > m_idxTok ) {
const TOKGEN & tokgen = ptrSynopGroup->m_tks[ m_nxtTok - 1 ];
int reg_idx = tokgen.m_rgx_idx;
if( tokgen.m_many && rgxCtxt.Mtch( reg_idx, str ) )
{
TokenProxy::Ptr tp = RegexT::CreateTokenProxy( reg_idx, str, txt_offset );
/// It must parse the current word and the priority must be high enough.
if( tp->ParseItself() ) {
PushElement( tp );
m_sum_prios += RegexT::Priority( reg_idx );
/*
std::cout << "DEBUG:" << __FUNCTION__
<< " REPET m_idxGroup=" << m_idxGroup << " m_idxTok=" << m_idxTok
<< " reg=" << reg.Name() << " str=" << str
<< " m_nxtTok=" << m_nxtTok
<< " m_idxTok=" << m_idxTok
<< " maxTks=" << ptrSynopGroup->m_nb_toks
<< " priority=" << m_sum_prios << "\n" ;
*/
return tp ;
}
}
}
/*
* MAYBE THE TOKEN IS OPTIONAL. IF YES, RETRY WITH NEXT TOKEN.
*/
// Now if the match is not empty, we might tolerate one dummy string.
if( m_nxtTok > m_idxTok + 2 ) {
}
// If the previous match is a dummy string, maybe this is because two tokens coalesced,
// therefore we try the next token.
return TokenProxy::Ptr();
} // Chain::TryPush
// TODO: This is now simply the chain length, but we could refine the concept.
priority_t sum_priorities(void) const { return m_sum_prios;}
size_t text_begin() const {
assert( ! m_tokens->empty() );
return m_tokens->front()->offset_begin();
}
size_t text_end() const {
assert( ! m_tokens->empty() );
return m_tokens->back()->offset_end();
}
std::string test_display() const {
return m_tokens->MiniDump(section(),true);
}
void display_chain( bool test_mode, bool kml_mode ) const {
m_tokens->DumpTokVec( test_mode, section(), kml_mode );
}
// This helps to check if a pattern was used or not.
void increment_usage_counter(void) const {
arrSynopGroups[m_idxGroup].m_usage_counter++;
}
typedef std::list< Chain > List ;
// Adds our current object at the end of a list. Fast copy thanks to smart pointers.
void ConcatToList( List & refList ) const {
refList.push_back( *this );
List::iterator lastChain = refList.end();
--lastChain ;
if( lastChain != refList.begin() ) {
List::iterator prevChain = lastChain ;
--prevChain ;
lastChain->m_tokens->previous( prevChain->m_tokens );
}
}
}; // synop_impl::Chain
Chain::List m_chains ;
/// This represents the last successful chains which can be aggregated into a message.
class Message : public Chain::List
{
// Debug purpose.
std::string TstToStr(void) const {
std::string res ;
for( const_iterator it = begin(), en = end(); it != en; ++ it ) {
res += SectionToString(it->section());
res +="=" + it->test_display() + ";";
}
return res ;
}
/// Looks for a specific token in the tokens chain passed as an iterator.
template< class TokClass >
void SetIfNull( const TokClass * & refIter, const_iterator itChain ) const {
const TokClass * tmpPtr = itChain->Tokens()->front()->template get_ptr< TokClass >(false);
if( tmpPtr == NULL ) return ;
if( refIter == NULL ) {
refIter = tmpPtr ;
return ;
}
/// In some circumstances, we might duplicate the header to split the message.
LOG_WARN("Duplicate token=%s:%s, was:%s: m_nbTokens=%d:%s",
typeid(TokClass).name(), tmpPtr->c_str(), refIter->c_str(),
(int)m_nbTokens, TstToStr().c_str() );
refIter = tmpPtr ; // Take the closest (and last).
}
// Total number of tokens in the list of token chains.
size_t m_nbTokens;
/// Called when the end of a message is detected.
void Publish(void)
{
const_iterator it0 = begin();
if(it0 == end() ) {
LOG_DEBUG("No publish0 empty message");
return;
}
// Quick check if the message is very short. Beware, it it the total
// number of tokens, not the number of sections.
if(m_nbTokens <= 2 ) {
LOG_DEBUG("No publish1 m_nbTokens=%d:%s",
static_cast<int>(m_nbTokens), TstToStr().c_str() );
return ;
}
// We eliminate this kind of message which is not SYNOP although the beginning is similar.
// Other simple combinations might be eliminated but they are rarer.
// ZCZC 603
// WWXX60 EDZW 201700
const_iterator it1 = it0;
++it1 ;
if( ( it0->section() == SECTION_HEAD_GRP )
&& ( it1 != end() )
&& ( it1->section() == SECTION_IDENTLOC ) ) {
if( m_nbTokens <= 3 ) {
LOG_VERBOSE("No publish3 %s", TstToStr().c_str() );
return ;
}
// TODO: Store these for next run if their are missing.
}
if( it1 == end() ) {
// For example, receiving only the following line makes no sense:
// Climatological data=6RRRt#69907+8NChh#81822+9SSss#91113+9SSss#96480;+;
if( it0->section() != SECTION_LAND_OBS ) {
LOG_VERBOSE("No publish2 %s", TstToStr().c_str() );
return ;
}
// TODO: We should use the header SECTION_IDENTLOC of the previous message:
// SMOS01 LOWM 190000
// AAXX 19001
// 11036 32565 73208 10000 21038 30065 40306 57008 8353/ 333 83629
// 86360 91013 91113 91209=
// 11010 35561 /2504 11031 21043 39946 40345 57009=
// 11120 36/17 /9901 11111 21112 39620 40386 57005=
}
/// This gets some crucial information from the tokens.
const CLASSTK(QLLLL) * ptr_QLLLL = NULL;
const CLASSTK(IIIII) * ptr_IIIII = NULL;
const CLASSTK(IIiii) * ptr_IIiii = NULL;
const CLASSTK(iihVV) * ptr_iihVV = NULL;
const CLASSTK(MMMULaULo) * ptr_MMMULaULo = NULL;
const CLASSTK(YYGGi) * ptr_YYGGi = NULL;
const CLASSTK(YYGGgg) * ptr_YYGGgg = NULL;
const CLASSTK(Numbered) * ptr_Numbered = NULL;
// In all the chains of tokens , we try to grap some specific tokens.
for ( const_iterator itChain = begin(), enChain = end(); itChain != enChain; ++itChain ) {
assert( itChain->Tokens() );
SetIfNull< CLASSTK(QLLLL) >( ptr_QLLLL , itChain );
SetIfNull< CLASSTK(IIIII) >( ptr_IIIII , itChain );
SetIfNull< CLASSTK(IIiii) >( ptr_IIiii , itChain );
SetIfNull< CLASSTK(iihVV) >( ptr_iihVV , itChain );
SetIfNull< CLASSTK(MMMULaULo) >( ptr_MMMULaULo, itChain );
SetIfNull< CLASSTK(YYGGi) >( ptr_YYGGi , itChain );
SetIfNull< CLASSTK(YYGGgg) >( ptr_YYGGgg , itChain );
SetIfNull< CLASSTK(Numbered) >( ptr_Numbered , itChain );
}
bool foundCoo = false ;
CoordinateT::Pair newCoo ;
double altitudeStation = 0.0;
if( ptr_QLLLL ) {
if(ptr_QLLLL->CoordinatesOK() ) {
newCoo = CoordinateT::Pair( ptr_QLLLL->Longitude(), ptr_QLLLL->Latitude() );
foundCoo = true ;
}
}
std::string kmlNam ;
std::string iconNam ;
std::string descrTxt ;
std::string stationCountry ;
bool foundIdentifier = false;
/// It also indicates whether we could find the station name given the WMO indicator.
if( ptr_IIiii ) {
int wmoIndicInt = ptr_IIiii->WmoIndicator();
std::stringstream strmWmo ;
strmWmo << std::setfill('0') << std::setw(5) << wmoIndicInt;
std::string wmoIndicStr = strmWmo.str();
descrTxt = "WMO " + wmoIndicStr ;
const RecordBuoy * ptrBuoy_Tok = CatalogBuoy::FindFromKey( wmoIndicStr );
const RecordWmoStation * ptrWmo_Tok = CatalogWmoStations::FindFromKey( wmoIndicInt );
/// We cannot rely on "isAutomated" to guess if it is a buoy or not.
if( ptrWmo_Tok == NULL ) {
if( ptrBuoy_Tok ) {
foundIdentifier = true;
CoordinateT::Pair tmpCoo = ptrBuoy_Tok->station_coordinates();
if(foundCoo) {
double dist = tmpCoo.distance( newCoo );
if( dist > 100 ) {
std::stringstream strm ;
strm << "Coordinates accuracy issue with buoy: "
<< ptrBuoy_Tok->buoy_name()
<< " IIiii:" << newCoo
<< " Against:" << tmpCoo
<< " Dist:" << dist ;
LOG_VERBOSE("%s", strm.str().c_str() );
}
} else {
foundCoo = true ;
}
// In both cases, we take the coordinates given by the WMO file.
newCoo = tmpCoo ;
altitudeStation = 0;
kmlNam = ptrBuoy_Tok->title();
iconNam = ptrBuoy_Tok->type();
} else {
const RecordJComm * ptrJComm_Tok = CatalogJComm::FindFromKey( wmoIndicStr );
if( ptrJComm_Tok ) {
ptrJComm_Tok->SetJCommFields( kmlNam, iconNam );
if( stationCountry.empty() ) stationCountry = ptrJComm_Tok->country();
} else {
kmlNam = "Automated station:" + wmoIndicStr ;
iconNam = "automated";
}
}
}
if( ptrBuoy_Tok == NULL ) {
iconNam = "wmo";
if( ptrWmo_Tok ) {
foundIdentifier = true;
CoordinateT::Pair tmpCoo = ptrWmo_Tok->station_coordinates();
if( stationCountry.empty() ) stationCountry = ptrWmo_Tok->country();
if(foundCoo) {
double dist = tmpCoo.distance( newCoo );
if( dist > 100 ) {
std::stringstream strm ;
strm << "Coordinates accuracy issue with WMO station: "
<< ptrWmo_Tok->station_name()
<< " IIiii:" << newCoo
<< " Against:" << tmpCoo
<< " Dist:" << dist ;
LOG_VERBOSE("%s", strm.str().c_str() );
}
} else {
foundCoo = true ;
}
// In both cases, we take the coordinates given by the WMO file.
newCoo = tmpCoo ;
altitudeStation = ptrWmo_Tok->station_elevation();
kmlNam = ptrWmo_Tok->station_name();
} else {
const RecordJComm * ptrJComm_Tok = CatalogJComm::FindFromKey( wmoIndicStr );
if( ptrJComm_Tok ) {
ptrJComm_Tok->SetJCommFields( kmlNam, iconNam );
if( stationCountry.empty() ) stationCountry = ptrJComm_Tok->country();
} else {
LOG_VERBOSE("Cannot find WMO station:%s", wmoIndicStr.c_str() );
kmlNam = "WMO:" + wmoIndicStr ;
}
}
}
if( ( ptrWmo_Tok != NULL ) && ( ptrBuoy_Tok != NULL ) ) {
LOG_WARN("Conflit buoy/WMO");
}
}
std::string stationCallsign ;
if( ptr_IIIII ) {
std::string buoyNam ;
const char * shipIdIIIII = ptr_IIIII->ShipIdentifier();
if( ! descrTxt.empty() ) descrTxt += ",";
descrTxt += _("Ship ");
descrTxt += shipIdIIIII;
const RecordShip * ptrShip_Tok = CatalogShip::FindFromKey( shipIdIIIII );
if( ptrShip_Tok ) {
stationCallsign = buoyNam = ptrShip_Tok->callsign();
if( ! ptrShip_Tok->name().empty() )
buoyNam += "," + ptrShip_Tok->name();
if( iconNam.empty() ) iconNam = "ship"; else iconNam += " ship";
if( stationCountry.empty() ) stationCountry = ptrShip_Tok->country();
} else {
const RecordBuoy * ptrBuoy_Tok = CatalogBuoy::FindFromKey( shipIdIIIII );
if( ptrBuoy_Tok ) {
buoyNam = ptrBuoy_Tok->title();
if( iconNam.empty() ) iconNam = "other buoy"; else iconNam += " buoy";
}
}
if( buoyNam.empty() ) {
if( kmlNam.empty() ) {
kmlNam = std::string("Ship:") + shipIdIIIII;
if( iconNam.empty() ) iconNam = "ship"; else iconNam += " ship";
} else {
LOG_WARN("Conflict between station %s and ship/buoy identifier %s",
kmlNam.c_str(), shipIdIIIII );
}
} else {
if( kmlNam.empty() ) {
kmlNam = buoyNam;
} else {
// Maybe the WMO station was there.
if( foundIdentifier ) {
LOG_WARN("Conflict between station %s and ship/buoy callsign %s identifier %s",
kmlNam.c_str(), buoyNam.c_str(), shipIdIIIII );
} else {
// We concatenate the information. Maybe this is not a conflict after all.
if( foundIdentifier )
kmlNam += ",Ship:" + buoyNam ;
else
kmlNam = buoyNam ;
}
}
}
}
if( ptr_MMMULaULo && ptr_MMMULaULo->MarsdenValid() ) {
CoordinateT::Pair tmpCoo( ptr_MMMULaULo->Longitude(), ptr_MMMULaULo->Latitude() );
if(foundCoo) {
double dist = tmpCoo.distance( newCoo );
if( dist > 100 ) {
std::stringstream strm ;
strm << "Coordinates accuracy issue with Marsden square. "
<< " Coordinates:"<< newCoo
<< " against:" << tmpCoo
<< " Dist:" << dist;
LOG_WARN("%s", strm.str().c_str() );
}
} else {
foundCoo = true ;
}
newCoo = tmpCoo ;
}
// TODO: Adding time as fourth dimension:
// http://earth.google.com/outreach/tutorial_time.html
// TODO: Shame that we are losing this message because no coordinates.
if( false == foundCoo ) {
std::stringstream strm ;
strm << "Error, no coordinates.";
strm << " kmlNam=" << kmlNam ;
strm << " descrTxt=" << descrTxt ,
strm << " m_nb_tokens=" << m_nbTokens << ":";
strm << TstToStr();
LOG_WARN("%s", strm.str().c_str() );
return ;
}
// If no time is defined, set current time.
time_t tmObservation = 0 ;
if( ptr_YYGGi ) {
tmObservation = ptr_YYGGi->ObservationTimeUTC();
if( ptr_YYGGgg ) {
time_t obsTmGGgg = ptr_YYGGgg->ObservationTimeUTC();
int days = diffTm( tmObservation, obsTmGGgg );
if(days > 1) {
LOG_WARN( _("Unreliable observation time: %s and %s"),
Tm2SynopTime( tmObservation ).c_str(),
Tm2SynopTime( obsTmGGgg ).c_str() );
}
}
} else if( ptr_YYGGgg ) {
tmObservation = ptr_YYGGgg->ObservationTimeUTC();
}
// The name must be unique.
if( kmlNam.empty() ) {
std::stringstream strm ;
strm << _("Station") << " " << newCoo;
kmlNam = strm.str();
}
if( iconNam.empty() ) iconNam = "Weather Station";
if( descrTxt.empty() ) descrTxt = _("Undetermined station");
if( synop::ptr_callback->log_adif() )
{
// This builds an ADIF message.
struct AdifSerializer : public Serializer, public std::string {
void StartSection( const std::string & section_name ) {
static_cast<std::string &>(*this) += section_name + ADIF_EOL;
}
// Will add a new line to a text message in the ADIF record.
void AddItem( const char * key, const char * value, const char * unit ) {
std::string & refStr = *this ;
refStr += key ;
refStr += "=";
refStr += value ;
if(unit) {
refStr += " " ;
refStr += unit ;
}
refStr += ADIF_EOL;
}
}; // synop_impl::Message::KmlSerializer
AdifSerializer adifSerial ;
/// Concatenate information from each chain. This is where the serializer kmlSerial is called.
for ( const_iterator itChain = begin(), enChain = end(); itChain != enChain; ++itChain ) {
itChain->display_chain(false, true);
}
/// For updating the logbook with received messages.
QsoHelper qso(MODE_RTTY) ;
if( ! stationCallsign.empty() )
qso.Push(CALL, stationCallsign );
if( ! stationCountry.empty() )
qso.Push(COUNTRY, stationCountry );
{
std::stringstream strm ;
strm << newCoo ;
qso.Push(QTH, strm.str() );
}
qso.Push(GRIDSQUARE, newCoo.locator() );
qso.Push(NAME, kmlNam );
/// If the header is clean, the message type is removed from the string.
// In this context, this field cannot be used.
qso.Push(XCHG1, iconNam );
// AAx, RRx, CCx, Pxx
if( ptr_Numbered ) {
qso.Push(SRX, ptr_Numbered->Number() );
}
// Sequence of Chars and line-breaks, ASCII CR (code 13) + ASCII LF (code 10)
qso.Push(NOTES, adifSerial );
}
if( synop::ptr_callback->log_kml() )
{
/// Writes messages to a list of key-value pairs, later displayed in KML.
struct KmlSerializer : public Serializer, public KmlServer::CustomDataT {
// TODO: Doubles the line width of the HTML table.
void StartSection( const std::string & section_name ) {
// m_freeText << section_name << "\n";
}
// Will add a new line to a HTML table.
void AddItem( const char * key, const char * value, const char * unit ) {
std::string val = unit ? value + std::string(" ") + unit : std::string(value);
Push( key, val );
}
}; // synop_impl::Message::KmlSerializer
KmlSerializer kmlSerial ;
/// Concatenate information from each chain. This is where the serializer kmlSerial is called.
for ( const_iterator itChain = begin(), enChain = end(); itChain != enChain; ++itChain ) {
itChain->display_chain(false, true);
}
// Beware: Some WMO stations have the same name but are not mobile.
KmlServer::GetInstance()->Broadcast(
"Synop",
tmObservation,
newCoo,
altitudeStation,
kmlNam,
iconNam,
descrTxt,
kmlSerial );
}
} // synop_impl::Message::Publish
public:
~Message() {
Publish();
}
/// Inconditionnaly cleans the content because too many chars could not be read.
void MsgFlush() {
// Should be called also after a given timeout.
Publish();
Chain::List::clear();
m_nbTokens = 0;
}
/// When getting rid of the current message.
// We might keep it or flush everything etc...
void MsgFlushAndMove( const Chain & refChain ) {
// Depending on the section of the last chain of the message,
// and the section from this brand new chain, this decides to aggregate
// the new section at the end of the message, otherwise create a new one,
// and broadcast the current message.
if( ! empty() ) {
section_t new_sec = refChain.section();
section_t last_sec = Chain::List::back().section();
// To build messages, checks if a section can follow another one.
if( 0 == sectionTransitions[new_sec][last_sec] ) {
MsgFlush();
}
}
refChain.ConcatToList( *this );
m_nbTokens += refChain.Tokens()->size();
}
}; // synop_impl::Message
/// We add new chains of tokens, that is, sections, at the end of the message.
Message m_current_message ;
public:
/// If margin is positive, this is the number of chars to be kept in the buffer for further decoding,
/// because we are not sure at the moment of what they will be used for.
/// If this is negative, this is the number of characters immediately after the decoded chain,
/// which should be discarded: This is an end of section, '=' character.
void decode_then_flush(int margin = 0 )
{
// The margin is here only for display purpose. If the chars are immediately
// displayed, there should not be anything in the buffer.
size_t len_to_keep = margin > 0 ? margin : 0 ;
Chain::List::const_iterator beg = m_chains.begin(), en = m_chains.end();
// Maybe we did not manage to decode anything.
if( beg == en ) {
// it might also be empty because we are in interleaved mode.
if( m_buf.size() >= len_to_keep ) {
disp_range( m_buf.begin(), m_buf.end() - len_to_keep );
m_buf.erase(m_buf.begin(), m_buf.end() - len_to_keep);
}
return ;
}
Chain::List::const_iterator best = beg ;
priority_t best_priority = best->sum_priorities() ;
// TODO: We should count the solutions of the same priority (More or less the length),
// with a different beginning as ours.
for( Chain::List::const_iterator it = beg; ++it != en ; ) {
assert( it->Tokens() );
if( it->sum_priorities() > best_priority ) {
best_priority = it->sum_priorities() ;
best = it ;
}
};
assert( best != en );
m_current_message.MsgFlushAndMove(*best);
// Maybe no chain is worth of interest.
bool decoded_ok = best_priority >= MIN_PRIO ;
// Counts the number of times this chain is selected.
if( decoded_ok ) {
best->increment_usage_counter();
}
// If interleaved mode, chars are immediately printed.
if( m_buf.empty() ) {
if( decoded_ok ) {
// This just displays the single chain in the output buffer.
best->display_chain( GetTestMode(), false );
}
}
else {
assert( len_to_keep <= m_buf.size() );
if( decoded_ok ) {
// Not sure why we remove the last char.
size_t txt_beg = best->text_begin();
size_t txt_end = best->text_end();
// There might have been a synchronization problem when changing params.
if( (txt_beg > 0) && ( txt_beg - 1 <= m_buf.size() ) ) {
disp_range( m_buf.begin(), m_buf.begin() + txt_beg - 1 );
} else {
LOG_WARN("Bugcheck1: txt_beg=%d txt_end=%d margin=%d m_buf=%s",
(int)txt_beg, (int)txt_end, (int)margin, m_buf.c_str() );
}
// This just displays the single chain in the output buffer.
best->display_chain( GetTestMode(), false );
if( (txt_beg > 0) && ( txt_beg - 1 + len_to_keep <= m_buf.size() ) ) {
int to_discard = (margin < 0 ) ? - margin : 0 ;
disp_range( m_buf.begin() + txt_end - 1 + to_discard , m_buf.end() - len_to_keep );
} else {
LOG_WARN("Bugcheck2: txt_beg=%d txt_end=%d margin=%d m_buf=%s",
(int)txt_beg, (int)txt_end, (int)margin, m_buf.c_str() );
}
} else {
disp_range( m_buf.begin(), m_buf.end() - len_to_keep );
}
m_buf.erase(m_buf.begin(), m_buf.end() - len_to_keep);
}
m_chains.clear();
} // synop_impl::decode_then_flush
private:
// TODO: When starting a section, we should take first tokens of the same priority, in order to finish.
/// Adds a new current word. tries all possible chains to which this word matches one token, even in the middle.
size_t AddTokInit()
{
RegexT::Context rgxCtxt;
// std::cout << __FUNCTION__ << "\n";
size_t nbInserts = 0 ;
assert( m_chains.empty() );
const size_t buf_sz = m_buf.size();
// The same list can appear in several chains, this is intended.
for( int i = 0, nbSynGrp = arrSynopGroups.size(); i < nbSynGrp; ++i )
{
for( size_t j = 0, nbToks = arrSynopGroups[i].m_nb_toks; j < nbToks; ++j )
{
Chain tmpChain( i, j );
if( tmpChain.TryPush( rgxCtxt, m_current_word, buf_sz ) )
{
m_chains.push_back( tmpChain );
++nbInserts;
}
}
}
// std::cout << "DEBUG:" << __FUNCTION__ << ":" << m_current_word << ":at:" << m_buf.size() << " m_buf=" << m_buf << " nbIns=" << nbInserts << " nbChains=" << m_chains.size() << "\n";
return nbInserts;
} // synop_impl::AddTokInit
/// Tries to add the last word to all possible token chains.
size_t AddOtherTok()
{
class CtxtDerived : public RegexT::Context {
struct BestStartTokenT {
priority_t m_minPrio ; // Must be negative at startup.
size_t m_newReg ;
public:
BestStartTokenT() : m_minPrio(-1.0), m_newReg(~0) {}
void TstSwapPrio( priority_t newPrio, size_t newReg ) {
if( m_minPrio < newPrio ) {
m_minPrio = newPrio;
m_newReg = newReg;
}
}
};
/// This contains for each section the regex which matches the best
// the current work, and starting a chain whose section immediately follow ours.
BestStartTokenT m_bstStartToken[ SECTION_SECT_NBR ];
section_t m_currSection ;
public:
CtxtDerived() : m_currSection( static_cast<section_t>(-1) ) {}
void CmpSwapPriority( size_t newReg, section_t newSection ) {
priority_t newPrio = RegexT::Priority( newReg );
/// This iterates on all sections which might immediately precede this one.
for( size_t precedSec = 0; precedSec < SECTION_SECT_NBR; ++precedSec ) {
// Does it make sense to have one section type following another ?
if( 0 == sectionTransitions[newSection][precedSec] ) continue ;
m_bstStartToken[ precedSec ].TstSwapPrio( newPrio, newReg );
}
}
/// Does the section comes just before ours ?
void SetDistance( section_t predSection ) { m_currSection = predSection ; }
// Called in two contexts:
// When looking for a better beginning regex.
// Or as a virtual in TryPush.
virtual bool Mtch( size_t reg_idx, const std::string & str ) {
if( m_bstStartToken[ m_currSection ].m_minPrio > RegexT::Priority( reg_idx ) )
{
/*
* We could add a condition on the length because of this:
Expect [IIIII+YYGGi+99LLL+QLLLL+ iihVV+Nddff+1sTTT_air+2sTTT_dew+4PPPP+5appp+7wwWW+
Actual [IIIII+YYGGi+99LLL+QLLLL+ 41/96 222Dv+1PPHH+2PPHH+ 4PPPP+5appp+7wwWW+
*/
/*
std::cout << " prio=" << m_bstStartToken[ m_currSection ].m_minPrio << " str=" << str
<< " m_newReg:" << m_bstStartToken[ m_currSection ].m_newReg
<< " prioRgx=" << RegexT::Name(m_bstStartToken[ m_currSection ].m_newReg)
<< " currSec=" << SectionToString(m_currSection)
<< " against:" << RegexT::Name(reg_idx)
<< " reg_idx:" << reg_idx
<< " oldPrio:" << RegexT::Priority( reg_idx )
<< "\n";
*/
return false ;
}
return RegexT::Context::Mtch( reg_idx, str );
};
}; // CtxtDerived
CtxtDerived rgxCtxtDerived;
const size_t buf_sz = m_buf.size();
/// What happens if it matches the beginning if a chain
// NOTE: We suppose that the beginning is never multiple ("Many").
for( int idxGrp = 0, nbSynGrp = arrSynopGroups.size(); idxGrp < nbSynGrp; ++idxGrp )
{
const synop_group * ptrSynopGroup = &arrSynopGroups[idxGrp];
assert( ptrSynopGroup->m_nb_toks > 0 );
assert( ptrSynopGroup->m_tks[ 0 ].m_many == false );
const int reg_idx = ptrSynopGroup->m_tks[ 0 ].m_rgx_idx;
if( rgxCtxtDerived.Mtch(reg_idx, m_current_word ) ) {
TokenProxy::Ptr tp = RegexT::CreateTokenProxy( reg_idx, m_current_word, buf_sz );
if( tp->ParseItself() ) {
rgxCtxtDerived.CmpSwapPriority( reg_idx, ptrSynopGroup->m_section );
}
}
}
/// Contains the list of chains to which we could not add the current (and last) word.
typedef std::list< Chain::List::iterator > ChainsNoInsrtsT ;
ChainsNoInsrtsT chainsNoInsrts ;
/// We try to add the new word to all potential solutions.
size_t nbInserts = 0 ;
for( Chain::List::iterator it = m_chains.begin(), en = m_chains.end(); it!= en; ++it )
{
/*
Beware: Maybe the current word matches an intermediate token which is also the beginning of another chain.
In this case, it does not count.
It should not be a problem because the priorities are identical.
*/
rgxCtxtDerived.SetDistance( it->section() );
if( it->TryPush( rgxCtxtDerived, m_current_word, buf_sz ) )
{
++nbInserts;
} else {
chainsNoInsrts.push_back( it );
}
}
if( nbInserts != 0 ) {
/// Removes the chains which cannot possibly match the current suite of tokens.
for( ChainsNoInsrtsT::iterator it = chainsNoInsrts.begin(), en = chainsNoInsrts.end(); it != en; ++it )
{
m_chains.erase( *it );
}
}
return nbInserts;
} // synop_impl::AddOtherTok
public:
synop_impl()
{
/// Display each decoded key/value/unit item, to a stream, for debug logging.
struct SynopSerializer : public Serializer
{
void StartSection( const std::string & section_name ) {
std::string str = section_name + "\n";
disp_range( str.begin(), str.end(), true );
}
/// Print in bold chars or special color.
void AddItem( const char * key, const char * value, const char * unit ) {
std::stringstream strm ;
strm << '\t' << key << '=' << value << ' ' << ( unit ? unit : "" ) << '\n';
std::string str = strm.str();
disp_range( str.begin(), str.end(), true );
}
}; // synop_impl::SynopSerializer
/// It registers automatically as the lowest level serializer.
static SynopSerializer fldigiSerial ;
init_patterns();
m_enabled = true ;
}
virtual ~synop_impl() {};
/// Called as a virtual.
void init() {
cleanup();
}
void cleanup() {
m_buf.clear();
m_current_word.clear();
m_chains.clear();
m_enabled = false ;
}
/// Adds a received character to the Synop decoding buffer.
void add( char c) {
if( ! m_enabled ) {
cleanup();
m_enabled = true ;
}
static bool was_interleaved_before = false ;
bool is_interleaved_now = synop::ptr_callback->interleaved();
// I
if( is_interleaved_now )
{
// Maybe has to display and flush the internal buffer.
if( ! was_interleaved_before ) {
// Of course it does not clears the current message.
disp_range( m_buf.begin(), m_buf.begin() );
m_buf.clear();
}
}
was_interleaved_before = is_interleaved_now;
bool noChains = m_chains.empty();
// No chance to terminate the current message, too many chars not parsed.
if( noChains && ( m_buf.size() > 20 ) ) {
m_current_message.MsgFlush();
}
/// All delimiters are stored in the buffer, but the split loses them.
if( ! is_interleaved_now ) {
m_buf += c ;
} else {
std::string one_char( 1, c );
disp_range( one_char.begin(), one_char.end(), false );
}
// Note that some chars are not part of Baudot (ITA2) charset and will never appear.
switch(c) {
case ';' : // Our RTTY decoder uses this for '='.
c = '=' ;
// TODO: Might as well remove '=' from all regular expressions.
case '=' :
case ' ' :
case '\t' :
// TODO: Frequently (But not always, this marks a section end).
case '\n' :
case '\r' :
if( ! m_current_word.empty() ) {
size_t nbInserts = 0 ;
// The same list can appear in several chains, this is intended.
if( noChains )
{
nbInserts = AddTokInit();
} else {
nbInserts = AddOtherTok();
}
if( c == '=' )
{
// -1, no display of '=', whose length is one.
decode_then_flush(-1);
} else if( nbInserts == 0 )
{
if( noChains ) {
/// There was no chains before.
decode_then_flush();
} else {
// If there was no insertion, because
// the new word did not match any existing chain.
// Then we will retry with this word
// and update the buffer too.
decode_then_flush( m_current_word.size() + 1 );
// If cannot match anything at first stage,
// then no need to keep the buffer.
if( 0 == AddTokInit() ) {
decode_then_flush();
}
// Otherwise we have started a new chain.
}
}
m_current_word.clear();
}
break ;
default :
if( m_current_word.size() > 10 )
{
decode_then_flush();
m_current_word.clear();
}
else
{
m_current_word += c ;
}
break ;
}
}
/// When Synop decoding is not needed.
void flush(bool finish_decoding) {
if( finish_decoding ) {
decode_then_flush();
flush(false);
} else {
disp_range(m_buf.begin(), m_buf.end() );
m_current_message.MsgFlush();
cleanup();
}
}
bool enabled(void) const { return m_enabled; }
};
synop * synop::instance() {
/// The destructor should not do any harm because we have no control on when it is called.
static synop_impl g_synop ;
return &g_synop ;
};
/// Prints the number of times each regular expression is used, so the unused ones can be removed.
void synop::regex_usage(void) {
for( size_t idxGrp = 0; idxGrp < arrSynopGroups.size(); ++idxGrp )
{
const synop_group * ptrSynopGroup = &arrSynopGroups[idxGrp];
if( ptrSynopGroup-> m_usage_counter > 0 ) continue ;
std::cout << "DEBUG:" << "Unused:"
<< " idxGrp=" << idxGrp
<< ' ' << *ptrSynopGroup
<< '\n' ;
}
}
/// This helps in debug mode: Only the regex name is displayed.
bool synop::m_test_mode = false ;
const synop_callback * synop::ptr_callback ;
/* Useful links about decoding:
http://www.kmlvalidator.com/home.htm
http://www.ndbc.noaa.gov/station_page.php?station=MBLA1
http://www.ncdc.noaa.gov/homr/
http://www.ncdc.noaa.gov/oa/climate/surfaceinventories.html
http://www.nodc.noaa.gov/BUOY/
http://www.nodc.noaa.gov/BUOY/all_buoy_info_latlon.txt
http://www.sailwx.info/shiptrack/researchships.phtml
http://www.meteo2.shom.fr/qctools/last-report-list_surfmar.htm
http://weather.noaa.gov/pub/logs/shipstats/shipstat.out.201206301330.csv
http://www.wmo.int/pages/prog/amp/mmop/buoy-ids.html
http://www.aoml.noaa.gov/hrd/format/tempdrop_format.html
http://www.ominous-valve.com/wx_codes.txt
http://www.vos.noaa.gov/ObsHB-508/ObservingHandbook1_2010_508_compliant.pdf
http://www.nws.noaa.gov/tg/head.html
http://weather.unisys.com/noaaport/text_summary.php
http://www.wmo.int/pages/prog/www/ois/Operational_Information/VolumeC1/CCCC_en.html
// http://www.wmo.int/pages/prog%2Fwww/WMOCodes/Manual/Volume-I-selection/Sel2.pdf
Other information:
See Klingenfuss
Thunder (corresponding in the SYNOP weather code to group 7, WW=17).
*/
| 209,423
|
C++
|
.cxx
| 5,254
| 36.565093
| 244
| 0.649011
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,077
|
spot.cxx
|
w1hkj_fldigi/src/spot/spot.cxx
|
// ----------------------------------------------------------------------------
// spot.cxx
//
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <iostream>
#include <list>
#if HAVE_STD_HASH
# include <unordered_map>
#elif HAVE_STD_TR1_HASH
# include <tr1/unordered_map>
#else
# error "No std::hash or std::tr1::hash support"
#endif
#include "trx.h"
#include "globals.h"
#include "re.h"
#include "fl_digi.h"
#include "debug.h"
#include "spot.h"
// the number of characters that we match our REs against
#define SEARCHLEN 32
#define DECBUFSIZE 8 * SEARCHLEN
struct callback_t
{
void* data;
spot_log_cb_t lcb;
spot_log_cb_t mcb;
spot_recv_cb_t rcb;
};
typedef std::list<callback_t> cblist_t;
struct fre_hash : std::unary_function<const fre_t*, size_t>
{
size_t operator()(const fre_t* r) const { return r->hash(); }
};
struct fre_comp : std::unary_function<const fre_t*, bool>
{
size_t operator()(const fre_t* l, const fre_t* r) const { return *l == *r; }
};
typedef std::list<callback_t*> callback_p_list_t;
#if HAVE_STD_HASH
typedef std::unordered_map<fre_t*, callback_p_list_t, fre_hash, fre_comp> rcblist_t;
static std::unordered_map<int, std::string> buffers;
#elif HAVE_STD_TR1_HASH
typedef std::tr1::unordered_map<fre_t*, callback_p_list_t, fre_hash, fre_comp> rcblist_t;
static std::tr1::unordered_map<int, std::string> buffers;
#endif
static cblist_t cblist;
static rcblist_t rcblist;
void spot_recv(char c, int decoder, int afreq, int md)
{
static trx_mode last_mode = NUM_MODES + 1;
if (decoder == -1) { // mode without multiple decoders
decoder = active_modem->get_mode();
if (last_mode != active_modem->get_mode()) {
buffers.clear();
last_mode = active_modem->get_mode();
}
} else if (last_mode != md) {
buffers.clear();
last_mode = md;
}
if (afreq == 0)
afreq = active_modem->get_freq();
std::string& buf = buffers[decoder];
if (unlikely(buf.capacity() < DECBUFSIZE))
buf.reserve(DECBUFSIZE);
buf += c;
std::string::size_type n = buf.length();
if (n == DECBUFSIZE)
buf.erase(0, DECBUFSIZE - SEARCHLEN);
const char* search = buf.c_str() + (n > SEARCHLEN ? n - SEARCHLEN : 0);
bool matched = false;
for (rcblist_t::iterator i = rcblist.begin(); i != rcblist.end(); ++i) {
if (unlikely(i->first->match(search))) {
matched = true;
const std::vector<regmatch_t>& m = i->first->suboff();
for (std::list<callback_t*>::iterator j = i->second.begin();
j != i->second.end() && (*j)->rcb; ++j) {
if (m.empty())
(*j)->rcb(last_mode, afreq, search, NULL, 0, (*j)->data);
else
(*j)->rcb(last_mode, afreq, search, &m[0], m.size(), (*j)->data);
}
}
}
if (matched)
buf.clear();
}
static void get_log_details(long long& freq, trx_mode& mode, time_t& rtime)
{
if (mode == NUM_MODES)
mode = active_modem->get_mode();
if (mode >= MODE_WWV)
return;
if (freq == 0LL)
freq = active_modem->get_freq();
if (!wf->USB())
freq = -freq;
freq += wf->rfcarrier();
if (rtime == -1L)
rtime = time(NULL);
}
void spot_log(const char* callsign, const char* locator, long long freq, trx_mode mode, time_t rtime)
{
get_log_details(freq, mode, rtime);
std::cout << callsign << ", " << locator << ", " << freq << ", " << mode_info[mode].adif_name << ", " << mode_info[mode].adif_name << std::endl;
for (cblist_t::const_iterator i = cblist.begin(); i != cblist.end(); ++i)
if (i->lcb)
i->lcb(callsign, locator, freq, mode, rtime, i->data);
}
void spot_manual(const char* callsign, const char* locator, long long freq, trx_mode mode, time_t rtime)
{
get_log_details(freq, mode, rtime);
for (cblist_t::const_iterator i = cblist.begin(); i != cblist.end(); ++i)
if (i->mcb)
i->mcb(callsign, locator, freq, mode, rtime, i->data);
}
//
// A callback of type spot_log_cb_t is registered with a data argument.
// The callback is invoked every time a QSO is logged.
//
void spot_register_log(spot_log_cb_t lcb, void* ldata)
{
callback_t c = { ldata, lcb, 0, 0 };
cblist.push_back(c);
}
//
// A callback of type spot_log_cb_t is registered with a data argument.
// The callback is invoked every time the user manually spots a callsign.
//
void spot_register_manual(spot_log_cb_t mcb, void* mdata)
{
callback_t c = { mdata, 0, mcb, 0 };
cblist.push_back(c);
}
//
// A callback of type spot_recv_cb_t is registered with a regular
// expression (RE, RE_flags). If the RE matches the spotter's search
// buffer, the callback is invoked with offsets into the search buffer
// indicating substring matches, if the RE defines any, and with its
// data argument. The offset format is described in regexec(3). The
// buffer and offsets are only valid during that particular invocation.
// Clients should use anchoring to avoid repeated calls.
//
void spot_register_recv(spot_recv_cb_t rcb, void* rdata, const char* re, int reflags)
{
callback_t c = { rdata, 0, 0, rcb };
cblist.push_back(c);
fre_t* fre = new fre_t(re, reflags);
rcblist_t::iterator i = rcblist.find(fre);
if (i != rcblist.end()) {
i->second.push_back(&cblist.back());
delete fre;
}
else
rcblist[fre].push_back(&cblist.back());
show_spot(true);
}
void spot_unregister_log(spot_log_cb_t lcb, const void* ldata)
{
for (cblist_t::iterator i = cblist.begin(); i != cblist.end(); ++i) {
if (lcb == i->lcb && ldata == i->data) {
cblist.erase(i);
break;
}
}
}
void spot_unregister_manual(spot_log_cb_t mcb, const void* mdata)
{
for (cblist_t::iterator i = cblist.begin(); i != cblist.end(); ++i) {
if (mcb == i->mcb && mdata == i->data) {
cblist.erase(i);
break;
}
}
}
void spot_unregister_recv(spot_recv_cb_t rcb, const void* rdata)
{
cblist_t::iterator i;
callback_t* p = 0;
for (i = cblist.begin(); i != cblist.end(); ++i) {
if (rcb == i->rcb && rdata == i->data) {
p = &*i;
cblist.erase(i);
break;
}
}
if (!p)
return;
// remove pointer from rcblist
for (rcblist_t::iterator j = rcblist.begin(); j != rcblist.end(); ++j) {
for (std::list<callback_t*>::iterator k = j->second.begin(); k != j->second.end(); ++k) {
if (*k == p) {
j->second.erase(k);
if (j->second.empty()) {
delete j->first;
rcblist.erase(j);
}
goto out;
}
}
}
out:
for (i = cblist.begin(); i != cblist.end(); ++i)
if (i->rcb) break;
show_spot(i != cblist.end());
}
| 7,106
|
C++
|
.cxx
| 225
| 29.444444
| 144
| 0.650854
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,078
|
pskrep.cxx
|
w1hkj_fldigi/src/spot/pskrep.cxx
|
// ----------------------------------------------------------------------------
// pskrep.cxx
//
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This is a client for N1DQ's PSK Automatic Propagation Reporter
// (see http://pskreporter.info/). Philip Gladstone, N1DQ, is
// thanked for his helpful explanation of the protocol.
//
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#ifdef __MINGW32__
# include "compat.h"
#endif
#if HAVE_SYS_UTSNAME_H
# include <sys/utsname.h>
#endif
#include <sys/time.h>
#if HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#include <stdint.h>
#include <cstring>
#include <cstdlib>
#include <string>
#include <sstream>
#include <deque>
#include <vector>
#include <algorithm>
#include <fstream>
#if GCC_VER_OK
# if HAVE_STD_HASH
# define MAP_TYPE std::unordered_map
# define HASH_TYPE std::hash
# include <unordered_map>
# else
# if HAVE_STD_TR1_HASH
# define MAP_TYPE std::tr1::unordered_map
# define HASH_TYPE std::tr1::hash
# include <tr1/unordered_map>
# endif
# endif
#else
// use the non-standard gnu hash_map on gcc < 4.1.0
// which has a broken tr1::unordered_map::operator=
# define MAP_TYPE __gnu_cxx::hash_map
# define HASH_TYPE __gnu_cxx::hash
# include <ext/hash_map>
namespace __gnu_cxx {
// define the missing hash specialisation for std::string
// using the 'const char*' hash function
template<> struct hash<std::string> {
size_t operator()(const std::string& s) const { return __stl_hash_string(s.c_str()); }
};
}
#endif
#include <FL/Fl.H>
#include "socket.h"
#include "re.h"
#include "debug.h"
#include "util.h"
#include "trx.h"
#include "fl_digi.h"
#include "main.h"
#include "configuration.h"
#include "globals.h"
#include "spot.h"
#include "pskrep.h"
LOG_FILE_SOURCE(debug::LOG_SPOTTER);
//------------------------------------------------------------------------------
#include "threads.h"
static pthread_mutex_t pskrep_mutex = PTHREAD_MUTEX_INITIALIZER;
//------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------------
// Try to flush the report queue every SEND_INTERVAL seconds.
#define SEND_INTERVAL 300
// Ignore reports that are less than DUP_INTERVAL seconds older than
// a previously sent report for the same callsign and frequency band.
// Sent reports are also garbage-collected after DUP_INTERVAL seconds.
#define DUP_INTERVAL 1800
// The first TEMPLATE_THRESHOLD packets will contain the long templates;
// the next TEMPLATE_THRESHOLD packets will include the short templates
#define TEMPLATE_THRESHOLD 3
// Resend short templates every TEMPLATE_INTERVAL seconds
#define TEMPLATE_INTERVAL 1800
// Maximum send size
#define DGRAM_MAX (1500-14-24-8)
#define PSKREP_QUEUE_FILE "pskrqueue.txt"
#define PSKREP_ID_FILE "pskrkey.txt"
// -------------------------------------------------------------------------------------------------
enum status_t { PSKR_STATUS_NEW, PSKR_STATUS_PENDING, PSKR_STATUS_SENT };
enum rtype_t { PSKREP_AUTO = 1, PSKREP_LOG = 2, PSKREP_MANUAL = 3 };
struct rcpt_report_t
{
rcpt_report_t(trx_mode m = 0, long long f = 0, time_t t = 0,
rtype_t p = PSKREP_AUTO, std::string loc = "")
: mode(m), freq(f), rtime(t), rtype(p),
status(PSKR_STATUS_NEW), locator(loc) { }
trx_mode mode;
long long freq;
time_t rtime;
rtype_t rtype;
status_t status;
std::string locator;
};
// A band_map_t holds a list of reception reports (for a particular callsign and band)
typedef std::deque<rcpt_report_t> band_map_t;
// A call_map_t holds reception reports for a particular callsign
typedef MAP_TYPE<band_t, band_map_t, HASH_TYPE<int> > call_map_t;
// A container of this type holds all reception reports, sorted by callsign and band
typedef MAP_TYPE<std::string, call_map_t> queue_t;
class pskrep_sender
{
public:
pskrep_sender(const std::string& call, const std::string& loc, const std::string& ant,
const std::string& host_, const std::string& port_,
const std::string& long_id_, const std::string& short_id_);
~pskrep_sender();
bool append(const std::string& callsign, const band_map_t::value_type& r);
bool send(void);
private:
void write_station_info(void);
void write_preamble(void);
std::string recv_callsign, recv_locator, recv_antenna;
std::string host, port;
std::string long_id, short_id;
static const unsigned char long_station_info_template[];
static const unsigned char short_station_info_template[];
static const unsigned char rcpt_record_template[];
std::vector<unsigned char> long_station_info;
std::vector<unsigned char> short_station_info;
//uint32_t identifier;
uint32_t sequence_number;
unsigned template_count;
time_t last_template;
Socket* send_socket;
unsigned char* dgram;
size_t dgram_size;
size_t report_offset;
void create_socket(void);
pthread_t resolver_thread;
static void* resolver(void* obj);
static const char hexsym[];
static size_t pad(size_t len, size_t mult);
};
class pskrep
{
public:
pskrep(const std::string& call, const std::string& loc, const std::string& ant,
const std::string& host, const std::string& port,
const std::string& long_id, const std::string& short_id,
bool reg_auto, bool reg_log, bool reg_manual);
~pskrep();
static void recv(trx_mode mode, int afreq, const char* str, const regmatch_t* calls, size_t len, void* obj);
static void log(const char* call, const char* loc, long long freq, trx_mode mode, time_t rtime, void* obj);
static void manual(const char* call, const char* loc, long long freq, trx_mode mode, time_t rtime, void* obj);
bool progress(void);
unsigned count(void) { return new_count; }
static fre_t locator_re;
private:
void append(std::string call, const char* loc, long long freq, trx_mode mode, time_t rtime, rtype_t rtype);
void gc(void);
void load_queue(void);
void save_queue(void);
static bool not_sent(const band_map_t::value_type& r)
{
return r.status != PSKR_STATUS_SENT;
}
queue_t queue;
pskrep_sender sender;
unsigned new_count;
};
fre_t pskrep::locator_re("[a-r]{2}[0-9]{2}[a-x]{2}", REG_EXTENDED | REG_NOSUB | REG_ICASE);
#define SHORT_ID_SIZE 4
#define LONG_ID_SIZE 8
// -------------------------------------------------------------------------------------------------
static std::string error_string;
static bool pskrep_check(void)
{
struct {
const std::string* var;
const char* msg;
} check[] = {
{ &progdefaults.myCall, "callsign" },
{ &progdefaults.myLocator, "locator" },
{ &progdefaults.myAntenna, "antenna info" },
};
for (size_t i = 0; i < sizeof(check)/sizeof(*check); i++) {
if (check[i].var->empty()) {
error_string.assign("Error: missing ").append(check[i].msg);
return false;
}
}
if (!pskrep::locator_re.match(progdefaults.myLocator.c_str())) {
error_string = "Error: bad Maidenhead locator\ncheck Configure->Operator->Locator";
return false;
}
return true;
}
const char* pskrep_error(void)
{
return error_string.c_str();
}
static void pskrep_progress(void* obj)
{
if (reinterpret_cast<pskrep*>(obj)->progress())
Fl::add_timeout(SEND_INTERVAL, pskrep_progress, obj);
else
pskrep_stop();
}
static void pskrep_make_id(std::string& id, size_t len)
{
id.resize(len);
std::ifstream f("/dev/urandom");
if (f) {
for (size_t i = 0; i < len; i++)
while ((id[i] = f.get()) != EOF && !isgraph(id[i]));
f.close();
}
else {
unsigned seed = time(NULL);
if (!progdefaults.myCall.empty())
seed ^= simple_hash_str((const unsigned char*)progdefaults.myCall.c_str());
srand(seed);
for (size_t i = 0; i < len; i++)
while (!isgraph(id[i] = rand() % 0x7F));
}
}
static pskrep* pskr = 0;
bool pskrep_start(void)
{
if (pskr)
return true;
else if (!pskrep_check())
return false;
// get identifier
std::string fname = TempDir;
fname.append(PSKREP_ID_FILE);
std::ifstream in(fname.c_str());
std::string long_id, short_id;
if (in)
in >> long_id >> short_id;
if (!in || in.eof()) {
in.close();
pskrep_make_id(long_id, LONG_ID_SIZE);
pskrep_make_id(short_id, SHORT_ID_SIZE);
std::ofstream out(fname.c_str());
if (out)
out << long_id << ' ' << short_id << '\n';
else
LOG_ERROR("Could not write identifiers (\"%s\", \"%s\") to %s",
long_id.c_str(), short_id.c_str(), fname.c_str());
}
pskr = new pskrep(progdefaults.myCall, progdefaults.myLocator, progdefaults.myAntenna,
progdefaults.pskrep_host, progdefaults.pskrep_port, long_id, short_id,
progdefaults.pskrep_auto, progdefaults.pskrep_log, true);
Fl::add_timeout(SEND_INTERVAL, pskrep_progress, pskr);
return true;
}
void pskrep_stop(void)
{
Fl::remove_timeout(pskrep_progress, pskr);
delete pskr;
pskr = 0;
}
unsigned pskrep_count(void)
{
return pskr ? pskr->count() : 0;
}
// -------------------------------------------------------------------------------------------------
pskrep::pskrep(const std::string& call, const std::string& loc, const std::string& ant,
const std::string& host, const std::string& port,
const std::string& long_id, const std::string& short_id,
bool reg_auto, bool reg_log, bool reg_manual)
: sender(call, loc, ant, host, port, long_id, short_id), new_count(0)
{
if (reg_auto)
spot_register_recv(pskrep::recv, this, PSKREP_RE, REG_EXTENDED | REG_ICASE);
if (reg_log)
spot_register_log(pskrep::log, this);
if (reg_manual)
spot_register_manual(pskrep::manual, this);
load_queue();
}
pskrep::~pskrep()
{
spot_unregister_recv(pskrep::recv, this);
spot_unregister_log(pskrep::log, this);
spot_unregister_manual(pskrep::manual, this);
save_queue();
}
// This function is called by spot_recv() when its buffer matches our PSKREP_RE
void pskrep::recv(trx_mode mode, int afreq, const char* str, const regmatch_t* calls, size_t len, void* obj)
{
if (unlikely(calls[PSKREP_RE_INDEX].rm_so == -1 || calls[PSKREP_RE_INDEX].rm_eo == -1))
return;
std::string call(str + calls[PSKREP_RE_INDEX].rm_so, calls[PSKREP_RE_INDEX].rm_eo - calls[PSKREP_RE_INDEX].rm_so);
long long freq = afreq;
if (!wf->USB())
freq = -freq;
freq += wf->rfcarrier();
LOG_VERBOSE("Spotted \"%s\" in buffer \"%s\"", call.c_str(), str);
reinterpret_cast<pskrep*>(obj)->append(call.c_str(), "", freq,
active_modem->get_mode(), time(NULL), PSKREP_AUTO);
}
// This function is called by spot_log()
void pskrep::log(const char* call, const char* loc, long long freq, trx_mode mode, time_t rtime, void* obj)
{
reinterpret_cast<pskrep*>(obj)->append(call, loc, freq, mode, rtime, PSKREP_LOG);
}
// This function is called by spot_manual()
void pskrep::manual(const char* call, const char* loc, long long freq, trx_mode mode, time_t rtime, void* obj)
{
reinterpret_cast<pskrep*>(obj)->append(call, loc, freq, mode, rtime, PSKREP_MANUAL);
}
void pskrep::append(std::string call, const char* loc, long long freq, trx_mode mode, time_t rtime, rtype_t rtype)
{
if (unlikely(call.empty()))
return;
transform(call.begin(), call.end(), call.begin(), static_cast<int (*)(int)>(toupper));
if (!progdefaults.pskrep_qrg)
freq = 0LL;
if (*loc && !locator_re.match(loc))
loc = "";
band_map_t& bandq = queue[call][band(freq)];
if (bandq.empty() || rtime - bandq.back().rtime >= DUP_INTERVAL) { // add new
bandq.push_back(rcpt_report_t(mode, freq, rtime, rtype, loc));
LOG_VERBOSE("Added (call=\"%s\", loc=\"%s\", mode=\"%s\", freq=%d, time=%d, type=%u)",
call.c_str(), loc, mode_info[mode].adif_name,
static_cast<int>(freq),
static_cast<int>(rtime), rtype);
new_count++;
save_queue();
}
else if (!bandq.empty()) {
band_map_t::value_type& r = bandq.back();
if (r.status != PSKR_STATUS_SENT && *loc && r.locator != loc) { // update last
r.locator = loc;
r.rtype = rtype;
LOG_VERBOSE("Updated (call=\"%s\", loc=\"%s\", mode=\"%s\", freq=%d, time=%d, type=%u)",
call.c_str(), loc, mode_info[r.mode].adif_name,
static_cast<int>(r.freq),
static_cast<int>(r.rtime), rtype);
save_queue();
}
}
}
// Handle queued reports
bool pskrep::progress(void)
{
if (queue.empty())
return true;
unsigned nrep = 0;
bool sender_full = false;
for (queue_t::iterator i = queue.begin(); i != queue.end(); ++i) {
for (call_map_t::iterator j = i->second.begin(); j != i->second.end(); ++j) {
for (band_map_t::iterator k = j->second.begin(); k != j->second.end(); ++k) {
switch (k->status) {
case PSKR_STATUS_NEW:
if ((sender_full = !sender.append(i->first, *k)))
goto send_reports;
k->status = PSKR_STATUS_PENDING;
nrep++;
break;
case PSKR_STATUS_PENDING: // sent in last cycle
k->status = PSKR_STATUS_SENT;
default:
break;
}
}
}
}
send_reports:
LOG_VERBOSE("Found %u new report(s)", nrep);
if (nrep) {
if (!sender.send()) {
LOG_ERROR("Sender failed, disabling pskreporter");
return false;
}
return progress();
}
gc();
save_queue();
return true;
}
// Delete sent reports that are older than DUP_INTERVAL seconds
void pskrep::gc(void)
{
time_t threshold = time(NULL) - DUP_INTERVAL;
unsigned rm = 0;
for (queue_t::iterator i = queue.begin(); i != queue.end() ; ) {
for (call_map_t::iterator j = i->second.begin(); j != i->second.end() ; ) {
band_map_t& b = j->second;
band_map_t::iterator k = find_if(b.begin(), b.end(), not_sent);
if (k != b.begin() && k == b.end())
--k;
rm += k - b.begin();
k = b.erase(b.begin(), k);
if (k != b.end() && k->status == PSKR_STATUS_SENT && k->rtime <= threshold) {
b.erase(k);
rm++;
}
if (b.empty())
i->second.erase(j++);
else
++j;
}
if (i->second.empty())
queue.erase(i++);
else
++i;
}
LOG_VERBOSE("Removed %u sent report(s)", rm);
}
static std::ostream& operator<<(std::ostream& out, const rcpt_report_t& r);
static std::istream& operator>>(std::istream& in, rcpt_report_t& r);
static std::ostream& operator<<(std::ostream& out, const queue_t& q);
static std::istream& operator>>(std::istream& in, queue_t& q);
void pskrep::save_queue(void)
{
std::string fname = TempDir;
fname.append(PSKREP_QUEUE_FILE);
std::ofstream out(fname.c_str());
if (out)
out << queue;
else
LOG_ERROR("Could not write %s", fname.c_str());
}
void pskrep::load_queue(void)
{
std::string fname = TempDir;
fname.append(PSKREP_QUEUE_FILE);
std::ifstream in(fname.c_str());
if (!in)
return;
in >> queue;
// restore pending reports as new
for (queue_t::iterator i = queue.begin(); i != queue.end(); ++i)
for (call_map_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
for (band_map_t::iterator k = j->second.begin(); k != j->second.end(); ++k)
if (k->status == PSKR_STATUS_PENDING)
k->status = PSKR_STATUS_NEW;
}
// -------------------------------------------------------------------------------------------------
// Text fields must be <= 254 bytes
#define MAX_TEXT_SIZE 254
// Records must be padded to a multiple of 4
#define PAD 4
pskrep_sender::pskrep_sender(const std::string& call, const std::string& loc, const std::string& ant,
const std::string& host_, const std::string& port_,
const std::string& long_id_, const std::string& short_id_)
: recv_callsign(call, 0, MAX_TEXT_SIZE), recv_locator(loc, 0, MAX_TEXT_SIZE),
recv_antenna(ant, 0, MAX_TEXT_SIZE),
host(host_, 0, MAX_TEXT_SIZE), port(port_, 0, MAX_TEXT_SIZE),
long_id(long_id_, 0, LONG_ID_SIZE), short_id(short_id_, 0, SHORT_ID_SIZE),
sequence_number(0), template_count(2 * TEMPLATE_THRESHOLD), last_template(0),
send_socket(0), dgram_size(0), report_offset(0)
{
create_socket();
dgram = new unsigned char[DGRAM_MAX];
write_station_info();
}
pskrep_sender::~pskrep_sender()
{
delete send_socket;
delete [] dgram;
}
// fldigi uses 0x0219 as the long station info template id (bytes 4,5)
const unsigned char pskrep_sender::long_station_info_template[] = {
0x00, 0x03, 0x00, 0x34, 0x02, 0x19, 0x00, 0x05, 0x00, 0x00,
0x80, 0x02, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F, // receiverCallsign
0x80, 0x04, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F, // receiverLocator
0x80, 0x0C, 0x00, 0x08, 0x00, 0x00, 0x76, 0x8F, // persistentIdentifier
0x80, 0x08, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F, // decoderSoftware
0x80, 0x09, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F, // anntennaInformation
0x00, 0x00
};
// fldigi uses 0x0218 as the short station info template id (bytes 4,5)
const unsigned char pskrep_sender::short_station_info_template[] = {
0x00, 0x03, 0x00, 0x24, 0x02, 0x18, 0x00, 0x03, 0x00, 0x00,
0x80, 0x02, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F, // receiverCallsign
0x80, 0x04, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F, // receiverLocator
0x80, 0x0C, 0x00, 0x08, 0x00, 0x00, 0x76, 0x8F, // persistentIdentifier
0x00, 0x00
};
void pskrep_sender::write_station_info(void)
{
char prog_info[MAX_TEXT_SIZE];
size_t prog_len;
prog_len = snprintf(prog_info, sizeof(prog_info), "%s", PACKAGE_TARNAME "-" PACKAGE_VERSION);
prog_len = MIN(prog_len, sizeof(prog_info));
struct utsname u;
if (uname(&u) != -1) {
prog_len += snprintf(prog_info+prog_len, sizeof(prog_info)-prog_len, "/%s-%s", u.sysname, u.machine);
prog_len = MIN(prog_len, sizeof(prog_info));
}
size_t call_len = recv_callsign.length(),
loc_len = recv_locator.length(),
ant_len = recv_antenna.length();
size_t long_len, short_len;
// Long station info length
long_len = 4 + // 4-byte header
1 + call_len + // 1-byte call length + call string length
1 + loc_len + // 1-byte loc length + loc string length
8 + // 8-byte identifier
1 + prog_len + // 1-byte prog length + prog string length
1 + ant_len; // 1-byte ant length + ant string length
long_len = pad(long_len, PAD);
// Short station info length
short_len = 4 + // 4-byte header
1 + call_len + // 1-byte call length + call string length
1 + loc_len + // 1-byte loc length + loc string length
8; // 8-byte identifier
short_len = pad(short_len, PAD);
long_station_info.resize(long_len);
short_station_info.resize(short_len);
unsigned char* p;
size_t npad;
// Write the long station info
p = &long_station_info[0];
// header
memcpy(p, long_station_info_template + 4, 2); p += 2;
*reinterpret_cast<uint16_t*>(p) = htons(long_len); p += sizeof(uint16_t);
// call
*p++ = call_len; memcpy(p, recv_callsign.data(), call_len); p += call_len;
// locator
*p++ = loc_len; memcpy(p, recv_locator.data(), loc_len); p += loc_len;
// identifier
memcpy(p, long_id.data(), LONG_ID_SIZE); p += LONG_ID_SIZE;
// program
*p++ = prog_len; memcpy(p, prog_info, prog_len); p += prog_len;
// antenna
*p++ = ant_len; memcpy(p, recv_antenna.data(), ant_len); p += ant_len;
// pad
npad = &long_station_info[0] + long_len - p;
if (npad)
memset(p, 0, npad);
LOG_VERBOSE("long_station_info=\"%s\"", str2hex(&long_station_info[0], long_len));
// Write the short station info
p = &short_station_info[0];
// header
memcpy(p, short_station_info_template + 4, 2); p += 2;
*reinterpret_cast<uint16_t*>(p) = htons(short_len); p += sizeof(uint16_t);
// call
*p++ = call_len; memcpy(p, recv_callsign.data(), call_len); p += call_len;
// locator
*p++ = loc_len; memcpy(p, recv_locator.data(), loc_len); p += loc_len;
// identifier
memcpy(p, long_id.data(), LONG_ID_SIZE); p += LONG_ID_SIZE;
// pad
npad = &short_station_info[0] + short_len - p;
if (npad)
memset(p, 0, npad);
LOG_VERBOSE("short_station_info=\"%s\"", str2hex(&short_station_info[0], short_len));
}
// fldigi uses 0x022C as the reception record template id (bytes 4,5)
const unsigned char pskrep_sender::rcpt_record_template[] = {
0x00, 0x02, 0x00, 0x34, 0x02, 0x2C, 0x00, 0x06,
0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F, // senderCallsign
0x00, 0x96, 0x00, 0x04, // flowStartSeconds
0x80, 0x05, 0x00, 0x04, 0x00, 0x00, 0x76, 0x8F, // frequency
0x80, 0x0A, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F, // mode (adif string)
0x80, 0x03, 0xff, 0xff, 0x00, 0x00, 0x76, 0x8F, // senderLocator (if known)
0x80, 0x0B, 0x00, 0x01, 0x00, 0x00, 0x76, 0x8F // flags (informationSource)
};
void pskrep_sender::write_preamble(void)
{
time_t now = time(NULL);
unsigned char* p = dgram;
// header
*p++ = 0x00; *p++ = 0x0A; /* length written later */ p += 2;
/* time written later */ p += sizeof(uint32_t);
*reinterpret_cast<uint32_t*>(p) = htonl(sequence_number); p += sizeof(uint32_t);
memcpy(p, short_id.data(), SHORT_ID_SIZE); p += SHORT_ID_SIZE;
const unsigned char* station_info_template(long_station_info_template);
size_t tlen;
std::vector<unsigned char>* station_info(&long_station_info);
if (template_count == 0 && now - last_template >= TEMPLATE_INTERVAL)
template_count = TEMPLATE_THRESHOLD;
if (template_count > TEMPLATE_THRESHOLD) {
station_info_template = long_station_info_template;
tlen = sizeof(long_station_info_template);
station_info = &long_station_info;
}
else if (template_count != 0) {
station_info_template = short_station_info_template;
tlen = sizeof(short_station_info_template);
station_info = &short_station_info;
}
if (template_count > 0) {
memcpy(p, rcpt_record_template, sizeof(rcpt_record_template)); p += sizeof(rcpt_record_template);
memcpy(p, station_info_template, tlen); p += tlen;
template_count--;
last_template = now;
}
// station info record
memcpy(p, &(*station_info)[0], station_info->size());
p += station_info->size();
report_offset = p - dgram;
// write report record header
memcpy(p, rcpt_record_template + 4, 2);
p += 2; /* length written later */
p += sizeof(uint16_t);
dgram_size = p - dgram;
}
bool pskrep_sender::append(const std::string& callsign, const band_map_t::value_type& r)
{
guard_lock dsp_lock(&pskrep_mutex);
if (dgram_size == 0)
write_preamble();
size_t call_len = callsign.length();
call_len = MIN(MAX_TEXT_SIZE, call_len);
const char* mode = mode_info[r.mode].adif_name;
size_t mode_len = strlen(mode);
mode_len = MIN(MAX_TEXT_SIZE, mode_len);
size_t loc_len = MIN(MAX_TEXT_SIZE, r.locator.length());
// call_len + call + time + freq + mode_len + mode + loc_len + loc + info
size_t rlen = 1 + call_len + 4 + 4 + 1 + mode_len + 1 + loc_len + 1;
if (pad(rlen, PAD) + dgram_size > DGRAM_MAX) // datagram full
return false;
LOG_INFO("Appending report (call=%s mode=%s freq=%d time=%d type=%u)",
callsign.c_str(), mode, //mode_info[r.mode].adif_name,
static_cast<int>(r.freq),
static_cast<int>(r.rtime), r.rtype);
unsigned char* start = dgram + dgram_size;
unsigned char* p = start;
// call
*p++ = call_len; memcpy(p, callsign.data(), call_len); p += call_len;
// 4-byte reception time
*reinterpret_cast<uint32_t*>(p) = htonl(r.rtime); p += sizeof(uint32_t);
// 4-byte freq
*reinterpret_cast<uint32_t*>(p) = htonl(r.freq); p += sizeof(uint32_t);
// mode
*p++ = mode_len; memcpy(p, mode, mode_len); p += mode_len;
// locator
*p++ = loc_len; memcpy(p, r.locator.data(), loc_len); p += loc_len;
// info source
*p++ = r.rtype;
LOG_VERBOSE(" \"%s\"", str2hex(start, p - start));
dgram_size += rlen;
return true;
}
void* pskrep_sender::resolver(void* obj)
{
pskrep_sender* s = reinterpret_cast<pskrep_sender*>(obj);
try {
s->send_socket = new Socket(Address(s->host.c_str(), s->port.c_str(), "udp"));
s->send_socket->connect();
}
catch (const SocketException& e) {
LOG_ERROR("Could not resolve %s: %s", s->host.c_str(), e.what());
}
return NULL;
}
void pskrep_sender::create_socket(void)
{
if (pthread_create(&resolver_thread, NULL, resolver, this) != 0)
LOG_PERROR("pthread_create");
}
bool pskrep_sender::send(void)
{
if (!send_socket)
return false;
// empty dgram or no reports (shouldn't happen)
if (dgram_size == 0 || dgram_size == report_offset + 4) {
std::stringstream info;
info << dgram_size << " " << report_offset;
LOG_VERBOSE("Not sending empty dgram: %s", info.str().c_str());
return false;
}
// Finish writing the report record:
// do we need padding?
size_t npad = (dgram_size - report_offset) % PAD;
if (npad) {
npad = PAD - npad;
memset(dgram + dgram_size, 0x0, npad);
dgram_size += npad;
}
// write length
*reinterpret_cast<uint16_t*>(dgram + report_offset + 2) = htons(dgram_size - report_offset);
// finish writing the datagram
*reinterpret_cast<uint16_t*>(dgram + 2) = htons(dgram_size);
*reinterpret_cast<uint32_t*>(dgram + 4) = htonl(time(NULL));
bool ret;
{
std::stringstream info;
info << "(" << dgram_size << "): \"" << str2hex(dgram, dgram_size) << "\"";
LOG_VERBOSE("Sending datgram %s", info.str().c_str());
}
try {
if ((size_t)send_socket->send(dgram, dgram_size) != dgram_size)
throw SocketException("short write");
ret = true;
}
catch (const SocketException& e) {
LOG_ERROR("Could not send datagram to %s port %s: %s", host.c_str(), port.c_str(), e.what());
ret = false;
}
// increment this regardless of any errors
sequence_number++;
dgram_size = 0;
return ret;
}
// Pad len to a multiple of mult
size_t pskrep_sender::pad(size_t len, size_t mult)
{
size_t r = len % mult;
return r ? len + mult - r : len;
}
// -------------------------------------------------------------------------------------------------
static std::istream& operator>>(std::istream& in, rtype_t& t)
{
int i;
in >> i;
t = static_cast<rtype_t>(i);
return in;
}
static std::istream& operator>>(std::istream& in, status_t& t)
{
int i;
in >> i;
t = static_cast<status_t>(i);
return in;
}
static std::istream& operator>>(std::istream& in, rcpt_report_t& r)
{
in >> r.mode >> r.freq >> r.rtime >> r.rtype >> r.status >> r.locator;
if (*r.locator.c_str() == '?') r.locator.clear();
return in;
}
static std::ostream& operator<<(std::ostream& out, const rcpt_report_t& r)
{
return out << r.mode << ' ' << r.freq << ' ' << r.rtime << ' '
<< r.rtype << ' ' << r.status << ' ' << (r.locator.empty() ? "?" : r.locator);
}
static std::ostream& operator<<(std::ostream& out, const queue_t& q)
{
for (queue_t::const_iterator i = q.begin(); i != q.end(); ++i)
for (call_map_t::const_iterator j = i->second.begin(); j != i->second.end(); ++j)
for (band_map_t::const_iterator k = j->second.begin(); k != j->second.end(); ++k)
out << *k << " " << j->first << " " << i->first << '\n';
return out;
}
static std::istream& operator>>(std::istream& in, queue_t& q)
{
rcpt_report_t rep;
int band;
std::string call;
while (in >> rep >> band >> call)
q[call][static_cast<band_t>(band)].push_back(rep);
return in;
}
| 27,456
|
C++
|
.cxx
| 768
| 33.398438
| 115
| 0.645836
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,079
|
notify.cxx
|
w1hkj_fldigi/src/spot/notify.cxx
|
// ----------------------------------------------------------------------------
// notify.cxx
//
// Copyright (C) 2009-2010
// Stelios Bounanos, M0GLD
//
// Generic notifier
//
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <sstream>
#include "timeops.h"
#if HAVE_STD_HASH
# define MAP_TYPE std::unordered_map
# define HASH_TYPE std::hash
# include <unordered_map>
#else
# if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
# define MAP_TYPE std::tr1::unordered_map
# include <tr1/unordered_map>
# else
// use the non-standard gnu hash_map on gcc <= 4.0.x,
// which has a broken tr1::unordered_map::operator=
# define MAP_TYPE __gnu_cxx::hash_map
# include <ext/hash_map>
namespace __gnu_cxx {
// define the missing hash specialisation for std::string
// using the 'const char*' hash function
template<> struct hash<std::string> {
size_t operator()(const std::string& s) const { return __stl_hash_string(s.c_str()); }
};
}
# endif
#endif
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#ifdef __MINGW32__
# include <windows.h>
#endif
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Preferences.H>
#include <FL/Fl_Pixmap.H>
#include <FL/Fl.H>
#include <FL/Enumerations.H>
#include <FL/Fl_Button.H>
#include "flinput2.h"
#include "flmisc.h"
#include "macros.h"
#include "debug.h"
#include "dxcc.h"
#include "spot.h"
#include "pskrep.h"
#include "logsupport.h"
#include "re.h"
#include "fileselect.h"
#include "icons.h"
#include "configuration.h"
#include "macroedit.h"
#include "main.h"
#include "fl_digi.h"
#include "waterfall.h"
#include "globals.h"
#include "trx.h"
#include "rsid.h"
#include "gettext.h"
#include "notifydialog.h"
#include "notify.h"
#include "qrunner.h"
struct notify_action_t
{
std::string alert;
std::string rx_marker;
std::string macro;
std::string program;
time_t alert_timeout;
time_t trigger_limit;
};
enum notify_filter_match_t { NOTIFY_FILTER_CALLSIGN, NOTIFY_FILTER_DXCC };
typedef MAP_TYPE<std::string, bool> notify_filter_dxcc_t;
struct notify_filter_t
{
notify_filter_match_t match;
std::string callsign;
notify_filter_dxcc_t dxcc;
std::string dxcc_last;
bool nwb, lotw, eqsl;
};
struct notify_dup_t
{
time_t when;
band_t band;
trx_mode mode;
long long freq;
};
typedef MAP_TYPE<std::string, notify_dup_t> notify_seen_t;
enum notify_event_t { NOTIFY_EVENT_MYCALL, NOTIFY_EVENT_STATION, NOTIFY_EVENT_CUSTOM, NOTIFY_EVENT_RSID, NOTIFY_EVENT_RSID_EOT };
struct notify_t
{
notify_event_t event;
time_t last_trigger;
std::string re;
bool enabled;
int afreq;
long long rfreq;
trx_mode mode;
const char* match_string;
const regmatch_t* submatch_offsets;
size_t submatch_length;
notify_dup_t dup;
bool dup_ignore;
size_t dup_ref;
notify_seen_t last_seen;
notify_action_t action;
notify_filter_t filter;
};
typedef std::list<notify_t> notify_list_t;
static void notify_init_window(void);
static void notify_save(void);
static void notify_load(void);
static void notify_register(notify_t& n);
static void notify_unregister(const notify_t& n);
static void notify_set_qsodb_cache(void);
static void notify_event_cb(Fl_Widget* w, void* arg);
static void notify_select_cb(Fl_Widget* w, void* arg);
static void notify_dxcc_browse_cb(Fl_Widget* w, void* arg);
static void notify_add_cb(Fl_Widget* w, void* arg);
static void notify_remove_cb(Fl_Widget* w, void* arg);
static void notify_update_cb(Fl_Widget* w, void* arg);
static void notify_dialog_default_cb(Fl_Widget* w, void* arg);
static void notify_rx_default_cb(Fl_Widget* w, void* arg);
static void notify_macro_edit_cb(Fl_Widget* w, void* arg);
static void notify_program_select_cb(Fl_Widget* w, void* arg);
static void notify_dxcc_check_cb(Fl_Widget* w, void* arg);
static void notify_test_cb(Fl_Widget* w, void* arg);
static void notify_filter_dxcc_select_cb(Fl_Widget* w, void* arg);
static void notify_filter_dxcc_search(Fl_Widget* w, void* arg);
static void notify_dup_ignore_cb(Fl_Widget* w, void* arg);
static void notify_re_cb(Fl_Widget* w, void* arg);
static void notify_recv(trx_mode mode, int afreq, const char* str, const regmatch_t* sub, size_t len, void* data);
static void notify_table_append(const notify_t& n);
////////////////////////////////////////////////////////////////////////////////
struct event_regex_t {
const char* regex;
size_t index;
};
static Fl_Menu_Item notify_event_menu[] = {
{ _("My callsign de CALL") },
{ _("Station heard twice") },
{ _("Custom text search") },
{ _("RSID reception") },
{ _("RSID EOT") },
{ 0 }
};
#define NOTIFY_SET_DUP_MENU (void*)1
enum { NOTIFY_LIST_MENU_TOGGLE, NOTIFY_LIST_MENU_UPDATE, NOTIFY_LIST_MENU_REMOVE };
static Fl_Menu_Item notify_list_context_menu[] = {
{ icons::make_icon_label(_("Toggle"), shutdown_icon), 0, notify_update_cb, (void*)NOTIFY_LIST_MENU_TOGGLE },
{ icons::make_icon_label(_("Update"), refresh_icon), 0, notify_update_cb, (void*)NOTIFY_LIST_MENU_UPDATE },
{ icons::make_icon_label(_("Remove"), minus_icon), 0, notify_remove_cb, (void*)NOTIFY_LIST_MENU_REMOVE },
{ 0 }
};
enum {
NOTIFY_DXCC_SELECT_CONT, NOTIFY_DXCC_SELECT_ITU,
NOTIFY_DXCC_SELECT_CQ, NOTIFY_DXCC_SELECT_ALL,
NOTIFY_DXCC_DESELECT_CONT, NOTIFY_DXCC_DESELECT_ITU,
NOTIFY_DXCC_DESELECT_CQ, NOTIFY_DXCC_DESELECT_ALL
};
static Fl_Menu_Item notify_dxcc_context_menu[] = {
{ _("Select"), 0, 0, 0, FL_SUBMENU },
{ _("Continent"), 0, notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_SELECT_CONT },
{ _("ITU zone"), 0, notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_SELECT_ITU },
{ _("CQ zone"), 0, notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_SELECT_CQ, FL_MENU_DIVIDER },
{ _("All"), 0, notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_SELECT_ALL },
{ 0 },
{ _("Deselect"), 0, 0, 0, FL_SUBMENU },
{ _("Continent"), 0, notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_DESELECT_CONT },
{ _("ITU zone"), 0, notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_DESELECT_ITU },
{ _("CQ zone"), 0, notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_DESELECT_CQ, FL_MENU_DIVIDER },
{ _("All"), 0, notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_DESELECT_ALL },
{ 0 },
{ 0 }
};
static event_regex_t event_regex[] = {
{ "<MYCALL>.+de[[:space:]]+(<CALLSIGN_RE>)", 1 },
{ PSKREP_RE, PSKREP_RE_INDEX },
{ "", 0 },
{ "", 1 },
{ "", 0 }
};
static const char* default_alert_text[] = {
"$CALLSIGN is calling you\n $TEXT\nTime: %X %Z (%z)\nMode: $MODEM @ $RF_KHZ KHz",
"Heard $CALLSIGN ($COUNTRY)\n $TEXT\nTime: %X %Z (%z)\nMode: $MODEM @ $RF_KHZ KHz",
"",
"RSID received\nMode: $MODEM @ $RF_KHZ KHz\nTime: %X %Z (%z)",
"RSID End of Transmission",
};
static Fl_Menu_Item notify_dup_callsign_menu[] = {
{ "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { 0 }
};
static Fl_Menu_Item notify_dup_refs_menu[] = {
{ "Substring \\0" }, { "Substring \\1" }, { "Substring \\2" }, { "Substring \\3" },
{ "Substring \\4" }, { "Substring \\5" }, { "Substring \\6" }, { "Substring \\7" },
{ "Substring \\8" }, { "Substring \\9" }, { 0 }
};
enum {
NOTIFY_DXCC_COL_SEL, NOTIFY_DXCC_COL_CN, NOTIFY_DXCC_COL_CT,
NOTIFY_DXCC_COL_ITU, NOTIFY_DXCC_COL_CQ, NOTIFY_DXCC_NUMCOL
};
template <typename T, typename U> static T& advli(T& i, int n) { advance(i, n); return i; }
template <typename T, typename U> static T advli(T i, U n) { advance(i, n); return i; }
static notify_list_t notify_list;
static notify_t notify_tmp;
static const std::vector<dxcc*>* dxcc_list;
Fl_Double_Window* notify_window;
Fl_Double_Window* dxcc_window;
////////////////////////////////////////////////////////////////////////////////
// public interface
////////////////////////////////////////////////////////////////////////////////
void notify_start(void)
{
if (!notify_window)
notify_init_window();
notify_load();
if (!notify_list.empty()) {
for (notify_list_t::iterator i = notify_list.begin(); i != notify_list.end(); ++i)
if (i->enabled)
notify_register(*i);
tblNotifyList->value(0);
tblNotifyList->do_callback();
notify_set_qsodb_cache();
}
}
void notify_stop(void)
{
for (notify_list_t::iterator i = notify_list.begin(); i != notify_list.end(); ++i)
notify_unregister(*i);
notify_list.clear();
notify_set_qsodb_cache();
tblNotifyList->clear();
}
void notify_show(void)
{
if (!notify_window)
notify_window = make_notify_window();
notify_window->show();
}
// display the dxcc window
void notify_dxcc_show(bool readonly)
{
if (!dxcc_list)
return;
if (readonly) {
btnNotifyDXCCSelect->hide();
btnNotifyDXCCDeselect->hide();
tblNotifyFilterDXCC->callback(Fl_Widget::default_callback);
tblNotifyFilterDXCC->menu(0);
btnNotifyDXCCDeselect->do_callback(); // deselect all
if (dxcc_window->shown())
dxcc_window->hide();
if (dxcc_window->modal())
dxcc_window->set_non_modal();
}
else {
btnNotifyDXCCSelect->show();
btnNotifyDXCCDeselect->show();
tblNotifyFilterDXCC->callback(notify_dxcc_check_cb);
tblNotifyFilterDXCC->menu(notify_dxcc_context_menu);
dxcc_window->set_modal();
}
dxcc_window->show();
}
// called by the myCall callback when the operator callsign is changed
void notify_change_callsign(void)
{
for (notify_list_t::iterator i = notify_list.begin(); i != notify_list.end(); ++i) {
if (i->event == NOTIFY_EVENT_MYCALL) { // re-register
notify_unregister(*i);
notify_register(*i);
}
}
}
// called by the RSID decoder
void notify_rsid(trx_mode mode, int afreq)
{
const char* mode_name = mode_info[mode].name;
regmatch_t sub[2] = { { 0, (regoff_t)strlen(mode_name) } };
sub[1] = sub[0];
for (notify_list_t::iterator i = notify_list.begin(); i != notify_list.end(); ++i)
if (i->event == NOTIFY_EVENT_RSID)
notify_recv(mode, afreq, mode_name, sub, 2, &*i);
}
// called by the RSID decoder
void notify_rsid_eot(trx_mode mode, int afreq)
{
const char* mode_name = mode_info[mode].name;
regmatch_t sub[2] = { { 0, (regoff_t)strlen(mode_name) } };
sub[1] = sub[0];
for (notify_list_t::iterator i = notify_list.begin(); i != notify_list.end(); ++i)
if (i->event == NOTIFY_EVENT_RSID_EOT)
notify_recv(mode, afreq, mode_name, sub, 2, &*i);
}
// called by the config dialog when the "notifications only"
// rsid option is selected
void notify_create_rsid_event(bool val)
{
if (!val)
return;
for (notify_list_t::iterator i = notify_list.begin(); i != notify_list.end(); ++i)
if (i->event == NOTIFY_EVENT_RSID || i->event == NOTIFY_EVENT_RSID_EOT)
return;
notify_t rsid_event = {
NOTIFY_EVENT_RSID, 0, "", true, 0, 0LL, NUM_MODES, NULL, NULL, 0,
{ 0, NUM_BANDS, NUM_MODES, 0LL }, false, 0
};
notify_action_t rsid_action = { default_alert_text[NOTIFY_EVENT_RSID], "", "", "", 30, 1 };
rsid_event.action = rsid_action;
notify_list.push_back(rsid_event);
notify_table_append(notify_list.back());
tblNotifyList->do_callback();
notify_save();
}
////////////////////////////////////////////////////////////////////////////////
// misc utility functions
////////////////////////////////////////////////////////////////////////////////
static void notify_set_event_dup(const notify_t& n);
static void notify_set_event_dup_menu(const char* re);
static bool notify_dxcc_row_checked(int i);
// return actual regular expression for event n
static std::string notify_get_re(const notify_t& n)
{
std::string::size_type pos;
std::string s = n.re;
struct { const char* str; const char* rep; } subst[] = {
{ "<MYCALL>", progdefaults.myCall.c_str() },
{ "<CALLSIGN_RE>", CALLSIGN_RE }
};
for (size_t i = 0; i < sizeof(subst)/sizeof(*subst); i++)
if ((pos = s.find(subst[i].str)) != std::string::npos)
s.replace(pos, strlen(subst[i].str), subst[i].rep);
return s;
}
// set the widget values using event n
static void notify_event_to_gui(const notify_t& n)
{
// event
mnuNotifyEvent->value(n.event);
notify_event_cb(mnuNotifyEvent, 0);
if (!n.re.empty() && inpNotifyRE->visible())
inpNotifyRE->value(n.re.c_str());
btnNotifyEnabled->value(n.enabled);
// action
inpNotifyActionDialog->value(n.action.alert.c_str());
inpNotifyActionRXMarker->value(n.action.rx_marker.c_str());
inpNotifyActionMacro->value(n.action.macro.c_str());
inpNotifyActionProgram->value(n.action.program.c_str());
cntNotifyActionLimit->value(n.action.trigger_limit);
cntNotifyActionDialogTimeout->value(n.action.alert_timeout);
// dup
chkNotifyDupIgnore->value(n.dup_ignore);
chkNotifyDupIgnore->do_callback();
notify_set_event_dup(n);
cntNotifyDupTime->value(n.dup.when);
chkNotifyDupBand->value(n.dup.band);
chkNotifyDupMode->value(n.dup.mode);
// filter
btnNotifyDXCCDeselect->do_callback(); // deselect all
if (!grpNotifyFilter->active())
return;
chkNotifyFilterCall->value(0);
inpNotifyFilterCall->hide();
chkNotifyFilterDXCC->value(0);
btnNotifyFilterDXCC->hide();
inpNotifyFilterCall->value(0);
if (n.filter.match == NOTIFY_FILTER_CALLSIGN) {
chkNotifyFilterCall->value(1);
inpNotifyFilterCall->show();
inpNotifyFilterCall->value(n.filter.callsign.c_str());
}
else if (n.filter.match == NOTIFY_FILTER_DXCC) {
chkNotifyFilterDXCC->value(1);
btnNotifyFilterDXCC->show();
}
chkNotifyFilterNWB->value(n.filter.nwb);
chkNotifyFilterLOTW->value(n.filter.lotw);
chkNotifyFilterEQSL->value(n.filter.eqsl);
}
// copy widget values to event n
static void notify_gui_to_event(notify_t& n)
{
// event
n.event = static_cast<notify_event_t>(mnuNotifyEvent->value());
n.last_trigger = 0;
if (n.event == NOTIFY_EVENT_CUSTOM)
n.re = inpNotifyRE->value();
else if (n.event != NOTIFY_EVENT_RSID_EOT)
n.re = event_regex[n.event].regex;
n.enabled = btnNotifyEnabled->value();
n.afreq = 0;
n.rfreq = 0;
n.match_string = 0;
n.submatch_offsets = 0;
n.submatch_length = 0;
// action
n.action.alert = inpNotifyActionDialog->value();
n.action.rx_marker = inpNotifyActionRXMarker->value();
n.action.macro = inpNotifyActionMacro->value();
n.action.program = inpNotifyActionProgram->value();
n.action.trigger_limit = static_cast<time_t>(cntNotifyActionLimit->value());
n.action.alert_timeout = static_cast<time_t>(cntNotifyActionDialogTimeout->value());
// filter
if (chkNotifyFilterCall->value()) {
n.filter.callsign = inpNotifyFilterCall->value();
n.filter.match = NOTIFY_FILTER_CALLSIGN;
}
else if (chkNotifyFilterDXCC->value()) {
n.filter.match = NOTIFY_FILTER_DXCC;
n.filter.dxcc.clear();
for (int i = 0; i < tblNotifyFilterDXCC->rows(); i++) {
if (notify_dxcc_row_checked(i))
n.filter.dxcc[tblNotifyFilterDXCC->valueAt(i, NOTIFY_DXCC_COL_CN)] = true;
}
}
n.filter.nwb = chkNotifyFilterNWB->value();
n.filter.lotw = chkNotifyFilterLOTW->value();
n.filter.eqsl = chkNotifyFilterEQSL->value();
// dup
n.dup_ignore = chkNotifyDupIgnore->value();
n.dup_ref = mnuNotifyDupWhich->value();
n.dup.when = static_cast<time_t>(cntNotifyDupTime->value());
n.dup.band = chkNotifyDupBand->value() ? NUM_BANDS : static_cast<band_t>(0);
n.dup.mode = chkNotifyDupMode->value() ? NUM_MODES : static_cast<trx_mode>(0);
}
// initialise the notifications window
static void notify_init_window(void)
{
notify_window = make_notify_window();
notify_window->xclass(PACKAGE_TARNAME);
dxcc_window = make_dxcc_window();
dxcc_window->xclass(PACKAGE_TARNAME);
struct { Fl_Button* button; const char* label; } buttons[] = {
{ btnNotifyAdd, icons::make_icon_label(_("Add"), plus_icon) },
{ btnNotifyRemove, icons::make_icon_label(_("Remove"), minus_icon) },
{ btnNotifyUpdate, icons::make_icon_label(_("Update"), refresh_icon) },
{ btnNotifyTest, icons::make_icon_label(_("Test..."), applications_system_icon) },
{ btnNotifyClose, icons::make_icon_label(_("Close"), close_icon) },
{ btnNotifyDXCCSelect, icons::make_icon_label(_("Select All"), edit_select_all_icon) },
{ btnNotifyDXCCDeselect, icons::make_icon_label(_("Clear All"), edit_clear_icon) },
{ btnNotifyDXCCClose, icons::make_icon_label(_("Close"), close_icon) },
};
for (size_t i = 0; i < sizeof(buttons)/sizeof(*buttons); i++) {
buttons[i].button->label(buttons[i].label);
icons::set_icon_label(buttons[i].button);
buttons[i].button->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
}
struct { Fl_Button* button; const char** icon; } buttons2[] = {
{ btnNotifyFilterDXCC, text_editor_icon },
{ btnNotifyActionDialogDefault, text_icon },
{ btnNotifyActionMarkerDefault, text_icon },
{ btnNotifyActionMacro, text_editor_icon },
{ btnNotifyActionProgram, folder_open_icon }
};
for (size_t i = 0; i < sizeof(buttons2)/sizeof(*buttons2); i++)
buttons2[i].button->image(new Fl_Pixmap(buttons2[i].icon));
inpNotifyRE->hide();
grpNotifyFilter->deactivate();
mnuNotifyEvent->menu(notify_event_menu);
btnNotifyEnabled->value(1);
inpNotifyRE->callback(notify_re_cb);
int w = (tblNotifyList->w() - Fl::box_dw(tblNotifyList->box())) / 4;
struct col_info_t {
const char* label;
int width;
};
col_info_t ncols[] = {
{ "Event", w + 30 }, { "Filter", w + 30 },
{ "Action", w - 30 }, { "Enabled", w - 30 },
};
for (size_t i = 0; i < sizeof(ncols)/sizeof(*ncols); i++) {
tblNotifyList->addColumn(ncols[i].label, ncols[i].width,
static_cast<Fl_Align>(FL_ALIGN_CENTER | FL_ALIGN_CLIP));
}
tblNotifyList->rowSize(FL_NORMAL_SIZE);
tblNotifyList->headerSize(FL_NORMAL_SIZE);
tblNotifyList->allowSort(false);
tblNotifyList->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED);
tblNotifyList->menu(notify_list_context_menu);
for (int i = 0; i < notify_list_context_menu->size(); i++)
icons::set_icon_label(¬ify_list_context_menu[i]);
w = (tblNotifyFilterDXCC->w() - Fl::box_dw(tblNotifyFilterDXCC->box()) -
tblNotifyFilterDXCC->scrollbSize()) / NOTIFY_DXCC_NUMCOL;
col_info_t dcols[NOTIFY_DXCC_NUMCOL] = {
{ "", 25 }, { _("Country"), w + w - 25 + 2*(w - 45) },
{ _("Continent"), w }, { "ITU", 45 }, { "CQ", 45 }
};
for (size_t i = 0; i < NOTIFY_DXCC_NUMCOL; i++) {
tblNotifyFilterDXCC->addColumn(dcols[i].label, dcols[i].width,
static_cast<Fl_Align>(FL_ALIGN_CENTER | FL_ALIGN_CLIP), strcmp);
}
tblNotifyFilterDXCC->columnAlign(NOTIFY_DXCC_COL_CN, static_cast<Fl_Align>(FL_ALIGN_LEFT | FL_ALIGN_CLIP));
tblNotifyFilterDXCC->rowSize(FL_NORMAL_SIZE);
tblNotifyFilterDXCC->headerSize(FL_NORMAL_SIZE);
tblNotifyFilterDXCC->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED);
tblNotifyFilterDXCC->menu(notify_dxcc_context_menu);
btnNotifyDXCCSelect->callback(notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_SELECT_ALL);
btnNotifyDXCCDeselect->callback(notify_filter_dxcc_select_cb, (void*)NOTIFY_DXCC_DESELECT_ALL);
inpNotifyDXCCSearchCountry->callback(notify_filter_dxcc_search);
inpNotifyDXCCSearchCountry->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED | FL_WHEN_ENTER_KEY);
inpNotifyDXCCSearchCallsign->callback(notify_filter_dxcc_search);
inpNotifyDXCCSearchCallsign->when(FL_WHEN_CHANGED);
inpNotifyDXCCSearchCallsign->textfont(FL_HELVETICA);
inpNotifyActionDialog->textfont(FL_HELVETICA);
inpNotifyActionRXMarker->textfont(FL_HELVETICA);
inpNotifyActionMacro->textfont(FL_HELVETICA);
inpNotifyActionProgram->textfont(FL_HELVETICA);
inpNotifyRE->textfont(FL_HELVETICA);
inpNotifyFilterCall->textfont(FL_HELVETICA);
tblNotifyList->callback(notify_select_cb);
mnuNotifyEvent->callback(notify_event_cb, NOTIFY_SET_DUP_MENU);
btnNotifyFilterDXCC->callback(notify_dxcc_browse_cb);
btnNotifyAdd->callback(notify_add_cb);
btnNotifyRemove->callback(notify_remove_cb);
btnNotifyUpdate->callback(notify_update_cb, (void*)NOTIFY_LIST_MENU_UPDATE);
btnNotifyActionDialogDefault->callback(notify_dialog_default_cb);
btnNotifyActionMarkerDefault->callback(notify_rx_default_cb);
btnNotifyActionProgram->callback(notify_program_select_cb);
btnNotifyActionMacro->callback(notify_macro_edit_cb);
btnNotifyTest->callback(notify_test_cb);
tblNotifyFilterDXCC->callback(notify_dxcc_check_cb);
chkNotifyDupIgnore->callback(notify_dup_ignore_cb);
mnuNotifyDupWhich->menu(notify_dup_refs_menu);
chkNotifyFilterCall->value(0);
chkNotifyFilterDXCC->value(0);
inpNotifyFilterCall->hide();
btnNotifyFilterDXCC->hide();
chkNotifyDupIgnore->value(1);
chkNotifyDupIgnore->do_callback();
chkNotifyDupBand->value(1);
chkNotifyDupMode->value(1);
cntNotifyDupTime->value(3600);
mnuNotifyEvent->do_callback(); // for the dup menu
dxcc_list = dxcc_entity_list();
if (dxcc_list) {
char cq[5], itu[5];
for (std::vector<dxcc*>::const_iterator i = dxcc_list->begin(); i != dxcc_list->end(); ++i) {
snprintf(itu, sizeof(itu), "%02d", (*i)->itu_zone);
snprintf(cq, sizeof(cq), "%02d", (*i)->cq_zone);
tblNotifyFilterDXCC->addRow(NOTIFY_DXCC_NUMCOL, "[x]", (*i)->country,
(*i)->continent, itu, cq);
}
}
else {
chkNotifyFilterDXCC->deactivate();
btnNotifyFilterDXCC->deactivate();
}
unsigned char q = qsl_is_open();
if (!(q & (1 << QSL_LOTW)))
chkNotifyFilterLOTW->deactivate();
if (!(q & (1 << QSL_EQSL)))
chkNotifyFilterEQSL->deactivate();
}
// append event n to the table widget
static void notify_table_append(const notify_t& n)
{
// add to table
std::string fcol, acol;
if (n.event == NOTIFY_EVENT_MYCALL)
fcol = "My callsign";
else if (n.event == NOTIFY_EVENT_STATION) {
if (n.filter.match == NOTIFY_FILTER_CALLSIGN)
fcol += "Callsign";
else if (n.filter.match == NOTIFY_FILTER_DXCC)
fcol += "DXCC";
}
else if (n.event == NOTIFY_EVENT_CUSTOM)
fcol = n.re;
if (n.filter.nwb)
fcol += ", N";
if (n.filter.lotw)
fcol += ", L";
if (n.filter.eqsl)
fcol += ", E";
if (!n.action.alert.empty())
acol = "A";
if (!n.action.rx_marker.empty()) {
if (!acol.empty())
acol += ", ";
acol += "RX";
}
if (!n.action.macro.empty()) {
if (!acol.empty())
acol += ", ";
acol += "TX";
}
if (!n.action.program.empty()) {
if (!acol.empty())
acol += ", ";
acol += "P";
}
tblNotifyList->addRow(4, notify_event_menu[n.event].label(),
fcol.c_str(), acol.c_str(), n.enabled ? "Y" : "N");
tblNotifyList->value(tblNotifyList->rows() - 1);
tblNotifyList->redraw();
}
// clear and reload the event table
static void notify_table_reload(void)
{
tblNotifyList->clear();
for (notify_list_t::const_iterator i = notify_list.begin(); i != notify_list.end(); ++i)
notify_table_append(*i);
}
////////////////////////////////////////////////////////////////////////////////
// spotter and notification functions
////////////////////////////////////////////////////////////////////////////////
static notify_dialog *alert_window = 0;
static void notify_goto_freq_cb(Fl_Widget* w, void* arg)
{
const notify_t* n = static_cast<notify_t*>(arg);
if (progdefaults.rsid_mark && n->event != NOTIFY_EVENT_RSID_EOT) // mark current modem & freq
REQ(note_qrg, false, "\nBefore RSID: ", "\n\n",
active_modem->get_mode(), 0LL, active_modem->get_freq());
if (active_modem->get_mode() != n->mode)
init_modem_sync(n->mode);
qsy(n->rfreq, n->afreq);
if (n->event == NOTIFY_EVENT_RSID && btnRSID->value() &&
progdefaults.rsid_auto_disable && progdefaults.rsid_notify_only)
toggleRSID();
w->parent()->hide();
}
static void notify_alert_window_cb(Fl_Widget* w, void* arg)
{
delete static_cast<notify_t*>(arg);
w->hide();
}
static void notify_show_alert(const notify_t& n, const char* msg)
{
if (!alert_window) alert_window = new notify_dialog;
if (alert_window->visible())
return;
Fl_Button* goto_freq = alert_window->make_button(120);
if (goto_freq) {
char label[32];
snprintf(label, sizeof(label), "Go to %d Hz", n.afreq);
goto_freq->copy_label(label);
goto_freq->callback(notify_goto_freq_cb, new notify_t(n));
alert_window->callback(notify_alert_window_cb, goto_freq->user_data());
}
alert_window->notify(msg, n.action.alert_timeout);
REQ(show_notifier, alert_window);
}
struct replace_refs
{
enum {
REF_MODEM, REF_DF_HZ, REF_RF_HZ, REF_RF_KHZ, REF_AF_HZ,
REF_LF_KHZ, REF_CALLSIGN, REF_COUNTRY, REF_MATCHED_TEXT, REF_TEXT
};
static void replace_var(const notify_t& n, int t, char* str, size_t len)
{
switch (t) {
case REF_MODEM:
strncpy(str, mode_info[n.mode].sname, len-1);
str[len - 1] = '\0';
break;
case REF_DF_HZ:
snprintf(str, len, "%lld", wf->rfcarrier());
break;
case REF_RF_HZ: case REF_RF_KHZ: {
long long hz = wf->rfcarrier() + (wf->USB() ? n.afreq : -n.afreq);
if (t == REF_RF_HZ)
snprintf(str, len, "%lld", hz);
else // REF_RF_KHZ
snprintf(str, len, "%.3f", (double)hz / 1000.0);
break;
}
case REF_AF_HZ:
snprintf(str, len, "%d", n.afreq);
break;
case REF_LF_KHZ:
strncpy(str, inpFreq->value(), len-1);
str[len - 1] = '\0';
break;
case REF_CALLSIGN:
if (n.event == NOTIFY_EVENT_MYCALL || n.event == NOTIFY_EVENT_STATION) {
std::stringstream info;
info << "\\" << event_regex[n.event].index;
strncpy(str, info.str().c_str(), len-1);
}
break;
case REF_COUNTRY:
if (n.event == NOTIFY_EVENT_STATION) {
strncpy(str, n.filter.dxcc_last.c_str(), len-1);
str[len - 1] = '\0';
}
break;
case REF_MATCHED_TEXT:
snprintf(str, len, "\\0");
break;
case REF_TEXT:
strncpy(str, n.match_string, len-1);
str[len - 1] = '\0';
break;
}
}
void operator()(const notify_t& n, std::string& edit)
{
char buf[128];
std::string::size_type p;
// replace $VARIABLES
const char* vars[] = {
"$MODEM", "$DF_HZ", "$RF_HZ", "$RF_KHZ", "$AF_HZ",
"$LF_KHZ", "$CALLSIGN", "$COUNTRY", "$MATCHED_TEXT", "$TEXT"
};
for (size_t i = 0; i < sizeof(vars)/sizeof(*vars); i++) {
if ((p = edit.find(vars[i])) != std::string::npos) {
replace_var(n, i, buf, sizeof(buf));
edit.replace(p, strlen(vars[i]), buf);
}
}
// replace \X refs with regex substrings
strcpy(buf, "\\0");
for (size_t i = 0; i < n.submatch_length; i++, buf[1]++)
for (p = 0; (p = edit.find(buf, p)) != std::string::npos; p = 0)
edit.replace(p, 2, n.match_string + n.submatch_offsets[i].rm_so,
n.submatch_offsets[i].rm_eo - n.submatch_offsets[i].rm_so);
}
};
// perform the actions for event n
static void notify_notify(const notify_t& n)
{
// show alert window with timeout
if (!n.action.alert.empty()) {
std::string alert = n.action.alert;
replace_refs()(n, alert);
if (alert.find('%') == std::string::npos)
notify_show_alert(n, alert.c_str());
else { // treat alert text as strftime format string
size_t len = alert.length() + 256;
char* buf = new char[len];
time_t t = time(NULL);
struct tm ts;
if (localtime_r(&t, &ts) && strftime(buf, len, alert.c_str(), &ts))
notify_show_alert(n, buf);
delete [] buf;
}
}
// append to receive text
if (!n.action.rx_marker.empty()) {
std::string text = n.action.rx_marker;
replace_refs()(n, text);
std::string::size_type p;
if ((p = text.find("$RX_MARKER")) != std::string::npos) {
text[p] = '\0';
note_qrg(false, text.c_str(), text.c_str() + p + strlen("$RX_MARKER"), n.mode, 0LL, n.afreq);
}
else
ReceiveText->addstr(text);
}
// expand macros and append to transmit text
if (!n.action.macro.empty()) {
MACROTEXT m;
m.text[0] = n.action.macro;
replace_refs()(n, m.text[0]);
m.execute(0);
}
// define substring & macro variables and run program
if (!n.action.program.empty()) {
#ifndef __MINGW32__
switch (fork()) {
case -1:
LOG_PERROR("fork");
// fall through
default:
break;
case 0:
#endif
char var[] = "FLDIGI_NOTIFY_STR_0";
std::string val;
for (size_t i = 0; i < n.submatch_length; i++, var[sizeof(var) - 2]++) {
val.assign(n.match_string + n.submatch_offsets[i].rm_so,
n.submatch_offsets[i].rm_eo - n.submatch_offsets[i].rm_so);
setenv(var, val.c_str(), 1);
if (i == event_regex[n.event].index)
setenv("FLDIGI_NOTIFY_CALLSIGN", val.c_str(), 1);
}
setenv("FLDIGI_NOTIFY_TEXT", n.match_string, 1);
unsigned int un = n.submatch_length;
snprintf(var, sizeof(var), "%u", un);
setenv("FLDIGI_NOTIFY_STR_NUM", var, 1);
snprintf(var, sizeof(var), "%d", n.afreq);
setenv("FLDIGI_NOTIFY_AUDIO_FREQUENCY", var, 1);
snprintf(var, sizeof(var), "%u", (unsigned)n.event);
setenv("FLDIGI_NOTIFY_EVENT", var, 1);
if (n.event == NOTIFY_EVENT_STATION)
setenv("FLDIGI_NOTIFY_COUNTRY", n.filter.dxcc_last.c_str(), 1);
set_macro_env(); // also set macro variables
#ifdef __MINGW32__
char* cmd = strdup(n.action.program.c_str());
STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
memset(&pi, 0, sizeof(pi));
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
LOG_ERROR("CreateProcess failed with error code %ld", GetLastError());
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
free(cmd);
#else
execl("/bin/sh", "sh", "-c", n.action.program.c_str(), (char *)NULL);
perror("execl");
exit(EXIT_FAILURE);
}
#endif
}
}
// return true if the event n is a dup
static bool notify_is_dup(notify_t& n, const char* str, const regmatch_t* sub, size_t len,
time_t now, int afreq, trx_mode mode)
{
if (n.event == NOTIFY_EVENT_RSID_EOT)
return false;
if (!n.dup_ignore)
return false;
if (n.dup_ref == 0 || n.dup_ref >= len) {
std::stringstream info;
info << "Bad dup_ref: " << n.dup_ref << " >= " << len;
LOG_ERROR("%s", info.str().c_str());
return false;
}
const regmatch_t& subidx = sub[n.dup_ref];
std::string dupstr(subidx.rm_eo - subidx.rm_so, '\0');
transform(str + subidx.rm_so, str + subidx.rm_eo, dupstr.begin(), static_cast<int (*)(int)>(toupper));
notify_dup_t cur = { now, band(wf->rfcarrier()), mode };
if (n.event == NOTIFY_EVENT_RSID)
cur.freq = wf->rfcarrier() + (wf->USB() ? afreq : -afreq);
notify_seen_t::iterator i;
bool is_dup = false;
if ((i = n.last_seen.find(dupstr)) != n.last_seen.end()) {
const notify_dup_t& prev = i->second;
is_dup = (cur.when - prev.when < n.dup.when);
if (n.event == NOTIFY_EVENT_RSID)
is_dup = is_dup && ::llabs(cur.freq - prev.freq) <= ceil(RSID_PRECISION);
if (n.dup.band)
is_dup = is_dup && cur.band == prev.band;
if (n.dup.mode)
is_dup = is_dup && cur.mode == prev.mode;
}
if (is_dup)
return true;
n.last_seen[dupstr] = cur;
if (n.last_seen.size() > 1) { // remove old data
for (i = n.last_seen.begin(); i != n.last_seen.end();) {
if (now - i->second.when > n.dup.when)
n.last_seen.erase(i++);
else
++i;
}
}
return false;
}
static fre_t notify_filter_call_re("", REG_EXTENDED | REG_NOSUB | REG_ICASE);
// Called by the spotter when an event's regular expression matches the decoded text.
// Also called by notify_rsid for RSID recepction with: the frequency in afreq,
// the mode name in str, the str bounds in the sub array, and len = 1.
static void notify_recv(trx_mode mode, int afreq, const char* str, const regmatch_t* sub, size_t len, void* data)
{
notify_t* n = reinterpret_cast<notify_t*>(data);
time_t now = time(0);
// check if we may trigger this event
if (!n->enabled || now - n->last_trigger < n->action.trigger_limit)
return;
switch (n->event) {
case NOTIFY_EVENT_MYCALL: case NOTIFY_EVENT_CUSTOM: case NOTIFY_EVENT_RSID: case NOTIFY_EVENT_RSID_EOT:
break;
case NOTIFY_EVENT_STATION:
size_t re_idx = event_regex[n->event].index;
std::string call(str + sub[re_idx].rm_so, sub[re_idx].rm_eo - sub[re_idx].rm_so);
const dxcc* e = dxcc_lookup(call.c_str());
if (n->filter.match == NOTIFY_FILTER_CALLSIGN) {
if (e) // remember the country name we found
n->filter.dxcc_last = e->country;
if (!n->filter.callsign.empty()) { // the callsign must match
if (notify_filter_call_re.re() != n->filter.callsign) // compile new re
notify_filter_call_re.recompile(n->filter.callsign.c_str());
if (!notify_filter_call_re.match(call.c_str()))
return;
}
else { // check for nwb, lotw, eqsl
if (n->filter.nwb && SearchLog(call.c_str()))
return;
if ((n->filter.lotw || n->filter.eqsl) && qsl_is_open() &&
!(qsl_lookup(call.c_str()) & (1 << QSL_LOTW | 1 << QSL_EQSL)))
return;
}
}
else if (n->filter.match == NOTIFY_FILTER_DXCC) {
if (e) {
n->filter.dxcc_last = e->country;
// if the dxcc filter is not empty, it must contain the country for call
if (!n->filter.dxcc.empty() && n->filter.dxcc.find(e->country) == n->filter.dxcc.end())
return;
if (n->filter.nwb && qsodb_dxcc_entity_find(e->country))
return;
}
if ((n->filter.lotw || n->filter.eqsl) && qsl_is_open() &&
!(qsl_lookup(call.c_str()) & (1 << QSL_LOTW | 1 << QSL_EQSL)))
return;
}
break;
}
if (!notify_is_dup(*n, str, sub, len, now, afreq, mode)) {
n->last_trigger = now;
n->afreq = afreq;
n->rfreq = wf->rfcarrier();
n->mode = mode;
n->match_string = str;
n->submatch_offsets = sub;
n->submatch_length = std::min(len, (size_t)10); // whole string + up to 9 user-specified backrefs
std::cout << "trigger: " << n->last_trigger << "\n" <<
"audio freq: " << n->afreq << "\n" <<
"rf carrier: " << n->rfreq << "\n" <<
"mode #: " << n->mode << "\n" <<
"mode: " << mode_info[n->mode].name << "\n" <<
"match: " << n->match_string << "\n" <<
"offsets: " << n->submatch_offsets << "\n" <<
"length: " << n->submatch_length << std::endl;
notify_notify(*n);
}
}
static void notify_set_qsodb_cache(void)
{
bool v = false;
for (notify_list_t::iterator i = notify_list.begin(); i != notify_list.end(); ++i) {
if (i->event == NOTIFY_EVENT_STATION && i->filter.match == NOTIFY_FILTER_DXCC && i->enabled) {
v = true;
break;
}
}
dxcc_entity_cache_enable(v);
}
// register event n with the spotter
static void notify_register(notify_t& n)
{
if (n.event == NOTIFY_EVENT_RSID || n.event == NOTIFY_EVENT_RSID_EOT)
return;
spot_register_recv(notify_recv, &n, notify_get_re(n).c_str(), REG_EXTENDED | REG_ICASE);
}
// unregister event n
static void notify_unregister(const notify_t& n)
{
if (n.event == NOTIFY_EVENT_RSID || n.event == NOTIFY_EVENT_RSID_EOT)
return;
spot_unregister_recv(notify_recv, &n);
}
////////////////////////////////////////////////////////////////////////////////
// callbacks
////////////////////////////////////////////////////////////////////////////////
// the event table callback
static void notify_select_cb(Fl_Widget* w, void* arg)
{
int v = tblNotifyList->value();
if (v >= 0)
notify_event_to_gui(notify_tmp = *advli(notify_list.begin(), v));
}
// the remove button/menu item callback
static void notify_remove_cb(Fl_Widget* w, void*)
{
int v = tblNotifyList->value();
if (v < 0)
return;
// unregister
notify_unregister(*advli(notify_list.begin(), v));
// remove from list
notify_list.erase(advli(notify_list.begin(), v));
// remove from table
tblNotifyList->removeRow(tblNotifyList->value());
// select next row
if (w == btnNotifyRemove) {
if (v >= tblNotifyList->rows())
v = tblNotifyList->rows() - 1;
if (v >= 0) {
tblNotifyList->value(v);
notify_select_cb(tblNotifyList, 0);
}
}
notify_save();
}
enum {
NOTIFY_CHECK_CUSTOM_RE_EMPTY = 1 << 0,
NOTIFY_CHECK_CUSTOM_RE_VALID = 1 << 1,
NOTIFY_CHECK_MYCALL_NOT_EMPTY = 1 << 2
};
// do some sanity checks on the widget values before adding/updating an event
static bool notify_check(unsigned check)
{
if (mnuNotifyEvent->value() == NOTIFY_EVENT_CUSTOM) {
if (check & NOTIFY_CHECK_CUSTOM_RE_EMPTY) {
if (!inpNotifyRE->size()) {
fl_alert2(_("The regular expression field must not be empty."));
return false;
}
}
if (check & NOTIFY_CHECK_CUSTOM_RE_VALID) {
if (!fre_t(inpNotifyRE->value(), REG_EXTENDED | REG_ICASE)) {
fl_alert2(_("The regular expression must be valid."));
return false;
}
}
}
if ((check & NOTIFY_CHECK_MYCALL_NOT_EMPTY) && mnuNotifyEvent->value() == NOTIFY_EVENT_MYCALL) {
if (progdefaults.myCall.empty()) {
fl_alert2(_("Please set your callsign first."));
return false;
}
}
// ...
return true;
}
// the add button callback
static void notify_add_cb(Fl_Widget* w, void* arg)
{
if (!notify_check(~0))
return;
notify_gui_to_event(notify_tmp);
// add to list
notify_list.push_back(notify_tmp);
// add to table
notify_table_append(notify_list.back());
// register with spotter
notify_register(notify_list.back());
// save file
notify_save();
}
// the update button/menu item callback
static void notify_update_cb(Fl_Widget* w, void* arg)
{
int v = tblNotifyList->value();
if (v < 0)
return;
if (!notify_check(~0))
return;
notify_t& nv = *advli(notify_list.begin(), v);
if ((intptr_t)arg != NOTIFY_LIST_MENU_TOGGLE) {
notify_gui_to_event(notify_tmp);
nv = notify_tmp;
if (nv.dup_ignore)
nv.last_seen.clear();
}
else { // only toggle the enabled status
nv.enabled = !nv.enabled;
btnNotifyEnabled->value(nv.enabled);
}
if (!nv.enabled)
notify_unregister(nv);
else {
notify_unregister(nv);
notify_register(nv);
}
notify_table_reload();
tblNotifyList->value(v);
notify_save();
}
// the event selection menu callback
static void notify_event_cb(Fl_Widget* w, void* arg)
{
notify_event_t e = static_cast<notify_event_t>(reinterpret_cast<Fl_Choice*>(w)->value());
switch (e) {
case NOTIFY_EVENT_MYCALL:
mnuNotifyDupWhich->activate();
chkNotifyDupBand->activate();
chkNotifyDupMode->activate();
grpNotifyFilter->deactivate();
chkNotifyFilterCall->value(0);
inpNotifyFilterCall->hide();
chkNotifyFilterDXCC->value(0);
btnNotifyFilterDXCC->hide();
chkNotifyFilterNWB->value(0);
chkNotifyFilterLOTW->value(0);
chkNotifyFilterEQSL->value(0);
inpNotifyRE->value(0);
inpNotifyRE->hide();
btnNotifyActionDialogDefault->show();
break;
case NOTIFY_EVENT_STATION:
mnuNotifyDupWhich->activate();
chkNotifyDupBand->activate();
chkNotifyDupMode->activate();
grpNotifyFilter->activate();
if (!chkNotifyFilterCall->value() && !chkNotifyFilterDXCC->value()) {
chkNotifyFilterCall->value(1);
inpNotifyFilterCall->show();
}
inpNotifyRE->value(0);
inpNotifyRE->hide();
btnNotifyActionDialogDefault->show();
break;
case NOTIFY_EVENT_CUSTOM:
mnuNotifyDupWhich->activate();
chkNotifyDupBand->activate();
chkNotifyDupMode->activate();
grpNotifyFilter->deactivate();
chkNotifyFilterCall->value(0);
inpNotifyFilterCall->hide();
chkNotifyFilterDXCC->value(0);
btnNotifyFilterDXCC->hide();
chkNotifyFilterNWB->value(0);
chkNotifyFilterLOTW->value(0);
chkNotifyFilterEQSL->value(0);
inpNotifyRE->show();
break;
case NOTIFY_EVENT_RSID: case NOTIFY_EVENT_RSID_EOT:
grpNotifyFilter->deactivate();
chkNotifyFilterCall->value(0);
inpNotifyFilterCall->hide();
chkNotifyFilterDXCC->value(0);
btnNotifyFilterDXCC->hide();
chkNotifyFilterNWB->value(0);
chkNotifyFilterLOTW->value(0);
chkNotifyFilterEQSL->value(0);
inpNotifyRE->value(0);
inpNotifyRE->hide();
btnNotifyActionDialogDefault->show();
// limited dup handling
mnuNotifyDupWhich->deactivate();
chkNotifyDupBand->value(0);
chkNotifyDupBand->deactivate();
chkNotifyDupMode->value(1);
chkNotifyDupMode->deactivate();
break;
}
if (arg == NOTIFY_SET_DUP_MENU) {
notify_gui_to_event(notify_tmp);
notify_set_event_dup(notify_tmp);
}
w->parent()->redraw();
}
// the program filesystem browse button callback
static void notify_program_select_cb(Fl_Widget* w, void* arg)
{
const char* fn = FSEL::select(_("Run program"), "", 0, 0);
if (!fn) return;
if (!*fn) return;
inpNotifyActionProgram->value(fn);
// quote program path
inpNotifyActionProgram->position(0);
inpNotifyActionProgram->insert("\"", 1);
inpNotifyActionProgram->position(inpNotifyActionProgram->size());
inpNotifyActionProgram->insert("\"", 1);
}
// the test button callback
static void notify_test_cb(Fl_Widget* w, void* arg)
{
notify_gui_to_event(notify_tmp);
if (notify_tmp.event == NOTIFY_EVENT_RSID || notify_tmp.event == NOTIFY_EVENT_RSID_EOT) {
notify_tmp.mode = active_modem->get_mode();
regmatch_t sub[2] = { { 0, (regoff_t)strlen(mode_info[notify_tmp.mode].name) } };
sub[1] = sub[0];
notify_recv(notify_tmp.mode, active_modem->get_freq(),
mode_info[notify_tmp.mode].name, sub, 2, ¬ify_tmp);
return;
}
std::string test_strings[3];
test_strings[NOTIFY_EVENT_MYCALL].assign(progdefaults.myCall).append(" de n0call");
test_strings[NOTIFY_EVENT_STATION] = "cq de n0call n0call ";
static std::string test;
if (test.empty())
test = test_strings[notify_tmp.event];
std::string msg;
msg.assign(_("Default test string is:\n \"")).append(test_strings[notify_tmp.event]).append("\"\n")
.append(_("Enter test string or leave blank for default:"));
const char* s = fl_input2("%s", msg.c_str(), test.c_str());
if (s) {
if (test.assign(s).empty()) // empty input
test = test_strings[notify_tmp.event];
}
else // cancelled
return;
fre_t re(notify_get_re(notify_tmp).c_str(), REG_EXTENDED | REG_ICASE);
if (!re)
fl_alert2(_("This event's regular expression is invalid."));
else if (re.match(test.c_str())) {
const std::vector<regmatch_t>& o = re.suboff();
notify_recv(active_modem->get_mode(), active_modem->get_freq(),
test.c_str(), &o[0], o.size(), ¬ify_tmp);
}
else
fl_message2(_("The test string did not match this event's search pattern."));
}
// the macro editor button callback
static void notify_macro_edit_cb(Fl_Widget* w, void* arg)
{
editMacro(0, MACRO_EDIT_INPUT, inpNotifyActionMacro);
}
// the insert default alert text button callback
static void notify_dialog_default_cb(Fl_Widget* w, void* arg)
{
size_t i = CLAMP((size_t)mnuNotifyEvent->value(), 0,
sizeof(default_alert_text)/sizeof(*default_alert_text) - 1);
std::string s = default_alert_text[i];
if (s.empty()) { // custom search; count and list refs
size_t nsub = std::min(fre_t(inpNotifyRE->value(), REG_EXTENDED | REG_ICASE).nsub(), (size_t)9);
if (nsub) {
s.assign(_("Available substrings")).append(":\n\\0\n");
char ref[] = "\\1";
for (size_t i = 1; i < nsub; i++, ref[1]++)
s.append(ref).append("\n");
}
}
inpNotifyActionDialog->value(s.c_str());
}
// the insert default RX text button callback
static void notify_rx_default_cb(Fl_Widget* w, void* arg)
{
if (mnuNotifyEvent->value() == NOTIFY_EVENT_RSID)
inpNotifyActionRXMarker->value("\nRSID: $RX_MARKER\n");
else if (mnuNotifyEvent->value() == NOTIFY_EVENT_RSID_EOT)
inpNotifyActionRXMarker->value("\nRSID EOT\n");
else
inpNotifyActionRXMarker->value("\n$RX_MARKER\n");
}
// the ignore duplicates check button callback
void notify_dup_ignore_cb(Fl_Widget* w, void* arg)
{
if (static_cast<Fl_Check_Button*>(w)->value()) {
mnuNotifyDupWhich->show();
cntNotifyDupTime->show();
chkNotifyDupBand->show();
chkNotifyDupMode->show();
}
else {
mnuNotifyDupWhich->hide();
cntNotifyDupTime->hide();
chkNotifyDupBand->hide();
chkNotifyDupMode->hide();
}
w->parent()->redraw();
}
// the custom re field callback
static void notify_re_cb(Fl_Widget* w, void* arg)
{
notify_set_event_dup_menu(static_cast<Fl_Input*>(w)->value());
}
////////////////////////////////////////////////////////////////////////////////
// dup widget handling
////////////////////////////////////////////////////////////////////////////////
// set the dup menu substrings for regular epxression string re
static void notify_set_event_dup_menu(const char* re)
{
int v = mnuNotifyDupWhich->value();
size_t nref = fre_t(re, REG_EXTENDED).nsub();
for (size_t i = 0; i < sizeof(notify_dup_refs_menu)/sizeof(*notify_dup_refs_menu); i++)
notify_dup_refs_menu[i].hide();
if (nref) {
size_t i;
for (i = 1; i < nref; i++)
notify_dup_refs_menu[i].show();
if ((size_t)v == nref)
v = mnuNotifyDupWhich->size() - 1;
else
v = 1;
}
else
v = 0;
mnuNotifyDupWhich->value(v);
mnuNotifyDupWhich->redraw();
}
// set the dup group widgets for event n
static void notify_set_event_dup(const notify_t& n)
{
size_t i;
for (i = 0; i < sizeof(notify_dup_refs_menu)/sizeof(*notify_dup_refs_menu); i++)
notify_dup_refs_menu[i].hide();
switch (n.event) {
case NOTIFY_EVENT_MYCALL:
case NOTIFY_EVENT_STATION:
case NOTIFY_EVENT_RSID:
i = event_regex[n.event].index;
mnuNotifyDupWhich->menu(notify_dup_callsign_menu);
for (size_t j = 0; j < sizeof(notify_dup_callsign_menu)/sizeof(*notify_dup_callsign_menu) - 1; j++)
notify_dup_callsign_menu[j].hide();
notify_dup_callsign_menu[i].show();
if (n.event == NOTIFY_EVENT_RSID)
notify_dup_callsign_menu[i].label(_("Frequency"));
else
notify_dup_callsign_menu[i].label(_("Callsign"));
mnuNotifyDupWhich->value(i);
break;
case NOTIFY_EVENT_CUSTOM:
mnuNotifyDupWhich->menu(notify_dup_refs_menu);
notify_set_event_dup_menu(notify_get_re(n).c_str());
break;
case NOTIFY_EVENT_RSID_EOT:
default:
break;
}
}
////////////////////////////////////////////////////////////////////////////////
// DXCC list
////////////////////////////////////////////////////////////////////////////////
// set the toggle status of row i to cond
static void notify_dxcc_row_check(int i, bool cond = true)
{
*tblNotifyFilterDXCC->valueAt(i, NOTIFY_DXCC_COL_SEL) = "["[!cond];
}
// toggle the checked status of row i, return new status
static bool notify_dxcc_row_toggle(int i)
{
char* p = tblNotifyFilterDXCC->valueAt(i, NOTIFY_DXCC_COL_SEL);
return (*p = "["[!!*p]);
}
// return checked status of row i
static bool notify_dxcc_row_checked(int i)
{
return *tblNotifyFilterDXCC->valueAt(i, NOTIFY_DXCC_COL_SEL);
}
// the dxcc list select/deselect callback
static void notify_filter_dxcc_select_cb(Fl_Widget* w, void* arg)
{
bool val;
const char* str;
int row = tblNotifyFilterDXCC->value();
int col;
intptr_t iarg = (intptr_t)arg;
switch (iarg) {
case NOTIFY_DXCC_SELECT_CONT: case NOTIFY_DXCC_DESELECT_CONT:
str = tblNotifyFilterDXCC->valueAt(row, col = NOTIFY_DXCC_COL_CT);
val = (iarg == NOTIFY_DXCC_SELECT_CONT);
break;
case NOTIFY_DXCC_SELECT_ITU: case NOTIFY_DXCC_DESELECT_ITU:
str = tblNotifyFilterDXCC->valueAt(row, col = NOTIFY_DXCC_COL_ITU);
val = (iarg == NOTIFY_DXCC_SELECT_ITU);
break;
case NOTIFY_DXCC_SELECT_CQ: case NOTIFY_DXCC_DESELECT_CQ:
str = tblNotifyFilterDXCC->valueAt(row, col = NOTIFY_DXCC_COL_CQ);
val = (iarg == NOTIFY_DXCC_SELECT_CQ);
break;
case NOTIFY_DXCC_SELECT_ALL:
for (int i = 0; i < tblNotifyFilterDXCC->rows(); i++)
notify_dxcc_row_check(i);
goto redraw;
case NOTIFY_DXCC_DESELECT_ALL:
for (int i = 0; i < tblNotifyFilterDXCC->rows(); i++)
notify_dxcc_row_check(i, false);
goto redraw;
default:
return;
}
for (int i = 0; i < tblNotifyFilterDXCC->rows(); i++) {
if (!strcmp(tblNotifyFilterDXCC->valueAt(i, col), str))
notify_dxcc_row_check(i, val);
}
redraw:
tblNotifyFilterDXCC->redraw();
}
// the dxcc search field callback
static void notify_filter_dxcc_search(Fl_Widget* w, void* arg)
{
if (w == inpNotifyDXCCSearchCallsign) {
const dxcc* e = dxcc_lookup(inpNotifyDXCCSearchCallsign->value());
if (e) {
inpNotifyDXCCSearchCountry->value(e->country);
inpNotifyDXCCSearchCountry->do_callback();
inpNotifyDXCCSearchCountry->position(0);
}
return;
}
if (unlikely(!inpNotifyDXCCSearchCountry->size()))
return;
int col = 1, row = tblNotifyFilterDXCC->value() + 1;
row = WCLAMP(row, 0, tblNotifyFilterDXCC->rows() - 1);
if (tblNotifyFilterDXCC->search(row, col, false, inpNotifyDXCCSearchCountry->value())) {
int when = tblNotifyFilterDXCC->when();
tblNotifyFilterDXCC->when(FL_WHEN_NEVER);
tblNotifyFilterDXCC->GotoRow(row);
tblNotifyFilterDXCC->when(when);
inpNotifyDXCCSearchCountry->textcolor(FL_FOREGROUND_COLOR);
}
else
inpNotifyDXCCSearchCountry->textcolor(FL_RED);
inpNotifyDXCCSearchCountry->redraw();
}
// the dxcc filter selection button callback
static void notify_dxcc_browse_cb(Fl_Widget* w, void* arg)
{
int v = tblNotifyList->value();
if (v < 0) // no selection, uncheck all rows
btnNotifyDXCCDeselect->do_callback();
else {
const notify_t& n = *advli(notify_list.begin(), v);
for (int i = 0; i < tblNotifyFilterDXCC->rows(); i++)
notify_dxcc_row_check(i, n.filter.dxcc.find(tblNotifyFilterDXCC->valueAt(i, NOTIFY_DXCC_COL_CN))
!= n.filter.dxcc.end());
}
notify_dxcc_show(false);
}
// the dxcc table callback
static void notify_dxcc_check_cb(Fl_Widget* w, void* arg)
{
if (Fl::event_button() != FL_LEFT_MOUSE || (Fl::event() == FL_KEYDOWN && !Fl::event_shift()))
return;
int sel = tblNotifyFilterDXCC->value();
const char* country = tblNotifyFilterDXCC->valueAt(sel, NOTIFY_DXCC_COL_CN);
if (notify_dxcc_row_toggle(sel))
notify_tmp.filter.dxcc[country] = true;
else
notify_tmp.filter.dxcc.erase(country);
}
////////////////////////////////////////////////////////////////////////////////
// storage functions
////////////////////////////////////////////////////////////////////////////////
// save the event list
static void notify_save(void)
{
notify_set_qsodb_cache();
remove(std::string(HomeDir).append("/").append("notify.prefs").c_str());
Fl_Preferences ndata(HomeDir.c_str(), PACKAGE_TARNAME, "notify");
ndata.set("items", static_cast<int>(notify_list.size()));
size_t num = 0;
std::stringstream group;
for (notify_list_t::iterator i = notify_list.begin(); i != notify_list.end(); ++i) {
group << "item" << num++;
ndata.set(Fl_Preferences::Name("%s/event", group.str().c_str()), i->event);
if (i->event >= NOTIFY_EVENT_CUSTOM)
ndata.set(Fl_Preferences::Name("%s/re", group.str().c_str()), i->re.c_str());
ndata.set(Fl_Preferences::Name("%s/enabled", group.str().c_str()), i->enabled);
ndata.set(Fl_Preferences::Name("%s/action/alert", group.str().c_str()), i->action.alert.c_str());
ndata.set(Fl_Preferences::Name("%s/action/rx_marker", group.str().c_str()), i->action.rx_marker.c_str());
ndata.set(Fl_Preferences::Name("%s/action/macro", group.str().c_str()), i->action.macro.c_str());
ndata.set(Fl_Preferences::Name("%s/action/program", group.str().c_str()), i->action.program.c_str());
ndata.set(Fl_Preferences::Name("%s/action/trigger_limit", group.str().c_str()),
static_cast<int>(i->action.trigger_limit));
ndata.set(Fl_Preferences::Name("%s/action/alert_timeout", group.str().c_str()),
static_cast<int>(i->action.alert_timeout));
ndata.set(Fl_Preferences::Name("%s/filter/match", group.str().c_str()), i->filter.match);
ndata.set(Fl_Preferences::Name("%s/filter/callsign", group.str().c_str()), i->filter.callsign.c_str());
ndata.set(Fl_Preferences::Name("%s/filter/nwb", group.str().c_str()), i->filter.nwb);
ndata.set(Fl_Preferences::Name("%s/filter/lotw", group.str().c_str()), i->filter.lotw);
ndata.set(Fl_Preferences::Name("%s/filter/eqsl", group.str().c_str()), i->filter.eqsl);
int k = 0;
for (notify_filter_dxcc_t::const_iterator j = i->filter.dxcc.begin();
j != i->filter.dxcc.end() && j->second; ++j) {
ndata.set(Fl_Preferences::Name("%s/filter/dxcc/%d", group.str().c_str(), k++), j->first.c_str());
}
ndata.set(Fl_Preferences::Name("%s/dup/ignore", group.str().c_str()), i->dup_ignore);
ndata.set(Fl_Preferences::Name("%s/dup/ref", group.str().c_str()), static_cast<int>(i->dup_ref));
ndata.set(Fl_Preferences::Name("%s/dup/when", group.str().c_str()), static_cast<int>(i->dup.when));
ndata.set(Fl_Preferences::Name("%s/dup/band", group.str().c_str()), i->dup.band);
ndata.set(Fl_Preferences::Name("%s/dup/mode", group.str().c_str()), static_cast<int>(i->dup.mode));
}
}
// load the event list
static void notify_load(void)
{
int x;
char s[512];
s[sizeof(s)-1] = '\0';
Fl_Preferences ndata(HomeDir.c_str(), PACKAGE_TARNAME, "notify");
if (!ndata.get("items", x, 0) || x <= 0)
return;
size_t n = static_cast<size_t>(x);
std::stringstream group;
for (size_t i = 0; i < n; i++) {
notify_t nitem;
group << "item" << i;
ndata.get(Fl_Preferences::Name("%s/event", group.str().c_str()), x, 0);
nitem.event = static_cast<notify_event_t>(x);
nitem.last_trigger = 0;
if (nitem.event >= NOTIFY_EVENT_CUSTOM) {
ndata.get(Fl_Preferences::Name("%s/re", group.str().c_str()), s, "", sizeof(s)-1);
nitem.re = s;
}
else
nitem.re = event_regex[nitem.event].regex;
ndata.get(Fl_Preferences::Name("%s/enabled", group.str().c_str()), x, 1);
nitem.enabled = x;
ndata.get(Fl_Preferences::Name("%s/action/alert", group.str().c_str()), s, "", sizeof(s)-1);
nitem.action.alert = s;
ndata.get(Fl_Preferences::Name("%s/action/macro", group.str().c_str()), s, "", sizeof(s)-1);
nitem.action.macro = s;
ndata.get(Fl_Preferences::Name("%s/action/rx_marker", group.str().c_str()), s, "", sizeof(s)-1);
nitem.action.rx_marker = s;
ndata.get(Fl_Preferences::Name("%s/action/program", group.str().c_str()), s, "", sizeof(s)-1);
nitem.action.program = s;
ndata.get(Fl_Preferences::Name("%s/action/trigger_limit", group.str().c_str()), x, 0);
nitem.action.trigger_limit = x;
ndata.get(Fl_Preferences::Name("%s/action/alert_timeout", group.str().c_str()), x, 5);
nitem.action.alert_timeout = x;
ndata.get(Fl_Preferences::Name("%s/filter/match", group.str().c_str()), x, 0);
nitem.filter.match = static_cast<notify_filter_match_t>(x);
ndata.get(Fl_Preferences::Name("%s/filter/callsign", group.str().c_str()), s, "", sizeof(s)-1);
nitem.filter.callsign = s;
ndata.get(Fl_Preferences::Name("%s/filter/nwb", group.str().c_str()), x, 0);
nitem.filter.nwb = x;
ndata.get(Fl_Preferences::Name("%s/filter/lotw", group.str().c_str()), x, 0);
nitem.filter.lotw = x;
ndata.get(Fl_Preferences::Name("%s/filter/eqsl", group.str().c_str()), x, 0);
nitem.filter.eqsl = x;
for (int k = 0; ndata.get(Fl_Preferences::Name("%s/filter/dxcc/%d", group.str().c_str(), k), s, "", sizeof(s)-1); k++)
nitem.filter.dxcc[s] = true;
ndata.get(Fl_Preferences::Name("%s/dup/ignore", group.str().c_str()), x, 0);
nitem.dup_ignore = x;
ndata.get(Fl_Preferences::Name("%s/dup/ref", group.str().c_str()), x, 0);
nitem.dup_ref = x;
ndata.get(Fl_Preferences::Name("%s/dup/when", group.str().c_str()), x, 600);
nitem.dup.when = x;
ndata.get(Fl_Preferences::Name("%s/dup/band", group.str().c_str()), x, 0);
nitem.dup.band = static_cast<band_t>(x);
ndata.get(Fl_Preferences::Name("%s/dup/mode", group.str().c_str()), x, 0);
nitem.dup.mode = static_cast<trx_mode>(x);
notify_list.push_back(nitem);
}
notify_table_reload();
}
| 54,954
|
C++
|
.cxx
| 1,535
| 33.308795
| 129
| 0.666842
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,080
|
pskcoeff.cxx
|
w1hkj_fldigi/src/psk/pskcoeff.cxx
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include "pskcoeff.h"
// Linux PSK31 modem driver for soundcard -- Filter coefficients
//
// these FIR coefs are those used by G0TJZ in his TMC320C50 code
//
// Hansi Reiser, DL9RDZ, 20 April 1998
//
#include <math.h>
// 65-tap raised-cosine FIR
// implements
// u[n] = (1.0 - cos(2PI * n / 64))/128.0
// used in gmfsk, twpsk etc.
double gmfir1c[FIRLEN+1] = {
0.000000, //0
0.000038, //1
0.000150, //2
0.000336, //3
0.000595, //4
0.000922, //5
0.001317, //6
0.001773, //7
0.002288, //8
0.002856, //9
0.003472, //10
0.004130, //11
0.004823, //12
0.005545, //13
0.006288, //14
0.007047, //15
0.007812, //16
0.008578, //17
0.009337, //18
0.010080, //19
0.010802, //20
0.011495, //21
0.012153, //22
0.012769, //23
0.013337, //24
0.013852, //25
0.014308, //26
0.014703, //27
0.015030, //28
0.015289, //29
0.015475, //30
0.015587, //31
0.015625, //32
0.015587, //33
0.015475, //34
0.015289, //35
0.015030, //36
0.014703, //37
0.014308, //38
0.013852, //39
0.013337, //40
0.012769, //41
0.012153, //42
0.011495, //43
0.010802, //44
0.010080, //45
0.009337, //46
0.008578, //47
0.007813, //48
0.007047, //49
0.006288, //50
0.005545, //51
0.004823, //52
0.004130, //53
0.003472, //54
0.002856, //55
0.002288, //56
0.001773, //57
0.001317, //58
0.000922, //59
0.000595, //60
0.000336, //61
0.000150, //62
0.000038, //63
0.000000 //64
};
// 4-bit receive filter for 31.25 baud BPSK
// Designed by G3PLX
//
double gmfir2c[FIRLEN+1] = {
0.000625000,
0.000820912,
0.001374651,
0.002188141,
0.003110600,
0.003956273,
0.004526787,
0.004635947,
0.004134515,
0.002932456,
0.001016352,
-0.001539947,
-0.004572751,
-0.007834665,
-0.011009254,
-0.013733305,
-0.015625000,
-0.016315775,
-0.015483216,
-0.012882186,
-0.008371423,
-0.001933193,
0.006315933,
0.016124399,
0.027115485,
0.038807198,
0.050640928,
0.062016866,
0.072333574,
0.081028710,
0.087617820,
0.091728168,
0.093125000,
0.091728168,
0.087617820,
0.081028710,
0.072333574,
0.062016866,
0.050640928,
0.038807198,
0.027115485,
0.016124399,
0.006315933,
-0.001933193,
-0.008371423,
-0.012882186,
-0.015483216,
-0.016315775,
-0.015625000,
-0.013733305,
-0.011009254,
-0.007834665,
-0.004572751,
-0.001539947,
0.001016352,
0.002932456,
0.004134515,
0.004635947,
0.004526787,
0.003956273,
0.003110600,
0.002188141,
0.001374651,
0.000820912,
0.000625000
};
// sync filter
// weighting for sync samples
// sum of all weights = 1.0
double syncfilt[16] = {
-0.097545161,
-0.093796555,
-0.086443400,
-0.075768274,
-0.062181416,
-0.046204960,
-0.028452874,
-0.009607360,
0.009607360,
0.028452874,
0.046204960,
0.062181416,
0.075768274,
0.086443400,
0.093796555,
0.097545161
};
double pskcore_filter[FIRLEN+1] = {
4.3453566e-005, //0
-0.00049122414, //1
-0.00078771292, //2
-0.0013507826, //3
-0.0021287814, //4
-0.003133466, //5
-0.004366817, //6
-0.0058112187, //7
-0.0074249976, //8
-0.0091398882, //9
-0.010860157, //10
-0.012464086, //11
-0.013807772, //12
-0.014731191, //13
-0.015067057, //14
-0.014650894, //15
-0.013333425, //16
-0.01099166, //17
-0.0075431246, //18
-0.0029527849, //19
0.0027546292, //20
0.0094932775, //21
0.017113308, //22
0.025403511, //23
0.034099681, //24
0.042895839, //25
0.051458575, //26
0.059444853, //27
0.066521003, //28
0.072381617, //29
0.076767694, //30
0.079481619, //31
0.080420311, //32
0.079481619, //33
0.076767694, //34
0.072381617, //35
0.066521003, //36
0.059444853, //37
0.051458575, //38
0.042895839, //39
0.034099681, //40
0.025403511, //41
0.017113308, //42
0.0094932775, //43
0.0027546292, //44
-0.0029527849, //45
-0.0075431246, //46
-0.01099166, //47
-0.013333425, //48
-0.014650894, //49
-0.015067057, //50
-0.014731191, //51
-0.013807772, //52
-0.012464086, //53
-0.010860157, //54
-0.0091398882, //55
-0.0074249976, //56
-0.0058112187, //57
-0.004366817, //58
-0.003133466, //59
-0.0021287814, //60
-0.0013507826, //61
-0.00078771292, //62
-0.00049122414, //63
4.3453566e-005 //64
};
// experimental filters (higher precision)
// identical to the G0TJZ filter but with double precision
// *firc should be double of len+1
void raisedcosfilt(double *firc, int len)
{
double k1 = M_PI * 2.0 / len;
double k2 = 2.0 * len;
for (int i = 0; i <= len; i++)
firc[i] = ( 1.0 - cos( k1 * i ) ) / k2;
}
// *firc should be double of FIRLEN+1
// 33, 65, 129 ...
void wsincfilt(double *firc, double fc, int len, bool blackman)
{
double normalize = 0;
double k1 = 2.0 * M_PI / len;
double k2 = 2.0 * M_PI * fc;
double l2 = len / 2.0;
// sin(x-tau)/(x-tau)
for (int i = 0; i <= len; i++)
if (i == l2)
firc[i] = 1.0;
else
firc[i] = sin(k2 * (i - l2)) / (k2 * (i - l2));
// blackman window
if (blackman)
for (int i = 0; i <= len; i++)
firc[i] = firc[i] * (0.42 - 0.5 * cos(k1 * i) + 0.08 * cos(2.0 * k1 * i));
// hamming window
else
for (int i = 0; i <= len; i++)
firc[i] = firc[i] * (0.54 - 0.46 * cos(k1 * i));
// normalization factor
for (int i = 0; i <= len; i++)
normalize += firc[i];
// normalize the filter
for (int i = 0; i <= len; i++)
firc[i] /= normalize;
}
| 6,185
|
C++
|
.cxx
| 296
| 18.986486
| 79
| 0.636178
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,081
|
viewpsk.cxx
|
w1hkj_fldigi/src/psk/viewpsk.cxx
|
// ----------------------------------------------------------------------------
// viewpsk.cxx
//
// Copyright (C) 2008
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
// viewpsk is a multi channel psk decoder which allows the parallel processing
// of the complete audio spectrum from 200 to 3500 Hz in equal 100 Hz
// channels. Each channel is separately decoded and the decoded characters
// passed to the user interface routines for presentation. The number of
// channels can be up to and including 30.
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include "fl_digi.h"
#include "viewpsk.h"
#include "pskeval.h"
#include "pskcoeff.h"
#include "pskvaricode.h"
#include "misc.h"
#include "configuration.h"
#include "Viewer.h"
#include "qrunner.h"
#include "status.h"
#include "trx.h"
extern waterfall *wf;
//=====================================================================
// Change the following for DCD low pass filter adjustment
#define SQLCOEFF 0.01
//#define SQLDECAY 50
#define SQLDECAY 20
#define K 5
#define POLY1 0x17
#define POLY2 0x19
#define PSKR_K 7
#define PSKR_POLY1 0x6d
#define PSKR_POLY2 0x4f
//=====================================================================
viewpsk::viewpsk(pskeval* eval, trx_mode pskmode)
{
for (int i = 0; i < MAXCHANNELS; i++) {
channel[i].fir1 = (C_FIR_filter *)0;
channel[i].fir2 = (C_FIR_filter *)0;
channel[i].dec = (viterbi *)0;
channel[i].dec2 = (viterbi *)0;
channel[i].Rxinlv = (interleave *)0;
channel[i].Rxinlv2 = (interleave *)0;
}
evalpsk = eval;
viewmode = MODE_PREV;
restart(pskmode);
}
viewpsk::~viewpsk()
{
for (int i = 0; i < MAXCHANNELS; i++) {
if (channel[i].fir1) delete channel[i].fir1;
if (channel[i].fir2) delete channel[i].fir2;
if (channel[i].dec) delete channel[i].dec;
if (channel[i].dec2) delete channel[i].dec2;
if (channel[i].Rxinlv) delete channel[i].Rxinlv;
if (channel[i].Rxinlv2) delete channel[i].Rxinlv2;
}
}
void viewpsk::init()
{
nchannels = progdefaults.VIEWERchannels;
lowfreq = progdefaults.LowFreqCutoff;
for (int i = 0; i < MAXCHANNELS; i++) {
channel[i].phaseacc = 0;
channel[i].prevsymbol = cmplx (1.0, 0.0);
channel[i].quality = cmplx (0.0, 0.0);
if (_pskr) {
// MFSK varicode instead of psk
channel[i].shreg = 1;
channel[i].shreg2 = 1;
} else {
channel[i].shreg = 0;
channel[i].shreg2 = 0;
}
channel[i].dcdshreg = 0;
channel[i].dcdshreg2 = 0;
channel[i].dcd = false;
channel[i].bitclk = 0;
channel[i].freqerr = 0.0;
channel[i].timeout = 0;
channel[i].frequency = NULLFREQ;
channel[i].reset = false;
channel[i].acquire = 0;
for (int j = 0; j < 16; j++)
channel[i].syncbuf[j] = 0.0;
}
for (int i = 0; i < nchannels; i++)
REQ(&viewclearchannel, i);
evalpsk->clear();
reset_all = false;
}
void viewpsk::restart(trx_mode pskmode)
{
if (viewmode == pskmode) return;
viewmode = pskmode;
double fir1c[FIRLEN+1];
double fir2c[FIRLEN+1];
int idepth = 2;
int isize = 2;
_pskr = false;
_qpsk = false;
symbits = 1;
switch (viewmode) {
case MODE_PSK31:
symbollen = 256;
dcdbits = 32;
break;
case MODE_PSK63F:
_pskr = true;
case MODE_PSK63:
symbollen = 128;
dcdbits = 64;
break;
case MODE_PSK125R:
_pskr = true;
idepth = 40; // 2x2x40 interleaver
case MODE_PSK125:
symbollen = 64;
dcdbits = 128;
break;
case MODE_PSK250R:
_pskr = true;
idepth = 80; // 2x2x80 interleaver
case MODE_PSK250:
symbollen = 32;
dcdbits = 256;
break;
case MODE_PSK500R:
_pskr = true;
idepth = 160; // 2x2x160 interleaver
case MODE_PSK500:
symbollen = 16;
dcdbits = 512;
break;
case MODE_QPSK31:
symbollen = 256;
_qpsk = true;
symbits = 2;
dcdbits = 32;
break;
case MODE_QPSK63:
symbollen = 128;
symbits = 2;
_qpsk = true;
dcdbits = 64;
break;
case MODE_QPSK125:
symbollen = 64;
symbits = 2;
_qpsk = true;
dcdbits = 128;
break;
case MODE_QPSK250:
symbollen = 32;
symbits = 2;
_qpsk = true;
dcdbits = 256;
break;
case MODE_QPSK500:
symbollen = 16;
symbits = 2;
_qpsk = true;
dcdbits = 512;
break;
default: // punt! mode not one of the above.
symbollen = 512;
dcdbits = 32;
break;
}
raisedcosfilt(fir1c, FIRLEN);
for (int i = 0; i <= FIRLEN; i++)
fir2c[i] = pskcore_filter[i];
for (int i = 0; i < MAXCHANNELS; i++) {
if (channel[i].fir1) delete channel[i].fir1;
channel[i].fir1 = new C_FIR_filter();
channel[i].fir1->init(FIRLEN+1, symbollen / 16, fir1c, fir1c);
if (channel[i].fir2) delete channel[i].fir2;
channel[i].fir2 = new C_FIR_filter();
channel[i].fir2->init(FIRLEN+1, 1, fir2c, fir2c);
if (_qpsk) {
if (channel[i].dec) delete channel[i].dec;
channel[i].dec = new viterbi(K, POLY1, POLY2);
if (channel[i].dec2) delete channel[i].dec;
channel[i].dec2 = 0;
} else {
if (channel[i].dec) delete channel[i].dec;
channel[i].dec = new viterbi(PSKR_K, PSKR_POLY1, PSKR_POLY2);
channel[i].dec->setchunksize(4);
if (channel[i].dec2) delete channel[i].dec;
channel[i].dec2 = new viterbi(PSKR_K, PSKR_POLY1, PSKR_POLY2);
channel[i].dec2->setchunksize(4);
}
// 2x2x(20,40,80,160)
channel[i].Rxinlv = new interleave (isize, idepth, INTERLEAVE_REV);
// 2x2x(20,40,80,160)
channel[i].Rxinlv2 = new interleave (isize, idepth, INTERLEAVE_REV);
}
bandwidth = VPSKSAMPLERATE / symbollen;
init();
}
//=============================================================================
//========================= viewpsk receive routines ==========================
//=============================================================================
bool viewpsk::is_valid_char(int &c)
{
if (c == '\n' || c == '\r') {
c = ' ';
return true;
}
if (c <= 0) return false;
if (c > 0x7F) return false;
if (iscntrl(c & 0xFF)) return false;
return true;
}
void viewpsk::rx_bit(int ch, int bit)
{
int c;
channel[ch].shreg = (channel[ch].shreg << 1) | !!bit;
if (_pskr) {
// MFSK varicode instead of PSK Varicode
if ((channel[ch].shreg & 7) == 1) {
c = varidec(channel[ch].shreg >> 1);
channel[ch].shreg = 1;
// Voting at the character level
if (channel[ch].fecmet >= channel[ch].fecmet2) {
if (is_valid_char(c))
REQ(&viewaddchr, ch, (int)channel[ch].frequency, c, viewmode);
}
}
} else {
if ((channel[ch].shreg & 3) == 0) {
c = psk_varicode_decode(channel[ch].shreg >> 2);
channel[ch].shreg = 0;
if (is_valid_char(c))
REQ(&viewaddchr, ch, (int)channel[ch].frequency, c, viewmode);
}
}
}
void viewpsk::rx_bit2(int ch, int bit)
{
int c;
channel[ch].shreg2 = (channel[ch].shreg2 << 1) | !!bit;
// MFSK varicode instead of PSK Varicode
if ((channel[ch].shreg2 & 7) == 1) {
c = varidec(channel[ch].shreg2 >> 1);
// Voting at the character level
if (channel[ch].fecmet < channel[ch].fecmet2) {
if (is_valid_char(c))
REQ(&viewaddchr, ch, (int)channel[ch].frequency, c, viewmode);
}
channel[ch].shreg2 = 1;
}
}
void viewpsk::rx_pskr(int ch, unsigned char symbol)
{
int met;
unsigned char twosym[2];
unsigned char tempc;
int c;
// Accumulate the soft bits for the interleaver THEN submit to Viterbi
// decoder in alternance so that each one is processed one bit later.
// Only two possibilities for sync: current bit or previous one since
// we encode with R = 1/2 and send encoded bits one after the other
// through the interleaver.
channel[ch].symbolpair[1] = channel[ch].symbolpair[0];
channel[ch].symbolpair[0] = symbol;
if (channel[ch].rxbitstate == 0) {
// process bit 1
// copy to avoid scrambling symbolpair for the next bit
channel[ch].rxbitstate = 1;
twosym[0] = channel[ch].symbolpair[0];
twosym[1] = channel[ch].symbolpair[1];
// De-interleave for Robust modes only
if (viewmode != MODE_PSK63F) channel[ch].Rxinlv2->symbols(twosym);
// pass de-interleaved bits pair to the decoder, reversed
tempc = twosym[1];
twosym[1] = twosym[0];
twosym[0] = tempc;
// Then viterbi decoder
c = channel[ch].dec2->decode(twosym, &met);
if (c != -1) {
// FEC only take metric measurement after backtrace
// Will be used for voting between the two decoded streams
channel[ch].fecmet2 = decayavg(channel[ch].fecmet2, met, 20);
rx_bit2(ch, c & 0x08);
rx_bit2(ch, c & 0x04);
rx_bit2(ch, c & 0x02);
rx_bit2(ch, c & 0x01);
}
} else {
// process bit 0
// copy to avoid scrambling symbolpair for the next bit
channel[ch].rxbitstate = 0;
twosym[0] = channel[ch].symbolpair[0];
twosym[1] = channel[ch].symbolpair[1];
// De-interleave
if (viewmode != MODE_PSK63F) channel[ch].Rxinlv->symbols(twosym);
tempc = twosym[1];
twosym[1] = twosym[0];
twosym[0] = tempc;
// Then viterbi decoder
c = channel[ch].dec->decode(twosym, &met);
if (c != -1) {
channel[ch].fecmet = decayavg(channel[ch].fecmet, met, 20);
rx_bit(ch, c & 0x08);
rx_bit(ch, c & 0x04);
rx_bit(ch, c & 0x02);
rx_bit(ch, c & 0x01);
}
}
}
void viewpsk::rx_qpsk(int ch, int bits)
{
unsigned char sym[2];
int c;
if (!active_modem->get_reverse())
bits = (4 - bits) & 3;
sym[0] = (bits & 1) ? 255 : 0;
sym[1] = (bits & 2) ? 0 : 255; // top bit is flipped
c = channel[ch].dec->decode(sym, NULL);
if (c != -1) {
rx_bit(ch, c & 0x80);
rx_bit(ch, c & 0x40);
rx_bit(ch, c & 0x20);
rx_bit(ch, c & 0x10);
rx_bit(ch, c & 0x08);
rx_bit(ch, c & 0x04);
rx_bit(ch, c & 0x02);
rx_bit(ch, c & 0x01);
}
}
void viewpsk::afc(int ch)
{
if (channel[ch].dcd == true || channel[ch].acquire) {
double error;
double lower_bound = (lowfreq + ch * 100) - bandwidth;
if (lower_bound < bandwidth) lower_bound = bandwidth;
double upper_bound = lowfreq + (ch+1)*100 + bandwidth;
error = (channel[ch].phase - channel[ch].bits * M_PI / 2);
if (error < M_PI / 2.0) error += 2 * M_PI;
if (error > M_PI / 2.0) error -= 2 * M_PI;
error *= (VPSKSAMPLERATE / (symbollen * 2 * M_PI))/16.0;
channel[ch].frequency -= error;
channel[ch].frequency = CLAMP(channel[ch].frequency, lower_bound, upper_bound);
}
if (channel[ch].acquire) channel[ch].acquire--;
}
void viewpsk::clearch(int n)
{
channel[n].reset = true;
evalpsk->clear();
}
void viewpsk::clear()
{
for (int i = 0; i < nchannels; i++)
channel[i].reset = true;
evalpsk->clear();
}
inline void viewpsk::timeout_check()
{
for (int ch = 0; ch < nchannels; ch++) {
if (channel[ch].timeout) channel[ch].timeout--;
if (channel[ch].frequency == NULLFREQ) continue;
if (channel[ch].reset || (!channel[ch].timeout && !channel[ch].acquire) ||
(ch && (fabs(channel[ch-1].frequency - channel[ch].frequency) < bandwidth))) {
channel[ch].reset = false;
channel[ch].dcd = 0;
channel[ch].frequency = NULLFREQ;
channel[ch].acquire = 0;
REQ(&viewclearchannel, ch);
REQ(&viewaddchr, ch, NULLFREQ, 0, viewmode);
}
}
}
void viewpsk::findsignals()
{
if (!evalpsk) return;
double level = progStatus.VIEWER_psksquelch;
int nomfreq = 0;
int lfreq = 0;
int hfreq = 0;
int ftest;
int f1, f2;
timeout_check();
for (int i = 0; i < nchannels; i++) {
nomfreq = lowfreq + 100 * i;
lfreq = nomfreq - 20;
hfreq = nomfreq + 120; // suppress detection outside of this range
if (!channel[i].dcd && !channel[i].timeout) {
if (!channel[i].acquire) {
channel[i].frequency = NULLFREQ;
f1 = nomfreq - 0.5 * bandwidth;
if (f1 < 2 * bandwidth) f1 = 2 * bandwidth;
f2 = f1 + 100;
ftest = (f1 + f2) / 2;
} else {
if (channel[i].frequency < lfreq || channel[i].frequency >= hfreq)
channel[i].frequency = nomfreq + 50;
ftest = channel[i].frequency;
f1 = ftest - bandwidth;
f2 = ftest + bandwidth;
if (f1 < 2 * bandwidth) {
f1 = 2 * bandwidth;
f2 = f1 + bandwidth;
}
}
if (evalpsk->peak(ftest, f1, f2, level)) {
if (ftest < lfreq || ftest >= hfreq) goto nexti;
f1 = ftest - bandwidth;
f2 = ftest + bandwidth;
if (evalpsk->peak(ftest, f1, f2, level)) {
if (ftest < lfreq || ftest >= hfreq) goto nexti;
if (i &&
(channel[i-1].dcd || channel[i-1].acquire) &&
fabs(channel[i-1].frequency - ftest) < bandwidth) goto nexti;
if ((i < nchannels - 1) &&
(channel[i+1].dcd || channel[i+1].acquire) &&
fabs(channel[i+1].frequency - ftest) < bandwidth) goto nexti;
channel[i].frequency = ftest;
channel[i].freqerr = 0.0;
channel[i].metric = 0.0;
if (!channel[i].acquire)
channel[i].acquire = 2 * 8000 / 512;
}
}
}
nexti: ;
}
}
void viewpsk::rx_symbol(int ch, cmplx symbol)
{
int n = 2; // psk
unsigned char softbit = 128;
double softangle;
double softamp;
double sigamp = norm(symbol);
channel[ch].phase = arg ( conj(channel[ch].prevsymbol) * symbol );
channel[ch].prevsymbol = symbol;
if (channel[ch].phase < 0)
channel[ch].phase += 2 * M_PI;
if (_qpsk) {
n = 4;
channel[ch].bits = ((int) (channel[ch].phase / M_PI_2 + 0.5)) & (n-1);
} else {
channel[ch].bits = (((int) (channel[ch].phase / M_PI + 0.5)) & (n-1)) << 1;
// hard decode if needed
// softbit = (bits & 2) ? 0 : 255;
// reversed as we normally pass "!bits" when hard decoding
// Soft decode section below
channel[ch].averageamp = decayavg(channel[ch].averageamp, sigamp, SQLDECAY);
if (sigamp > 0 && channel[ch].averageamp > 0) {
softamp = clamp( channel[ch].averageamp / sigamp, 1.0, 1e6);
} else {
softamp = 1; // arbritary number (50% impact)
}
// Compute values between -128 and +127 for phase value only
if (channel[ch].phase > M_PI) {
softangle = (127 - (((2 * M_PI - channel[ch].phase) / M_PI) * (double) 255));
} else {
softangle = (127 - ((channel[ch].phase / M_PI) * (double) 255));
}
// Then apply impact of amplitude. Finally, re-centre on 127-128
// as the decoder needs values between 0-255
softbit = (unsigned char) ((softangle / (1 + softamp)) - 127);
}
channel[ch].dcdshreg <<= (symbits + 1);
channel[ch].dcdshreg |= channel[ch].bits;
switch (channel[ch].dcdshreg) {
// bpsk DCD on
case 0xAAAAAAAA: /* DCD on by preamble */
if (_pskr) break;
if (!channel[ch].dcd)
REQ(&viewaddchr, ch, (int)channel[ch].frequency, 0, viewmode);
channel[ch].dcd = 1;
channel[ch].quality = cmplx (1.0, 0.0);
channel[ch].metric = 100;
channel[ch].timeout = progdefaults.VIEWERtimeout * VPSKSAMPLERATE / WF_BLOCKSIZE;
channel[ch].acquire = 0;
break;
// pskr DCD on
case 0x0A0A0A0A:
if (!_pskr) break;
if (!channel[ch].dcd)
REQ(&viewaddchr, ch, (int)channel[ch].frequency, 0, viewmode);
channel[ch].dcd = 1;
channel[ch].quality = cmplx (1.0, 0.0);
channel[ch].metric = 100;
channel[ch].timeout = progdefaults.VIEWERtimeout * VPSKSAMPLERATE / WF_BLOCKSIZE;
channel[ch].acquire = 0;
break;
case 0: /* DCD off by postamble */
channel[ch].dcd = false;
channel[ch].quality = cmplx (0.0, 0.0);
channel[ch].metric = 0;
channel[ch].acquire = 0;
break;
default:
channel[ch].quality = cmplx (
decayavg(channel[ch].quality.real(), cos(n*channel[ch].phase), SQLDECAY),
decayavg(channel[ch].quality.imag(), sin(n*channel[ch].phase), SQLDECAY));
channel[ch].metric = norm(channel[ch].quality);
if (channel[ch].metric > (progStatus.VIEWER_psksquelch + 6.0)/26.0) {
channel[ch].dcd = true;
} else {
channel[ch].dcd = false;
}
}
if (channel[ch].dcd == true) {
channel[ch].timeout = progdefaults.VIEWERtimeout * VPSKSAMPLERATE / WF_BLOCKSIZE;
if (_qpsk) rx_qpsk(ch, channel[ch].bits);
else if (_pskr) rx_pskr(ch, softbit);
else rx_bit(ch, !channel[ch].bits);
channel[ch].acquire = 0;
}
}
int viewpsk::rx_process(const double *buf, int len)
{
double sum;
double ampsum;
int idx;
cmplx z, z2;
if (nchannels != progdefaults.VIEWERchannels || lowfreq != progdefaults.LowFreqCutoff)
init();
// process all channels
for (int ch = 0; ch < nchannels; ch++) {
if (channel[ch].frequency == NULLFREQ) continue;
for (int ptr = 0; ptr < len; ptr++) {
// Mix with the internal NCO for each channel
z = cmplx ( buf[ptr] * cos(channel[ch].phaseacc), buf[ptr] * sin(channel[ch].phaseacc) );
channel[ch].phaseacc += 2.0 * M_PI * channel[ch].frequency / VPSKSAMPLERATE;
// filter & decimate
if (channel[ch].fir1->run( z, z )) {
channel[ch].fir2->run( z, z2 );
idx = (int) channel[ch].bitclk;
sum = 0.0;
ampsum = 0.0;
channel[ch].syncbuf[idx] = 0.8 * channel[ch].syncbuf[idx] + 0.2 * abs(z2);
double bitsteps = (symbollen >= 16 ? 16 : symbollen);
int symsteps = (int) (bitsteps / 2);
for (int i = 0; i < symsteps; i++) {
sum += (channel[ch].syncbuf[i] - channel[ch].syncbuf[i+8]);
ampsum += (channel[ch].syncbuf[i] + channel[ch].syncbuf[i+8]);
}
sum = (ampsum == 0 ? 0 : sum / ampsum);
channel[ch].bitclk -= sum / 5.0;
channel[ch].bitclk += 1;
if (channel[ch].bitclk < 0) channel[ch].bitclk += bitsteps;
if (channel[ch].bitclk >= bitsteps) {
channel[ch].bitclk -= bitsteps;
rx_symbol(ch, z2);
afc(ch);
}
}
}
}
findsignals();
return 0;
}
int viewpsk::get_freq(int n)
{
if (channel[n].dcd)
return (int)channel[n].frequency;
return NULLFREQ;
}
| 17,824
|
C++
|
.cxx
| 584
| 27.628425
| 92
| 0.634303
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,082
|
pskeval.cxx
|
w1hkj_fldigi/src/psk/pskeval.cxx
|
// ----------------------------------------------------------------------------
// pskeval.cxx -- psk signal evaluator
//
// Copyright (C) 2008-2009
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted from code contained in gmfsk source code
// distribution.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include "fl_digi.h"
#include "pskeval.h"
#include "configuration.h"
#include "misc.h"
//=============================================================================
//========================== psk signal evaluation ============================
//=============================================================================
pskeval::pskeval() {
bw = 31.25;
clear();
}
pskeval::~pskeval() {
}
int countdown = 8;
int rows = 0;
void pskeval::sigdensity() {
int ihbw = (int)(0.6*bw);
int ibw = 2 * ihbw;
double *vals = new double[ibw];
double sig = 0.0;
double val = 0.0;
int low = progdefaults.LowFreqCutoff;
if (low < ihbw) low = ihbw;
int high = progdefaults.HighFreqCutoff;
if (high > WF_FFTLEN - ihbw) high = WF_FFTLEN - ihbw;
int nbr = high - low;
sigmin = 1e6;
for (int i = 0; i < ibw; i++) {
val = vals[i] = wf->Pwr(i + low - ihbw);
sig += val;
}
for (int i = 0, j = 0; i < nbr; i++) {
sigpwr[i + low] = decayavg(sigpwr[i + low], sig, 32);
sig -= vals[j];
val = vals[j] = wf->Pwr(i + ihbw + low);
sig += val;
if (++j == ibw) j = 0;
if (sig < sigmin) sigmin = sig;
}
if (sigmin < 1e-8) sigmin = 1e-8;
delete [] vals;
}
double pskeval::sigpeak(int &f, int f1, int f2)
{
double peak = 0;
f1 -= bw;
if (f1 <= progdefaults.LowFreqCutoff) f1 = progdefaults.LowFreqCutoff;
f2 += bw;
if (f2 >= progdefaults.HighFreqCutoff) f2 = progdefaults.HighFreqCutoff;
int fa = f2, fb = f1;
for (int i = f1; i < f2; i++) if (sigpwr[i] > peak) peak = sigpwr[i];
if (!peak) return 0;
for (int i = f1; i < f2; i++)
if (sigpwr[i] > peak*0.75) fb = i;
for (int i = f2; i > f1; i--)
if (sigpwr[i] > peak*0.75) fa = i;
if (fa > fb) return 0;
f = (fa + fb) / 2;
return peak / sigmin / bw;
}
double pskeval::peak(int &f0, int f1, int f2, double db)
{
double peak = 0;
int fa = f2, fb = f1;
double level = pow(10, (10 + db) / 10.0);
//step 1
for (int i = f1; i < f2; i++) if (sigpwr[i] > peak) peak = sigpwr[i];
if (((peak-sigmin) / sigmin ) < level) {
return 0;
}
for (int i = f1; i < f2; i++)
if (sigpwr[i] > peak*0.75) fb = i;
for (int i = f2; i > f1; i--)
if (sigpwr[i] > peak*0.75) fa = i;
if (fa > fb) {
return 0;
}
f0 = (fa + fb) / 2;
//step 2
f1 = f0 - 1.5*bw;
if (f1 < bw) f1 = bw;
f2 = f0 + 1.5*bw;
fb = f1; fa = f2;
peak = 0;
for (int i = f1; i < f2; i++) if (sigpwr[i] > peak) peak = sigpwr[i];
for (int i = f1; i < f2; i++)
if (sigpwr[i] > peak*0.75) fb = i;
for (int i = f2; i > f1; i--)
if (sigpwr[i] > peak*0.75) fa = i;
if (fa > fb) {
return 0;
}
f0 = (fa + fb) / 2;
return (peak - sigmin) / sigmin ;
}
void pskeval::clear() {
for (int i = 0; i < WF_FFTLEN; i++) sigpwr[i] = 0.0;
}
| 3,695
|
C++
|
.cxx
| 121
| 28.61157
| 82
| 0.55418
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,083
|
psk.cxx
|
w1hkj_fldigi/src/psk/psk.cxx
|
// ----------------------------------------------------------------------------
// psk.cxx -- psk modem
//
// Copyright (C) 2006-2021
// Dave Freese, W1HKJ
// Copyright (C) 2009-2010
// John Douyere, VK2ETA
// Copyright (C) 2014-2021
// John Phelps, KL4YFD
// Modified by Joe Counsil, K0OG - Flushlengths on 8PSKxF Modes
//
// PSK-FEC and PSK-R modes contributed by VK2ETA
//
// This file is part of fldigi. Adapted from code contained in gmfsk
// source code distribution.
// gmfsk Copyright (C) 2001, 2002, 2003
// Tomi Manninen (oh2bns@sral.fi)
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <iomanip>
#include <iostream>
#include "psk.h"
#include "main.h"
#include "fl_digi.h"
#include "trx.h"
#include "misc.h"
#include "waterfall.h"
#include "configuration.h"
#include "status.h"
#include "viewpsk.h"
#include "pskeval.h"
#include "modem.h"
#include "Viewer.h"
#include "macros.h"
#include "confdialog.h"
#include "test_signal.h"
extern waterfall *wf;
// Change the following for DCD low pass filter adjustment
#define SQLCOEFF 0.01
#define SQLDECAY 50
//=====================================================================
#define K 5
#define POLY1 0x17
#define POLY2 0x19
// PSK + FEC + INTERLEAVE
// df=10 : correct up to 4 bits
#define PSKR_K 7
#define PSKR_POLY1 0x6d
#define PSKR_POLY2 0x4f
// df=14 : correct up to 6 bits
#define K11 11
#define K11_POLY1 03073 // 1595
#define K11_POLY2 02365 // 1269
// df=16 : correct up to 7 bits
// Code has good ac(df) and bc(df) parameters for puncturing
#define K13 13
#define K13_POLY1 016461 // 7473
#define K13_POLY2 012767 // 5623
#define THOR_K15 15
#define K15_POLY1 044735
#define K15_POLY2 063057
// df=19 : correct up to 9 bits
#define K16 16
#define K16_POLY1 0152711 // 54729
#define K16_POLY2 0126723 // 44499
// For Gray-mapped 8PSK:
// Even when the received phase is distorted by +- 1 phase-position:
// - One of the bits is still known with 100% certianty.
// - Only up to 1 bit can be in error
static cmplx graymapped_8psk_pos[] = {
// Degrees Bits In Mapped Soft-Symbol
cmplx (1.0, 0.0), // 0 | 0b000 | 025,000,025
cmplx (0.7071, 0.7071), // 45 | 0b001 | 000,025,230
cmplx (-0.7071, 0.7071), // 135 | 0b010 | 025,255,025
cmplx (0.0, 1.0), // 90 | 0b011 | 000,230,230
cmplx (0.7071, -0.7071), // 315 | 0b100 | 230,000,025
cmplx (0.0, -1.0), // 270 | 0b101 | 255,025,230
cmplx (-1.0, 0.0), // 180 | 0b110 | 230,255,025
cmplx (-0.7071, -0.7071) // 225 | 0b111 | 255,230,230
};
// Associated soft-symbols to be used with graymapped_8psk_pos[] constellation
// These softbits have precalculated (a-priori) probabilities applied
// Use of this table automatically Gray-decodes incoming symbols.
static unsigned char graymapped_8psk_softbits[8][3] = {
{ 25, 0, 25}, // 0
{ 0, 25, 230}, // 1
{ 0, 230, 230}, // 3
{ 25, 255, 25}, // 2
{230, 255, 25}, // 6
{255, 230, 230}, // 7
{255, 25, 230}, // 5
{230, 0, 25} // 4
};
// For Gray-mapped xPSK:
// Even when the received phase is distorted by +- 1 phase-position:
// - Only up to 1 bit can be in error
static cmplx graymapped_xpsk_pos[] = {
// Degrees Bits In
cmplx (0.7071, 0.7071), // 45 | 0b00
cmplx (-0.7071, 0.7071), // 135 | 0b01
cmplx (0.7071, -0.7071), // 315 | 0b10
cmplx (-0.7071, -0.7071) // 225 | 0b11
};
// Associated soft-symbols to be used with graymapped_xpsk_pos[] constellation
// Gray-coding of xPSK simply makes all probabilites equal.
// Use of this table automatically Gray-decodes incoming symbols.
static unsigned char graymapped_xpsk_softbits[4][2] = {
{0,0}, // 0
{0,255}, // 1
{255,255}, // 3
{255,0}, // 2
};
// For Gray-mapped 16PSK:
// Even when the received phase is distorted by +- 1 phase-position:
// - Two of the bits are still known with 100% certianty.
// - Only up to 1 bit can be in error
static cmplx graymapped_16psk_pos[] = {
cmplx (1.0, 0.0), // 0 degrees 0b0000 | 025,000,000,025
cmplx (0.9238, 0.3826), // 22.5 degrees 0b0001 | 000,000,025,230
cmplx (0.3826, 0.9238), // 67.5 degrees 0b0010 | 000,025,255,025
cmplx (0.7071, 0.7071), // 45 degrees 0b0011 | 000,000,230,230
cmplx (-0.9238, 0.3826), // 157.5 degrees 0b0100 | 025,255,000,025
cmplx (-0.7071, 0.7071), // 135 degrees 0b0101 | 000,255,025,230
cmplx (0.0, 1.0), // 90 degrees 0b0110 | 000,230,255,025
cmplx (-0.3826, 0.9238), // 112.5 degrees 0b0111 | 000,255,230,230
cmplx (0.9238, -0.3826), // 337.5 degrees 0b1000 | 230,000,000,025
cmplx (0.7071, -0.7071), // 315 degrees 0b1001 | 255,000,025,230
cmplx (0.0, -1.0), // 270 degrees 0b1010 | 255,025,255,025
cmplx (0.3826, -0.9238), // 292.5 degrees 0b1011 | 255,000,230,230
cmplx (-1.0, 0.0), // 180 degrees 0b1100 | 230,255,000,025
cmplx (-0.9238, -0.3826), // 202.5 degrees 0b1101 | 255,255,025,230
cmplx (-0.3826, -0.9238), // 247.5 degrees 0b1110 | 255,230,255,000
cmplx (-0.7071, -0.7071) // 225 degrees 0b1111 | 255,255,025,025
};
// Associated soft-symbols to be used with graymapped_16psk_pos[] constellation
// These softbits have precalculated (a-priori) probabilities applied
// Use of this table automatically Gray-decodes incoming symbols.
static unsigned char graymapped_16psk_softbits[16][4] = {
{025,000,000,025}, // 0
{000,000,025,230}, // 1
{000,000,230,230}, // 3
{000,025,255,025}, // 2
{000,230,255,025}, // 6
{000,255,230,230}, // 7
{000,255,025,230}, // 5
{025,255,000,025}, // 4
{230,255,000,025}, // 12
{255,255,025,230}, // 13
{255,255,025,025}, // 15
{255,230,255,000}, // 14
{255,025,255,025}, // 10
{255,000,230,230}, // 11
{255,000,025,230}, // 9
{230,000,000,025} // 8
};
char pskmsg[80];
void psk::tx_init()
{
for (int car = 0; car < numcarriers; car++) {
phaseacc[car] = 0;
prevsymbol[car] = cmplx (1.0, 0.0);
}
preamble = dcdbits;
if (_pskr || _xpsk || _8psk || _16psk) {
// MFSK based varicode instead of psk
shreg = 1;
shreg2 = 1;
} else {
shreg = 0;
shreg2 = 0;
}
videoText();
// interleaver
bitshreg = 0;
symbols = 0;
acc_symbols = 0;
ovhd_symbols = 0;
accumulated_bits = 0;
if(_8psk && _puncturing) {
enc->init();
Txinlv->flush();
}
vphase = 0;
maxamp = 0;
if (mode == MODE_OFDM_500F || mode == MODE_OFDM_750F || mode == MODE_OFDM_2000F) {
enc->init();
Txinlv->flush();
}
}
void psk::rx_init()
{
for (int car = 0; car < numcarriers; car++) {
phaseacc[car] = 0;
prevsymbol[car] = cmplx (1.0, 0.0);
}
quality = cmplx (0.0, 0.0);
if (_pskr || _xpsk || _8psk || _16psk) {
// MFSK varicode instead of psk
shreg = 1;
shreg2 = 1;
} else {
shreg = 0;
shreg2 = 0;
}
dcdshreg = 0;
dcdshreg2 = 0;
dcd = 0;
bitclk = 0;
freqerr = 0.0;
if (mailserver && progdefaults.PSKmailSweetSpot) sigsearch = SIGSEARCH;
else sigsearch = 0;
put_MODEstatus(mode);
resetSN_IMD();
afcmetric = 0.0;
// interleaver, split incoming bit stream into two, one late by one bit
rxbitstate = 0;
fecmet = fecmet2 = 0;
if (Rxinlv) Rxinlv->flush();
if (Rxinlv2) Rxinlv2->flush();
for (int i = 0; i < NUM_FILTERS; i++) {
re_Gbin[i]->reset();
im_Gbin[i]->reset();
}
}
bool psk::viewer_mode()
{
if (mode == MODE_PSK31 || mode == MODE_PSK63 || mode == MODE_PSK63F ||
mode == MODE_PSK125 || mode == MODE_PSK250 || mode == MODE_PSK500 ||
mode == MODE_PSK125R || mode == MODE_PSK250R || mode == MODE_PSK500R ||
mode == MODE_QPSK31 || mode == MODE_QPSK63 || mode == MODE_QPSK125 ||
mode == MODE_QPSK250 || mode == MODE_QPSK500 )
return true;
return false;
}
void psk::restart()
{
if (viewer_mode())
pskviewer->restart(mode);
evalpsk->setbw(sc_bw);
}
void psk::init()
{
restart();
modem::init();
set_scope_mode(Digiscope::PHASE);
initSN_IMD();
snratio = 1.0;
imdratio = 0.001;
rx_init();
set_freqlock(false); // re-lock modems after setting center-frequency.
if (mode == MODE_OFDM_2000F || mode == MODE_OFDM_2000)
set_freq(1325);
else if (mode == MODE_OFDM_3500)
set_freq(2250);
else if (mode == MODE_OFDM_500F || mode == MODE_OFDM_750F)
set_freq(1500);
else if (progdefaults.StartAtSweetSpot)
set_freq(progdefaults.PSKsweetspot);
else if (progStatus.carrier != 0) {
set_freq(progStatus.carrier);
#if !BENCHMARK_MODE
progStatus.carrier = 0;
#endif
} else
set_freq(wf->Carrier());
if (mode == MODE_OFDM_2000 || mode == MODE_OFDM_2000F || mode == MODE_OFDM_3500)
set_freqlock(true);
}
psk::~psk()
{
if (tx_shape) delete [] tx_shape;
if (imd_shape) delete [] imd_shape;
if (enc) delete enc;
if (dec) delete dec;
// FEC 2nd Viterbi decoder
if (dec2) delete dec2;
for (int i = 0; i < MAX_CARRIERS; i++) {
if (fir1[i]) delete fir1[i];
if (fir2[i]) delete fir2[i];
}
if (e0_filt) delete e0_filt;
if (e1_filt) delete e1_filt;
if (e2_filt) delete e2_filt;
if (e3_filt) delete e3_filt;
for (int i = 0; i < NUM_FILTERS; i++) {
delete re_Gbin[i];
delete im_Gbin[i];
}
if (pskviewer) delete pskviewer;
if (evalpsk) delete evalpsk;
// Interleaver
if (Rxinlv) delete Rxinlv;
if (Rxinlv2) delete Rxinlv2;
if (Txinlv) delete Txinlv;
if (vestigial_sfft) delete vestigial_sfft;
set_freqlock(false);
}
psk::psk(trx_mode pskmode) : modem()
{
enum FIR_TYPE {PSK_CORE, GMFSK, SINC};
FIR_TYPE fir_type = PSK_CORE;
cap |= CAP_AFC | CAP_AFC_SR;
mode = pskmode;
// Set the defaults that are common to most modes
samplerate = 8000;
numcarriers = 1;
separation = 1.4;
_16psk = _8psk = _xpsk = _pskr = _qpsk = _disablefec = _puncturing = false;
symbits = 1;
flushlength = 0;
int isize = 2;
idepth = 2;
PSKviterbi = false;
vestigial = false;
switch (mode) {
case MODE_PSK31:
symbollen = 256;
dcdbits = 32;
fir_type = PSK_CORE;
break;
case MODE_PSK63:
symbollen = 128;
dcdbits = 64;
fir_type = PSK_CORE;
break;
case MODE_PSK125:
symbollen = 64;
dcdbits = 128;
fir_type = SINC;
break;
case MODE_PSK250:
symbollen = 32;
dcdbits = 256;
fir_type = SINC;
break;
case MODE_PSK500:
symbollen = 16;
dcdbits = 512;
fir_type = SINC;
break;
case MODE_PSK1000:
symbollen = 8;
dcdbits = 128;
fir_type = SINC;
break;
case MODE_QPSK31:
symbollen = 256;
_qpsk = true;
dcdbits = 32;
cap |= CAP_REV;
fir_type = PSK_CORE;
break;
case MODE_QPSK63:
symbollen = 128;
_qpsk = true;
dcdbits = 64;
cap |= CAP_REV;
fir_type = PSK_CORE;
break;
case MODE_QPSK125:
symbollen = 64;
_qpsk = true;
dcdbits = 128;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_QPSK250:
symbollen = 32;
_qpsk = true;
dcdbits = 256;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_QPSK500:
symbollen = 16;
_qpsk = true;
dcdbits = 512;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_PSK63F: // As per Multipsk (BPSK63 + FEC + MFSK Varicode)
symbollen = 128;
_pskr = true;
dcdbits = 64;
fir_type = PSK_CORE;
break;
// OFDM modes
case MODE_OFDM_500F: // 62.5 baud xPSK | 4 carriers | 250 bits/sec @ 1/2 FEC
symbollen = 256;
samplerate = 16000;
_xpsk = true;
_disablefec = false;
_puncturing = false;
numcarriers = 4;
separation = 2.0f;
idepth = 2000; // 4000 milliseconds
flushlength = 200;
dcdbits = 192;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_OFDM_750F: // 125 baud 8PSK | 3 carriers | 562 bits/sec @ 1/2 FEC
symbollen = 128;
samplerate = 16000;
_8psk = true;
_disablefec = false;
_puncturing = false;
numcarriers = 3;
separation = 2.0f;
idepth = 3600; // 3200 milliseconds
flushlength = 360;
dcdbits = 384;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_OFDM_2000F: // 125 baud 8PSK | 8 carriers | 2000 bits/sec @ 2/3 FEC
symbollen = 128;
samplerate = 16000;
_8psk = true;
_disablefec = false;
_puncturing = true;
numcarriers = 8;
separation = 2.0f;
idepth = 4800; // 1600 milliseconds
flushlength = 480;
dcdbits = 1536;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_OFDM_2000: // 250 baud 8PSK | 4 carriers | 3000 bits/sec NO FEC
symbollen = 64;
samplerate = 16000;
_8psk = true;
_disablefec = true;
numcarriers = 4;
separation = 2.0f;
dcdbits = 1536;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_OFDM_3500: // 250 baud 8PSK | 7 carriers | 5250 bits/sec NO FEC
symbollen = 64;
samplerate = 16000;
_8psk = true;
_disablefec = true;
numcarriers = 7;
separation = 2.0f;
dcdbits = 1536;
vestigial = false;
cap |= CAP_REV;
fir_type = SINC;
break;
// End OFDM modes
// 8psk modes without FEC
case MODE_8PSK125: // 125 baud | 375 bits/sec No FEC
symbollen = 128;
samplerate = 16000;
_8psk = true;
_disablefec = true;
dcdbits = 128;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_8PSK250: // 250 baud | 750 bits/sec No FEC
symbollen = 64;
samplerate = 16000;
_8psk = true;
_disablefec = true;
dcdbits = 256;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_8PSK500: // 500 baud | 1500 bits/sec No FEC
symbollen = 32;
samplerate = 16000;
_8psk = true;
_disablefec = true;
dcdbits = 512;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_8PSK1000: // 1000 baud | 3000 bits/sec No FEC
symbollen = 16;
samplerate = 16000;
_8psk = true;
_disablefec = true;
dcdbits = 1024;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
// 8psk modes with FEC
case MODE_8PSK125FL: // 125 baud | 187 bits/sec @ 1/2 Rate K=13 FEC
symbollen = 128;
idepth = 384; // 2048 milliseconds
flushlength = 55;
samplerate = 16000;
_8psk = true;
dcdbits = 128;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_8PSK250FL: // 250 baud | 375 bits/sec @ 1/2 Rate K=13 FEC
symbollen = 64;
idepth = 512; // 1365 milliseconds
flushlength = 65;
samplerate = 16000;
_8psk = true;
dcdbits = 256;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_8PSK125F: // 125 baud | 187 bits/sec @ 1/2 Rate K=16 FEC
symbollen = 128;
idepth = 384; // 2048 milliseconds
flushlength = 55;
samplerate = 16000;
_8psk = true;
dcdbits = 128;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_8PSK250F: // 250 baud | 375 bits/sec @ 1/2 Rate K=16 FEC
symbollen = 64;
idepth = 512; // 1365 milliseconds
flushlength = 65;
samplerate = 16000;
_8psk = true;
dcdbits = 256;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_8PSK500F: // 500 baud | 1000 bits/sec @ 2/3 rate K=13 FEC
symbollen = 32;
idepth = 640; // 426 milliseconds
flushlength = 80;
samplerate = 16000;
_8psk = true;
_puncturing = true;
dcdbits = 512;
vestigial = true;
cap |= CAP_REV;
fir_type = SINC;
break;
case MODE_8PSK1000F: // 1000 baud | 2000 bits/sec @ 2/3 rate K=7 FEC
symbollen = 16;
idepth = 512; // 170 milliseconds
flushlength = 120;
samplerate = 16000;
_8psk = true;
dcdbits = 1024;
cap |= CAP_REV;
_puncturing = true;
vestigial = true;
PSKviterbi = true;
fir_type = SINC;
break;
case MODE_8PSK1200F: // 1200 baud | 2400 bits/sec @ 2/3 rate K=7 FEC
symbollen = 13;
idepth = 512; // 142 milliseconds
flushlength = 175;
samplerate = 16000;
_8psk = true;
_puncturing = true;
dcdbits = 2048;
cap |= CAP_REV;
vestigial = true;
PSKviterbi = true;
fir_type = SINC;
break;
// end 8psk modes
case MODE_PSK125R:
symbollen = 64;
_pskr = true;
dcdbits = 128;
idepth = 40; // 2x2x40 interleaver
fir_type = SINC;
break;
case MODE_PSK250R:
symbollen = 32;
_pskr = true;
dcdbits = 256;
idepth = 80; // 2x2x80 interleaver
fir_type = SINC;
break;
case MODE_PSK500R:
symbollen = 16;
_pskr = true;
dcdbits = 512;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_PSK1000R:
symbollen = 8;
_pskr = true;
dcdbits = 512;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
// multi-carrier modems
case MODE_4X_PSK63R:
symbollen = 128;//PSK63
dcdbits = 128;
_pskr = true;//PSKR
numcarriers = 4;
idepth = 80; // 2x2x80 interleaver
fir_type = SINC;
break;
case MODE_5X_PSK63R:
symbollen = 128; //PSK63
dcdbits = 512;
_pskr = true; //PSKR
numcarriers = 5;
idepth = 260; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_10X_PSK63R:
symbollen = 128; //PSK63
dcdbits = 512;
_pskr = true; //PSKR
numcarriers = 10;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_20X_PSK63R:
symbollen = 128; //PSK63
dcdbits = 512;
_pskr = true; //PSKR
numcarriers = 20;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_32X_PSK63R:
symbollen = 128; //PSK63
dcdbits = 512;
_pskr = true; //PSKR
numcarriers = 32;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_4X_PSK125R:
symbollen = 64;//PSK125
dcdbits = 512;
_pskr = true;//PSKR
numcarriers = 4;
idepth = 80; // 2x2x80 interleaver
fir_type = SINC;
break;
case MODE_5X_PSK125R:
symbollen = 64;//PSK125
dcdbits = 512;
_pskr = true;//PSKR
numcarriers = 5;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_10X_PSK125R:
symbollen = 64;//PSK125
dcdbits = 512;
_pskr = true;//PSKR
numcarriers = 10;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_12X_PSK125:
symbollen = 64;//PSK125
dcdbits = 128;//512;
numcarriers = 12;
fir_type = SINC;
break;
case MODE_12X_PSK125R:
symbollen = 64;//PSK125
dcdbits = 512;
_pskr = true;//PSKR
numcarriers = 12;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_16X_PSK125R:
symbollen = 64;//PSK125
dcdbits = 512;
_pskr = true;//PSKR
numcarriers = 16;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_2X_PSK250R:
symbollen = 32;//PSK250
dcdbits = 512;
_pskr = true;//PSKR
numcarriers = 2;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_3X_PSK250R:
symbollen = 32;//PSK250
dcdbits = 512;
_pskr = true;//PSKR
numcarriers = 3;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_5X_PSK250R:
symbollen = 32;//PSK250
_pskr = true;//PSKR
dcdbits = 1024;
numcarriers = 5;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_6X_PSK250:
symbollen = 32;//PSK250
dcdbits = 512;
numcarriers = 6;
fir_type = SINC;
break;
case MODE_6X_PSK250R:
symbollen = 32;//PSK250
_pskr = true;//PSKR
dcdbits = 1024;
numcarriers = 6;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_7X_PSK250R:
symbollen = 32;//PSK250
_pskr = true;//PSKR
dcdbits = 1024;
numcarriers = 7;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_2X_PSK500:
symbollen = 16;
dcdbits = 512;
numcarriers = 2;
fir_type = SINC;
break;
case MODE_4X_PSK500:
symbollen = 16;
dcdbits = 512;
numcarriers = 4;
fir_type = SINC;
break;
case MODE_2X_PSK500R:
symbollen = 16;
_pskr = true;
dcdbits = 1024;
idepth = 160; // 2x2x160 interleaver
numcarriers = 2;
fir_type = SINC;
break;
case MODE_3X_PSK500R:
symbollen = 16;
_pskr = true;
dcdbits = 1024;
idepth = 160; // 2x2x160 interleaver
numcarriers = 3;
fir_type = SINC;
break;
case MODE_4X_PSK500R:
symbollen = 16;
_pskr = true;
dcdbits = 1024;
idepth = 160; // 2x2x160 interleaver
numcarriers = 4;
fir_type = SINC;
break;
case MODE_2X_PSK800:
symbollen = 10;
_pskr = false;
dcdbits = 512;
numcarriers = 2;
fir_type = SINC;
break;
case MODE_2X_PSK800R:
symbollen = 10;
_pskr = true;
dcdbits = 1024;
idepth = 160; // 2x2x160 interleaver
numcarriers = 2;
fir_type = SINC;
break;
case MODE_2X_PSK1000:
symbollen = 8;//PSK1000
dcdbits = 1024;
numcarriers = 2;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
case MODE_2X_PSK1000R:
symbollen = 8;//PSK1000
_pskr = true;//PSKR
dcdbits = 1024;
numcarriers = 2;
idepth = 160; // 2x2x160 interleaver
fir_type = SINC;
break;
default:
mode = MODE_PSK31;
symbollen = 256;
dcdbits = 32;
numcarriers = 1;
fir_type = PSK_CORE;
}
// Set the number of bits-per-symbol based on the chosen constellation
if (_qpsk || _xpsk) symbits = 2;
else if (_8psk) symbits = 3;
else if (_16psk) symbits = 4;
else symbits = 1; // else BPSK / PSKR
//printf("%s: symlen %d, dcdbits %d, _qpsk %d, _pskr %d, numc %f\n",
//mode_info[mode].sname,
//symbollen, dcdbits, _qpsk, _pskr, numcarriers);
enc = (encoder *)0;
dec = (viterbi *)0;
// BPSK+FEC - 2nd Viterbi decoder and de-interleaver
dec2 = (viterbi *)0;
Txinlv = (interleave *)0;
Rxinlv = (interleave *)0;
Rxinlv2 = (interleave *)0;
vestigial_sfft = (sfft *)0;
// create impulse response for experimental FIR filters
double fir1c[FIRLEN+1];
double fir2c[FIRLEN+1];
for (int i = 0; i < MAX_CARRIERS; i++) {
if (i < numcarriers) {
fir1[i] = new C_FIR_filter();
fir2[i] = new C_FIR_filter();
} else {
fir1[i] = (C_FIR_filter *)0;
fir2[i] = (C_FIR_filter *)0;
}
}
switch (fir_type) {
case PSK_CORE: // PSKcore filter
raisedcosfilt(fir1c, FIRLEN);
for (int i = 0; i <= FIRLEN; i++)
fir2c[i] = pskcore_filter[i];
for (int i = 0; i < numcarriers; i++) {
fir1[i]->init(FIRLEN+1, symbollen > 15 ? symbollen / 16 : 1, fir1c, fir1c);
fir2[i]->init(FIRLEN+1, 1, fir2c, fir2c);
}
break;
default:
case SINC: // fir1c & fir2c matched sin(x)/x filter w blackman
wsincfilt(fir1c, 1.0 / symbollen, FIRLEN);
wsincfilt(fir2c, 1.0 / 16.0, FIRLEN);
for (int i = 0; i < numcarriers; i++) {
fir1[i]->init(FIRLEN, symbollen > 15 ? symbollen / 16 : 1, fir1c, fir1c);
fir2[i]->init(FIRLEN, 1, fir2c, fir2c);
}
break;
}
e0_filt = new Cmovavg(dcdbits / 2);
e1_filt = new Cmovavg(dcdbits / 2);
e2_filt = new Cmovavg(dcdbits / 2);
e3_filt = new Cmovavg(dcdbits / 2);
re_Gbin[0] = new goertzel(160, 0, 500.0); // base
re_Gbin[1] = new goertzel(160, 15.625, 500.0); // fundamental
re_Gbin[2] = new goertzel(160, 62.5, 500.0); // 4th harmonic (noise)
re_Gbin[3] = new goertzel(160, 46.875, 500.0); // 3rd harmonic (imd)
im_Gbin[0] = new goertzel(160, 0, 500.0); // base
im_Gbin[1] = new goertzel(160, 15.625, 500.0); // fundamental
im_Gbin[2] = new goertzel(160, 62.5, 500.0); // 4th harmonic (noise)
im_Gbin[3] = new goertzel(160, 46.875, 500.0); // 3rd harmonic (imd)
// If no FEC used, these just stay NULL
enc = NULL;
dec = dec2 = NULL;
if (_qpsk) {
enc = new encoder(K, POLY1, POLY2);
dec = new viterbi(K, POLY1, POLY2);
} else if (_pskr || PSKviterbi) {
// FEC for BPSK. Use a 2nd Viterbi decoder for comparison.
// Set decode size to 4 since some characters can be as small
// as 3 bits long. This minimises intercharacters decoding
// interactions.
enc = new encoder(PSKR_K, PSKR_POLY1, PSKR_POLY2);
dec = new viterbi(PSKR_K, PSKR_POLY1, PSKR_POLY2);
dec->setchunksize(4);
dec2 = new viterbi(PSKR_K, PSKR_POLY1, PSKR_POLY2);
dec2->setchunksize(4);
} else if (mode == MODE_8PSK125F || mode == MODE_8PSK250F) {
enc = new encoder(K16, K16_POLY1, K16_POLY2);
dec = new viterbi(K16, K16_POLY1, K16_POLY2);
dec->setchunksize(4);
dec2 = new viterbi(K16, K16_POLY1, K16_POLY2);
dec2->setchunksize(4);
} else if (mode == MODE_OFDM_500F) {
enc = new encoder(THOR_K15, K15_POLY1, K15_POLY2);
dec = new viterbi(THOR_K15, K15_POLY1, K15_POLY2);
dec->setchunksize(4);
dec->settraceback(THOR_K15 * 10);
} else if (mode == MODE_OFDM_2000F) {
enc = new encoder(K11, K11_POLY1, K11_POLY2);
dec = new viterbi(K11, K11_POLY1, K11_POLY2);
dec->setchunksize(4);
dec->settraceback(K11 * 14); // OFDM-2000F is a punctured code
} else if (_xpsk || _8psk || _16psk) {
enc = new encoder(K13, K13_POLY1, K13_POLY2);
dec = new viterbi(K13, K13_POLY1, K13_POLY2);
dec->setchunksize(4);
// Second viterbi decoder is only needed when modem has an odd number of bits/symbol.
if ( _8psk && !_puncturing ) { // (punctured 8psk has 3-real bits + 1-punctured bit per transmitted symbol)
dec2 = new viterbi(K13, K13_POLY1, K13_POLY2);
dec2->setchunksize(4);
}
if (_puncturing) { // punctured codes benefit from a longer traceback
dec->settraceback(K13 * 16);
if (dec2) dec2->settraceback(K13 * 16);
} else {
dec->settraceback(K13 * 10);
if (dec2) dec2->settraceback(K13 * 10);
}
}
// Interleaver. For PSKR to maintain constant time delay between bits,
// we double the number of concatenated square iterleavers for
// each doubling of speed: 2x2x20 for BSK63+FEC, 2x2x40 for
// BPSK125+FEC, etc..
Txinlv = new interleave (isize, idepth, INTERLEAVE_FWD);
Rxinlv = new interleave (isize, idepth, INTERLEAVE_REV);
if (dec2) Rxinlv2 = new interleave (isize, idepth, INTERLEAVE_REV);
bitshreg = 0;
rxbitstate = 0;
tx_shape = new double[symbollen];
imd_shape = new double[symbollen];
// raised cosine shape for the transmitter
double sym_ph = 0;
for ( int i = 0; i < symbollen; i++) {
sym_ph = i * M_PI / symbollen;
tx_shape[i] = 0.5 * cos(sym_ph) + 0.5;
imd_shape[i] = 0.5 * ( cos(3.0 * sym_ph) +
(3.0/5.0) * cos(5.0 * sym_ph) +
(3.0/7.0) * cos(7.0 * sym_ph) +
(3.0/9.0) * cos(9.0 * sym_ph) );
}
fragmentsize = symbollen;
sc_bw = samplerate / symbollen;
//JD added for multiple carriers
inter_carrier = separation * sc_bw;
bandwidth = sc_bw * ( 1 + separation * (numcarriers - 1));
snratio = s2n = imdratio = imd = 0;
if (mailserver && progdefaults.PSKmailSweetSpot)
sigsearch = SIGSEARCH;
else
sigsearch = 0;
for (int i = 0; i < 16; i++)
syncbuf[i] = 0.0;
// E1 = E2 = E3 = 0.0;
acquire = 0;
evalpsk = new pskeval;
if (viewer_mode())
pskviewer = new viewpsk(evalpsk, mode);
else
pskviewer = 0;
if (vestigial) {
if (samplerate == 16000)
sfft_size = 16384;
else
sfft_size = 8192;
int bin = sc_bw * sfft_size / samplerate;
vestigial_sfft = new sfft(sfft_size, bin - 5, bin + 6); // 11 bins
for (int i = 0; i < 11; i++) sfft_bins[i] = cmplx(0,0);
}
if (mode == MODE_OFDM_2000 || mode == MODE_OFDM_2000F) {
set_freqlock(false);
set_freq(1325);
set_freqlock(true);
} else if (mode == MODE_OFDM_3500) {
set_freqlock(false);
set_freq(2250);
set_freqlock(true);
}
}
//=============================================================================
//=========================== psk31 receive routines ==========================
//=============================================================================
void psk::s2nreport(void)
{
modem::s2nreport();
s2n_sum = s2n_sum2 = s2n_ncount = 0.0;
}
void psk::rx_bit(int bit)
{
int c;
bool do_s2nreport = false;
shreg = (shreg << 1) | !!bit;
if (_pskr || _xpsk || _8psk || _16psk) {
// MFSK varicode instead of PSK Varicode
if ((shreg & 7) == 1) {
c = varidec(shreg >> 1);
// Voting at the character level
if (fecmet >= fecmet2 || _disablefec) {
if ((c != -1) && (c != 0) && (dcd == true)) {
put_rx_char(c);
do_s2nreport = true;
}
}
shreg = 1;
}
} else {
// PSK varicode
if ((shreg & 3) == 0) {
c = psk_varicode_decode(shreg >> 2);
if ((c != -1) && (dcd == true)) {
put_rx_char(c);
do_s2nreport = true;
}
shreg = 0;
}
}
if (do_s2nreport) {
if (progdefaults.Pskmails2nreport && (mailserver || mailclient)) {
s2n_sum += s2n_metric;
s2n_sum2 += (s2n_metric * s2n_metric);
s2n_ncount ++;
if (c == EOT)
s2nreport();
}
}
}
void psk::rx_bit2(int bit)
{
int c;
bool do_s2nreport = false;
shreg2 = (shreg2 << 1) | !!bit;
// MFSK varicode instead of PSK Varicode
if ((shreg2 & 7) == 1) {
c = varidec(shreg2 >> 1);
// Voting at the character level for only PSKR modes
if (fecmet < fecmet2 || _disablefec) {
if ((c != -1) && (c != 0) && (dcd == true)) {
put_rx_char(c);
do_s2nreport = true;
}
}
shreg2 = 1;
}
if (do_s2nreport) {
if (progdefaults.Pskmails2nreport && (mailserver || mailclient)) {
s2n_sum += s2n_metric;
s2n_sum2 += (s2n_metric * s2n_metric);
s2n_ncount ++;
if (c == EOT)
s2nreport();
}
}
}
void psk::rx_qpsk(int bits)
{
unsigned char sym[2];
int c;
if (_qpsk && !reverse)
bits = (4 - bits) & 3;
sym[0] = (bits & 1) ? 255 : 0;
sym[1] = (bits & 2) ? 0 : 255; // top bit is flipped
//JD added de-interleaver
// Rxinlv->symbols(sym);
c = dec->decode(sym, NULL);
if (c != -1) {
rx_bit(c & 0x80);
rx_bit(c & 0x40);
rx_bit(c & 0x20);
rx_bit(c & 0x10);
rx_bit(c & 0x08);
rx_bit(c & 0x04);
rx_bit(c & 0x02);
rx_bit(c & 0x01);
}
}
void psk::rx_pskr(unsigned char symbol)
{
int met;
unsigned char twosym[2];
unsigned char tempc;
int c;
//In the case of multiple carriers, if even number of carriers then we
// know the bit-order and don't need voting otherwise
// we accumulate the soft bits for the interleaver THEN submit to Viterbi
// decoder in alternance so that each one is processed one bit later.
// Only two possibilities for sync: current bit or previous one since
// we encode with R = 1/2 and send encoded bits one after the other
// through the interleaver.
symbolpair[1] = symbolpair[0];
symbolpair[0] = symbol;
if (rxbitstate == 0) {
rxbitstate++;
//Only use one decoder is using even carriers (we know the bits order)
// if (((int)numcarriers) % 2 == 0) {
// fecmet2 = -9999.0;
// return;
// }
// XPSK and 16PSK have even number of bits/symbol
// Punctured 8PSK has even number of bits/symbol (3 real + 1 punctured)
// so bit order known: can use only one decoder to reduce CPU usage
if ( _xpsk || _16psk || (_8psk && _puncturing) ) {
fecmet2 = -9999.0;
return;
}
// copy to avoid scrambling symbolpair for the next bit
twosym[0] = symbolpair[0];
twosym[1] = symbolpair[1];
// De-interleave
if (mode != MODE_PSK63F) Rxinlv2->symbols(twosym);
// pass de-interleaved bits pair to the decoder, reversed
tempc = twosym[1];
twosym[1] = twosym[0];
twosym[0] = tempc;
// Then viterbi decoder
c = dec2->decode(twosym, &met);
if (c != -1) {
// FEC only take metric measurement after backtrace
// Will be used for voting between the two decoded streams
fecmet2 = decayavg(fecmet2, met, 20);
rx_bit2(c & 0x08);
rx_bit2(c & 0x04);
rx_bit2(c & 0x02);
rx_bit2(c & 0x01);
}
} else {
// Again for the same stream shifted by one bit
rxbitstate = 0;
twosym[0] = symbolpair[0];
twosym[1] = symbolpair[1];
// De-interleave
if (mode != MODE_PSK63F) Rxinlv->symbols(twosym);
tempc = twosym[1];
twosym[1] = twosym[0];
twosym[0] = tempc;
// Then viterbi decoder
c = dec->decode(twosym, &met);
if (c != -1) {
fecmet = decayavg(fecmet, met, 20);
rx_bit(c & 0x08);
rx_bit(c & 0x04);
rx_bit(c & 0x02);
rx_bit(c & 0x01);
}
}
}
void psk::searchDown()
{
double srchfreq = frequency - sc_bw * 2;
double minfreq = sc_bw * 2;
double spwr, npwr;
while (srchfreq > minfreq) {
spwr = wf->powerDensity(srchfreq, sc_bw);
npwr = wf->powerDensity(srchfreq + sc_bw, sc_bw/2) + 1e-10;
if (spwr / npwr > pow(10, progdefaults.ServerACQsn / 10)) {
frequency = srchfreq;
set_freq(frequency);
sigsearch = SIGSEARCH;
break;
}
srchfreq -= sc_bw;
}
}
void psk::searchUp()
{
double srchfreq = frequency + sc_bw * 2;
double maxfreq = IMAGE_WIDTH - sc_bw * 2;
double spwr, npwr;
while (srchfreq < maxfreq) {
spwr = wf->powerDensity(srchfreq, sc_bw/2);
npwr = wf->powerDensity(srchfreq - sc_bw, sc_bw/2) + 1e-10;
if (spwr / npwr > pow(10, progdefaults.ServerACQsn / 10)) {
frequency = srchfreq;
set_freq(frequency);
sigsearch = SIGSEARCH;
break;
}
srchfreq += sc_bw;
}
}
int waitcount = 0;
void psk::findsignal()
{
put_Status1("");
put_Status2("");
put_status("");
int ftest, f1, f2;
if (sigsearch > 0) {
sigsearch--;
if (mailserver) { // mail server search algorithm
if (progdefaults.PSKmailSweetSpot) {
f1 = (int)(progdefaults.ServerCarrier - progdefaults.ServerOffset);
f2 = (int)(progdefaults.ServerCarrier + progdefaults.ServerOffset);
} else {
f1 = (int)(frequency - progdefaults.ServerOffset);
f2 = (int)(frequency + progdefaults.ServerOffset);
}
if (evalpsk->sigpeak(ftest, f1, f2) > pow(10, progdefaults.ServerACQsn / 10) ) {
if (progdefaults.PSKmailSweetSpot) {
if (abs(ftest - progdefaults.ServerCarrier) < progdefaults.ServerOffset) {
frequency = ftest;
set_freq(frequency);
freqerr = 0.0;
} else {
frequency = progdefaults.ServerCarrier;
set_freq(frequency);
freqerr = 0.0;
}
} else {
frequency = ftest;
set_freq(frequency);
freqerr = 0.0;
}
} else { // less than the detection threshold
if (progdefaults.PSKmailSweetSpot) {
frequency = progdefaults.ServerCarrier;
set_freq(frequency);
sigsearch = SIGSEARCH;
}
}
} else { // normal signal search algorithm
f1 = (int)(frequency - progdefaults.SearchRange/2);
f2 = (int)(frequency + progdefaults.SearchRange/2);
resetSN_IMD();
if (evalpsk->sigpeak(ftest, f1, f2) > pow(10, progdefaults.ACQsn / 10.0) ) {
frequency = ftest;
set_freq(frequency);
freqerr = 0.0;
sigsearch = 0;
acquire = dcdbits;
}
}
}
}
//DHF: AFC based on vestigial carrier located at f0 - bandwidth
void psk::vestigial_afc() {
if (!vestigial) return;
if (!vestigial_sfft->is_stable()) return;
double avg = 0;
double max = 0;
int i = -1;
static int previous1 = -1;
static int previous2 = -2;
for (i = 0; i < 11; i++) avg += abs(sfft_bins[i]);
avg /= 11.0;
// No real signal present: ignore AFC, reset, and return
if (avg == 0.0f) {
vestigial_sfft->reset();
return;
}
std::setprecision(2); std::setw(5);
for (int k = 0; k < 11; k++) {
if (abs(sfft_bins[k]) > max) {
max = abs(sfft_bins[k]);
i = k;
}
}
// Validity-check the AFC: must see same tone twice in a row,
// and previous tones must be within 1Hz of each other.
// Operates with 1hz/sec drift-rates
if ( i != previous1 || abs(previous1-previous2) > 1 ) {
previous2 = previous1;
previous1 = i;
vestigial_sfft->reset();
return;
}
if (i < 11 && i > -1) {
if (i != 5) {
frequency -= 1.0*(i-5)*samplerate/sfft_size;
set_freq (frequency);
}
}
previous2 = previous1;
previous1 = i;
vestigial_sfft->reset();
}
//JD: disable for multiple carriers as we are running as modem and
// therefore use other strategies for frequency alignment like RSID
void psk::phaseafc()
{
double error;
// Skip AFC for modes it does not work with
if (vestigial) return vestigial_afc();
if (afcmetric < 0.05 ||
mode == MODE_PSK500 ||
mode == MODE_QPSK500 || numcarriers > 1) return;
error = (phase - bits * M_PI / 2.0);
if (error < -M_PI / 2.0 || error > M_PI / 2.0) return;
error *= samplerate / (TWOPI * symbollen);
if (fabs(error) < sc_bw ) {
freqerr = error / dcdbits;
frequency -= freqerr;
if (mailserver) {
if (frequency < progdefaults.ServerCarrier - progdefaults.ServerAFCrange)
frequency = progdefaults.ServerCarrier - progdefaults.ServerAFCrange;
if (frequency > progdefaults.ServerCarrier + progdefaults.ServerAFCrange)
frequency = progdefaults.ServerCarrier + progdefaults.ServerAFCrange;
}
set_freq (frequency);
}
if (acquire) acquire--;
}
void psk::afc()
{
if (mode >= MODE_OFDM_500F && mode <= MODE_OFDM_2000)
return vestigial_afc();
else if (!progStatus.afconoff)
return;
else if (dcd == true || acquire)
phaseafc();
}
void psk::rx_symbol(cmplx symbol, int car)
{
int n;
unsigned char softbit = 0;
double softangle;
double softamp;
double sigamp = norm(symbol);
static double averageamp;
phase = arg ( conj(prevsymbol[car]) * symbol );
prevsymbol[car] = symbol;
/// align the RX constellation to the TX constellation, for Non-FEC modes
if (_disablefec && (_16psk || _8psk || _xpsk )) phase -= M_PI;
if (phase < 0) phase += TWOPI;
if (_qpsk) {
n = 4;
bits = ((int) (phase / M_PI_2 + 0.5)) & (n-1);
} else if (_xpsk) {
n = 4;
bits = ((int) (phase / M_PI_2)) & (n-1);
} else if (_8psk) {
n = 8;
bits = ((int) (phase / (M_PI/4.0) + 0.5)) & (n-1);
} else if (_16psk) {
n = 16;
bits = ((int) (phase / (M_PI/8.0) + 0.5)) & (n-1);
} else { // bpsk and pskr
n = 2;
bits = (((int) (phase / M_PI + 0.5)) & (n-1) ) << 1;
// hard decode if needed
// softbit = (bits & 2) ? 0 : 255;
// reversed as we normally pass "!bits" when hard decoding
averageamp = decayavg(averageamp, sigamp, SQLDECAY);
if (sigamp > 0 && averageamp > 0) {
if (sigamp > averageamp) {
softamp = clamp( sqrt(sigamp / averageamp), 1.0, 1e6);
} else {
softamp = clamp( sqrt(averageamp / sigamp), 1.0, 1e6);
}
} else {
softamp = 2; // arbritary number (50% impact)
}
// Compute values between -128 and +127 for phase value only
double alpha = phase / M_PI;
if (alpha > 1.0) alpha = 2.0 - alpha;
softangle = 127.0 - 255.0 * alpha;
softbit = (unsigned char) ((softangle / ( 1.0 + softamp / 2.0)) + 128);
}
// Only update phase_quality once every dcdbits/4 function-calls
static int counter=0;
if (counter++ > dcdbits/4) {
counter = 0;
// Calculate how far the phase/constellation is off from perfect, on a scale of 0-100
double PhaseOffset = (phase * 180.0 / M_PI) / (360.0/n);
PhaseOffset -= (int)PhaseOffset; // cutoff integer, leave just the decimal part
if (_xpsk) PhaseOffset += 0.5; // xPSK constellation is offset by 45degrees. adjust calculations to compensate
if (PhaseOffset > 0.5) // fix the wraparound issue
PhaseOffset = 1.0 - PhaseOffset;
int phase_quality= (int)(100 - PhaseOffset * 200); // Save the phase_quality to a global for later display
// Adjust the phase-error for non 8psk modes
if (n == 2) // bpsk, pskr
phase_quality *= 1.25;
if (phase_quality > 100) phase_quality = 100;
else if (phase_quality < 0) phase_quality = 0;
update_quality(phase_quality);
}
// simple low pass filter for quality of signal
double decay = SQLDECAY;
double attack = SQLDECAY;
double cval = cos(n*phase);
double sval = sin(n*phase);
if (_8psk) {
attack *= 2;
decay *= 4;
}
if (_pskr) {
decay *= 10;
quality = cmplx(
decayavg(quality.real(), cval, decay),
decayavg(quality.imag(), sval, decay));
} else
quality = cmplx(
decayavg(quality.real(), cval, cval > quality.real() ? attack : decay),
decayavg(quality.imag(), sval, sval > quality.real() ? attack : decay));
metric = 100.0 * norm(quality);
if (_pskr && (averageamp < 3e-5)) metric = 0;
if (progdefaults.Pskmails2nreport && (mailserver || mailclient)) {
//s2n reporting: rescale depending on mode, clip after scaling
if (_pskr)
s2n_metric = metric * 1.5 + 8;
else
s2n_metric = metric;
s2n_metric = CLAMP(s2n_metric, 0.0, 100.0);
}
// FEC: adjust squelch for extra sensitivity.
// Otherwise we miss good characters
// ***********************************************************
// **** DHF still needed with attack/decay filtering?
// ***********************************************************
// if (_pskr) {
// metric = metric * 4;
// }
// else if ( (_xpsk || _8psk || _16psk) && !_disablefec) {
// metric *= 2 * symbits; /// @TODO scale the metric with the psk constellation density
// }
if (metric > 100)
metric = 100;
afcmetric = decayavg(afcmetric, norm(quality), 50);
dcdshreg = ( dcdshreg << (symbits+1) ) | bits;
int set_dcd = -1; // 1 sets DCD on ; 0 sets DCD off ; -1 does neither (no-op)
static int dcdOFFcounter=0; // to prevent a data loss bug... only set DCD-off when correct shreg bitpattern seen multiple times.
switch (dcdshreg) {
// bpsk DCD ON
case 0xAAAAAAAA:
if (_xpsk || _8psk || _16psk) break;
if (_pskr) break;
set_dcd = 1;
break;
// pskr DCD ON
// the pskr FEC pipeline is flushed with an alternating 1/0 pattern, giving 4 possible DCD-ON sequences.
case 0x0A0A0A0A:
case 0x28282828:
case 0xA0A0A0A0:
case 0x82828282:
if (!_pskr) break;
set_dcd = 1;
break;
// xpsk DCD OFF
case 0x92492492:
if (_qpsk) break; // the QPSK preamble and postamble are identical... Since cant differentiate, QPSK modes do not use DCD
if (!_xpsk) break;
if (!_disablefec) break; // xPSK with FEC-enabled does not use DCD-OFF
set_dcd = 0;
break;
// 8psk DCD OFF
case 0x44444444:
if (!_8psk) break;
if (!_disablefec) break; // 8psk with FEC-enabled does not use DCD-OFF
set_dcd = 0;
break;
// 16psk DCD OFF
case 0x10842108:
if (!_16psk) break;
if (!_disablefec) break; // 16psk with FEC-enabled does not use DCD-OFF
set_dcd = 0;
break;
// bpsk DCD OFF
// 8psk & xpsk DCD ON
case 0x00000000:
if (_pskr) break; // pskr does not use DCD-OFF
if (_16psk) break; // TODO: 16psk dcd on/off unimplemented
if (_8psk || _xpsk) {
set_dcd = 1;
break;
}
set_dcd = 0;
break;
default:
if (metric > progStatus.sldrSquelchValue || progStatus.sqlonoff == false) {
dcd = true;
// FIXME BUG OFDM FEC modes have NO DCD OFF yet. TODO KL4YFD MAR2021
} else if (mode != MODE_OFDM_500F && mode != MODE_OFDM_750F && mode != MODE_OFDM_2000F) {
dcd = false;
}
dcdOFFcounter -= 1; // If no DCD-off sequence seen in bitshreg, then subtract 1 from counter (to prevent a accumulative-triggering bug)
if (dcdOFFcounter < 0) dcdOFFcounter = 0; // prevent wraparound to negative
break;
}
//printf("\n%08x", dcdshreg);
// Set DCD to ON
if ( 1 == set_dcd ) {
dcdOFFcounter = 0;
dcd = true;
acquire = 0;
quality = cmplx (1.0, 0.0);
if (progdefaults.Pskmails2nreport && (mailserver || mailclient))
s2n_sum = s2n_sum2 = s2n_ncount = 0.0;
//printf("\t DCD ON!!");
// Set DCD to OFF only if seen 6 bit-shifts in a row. (prevent false-triggers and data loss mid-stream)
} else if ( 0 == set_dcd ) {
if (++dcdOFFcounter > 5) {
dcdOFFcounter = 0;
dcd = false;
acquire = 0;
quality = cmplx (0.0, 0.0);
//printf("\t DCD OFF!!!!!!!!!");
}
}
if (_pskr) {
rx_pskr(softbit);
set_phase(phase, norm(quality), dcd);
} else if (dcd == true) {
set_phase(phase, norm(quality), dcd);
if (!_disablefec && (_16psk || _8psk || _xpsk) ) {
int bitmask = 1;
unsigned char xsoftsymbols[symbits];
if (_puncturing && _16psk) // 16psk: recover 3/4-rate punctured low-bit
rx_pskr(128);
// Soft-decode of Gray-mapped 8psk
if (_8psk) {
bool softpuncture = false;
static double lastphasequality=0;
double phasequality = fabs(cos( n/2 * phase));
phasequality = (phasequality + lastphasequality) / 2; // Differential modem: average probabilities between current and previous symbols
lastphasequality = phasequality;
int soft_qualityerror = static_cast<int>(128 - (128 * phasequality)) ;
if (soft_qualityerror > 255-25) // Prevent soft-bit wrap-around (crossing of value 128)
softpuncture = true;
else if (soft_qualityerror < 128/3) // First 1/3 of phase delta is considered a perfect signal
soft_qualityerror = 0;
else if (soft_qualityerror > 128 - (128/8) ) // Last 1/8 of phase delta triggers a puncture
softpuncture = true;
else
soft_qualityerror /= 2; // Scale the FEC error to prevent premature cutoff
if (softpuncture) {
for(int i=0; i<symbits; i++) rx_pskr(128);
} else {
int bitindex = static_cast<int>(bits);
for(int i=symbits-1; i>=0; i--) { // Use predefined Gray-mapped softbits for soft-decoding
if (graymapped_8psk_softbits[bitindex][i] > 128) // Soft-One
rx_pskr( (graymapped_8psk_softbits[bitindex][i]) - soft_qualityerror );
else // Soft-Zero
rx_pskr( (graymapped_8psk_softbits[bitindex][i]) + soft_qualityerror );
}
}
} else if (_xpsk) {
bool softpuncture = false;
static double lastphasequality=0;
double phasequality = fabs(cos( n/2 * phase));
phasequality = (phasequality + lastphasequality) / 2; // Differential modem: average probabilities between current and previous symbols
lastphasequality = phasequality;
int soft_qualityerror = static_cast<int>(128 * phasequality);
if (soft_qualityerror > 255-12) // Prevent soft-bit wrap-around (crossing of value 128)
softpuncture = true;
else if (soft_qualityerror < 128/3) // First 1/3 of phase delta is considered a perfect signal
soft_qualityerror = 0;
else if (soft_qualityerror > 128 - (128/8) ) // Last 1/8 of phase delta triggers a puncture
softpuncture = true;
else
soft_qualityerror /= 2; // Scale the FEC error to prevent premature cutoff
if (softpuncture) {
for(int i=0; i<symbits; i++) rx_pskr(128);
} else {
int bitindex = static_cast<int>(bits);
for(int i=symbits-1; i>=0; i--) { // Use predefined Gray-mapped softbits for soft-decoding
if (graymapped_xpsk_softbits[bitindex][i] > 128) // soft-one
rx_pskr(graymapped_xpsk_softbits[bitindex][i] - soft_qualityerror); // Feed to the PSKR FEC decoder, one bit at a time.
else // soft-zero
rx_pskr(graymapped_xpsk_softbits[bitindex][i] + soft_qualityerror); // Feed to the PSKR FEC decoder, one bit at a time.
}
}
} else if (_16psk) {
bool softpuncture = false;
static double lastphasequality=0;
double phasequality = fabs(cos( n/2 * phase));
phasequality = (phasequality + lastphasequality) / 2; // Differential modem: average probabilities between current and previous symbols
lastphasequality = phasequality;
int soft_qualityerror = static_cast<int>(128 * phasequality);
if (soft_qualityerror > 255-25) // Prevent soft-bit wrap-around (crossing of value 128)
softpuncture = true;
else if (soft_qualityerror < 128/3) // First 1/3 of phase delta is considered a perfect signal
soft_qualityerror = 0;
else if (soft_qualityerror > 128 - (128/14) ) // Last 1/14 of phase delta triggers a puncture
softpuncture = true;
else
soft_qualityerror /= 2; // Scale the FEC error to prevent premature cutoff
if (softpuncture) {
for(int i=0; i<symbits; i++) rx_pskr(128);
} else {
int bitindex = static_cast<int>(bits);
for(int i=symbits-1; i>=0; i--) { // Use predefined Gray-mapped softbits for soft-decoding
if (graymapped_16psk_softbits[bitindex][i] > 128) // soft-one
rx_pskr(graymapped_16psk_softbits[bitindex][i] - soft_qualityerror); // Feed to the PSKR FEC decoder, one bit at a time.
else // soft-zero
rx_pskr(graymapped_16psk_softbits[bitindex][i] + soft_qualityerror); // Feed to the PSKR FEC decoder, one bit at a time.
}
}
} else {
//Hard Decode Section
for(int i=0; i<symbits; i++) { // Hard decode symbits into soft-symbols
xsoftsymbols[i] = (bits & bitmask) ? 255 : 0 ;
rx_pskr(xsoftsymbols[i]); // Feed to the PSKR FEC decoder, one bit at a time.
bitmask = bitmask << 1;
}
}
if (_puncturing) rx_pskr(128); // x/8/16psk: Recover punctured high bit
} else if (_16psk || _8psk || _xpsk) {
// Decode symbol one bit at a time
int bitmask = 1;
for (int i = 0; i < symbits; i++) {
rx_bit( ((bits) & bitmask) );
bitmask = bitmask << 1;
}
} else if (_qpsk)
rx_qpsk(bits);
else
rx_bit(!bits); //default to BPSK
}
}
static double e0, e1, e2, e3;
void psk::signalquality()
{
double r0 = re_Gbin[0]->mag();
double r1 = re_Gbin[1]->mag();
double r2 = re_Gbin[2]->mag();
double r3 = re_Gbin[3]->mag();
double i0 = im_Gbin[0]->mag();
double i1 = im_Gbin[1]->mag();
double i2 = im_Gbin[2]->mag();
double i3 = im_Gbin[3]->mag();
r0 = sqrtf(r0*r0 + i0*i0);
r1 = sqrtf(r1*r1 + i1*i1);
r2 = sqrtf(r2*r2 + i2*i2);
r3 = sqrtf(r3*r3 + i3*i3);
e0 = e0_filt->run(r0);
e1 = e1_filt->run(r1);
e2 = e2_filt->run(r2);
e3 = e3_filt->run(r3);
if (e1 > e0) {
if ((e1 > 2 * e2) && (e2 > 0)) {
snratio = e1 / e2;
if (snratio < 1.0)
snratio = 1.0;
} else
snratio = 1.0;
} else {
if ((e0 > 2 * e2) && (e2 > 0)) {
snratio = e0 / e2;
if (snratio < 1.0) snratio = 1.0;
} else
snratio = 1.0;
}
if ( (e1 > 2 * e3) && (e3 > 2 * e2) ) {
imdratio = e3 / e1;
if (imdratio < (1.0 /snratio)) imdratio = 1.0 / snratio;
} else
imdratio = 1.0 / snratio ;
displaysn = false;
if (snratio > 4)
displaysn = true;
if (r0 > r1) {
if ((r0 / r2 < 0.1 * snratio ) || (r0 / r2 < 2.0)) {
displaysn = false;
}
} else {
if ((r1 / r2 < 0.1 * snratio ) || (r1 / r2 < 2.0)) {
displaysn = false;
}
}
}
void psk::update_syncscope()
{
static char msg1[16];
static char msg2[16];
display_metric(metric);
if (displaysn && mode == MODE_PSK31) {
memset(msg1, 0, sizeof(msg1));
memset(msg2, 0, sizeof(msg2));
s2n = 10.0*log10( snratio );
if (s2n < 6)
strcpy(msg1, "S/N ---");
else
snprintf(msg1, sizeof(msg1), "S/N %2.0f dB", s2n);
put_Status1(
msg1,
progdefaults.StatusTimeout,
progdefaults.StatusDim ? STATUS_DIM : STATUS_CLEAR);
imd = 10.0*log10( imdratio );
if (imd > -10)
strcpy(msg2, "IMD ---");
else
snprintf(msg2, sizeof(msg2), "IMD %2.0f dB", imd);
put_Status2(
msg2,
progdefaults.StatusTimeout,
progdefaults.StatusDim ? STATUS_DIM : STATUS_CLEAR);
} else if (_xpsk || _8psk || _16psk) {
// Only update the GUI once every dcdbits/4 function calls
// to prevent high CPU load from high-baudrate modes
static int counter=0;
if (counter++ < dcdbits/4)
return;
else counter = 0;
memset(msg1, 0, sizeof(msg1));
memset(msg2, 0, sizeof(msg2));
s2n = 10.0*log10( snratio );
if (s2n < 0)
strcpy(msg1, "S/N ---");
else
snprintf(msg1, sizeof(msg1), "S/N %2.0f dB", s2n);
put_Status1(
msg1,
progdefaults.StatusTimeout,
progdefaults.StatusDim ? STATUS_DIM : STATUS_CLEAR);
// Display the phase-error of the
snprintf(msg2, sizeof(msg2), "Phase: %d%%", get_quality() );
put_Status2(
msg2,
progdefaults.StatusTimeout,
progdefaults.StatusDim ? STATUS_DIM : STATUS_CLEAR);
} else if (displaysn) {
// Only update the GUI once every dcdbits/4 function calls
// to prevent high CPU load from high-baudrate modes
static int counter=0;
if (counter++ < dcdbits/4)
return;
else counter = 0;
memset(msg1, 0, sizeof(msg1));
memset(msg2, 0, sizeof(msg2));
s2n = 10.0*log10( snratio );
if (s2n < 0)
strcpy(msg1, "S/N ---");
else
snprintf(msg1, sizeof(msg1), "S/N %2.0f dB", s2n);
put_Status1(
msg1,
progdefaults.StatusTimeout,
progdefaults.StatusDim ? STATUS_DIM : STATUS_CLEAR);
// Display the phase-error of the
snprintf(msg2, sizeof(msg2), "Phase: %d%%", get_quality() );
put_Status2(
msg2,
progdefaults.StatusTimeout,
progdefaults.StatusDim ? STATUS_DIM : STATUS_CLEAR);
}
}
char bitstatus[100];
int psk::rx_process(const double *buf, int len)
{
double delta[MAX_CARRIERS], frequencies[MAX_CARRIERS];
cmplx z, z2[MAX_CARRIERS];
bool can_rx_symbol = false;
if (viewer_mode()) {
if (!progdefaults.report_when_visible ||
dlgViewer->visible() || progStatus.show_channels )
if (pskviewer && !bHistory)
pskviewer->rx_process(buf, len);
if (evalpsk)
evalpsk->sigdensity();
}
frequencies[0] = frequency + ((-1 * numcarriers) + 1) * inter_carrier / 2;
delta[0] = TWOPI * frequencies[0] / samplerate;
for (int car = 1; car < numcarriers; car++) {
frequencies[car] = frequencies[car - 1] + inter_carrier;
delta[car] = TWOPI * frequencies[car] / samplerate;
}
while (len-- > 0) {
for (int car = 0; car < numcarriers; car++) {
// Mix with the internal NCO
z = cmplx ( *buf * cos(phaseacc[car]), *buf * sin(phaseacc[car]) );
if (numcarriers == 1 && vestigial && progdefaults.pskpilot) {
vestigial_sfft->run(z, sfft_bins, 1);
}
else if (numcarriers > 1 && vestigial && car == 0) {
vestigial_sfft->run(z, sfft_bins, 1);
}
phaseacc[car] += delta[car];
if (phaseacc[car] > TWOPI) phaseacc[car] -= TWOPI;
// Filter and downsample
// by 16 (psk31, qpsk31)
// by 8 (psk63, qpsk63)
// by 4 (psk125, qpsk125)
// by 2 (psk250, qpsk250)
// by 1 (psk500, qpsk500) = no down sampling
// first filter
if (fir1[car]->run( z, z )) { // fir1 returns true every Nth sample
// final filter
fir2[car]->run( z, z2[car] ); // fir2 returns value on every sample
//On last carrier processing
if (car == numcarriers - 1) {
calcSN_IMD(z); //JD OR all carriers together check logic???
/**
* This is the symbol timing recovery mechanism. After the demodulated
* signal is processed by the matched filters, the signal lobes are
* expected to have been modified to a fairly symmetric shape. The
* magnitude of the samples are taken, thus rectifying the signal to
* positive values. "bitclk" is a counter that is very close in rate to
* (samples / symbol). Its purpose is to repeatedly "draw" one symbol
* waveform in the syncbuf array, according to its amplitude (not phase).
*/
int idx = (int) bitclk;
double sum = 0.0;
double ampsum = 0.0;
for (int ii = 0; ii < numcarriers; ii++) {
sum += abs(z2[ii])/numcarriers;
}
// syncbuf[idx] = 0.8 * syncbuf[idx] + 0.2 * z2[car].mag();
syncbuf[idx] = 0.8 * syncbuf[idx] + 0.2 * sum;
sum = 0.0;
double bitsteps = (symbollen >= 16 ? 16 : symbollen);
int symsteps = (int) (bitsteps / 2);
/**
* Here we sum up the difference between each sample's magnitude in the
* lower half of the array with its counterpart on the upper half of the
* array, or the other side of the waveform. Each pair's difference is
* divided by their sum, scaling it so that the signal amplitude does not
* affect the result. When the differences are summed, it gives an
* indication of which side is larger than the other.
*/
for (int i = 0; i < symsteps; i++) {
sum += (syncbuf[i] - syncbuf[i+symsteps]);
ampsum += (syncbuf[i] + syncbuf[i+symsteps]);
}
// added correction as per PocketDigi
sum = (ampsum == 0 ? 0 : sum / ampsum);
/**
* If the lower side is larger (meaning that the waveform is shifted in that
* direction), then the sum is negative, and bitclk needs to be adjusted to
* be a little faster, so that the next drawing of the waveform in syncbuf
* will be shifted right. Conversely, if the sum is positive, then it needs
* to slow down bitclk so that the waveform is shifted left. Thus the
* error is subtracted from bitclk, rather than added. The goal is to
* get the error as close to zero as possible, so that the receiver is
* exactly synced with the transmitter and the waveform is exactly in
* the middle of syncbuf.
*/
// bitclk -= sum / 5.0;
bitclk -= sum / (5.0 * 16 / bitsteps);
bitclk += 1;
/**
* When bitclock reaches the end of the buffer, then a complete waveform
* has been received. It is time to output the current sample and wrap
* around to the next cycle.
*
* There is a complete symbol waveform in syncbuf, so that each
* sample[0..N/2-1] is very close in amplitude with the corresponding
* sample in [N/2..N-1].
*
* | ******** ******** |
* | **** **** **** **** |
* | *** *** *** *** |
* | ** ** ** ** |
* | * * * * |
* | * * * * |
* |* * *|
* |_______________________________________________________________|
* 0 N/2 N-1
*
* === or some variation of it .... ===
*
* |**** ******** *****|
* | **** **** **** **** |
* | *** *** *** *** |
* | ** ** ** ** |
* | * * * * |
* | * * * * |
* | * * |
* |_______________________________________________________________|
* 0 N/2 N-1
*
* A t the end of this cycle, bitclk is pointing at a sample which will
* have the maximum phase difference, if any, from the previous symbol's
* phase.
*
*/
if (bitclk < 0) bitclk += bitsteps;
if (bitclk >= bitsteps) {
bitclk -= bitsteps;
can_rx_symbol = true;
update_syncscope();
afc();
}
}
}
}
if (can_rx_symbol) {
for (int car = 0; car < numcarriers; car++) {
rx_symbol(z2[car], car);
}
can_rx_symbol = false;
}
buf++;
}
if (sigsearch)
findsignal();
else if (mailserver) {
if (waitcount > 0) {
--waitcount;
if (waitcount == 0) {
if (progdefaults.PSKmailSweetSpot) {
frequency = progdefaults.PSKsweetspot;
set_freq(frequency);
}
sigsearch = SIGSEARCH;
}
}
else if ( snratio <= 1.0) {
waitcount = 8;
sigsearch = 0;
}
}
return 0;
}
//=====================================================================
// transmit processes
//=====================================================================
void psk::transmit(double *buf, int len)
{
ModulateXmtr(buf, len);
}
#define SVP_MASK 0xF
#define SVP_COUNT (SVP_MASK + 1)
static cmplx sym_vec_pos[SVP_COUNT] = {
cmplx (-1.0, 0.0), // 180 degrees
cmplx (-0.9238, -0.3826), // 202.5 degrees
cmplx (-0.7071, -0.7071), // 225 degrees
cmplx (-0.3826, -0.9238), // 247.5 degrees
cmplx (0.0, -1.0), // 270 degrees
cmplx (0.3826, -0.9238), // 292.5 degrees
cmplx (0.7071, -0.7071), // 315 degrees
cmplx (0.9238, -0.3826), // 337.5 degrees
cmplx (1.0, 0.0), // 0 degrees
cmplx (0.9238, 0.3826), // 22.5 degrees
cmplx (0.7071, 0.7071), // 45 degrees
cmplx (0.3826, 0.9238), // 67.5 degrees
cmplx (0.0, 1.0), // 90 degrees
cmplx (-0.3826, 0.9238), // 112.5 degrees
cmplx (-0.7071, 0.7071), // 135 degrees
cmplx (-0.9238, 0.3826) // 157.5 degrees
};
void psk::tx_carriers()
{
double delta[MAX_CARRIERS];
double ival, qval, shapeA, shapeB;
cmplx symbol;
double frequencies[MAX_CARRIERS];
//Process all carrier's symbols, then submit to sound card
accumulated_bits = 0; //reset
frequencies[0] = get_txfreq_woffset() + ((-1 * numcarriers) + 1) * inter_carrier / 2;
delta[0] = TWOPI * frequencies[0] / samplerate;
for (int car = 1; car < symbols; car++) {
frequencies[car] = frequencies[car - 1] + inter_carrier;
delta[car] = TWOPI * frequencies[car] / samplerate;
}
int sym;
for (int car = 0; car < symbols; car++) {
sym = txsymbols[car];
if (_xpsk && !_disablefec) { // Use Gray-mapped xpsk constellation
symbol = prevsymbol[car] * graymapped_xpsk_pos[(sym & 3)]; // complex multiplication
} else if (_8psk && !_disablefec) { // Use Gray-mapped 8psk constellation
symbol = prevsymbol[car] * graymapped_8psk_pos[(sym & 7)]; // complex multiplication
} else if (_16psk && !_disablefec) { // Use Gray-mapped 16psk constellation
symbol = prevsymbol[car] * graymapped_16psk_pos[(sym & 15)]; // complex multiplication
} else { // Map the incoming symbols to the underlying 16psk constellation.
if (_xpsk) {
sym = sym * 4 + 2; // Give it the "X" constellation shape
} else if (_8psk) {
sym *= 2; // Map 8psk to 16psk
} else { // BPSK and QPSK
if (_qpsk && !reverse) {
sym = (4 - sym) & 3;
}
sym *= 4; // For BPSK and QPSK
}
symbol = prevsymbol[car] * sym_vec_pos[(sym & SVP_MASK)]; // complex multiplication
}
for (int i = 0; i < symbollen; i++) {
shapeA = tx_shape[i];
if (test_signal_window && test_signal_window->visible() && btn_imd_on->value()) {
double imd = pow(10, xmtimd->value()/20.0);
shapeA -= (imd * imd_shape[i]);
}
shapeB = (1.0 - shapeA);
ival = shapeA * prevsymbol[car].real() + shapeB * symbol.real();
qval = shapeA * prevsymbol[car].imag() + shapeB * symbol.imag();
if (car != 0) {
outbuf[i] += (ival * cos(phaseacc[car]) + qval * sin(phaseacc[car])) / numcarriers;
} else {
outbuf[i] = (ival * cos(phaseacc[car]) + qval * sin(phaseacc[car])) / numcarriers;
}
phaseacc[car] += delta[car];
if (phaseacc[car] > TWOPI) phaseacc[car] -= TWOPI;
}
prevsymbol[car] = symbol;
}
double amp=0;
bool tx_vestigial = false;
if (vestigial && progdefaults.pskpilot) {
tx_vestigial = true;
amp = pow(10, progdefaults.pilot_power / 20.0) * maxamp;
}
if (tx_vestigial) {
double dvp = TWOPI * (frequencies[0] - sc_bw) / samplerate;
for (int i = 0; i < symbollen; i++) {
outbuf[i] += amp * cos(vphase);
outbuf[i] /= (1 + amp);
vphase += dvp;
if (vphase > TWOPI) vphase -= TWOPI;
}
}
maxamp = 0;
for (int i = 0; i < symbollen; i++)
if (maxamp < fabs(outbuf[i])) maxamp = fabs(outbuf[i]);
if (maxamp) {
for (int i = 0; i < symbollen; i++)
outbuf[i] /= maxamp;
}
transmit(outbuf, symbollen);
}
void psk::tx_symbol(int sym)
{
acc_symbols++;
txsymbols[symbols] = sym;
if (++symbols < numcarriers) {
return;
}
tx_carriers();
symbols = 0; //reset
}
void psk::tx_bit(int bit)
{
unsigned int sym;
static int bitcount=0;
static int xpsk_sym=0;
// qpsk transmission
if (_qpsk) {
sym = enc->encode(bit);
sym = sym & 3;//JD just to make sure
tx_symbol(sym);
// pskr (fec + interleaver) transmission
} else if (_pskr) {
// Encode into two bits
bitshreg = enc->encode(bit);
// pass through interleaver
if (mode != MODE_PSK63F) Txinlv->bits(&bitshreg);
// Send low bit first. tx_symbol expects 0 or 2 for BPSK
sym = (bitshreg & 1) << 1;
tx_symbol(sym);
sym = bitshreg & 2;
tx_symbol(sym);
} else if (_16psk || _8psk || _xpsk) {
if (_disablefec) {
//Accumulate tx bits until the correct number for symbol-size is reached
xpsk_sym |= bit << bitcount++ ;
if (bitcount == symbits) {
tx_symbol(xpsk_sym);
xpsk_sym = bitcount = 0;
}
} else
tx_xpsk(bit);
// else normal bpsk transmission
} else {
sym = bit << 1;
tx_symbol(sym);
}
}
void psk::tx_xpsk(int bit)
{
static int bitcount = 0;
static unsigned int xpsk_sym = 0;
int fecbits = 0;
// If invalid value of bitcount, reset to 0
if ( (_8psk && _puncturing) || _xpsk || _16psk)
if ( (bitcount & 0x1) )
bitcount = 0;
// Pass one bit and return two bits
bitshreg = enc->encode(bit);
// Interleave
Txinlv->bits(&bitshreg); // Bit-interleave
fecbits = bitshreg;
if (_xpsk) { // 2 bits-per-symbol. Transmit every call
xpsk_sym = static_cast<unsigned int>(fecbits);
tx_symbol(xpsk_sym);
return;
}
else if (_8psk && _puncturing) { // @ 2/3 rate
if ( 0 == bitcount) {
xpsk_sym = static_cast<unsigned int>(fecbits);
bitcount = 2;
return;
} else if ( 2 == bitcount ) {
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 1) << 2 ;
/// Punctured anyways, so skip -> //xpsk_sym |= (static_cast<unsigned int>(fecbits) & 2) << 2 ;
tx_symbol(xpsk_sym & 7); /// Drop/puncture the high-bit on Tx
xpsk_sym = bitcount = 0;
return;
}
}
else if (_8psk) { // 3 bits-per-symbol. Accumulate then tx.
if ( 0 == bitcount ) { // Empty xpsk_sym buffer: add 2 bits and return
xpsk_sym = static_cast<unsigned int>(fecbits);
bitcount = 2;
return ;
} else if ( 1 == bitcount ) { // xpsk_sym buffer with one bit: add 2 bits then tx and clear
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 1) << 1 ;
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 2) << 1 ;
tx_symbol(xpsk_sym);
xpsk_sym = bitcount = 0;
return;
} else if ( 2 == bitcount ) { // xpsk_sym buffer with 2 bits: add 1 then tx and save next bit
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 1) << 2 ;
tx_symbol(xpsk_sym);
xpsk_sym = bitcount = 0;
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 2) >> 1 ;
bitcount = 1;
return;
}
}
else if (_puncturing && _16psk) { // @ 3/4 Rate
if ( 0 == bitcount) {
xpsk_sym = static_cast<unsigned int>(fecbits);
bitcount = 2;
return;
} else if ( 2 == bitcount ) {
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 1) << 2 ;
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 2) << 2 ;
bitcount = 4;
return;
} else if ( 4 == bitcount ) {
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 1) << 4 ;
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 2) << 4 ;
xpsk_sym >>= 1; // Shift right to drop the lowest bit
xpsk_sym &= 15; // Drop the highest bit
tx_symbol(xpsk_sym);
xpsk_sym = bitcount = 0;
return;
}
}
else if (_16psk) { // 4 bits-per-symbol. Transmit every-other run.
if ( 0 == bitcount) {
xpsk_sym = static_cast<unsigned int>(fecbits);
bitcount = 2;
return;
} else if ( 2 == bitcount ) {
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 1) << 2 ;
xpsk_sym |= (static_cast<unsigned int>(fecbits) & 2) << 2 ;
//Txinlv->bits(&xpsk_sym);
tx_symbol(xpsk_sym & 7);
xpsk_sym = bitcount = 0;
return;
}
}
}
unsigned char ch;
void psk::tx_char(unsigned char c)
{
ch = c;
const char *code;
char_symbols = acc_symbols;
if (_pskr || _xpsk || _8psk || _16psk) {
// acc_symbols = 0;
// ARQ varicode instead of MFSK for PSK63FEC
code = varienc(c);
} else {
code = psk_varicode_encode(c);
}
while (*code) {
tx_bit((*code - '0'));
code++;
}
// Insert PSK varicode character-delimiting bits
if (! _pskr && !_xpsk && !_8psk && !_16psk) {
tx_bit(0);
tx_bit(0);
}
char_symbols = acc_symbols - char_symbols;
}
void psk::tx_flush()
{
sig_start = false;
if (_pskr) {
ovhd_symbols = ((numcarriers - symbols) % numcarriers);
//VK2ETA replace with a more effective flushing sequence (avoids cutting the last characters in low s/n)
for (int i = 0; i < ovhd_symbols/2; i++) tx_bit(0);
for (int i = 0; i < dcdbits / 2; i++) {
tx_bit(1);
if (i == dcdbits/2 - 1) sig_stop = true;
tx_bit(1);
}
// QPSK - flush the encoder
} else if (_qpsk) {
for (int i = 0; i < dcdbits; i++) {
if (i == dcdbits - 1) sig_stop = true;
tx_bit(0);
}
// FEC enabled: Sens the NULL character in MFSk varicode as the flush / post-amble sequence
} else if (!_disablefec && (_xpsk || _8psk || _16psk) ) {
for (int i=0; i<flushlength; i++) {
if (i == flushlength - 1) sig_stop = true;
tx_char(0); // Send <NUL> to clear bit accumulators on both Tx and Rx ends.
}
// FEC disabled: use unmodulated carrier (bpsk-like single tone)
} else if (_disablefec && ( _xpsk || _8psk || _16psk) ) {
for (int i=0; i<symbits; i++) {
if (i == symbits - 1) sig_stop = true;
tx_char(0); // Send <NUL> to clear bit accumulators on both Tx and Rx ends.
}
int symbol;
if (_16psk) symbol = 8;
else if (_8psk) symbol = 4;
else symbol = 2; // xpsk
for (int i = 0; i <= 96; i++) { // DCD window is only 32-bits wide. Send 3-times
if (i == 95) sig_stop = true;
tx_symbol(symbol);
}
// Standard BPSK postamble
} else {
for (int i = 0; i < dcdbits; i++) {
if (i == dcdbits - 1) sig_stop = true;
tx_symbol(2); // 0 degrees
}
}
for (int i = 0; i < 2048; i++) outbuf[i] = 0;
transmit(outbuf, 2048);
}
// Necessary to clear the interleaver before we start sending
void psk::clearbits()
{
bitshreg = 0;
enc->init();
Txinlv->flush();
}
int psk::tx_process()
{
modem::tx_process();
if (preamble) {
if (_pskr) {
if (mode != MODE_PSK63F)
clearbits();
// FEC prep the encoder with one/zero sequences of bits
sig_start = true;
sig_stop = false;
for (int i = 0; i < preamble/2; i++) {
tx_bit(1);
tx_bit(0);
}
// FEC: Mark start of first character with a double zero
// to ensure sync at end of preamble
while (acc_symbols % numcarriers) tx_bit(0);
tx_char(0); // <NUL>
preamble = 0;
return 0;
} else if (mode == MODE_OFDM_500F || mode == MODE_OFDM_750F || mode == MODE_OFDM_2000F) {
// RSID is used for frequency-setting and AFC: no preamble needed or used. Just send a header.
clearbits();
sig_start = true;
sig_stop = false;
for (int i=0; i<5; i++)
tx_char(0); // Send 4 <NUL> characters as both sacrificial-header and pad-to-ramp-up-the-FEC.
tx_char(10); // <LF> newline as first character
preamble = 0;
return 0;
} else if (_8psk) {
if (!_disablefec) clearbits();
if(progStatus.psk8DCDShortFlag)
if (preamble > 96) preamble = 96;
if (_disablefec) {
// Send continuous symbol 0: Usual PSK 2-tone preamble
sig_start = true;
sig_stop = false;
for (int i = 0; i < preamble; i++ )
tx_symbol(0);
tx_char(0);
preamble = 0;
return 0;
} else {
_disablefec = true;
for (int i = 0; i < preamble/2; i++) tx_symbol(0);
_disablefec = false;
// FEC prep the encoder with encoded sequence of double-zeros
// sends a single centered preamble tone for FEC modes
sig_start = true;
sig_stop = false;
for (int i = 0; i < preamble; i += 2) {
tx_bit(0);
tx_bit(0);
}
tx_char(0);
preamble = 0;
return 0;
}
} else {
// Standard BPSK/QPSK/xPSK preamble
sig_start = true;
sig_stop = false;
for (int i = 0; i < preamble; i++) {
tx_symbol(0); // send phase reversals
}
preamble = 0;
return 0;
}
}
int c = get_tx_char();
if (c == GET_TX_CHAR_ETX || stopflag) {
tx_flush();
stopflag = false;
char_samples = char_symbols * symbollen / numcarriers;
xmt_samples = acc_symbols * symbollen / numcarriers;
ovhd_samples = (acc_symbols - char_symbols - ovhd_symbols) * symbollen / numcarriers;
return -1; // we're done
}
if (c == GET_TX_CHAR_NODATA) {
if (_pskr || _xpsk || _8psk || _16psk) {
// MFSK varicode instead of psk
tx_char(0); // <NUL>
tx_bit(1);
// extended zero bit stream
for (int i = 0; i < 32; i++)
tx_bit(0);
} else {
tx_bit(0);
}
} else {
tx_char(c);
put_echo_char(c);
}
return 0;
}
//============================================================================
// psk signal evaluation
// using Goertzel IIR filter
// derived from pskcore by Moe Wheatley, AE4JY
//============================================================================
static bool reset_filters;
void psk::initSN_IMD()
{
reset_filters = true;
}
void psk::resetSN_IMD()
{
reset_filters = true;
}
//============================================================================
// This routine calculates the energy in the frequency bands of
// carrier = base (0), fundamental = F1(15.625), noise = F2(31.25), and
// 3rd order product = F3(46.875)
// It is called with cmplx data samples at 500 Hz.
//============================================================================
void psk::calcSN_IMD(cmplx z)
{
if (!re_Gbin[0]) return;
if (reset_filters) {
e0_filt->reset();
e1_filt->reset();
e2_filt->reset();
e3_filt->reset();
for(int i = 0; i < NUM_FILTERS; i++) {
re_Gbin[i]->reset();
im_Gbin[i]->reset();
}
reset_filters = false;
}
bool isvalid = true;
for (int i = 0; i < NUM_FILTERS; i++) {
isvalid &= re_Gbin[i]->run(real(z));
isvalid &= im_Gbin[i]->run(imag(z));
}
if (isvalid) {
signalquality();
for (int i = 0; i < NUM_FILTERS; i++) {
re_Gbin[i]->reset();
im_Gbin[i]->reset();
}
}
return;
}
| 72,887
|
C++
|
.cxx
| 2,385
| 27.308595
| 139
| 0.619908
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,085
|
record_browse.cxx
|
w1hkj_fldigi/src/dialogs/record_browse.cxx
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#include "gettext.h"
#include "record_browse.h"
#include <config.h>
Fl_Group *tabDataFiles=(Fl_Group *)0;
Fl_Input_Choice *inpDataSources=(Fl_Input_Choice *)0;
Fl_Light_Button *btnDataSourceUpdate=(Fl_Light_Button *)0;
static void cb_btnDataSourceUpdate(Fl_Light_Button*, void*) {
DerivedRecordLst::cbGuiUpdate();
}
Fl_Button *btnDataSourceReset=(Fl_Button *)0;
static void cb_btnDataSourceReset(Fl_Button*, void*) {
DerivedRecordLst::cbGuiReset();
}
Fl_Double_Window* make_record_loader_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(540, 280, _("Data files sources"));
w = o; if (w) {/* empty */}
o->tooltip(_("Data files update"));
{ tabDataFiles = new Fl_Group(3, 18, 535, 255);
tabDataFiles->tooltip(_("Tabular data sources"));
{ DerivedRecordLst* o = new DerivedRecordLst(4, 18, 529, 217, _("Data files sources"));
o->box(FL_THIN_DOWN_FRAME);
o->color(FL_BACKGROUND_COLOR);
o->selection_color(FL_BACKGROUND_COLOR);
o->labeltype(FL_NO_LABEL);
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_FOREGROUND_COLOR);
o->align(Fl_Align(FL_ALIGN_TOP));
o->when(FL_WHEN_RELEASE);
o->end();
Fl_Group::current()->resizable(o);
} // DerivedRecordLst* o
{ inpDataSources = new Fl_Input_Choice(4, 247, 284, 21, _("Data source"));
inpDataSources->tooltip(_("Data files repository"));
inpDataSources->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Input_Choice* inpDataSources
{ btnDataSourceUpdate = new Fl_Light_Button(385, 247, 74, 20, _("Update"));
btnDataSourceUpdate->tooltip(_("Update selected local data files with repository content"));
btnDataSourceUpdate->callback((Fl_Callback*)cb_btnDataSourceUpdate);
} // Fl_Light_Button* btnDataSourceUpdate
{ btnDataSourceReset = new Fl_Button(463, 247, 70, 20, _("Reset"));
btnDataSourceReset->tooltip(_("Delete local data files if selected."));
btnDataSourceReset->callback((Fl_Callback*)cb_btnDataSourceReset);
} // Fl_Button* btnDataSourceReset
tabDataFiles->end();
Fl_Group::current()->resizable(tabDataFiles);
} // Fl_Group* tabDataFiles
o->end();
} // Fl_Double_Window* o
return w;
}
| 2,373
|
C++
|
.cxx
| 53
| 39.207547
| 100
| 0.666955
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,086
|
font_browser.cxx
|
w1hkj_fldigi/src/dialogs/font_browser.cxx
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <string>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <iostream>
#include <list>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <FL/Fl.H>
#include <FL/Fl_Color_Chooser.H>
#include <FL/fl_draw.H>
#include "font_browser.h"
#include "flslider2.h"
#include "gettext.h"
#include "threads.h"
#include "debug.h"
void find_fonts();
Font_Browser* font_browser;
int Font_Browser::instance = 0;
int *Font_Browser::fixed = 0;
int Font_Browser::numfonts = 0;
Font_Browser::font_pair *Font_Browser::font_pairs = 0;
static int font_compare(const void *p1, const void *p2)
{
std::string s1 = *((const Font_Browser::font_pair *)p1)->name;
std::string s2 = *((const Font_Browser::font_pair *)p2)->name;
return strcasecmp( s1.c_str(), s2.c_str() );
}
// Font Color selected
void Font_Browser::ColorSelect()
{
unsigned char r, g, b;
Fl::get_color(fontcolor, r, g, b);
if (fl_color_chooser(_("Font color"), r, g, b) == 0)
return;
fontcolor = fl_rgb_color(r, g, b);
btn_Color->color(fontcolor);
btn_Color->labelcolor( fl_contrast(FL_BLACK, fontcolor));
}
void Font_Browser::fb_callback(Fl_Widget* w, void* arg)
{
Font_Browser* fb = reinterpret_cast<Font_Browser*>(arg);
if (w == fb->btn_fixed) {
if (fb->btn_fixed->value())
fb->fontFilter(FIXED_WIDTH);
else
fb->fontFilter(ALL_TYPES);
return;
}
if (w == fb->btn_Cancel)
fb->hide();
else if (w == fb->btn_OK) {
if (fb->callback_)
(*fb->callback_)(fb, fb->data_);
}
else if (w == fb->btn_Color)
fb->ColorSelect();
else if (w == fb->lst_Font)
fb->FontNameSelect();
else {
if (w == fb->lst_Size)
fb->txt_Size->value(strtol(fb->lst_Size->text(fb->lst_Size->value()), NULL, 10));
fb->fontsize = static_cast<int>(fb->txt_Size->value());
}
fb->box_Example->SetFont(fb->fontnbr, fb->fontsize, fb->fontcolor);
}
// Font Name changed callback
void Font_Browser::FontNameSelect()
{
int fn = lst_Font->value();
if (!fn)
return;
fontnbr = (Fl_Font)reinterpret_cast<intptr_t>(lst_Font->data(fn));
// get sizes and fill browser; skip first element if it is zero
lst_Size->clear();
int nsizes, *sizes;
char buf[4];
nsizes = Fl::get_font_sizes(fontnbr, sizes);
//
for (int i = !*sizes; i < nsizes; i++)
if ((size_t)snprintf(buf, sizeof(buf), "%d", sizes[i]) < sizeof(buf))
lst_Size->add(buf, reinterpret_cast<void*>(sizes[i]));
// scalable font with no suggested sizes
if (!lst_Size->size()) {
for (int i = 1; i <= 48; i++) {
snprintf(buf, sizeof(buf), "%d", i);
lst_Size->add(buf, reinterpret_cast<void*>(i));
}
}
fontSize(fontsize);
}
Font_Browser::Font_Browser(int x, int y, int w, int h, const char *lbl )
: Fl_Window(x, y, w, h, lbl)
{
lst_Font = new Fl_Browser(5, 15, 280, 125, _("Font:"));
lst_Font->align(FL_ALIGN_TOP_LEFT);
lst_Font->type(FL_HOLD_BROWSER);
lst_Font->callback(fb_callback, this);
txt_Size = new Fl_Value_Input2(290, 15, 50, 22, _("Size:"));
txt_Size->align(FL_ALIGN_TOP_LEFT);
txt_Size->range(1.0, 48.0);
txt_Size->step(1.0);
txt_Size->callback(fb_callback, this);
lst_Size = new Fl_Browser(290, 40, 50, 100);
lst_Size->type(FL_HOLD_BROWSER);
lst_Size->callback(fb_callback, this);
btn_fixed = new Fl_Check_Button(345, 15, 18, 18, _("Fixed"));
btn_fixed->callback(fb_callback, this);
btn_fixed->value(0);
btn_OK = new Fl_Return_Button(345, 40, 80, 25, _("&OK"));
btn_OK->shortcut(0x8006f);
btn_OK->callback(fb_callback, this);
btn_Cancel = new Fl_Button(345, 70, 80, 25, _("Cancel"));
btn_Cancel->labelsize(12);
btn_Cancel->callback(fb_callback, this);
btn_Color = new Fl_Button(345, 100, 80, 25, _("Color"));
btn_Color->down_box(FL_BORDER_BOX);
btn_Color->color(FL_FOREGROUND_COLOR);
btn_Color->labelcolor( fl_contrast(FL_BLACK, FL_FOREGROUND_COLOR));
btn_Color->callback(fb_callback, this);
box_Example = new Preview_Box(5, 145, 420, 75,
_("\
abcdefghijklmnopqrstuvwxyz\n\
ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\
0123456789"
) );
box_Example->box(FL_DOWN_BOX);
box_Example->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP|FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
resizable(box_Example);
set_modal();
end();
// Initializations
this->callback_ = 0; // Initialize Widgets callback
this->data_ = 0; // And the data
std::string fntname;
bool ok = true;
if (instance == 0) {
++instance;
numfonts = Fl::set_fonts(0); // Nr of fonts available on the server
font_pairs = new font_pair[numfonts];
fixed = new int[numfonts];
int j = 0;
for (int i = 0; i < numfonts; i++) {
fntname = Fl::get_font_name((Fl_Font)i);
ok = true;
for (size_t k = 0; k < fntname.length(); k++) {
if (fntname[k] < ' ' || fntname[k] > 'z' ||
fntname[k] == '\\' || fntname[k] == '@') { // disallowed chars in browser widget
ok = false;
break;
}
}
if (fntname.empty()) ok = false;
if (ok) {
font_pairs[j].name = new std::string;
*(font_pairs[j].name) = fntname;
font_pairs[j].nbr = i;
j++;
}
}
numfonts = j;
qsort(&font_pairs[0], numfonts, sizeof(font_pair), font_compare);
for (int i = 0; i < numfonts; i++) {
lst_Font->add((*(font_pairs[i].name)).c_str(), reinterpret_cast<void *>(font_pairs[i].nbr));
fixed[i] = 0;
}
find_fonts();
} else {
++instance;
for (int i = 0; i < numfonts; i++) {
lst_Font->add((*(font_pairs[i].name)).c_str(), reinterpret_cast<void *>(font_pairs[i].nbr));
}
}
fontnbr = FL_HELVETICA;;
fontsize = FL_NORMAL_SIZE;
fontcolor = FL_FOREGROUND_COLOR;
filter = ALL_TYPES;
lst_Font->value(1);
FontNameSelect();
xclass(PACKAGE_NAME);
}
Font_Browser::~Font_Browser()
{
--instance;
if (instance == 0) {
delete [] fixed;
fixed = 0;
delete [] font_pairs;
font_pairs = 0;
}
}
void Font_Browser::fontNumber(Fl_Font n)
{
fontnbr = n;
lst_Font->value(1);
int s = lst_Font->size();
for (int i = 1; i < s; i++ ) {
if ((Fl_Font)reinterpret_cast<intptr_t>(lst_Font->data(i)) == n) {
lst_Font->value(i);
FontNameSelect();
break;
}
}
}
void Font_Browser::fontSize(int s)
{
fontsize = s;
int n = lst_Size->size();
for (int i = 1; i < n; i++) {
if ((intptr_t)lst_Size->data(i) == fontsize) {
lst_Size->value(i);
break;
}
}
txt_Size->value(s);
}
void Font_Browser::fontColor(Fl_Color c)
{
btn_Color->color(fontcolor = c);
box_Example->SetFont(fontnbr, fontsize, fontcolor);
box_Example->redraw();
}
void Font_Browser::fontName(const char* n)
{
int s = lst_Font->size();
for (int i = 1; i < s; i++) {
if (!strcmp(lst_Font->text(i), n)) {
lst_Font->value(i);
FontNameSelect();
}
}
}
void Font_Browser::fontFilter(filter_t filter)
{
int s = lst_Font->size();
switch (filter) {
case FIXED_WIDTH:
for (int i = 0; i < s; i++) {
if (fixed[i])
lst_Font->show(i + 1);
else
lst_Font->hide(i + 1);
}
btn_fixed->value(1);
break;
case VARIABLE_WIDTH:
for (int i = 0; i < s; i++) {
if (!fixed[i])
lst_Font->show(i + 1);
else
lst_Font->hide(i + 1);
}
btn_fixed->value(0);
break;
case ALL_TYPES:
for (int i = 0; i < s; i++)
lst_Font->show(i + 1);
btn_fixed->value(0);
break;
}
lst_Font->redraw();
lst_Font->topline(lst_Font->value());
}
// separate thread used to evaluate fixed / proportional fonts
// friend of Font_Browser
// launched by Font_Browser instance 1
static pthread_t find_font_thread;
//#define FBDEBUG 1
static int is_fixed;
Fl_Font test_font;
void font_test(void *)
{
fl_font(test_font, FL_NORMAL_SIZE);
is_fixed = (fl_width(".") == fl_width("W"));
}
void *find_fixed_fonts(void *)
{
#ifdef FBDEBUG
FILE *sys_fonts = fopen("fonts.txt", "w");
fprintf(sys_fonts, "Font #, Type, Name\n");
#endif
for (int i = 0; i < Font_Browser::numfonts; i++) {
test_font = Font_Browser::font_pairs[i].nbr;
is_fixed = -1;
Fl::awake(font_test);
while (is_fixed == -1) MilliSleep(10);
Font_Browser::fixed[i] = is_fixed;
#ifdef FBDEBUG
fprintf(
sys_fonts,
"%d, %c, %s\n",
Font_Browser::font_pairs[i].nbr,
Font_Browser::fixed[i] ? 'F' : 'P',
(*(Font_Browser::font_pairs[i].name)).c_str());
#endif
}
#ifdef FBDEBUG
fclose(sys_fonts);
#endif
return NULL;
}
void find_fonts()
{
if (pthread_create(&find_font_thread, NULL, find_fixed_fonts, NULL) < 0) {
LOG_ERROR("%s", "pthread_create find_fixed_fonts failed");
}
return;
}
bool Font_Browser::fixed_width(Fl_Font f)
{
fl_font(f, FL_NORMAL_SIZE);
return fl_width(".") == fl_width("W");
}
//----------------------------------------------------------------------
Preview_Box::Preview_Box(int x, int y, int w, int h, const char* l)
: Fl_Widget(x, y, w, h, l)
{
fontName = 1;
fontSize = FL_NORMAL_SIZE;
box(FL_DOWN_BOX);
color(FL_BACKGROUND2_COLOR);
fontColor = FL_FOREGROUND_COLOR;
}
void Preview_Box::draw()
{
draw_box();
fl_font((Fl_Font)fontName, fontSize);
fl_color(fontColor);
fl_draw(label(), x()+3, y()+3, w()-6, h()-6, align());
}
void Preview_Box::SetFont(int fontname, int fontsize, Fl_Color c)
{
fontName = fontname;
fontSize = fontsize;
fontColor = c;
redraw();
}
| 9,906
|
C++
|
.cxx
| 358
| 25.377095
| 95
| 0.640831
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,087
|
guide.cxx
|
w1hkj_fldigi/src/dialogs/guide.cxx
|
const char* szBeginner = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n\
\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n\
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n\
<head>\n\
<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=UTF-8\" />\n\
<meta name=\"generator\" content=\"AsciiDoc 9.0.0rc2\" />\n\
<title>Beginners' Guide to Fldigi</title>\n\
<style type=\"text/css\">\n\
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */\n\
\n\
/* Default font. */\n\
body {\n\
font-family: Georgia,serif;\n\
}\n\
\n\
/* Title font. */\n\
h1, h2, h3, h4, h5, h6,\n\
div.title, caption.title,\n\
thead, p.table.header,\n\
#toctitle,\n\
#author, #revnumber, #revdate, #revremark,\n\
#footer {\n\
font-family: Arial,Helvetica,sans-serif;\n\
}\n\
\n\
body {\n\
margin: 1em 5% 1em 5%;\n\
}\n\
\n\
a {\n\
color: blue;\n\
text-decoration: underline;\n\
}\n\
a:visited {\n\
color: fuchsia;\n\
}\n\
\n\
em {\n\
font-style: italic;\n\
color: navy;\n\
}\n\
\n\
strong {\n\
font-weight: bold;\n\
color: #083194;\n\
}\n\
\n\
h1, h2, h3, h4, h5, h6 {\n\
color: #527bbd;\n\
margin-top: 1.2em;\n\
margin-bottom: 0.5em;\n\
line-height: 1.3;\n\
}\n\
\n\
h1, h2, h3 {\n\
border-bottom: 2px solid silver;\n\
}\n\
h2 {\n\
padding-top: 0.5em;\n\
}\n\
h3 {\n\
float: left;\n\
}\n\
h3 + * {\n\
clear: left;\n\
}\n\
h5 {\n\
font-size: 1.0em;\n\
}\n\
\n\
div.sectionbody {\n\
margin-left: 0;\n\
}\n\
\n\
hr {\n\
border: 1px solid silver;\n\
}\n\
\n\
p {\n\
margin-top: 0.5em;\n\
margin-bottom: 0.5em;\n\
}\n\
\n\
ul, ol, li > p {\n\
margin-top: 0;\n\
}\n\
ul > li { color: #aaa; }\n\
ul > li > * { color: black; }\n\
\n\
.monospaced, code, pre {\n\
font-family: \"Courier New\", Courier, monospace;\n\
font-size: inherit;\n\
color: navy;\n\
padding: 0;\n\
margin: 0;\n\
}\n\
pre {\n\
white-space: pre-wrap;\n\
}\n\
\n\
#author {\n\
color: #527bbd;\n\
font-weight: bold;\n\
font-size: 1.1em;\n\
}\n\
#email {\n\
}\n\
#revnumber, #revdate, #revremark {\n\
}\n\
\n\
#footer {\n\
font-size: small;\n\
border-top: 2px solid silver;\n\
padding-top: 0.5em;\n\
margin-top: 4.0em;\n\
}\n\
#footer-text {\n\
float: left;\n\
padding-bottom: 0.5em;\n\
}\n\
#footer-badges {\n\
float: right;\n\
padding-bottom: 0.5em;\n\
}\n\
\n\
#preamble {\n\
margin-top: 1.5em;\n\
margin-bottom: 1.5em;\n\
}\n\
div.imageblock, div.exampleblock, div.verseblock,\n\
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\n\
div.admonitionblock {\n\
margin-top: 1.0em;\n\
margin-bottom: 1.5em;\n\
}\n\
div.admonitionblock {\n\
margin-top: 2.0em;\n\
margin-bottom: 2.0em;\n\
margin-right: 10%;\n\
color: #606060;\n\
}\n\
\n\
div.content { /* Block element content. */\n\
padding: 0;\n\
}\n\
\n\
/* Block element titles. */\n\
div.title, caption.title {\n\
color: #527bbd;\n\
font-weight: bold;\n\
text-align: left;\n\
margin-top: 1.0em;\n\
margin-bottom: 0.5em;\n\
}\n\
div.title + * {\n\
margin-top: 0;\n\
}\n\
\n\
td div.title:first-child {\n\
margin-top: 0.0em;\n\
}\n\
div.content div.title:first-child {\n\
margin-top: 0.0em;\n\
}\n\
div.content + div.title {\n\
margin-top: 0.0em;\n\
}\n\
\n\
div.sidebarblock > div.content {\n\
background: #ffffee;\n\
border: 1px solid #dddddd;\n\
border-left: 4px solid #f0f0f0;\n\
padding: 0.5em;\n\
}\n\
\n\
div.listingblock > div.content {\n\
border: 1px solid #dddddd;\n\
border-left: 5px solid #f0f0f0;\n\
background: #f8f8f8;\n\
padding: 0.5em;\n\
}\n\
\n\
div.quoteblock, div.verseblock {\n\
padding-left: 1.0em;\n\
margin-left: 1.0em;\n\
margin-right: 10%;\n\
border-left: 5px solid #f0f0f0;\n\
color: #888;\n\
}\n\
\n\
div.quoteblock > div.attribution {\n\
padding-top: 0.5em;\n\
text-align: right;\n\
}\n\
\n\
div.verseblock > pre.content {\n\
font-family: inherit;\n\
font-size: inherit;\n\
}\n\
div.verseblock > div.attribution {\n\
padding-top: 0.75em;\n\
text-align: left;\n\
}\n\
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */\n\
div.verseblock + div.attribution {\n\
text-align: left;\n\
}\n\
\n\
div.admonitionblock .icon {\n\
vertical-align: top;\n\
font-size: 1.1em;\n\
font-weight: bold;\n\
text-decoration: underline;\n\
color: #527bbd;\n\
padding-right: 0.5em;\n\
}\n\
div.admonitionblock td.content {\n\
padding-left: 0.5em;\n\
border-left: 3px solid #dddddd;\n\
}\n\
\n\
div.exampleblock > div.content {\n\
border-left: 3px solid #dddddd;\n\
padding-left: 0.5em;\n\
}\n\
\n\
div.imageblock div.content { padding-left: 0; }\n\
span.image img { border-style: none; vertical-align: text-bottom; }\n\
a.image:visited { color: white; }\n\
\n\
dl {\n\
margin-top: 0.8em;\n\
margin-bottom: 0.8em;\n\
}\n\
dt {\n\
margin-top: 0.5em;\n\
margin-bottom: 0;\n\
font-style: normal;\n\
color: navy;\n\
}\n\
dd > *:first-child {\n\
margin-top: 0.1em;\n\
}\n\
\n\
ul, ol {\n\
list-style-position: outside;\n\
}\n\
ol.arabic {\n\
list-style-type: decimal;\n\
}\n\
ol.loweralpha {\n\
list-style-type: lower-alpha;\n\
}\n\
ol.upperalpha {\n\
list-style-type: upper-alpha;\n\
}\n\
ol.lowerroman {\n\
list-style-type: lower-roman;\n\
}\n\
ol.upperroman {\n\
list-style-type: upper-roman;\n\
}\n\
\n\
div.compact ul, div.compact ol,\n\
div.compact p, div.compact p,\n\
div.compact div, div.compact div {\n\
margin-top: 0.1em;\n\
margin-bottom: 0.1em;\n\
}\n\
\n\
tfoot {\n\
font-weight: bold;\n\
}\n\
td > div.verse {\n\
white-space: pre;\n\
}\n\
\n\
div.hdlist {\n\
margin-top: 0.8em;\n\
margin-bottom: 0.8em;\n\
}\n\
div.hdlist tr {\n\
padding-bottom: 15px;\n\
}\n\
dt.hdlist1.strong, td.hdlist1.strong {\n\
font-weight: bold;\n\
}\n\
td.hdlist1 {\n\
vertical-align: top;\n\
font-style: normal;\n\
padding-right: 0.8em;\n\
color: navy;\n\
}\n\
td.hdlist2 {\n\
vertical-align: top;\n\
}\n\
div.hdlist.compact tr {\n\
margin: 0;\n\
padding-bottom: 0;\n\
}\n\
\n\
.comment {\n\
background: yellow;\n\
}\n\
\n\
.footnote, .footnoteref {\n\
font-size: 0.8em;\n\
}\n\
\n\
span.footnote, span.footnoteref {\n\
vertical-align: super;\n\
}\n\
\n\
#footnotes {\n\
margin: 20px 0 20px 0;\n\
padding: 7px 0 0 0;\n\
}\n\
\n\
#footnotes div.footnote {\n\
margin: 0 0 5px 0;\n\
}\n\
\n\
#footnotes hr {\n\
border: none;\n\
border-top: 1px solid silver;\n\
height: 1px;\n\
text-align: left;\n\
margin-left: 0;\n\
width: 20%;\n\
min-width: 100px;\n\
}\n\
\n\
div.colist td {\n\
padding-right: 0.5em;\n\
padding-bottom: 0.3em;\n\
vertical-align: top;\n\
}\n\
div.colist td img {\n\
margin-top: 0.3em;\n\
}\n\
\n\
@media print {\n\
#footer-badges { display: none; }\n\
}\n\
\n\
#toc {\n\
margin-bottom: 2.5em;\n\
}\n\
\n\
#toctitle {\n\
color: #527bbd;\n\
font-size: 1.1em;\n\
font-weight: bold;\n\
margin-top: 1.0em;\n\
margin-bottom: 0.1em;\n\
}\n\
\n\
div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {\n\
margin-top: 0;\n\
margin-bottom: 0;\n\
}\n\
div.toclevel2 {\n\
margin-left: 2em;\n\
font-size: 0.9em;\n\
}\n\
div.toclevel3 {\n\
margin-left: 4em;\n\
font-size: 0.9em;\n\
}\n\
div.toclevel4 {\n\
margin-left: 6em;\n\
font-size: 0.9em;\n\
}\n\
\n\
span.aqua { color: aqua; }\n\
span.black { color: black; }\n\
span.blue { color: blue; }\n\
span.fuchsia { color: fuchsia; }\n\
span.gray { color: gray; }\n\
span.green { color: green; }\n\
span.lime { color: lime; }\n\
span.maroon { color: maroon; }\n\
span.navy { color: navy; }\n\
span.olive { color: olive; }\n\
span.purple { color: purple; }\n\
span.red { color: red; }\n\
span.silver { color: silver; }\n\
span.teal { color: teal; }\n\
span.white { color: white; }\n\
span.yellow { color: yellow; }\n\
\n\
span.aqua-background { background: aqua; }\n\
span.black-background { background: black; }\n\
span.blue-background { background: blue; }\n\
span.fuchsia-background { background: fuchsia; }\n\
span.gray-background { background: gray; }\n\
span.green-background { background: green; }\n\
span.lime-background { background: lime; }\n\
span.maroon-background { background: maroon; }\n\
span.navy-background { background: navy; }\n\
span.olive-background { background: olive; }\n\
span.purple-background { background: purple; }\n\
span.red-background { background: red; }\n\
span.silver-background { background: silver; }\n\
span.teal-background { background: teal; }\n\
span.white-background { background: white; }\n\
span.yellow-background { background: yellow; }\n\
\n\
span.big { font-size: 2em; }\n\
span.small { font-size: 0.6em; }\n\
\n\
span.underline { text-decoration: underline; }\n\
span.overline { text-decoration: overline; }\n\
span.line-through { text-decoration: line-through; }\n\
\n\
div.unbreakable { page-break-inside: avoid; }\n\
\n\
\n\
/*\n\
* xhtml11 specific\n\
*\n\
* */\n\
\n\
div.tableblock {\n\
margin-top: 1.0em;\n\
margin-bottom: 1.5em;\n\
}\n\
div.tableblock > table {\n\
border: 3px solid #527bbd;\n\
}\n\
thead, p.table.header {\n\
font-weight: bold;\n\
color: #527bbd;\n\
}\n\
p.table {\n\
margin-top: 0;\n\
}\n\
/* Because the table frame attribute is overridden by CSS in most browsers. */\n\
div.tableblock > table[frame=\"void\"] {\n\
border-style: none;\n\
}\n\
div.tableblock > table[frame=\"hsides\"] {\n\
border-left-style: none;\n\
border-right-style: none;\n\
}\n\
div.tableblock > table[frame=\"vsides\"] {\n\
border-top-style: none;\n\
border-bottom-style: none;\n\
}\n\
\n\
\n\
/*\n\
* html5 specific\n\
*\n\
* */\n\
\n\
table.tableblock {\n\
margin-top: 1.0em;\n\
margin-bottom: 1.5em;\n\
}\n\
thead, p.tableblock.header {\n\
font-weight: bold;\n\
color: #527bbd;\n\
}\n\
p.tableblock {\n\
margin-top: 0;\n\
}\n\
table.tableblock {\n\
border-width: 3px;\n\
border-spacing: 0px;\n\
border-style: solid;\n\
border-color: #527bbd;\n\
border-collapse: collapse;\n\
}\n\
th.tableblock, td.tableblock {\n\
border-width: 1px;\n\
padding: 4px;\n\
border-style: solid;\n\
border-color: #527bbd;\n\
}\n\
\n\
table.tableblock.frame-topbot {\n\
border-left-style: hidden;\n\
border-right-style: hidden;\n\
}\n\
table.tableblock.frame-sides {\n\
border-top-style: hidden;\n\
border-bottom-style: hidden;\n\
}\n\
table.tableblock.frame-none {\n\
border-style: hidden;\n\
}\n\
\n\
th.tableblock.halign-left, td.tableblock.halign-left {\n\
text-align: left;\n\
}\n\
th.tableblock.halign-center, td.tableblock.halign-center {\n\
text-align: center;\n\
}\n\
th.tableblock.halign-right, td.tableblock.halign-right {\n\
text-align: right;\n\
}\n\
\n\
th.tableblock.valign-top, td.tableblock.valign-top {\n\
vertical-align: top;\n\
}\n\
th.tableblock.valign-middle, td.tableblock.valign-middle {\n\
vertical-align: middle;\n\
}\n\
th.tableblock.valign-bottom, td.tableblock.valign-bottom {\n\
vertical-align: bottom;\n\
}\n\
\n\
\n\
/*\n\
* manpage specific\n\
*\n\
* */\n\
\n\
body.manpage h1 {\n\
padding-top: 0.5em;\n\
padding-bottom: 0.5em;\n\
border-top: 2px solid silver;\n\
border-bottom: 2px solid silver;\n\
}\n\
body.manpage h2 {\n\
border-style: none;\n\
}\n\
body.manpage div.sectionbody {\n\
margin-left: 3em;\n\
}\n\
\n\
@media print {\n\
body.manpage div#toc { display: none; }\n\
}\n\
\n\
\n\
</style>\n\
<script type=\"text/javascript\">\n\
/*<+'])');\n\
// Function that scans the DOM tree for header elements (the DOM2\n\
// nodeIterator API would be a better technique but not supported by all\n\
// browsers).\n\
var iterate = function (el) {\n\
for (var i = el.firstChild; i != null; i = i.nextSibling) {\n\
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {\n\
var mo = re.exec(i.tagName);\n\
if (mo && (i.getAttribute(\"class\") || i.getAttribute(\"className\")) != \"float\") {\n\
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);\n\
}\n\
iterate(i);\n\
}\n\
}\n\
}\n\
iterate(el);\n\
return result;\n\
}\n\
\n\
var toc = document.getElementById(\"toc\");\n\
if (!toc) {\n\
return;\n\
}\n\
\n\
// Delete existing TOC entries in case we're reloading the TOC.\n\
var tocEntriesToRemove = [];\n\
var i;\n\
for (i = 0; i < toc.childNodes.length; i++) {\n\
var entry = toc.childNodes[i];\n\
if (entry.nodeName.toLowerCase() == 'div'\n\
&& entry.getAttribute(\"class\")\n\
&& entry.getAttribute(\"class\").match(/^toclevel/))\n\
tocEntriesToRemove.push(entry);\n\
}\n\
for (i = 0; i < tocEntriesToRemove.length; i++) {\n\
toc.removeChild(tocEntriesToRemove[i]);\n\
}\n\
\n\
// Rebuild TOC entries.\n\
var entries = tocEntries(document.getElementById(\"content\"), toclevels);\n\
for (var i = 0; i < entries.length; ++i) {\n\
var entry = entries[i];\n\
if (entry.element.id == \"\")\n\
entry.element.id = \"_toc_\" + i;\n\
var a = document.createElement(\"a\");\n\
a.href = \"#\" + entry.element.id;\n\
a.appendChild(document.createTextNode(entry.text));\n\
var div = document.createElement(\"div\");\n\
div.appendChild(a);\n\
div.className = \"toclevel\" + entry.toclevel;\n\
toc.appendChild(div);\n\
}\n\
if (entries.length == 0)\n\
toc.parentNode.removeChild(toc);\n\
},\n\
\n\
\n\
/////////////////////////////////////////////////////////////////////\n\
// Footnotes generator\n\
/////////////////////////////////////////////////////////////////////\n\
\n\
/* Based on footnote generation code from:\n\
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html\n\
*/\n\
\n\
footnotes: function () {\n\
// Delete existing footnote entries in case we're reloading the footnodes.\n\
var i;\n\
var noteholder = document.getElementById(\"footnotes\");\n\
if (!noteholder) {\n\
return;\n\
}\n\
var entriesToRemove = [];\n\
for (i = 0; i < noteholder.childNodes.length; i++) {\n\
var entry = noteholder.childNodes[i];\n\
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute(\"class\") == \"footnote\")\n\
entriesToRemove.push(entry);\n\
}\n\
for (i = 0; i < entriesToRemove.length; i++) {\n\
noteholder.removeChild(entriesToRemove[i]);\n\
}\n\
\n\
// Rebuild footnote entries.\n\
var cont = document.getElementById(\"content\");\n\
var spans = cont.getElementsByTagName(\"span\");\n\
var refs = {};\n\
var n = 0;\n\
for (i=0; i<spans.length; i++) {\n\
if (spans[i].className == \"footnote\") {\n\
n++;\n\
var note = spans[i].getAttribute(\"data-note\");\n\
if (!note) {\n\
// Use [\\s\\S] in place of . so multi-line matches work.\n\
// Because JavaScript has no s (dotall) regex flag.\n\
note = spans[i].innerHTML.match(/\\s*\\[([\\s\\S]*)]\\s*/)[1];\n\
spans[i].innerHTML =\n\
\"[<a id='_footnoteref_\" + n + \"' href='#_footnote_\" + n +\n\
\"' title='View footnote' class='footnote'>\" + n + \"</a>]\";\n\
spans[i].setAttribute(\"data-note\", note);\n\
}\n\
noteholder.innerHTML +=\n\
\"<div class='footnote' id='_footnote_\" + n + \"'>\" +\n\
\"<a href='#_footnoteref_\" + n + \"' title='Return to text'>\" +\n\
n + \"</a>. \" + note + \"</div>\";\n\
var id =spans[i].getAttribute(\"id\");\n\
if (id != null) refs[\"#\"+id] = n;\n\
}\n\
}\n\
if (n == 0)\n\
noteholder.parentNode.removeChild(noteholder);\n\
else {\n\
// Process footnoterefs.\n\
for (i=0; i<spans.length; i++) {\n\
if (spans[i].className == \"footnoteref\") {\n\
var href = spans[i].getElementsByTagName(\"a\")[0].getAttribute(\"href\");\n\
href = href.match(/#.*/)[0]; // Because IE return full URL.\n\
n = refs[href];\n\
spans[i].innerHTML =\n\
\"[<a href='#_footnote_\" + n +\n\
\"' title='View footnote' class='footnote'>\" + n + \"</a>]\";\n\
}\n\
}\n\
}\n\
},\n\
\n\
install: function(toclevels) {\n\
var timerId;\n\
\n\
function reinstall() {\n\
asciidoc.footnotes();\n\
if (toclevels) {\n\
asciidoc.toc(toclevels);\n\
}\n\
}\n\
\n\
function reinstallAndRemoveTimer() {\n\
clearInterval(timerId);\n\
reinstall();\n\
}\n\
\n\
timerId = setInterval(reinstall, 500);\n\
if (document.addEventListener)\n\
document.addEventListener(\"DOMContentLoaded\", reinstallAndRemoveTimer, false);\n\
else\n\
window.onload = reinstallAndRemoveTimer;\n\
}\n\
\n\
}\n\
asciidoc.install(1);\n\
/*]]>*/\n\
</script>\n\
</head>\n\
<body class=\"article\">\n\
<div id=\"header\">\n\
<h1>Beginners' Guide to Fldigi</h1>\n\
<div id=\"toc\">\n\
<div id=\"toctitle\">Table of Contents</div>\n\
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>\n\
</div>\n\
</div>\n\
<div id=\"content\">\n\
<div id=\"preamble\">\n\
<div class=\"sectionbody\">\n\
<div class=\"sidebarblock\">\n\
<div class=\"content\">\n\
<div class=\"paragraph\"><p>Of necessity, this Beginners' Guide contains only as much as you need to know to\n\
get started. You should learn how to make best use of the program by reading the\n\
<a href=\"http://www.w1hkj.com/FldigiHelp/index.html\">Online Documentation</a>. You can also access it from within the Fldigi program from the <em>Help</em>\n\
menu item.</p></div>\n\
<div class=\"paragraph\"><p>You can install the entire html help system by downloading from Source Forge:</p></div>\n\
<div class=\"paragraph\"><p><a href=\"https://sourceforge.net/projects/fldigi/files/fldigi-help.zip/download/\">https://sourceforge.net/projects/fldigi/files/fldigi-help.zip/download/</a></p></div>\n\
<div class=\"paragraph\"><p>Unzip the downloaded file into the same folder as this document. The menu\n\
item \"Help / Online documentation…\" will then open the local copy of the fldigi help system.</p></div>\n\
</div></div>\n\
</div>\n\
</div>\n\
<div class=\"sect1\">\n\
<h2 id=\"ref-beginners-q-a\">1. Beginners' Questions Answered</h2>\n\
<div class=\"sectionbody\">\n\
<div class=\"sect2\">\n\
<h3 id=\"_what_is_fldigi\">1.1. What is Fldigi?</h3>\n\
<div class=\"paragraph\"><p><a href=\"http://www.w1hkj.com/Fldigi.html\">Fldigi</a> is a computer program intended for Amateur Radio Digital Modes\n\
operation using a PC (Personal Computer). Fldigi operates (as does most similar\n\
software) in conjunction with a conventional HF SSB radio transceiver, and uses\n\
the PC sound card as the main means of input from the radio, and output to the\n\
radio. These are audio-frequency signals. The software also controls the radio\n\
by means of another connection, typically a serial port.</p></div>\n\
<div class=\"paragraph\"><p>Fldigi is multi-mode, which means that it is able to operate many popular\n\
digital modes without switching programs, so you only have one program to\n\
learn. Fldigi includes all the popular modes, such as DominoEX, MFSK16, PSK31,\n\
and RTTY.</p></div>\n\
<div class=\"paragraph\"><p>Unusually, Fldigi is available for multiple computer operating systems;\n\
FreeBSD™; Linux™, OS X™ and Windows™.</p></div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_what_is_a_digital_mode\">1.2. What is a Digital Mode?</h3>\n\
<div class=\"paragraph\"><p>Digital Modes are a means of operating Amateur radio from the computer\n\
keyboard. The computer acts as <em>modem</em> (modulator - demodulator), as well as\n\
allowing you to type, and see what the other person types. It also controls the\n\
transmitter, changes modes as required, and provides various convenient features\n\
such as easy tuning of signals and prearranged messages.</p></div>\n\
<div class=\"paragraph\"><p>In this context, we are talking about modes used on the HF (high frequency)\n\
bands, specifically <em>chat</em> modes, those used to have a regular conversation in a\n\
similar way to voice or Morse, where one operator <em>talks</em> for a minute or two,\n\
then another does the same. These chat modes allow multiple operators to take\n\
part in a <em>net</em>.</p></div>\n\
<div class=\"paragraph\"><p>Because of sophisticated digital signal processing which takes place inside the\n\
computer, digital modes can offer performance that cannot be achieved using\n\
voice (and in some cases even Morse), through reduced bandwidth, improved\n\
signal-to-noise performance and reduced transmitter power requirement. Some\n\
modes also offer built-in automatic error correction.</p></div>\n\
<div class=\"paragraph\"><p>Digital Mode operating procedure is not unlike Morse operation, and many of the\n\
same abbreviations are used. Software such as Fldigi makes this very simple as\n\
most of the procedural business is set up for you using the Function Keys at the\n\
top of the keyboard. These are easy to learn.</p></div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_why_all_the_different_modes\">1.3. Why all the different modes?</h3>\n\
<div class=\"paragraph\"><p>HF propagation is very dependent on the ionosphere, which reflects the signals\n\
back to earth. There are strong interactions between different signals arriving\n\
from different paths. Experience has shown that particular modulation systems,\n\
speeds and bandwidths suit different operating conditions.</p></div>\n\
<div class=\"paragraph\"><p>Other factors such as available band space, operating speed and convenience,\n\
noise level, signal level and available power also affect the choice of\n\
mode. While in many cases several different modes might be suitable, having a\n\
choice adds to the operating pleasure. It is difficult to advise which mode is\n\
best for each particular occasion, and experience plays an important role.\n\
<span class=\"footnote\"><br />[To gain a good insight into each mode and its capabilities, you might\n\
consider purchasing <em>Digital Modes for All Occasions</em> (ISBN 1-872309-82-8) by\n\
Murray Greenman ZL1BPU, published by the RSGB and also available from\n\
FUNKAMATEUR and CQ Communications; or the ARRL’s <em>HF Digital Handbook</em> (ISBN\n\
0-87259-103-4) by Steve Ford, WB8IMY.]<br /></span></p></div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_how_do_i_recognise_and_tune_in_the_signals\">1.4. How do I recognise and tune in the signals?</h3>\n\
<div class=\"paragraph\"><p>Recognising the different modes comes with experience. It is a matter of\n\
listening to the signal, and observing the appearance of the signal on the\n\
tuning display. You can also practise transmitting with the transceiver\n\
disconnected, listening to the sound of the signals coming from the\n\
computer. There is also (see later paragraph) an automatic tuning option which\n\
can recognise and tune in most modes for you.</p></div>\n\
<div class=\"paragraph\"><p>The software provides a tuning display which shows the radio signals that are\n\
receivable within the transceiver passband. Using a <em>point and click</em> technique\n\
with the mouse, you can click on the centre of a signal to select it, and the\n\
software will tune it in for you. Some modes require more care than others, and\n\
of course you need to have the software set for the correct mode first — not\n\
always so easy!</p></div>\n\
<div class=\"paragraph\"><p>The <a href=\"#ref-rsid\">RSID</a> (automatic mode detection and tuning) feature uses a\n\
special sequence of tones transmitted at the beginning of each transmission to\n\
identify and tune in the signals received. For this feature to work, not only do\n\
you need to enable the feature in the receiver, but in addition the stations you\n\
are wishing to tune in need to have this feature enabled on transmission. Other\n\
programs also offer this RSID feature as an option.</p></div>\n\
</div>\n\
</div>\n\
</div>\n\
<div class=\"sect1\">\n\
<h2 id=\"ref-setting-up\">2. Setting Up</h2>\n\
<div class=\"sectionbody\">\n\
<div class=\"sect2\">\n\
<h3 id=\"_fldigi_settings\">2.1. Fldigi settings</h3>\n\
<div class=\"ulist\"><div class=\"title\">Essentials</div><ul>\n\
<li>\n\
<p>\n\
Use the menu <code>Configure→Operator</code> item to set the operator name, callsign,\n\
locator and so on.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
If you have more than one sound card, use the menu <code>Configure→Sound Card</code>,\n\
<code>Audio Devices</code> tab, to select the sound card you wish to use. You can ignore\n\
the other tabs for now.\n\
</p>\n\
</li>\n\
</ul></div>\n\
<div class=\"ulist\"><div class=\"title\">Rig Control</div><ul>\n\
<li>\n\
<p>\n\
Use the menu <code>Configure→Rig Control</code> item to set how you will control the\n\
rig. If you will key the rig via a serial port, in the <code>Hardware PTT</code> tab\n\
select <em>Use serial port PTT</em>, the device name you will use, and which line\n\
controls PTT. If in doubt, check both <em>RTS</em> and <em>DTR</em>. You <strong>must</strong> then press\n\
the <code>Initialize</code> button.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
If you plan to use CAT control of the rig via the COM port, check <em>Use Hamlib</em>\n\
in the <code>Hamlib</code> tab. Select your rig model from the drop-down menu and set the\n\
serial port device name, baud rate, and RTS/CTS options as needed. If in\n\
addition you wish to use PTT control via CAT, also check <em>PTT via Hamlib\n\
command</em>. You <strong>must</strong> then press the <code>Initialize</code> button.\n\
</p>\n\
</li>\n\
</ul></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Note\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJXElEQVRo3u2ZW4xcZ5HHf1Xf951z\n\
uudqD2PPxRPs2AnGTlg7K0jihDiBJIzA4g5P8IDywOUBgUBaZK3EC/JK2dU+IMFmxQMrJavdDCgo\n\
SOQCwUYBh4ADCIOdYM84YYjHl/Gt7UnPTE+fr/bhnG57nAXHyQSC5E8qzZxudc/3r/pX1b9qxMz4\n\
ez7K3/m5AuAKgL8lgLGxMRsdHbW+vj7r6+uz0dFRGxsb+6tWBXm1VWj79u02/sB9bN92J5XpY+Rn\n\
TnFqdoavT9ZY94nPsGPHDnnDRmBsbMzGH7iPHe96B+nk88wfeI54ZIrlMzN8bVXK+AP38eCDD9ob\n\
NgKjo6N27+oOKrVTzP9+LxocziviFeeF02kn/+zW8OijjxZ/RETeUBHYs2cPPVlG8w/7CNVAqARC\n\
FkiyQMgSBkdWsWfPHmKMAFh5Xg8A/rLCJWIiQqVSIT82SagG1CvqFBcU9UUkdHiYubmn8f5lX28i\n\
gojgnFv0RpIkpGna/kyz2aTRaHDu3DlZSgCcOfZbPvCRezg5fZwVWSguHAoQ6h2udxk1Ejo7K/zs\n\
h99i2bJuujorZFmKqtJmk1wIIBZkEEVEy6jBqmvuxszsL1HwsgB472mc3ccH77qKf/3WTv5tQw++\n\
mqAl9/3QavL+q/nPXXs5WzvLzPEn8fMZ2lUhZgHnpARwEXPFgSaIZoiEAgBGmqbEGF8WrVedA0V4\n\
lffeeT2dt27ky/trTDcDumIQ9w9bOd0xzFfGnmBmfB/RIo2FnBghj5FWCkQTDIdpdt4kgKQgCWgC\n\
LkM0bQNYMgqFEIg41Kd87lPv4pPPHOKepycZ3/U88AtuGuhlW7XJ2r7AU9lKZl5q0N2VEU3Jo+Lw\n\
gBQet/MXE00QDYVJAqKYRNI0Jc9zQghLE4FKpYKqw/uENMv4wqfv4re1Ov+zoYtfvX053xhR1mbC\n\
tl8fZ+uWtbw0mzM3ZzQXhIiC+NICoh1tgwASyggEEI8Q8N4vbQTSNEXF43yC88Z1bxlhx/YP8U/f\n\
eYr9vz6MGTTzyB1b1tFZzZhvROYWjHMvLRDSBKfgvOLEYeSLIgCuBOfKhDacc1yq+l42hdR7RAPq\n\
IiHNeOu1q/jSZ+9m5twMj+zcz4GJ43R1ZQTvUfUYiqljds5QB5koooq7uMS2L1/SDOOV9L/LAuCc\n\
Q8QjmhC8kKQLVCoVurvmUTHu3rqet20Yptk0li3vIkkCgsNrwIeAmbCQQxSo+D/D6FaVski8IPmX\n\
DADicK6gUPCBjmpGnldwKlQrGStXLKfZjIgolWrRnAyl2RScKkkaLuoBgOsBrWDSBTYHoiBckv+X\n\
DSDGCCaAEHxCkgbyPMWsShocC80m0UBR1DmS4HGqpFmGiKLOE6MS1AN5cfFFp1FcHsHQpQdQr9dR\n\
VVQE54TEJ1iaguWkwZPnOSCIFpcIwZMkgTRNgLJbO4cLKaYJSPUCkZGXzM8Q8jaFlj4CIqhz5FEI\n\
icNiwElKjIE8RlQVp44YDVSLvFFH8J7TtTpTR09zw+bNWNFuOXjoMKfOzPCPmzaSuBQRxTDAXhGA\n\
y+oDqopoUS1c8DhN+Pkz40RTfv/cESYm5+jsGaTaPcCv9p3gP/7rp+zd/yLOJxw+epbdeyZ5fNez\n\
HPrjMUQTvv3fP+LFw6fo7e7m2w88gmhx9aLRXbqEXjaA7q4qoh71Kd4HVD0nT9d5+NHf8NK8o3a2\n\
zk9/vo8jx04zfaLGlz//cQ5N1jkyLczMpSRplZtu3MTVa0YwYPrkGW6/7QbWv2UNQwN9mChC0QdM\n\
3dJH4GXa2IwV/T08e/AYd91+A+/euomDE4f55TN/4J03X4+I8OH338zjT+zm+reuYsP6NW1hZnh6\n\
e3r4l3//Xx586Eluu+XGopm9nvPA/3dWruilt7ez/byst4uJF6bYcuOGNsg8Lz1pCzTmZwF45LEn\n\
2fy2tdyw6VqeO/AnFprzQOfrB6Ber7+MkOqrDKwcYmHhF+cB9ffSt7yb7/3gKa65ephnD/yJD7zv\n\
9lLNOmbn5gE4N1NnzeohnHNsWL+aY9PnWi25tLi0AGq1GlddNYBIwLmEPM9R16BvWZUvfnYb6grF\n\
uPXWzYDwzps3cfxEjdtu2UyWJYgoK1f0sXzqFCLKRz94N4//+Gl+s/cQMc+57rprGRocBBUQg+iW\n\
FsDU1BRvWtZTdtGAc44oxTTV1dWJxVnMiioi4kjSDlYN9RdTVtkXsqzCrTdtApQQYNvoLS01V5pg\n\
SKE1yMnz/JJ66BUDGB8fZ2iwvwAgvtTzOeCK0opg0QozKSQBgqpiOEQcqF2geRZ7WPAIWjigGJ6X\n\
VsxNTEzQ399TzKztZlO0fIvFc7RIbtCqfqpSRAAFWiXSl2LNFitR1cIZUipR4y8OMpddRl944Xmu\n\
GhkqQoyAcf53UcyUGB15VPJcCovFa2ZalsjCwyDF4NIyKb+nbJSiBaAkSZYGwM6dO23Xrp9wxx13\n\
Fl43w1pS1ygjUihVMy1N2k62lm4o+W6imMW2FTR0SCkUBSlF4xIl8dTUFB/70B1UKykL9ZOYWJln\n\
0m4+xb4nomrlpQoKiRTvtXS+mIIqqpWLhBaggpiVjim00GsaKVs7mb179/K+94yWnAeLBtEwYtuz\n\
IkXC+lIzAWj52vlktKJEGkQWFlNBBMwRpQBgllOv11/7QGNmdv/99/PVr9xDY/YEZpGjR6fJmw1+\n\
t+8A0ydO87v9E1iMdHV20NPTwdrVg1y3YR0iMDzUX0Shve2JCBGJzcUBUI/aAmbGi0eOsn/fBLVa\n\
bUkAFFOV5Xz34SewPOexH+1maNVaurs66ehezpprljEwMMDs7Cxnz9WYnDYe++b3mTlznGo1o7O7\n\
g5GhAa5dN8L1G69hYKAfs/ND/dSRUxydPsn4xCR/nDzC5ORRjk6f4t57721H81Vtp83MYowMDw/T\n\
bDYREbZs2cLo6CgDAwN0dnYiIsXGrtFAVQkhkOc58/PzqCr1ep3du3fT0dHBwYMHeeihh1BVVq9+\n\
8wWjqmdwcJD169ezbt06Nm7cSH9/P1mWMTIyQqVSkVe9Xm82m9ZsNpmdnWVubo5Go0GMsc3rVqK1\n\
nluc997jnGv/bOWImTE3N7do8WtmNJvN9hDvnCNJEpIkoVKp4L1/7btRVW17uDXge+9pbZtb1gr5\n\
hc8X7za994uoISLEGNvSoWVJkrw2Cl35L+UVAFcAXAFwBcClzv8B3eu58OmgDQoAAAAASUVORK5C\n\
YII=\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"paragraph\"><p>If your rig is CAT-capable but not yet supported by\n\
<a href=\"http://www.hamlib.org/\">Hamlib</a>, it may still be possible to control it via\n\
Fldigi’s <code>RigCAT</code> system. Refer to the <a href=\"http://www.w1hkj.com/FldigiHelp/index.html\">Online Documentation</a> for details.</p></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
<div class=\"ulist\"><div class=\"title\">CPU Speed</div><ul>\n\
<li>\n\
<p>\n\
When you start Fldigi for the very first time, it makes a series of\n\
measurements to determine your computer’s processing speed. Although these\n\
measurements are usually accurate, if you have a very slow processor (under\n\
700MHz), you should verify that <em>Slow CPU</em> under <code>Configure→Misc→CPU</code> has\n\
been enabled. The receiver decoding strategy of certain modems uses fewer\n\
processor cycles in this mode.\n\
</p>\n\
</li>\n\
</ul></div>\n\
<div class=\"ulist\"><div class=\"title\">Modems</div><ul>\n\
<li>\n\
<p>\n\
Each of the modems can be individually set up from the <code>Configure→Modems</code>\n\
multi-tabbed dialog. You need not change anything here to start with, although\n\
it might be a good idea to set the <em>secondary text</em> for DominoEX and THOR to\n\
something useful, such as your call and locator. <span class=\"footnote\"><br />[Secondary text is\n\
transmitted when the text you type does not keep up with the typing speed of\n\
the mode — this handy text appears in a small window at the very bottom of the\n\
screen.]<br /></span> Note that this set of tabs is also where you set the RTTY modem speed\n\
and shift, although the default values should be fine for normal operation.\n\
</p>\n\
</li>\n\
</ul></div>\n\
<div class=\"ulist\"><div class=\"title\">Other settings</div><ul>\n\
<li>\n\
<p>\n\
Use the menu <code>Configure→UI</code>, <code>Restart</code> tab, to set the aspect ratio of the\n\
waterfall display and whether or not you want to dock a second digiscope to\n\
the main window.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
Use the menu <code>Configure→IDs</code> item to set whether you wish to transmit RSID\n\
data at the start of each over (this is for the benefit of others and does not\n\
affect RSID reception). If you plan to regularly use the RSID feature on\n\
receive, you should deselect the option that starts new modems at the “sweet\n\
spot” frequencies in <code>Misc→Sweet Spot</code>.\n\
</p>\n\
</li>\n\
</ul></div>\n\
<div class=\"paragraph\"><p>Finally, use the menu item <code>Configure→Save Config</code> to save the new\n\
configuration.</p></div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_sound_card_mixer\">2.2. Sound Card Mixer</h3>\n\
<div class=\"ulist\"><ul>\n\
<li>\n\
<p>\n\
Use your sound card <em>Master Volume</em> applet to select the sound card, the Wave\n\
output and set the transmit audio level. You can check the level using the\n\
<a href=\"#ref-tune\">Tune</a> button, top right, beyond the Menu.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
On Windows, the <em>Volume</em> applet can usually be opened by clicking\n\
<code>Start→Run…</code> and entering <code>sndvol32</code>, or from the Control Panel.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
Use your sound card <em>Recording Control</em> applet to select the sound card, the\n\
Line or Mic input and set the receiver audio level. Watch the waterfall\n\
display for receiver noise when setting the level. If you see any dark blue\n\
noise, you have the right input and about the right level. The actual setting\n\
is not very important, provided you see blue noise. If the audio level is too\n\
high, the little diamond shaped indicator (bottom right) will show red. The\n\
waterfall may also show red bands. Performance will be degraded if the level\n\
is too high.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
On Windows, the <em>Record</em> applet can usually be opened by clicking\n\
<code>Start→Run…</code> and entering <code>sndvol32</code>, or from the Control Panel. If opened\n\
from the Control Panel, you’ll end up with the Master Volume applet, and need\n\
to switch using <code>Options→Properties</code>, and selecting the <code>Recording</code> radio\n\
button.\n\
</p>\n\
</li>\n\
</ul></div>\n\
</div>\n\
</div>\n\
</div>\n\
<div class=\"sect1\">\n\
<h2 id=\"ref-guided-tour\">3. Guided Tour</h2>\n\
<div class=\"sectionbody\">\n\
<div class=\"paragraph\"><p>The main window consists of three main panes. Study it carefully as you read\n\
these notes. From top to bottom, these are the Receive pane (navajo white), the\n\
Transmit pane (light cyan), and the Waterfall pane (black). At the top is the\n\
collection of entry items which form the Log Data, and at the very top, a\n\
conventional drop-down Menu system, with entries for File, Op Mode, Configure,\n\
View and Help.</p></div>\n\
<div class=\"paragraph\"><p>Between the Transmit and the Waterfall panes is a line of boxes (buttons) which\n\
represent the Function Keys F1 - F12. This is the Macro group. Below the\n\
Waterfall pane is another line of boxes (buttons), which provide various control\n\
features. This is the Controls group. The program and various buttons can mostly\n\
be operated using the mouse or the keyboard, and users generally find it\n\
convenient to use the mouse while tuning around, and the keyboard and function\n\
keys during a QSO.</p></div>\n\
<div class=\"sect2\">\n\
<h3 id=\"ref-receive-pane\">3.1. Receive Pane</h3>\n\
<div class=\"paragraph\"><p>This is where the text from decoded incoming signals is displayed, in black\n\
text. When you transmit, the transmitted text is also displayed here, but in red,\n\
so the Receive pane becomes a complete record of the QSO. The information in\n\
this pane can also be logged to a file.</p></div>\n\
<div class=\"paragraph\"><p>The line at the bottom of this pane can be dragged up and down with the\n\
mouse. You might prefer to drag it down a bit to enlarge the Receive pane and\n\
reduce the size of the Transmit pane.</p></div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_transmit_pane\">3.2. Transmit Pane</h3>\n\
<div class=\"paragraph\"><p>This is where you type what you want to transmit. The mouse must click in here\n\
before you type (to obtain <em>focus</em>) otherwise your text will go nowhere. You can\n\
type in here while you are receiving, and when you start transmitting, the text\n\
already typed will be sent first. This trick is a cool way to impress others\n\
with your typing speed! As the text is transmitted, the text colour changes from\n\
black to red. At the end of the over, all the transmitted text (and any as yet\n\
not transmitted) will be deleted.</p></div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_waterfall_pane\">3.3. Waterfall Pane</h3>\n\
<div class=\"paragraph\"><p>This is the main tuning facility. There are three modes, Waterfall, FFT and\n\
Signal, selected by a button in the Control group. For now, leave it in\n\
Waterfall mode, as this is the easiest to tune with, and gives the best\n\
identification of the signal.</p></div>\n\
<div class=\"hdlist\"><table>\n\
<tr>\n\
<td class=\"hdlist1\">\n\
<strong><code>WF</code></strong> (Waterfall)\n\
<br />\n\
</td>\n\
<td class=\"hdlist2\">\n\
<p style=\"margin-top: 0;\">\n\
A spectrogram display of signal strength versus frequency over passing\n\
time. The receiver passband is analysed and displayed with lower frequencies\n\
to the left, higher to the right. Weak signals and background noise are dark\n\
while stronger signals show as brighter colours. As time passes (over a few\n\
seconds), the historic signals move downwards like a waterfall.\n\
</p>\n\
</td>\n\
</tr>\n\
<tr>\n\
<td class=\"hdlist1\">\n\
<strong><code>FFT</code></strong> (Fast Fourier Transform)\n\
<br />\n\
</td>\n\
<td class=\"hdlist2\">\n\
<p style=\"margin-top: 0;\">\n\
A spectrum display of the mean signal strength versus frequency. Again\n\
frequency is displayed from left to right, but now the vertical direction\n\
shows signal strength and there is no brightness or historic information.\n\
</p>\n\
</td>\n\
</tr>\n\
<tr>\n\
<td class=\"hdlist1\">\n\
<strong><code>SIG</code></strong> (Signal)\n\
<br />\n\
</td>\n\
<td class=\"hdlist2\">\n\
<p style=\"margin-top: 0;\">\n\
An oscilloscope type of display showing the raw audio being captured by the\n\
sound card.\n\
</p>\n\
</td>\n\
</tr>\n\
</table></div>\n\
<div class=\"paragraph\"><p>At the top of the pane is a scale of frequency in Hz, which corresponds to the\n\
frequency displayed immediately below it. This scale can be moved around and\n\
zoomed using buttons in the Control group.</p></div>\n\
<div class=\"paragraph\"><p>As you move the mouse around in this pane you will see a yellow group of tuning\n\
marks following the mouse pointer. Tuning is achieved by left-clicking on a\n\
signal displayed by the waterfall in this pane. Use these yellow marks to\n\
exactly straddle the signal and then left-click on the centre of the signal. The\n\
tuning marks change to red. The red vertical lines will show the approximate\n\
width of the active signal area (the expected signal bandwidth), while a red\n\
horizontal bar above will indicate the receiver software’s active decoding\n\
range. When you left-click, the red marks move to where you clicked, and will\n\
attempt to auto-track the signal from there.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Tip\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJf0lEQVR42uyQiwmDIQyEw9MdHEVc\n\
yc3czQcK4uvKCX8nKLQFgSMkucB9EQB/rQvwIV2AC7D3BrXWwpzzaIzx1jPj/vH+BACDMFjvHa01\n\
1FqRc0ZKCTFGhBBOZc859/TRzzvefwWAn+RnGaaUAu89nHOw1kJrDaUURIT19MaYFy3mACRZtoTh\n\
p54JrsN6Htszbdu2pzXV06i2zd0eG49re3fM6LFt29b/8r/xKqbqxq2qrsWJyPXe+k7mnziJrKws\n\
/Pvf/8bly5dx48YN3L17l/+/8h1+71e9gNrj/OGDBw9Cp9Phrbfewt9G2sM7Voekonbk1s9FUesS\n\
lHQsg759KXSN85Fa2gX/pAIMGO2IN998ExkZGejt7cXVq1cZGX7vJ0XEZq8z9JSBXq9XPOwSmoap\n\
VbNQ3LYEmdWzET29A/6ZDXBProZTfAWc4srhklAJ77Q6hOS2IKmkB+mVM+EZlaX8/9nZ2Th9+jSu\n\
XbvG7/L7NkXDJvjHjx9j/fr1GDlyJMZ5hCOnZjaKWxcjtqADbomVmBJdAvuYUjjElsFRwHkBZ4F3\n\
SayCq5hbUrVcrAYeKbUIzG5GUuk7mOITjcGDB+PTTz/FxYsXGQ3+Tp8vYRP8u+++q2g6JKNcJLJY\n\
vPm2eLcCU6L0sBd4B4F31IIXcDcBdxdwwnum1sErrR7e6Q0Izm1FQEoJ+vXrh5kzZ+Ls2bNM+j5f\n\
wib439v1Q0JBqwIfktOEyQJu4nUxSsZZ4CkbxevG8ALuKeBeAk54n4xG+GY2wW9qM4LSq/AHu/7o\n\
6emhpPp8CasJS01SNvR8osAXtCyCT1ot4bUkI1aO0b5TMcAxBn+3j8Yw92Q4RpeYeN1bwH0E3FfA\n\
Ce+f1YKA7Fb4JpcyEnSWEgnKib9Pjp90AVYFJhY1HyqyYaL6CryxZNR6H+aZisHOcZiz/BNcunpd\n\
vPgEO/YdQV79fLXXFXB/AQ/IaUOgWFBuO1wjcjBgwADs3buXOaH8PjlsvgBDx9LGasOEJXxIbvNL\n\
r4upJUPv/3VKFL5f2wv1eSyezK1faAJPrxvAg/M6EDKtEwFZzRjpGIDk5GQcPnyY1YkcZqVkVjps\n\
LqzzLHU5tXNYMbQkY6J32mivVJg7G7YftAgfqutCWH43PBKUEo2vvvqK+UApkUdTSha9zyblGpbO\n\
ZiRwlSbw6ipjKJGTwnR4+OgxtM6lazcpGYvw4dPflki3YYx7BKKjo7F//342O7NRMKt9tnl22Oya\n\
WYgv6jKSjApeXWXEFr73HbTOZyu3wAAeJOBa8BEF7yCysAduMQV47bXXlG595swZ8mjmgtnKw9nm\n\
76PslXHAM6WGXtcske4aJZJVRte0GCs378Gtu/cVW/zRCvNeV8FHFc2Ab2oV/jp8Ejo6OpgLnJ00\n\
K5KmfB4+fKgMZj7x+ciunWu1q7KZTQrNx9iAHIzyycRwrzQM80jFUPcUDHNLxgivdGpfA14FLhYt\n\
8NHFM5WxY6JvAiIiIrB7924OgAqXWkZmSyenyhR9B2JFPpa6Ko213jOmEJ3z3sWn361H784DOHnm\n\
Iq7fvM18kNA/x43bd5FQOss8/P/BY/SzECsWVSBdPjwHw4cPp4zYF9Ql1fwFmPUcgTlFBmU3vawy\n\
ZrrqSPHwqbMXYenwEmlV86zDl8xGXOkcsdlwjcxjHiqN9OTJk+SyfgGWKz4+2Hmpf06RaskoXdVI\n\
7xNFPgeOnjYBPn3+CmYu+wR7Dh4HzwrJBxNwsSgz8PFlc5FQPk+aWi7s7OywevVqHD16VBkvyGf1\n\
AnxFsQ6Xd/+LHldMDa/uqh9+twlXb9zGDxt3o7T73xgflIf4/BYmneL97IbF2l4Xo2TiTOHF5koE\n\
chWOlStXMpHJ1fcLMAJlXf9US0YTXt2YvOW/GeGdgW17DoPnxNnLViUTL5Yg8IkCn1QxH/Els+AW\n\
ladE4McffzS5AJ1i9QLMgcKWxfS4ukRyELM4EkwJL0RSYTsMZ+OOQ9rwKq8nCjjhkysXIKagG16x\n\
0/l6sz0CzAG+YTMrehCQ1WTqdcMUKeBaXTVI/nqUz1R8u2YLDOe/X22AAi4WYwlewJOrFiKlehHC\n\
chrhKRcYOnSobTlgqEJ8gAel6hGZ32lRMoGqruopcnMIy1eGN8OZ8+73pl4XM5aMGj61ZjH8U8vh\n\
GJyOoKAg26qQoQ9wezB4rAvSKudowZvtqk4xpShtXQTj0738a22vixkkkyLwqQKfJvCJ5XOkr+jw\n\
95FTUFNTY1sfMHRidj7qL6tunkEyVuGZqPaRxXj/yzUwPnPf+9GSZEzg02uXIFzk45tQhFdffRXf\n\
fPMNdu3ape7E1mchzh5cffjETUO4yIjgAQbJWBgJeIFN2/fD+Hy6Ygvi1fAqyaQJOOFTKuZJ8ubD\n\
PiARgYGBWLVqlQ2zkGoaZehYh9OrZqu9jhAB1+qq7tL0tuw+DOOzdd8J6l0lGRV83VJk1C9DaHY9\n\
fBOLld9dsmSJehq17T3AOZx7G0f/WERM7zY/iBmVSP67d78wldCFKzdfel1MLZkMgc8U+JjCLnjH\n\
FWCcWxjCwsKwYsUK294D6hcZs54vIu5tQjIqVPDmuyqfjk/k/zcc+Z6ALjaVjAo+sXSmyLVA5KPD\n\
n/70J3z55ZfYsmWL7S8ydRT4JuXSiduCsOx6wvepq7LyXLx6U8rpU/y4eS+StSXzEj6+EH4iHXbe\n\
rq4urFu3zuY3sdmSyu0Al052/fojML3K1q6qkowRfMNyGde7Bb6A8LJ36s8lAqXzM7cSqorEELIO\n\
c+nESHhKlQjXdfa1q2rqPbVqAcKzGxR4Vh16nvA//PADdu7caX0vZOtmjm2ceuTSiXubsa7B8E2t\n\
RKQkt9JVNeFVkhFjmYzMa1b07p+kx3i3cGqesqHnCW/zZs6mS9AzDC/3Nix1E7xj4J2oR1BmHaLy\n\
OzlFimzm0+tygYUio7mI0/cgYlqryK9SqTJ+ScVwDFT+f1YbJiw1z+/+8rtR9SUYVmqTCca9DVcf\n\
3B78bcQU2AemwCNaxyGMf+Y4oMjNR7qqtySpS1gmBox2YIdlk2Kdp9dZbfi9X287/b/27EADoBCG\n\
wvD7v3U+xMEBsMEwqbvorrR/naYPuB1stXtasvF6oABXwyoDnWkR1kISVAnMsA08QJjmmT+iDzSF\n\
RrQkGZlSBL0eiCZ6tEAcL8JafeMWzY+/eU2hGdfIpHmsAricYeiL3y3ym75x31c1srSUVW09WkyV\n\
UgX1LVVKfvxTdj2deMnuBx6oBZbGaRwh8gAAAABJRU5ErkJggg==\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"title\">Audio history and “casual tuning”</div>\n\
<div class=\"paragraph\"><p>You can temporarily “monitor” a different signal by right-clicking on it. As\n\
long as you hold the mouse button down, the signal under it will be decoded; as\n\
soon as you release the mouse, decoding will revert to the previously tuned spot\n\
(where the red marks are). If you also hold the <code>Control</code> key down before\n\
right-clicking, Fldigi will first decode all of its buffered audio at that\n\
frequency.</p></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_log_data\">3.4. Log Data</h3>\n\
<div class=\"paragraph\"><p>Fldigi provides two QSO entry views, one for casual QSO logging and the second\n\
for contesting. The <code>View→Contest fields</code> menu item switches between the two\n\
modes.</p></div>\n\
<div class=\"paragraph\"><p>The <em>Frequency</em>, <em>Time Off</em>, and (when in contest mode) <em>#Out</em> fields are filled\n\
by the program. All the others can be populated by manual keyboard entry or by\n\
selection from the <a href=\"#ref-receive-pane\">Receive pane</a>. The <em>Time Off</em> field is\n\
continuously updated with the current GMT time. The <em>Time On</em> field will be\n\
filled in when the <em>Call</em> is updated, but can be modified later by the operator.</p></div>\n\
<div class=\"paragraph\"><p>A right click on the Receive pane brings up a context sensitive menu that will\n\
reflect which of the two QSO capture views you have open. If you highlight text\n\
in the Receive pane then the menu selection will operate on that text. If you\n\
simply point to a word of text and right click then the menu selection will\n\
operate on the single word.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Tip\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJf0lEQVR42uyQiwmDIQyEw9MdHEVc\n\
yc3czQcK4uvKCX8nKLQFgSMkucB9EQB/rQvwIV2AC7D3BrXWwpzzaIzx1jPj/vH+BACDMFjvHa01\n\
1FqRc0ZKCTFGhBBOZc859/TRzzvefwWAn+RnGaaUAu89nHOw1kJrDaUURIT19MaYFy3mACRZtoTh\n\
p54JrsN6Htszbdu2pzXV06i2zd0eG49re3fM6LFt29b/8r/xKqbqxq2qrsWJyPXe+k7mnziJrKws\n\
/Pvf/8bly5dx48YN3L17l/+/8h1+71e9gNrj/OGDBw9Cp9Phrbfewt9G2sM7Voekonbk1s9FUesS\n\
lHQsg759KXSN85Fa2gX/pAIMGO2IN998ExkZGejt7cXVq1cZGX7vJ0XEZq8z9JSBXq9XPOwSmoap\n\
VbNQ3LYEmdWzET29A/6ZDXBProZTfAWc4srhklAJ77Q6hOS2IKmkB+mVM+EZlaX8/9nZ2Th9+jSu\n\
XbvG7/L7NkXDJvjHjx9j/fr1GDlyJMZ5hCOnZjaKWxcjtqADbomVmBJdAvuYUjjElsFRwHkBZ4F3\n\
SayCq5hbUrVcrAYeKbUIzG5GUuk7mOITjcGDB+PTTz/FxYsXGQ3+Tp8vYRP8u+++q2g6JKNcJLJY\n\
vPm2eLcCU6L0sBd4B4F31IIXcDcBdxdwwnum1sErrR7e6Q0Izm1FQEoJ+vXrh5kzZ+Ls2bNM+j5f\n\
wib439v1Q0JBqwIfktOEyQJu4nUxSsZZ4CkbxevG8ALuKeBeAk54n4xG+GY2wW9qM4LSq/AHu/7o\n\
6emhpPp8CasJS01SNvR8osAXtCyCT1ot4bUkI1aO0b5TMcAxBn+3j8Yw92Q4RpeYeN1bwH0E3FfA\n\
Ce+f1YKA7Fb4JpcyEnSWEgnKib9Pjp90AVYFJhY1HyqyYaL6CryxZNR6H+aZisHOcZiz/BNcunpd\n\
vPgEO/YdQV79fLXXFXB/AQ/IaUOgWFBuO1wjcjBgwADs3buXOaH8PjlsvgBDx9LGasOEJXxIbvNL\n\
r4upJUPv/3VKFL5f2wv1eSyezK1faAJPrxvAg/M6EDKtEwFZzRjpGIDk5GQcPnyY1YkcZqVkVjps\n\
LqzzLHU5tXNYMbQkY6J32mivVJg7G7YftAgfqutCWH43PBKUEo2vvvqK+UApkUdTSha9zyblGpbO\n\
ZiRwlSbw6ipjKJGTwnR4+OgxtM6lazcpGYvw4dPflki3YYx7BKKjo7F//342O7NRMKt9tnl22Oya\n\
WYgv6jKSjApeXWXEFr73HbTOZyu3wAAeJOBa8BEF7yCysAduMQV47bXXlG595swZ8mjmgtnKw9nm\n\
76PslXHAM6WGXtcske4aJZJVRte0GCs378Gtu/cVW/zRCvNeV8FHFc2Ab2oV/jp8Ejo6OpgLnJ00\n\
K5KmfB4+fKgMZj7x+ciunWu1q7KZTQrNx9iAHIzyycRwrzQM80jFUPcUDHNLxgivdGpfA14FLhYt\n\
8NHFM5WxY6JvAiIiIrB7924OgAqXWkZmSyenyhR9B2JFPpa6Ko213jOmEJ3z3sWn361H784DOHnm\n\
Iq7fvM18kNA/x43bd5FQOss8/P/BY/SzECsWVSBdPjwHw4cPp4zYF9Ql1fwFmPUcgTlFBmU3vawy\n\
ZrrqSPHwqbMXYenwEmlV86zDl8xGXOkcsdlwjcxjHiqN9OTJk+SyfgGWKz4+2Hmpf06RaskoXdVI\n\
7xNFPgeOnjYBPn3+CmYu+wR7Dh4HzwrJBxNwsSgz8PFlc5FQPk+aWi7s7OywevVqHD16VBkvyGf1\n\
AnxFsQ6Xd/+LHldMDa/uqh9+twlXb9zGDxt3o7T73xgflIf4/BYmneL97IbF2l4Xo2TiTOHF5koE\n\
chWOlStXMpHJ1fcLMAJlXf9US0YTXt2YvOW/GeGdgW17DoPnxNnLViUTL5Yg8IkCn1QxH/Els+AW\n\
ladE4McffzS5AJ1i9QLMgcKWxfS4ukRyELM4EkwJL0RSYTsMZ+OOQ9rwKq8nCjjhkysXIKagG16x\n\
0/l6sz0CzAG+YTMrehCQ1WTqdcMUKeBaXTVI/nqUz1R8u2YLDOe/X22AAi4WYwlewJOrFiKlehHC\n\
chrhKRcYOnSobTlgqEJ8gAel6hGZ32lRMoGqruopcnMIy1eGN8OZ8+73pl4XM5aMGj61ZjH8U8vh\n\
GJyOoKAg26qQoQ9wezB4rAvSKudowZvtqk4xpShtXQTj0738a22vixkkkyLwqQKfJvCJ5XOkr+jw\n\
95FTUFNTY1sfMHRidj7qL6tunkEyVuGZqPaRxXj/yzUwPnPf+9GSZEzg02uXIFzk45tQhFdffRXf\n\
fPMNdu3ape7E1mchzh5cffjETUO4yIjgAQbJWBgJeIFN2/fD+Hy6Ygvi1fAqyaQJOOFTKuZJ8ubD\n\
PiARgYGBWLVqlQ2zkGoaZehYh9OrZqu9jhAB1+qq7tL0tuw+DOOzdd8J6l0lGRV83VJk1C9DaHY9\n\
fBOLld9dsmSJehq17T3AOZx7G0f/WERM7zY/iBmVSP67d78wldCFKzdfel1MLZkMgc8U+JjCLnjH\n\
FWCcWxjCwsKwYsUK294D6hcZs54vIu5tQjIqVPDmuyqfjk/k/zcc+Z6ALjaVjAo+sXSmyLVA5KPD\n\
n/70J3z55ZfYsmWL7S8ydRT4JuXSiduCsOx6wvepq7LyXLx6U8rpU/y4eS+StSXzEj6+EH4iHXbe\n\
rq4urFu3zuY3sdmSyu0Al052/fojML3K1q6qkowRfMNyGde7Bb6A8LJ36s8lAqXzM7cSqorEELIO\n\
c+nESHhKlQjXdfa1q2rqPbVqAcKzGxR4Vh16nvA//PADdu7caX0vZOtmjm2ceuTSiXubsa7B8E2t\n\
RKQkt9JVNeFVkhFjmYzMa1b07p+kx3i3cGqesqHnCW/zZs6mS9AzDC/3Nix1E7xj4J2oR1BmHaLy\n\
OzlFimzm0+tygYUio7mI0/cgYlqryK9SqTJ+ScVwDFT+f1YbJiw1z+/+8rtR9SUYVmqTCca9DVcf\n\
3B78bcQU2AemwCNaxyGMf+Y4oMjNR7qqtySpS1gmBox2YIdlk2Kdp9dZbfi9X287/b/27EADoBCG\n\
wvD7v3U+xMEBsMEwqbvorrR/naYPuB1stXtasvF6oABXwyoDnWkR1kISVAnMsA08QJjmmT+iDzSF\n\
RrQkGZlSBL0eiCZ6tEAcL8JafeMWzY+/eU2hGdfIpHmsAricYeiL3y3ym75x31c1srSUVW09WkyV\n\
UgX1LVVKfvxTdj2deMnuBx6oBZbGaRwh8gAAAABJRU5ErkJggg==\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"title\">Quick log entry</div>\n\
<div class=\"paragraph\"><p>Certain fields (<em>Call</em>, <em>Name</em>, <em>RST In</em>, <em>QTH</em> and <em>Locator</em>) may also be\n\
populated semi-automatically. Point to a word in the Receive pane and either\n\
double-left-click or hold a Shift key down and left-click. The program will\n\
then use some simple heuristics to decide which log field will receive the text.</p></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
<div class=\"paragraph\"><p>It is generally not possible to distinguish between Operator and QTH names. For\n\
this reason, Fldigi will use the first non-Call and non-Locator word to fill the\n\
<em>Name</em> field, and subsequent clicks will send text to the <em>QTH</em> field.\n\
Likewise, a text string may be both a valid callsign and a valid\n\
<a href=\"http://en.wikipedia.org/wiki/Maidenhead_Locator_System\">IARU (Maidenhead) locator</a>.\n\
For best results, you should attempt to fill the log fields in the order in\n\
which they appear on the main window, and clear the log fields after logging the\n\
QSO. Of course, text can always be manually typed or pasted into any of the log\n\
fields!</p></div>\n\
<div class=\"paragraph\"><p>You can query online and local (e.g. CD) database systems for data regarding a\n\
callsign. You make the query by either clicking on the globe button, or\n\
selecting <em>Look up call</em> from the popup menu. The latter will also move the\n\
call to the <em>Call</em> field.</p></div>\n\
<div class=\"paragraph\"><p>When the <em>Call</em> field is filled in, the logbook will be searched for the most\n\
recent QSO with that station and, if an entry is found, the <em>Name</em>, <em>QTH</em> and\n\
other fields will be pre-filled. If the logbook dialog is open, that last QSO\n\
will also be selected for viewing in the logbook.</p></div>\n\
<div class=\"paragraph\"><p>You open the logbook by selecting from the View menu; <code>View→Logbook</code>. The\n\
logbook title bar will show you which logbook you currently have open. Fldigi\n\
can maintain an unlimited (except for disk space) number of logbooks.</p></div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_menu\">3.5. Menu</h3>\n\
<div class=\"paragraph\"><p>At the very top of the program window is a conventional drop-down menu. If you\n\
click on any of the items, a list of optional functions will appear. Keyboard\n\
menu selection is also provided. Where underscored characters are shown in the\n\
menu, you can select these menu items from the keyboard using the marked\n\
character and <code>Alt</code> at the same time, then moving around with the\n\
<code>up</code>/<code>down</code>/<code>left</code>/<code>right</code> keys. Press <code>Esc</code> to quit from the menu with no\n\
change.</p></div>\n\
<div class=\"sect3\">\n\
<h4 id=\"_menu_functions\">3.5.1. Menu functions</h4>\n\
<div class=\"paragraph\"><div class=\"title\">File</div><p>Allows you to open or save Macros (we won’t get into that here), turn on/off\n\
logging to file, record/play audio samples, and exit the program. You can also\n\
exit the program by clicking on the <code>X</code> in the top right corner of the window,\n\
in the usual manner.</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">Op Mode</div><p>This is where you select the operating modem used for transmission and\n\
reception. Some modes only have one option. Where more are offered, drag the\n\
mouse down the list and sideways following the arrow to a secondary list, before\n\
releasing it. When you start the program next time, it will remember the last\n\
mode you used.</p></div>\n\
<div class=\"paragraph\"><p>Not all the modes are widely used, so choose a mode which <em>(a)</em> maximises your\n\
chance of a QSO, and <em>(b)</em> is appropriate for the band, conditions, bandwidth\n\
requirements and permissions relevant to your operating licence.</p></div>\n\
<div class=\"paragraph\"><p>At the bottom of the list are two “modes” which aren’t modes at all, and do not\n\
transmit (see <a href=\"http://www.w1hkj.com/FldigiHelp/index.html\">Online Documentation</a> for details). <em>WWV</em> mode allows you to receive a\n\
standard time signal so the beeps it transmits can be used for sound card\n\
calibration. <em>Freq Analysis</em> provides just a waterfall display with a very\n\
narrow cursor, and a frequency meter which indicates the received frequency in\n\
Hz to two decimal places. This is useful for on-air frequency measurement.</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">Configure</div><p>This is where you set up the program to suit your computer, yourself and your\n\
operating preferences. The operating settings of the program are grouped into\n\
several categories and there are menu items in which you enter your personal\n\
information, or define your computer sound card, for example. Modems can be\n\
individually changed, each having different adjustments. The Modems dialog has\n\
multiple tabs, so you can edit any one of them. Don’t fool with the settings\n\
until you know what you are doing! The final item, <code>Save Config</code> allows you to\n\
save the altered configuration for next time you start the program (otherwise\n\
changes are temporary).</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">View</div><p>This menu item allows you to open extra windows. Most will be greyed out, but\n\
two that are available are the Digiscope, and the PSK Browser. The Digiscope\n\
provides a mode-specific graphical analysis of the received signal, and can have\n\
more than one view (left click in the new window to change the view), or maybe\n\
none at all. The PSK Browser is a rather cool tool that allows you to monitor\n\
several PSK31 signals all at the same time! These windows can be resized to\n\
suit.</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">Help</div><p>Brings up the Online Documentation, the Fldigi Home Page, and various\n\
information about the program.</p></div>\n\
</div>\n\
<div class=\"sect3\">\n\
<h4 id=\"_other_controls\">3.5.2. Other controls</h4>\n\
<div class=\"paragraph\" id=\"ref-rsid\"><div class=\"title\">RSID</div><p>The RxID button turns on the receive RSID (automatic mode detection and tuning)\n\
feature. When in use, the button turns yellow and no text reception is possible\n\
until a signal is identified, or the feature is turned off again. If you plan to\n\
use the RSID feature on receive, you must leave the <em>Start New Modem at Sweet\n\
Spot</em> item in the menu <code>Configure→Defaults→Misc</code> tab unchecked.</p></div>\n\
<div class=\"paragraph\" id=\"ref-tune\"><div class=\"title\">TUNE</div><p>This button transmits a continuous tone at the current audio frequency. The tone\n\
level will be at the maximum signal level for any modem, which makes this\n\
function useful for adjusting your transceiver’s output power.</p></div>\n\
</div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_macro_buttons\">3.6. Macro buttons</h3>\n\
<div class=\"paragraph\"><p>This line of buttons provides user-editable QSO features. For example, the first\n\
button on the left sends CQ for you. Both the function of these buttons (we call\n\
them Macros) and the label on each button, can be changed.</p></div>\n\
<div class=\"paragraph\"><p>Select each button to use it by pressing the corresponding Function Key (F1 -\n\
F12, you’ll notice the buttons are grouped in patterns four to a group, just as\n\
the Function Keys are). You can also select them with a left-click of the\n\
mouse. If you right-click on the button, you are able to edit the button’s label\n\
and its function. A handy dialog pops up to allow this to be done. There are\n\
many standard shortcuts, such as <code><MYCALL></code>, which you can use within the\n\
Macros. Notice that the buttons also turn the transmitter on and off as\n\
necessary.</p></div>\n\
<div class=\"paragraph\"><p>You can just about hold a complete QSO using these buttons from left to right\n\
(but please don’t!). Notice that at the right are two spare buttons you can set\n\
as you wish, and then a button labelled <code>1</code>. Yes, this is the first set of\n\
<em>four</em> sets of Macros, and you can access the others using this button, which\n\
changes to read <code>2</code>, <code>3</code>, <code>4</code> then <code>1</code> again (right-click to go backwards), or\n\
by pressing <code>Alt</code> and the corresponding number (1-4, not F1-F4) at the same\n\
time.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Note\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJXElEQVRo3u2ZW4xcZ5HHf1Xf951z\n\
uudqD2PPxRPs2AnGTlg7K0jihDiBJIzA4g5P8IDywOUBgUBaZK3EC/JK2dU+IMFmxQMrJavdDCgo\n\
SOQCwUYBh4ADCIOdYM84YYjHl/Gt7UnPTE+fr/bhnG57nAXHyQSC5E8qzZxudc/3r/pX1b9qxMz4\n\
ez7K3/m5AuAKgL8lgLGxMRsdHbW+vj7r6+uz0dFRGxsb+6tWBXm1VWj79u02/sB9bN92J5XpY+Rn\n\
TnFqdoavT9ZY94nPsGPHDnnDRmBsbMzGH7iPHe96B+nk88wfeI54ZIrlMzN8bVXK+AP38eCDD9ob\n\
NgKjo6N27+oOKrVTzP9+LxocziviFeeF02kn/+zW8OijjxZ/RETeUBHYs2cPPVlG8w/7CNVAqARC\n\
FkiyQMgSBkdWsWfPHmKMAFh5Xg8A/rLCJWIiQqVSIT82SagG1CvqFBcU9UUkdHiYubmn8f5lX28i\n\
gojgnFv0RpIkpGna/kyz2aTRaHDu3DlZSgCcOfZbPvCRezg5fZwVWSguHAoQ6h2udxk1Ejo7K/zs\n\
h99i2bJuujorZFmKqtJmk1wIIBZkEEVEy6jBqmvuxszsL1HwsgB472mc3ccH77qKf/3WTv5tQw++\n\
mqAl9/3QavL+q/nPXXs5WzvLzPEn8fMZ2lUhZgHnpARwEXPFgSaIZoiEAgBGmqbEGF8WrVedA0V4\n\
lffeeT2dt27ky/trTDcDumIQ9w9bOd0xzFfGnmBmfB/RIo2FnBghj5FWCkQTDIdpdt4kgKQgCWgC\n\
LkM0bQNYMgqFEIg41Kd87lPv4pPPHOKepycZ3/U88AtuGuhlW7XJ2r7AU9lKZl5q0N2VEU3Jo+Lw\n\
gBQet/MXE00QDYVJAqKYRNI0Jc9zQghLE4FKpYKqw/uENMv4wqfv4re1Ov+zoYtfvX053xhR1mbC\n\
tl8fZ+uWtbw0mzM3ZzQXhIiC+NICoh1tgwASyggEEI8Q8N4vbQTSNEXF43yC88Z1bxlhx/YP8U/f\n\
eYr9vz6MGTTzyB1b1tFZzZhvROYWjHMvLRDSBKfgvOLEYeSLIgCuBOfKhDacc1yq+l42hdR7RAPq\n\
IiHNeOu1q/jSZ+9m5twMj+zcz4GJ43R1ZQTvUfUYiqljds5QB5koooq7uMS2L1/SDOOV9L/LAuCc\n\
Q8QjmhC8kKQLVCoVurvmUTHu3rqet20Yptk0li3vIkkCgsNrwIeAmbCQQxSo+D/D6FaVski8IPmX\n\
DADicK6gUPCBjmpGnldwKlQrGStXLKfZjIgolWrRnAyl2RScKkkaLuoBgOsBrWDSBTYHoiBckv+X\n\
DSDGCCaAEHxCkgbyPMWsShocC80m0UBR1DmS4HGqpFmGiKLOE6MS1AN5cfFFp1FcHsHQpQdQr9dR\n\
VVQE54TEJ1iaguWkwZPnOSCIFpcIwZMkgTRNgLJbO4cLKaYJSPUCkZGXzM8Q8jaFlj4CIqhz5FEI\n\
icNiwElKjIE8RlQVp44YDVSLvFFH8J7TtTpTR09zw+bNWNFuOXjoMKfOzPCPmzaSuBQRxTDAXhGA\n\
y+oDqopoUS1c8DhN+Pkz40RTfv/cESYm5+jsGaTaPcCv9p3gP/7rp+zd/yLOJxw+epbdeyZ5fNez\n\
HPrjMUQTvv3fP+LFw6fo7e7m2w88gmhx9aLRXbqEXjaA7q4qoh71Kd4HVD0nT9d5+NHf8NK8o3a2\n\
zk9/vo8jx04zfaLGlz//cQ5N1jkyLczMpSRplZtu3MTVa0YwYPrkGW6/7QbWv2UNQwN9mChC0QdM\n\
3dJH4GXa2IwV/T08e/AYd91+A+/euomDE4f55TN/4J03X4+I8OH338zjT+zm+reuYsP6NW1hZnh6\n\
e3r4l3//Xx586Eluu+XGopm9nvPA/3dWruilt7ez/byst4uJF6bYcuOGNsg8Lz1pCzTmZwF45LEn\n\
2fy2tdyw6VqeO/AnFprzQOfrB6Ber7+MkOqrDKwcYmHhF+cB9ffSt7yb7/3gKa65ephnD/yJD7zv\n\
9lLNOmbn5gE4N1NnzeohnHNsWL+aY9PnWi25tLi0AGq1GlddNYBIwLmEPM9R16BvWZUvfnYb6grF\n\
uPXWzYDwzps3cfxEjdtu2UyWJYgoK1f0sXzqFCLKRz94N4//+Gl+s/cQMc+57rprGRocBBUQg+iW\n\
FsDU1BRvWtZTdtGAc44oxTTV1dWJxVnMiioi4kjSDlYN9RdTVtkXsqzCrTdtApQQYNvoLS01V5pg\n\
SKE1yMnz/JJ66BUDGB8fZ2iwvwAgvtTzOeCK0opg0QozKSQBgqpiOEQcqF2geRZ7WPAIWjigGJ6X\n\
VsxNTEzQ399TzKztZlO0fIvFc7RIbtCqfqpSRAAFWiXSl2LNFitR1cIZUipR4y8OMpddRl944Xmu\n\
GhkqQoyAcf53UcyUGB15VPJcCovFa2ZalsjCwyDF4NIyKb+nbJSiBaAkSZYGwM6dO23Xrp9wxx13\n\
Fl43w1pS1ygjUihVMy1N2k62lm4o+W6imMW2FTR0SCkUBSlF4xIl8dTUFB/70B1UKykL9ZOYWJln\n\
0m4+xb4nomrlpQoKiRTvtXS+mIIqqpWLhBaggpiVjim00GsaKVs7mb179/K+94yWnAeLBtEwYtuz\n\
IkXC+lIzAWj52vlktKJEGkQWFlNBBMwRpQBgllOv11/7QGNmdv/99/PVr9xDY/YEZpGjR6fJmw1+\n\
t+8A0ydO87v9E1iMdHV20NPTwdrVg1y3YR0iMDzUX0Shve2JCBGJzcUBUI/aAmbGi0eOsn/fBLVa\n\
bUkAFFOV5Xz34SewPOexH+1maNVaurs66ehezpprljEwMMDs7Cxnz9WYnDYe++b3mTlznGo1o7O7\n\
g5GhAa5dN8L1G69hYKAfs/ND/dSRUxydPsn4xCR/nDzC5ORRjk6f4t57721H81Vtp83MYowMDw/T\n\
bDYREbZs2cLo6CgDAwN0dnYiIsXGrtFAVQkhkOc58/PzqCr1ep3du3fT0dHBwYMHeeihh1BVVq9+\n\
8wWjqmdwcJD169ezbt06Nm7cSH9/P1mWMTIyQqVSkVe9Xm82m9ZsNpmdnWVubo5Go0GMsc3rVqK1\n\
nluc997jnGv/bOWImTE3N7do8WtmNJvN9hDvnCNJEpIkoVKp4L1/7btRVW17uDXge+9pbZtb1gr5\n\
hc8X7za994uoISLEGNvSoWVJkrw2Cl35L+UVAFcAXAFwBcClzv8B3eu58OmgDQoAAAAASUVORK5C\n\
YII=\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"paragraph\"><p>If you <em>really</em> mess up the Macros and can’t see how to fix them, just close the\n\
program without saving them, and reopen it.</p></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_controls\">3.7. Controls</h3>\n\
<div class=\"paragraph\"><p>The line of buttons under the waterfall is used to control the program (as\n\
opposed to the QSO). If you hover the mouse over these buttons, you’ll see a\n\
little yellow hint box appear which tells you what each button does.</p></div>\n\
<div class=\"paragraph\"><p>The first button switches between Waterfall, FFT and Scope modes. The next two\n\
buttons adjust the signal level over which the waterfall works. The default\n\
range is from 0dB downwards 70dB (i.e. to -70dB). Both of these values can be\n\
adjusted to suit your sound card and receiver audio level.</p></div>\n\
<div class=\"paragraph\"><p>The next button sets the scale zoom factor (visible display width, ×1, ×2 or\n\
×4), and the next three buttons move the visible waterfall area in relation to\n\
the bandwidth cursor.</p></div>\n\
<div class=\"paragraph\"><p>The next button selects the waterfall speed. NORM or SLOW setting is best unless\n\
you have a very fast computer.</p></div>\n\
<div class=\"paragraph\"><p>The next four buttons (two on either side of a number, the audio frequency in\n\
Hz) control the receiving frequency (they move the red cursor lines).</p></div>\n\
<div class=\"paragraph\"><p>The <code>QSY</code> button moves the signal under the bandwidth cursor to a preset audio\n\
frequency (typically, the centre of the transceiver’s passband). The Store\n\
button allows you to store or recall the current frequency and mode. See the\n\
<a href=\"http://www.w1hkj.com/FldigiHelp/index.html\">Online Documentation</a> for details on these functions.</p></div>\n\
<div class=\"paragraph\"><p>The <code>Lk</code> button locks the transmit frequency (and illuminates a green marker), and the\n\
<code>Rv</code> button turns the signal decoding upside down (some modes are sideband\n\
sensitive, and if they are the wrong way up, can’t be received\n\
correctly). Remember to turn this one off when you’re done, or you won’t receive\n\
anything! If every signal you hear is upside down, check your transceiver\n\
sideband setting.</p></div>\n\
<div class=\"paragraph\"><p>The <code>T/R</code> button forces the transmitter on or off.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Caution\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJfElEQVR42uyYc3RewRbFi6SPtW3b\n\
tm1EtW3btm03qd3GtpMyxqrdb+5N95sz63t3ddZNbfxxysyd396zz7lIAeCXrr8CvkH9FfBXQFxc\n\
HHx9fbWiv/8yAsLCwjB37lxUqVJFKysrK5w8eRI/vQAbGxukSZOGXzVFsrVgwQL8tAJOnDgBU1NT\n\
An1vLVy4ED+dgKNHjyJlypQSaLGC2bFxyUi0a1xGJ2Lx4sX4aQQcOnQIJiYmEmD7puXxKuYS1MjD\n\
UO+5YNLAhjoRS5cuxQ8XsH//fqROnVoC69isAgyxl6DcXAPlxiooYcuh3t2NCf3q6UQsW7YMP0zA\n\
nj17dPBdWlaCIe4yB+fw4augcngldAmUkIVQbm/DuD61dCJWrFiB7y6AMp8qVSoJpFubKmAEf3Mt\n\
1HCj80Z4NXgelKDZUG5twthe1XUiVq1ahe8mYNu2bTp4s3bVhPPqjbUiNkn3bJCUeARqzG4kJRyC\n\
EjwXSuAMXlP5/6/DaMvK0noaAKtXr8Y3F7B582baTB8bIzw5r97ZAuWFE0YO64opEyyxYfVoDO9d\n\
H0/cJ0DxnwjmN46fzkqMNC+vE7F27Vp8MwEbNmyAHr4yGMHfXAfRsOE883c3wd1xuy4m+xe3heI3\n\
HorvGCg+I8BCFmN4jzI6EevXr8dXF7BmzRodfN9udcDedj58BW9anvlb6+B4bYNOgMt+Cy5gNJjP\n\
SDDvoWBeg8CC5mNot5I6EWTWVxPAHdHBDDCrCyX+Cm/YdVzAaijatFnE/20FPJ03Q4ZKgccuw4zw\n\
w6B4DQbz7A/m0RcscBYGdy6mE7Fp0yZ8sQA+p3Xwgy3qC3jNeYIPW0rwvOZzIfMR4rtTWlMoT3oO\n\
P0IP794TzM0SzH8KBnUqrBNBPffZAhwcHHTwQywbELzIvBiVPDaa8yHGURk4E/eij0rr2tQvKMEr\n\
GrwFmKsZmEs3ML8JGNC+gE6El5cXPlUAPc/TI7AePuEqNHjhvAwvRmXANCQ9tkYaUxNt7cTelQS8\n\
4jnA6Hwv4bwG79wZzKkDDD6j0b9dXmnf2bNng3g+ScCVK1eki9SpUgQqwYs5v9rYsMbYBM/jJZyH\n\
mPP+k5B0bzcKFciurd82qwHYh+Ad2sJg3woGr2GoWCyttD+9FH2RAG9Ha6PzvGEJnmITuggqd14N\n\
mmN0XsCLUalGrUGr5pW09de2tIEM34PDdzXCtwdzbMMFtITBrhmvxpjeq8DXFTBxUFOaNmLOC+dD\n\
yXnesAJ+pogN4/BMzPmxYCFTMWdaN219+MmuGryBO28wOm9w7MDhhfNgds0FvMG2IUZ1yf1FAqgH\n\
6FVQu0COrOlwbscAAa+S8xxe1eCF87w4vN9YKMZR6X15vLb+oa0FF2DJBfw/Np1gcOpgdL4VF0Dw\n\
TcBsG+DSijLInE7rH9GLPj4++OQptGjRIsmFArkzwuPEcNGwIvNBlHlyfjKHn8Dh6Q47SsAzMW0G\n\
oHuzQiiWLx2Ht5IyT/AGcp7DMw7PhPMNYLumLCoV+6+07/Lly/HmzRtRnySATiFr1qzSxXJlS4vr\n\
u/tADRTw3H0O7zdBOM98R0HxHs5rMP/7CKh3Z0ONWYgnnoN1DUvwTDjfTDhPsXHeWB61ysjNmyVL\n\
FiQmJhK8Vp90IwsJCUHu3Lnli2b8N85vMTM2rOa8gGdeQ3gNgBI2EXeDF2PGpFbo3L48rJfWkeEd\n\
hfMSfPs6maR90qZNC1dXVyiKAlVVkZSUpBPxQQH0w7dv30amTPLF06f9B2zWdBQNK2Ljw50neM+B\n\
ENPGqz8O7+oLDebfJnhh105znr3lvNuW8ujZPJt0ffo4QIPk1atXMBgMJIIEJCvivfBUtCgqKgol\n\
S8oPXf/+pwkOLG7BBQjnjXO+H897b5H5RDtLpPuv+MSCPm3yGzPfWnLeY2tFjO6aS7ouvV/T297j\n\
x4/x7NkzvHz5UohgjCUr4oPwVORATEwMypeXn+HTmKbC7nmNufvceU8O70HwNOfNxah029EYW6dW\n\
RNy55iI2hrfgI45VxwSz3LpHB3rZp73u3buHR48eSSKSO4kPCqBFr1+/xosXL8RJVKtWDbJjKbF2\n\
Uk1EnutqhDfj1R0GLfPtRGxk+BpYMCC/7llrzJgxCAoKotiSCNHAJOLp06cUJzoFXT+8F55+mJST\n\
A3SkDx48wJ07d1C3bl3d4/KmKTUQebYjmEt3Xl24gA5abAz2LTh8UzAOH8mdXze6EFKlkuHNzc3h\n\
6OgIb29v0PCgfWJjY3H//n2x9/Pnz8lIMvSDAnTu0zGSE+QIOUPfP+vXr6//TDKyAiJOt9acNzjo\n\
Y7N3WjGYmsgvR82bN8eZM2dE4zo5OWkiIiIiEB8fj4cPHyZ/Ch8jgBbRYhKQkJAgYnTr1i0EBgai\n\
VatWOhGLhpZGpE3Ttxq2KYdvJOCt55fkzS9/EKhZsyaOHz+O06dP4/z587C1tYWLiwv8/f1pH+0U\n\
iIGS8DkC6AQ0AdHR0XRh4ZCfnx86dOigz3KPQrh7oj53n+ApNjVwZWVZHXzZsmWxd+9eHDlyBPRt\n\
9ezZs7h48SLs7e3h6emJ8PBw2o8aWjqBj2hiTYDWA0+ePCEnxLP53bt36eLiFOg5xczMTP/a2S4P\n\
7hytJUalzYKSyJlZ/mpdqFAhbNmyBfRpkn9nkgTY2dmRAIoqCdBOQOqBT51C1ER0CuQG9QE1GW0Q\n\
EBBAmyUrokyh/2BI+5zIllH+ap0zZ056cRfukwBra2vRA5cuXRLw7u7u/+vNDk4choEogJaQQzpK\n\
wI346Lt7cBM+Gtdkd+AmtDzDD6x2s4gk7GEgJEj/z9ef0TiOhQgGVxdMK32QF00XmWOzWBI6giR4\n\
MycBDOgwDPn34mlcr9cyTRPyp/LeKfA+2/A+MZysfdUbLJi/2adplKjtRAkbxk46xbZtDzuN45h/\n\
7n7E5XIpptxlWRCP36O4PexV3wO5yBRv+yiRqG9kKkhCYWtvCjunAVxxr+ta+r4vXdeV+/1ebrfb\n\
OdfP86zbnFbR8z2wI73vO9IUt5c90/9jnXi/fZh7lkiSoEosBYxaCk4iCPGyvk5lxWmyFEhTW/2o\n\
I2v0eutdlBTPHFT3/ZZx+iVLAQOaIs+FR1EkFSOFJec7v1E5844OZw+CECZTKPLBbn2geclSwIAC\n\
l5CWl9Ejp3Mch8++C+FvZENY5Bmgxv5YAqKemYAmIW0XoRAU+SxCMGtjj3rSFJ9OoE6iTiakEiFY\n\
kfs7/u0dGbB34x188QWUsORZr63Z8gAAAABJRU5ErkJggg==\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"paragraph\"><p>Use the <code>T/R</code> button with care, as it will stop transmission immediately, losing\n\
whatever is in the buffer (what you have typed in the Transmit pane), or start\n\
it immediately, even if nothing is ready to transmit.</p></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
<div class=\"paragraph\"><p>There are two further controls in the bottom right corner of the program, to the\n\
right of the Status line:</p></div>\n\
<div class=\"dlist\"><dl>\n\
<dt class=\"hdlist1\">\n\
<code>AFC</code> (AFC) control\n\
</dt>\n\
<dd>\n\
<p>\n\
When this button is pressed, an indicator on the button turns yellow, and the\n\
program will automatically retune to drifting signals. When the button is\n\
again pressed, AFC is off, and the tuning will stay where you leave it.\n\
</p>\n\
</dd>\n\
<dt class=\"hdlist1\">\n\
<code>SQL</code> (Squelch) control\n\
</dt>\n\
<dd>\n\
<p>\n\
When off (no coloured indicator on the button), the receiver displays all\n\
“text” received, even if there is no signal present, and the receiver is\n\
simply attempting to decode noise. When activated by pressing the button, the\n\
indicator turns yellow. If the incoming signal strength exceeds that set by\n\
the adjacent slider control (above the <code>SQL</code> button), the indicator turns\n\
green and the incoming signal is decoded and printed. The signal strength is\n\
indicated on the green bar beside the Squelch level slider. If nothing seems\n\
to be printing, the first thing to do is check the Squelch!\n\
</p>\n\
</dd>\n\
</dl></div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_status_line\">3.8. Status Line</h3>\n\
<div class=\"paragraph\"><p>At the very bottom line of the Fldigi window is a row of useful information. At\n\
the left is the current operating mode. Next (some modes) is the measured\n\
signal-to-noise ratio at the receiver, and (in some modes) the measured signal\n\
intermodulation level (IMD).</p></div>\n\
<div class=\"paragraph\"><p>The larger central box shows (in DominoEX and THOR modes) the received\n\
<em>Secondary Text</em>. This is information (such as station identification) which is\n\
transmitted automatically whenever the transmitter has completed all user text\n\
that is available to send. It is transmitted using special characters, and is\n\
automatically directed to this special window. Secondary text you transmit is\n\
also shown here. This box changes size when you enlarge the program window.</p></div>\n\
</div>\n\
</div>\n\
</div>\n\
<div class=\"sect1\">\n\
<h2 id=\"ref-operating\">4. Operating</h2>\n\
<div class=\"sectionbody\">\n\
<div class=\"sect2\">\n\
<h3 id=\"_procedure\">4.1. Procedure</h3>\n\
<div class=\"paragraph\"><p>Operating procedure for digital modes is similar to that for Morse. Some of the\n\
same abbreviations are used. For example, at the beginning of an over, you might\n\
send <code>VK3XYZ de WB8ABC</code> or just <code>RR Jack</code> and so on. At the end of an over, it\n\
is usual to send <code>ZL1ABC de AA3AR K</code>, and at the end of a QSO <code>73 F3XYZ de 3D2ZZ\n\
SK</code>. When operating in a group or net it is usual to sign <code>AA3AE es gp de ZK8WW\n\
K</code>.</p></div>\n\
<div class=\"paragraph\"><p>It is also considered a courtesy to send a blank line or two (press <code>Enter</code>)\n\
before any text at the start of an over, and following the last text at the end\n\
of an over. You can also place these in the macros. The purpose is to separate\n\
your text from the previous text, and especially from any rubbish that was\n\
printed between overs.</p></div>\n\
<div class=\"paragraph\"><p>Fldigi does all of this for you. The Function Keys are set up to provide these\n\
start and end of over facilities, and can be edited to suit your preferences. In\n\
order that the other station’s callsign can appear when these keys are used, you\n\
need to set the other station’s callsign in the log data — it does not matter if\n\
you use the log facility or not.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Note\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJXElEQVRo3u2ZW4xcZ5HHf1Xf951z\n\
uudqD2PPxRPs2AnGTlg7K0jihDiBJIzA4g5P8IDywOUBgUBaZK3EC/JK2dU+IMFmxQMrJavdDCgo\n\
SOQCwUYBh4ADCIOdYM84YYjHl/Gt7UnPTE+fr/bhnG57nAXHyQSC5E8qzZxudc/3r/pX1b9qxMz4\n\
ez7K3/m5AuAKgL8lgLGxMRsdHbW+vj7r6+uz0dFRGxsb+6tWBXm1VWj79u02/sB9bN92J5XpY+Rn\n\
TnFqdoavT9ZY94nPsGPHDnnDRmBsbMzGH7iPHe96B+nk88wfeI54ZIrlMzN8bVXK+AP38eCDD9ob\n\
NgKjo6N27+oOKrVTzP9+LxocziviFeeF02kn/+zW8OijjxZ/RETeUBHYs2cPPVlG8w/7CNVAqARC\n\
FkiyQMgSBkdWsWfPHmKMAFh5Xg8A/rLCJWIiQqVSIT82SagG1CvqFBcU9UUkdHiYubmn8f5lX28i\n\
gojgnFv0RpIkpGna/kyz2aTRaHDu3DlZSgCcOfZbPvCRezg5fZwVWSguHAoQ6h2udxk1Ejo7K/zs\n\
h99i2bJuujorZFmKqtJmk1wIIBZkEEVEy6jBqmvuxszsL1HwsgB472mc3ccH77qKf/3WTv5tQw++\n\
mqAl9/3QavL+q/nPXXs5WzvLzPEn8fMZ2lUhZgHnpARwEXPFgSaIZoiEAgBGmqbEGF8WrVedA0V4\n\
lffeeT2dt27ky/trTDcDumIQ9w9bOd0xzFfGnmBmfB/RIo2FnBghj5FWCkQTDIdpdt4kgKQgCWgC\n\
LkM0bQNYMgqFEIg41Kd87lPv4pPPHOKepycZ3/U88AtuGuhlW7XJ2r7AU9lKZl5q0N2VEU3Jo+Lw\n\
gBQet/MXE00QDYVJAqKYRNI0Jc9zQghLE4FKpYKqw/uENMv4wqfv4re1Ov+zoYtfvX053xhR1mbC\n\
tl8fZ+uWtbw0mzM3ZzQXhIiC+NICoh1tgwASyggEEI8Q8N4vbQTSNEXF43yC88Z1bxlhx/YP8U/f\n\
eYr9vz6MGTTzyB1b1tFZzZhvROYWjHMvLRDSBKfgvOLEYeSLIgCuBOfKhDacc1yq+l42hdR7RAPq\n\
IiHNeOu1q/jSZ+9m5twMj+zcz4GJ43R1ZQTvUfUYiqljds5QB5koooq7uMS2L1/SDOOV9L/LAuCc\n\
Q8QjmhC8kKQLVCoVurvmUTHu3rqet20Yptk0li3vIkkCgsNrwIeAmbCQQxSo+D/D6FaVski8IPmX\n\
DADicK6gUPCBjmpGnldwKlQrGStXLKfZjIgolWrRnAyl2RScKkkaLuoBgOsBrWDSBTYHoiBckv+X\n\
DSDGCCaAEHxCkgbyPMWsShocC80m0UBR1DmS4HGqpFmGiKLOE6MS1AN5cfFFp1FcHsHQpQdQr9dR\n\
VVQE54TEJ1iaguWkwZPnOSCIFpcIwZMkgTRNgLJbO4cLKaYJSPUCkZGXzM8Q8jaFlj4CIqhz5FEI\n\
icNiwElKjIE8RlQVp44YDVSLvFFH8J7TtTpTR09zw+bNWNFuOXjoMKfOzPCPmzaSuBQRxTDAXhGA\n\
y+oDqopoUS1c8DhN+Pkz40RTfv/cESYm5+jsGaTaPcCv9p3gP/7rp+zd/yLOJxw+epbdeyZ5fNez\n\
HPrjMUQTvv3fP+LFw6fo7e7m2w88gmhx9aLRXbqEXjaA7q4qoh71Kd4HVD0nT9d5+NHf8NK8o3a2\n\
zk9/vo8jx04zfaLGlz//cQ5N1jkyLczMpSRplZtu3MTVa0YwYPrkGW6/7QbWv2UNQwN9mChC0QdM\n\
3dJH4GXa2IwV/T08e/AYd91+A+/euomDE4f55TN/4J03X4+I8OH338zjT+zm+reuYsP6NW1hZnh6\n\
e3r4l3//Xx586Eluu+XGopm9nvPA/3dWruilt7ez/byst4uJF6bYcuOGNsg8Lz1pCzTmZwF45LEn\n\
2fy2tdyw6VqeO/AnFprzQOfrB6Ber7+MkOqrDKwcYmHhF+cB9ffSt7yb7/3gKa65ephnD/yJD7zv\n\
9lLNOmbn5gE4N1NnzeohnHNsWL+aY9PnWi25tLi0AGq1GlddNYBIwLmEPM9R16BvWZUvfnYb6grF\n\
uPXWzYDwzps3cfxEjdtu2UyWJYgoK1f0sXzqFCLKRz94N4//+Gl+s/cQMc+57rprGRocBBUQg+iW\n\
FsDU1BRvWtZTdtGAc44oxTTV1dWJxVnMiioi4kjSDlYN9RdTVtkXsqzCrTdtApQQYNvoLS01V5pg\n\
SKE1yMnz/JJ66BUDGB8fZ2iwvwAgvtTzOeCK0opg0QozKSQBgqpiOEQcqF2geRZ7WPAIWjigGJ6X\n\
VsxNTEzQ399TzKztZlO0fIvFc7RIbtCqfqpSRAAFWiXSl2LNFitR1cIZUipR4y8OMpddRl944Xmu\n\
GhkqQoyAcf53UcyUGB15VPJcCovFa2ZalsjCwyDF4NIyKb+nbJSiBaAkSZYGwM6dO23Xrp9wxx13\n\
Fl43w1pS1ygjUihVMy1N2k62lm4o+W6imMW2FTR0SCkUBSlF4xIl8dTUFB/70B1UKykL9ZOYWJln\n\
0m4+xb4nomrlpQoKiRTvtXS+mIIqqpWLhBaggpiVjim00GsaKVs7mb179/K+94yWnAeLBtEwYtuz\n\
IkXC+lIzAWj52vlktKJEGkQWFlNBBMwRpQBgllOv11/7QGNmdv/99/PVr9xDY/YEZpGjR6fJmw1+\n\
t+8A0ydO87v9E1iMdHV20NPTwdrVg1y3YR0iMDzUX0Shve2JCBGJzcUBUI/aAmbGi0eOsn/fBLVa\n\
bUkAFFOV5Xz34SewPOexH+1maNVaurs66ehezpprljEwMMDs7Cxnz9WYnDYe++b3mTlznGo1o7O7\n\
g5GhAa5dN8L1G69hYKAfs/ND/dSRUxydPsn4xCR/nDzC5ORRjk6f4t57721H81Vtp83MYowMDw/T\n\
bDYREbZs2cLo6CgDAwN0dnYiIsXGrtFAVQkhkOc58/PzqCr1ep3du3fT0dHBwYMHeeihh1BVVq9+\n\
8wWjqmdwcJD169ezbt06Nm7cSH9/P1mWMTIyQqVSkVe9Xm82m9ZsNpmdnWVubo5Go0GMsc3rVqK1\n\
nluc997jnGv/bOWImTE3N7do8WtmNJvN9hDvnCNJEpIkoVKp4L1/7btRVW17uDXge+9pbZtb1gr5\n\
hc8X7za994uoISLEGNvSoWVJkrw2Cl35L+UVAFcAXAFwBcClzv8B3eu58OmgDQoAAAAASUVORK5C\n\
YII=\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"title\">Macro symbols</div>\n\
<div class=\"paragraph\"><p>Some Function Key Macro buttons have graphic symbols on them which imply\n\
the following:</p></div>\n\
<div class=\"hdlist\"><table>\n\
<tr>\n\
<td class=\"hdlist1\">\n\
<strong><code>>></code></strong>\n\
<br />\n\
</td>\n\
<td class=\"hdlist2\">\n\
<p style=\"margin-top: 0;\">\n\
The transmitter comes on and stays on when you use this button/macro.\n\
</p>\n\
</td>\n\
</tr>\n\
<tr>\n\
<td class=\"hdlist1\">\n\
<strong><code>||</code></strong>\n\
<br />\n\
</td>\n\
<td class=\"hdlist2\">\n\
<p style=\"margin-top: 0;\">\n\
The transmitter goes off when the text from this button/macro has been\n\
sent.\n\
</p>\n\
</td>\n\
</tr>\n\
<tr>\n\
<td class=\"hdlist1\">\n\
<strong><code>>|</code></strong>\n\
<br />\n\
</td>\n\
<td class=\"hdlist2\">\n\
<p style=\"margin-top: 0;\">\n\
The transmitter comes on, sends the text from this button/macro, and\n\
goes off when the text from this button/macro has been sent.\n\
</p>\n\
</td>\n\
</tr>\n\
</table></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
<div class=\"paragraph\"><p>The Macros are set up to control the transmitter as necessary, but you can also\n\
switch the transmitter on at the start of an over with <code>Ctrl</code> and <code>T</code> or the TX\n\
macro button, and off again with <code>Ctrl</code> and <code>R</code> or the RX macro button. If you\n\
have Macros copied into or text already typed in the Transmit pane when you\n\
start the transmitter, this is sent first.</p></div>\n\
<div class=\"paragraph\"><p>Calling another station you have tuned in is as simple as pushing a button. Put\n\
his callsign into the log data (right click, select Call) and press the <code>ANS</code>\n\
Macro button (or F2) when you are ready. If he replies, you are in business!\n\
Then press <code>QSO</code> (F3) to start each over, and <code>BTU</code> (F4) to end it, and <code>SK</code>\n\
(F5) to sign off.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Note\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJXElEQVRo3u2ZW4xcZ5HHf1Xf951z\n\
uudqD2PPxRPs2AnGTlg7K0jihDiBJIzA4g5P8IDywOUBgUBaZK3EC/JK2dU+IMFmxQMrJavdDCgo\n\
SOQCwUYBh4ADCIOdYM84YYjHl/Gt7UnPTE+fr/bhnG57nAXHyQSC5E8qzZxudc/3r/pX1b9qxMz4\n\
ez7K3/m5AuAKgL8lgLGxMRsdHbW+vj7r6+uz0dFRGxsb+6tWBXm1VWj79u02/sB9bN92J5XpY+Rn\n\
TnFqdoavT9ZY94nPsGPHDnnDRmBsbMzGH7iPHe96B+nk88wfeI54ZIrlMzN8bVXK+AP38eCDD9ob\n\
NgKjo6N27+oOKrVTzP9+LxocziviFeeF02kn/+zW8OijjxZ/RETeUBHYs2cPPVlG8w/7CNVAqARC\n\
FkiyQMgSBkdWsWfPHmKMAFh5Xg8A/rLCJWIiQqVSIT82SagG1CvqFBcU9UUkdHiYubmn8f5lX28i\n\
gojgnFv0RpIkpGna/kyz2aTRaHDu3DlZSgCcOfZbPvCRezg5fZwVWSguHAoQ6h2udxk1Ejo7K/zs\n\
h99i2bJuujorZFmKqtJmk1wIIBZkEEVEy6jBqmvuxszsL1HwsgB472mc3ccH77qKf/3WTv5tQw++\n\
mqAl9/3QavL+q/nPXXs5WzvLzPEn8fMZ2lUhZgHnpARwEXPFgSaIZoiEAgBGmqbEGF8WrVedA0V4\n\
lffeeT2dt27ky/trTDcDumIQ9w9bOd0xzFfGnmBmfB/RIo2FnBghj5FWCkQTDIdpdt4kgKQgCWgC\n\
LkM0bQNYMgqFEIg41Kd87lPv4pPPHOKepycZ3/U88AtuGuhlW7XJ2r7AU9lKZl5q0N2VEU3Jo+Lw\n\
gBQet/MXE00QDYVJAqKYRNI0Jc9zQghLE4FKpYKqw/uENMv4wqfv4re1Ov+zoYtfvX053xhR1mbC\n\
tl8fZ+uWtbw0mzM3ZzQXhIiC+NICoh1tgwASyggEEI8Q8N4vbQTSNEXF43yC88Z1bxlhx/YP8U/f\n\
eYr9vz6MGTTzyB1b1tFZzZhvROYWjHMvLRDSBKfgvOLEYeSLIgCuBOfKhDacc1yq+l42hdR7RAPq\n\
IiHNeOu1q/jSZ+9m5twMj+zcz4GJ43R1ZQTvUfUYiqljds5QB5koooq7uMS2L1/SDOOV9L/LAuCc\n\
Q8QjmhC8kKQLVCoVurvmUTHu3rqet20Yptk0li3vIkkCgsNrwIeAmbCQQxSo+D/D6FaVski8IPmX\n\
DADicK6gUPCBjmpGnldwKlQrGStXLKfZjIgolWrRnAyl2RScKkkaLuoBgOsBrWDSBTYHoiBckv+X\n\
DSDGCCaAEHxCkgbyPMWsShocC80m0UBR1DmS4HGqpFmGiKLOE6MS1AN5cfFFp1FcHsHQpQdQr9dR\n\
VVQE54TEJ1iaguWkwZPnOSCIFpcIwZMkgTRNgLJbO4cLKaYJSPUCkZGXzM8Q8jaFlj4CIqhz5FEI\n\
icNiwElKjIE8RlQVp44YDVSLvFFH8J7TtTpTR09zw+bNWNFuOXjoMKfOzPCPmzaSuBQRxTDAXhGA\n\
y+oDqopoUS1c8DhN+Pkz40RTfv/cESYm5+jsGaTaPcCv9p3gP/7rp+zd/yLOJxw+epbdeyZ5fNez\n\
HPrjMUQTvv3fP+LFw6fo7e7m2w88gmhx9aLRXbqEXjaA7q4qoh71Kd4HVD0nT9d5+NHf8NK8o3a2\n\
zk9/vo8jx04zfaLGlz//cQ5N1jkyLczMpSRplZtu3MTVa0YwYPrkGW6/7QbWv2UNQwN9mChC0QdM\n\
3dJH4GXa2IwV/T08e/AYd91+A+/euomDE4f55TN/4J03X4+I8OH338zjT+zm+reuYsP6NW1hZnh6\n\
e3r4l3//Xx586Eluu+XGopm9nvPA/3dWruilt7ez/byst4uJF6bYcuOGNsg8Lz1pCzTmZwF45LEn\n\
2fy2tdyw6VqeO/AnFprzQOfrB6Ber7+MkOqrDKwcYmHhF+cB9ffSt7yb7/3gKa65ephnD/yJD7zv\n\
9lLNOmbn5gE4N1NnzeohnHNsWL+aY9PnWi25tLi0AGq1GlddNYBIwLmEPM9R16BvWZUvfnYb6grF\n\
uPXWzYDwzps3cfxEjdtu2UyWJYgoK1f0sXzqFCLKRz94N4//+Gl+s/cQMc+57rprGRocBBUQg+iW\n\
FsDU1BRvWtZTdtGAc44oxTTV1dWJxVnMiioi4kjSDlYN9RdTVtkXsqzCrTdtApQQYNvoLS01V5pg\n\
SKE1yMnz/JJ66BUDGB8fZ2iwvwAgvtTzOeCK0opg0QozKSQBgqpiOEQcqF2geRZ7WPAIWjigGJ6X\n\
VsxNTEzQ399TzKztZlO0fIvFc7RIbtCqfqpSRAAFWiXSl2LNFitR1cIZUipR4y8OMpddRl944Xmu\n\
GhkqQoyAcf53UcyUGB15VPJcCovFa2ZalsjCwyDF4NIyKb+nbJSiBaAkSZYGwM6dO23Xrp9wxx13\n\
Fl43w1pS1ygjUihVMy1N2k62lm4o+W6imMW2FTR0SCkUBSlF4xIl8dTUFB/70B1UKykL9ZOYWJln\n\
0m4+xb4nomrlpQoKiRTvtXS+mIIqqpWLhBaggpiVjim00GsaKVs7mb179/K+94yWnAeLBtEwYtuz\n\
IkXC+lIzAWj52vlktKJEGkQWFlNBBMwRpQBgllOv11/7QGNmdv/99/PVr9xDY/YEZpGjR6fJmw1+\n\
t+8A0ydO87v9E1iMdHV20NPTwdrVg1y3YR0iMDzUX0Shve2JCBGJzcUBUI/aAmbGi0eOsn/fBLVa\n\
bUkAFFOV5Xz34SewPOexH+1maNVaurs66ehezpprljEwMMDs7Cxnz9WYnDYe++b3mTlznGo1o7O7\n\
g5GhAa5dN8L1G69hYKAfs/ND/dSRUxydPsn4xCR/nDzC5ORRjk6f4t57721H81Vtp83MYowMDw/T\n\
bDYREbZs2cLo6CgDAwN0dnYiIsXGrtFAVQkhkOc58/PzqCr1ep3du3fT0dHBwYMHeeihh1BVVq9+\n\
8wWjqmdwcJD169ezbt06Nm7cSH9/P1mWMTIyQqVSkVe9Xm82m9ZsNpmdnWVubo5Go0GMsc3rVqK1\n\
nluc997jnGv/bOWImTE3N7do8WtmNJvN9hDvnCNJEpIkoVKp4L1/7btRVW17uDXge+9pbZtb1gr5\n\
hc8X7za994uoISLEGNvSoWVJkrw2Cl35L+UVAFcAXAFwBcClzv8B3eu58OmgDQoAAAAASUVORK5C\n\
YII=\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"paragraph\"><p>When typing text, the correct use of upper and lower case is important:</p></div>\n\
<div class=\"ulist\"><ul>\n\
<li>\n\
<p>\n\
Modes such as RTTY and THROB have no lower case capability.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
In most other modes, excessive use of upper case is considered impolite, like\n\
SHOUTING!\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
Modes such as PSK31, MFSK16, DominoEX and THOR use character sets which are\n\
optimised for lower case. You should use lower case as much as possible in\n\
these modes to achieve maximum text speed. In these modes upper case\n\
characters are noticeably slower to send and also slightly more prone to\n\
errors.\n\
</p>\n\
</li>\n\
</ul></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_adjustment\">4.2. Adjustment</h3>\n\
<div class=\"paragraph\"><p>Most digital modes do not require much transmitter power, as the receiver\n\
software is very sensitive. Many modes (PSK31, THROB, MT63) also require very\n\
high transmitter linearity, which is another reason to keep transmitter power\n\
below 30% of maximum. Some modes (Hellschreiber, Morse) have high peak power\n\
output, which may not indicate well on the conventional power meter, another\n\
reason to keep the average transmitted power low to prevent a very broad signal\n\
being transmitted.</p></div>\n\
<div class=\"paragraph\"><p>Adjust the transmitter output power using the TUNE button, top right, beyond the\n\
Menu. The output will be the same as the peak power in other modes. Adjust the\n\
master Volume applet Wave Out and Master Volume controls to achieve the\n\
appropriate power. Use of excessive drive will result in distortion (signal\n\
difficult to tune in, and often poorer reception) and a very broad signal.</p></div>\n\
<div class=\"paragraph\"><p>Some multi-carrier modes (MT63 for example) may require individual adjustment as\n\
the average power may be rather low.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Tip\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJf0lEQVR42uyQiwmDIQyEw9MdHEVc\n\
yc3czQcK4uvKCX8nKLQFgSMkucB9EQB/rQvwIV2AC7D3BrXWwpzzaIzx1jPj/vH+BACDMFjvHa01\n\
1FqRc0ZKCTFGhBBOZc859/TRzzvefwWAn+RnGaaUAu89nHOw1kJrDaUURIT19MaYFy3mACRZtoTh\n\
p54JrsN6Htszbdu2pzXV06i2zd0eG49re3fM6LFt29b/8r/xKqbqxq2qrsWJyPXe+k7mnziJrKws\n\
/Pvf/8bly5dx48YN3L17l/+/8h1+71e9gNrj/OGDBw9Cp9Phrbfewt9G2sM7Voekonbk1s9FUesS\n\
lHQsg759KXSN85Fa2gX/pAIMGO2IN998ExkZGejt7cXVq1cZGX7vJ0XEZq8z9JSBXq9XPOwSmoap\n\
VbNQ3LYEmdWzET29A/6ZDXBProZTfAWc4srhklAJ77Q6hOS2IKmkB+mVM+EZlaX8/9nZ2Th9+jSu\n\
XbvG7/L7NkXDJvjHjx9j/fr1GDlyJMZ5hCOnZjaKWxcjtqADbomVmBJdAvuYUjjElsFRwHkBZ4F3\n\
SayCq5hbUrVcrAYeKbUIzG5GUuk7mOITjcGDB+PTTz/FxYsXGQ3+Tp8vYRP8u+++q2g6JKNcJLJY\n\
vPm2eLcCU6L0sBd4B4F31IIXcDcBdxdwwnum1sErrR7e6Q0Izm1FQEoJ+vXrh5kzZ+Ls2bNM+j5f\n\
wib439v1Q0JBqwIfktOEyQJu4nUxSsZZ4CkbxevG8ALuKeBeAk54n4xG+GY2wW9qM4LSq/AHu/7o\n\
6emhpPp8CasJS01SNvR8osAXtCyCT1ot4bUkI1aO0b5TMcAxBn+3j8Yw92Q4RpeYeN1bwH0E3FfA\n\
Ce+f1YKA7Fb4JpcyEnSWEgnKib9Pjp90AVYFJhY1HyqyYaL6CryxZNR6H+aZisHOcZiz/BNcunpd\n\
vPgEO/YdQV79fLXXFXB/AQ/IaUOgWFBuO1wjcjBgwADs3buXOaH8PjlsvgBDx9LGasOEJXxIbvNL\n\
r4upJUPv/3VKFL5f2wv1eSyezK1faAJPrxvAg/M6EDKtEwFZzRjpGIDk5GQcPnyY1YkcZqVkVjps\n\
LqzzLHU5tXNYMbQkY6J32mivVJg7G7YftAgfqutCWH43PBKUEo2vvvqK+UApkUdTSha9zyblGpbO\n\
ZiRwlSbw6ipjKJGTwnR4+OgxtM6lazcpGYvw4dPflki3YYx7BKKjo7F//342O7NRMKt9tnl22Oya\n\
WYgv6jKSjApeXWXEFr73HbTOZyu3wAAeJOBa8BEF7yCysAduMQV47bXXlG595swZ8mjmgtnKw9nm\n\
76PslXHAM6WGXtcske4aJZJVRte0GCs378Gtu/cVW/zRCvNeV8FHFc2Ab2oV/jp8Ejo6OpgLnJ00\n\
K5KmfB4+fKgMZj7x+ciunWu1q7KZTQrNx9iAHIzyycRwrzQM80jFUPcUDHNLxgivdGpfA14FLhYt\n\
8NHFM5WxY6JvAiIiIrB7924OgAqXWkZmSyenyhR9B2JFPpa6Ko213jOmEJ3z3sWn361H784DOHnm\n\
Iq7fvM18kNA/x43bd5FQOss8/P/BY/SzECsWVSBdPjwHw4cPp4zYF9Ql1fwFmPUcgTlFBmU3vawy\n\
ZrrqSPHwqbMXYenwEmlV86zDl8xGXOkcsdlwjcxjHiqN9OTJk+SyfgGWKz4+2Hmpf06RaskoXdVI\n\
7xNFPgeOnjYBPn3+CmYu+wR7Dh4HzwrJBxNwsSgz8PFlc5FQPk+aWi7s7OywevVqHD16VBkvyGf1\n\
AnxFsQ6Xd/+LHldMDa/uqh9+twlXb9zGDxt3o7T73xgflIf4/BYmneL97IbF2l4Xo2TiTOHF5koE\n\
chWOlStXMpHJ1fcLMAJlXf9US0YTXt2YvOW/GeGdgW17DoPnxNnLViUTL5Yg8IkCn1QxH/Els+AW\n\
ladE4McffzS5AJ1i9QLMgcKWxfS4ukRyELM4EkwJL0RSYTsMZ+OOQ9rwKq8nCjjhkysXIKagG16x\n\
0/l6sz0CzAG+YTMrehCQ1WTqdcMUKeBaXTVI/nqUz1R8u2YLDOe/X22AAi4WYwlewJOrFiKlehHC\n\
chrhKRcYOnSobTlgqEJ8gAel6hGZ32lRMoGqruopcnMIy1eGN8OZ8+73pl4XM5aMGj61ZjH8U8vh\n\
GJyOoKAg26qQoQ9wezB4rAvSKudowZvtqk4xpShtXQTj0738a22vixkkkyLwqQKfJvCJ5XOkr+jw\n\
95FTUFNTY1sfMHRidj7qL6tunkEyVuGZqPaRxXj/yzUwPnPf+9GSZEzg02uXIFzk45tQhFdffRXf\n\
fPMNdu3ape7E1mchzh5cffjETUO4yIjgAQbJWBgJeIFN2/fD+Hy6Ygvi1fAqyaQJOOFTKuZJ8ubD\n\
PiARgYGBWLVqlQ2zkGoaZehYh9OrZqu9jhAB1+qq7tL0tuw+DOOzdd8J6l0lGRV83VJk1C9DaHY9\n\
fBOLld9dsmSJehq17T3AOZx7G0f/WERM7zY/iBmVSP67d78wldCFKzdfel1MLZkMgc8U+JjCLnjH\n\
FWCcWxjCwsKwYsUK294D6hcZs54vIu5tQjIqVPDmuyqfjk/k/zcc+Z6ALjaVjAo+sXSmyLVA5KPD\n\
n/70J3z55ZfYsmWL7S8ydRT4JuXSiduCsOx6wvepq7LyXLx6U8rpU/y4eS+StSXzEj6+EH4iHXbe\n\
rq4urFu3zuY3sdmSyu0Al052/fojML3K1q6qkowRfMNyGde7Bb6A8LJ36s8lAqXzM7cSqorEELIO\n\
c+nESHhKlQjXdfa1q2rqPbVqAcKzGxR4Vh16nvA//PADdu7caX0vZOtmjm2ceuTSiXubsa7B8E2t\n\
RKQkt9JVNeFVkhFjmYzMa1b07p+kx3i3cGqesqHnCW/zZs6mS9AzDC/3Nix1E7xj4J2oR1BmHaLy\n\
OzlFimzm0+tygYUio7mI0/cgYlqryK9SqTJ+ScVwDFT+f1YbJiw1z+/+8rtR9SUYVmqTCca9DVcf\n\
3B78bcQU2AemwCNaxyGMf+Y4oMjNR7qqtySpS1gmBox2YIdlk2Kdp9dZbfi9X287/b/27EADoBCG\n\
wvD7v3U+xMEBsMEwqbvorrR/naYPuB1stXtasvF6oABXwyoDnWkR1kISVAnMsA08QJjmmT+iDzSF\n\
RrQkGZlSBL0eiCZ6tEAcL8JafeMWzY+/eU2hGdfIpHmsAricYeiL3y3ym75x31c1srSUVW09WkyV\n\
UgX1LVVKfvxTdj2deMnuBx6oBZbGaRwh8gAAAABJRU5ErkJggg==\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"paragraph\"><p>Where possible, use the area above 1200Hz on the waterfall.</p></div>\n\
<div class=\"ulist\"><ul>\n\
<li>\n\
<p>\n\
Below 1200Hz the second harmonic of the transmitted audio will pass through\n\
the transmitter filters.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
When using lower frequency tones, adjust the transmitter and audio level with\n\
great care, as the second (and even third) harmonic will appear in the\n\
transmitter passband, causing excessive signal width.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
A narrow (CW) filter in the rig is no help in this regard, as it is only used\n\
on receive. When you do use a narrow filter, this will restrict the area over\n\
which the receiver and transmitter will operate (without retuning of\n\
course). Try adjusting the passband tuning (if available).\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
Keep the sound card audio level to a minimum and set the transmitter gain to a\n\
similar level used for SSB.\n\
</p>\n\
</li>\n\
</ul></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
</div>\n\
<div class=\"sect2\">\n\
<h3 id=\"_waterfall_tuning\">4.3. Waterfall Tuning</h3>\n\
<div class=\"paragraph\"><p>When using this program, as with most other digital modes programs, tuning is\n\
generally accomplished by leaving the transceiver VFO at a popular spot (for\n\
example 14.070MHz, USB), and performing all the <em>tuning</em> by moving around within\n\
the software.</p></div>\n\
<div class=\"paragraph\"><p>The Fldigi software has a second “VFO” which is tuned by clicking on the\n\
waterfall. On a busy band, you may see many signals at the same time (especially\n\
with PSK31 or Morse), and so you can click with the mouse on any one of these\n\
signals to tune it in, receive it, and if the opportunity allows, reply to the\n\
station.</p></div>\n\
<div class=\"paragraph\"><p>The software “VFO” operates in a transceive mode, so the transmitter signal is\n\
automatically and exactly tuned to the received frequency. If you click\n\
correctly on the signal, your reply will always be in tune with the other\n\
station.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Important\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJ5UlEQVR42uxZA5RkyRKtsc21bdu2\n\
jWp3V21bO227e2xPjW3bto22x56JHzfPmzwnf7nq+++ec3d35r1+eSPiBjJaR0T/1fjLAAC4fv06\n\
Xbt2TeDKlSt0+fJlBfg7PMN7/0kGSOKVR4/SwtxcGvTVVxSq00kk3nILDfjiC1o1bBidPn2aLl68\n\
+A815h9CfEJQEMjaRXDHjjQkPJzKy8vpwoULMMRtI1wmj8MX5OSAmMMIYfgxDB060PIJE+jUqVOI\n\
iIzGv8SAG17Pf/55M4J/MHw1koE2DDEyfmNMKyigqqoqOn/+vMvRcJp8+eHD0LUZqQDG7/hv+/aU\n\
xprvHxNDppQU6vXRR+J5WN26yvsG7f3cd9+l0tJSOnv2rEtGuE0+hOHD8Gzblgp8fGj58uW0c+dO\n\
OspROnbsmMDONWtobHAwpdxxB0U1aWJmdM7bb1NRURGSHBXLKSPcIm9k/MqI++QTQXz//v10/Phx\n\
q9i7caOoSIk33YSIKEZkvfUWnThxwmkj3CIPrw/OzqbNmzfD0yDgEEweHpRy550U3qCBNELPGMzV\n\
rLCwkM6cOeOwnOxWG3hj4JdfmpH3adeOJo0cSQcPHsShTmOlyURJ0inCCPJgTGKHFBcXi5y4evWq\n\
XSPslsrxgYEK+UCGHyfqxBEjaNeuXdCuy5jSpQvFtGkjv+3FMHJU1y5cKHsFFOC0ASAP6/cuXWqW\n\
sPBSz6goJCo85TbGBgRQZOPG4vtBmpRiH3yQ9u3bR9XV1XTp0iWbUbCmezQYM93DQ/m+vrRp0yYq\n\
KSmxisTERPr000/p/fffp5iYGKvvoXwe3LaNur/yiswHo5bU/Q0GOnLkCJqdzXywKp25mZkKeX9G\n\
+EMP0bJly5CwONwiojg6AezVLzlvHmRPNuGy6e/vr7xTVlamYDtLJvn22ym0Th1xlp/mrOWzZwtD\n\
z507Z7VbW/R+yYEDCvkgrXPOHDeOdu/ejUOt4rPPPqNvv/2WWrduzV/XSeAZdG0N02JjKbZdO3km\n\
pBp9//04D93aqpQsVp2xRqNiAD6WxaRQLm2RAH7//Xd6+umnQVpBRUWFTVRWVlK3l16i8Pr1ZcQ9\n\
GVP79UNTRH+QUrJqABK3eP9+s5aP4WvdunUofzZJoCrp9Xp6+OGHzQzYvn07SNrEzsWL0R8gJVkw\n\
wu65h7Zu3QrnyMHPogGwjMNk5n14oR+X0h07dtglgKrx/fff051M4u8NgAwcwQBO/rj27WVC6xnj\n\
e/akQ4cOWUxom94P1IaztWvXouTZPRwG/PrrrxYNwDNHsJMTmmcmpfKF3n035Is8MusNivZnpaUp\n\
BvgyehoMSCS7B9fU1AhkZGTQo48+qpB/7rnn8MxhDP76a4po1EiO6L/biIKsPChV8TffrHqftb9q\n\
1Sroz+phtbW1Cvr370+ff/451alTRxpgNBrxzGHsWboUY4Yi4+hnn0UUZC5IA7S6j9Ap3vdm5LCe\n\
kXyWDjl58qRFrF69mn788Ue66aabpAEL+dt45gyGfPONEgU9Y8mSJWhuGPbknCQMgEWjAwKUuo+w\n\
zZs8GTOL8mGE0AZQ7tALZB7cwp7E3zuLDdxzkm+7TYlCj5AQjDCQrBy5IR8x+cXfdJMyGcY+9hht\n\
2bLFjJwjgIwe4q7dsGFDyszMxN+5hPT77qPoZs1kPkY+9RStWbMGBUUmsw7yOb57t1npHMDW7tmz\n\
Bx9CyJzGDz/8QN+wDPD/rmKUXi8r0h9aX5g/fz6SWfCCjHSo/csGDVLko2esnDcPCYPo/MuBggKs\n\
GzkSUZC3NxjQVetJKNuQkQ4bAZOvr9J5jR064CV85F8K5mIGzgM5I/kxErnEoi9hyIOMdLC498cf\n\
K7U/6e23MX/gA04DbT80NJTeeecd+uqrrzB62/sZELGK0Z6eFN+pk+zMgdxjFvPIgYkY3HVIzp4f\n\
fqgY0DswEDUeH3AaGJ1RhW7mntK8eXN65ZVXrL6L6mcP06OjsQSQvcnAc9ZsHrMP8MQM7jrU9B4f\n\
fKAk8OisLHmAs3jssceUHgBYeg+55wg2jR8vEzkE/Fq2pClTpojBEdx18HT3999XDMjlRoQfdgUf\n\
8SKrHWtWI48IKM+ReM5gMxuQdvfdqoNHj6ZtfJNDIuu4KSgG+DICuYYjqZw9DEAOvPrqq5I8/1mu\n\
110BJJR6112Snw9L02QyYawQE7CIwFh+SW6QGd8zZg8f7s7BEqjV7qD7yy/LKmSEAXxLGzNmDEkD\n\
MB4sGzfObM/5DWNCQoLLB6NLuoMjXCqHffcdJXTurIzW4e+9R+NZVoiskBA6GpZTSSwbZZevAVPh\n\
FC6LVVy2HDkY84k72MLkBnAeZfJC4M8WLZTpWKwg4+Np6tSpYsQXSQyt46q4gDM7sm1bvGwV3V54\n\
gZbwSvzounVmB7v6Tw2vGrfz2WO8vcVmIoMlwv81WwL/xgjh8ty3b19asGCBHCfEKIFQoPNOGDqU\n\
IuSmzDLC6tWj+I4dKY3vqkN51pnE+8zVAwbQzhkzaMf06VRbVGSJJ55JjPXxoXF+fqgu+A6SFM0K\n\
V0k5NoRoXvfQRpsQvmrm5OTQ2LFjaf369SQ7MfSKjoalK1o09JXw5pv4iEOI4ImzS6tWQqtxHTo4\n\
BJCN5WhjI6ftghSp+GqkPaF7dlYEX1OzuDcNGzYMXRhNTMgHRUZeJ5HMuCzgQjJx4kTqnp5OsazF\n\
MG4c+PA/GIqXAzTSHhppb4aBIxPxyy9iy1fAsh0xYgQuRtA+NiBynFZWibAKRmzYsAHtWvxQT76L\n\
phgMFPXiixQqr5zOIVgjamT4gawGPUhrhH157gfpMNY51pEpKSmUn59PAwcOpEmTJonfP+zduxcT\n\
MnqUvJEpGznkA+YLXBhgKaIBQ1B38aFu3bqJC0o8a/hPXLyff578772XPFnDHkwA3rMAKQfAh3UP\n\
+DPZ4E8+ocgvvqDY2Fjh6XSOel5eHvXp0wfOQ7XBNRIlE8Pljd+nKWt3i3tRWIgOjeqELfHGjRvF\n\
h2bOnClyZDg3uQGcuL169RIHwqjU1FRKSkr6W6d2jCMhDEMB9OBAT0tFBQ01BRWnyVmyepG8QkHR\n\
RBSpdif2/7Y9zvfkcRw5hMX/MwxDnqaJk5gtjs7zXBheliWv65q3bUMUp3UZL69YVWFdx0HwSyNt\n\
7n/VBSDSih5jfBVCbCh2Iq/XEVDneQJmRsFcKbZ9318H8OM4dJKSFtd15fu+S2FSP4zehrSUkixA\n\
opdZLMf7xN0aiA+6QKdS6MJIYbbzYkiEGDVccUD9kCGBrI72J5pI0LY9WX2JIofDitMYz2lFisRI\n\
l055vQHkAcalAIkOQ2pGlADjgHA3lWt/8z+h4iFEariLw1KEjRhFvu/I+gAxxGAAc36O288ff9TO\n\
fll0/wFbNLSnMp35lwAAAABJRU5ErkJggg==\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"paragraph\"><p>You <strong>must not</strong> use RIT (Clarifier) when using digital modes.</p></div>\n\
<div class=\"ulist\"><ul>\n\
<li>\n\
<p>\n\
With RIT on, you will probably have to retune after every over.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
Use of the RIT will also cause the other station to change frequency, and you\n\
will chase each other across the band.\n\
</p>\n\
</li>\n\
<li>\n\
<p>\n\
Older transceivers without digital synthesis may have an unwanted offset\n\
(frequency difference) between transmit and receive frequencies. Such rigs\n\
should not be used for digital modes.\n\
</p>\n\
</li>\n\
</ul></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
<div class=\"paragraph\"><p>Wider digital modes (MT63, Olivia) can be tuned using the rig if necessary, as\n\
tuning is not at all critical. The software tuning still operates, but because\n\
the signal is so wide, there is limited ability to move around in the waterfall\n\
tuning.</p></div>\n\
</div>\n\
</div>\n\
</div>\n\
<div class=\"sect1\">\n\
<h2 id=\"ref-special-keys\">5. Special Keys</h2>\n\
<div class=\"sectionbody\">\n\
<div class=\"paragraph\"><p>Several special keyboard controls are provided to make operating easier.</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">Start Transmission</div><p>Press <code>Ctrl</code> and <code>T</code> to start transmission if there is text ready in the transmit\n\
buffer.</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">Pause Transmission</div><p>Press <code>Pause</code> or <code>Break</code> while in receive, and the program will switch to\n\
transmit mode. It will continue with the text in the transmit buffer (the\n\
Transmit pane text) from the current point, i.e. where the red (previously sent)\n\
text ends and the black (yet to be sent) text begins. If the buffer only\n\
contains unsent text, then it will begin at the first character in the\n\
buffer. If the buffer is empty, the program will switch to transmit mode, and\n\
depending on the mode of operation, will send idle characters or nothing at all\n\
until characters are entered into the buffer.</p></div>\n\
<div class=\"paragraph\"><p>If you press <code>Pause</code> or <code>Break</code> while in transmit mode, the program will return\n\
to receive mode. There may be a slight delay for some modes like MFSK, PSK and\n\
others, that requires the transmitter to send a postamble at the end of a\n\
transmission. The transmit text buffer stays intact, ready for the\n\
<code>Pause</code>/<code>Break</code> key to return you to the transmit mode .</p></div>\n\
<div class=\"paragraph\"><p>Pressing <code>Alt</code> or <code>Meta</code> and <code>R</code> has the same effect as <code>Pause</code>/<code>Break</code>. You\n\
could think of the <code>Pause</code>/<code>Break</code> key as a software break-in capability.</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">Escape</div><p>Pressing <code>Esc</code> while transmitting will abort the transmission. Transmission\n\
stops as soon as possible, (any necessary postamble is sent), and the program\n\
returns to receive. Any unsent text in the transmit buffer will be lost.</p></div>\n\
<div class=\"admonitionblock\">\n\
<table><tr>\n\
<td class=\"icon\">\n\
<img alt=\"Tip\" src=\"data:image/png;base64,\n\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJf0lEQVR42uyQiwmDIQyEw9MdHEVc\n\
yc3czQcK4uvKCX8nKLQFgSMkucB9EQB/rQvwIV2AC7D3BrXWwpzzaIzx1jPj/vH+BACDMFjvHa01\n\
1FqRc0ZKCTFGhBBOZc859/TRzzvefwWAn+RnGaaUAu89nHOw1kJrDaUURIT19MaYFy3mACRZtoTh\n\
p54JrsN6Htszbdu2pzXV06i2zd0eG49re3fM6LFt29b/8r/xKqbqxq2qrsWJyPXe+k7mnziJrKws\n\
/Pvf/8bly5dx48YN3L17l/+/8h1+71e9gNrj/OGDBw9Cp9Phrbfewt9G2sM7Voekonbk1s9FUesS\n\
lHQsg759KXSN85Fa2gX/pAIMGO2IN998ExkZGejt7cXVq1cZGX7vJ0XEZq8z9JSBXq9XPOwSmoap\n\
VbNQ3LYEmdWzET29A/6ZDXBProZTfAWc4srhklAJ77Q6hOS2IKmkB+mVM+EZlaX8/9nZ2Th9+jSu\n\
XbvG7/L7NkXDJvjHjx9j/fr1GDlyJMZ5hCOnZjaKWxcjtqADbomVmBJdAvuYUjjElsFRwHkBZ4F3\n\
SayCq5hbUrVcrAYeKbUIzG5GUuk7mOITjcGDB+PTTz/FxYsXGQ3+Tp8vYRP8u+++q2g6JKNcJLJY\n\
vPm2eLcCU6L0sBd4B4F31IIXcDcBdxdwwnum1sErrR7e6Q0Izm1FQEoJ+vXrh5kzZ+Ls2bNM+j5f\n\
wib439v1Q0JBqwIfktOEyQJu4nUxSsZZ4CkbxevG8ALuKeBeAk54n4xG+GY2wW9qM4LSq/AHu/7o\n\
6emhpPp8CasJS01SNvR8osAXtCyCT1ot4bUkI1aO0b5TMcAxBn+3j8Yw92Q4RpeYeN1bwH0E3FfA\n\
Ce+f1YKA7Fb4JpcyEnSWEgnKib9Pjp90AVYFJhY1HyqyYaL6CryxZNR6H+aZisHOcZiz/BNcunpd\n\
vPgEO/YdQV79fLXXFXB/AQ/IaUOgWFBuO1wjcjBgwADs3buXOaH8PjlsvgBDx9LGasOEJXxIbvNL\n\
r4upJUPv/3VKFL5f2wv1eSyezK1faAJPrxvAg/M6EDKtEwFZzRjpGIDk5GQcPnyY1YkcZqVkVjps\n\
LqzzLHU5tXNYMbQkY6J32mivVJg7G7YftAgfqutCWH43PBKUEo2vvvqK+UApkUdTSha9zyblGpbO\n\
ZiRwlSbw6ipjKJGTwnR4+OgxtM6lazcpGYvw4dPflki3YYx7BKKjo7F//342O7NRMKt9tnl22Oya\n\
WYgv6jKSjApeXWXEFr73HbTOZyu3wAAeJOBa8BEF7yCysAduMQV47bXXlG595swZ8mjmgtnKw9nm\n\
76PslXHAM6WGXtcske4aJZJVRte0GCs378Gtu/cVW/zRCvNeV8FHFc2Ab2oV/jp8Ejo6OpgLnJ00\n\
K5KmfB4+fKgMZj7x+ciunWu1q7KZTQrNx9iAHIzyycRwrzQM80jFUPcUDHNLxgivdGpfA14FLhYt\n\
8NHFM5WxY6JvAiIiIrB7924OgAqXWkZmSyenyhR9B2JFPpa6Ko213jOmEJ3z3sWn361H784DOHnm\n\
Iq7fvM18kNA/x43bd5FQOss8/P/BY/SzECsWVSBdPjwHw4cPp4zYF9Ql1fwFmPUcgTlFBmU3vawy\n\
ZrrqSPHwqbMXYenwEmlV86zDl8xGXOkcsdlwjcxjHiqN9OTJk+SyfgGWKz4+2Hmpf06RaskoXdVI\n\
7xNFPgeOnjYBPn3+CmYu+wR7Dh4HzwrJBxNwsSgz8PFlc5FQPk+aWi7s7OywevVqHD16VBkvyGf1\n\
AnxFsQ6Xd/+LHldMDa/uqh9+twlXb9zGDxt3o7T73xgflIf4/BYmneL97IbF2l4Xo2TiTOHF5koE\n\
chWOlStXMpHJ1fcLMAJlXf9US0YTXt2YvOW/GeGdgW17DoPnxNnLViUTL5Yg8IkCn1QxH/Els+AW\n\
ladE4McffzS5AJ1i9QLMgcKWxfS4ukRyELM4EkwJL0RSYTsMZ+OOQ9rwKq8nCjjhkysXIKagG16x\n\
0/l6sz0CzAG+YTMrehCQ1WTqdcMUKeBaXTVI/nqUz1R8u2YLDOe/X22AAi4WYwlewJOrFiKlehHC\n\
chrhKRcYOnSobTlgqEJ8gAel6hGZ32lRMoGqruopcnMIy1eGN8OZ8+73pl4XM5aMGj61ZjH8U8vh\n\
GJyOoKAg26qQoQ9wezB4rAvSKudowZvtqk4xpShtXQTj0738a22vixkkkyLwqQKfJvCJ5XOkr+jw\n\
95FTUFNTY1sfMHRidj7qL6tunkEyVuGZqPaRxXj/yzUwPnPf+9GSZEzg02uXIFzk45tQhFdffRXf\n\
fPMNdu3ape7E1mchzh5cffjETUO4yIjgAQbJWBgJeIFN2/fD+Hy6Ygvi1fAqyaQJOOFTKuZJ8ubD\n\
PiARgYGBWLVqlQ2zkGoaZehYh9OrZqu9jhAB1+qq7tL0tuw+DOOzdd8J6l0lGRV83VJk1C9DaHY9\n\
fBOLld9dsmSJehq17T3AOZx7G0f/WERM7zY/iBmVSP67d78wldCFKzdfel1MLZkMgc8U+JjCLnjH\n\
FWCcWxjCwsKwYsUK294D6hcZs54vIu5tQjIqVPDmuyqfjk/k/zcc+Z6ALjaVjAo+sXSmyLVA5KPD\n\
n/70J3z55ZfYsmWL7S8ydRT4JuXSiduCsOx6wvepq7LyXLx6U8rpU/y4eS+StSXzEj6+EH4iHXbe\n\
rq4urFu3zuY3sdmSyu0Al052/fojML3K1q6qkowRfMNyGde7Bb6A8LJ36s8lAqXzM7cSqorEELIO\n\
c+nESHhKlQjXdfa1q2rqPbVqAcKzGxR4Vh16nvA//PADdu7caX0vZOtmjm2ceuTSiXubsa7B8E2t\n\
RKQkt9JVNeFVkhFjmYzMa1b07p+kx3i3cGqesqHnCW/zZs6mS9AzDC/3Nix1E7xj4J2oR1BmHaLy\n\
OzlFimzm0+tygYUio7mI0/cgYlqryK9SqTJ+ScVwDFT+f1YbJiw1z+/+8rtR9SUYVmqTCca9DVcf\n\
3B78bcQU2AemwCNaxyGMf+Y4oMjNR7qqtySpS1gmBox2YIdlk2Kdp9dZbfi9X287/b/27EADoBCG\n\
wvD7v3U+xMEBsMEwqbvorrR/naYPuB1stXtasvF6oABXwyoDnWkR1kISVAnMsA08QJjmmT+iDzSF\n\
RrQkGZlSBL0eiCZ6tEAcL8JafeMWzY+/eU2hGdfIpHmsAricYeiL3y3ym75x31c1srSUVW09WkyV\n\
UgX1LVVKfvxTdj2deMnuBx6oBZbGaRwh8gAAAABJRU5ErkJggg==\" />\n\
</td>\n\
<td class=\"content\">\n\
<div class=\"paragraph\"><p>If you press <code>Esc Esc</code> (i.e. twice in quick succession), transmission stops\n\
immediately, without sending any postamble, and the program returns to\n\
receive. Any unsent text in the transmit buffer will be lost. Use this feature\n\
as an <strong>emergency stop</strong>.</p></div>\n\
</td>\n\
</tr></table>\n\
</div>\n\
<div class=\"paragraph\"><div class=\"title\">Return to Receive</div><p>Press <code>Ctrl</code> and <code>R</code> to insert the <code>^r</code> command in the transmit buffer at the\n\
current typing point. When transmission reaches this point, transmission will\n\
stop.</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">Move Typing Cursor</div><p>Press <code>Tab</code> to move the cursor (typing insertion point) to the end of the\n\
transmit buffer. This will also pause transmission. A <code>Tab</code> press at that\n\
position moves the cursor back to the character following the last one\n\
transmitted. Morse operation is slightly different. See the <a href=\"http://www.w1hkj.com/FldigiHelp/index.html\">Online Documentation</a> for CW.</p></div>\n\
<div class=\"paragraph\"><div class=\"title\">Send Any ASCII Character</div><p>Press <code>Ctrl</code> and (at the same time) any three-digit number (on the numeric\n\
keypad or the normal numeric keys) to insert the ASCII character designated by\n\
that entry value into the transmit buffer. For example, <code>Ctrl 177</code> is “±”\n\
(plus/minus) and <code>Ctrl 176</code> is “°” (degree). If you press a key other than the\n\
numeric keypad’s 0-9 the sequence will be discarded.</p></div>\n\
<h2 id=\"ref-credits\" class=\"float\">Credits</h2>\n\
<div class=\"paragraph\"><p>Copyright © 2008 Murray Greenman, <code>ZL1BPU</code>.</p></div>\n\
<div class=\"paragraph\"><p>Copyright © 2008-2009 David Freese, <code>W1HKJ</code>.</p></div>\n\
<div class=\"paragraph\"><p>Copyright © 2009 Stelios Bounanos, <code>M0GLD</code>.</p></div>\n\
<div class=\"paragraph\"><p>License GPLv3+: <a href=\"http://www.gnu.org/licenses/gpl.html\">GNU GPL version 3 or later</a>.</p></div>\n\
</div>\n\
</div>\n\
</div>\n\
<div id=\"footnotes\"><hr /></div>\n\
<div id=\"footer\">\n\
<div id=\"footer-text\">\n\
Last updated\n\
2021-08-17 20:21:22 \n\
</div>\n\
<div id=\"footer-badges\">\n\
<a href=\"http://validator.w3.org/check?uri=referer\">\n\
<img style=\"border:0;width:88px;height:31px\"\n\
src=\"http://www.w3.org/Icons/valid-xhtml11-blue\"\n\
alt=\"Valid XHTML 1.1\" height=\"31\" width=\"88\" />\n\
</a>\n\
<a href=\"http://jigsaw.w3.org/css-validator/\">\n\
<img style=\"border:0;width:88px;height:31px\"\n\
src=\"http://jigsaw.w3.org/css-validator/images/vcss-blue\"\n\
alt=\"Valid CSS!\" />\n\
</a>\n\
</div>\n\
</div>\n\
</body>\n\
</html>\n\n";
| 102,004
|
C++
|
.cxx
| 2,058
| 47.95967
| 200
| 0.778967
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,088
|
rxmon.cxx
|
w1hkj_fldigi/src/dialogs/rxmon.cxx
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#include "gettext.h"
#include "rxmon.h"
#include <config.h>
#include <FL/Fl_Tooltip.H>
#include <FL/Fl_Box.H>
#include <FL/filename.H>
#include <FL/Fl_File_Chooser.H>
#include "main.h"
#include "fl_digi.h"
#include "soundconf.h"
#include "icons.h"
#include "status.h"
#include "fileselect.h"
#include "audio_alert.h"
Fl_Check_Button *btn_mon_xcvr_audio=(Fl_Check_Button *)0;
static void cb_btn_mon_xcvr_audio(Fl_Check_Button* o, void*) {
progdefaults.mon_xcvr_audio = o->value();
}
Fl_Value_Slider2 *sldrRxFilt_bw=(Fl_Value_Slider2 *)0;
static void cb_sldrRxFilt_bw(Fl_Value_Slider2* o, void*) {
progdefaults.RxFilt_bw = o->value();
int bw2 = progdefaults.RxFilt_bw / 2;
progdefaults.RxFilt_low = progdefaults.RxFilt_mid - bw2;
if (progdefaults.RxFilt_low < 100) progdefaults.RxFilt_low = 100;
progdefaults.RxFilt_high = progdefaults.RxFilt_mid + bw2;
if (progdefaults.RxFilt_high > 4000) progdefaults.RxFilt_high = 4000;
sldrRxFilt_low->value(progdefaults.RxFilt_low);
sldrRxFilt_low->redraw();
sldrRxFilt_high->value(progdefaults.RxFilt_high);
sldrRxFilt_high->redraw();
progdefaults.changed = true;
audio_alert->init_filter();
}
Fl_Value_Slider2 *sldrRxFilt_mid=(Fl_Value_Slider2 *)0;
static void cb_sldrRxFilt_mid(Fl_Value_Slider2* o, void*) {
progdefaults.RxFilt_mid = o->value();
int bw2 = progdefaults.RxFilt_bw / 2;
progdefaults.RxFilt_low = progdefaults.RxFilt_mid - bw2;
if (progdefaults.RxFilt_low < 100) progdefaults.RxFilt_low = 100;
progdefaults.RxFilt_high = progdefaults.RxFilt_mid + bw2;
if (progdefaults.RxFilt_high > 4000) progdefaults.RxFilt_high = 4000;
sldrRxFilt_low->value(progdefaults.RxFilt_low);
sldrRxFilt_low->redraw();
sldrRxFilt_high->value(progdefaults.RxFilt_high);
sldrRxFilt_high->redraw();
progdefaults.changed = true;
audio_alert->init_filter();
}
Fl_Value_Slider2 *sldrRxFilt_low=(Fl_Value_Slider2 *)0;
static void cb_sldrRxFilt_low(Fl_Value_Slider2* o, void*) {
progdefaults.RxFilt_low = o->value();
int bw = progdefaults.RxFilt_high - progdefaults.RxFilt_low;
progdefaults.RxFilt_bw = bw;
sldrRxFilt_bw->value(bw);
sldrRxFilt_bw->redraw();
int mid = (progdefaults.RxFilt_high + progdefaults.RxFilt_low) / 2;
progdefaults.RxFilt_mid = mid;
sldrRxFilt_mid->value(mid);
sldrRxFilt_mid->redraw();
progdefaults.changed = true;
audio_alert->init_filter();
}
Fl_Value_Slider2 *sldrRxFilt_high=(Fl_Value_Slider2 *)0;
static void cb_sldrRxFilt_high(Fl_Value_Slider2* o, void*) {
progdefaults.RxFilt_high = o->value();
int bw = progdefaults.RxFilt_high - progdefaults.RxFilt_low;
progdefaults.RxFilt_bw = bw;
sldrRxFilt_bw->value(bw);
sldrRxFilt_bw->redraw();
int mid = (progdefaults.RxFilt_high + progdefaults.RxFilt_low) / 2;
progdefaults.RxFilt_mid = mid;
sldrRxFilt_mid->value(mid);
sldrRxFilt_mid->redraw();
progdefaults.changed = true;
audio_alert->init_filter();
}
Fl_Check_Button *btn_RxFilt_at_track=(Fl_Check_Button *)0;
static void cb_btn_RxFilt_at_track(Fl_Check_Button* o, void*) {
progdefaults.RxFilt_track_wf = o->value();
if (o->value() == 1) center_rxfilt_at_track();
}
Fl_Value_Slider2 *sldrRxFilt_vol=(Fl_Value_Slider2 *)0;
static void cb_sldrRxFilt_vol(Fl_Value_Slider2* o, void*) {
progdefaults.RxFilt_vol = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_mon_dsp_audio=(Fl_Check_Button *)0;
static void cb_btn_mon_dsp_audio(Fl_Check_Button* o, void*) {
progdefaults.mon_dsp_audio = o->value();
}
Fl_Double_Window* make_rxaudio_dialog() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(360, 230, _("Rx Audio Monitor"));
w = o; if (w) {/* empty */}
{ Fl_Check_Button* o = btn_mon_xcvr_audio = new Fl_Check_Button(50, 7, 70, 18, _("Monitor ON"));
btn_mon_xcvr_audio->tooltip(_("Rx audio stream ON"));
btn_mon_xcvr_audio->down_box(FL_DOWN_BOX);
btn_mon_xcvr_audio->callback((Fl_Callback*)cb_btn_mon_xcvr_audio);
o->value(progdefaults.mon_xcvr_audio);
} // Fl_Check_Button* btn_mon_xcvr_audio
{ Fl_Group* o = new Fl_Group(5, 84, 350, 141, _("Filter Settings"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Value_Slider2* o = sldrRxFilt_bw = new Fl_Value_Slider2(10, 118, 300, 20, _("BW"));
sldrRxFilt_bw->tooltip(_("Filter bandwidth"));
sldrRxFilt_bw->type(5);
sldrRxFilt_bw->box(FL_DOWN_BOX);
sldrRxFilt_bw->color((Fl_Color)206);
sldrRxFilt_bw->selection_color((Fl_Color)2);
sldrRxFilt_bw->labeltype(FL_NORMAL_LABEL);
sldrRxFilt_bw->labelfont(0);
sldrRxFilt_bw->labelsize(14);
sldrRxFilt_bw->labelcolor(FL_FOREGROUND_COLOR);
sldrRxFilt_bw->minimum(50);
sldrRxFilt_bw->maximum(4000);
sldrRxFilt_bw->step(10);
sldrRxFilt_bw->value(500);
sldrRxFilt_bw->textsize(14);
sldrRxFilt_bw->callback((Fl_Callback*)cb_sldrRxFilt_bw);
sldrRxFilt_bw->align(Fl_Align(FL_ALIGN_RIGHT));
sldrRxFilt_bw->when(FL_WHEN_CHANGED);
o->value(progdefaults.RxFilt_bw);
} // Fl_Value_Slider2* sldrRxFilt_bw
{ Fl_Value_Slider2* o = sldrRxFilt_mid = new Fl_Value_Slider2(10, 144, 300, 20, _("Mid"));
sldrRxFilt_mid->tooltip(_("Filter center frequ ency"));
sldrRxFilt_mid->type(5);
sldrRxFilt_mid->box(FL_DOWN_BOX);
sldrRxFilt_mid->color((Fl_Color)206);
sldrRxFilt_mid->selection_color((Fl_Color)2);
sldrRxFilt_mid->labeltype(FL_NORMAL_LABEL);
sldrRxFilt_mid->labelfont(0);
sldrRxFilt_mid->labelsize(14);
sldrRxFilt_mid->labelcolor(FL_FOREGROUND_COLOR);
sldrRxFilt_mid->minimum(400);
sldrRxFilt_mid->maximum(3500);
sldrRxFilt_mid->step(10);
sldrRxFilt_mid->value(1500);
sldrRxFilt_mid->textsize(14);
sldrRxFilt_mid->callback((Fl_Callback*)cb_sldrRxFilt_mid);
sldrRxFilt_mid->align(Fl_Align(FL_ALIGN_RIGHT));
sldrRxFilt_mid->when(FL_WHEN_CHANGED);
o->value(progdefaults.RxFilt_mid);
} // Fl_Value_Slider2* sldrRxFilt_mid
{ Fl_Value_Slider2* o = sldrRxFilt_low = new Fl_Value_Slider2(10, 170, 300, 20, _("Low"));
sldrRxFilt_low->tooltip(_("Filter low cutoff frequency"));
sldrRxFilt_low->type(5);
sldrRxFilt_low->box(FL_DOWN_BOX);
sldrRxFilt_low->color((Fl_Color)206);
sldrRxFilt_low->selection_color((Fl_Color)2);
sldrRxFilt_low->labeltype(FL_NORMAL_LABEL);
sldrRxFilt_low->labelfont(0);
sldrRxFilt_low->labelsize(14);
sldrRxFilt_low->labelcolor(FL_FOREGROUND_COLOR);
sldrRxFilt_low->minimum(100);
sldrRxFilt_low->maximum(3000);
sldrRxFilt_low->step(10);
sldrRxFilt_low->value(500);
sldrRxFilt_low->textsize(14);
sldrRxFilt_low->callback((Fl_Callback*)cb_sldrRxFilt_low);
sldrRxFilt_low->align(Fl_Align(FL_ALIGN_RIGHT));
sldrRxFilt_low->when(FL_WHEN_CHANGED);
o->value(progdefaults.RxFilt_low);
} // Fl_Value_Slider2* sldrRxFilt_low
{ Fl_Value_Slider2* o = sldrRxFilt_high = new Fl_Value_Slider2(10, 196, 300, 20, _("High"));
sldrRxFilt_high->tooltip(_("Filter high cutoff frequency"));
sldrRxFilt_high->type(5);
sldrRxFilt_high->box(FL_DOWN_BOX);
sldrRxFilt_high->color((Fl_Color)206);
sldrRxFilt_high->selection_color((Fl_Color)2);
sldrRxFilt_high->labeltype(FL_NORMAL_LABEL);
sldrRxFilt_high->labelfont(0);
sldrRxFilt_high->labelsize(14);
sldrRxFilt_high->labelcolor(FL_FOREGROUND_COLOR);
sldrRxFilt_high->minimum(500);
sldrRxFilt_high->maximum(4000);
sldrRxFilt_high->step(10);
sldrRxFilt_high->value(900);
sldrRxFilt_high->textsize(14);
sldrRxFilt_high->callback((Fl_Callback*)cb_sldrRxFilt_high);
sldrRxFilt_high->align(Fl_Align(FL_ALIGN_RIGHT));
sldrRxFilt_high->when(FL_WHEN_CHANGED);
o->value(progdefaults.RxFilt_high);
} // Fl_Value_Slider2* sldrRxFilt_high
{ Fl_Check_Button* o = btn_RxFilt_at_track = new Fl_Check_Button(156, 93, 70, 15, _("track WF cursor"));
btn_RxFilt_at_track->tooltip(_("Filter center freq tracks waterfall track point"));
btn_RxFilt_at_track->down_box(FL_DOWN_BOX);
btn_RxFilt_at_track->callback((Fl_Callback*)cb_btn_RxFilt_at_track);
o->value(progdefaults.RxFilt_track_wf);
} // Fl_Check_Button* btn_RxFilt_at_track
o->end();
} // Fl_Group* o
{ Fl_Value_Slider2* o = sldrRxFilt_vol = new Fl_Value_Slider2(10, 55, 300, 20, _("Vol\'"));
sldrRxFilt_vol->tooltip(_("Rx audio volume"));
sldrRxFilt_vol->type(5);
sldrRxFilt_vol->box(FL_DOWN_BOX);
sldrRxFilt_vol->color((Fl_Color)206);
sldrRxFilt_vol->selection_color((Fl_Color)2);
sldrRxFilt_vol->labeltype(FL_NORMAL_LABEL);
sldrRxFilt_vol->labelfont(0);
sldrRxFilt_vol->labelsize(14);
sldrRxFilt_vol->labelcolor(FL_FOREGROUND_COLOR);
sldrRxFilt_vol->maximum(100);
sldrRxFilt_vol->step(1);
sldrRxFilt_vol->value(50);
sldrRxFilt_vol->textsize(14);
sldrRxFilt_vol->callback((Fl_Callback*)cb_sldrRxFilt_vol);
sldrRxFilt_vol->align(Fl_Align(FL_ALIGN_RIGHT));
sldrRxFilt_vol->when(FL_WHEN_CHANGED);
o->value(progdefaults.RxFilt_vol);
} // Fl_Value_Slider2* sldrRxFilt_vol
{ Fl_Check_Button* o = btn_mon_dsp_audio = new Fl_Check_Button(50, 29, 70, 18, _("Filtered audio"));
btn_mon_dsp_audio->tooltip(_("Enable DSP filtering of rx audio stream"));
btn_mon_dsp_audio->down_box(FL_DOWN_BOX);
btn_mon_dsp_audio->callback((Fl_Callback*)cb_btn_mon_dsp_audio);
o->value(progdefaults.mon_dsp_audio);
} // Fl_Check_Button* btn_mon_dsp_audio
o->end();
} // Fl_Double_Window* o
return w;
}
| 9,854
|
C++
|
.cxx
| 221
| 39.366516
| 110
| 0.681458
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,089
|
confdialog.cxx
|
w1hkj_fldigi/src/dialogs/confdialog.cxx
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#include "gettext.h"
#include "confdialog.h"
#include <config.h>
#include <FL/Fl_Tooltip.H>
#include <FL/Fl_Box.H>
#include <FL/filename.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/fl_show_colormap.H>
#include "main.h"
#include "fl_digi.h"
#include "data_io.h"
#include "Viewer.h"
#include "soundconf.h"
#include "waterfall.h"
#include "rigxml.h"
#include "lookupcall.h"
#include "icons.h"
#include "Viewer.h"
#include "pskrep.h"
#include "logsupport.h"
#include "notify.h"
#include "debug.h"
#include "status.h"
#include "rx_extract.h"
#include "kmlserver.h"
#include "macroedit.h"
#include "fileselect.h"
#include "psm/psm.h"
#include "dx_cluster.h"
extern void WefaxDestDirSet(Fl_File_Chooser *w, void *userdata);
#include "dx_dialog.h"
#if USE_HAMLIB
#include "hamlib.h"
#endif
#include "fsq.h"
Fl_Double_Window *dlgConfig;
Mode_Browser* mode_browser;
#include <vector>
std::vector<CONFIG_PAGE *> config_pages;
static Fl_Group *current = 0;
void SelectItem_CB(Fl_Widget *w) {
Fl_Tree *tree = (Fl_Tree*)w;
Fl_Tree_Item *item = tree->callback_item();
tree->select_only(item, 0);
if (tree->callback_reason() == FL_TREE_REASON_SELECTED) {
std::string pname;
char pn[200];
tree->item_pathname(pn, 200, item);
pname = pn;
size_t pos = std::string::npos;
for (size_t i = 0; i < config_pages.size(); i++) {
if ((pos = pname.find(config_pages[i]->label)) != std::string::npos) {
if (pname.substr(pos) == config_pages[i]->label) {
if (current) current->hide();
current = config_pages[i]->grp;
current->show();
return;
}
}
}
}
}
static void choose_color(Fl_Color & c) {
unsigned char r, g, b;
Fl::get_color(c, r, g, b);
if (fl_color_chooser("Font color", r, g, b))
c = fl_rgb_color(r, g, b);
}
static void cbRxFontBrowser(Fl_Widget*, void*) {
Fl_Font font = font_browser->fontNumber();
int size = font_browser->fontSize();
Fl_Color color = font_browser->fontColor();
RxText->textfont(font);
RxText->textsize(size);
RxText->textcolor(color);
RxText->redraw();
progdefaults.RxFontnbr = font;
progdefaults.RxFontsize = size;
progdefaults.RxFontcolor = color;
ReceiveText->setFont(font);
ReceiveText->setFontSize(size);
ReceiveText->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
fsq_rx_text->setFont(font);
fsq_rx_text->setFontSize(size);
fsq_rx_text->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
ifkp_rx_text->setFont(font);
ifkp_rx_text->setFontSize(size);
ifkp_rx_text->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
font_browser->hide();
progdefaults.changed = true;
}
static void cbTxFontBrowser(Fl_Widget*, void*) {
Fl_Font font = font_browser->fontNumber();
int size = font_browser->fontSize();
Fl_Color color = font_browser->fontColor();
TxText->textfont(font);
TxText->textsize(size);
TxText->textcolor(color);
TxText->redraw();
progdefaults.TxFontnbr = font;
progdefaults.TxFontsize = size;
progdefaults.TxFontcolor = color;
TransmitText->setFont(font);
TransmitText->setFontSize(size);
TransmitText->setFontColor(progdefaults.TxFontcolor, FTextBase::RECV);
fsq_tx_text->setFont(font);
fsq_tx_text->setFontSize(size);
fsq_tx_text->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
ifkp_rx_text->setFont(font);
ifkp_rx_text->setFontSize(size);
ifkp_rx_text->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
font_browser->hide();
progdefaults.changed = true;
}
static void cbDXfont_browser(Fl_Widget*, void*) {
Fl_Font font = font_browser->fontNumber();
int size = font_browser->fontSize();
Fl_Color color = font_browser->fontColor();
progdefaults.DXfontcolor = color;
progdefaults.DXfontnbr = font;
progdefaults.DXfontsize = size;
brws_tcpip_stream->setFont(font);
brws_tcpip_stream->setFontSize(size);
brws_tcpip_stream->setFontColor(color, FTextBase::RECV);
brws_tcpip_stream->redraw();
ed_telnet_cmds->setFont(font);
ed_telnet_cmds->setFontSize(size);
ed_telnet_cmds->setFontColor(color);
ed_telnet_cmds->redraw();
StreamText->textcolor(color);
StreamText->redraw();
brws_dxc_help->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_dxc_help->setFont(font);
brws_dxc_help->setFontSize(size);
brws_dxc_help->setFontColor(color, FTextBase::RECV);
brws_dxc_help->redraw();
font_browser->hide();
dxcluster_hosts_load();
progdefaults.changed = true;
}
static void cbDXC_FontBrowser(Fl_Widget*, void*) {
Fl_Font font = font_browser->fontNumber();
int size = font_browser->fontSize();
Fl_Color color = font_browser->fontColor();
progdefaults.DXC_textfont = font;
progdefaults.DXC_textsize = size;
progdefaults.DXC_textcolor = color;
DXC_display->textsize(size);
DXC_display->textcolor(color);
DXC_display->textfont(font);
DXC_display->redraw();
font_browser->hide();
dxc_lines_redraw();
progdefaults.changed = true;
}
static void cbMacroEditFontBrowser(Fl_Widget*, void*) {
Fl_Font font = font_browser->fontNumber();
int size = font_browser->fontSize();
MacroText->textfont(font);
MacroText->textsize(size);
MacroText->redraw();
progdefaults.MacroEditFontnbr = font;
progdefaults.MacroEditFontsize = size;
update_macroedit_font();
MacroText->textfont(font);
MacroText->textsize(size);
font_browser->hide();
progdefaults.changed = true;
}
void cbWaterfallFontBrowser(Fl_Widget*, void*) {
Fl_Font fnt = font_browser->fontNumber();
int size = font_browser->fontSize();
progdefaults.WaterfallFontnbr = fnt;
progdefaults.WaterfallFontsize = size;
progdefaults.changed = true;
font_browser->hide();
}
static void cbMacroBtnFontBrowser(Fl_Widget*, void*) {
progdefaults.MacroBtnFontnbr = font_browser->fontNumber();
progdefaults.MacroBtnFontsize = font_browser->fontSize();;
progdefaults.MacroBtnFontcolor = font_browser->fontColor();
font_browser->hide();
btnGroup1->labelcolor(progdefaults.MacroBtnFontcolor);
btnGroup1->labelfont(progdefaults.MacroBtnFontnbr);
btnGroup1->labelsize(progdefaults.MacroBtnFontsize);
btnGroup1->redraw_label();
btnGroup2->labelcolor(progdefaults.MacroBtnFontcolor);
btnGroup2->labelfont(progdefaults.MacroBtnFontnbr);
btnGroup2->labelsize(progdefaults.MacroBtnFontsize);
btnGroup2->redraw_label();
btnGroup3->labelcolor(progdefaults.MacroBtnFontcolor);
btnGroup3->labelfont(progdefaults.MacroBtnFontnbr);
btnGroup3->labelsize(progdefaults.MacroBtnFontsize);
btnGroup3->redraw_label();
progdefaults.changed = true;
colorize_macros();
}
void cbViewerFontBrowser(Fl_Widget*, void*) {
progdefaults.ViewerFontnbr = font_browser->fontNumber();
progdefaults.ViewerFontsize = font_browser->fontSize();
initViewer();
progdefaults.changed = true;
font_browser->hide();
}
void cbFreqControlFontBrowser(Fl_Widget*, void*) {
Fl_Font fnt = font_browser->fontNumber();
progdefaults.FreqControlFontnbr = fnt;
progdefaults.changed = true;
FDdisplay->labelfont(progdefaults.FreqControlFontnbr);
FDdisplay->redraw();
qsoFreqDisp1->font(progdefaults.FreqControlFontnbr);
qsoFreqDisp2->font(progdefaults.FreqControlFontnbr);
qsoFreqDisp3->font(progdefaults.FreqControlFontnbr);
qsoFreqDisp1->redraw();
qsoFreqDisp2->redraw();
qsoFreqDisp3->redraw();
font_browser->hide();
}
static void cbLOGGINGFontBrowser(Fl_Widget*, void*) {
Fl_Font font = font_browser->fontNumber();
int size = font_browser->fontSize();
Fl_Color color = font_browser->fontColor();
progdefaults.LOGGINGtextfont = font;
progdefaults.LOGGINGtextsize = size;
progdefaults.LOGGINGtextcolor = color;
LOGGINGdisplay->textsize(size);
LOGGINGdisplay->textcolor(color);
LOGGINGdisplay->textfont(font);
LOGGINGdisplay->redraw();
LOGGING_colors_font();
font_browser->hide();
progdefaults.changed = true;
}
static void cbLOGBOOKFontBrowser(Fl_Widget*, void*) {
Fl_Font font = font_browser->fontNumber();
int size = font_browser->fontSize();
Fl_Color color = font_browser->fontColor();
progdefaults.LOGBOOKtextfont = font;
progdefaults.LOGBOOKtextsize = size;
progdefaults.LOGBOOKtextcolor = color;
LOGBOOKdisplay->textsize(size);
LOGBOOKdisplay->textcolor(color);
LOGBOOKdisplay->textfont(font);
LOGBOOKdisplay->redraw();
LOGBOOK_colors_font();
font_browser->hide();
progdefaults.changed = true;
}
void set_qrzxml_buttons(Fl_Button* b) {
Fl_Button* qrzbxml[] = { btnQRZXMLnotavailable, btnQRZcdrom, btnQRZsub,
btnHamcall,
btnCALLOOK, btnHamQTH};
for (size_t i = 0; i < sizeof(qrzbxml)/sizeof(*qrzbxml); i++)
qrzbxml[i]->value(b == qrzbxml[i]);
}
void set_qrzweb_buttons(Fl_Button* b) {
Fl_Button* qrzbweb[] = { btnQRZWEBnotavailable, btnQRZonline,
btnHAMCALLonline,
btnHamQTHonline, btnCallookOnline };
for (size_t i = 0; i < sizeof(qrzbweb)/sizeof(*qrzbweb); i++)
qrzbweb[i]->value(b == qrzbweb[i]);
}
void createConfig() {
if (!dlgConfig) {
dlgConfig = ConfigureDialog();
dlgConfig->xclass(PACKAGE_NAME);
}
}
Fl_Tree *tab_tree=(Fl_Tree *)0;
Fl_Button *btn_collapse_tab_tree=(Fl_Button *)0;
static void cb_btn_collapse_tab_tree(Fl_Button*, void*) {
tab_tree->close(_("Colors-Fonts"));
tab_tree->close(_("Contests"));
tab_tree->close(_("IDs"));
tab_tree->close(_("Logging"));
tab_tree->close(_("Modem"));
tab_tree->close(_("Misc"));
tab_tree->close(_("Rig Control"));
tab_tree->close(_("Soundcard"));
tab_tree->close(_("UI"));
tab_tree->close(_("Waterfall"));
tab_tree->close(_("Web"));
}
Fl_Button *btnSpotColor=(Fl_Button *)0;
static void cb_btnSpotColor(Fl_Button*, void*) {
progdefaults.SpotColor = fl_show_colormap(progdefaults.SpotColor);
spotcolor->color(progdefaults.SpotColor);
spotcolor->redraw();
spot_selection_color();
progdefaults.changed = true;
}
Fl_Button *btnRevColor=(Fl_Button *)0;
static void cb_btnRevColor(Fl_Button*, void*) {
progdefaults.RevColor = fl_show_colormap(progdefaults.RevColor);
revcolor->color(progdefaults.RevColor);
revcolor->redraw();
rev_selection_color();
progdefaults.changed = true;
}
Fl_Button *btnTuneColor=(Fl_Button *)0;
static void cb_btnTuneColor(Fl_Button*, void*) {
progdefaults.TuneColor = fl_show_colormap(progdefaults.TuneColor);
tunecolor->color(progdefaults.TuneColor);
tunecolor->redraw();
tune_selection_color();
progdefaults.changed = true;
}
Fl_Button *btnRxIDColor=(Fl_Button *)0;
static void cb_btnRxIDColor(Fl_Button*, void*) {
progdefaults.RxIDColor = fl_show_colormap(progdefaults.RxIDColor);
rxidcolor->color(progdefaults.RxIDColor);
rxidcolor->redraw();
rxid_selection_color();
progdefaults.changed = true;
Fl_Color clr = progdefaults.rsidWideSearch ? progdefaults.RxIDwideColor : progdefaults.RxIDColor;
btnRSID->selection_color(clr);
btnRSID->redraw();
}
Fl_Button *btnLkColor=(Fl_Button *)0;
static void cb_btnLkColor(Fl_Button*, void*) {
progdefaults.LkColor = fl_show_colormap(progdefaults.LkColor);
lockcolor->color(progdefaults.LkColor);
lockcolor->redraw();
xmtlock_selection_color();
progdefaults.changed = true;
}
Fl_Button *btnSql1Color=(Fl_Button *)0;
static void cb_btnSql1Color(Fl_Button*, void*) {
progdefaults.Sql1Color = fl_show_colormap(progdefaults.Sql1Color);
sql1color->color(progdefaults.Sql1Color);
sql1color->redraw();
sql_selection_color();
progdefaults.changed = true;
}
Fl_Button *btnXmtColor=(Fl_Button *)0;
static void cb_btnXmtColor(Fl_Button*, void*) {
progdefaults.XmtColor = fl_show_colormap(progdefaults.XmtColor);
xmtcolor->color(progdefaults.XmtColor);
xmtcolor->redraw();
xmtrcv_selection_color();
progdefaults.changed = true;
}
Fl_Button *btnRxIDwideColor=(Fl_Button *)0;
static void cb_btnRxIDwideColor(Fl_Button*, void*) {
progdefaults.RxIDwideColor = fl_show_colormap(progdefaults.RxIDwideColor);
rxidcolorwide->color(progdefaults.RxIDwideColor);
rxidcolorwide->redraw();
rxid_selection_color();
progdefaults.changed = true;
Fl_Color clr = progdefaults.rsidWideSearch ? progdefaults.RxIDwideColor : progdefaults.RxIDColor;
btnRSID->selection_color(clr);
btnRSID->redraw();
}
Fl_Button *btnAfcColor=(Fl_Button *)0;
static void cb_btnAfcColor(Fl_Button*, void*) {
progdefaults.AfcColor = fl_show_colormap(progdefaults.AfcColor);
afccolor->color(progdefaults.AfcColor);
afccolor->redraw();
afc_selection_color();
progdefaults.changed = true;
}
Fl_Button *btnSql2Color=(Fl_Button *)0;
static void cb_btnSql2Color(Fl_Button*, void*) {
progdefaults.Sql2Color = fl_show_colormap(progdefaults.Sql2Color);
sql2color->color(progdefaults.Sql2Color);
sql2color->redraw();
sql_selection_color();
progdefaults.changed = true;
}
Fl_Button *btnTxIDColor=(Fl_Button *)0;
static void cb_btnTxIDColor(Fl_Button*, void*) {
progdefaults.TxIDColor = fl_show_colormap(progdefaults.TxIDColor);
txidcolor->color(progdefaults.TxIDColor);
txidcolor->redraw();
txid_selection_color();
progdefaults.changed = true;
btnTxRSID->selection_color(progdefaults.TxIDColor);
btnTxRSID->redraw();
}
Fl_Box *spotcolor=(Fl_Box *)0;
Fl_Box *revcolor=(Fl_Box *)0;
Fl_Box *tunecolor=(Fl_Box *)0;
Fl_Box *rxidcolor=(Fl_Box *)0;
Fl_Box *lockcolor=(Fl_Box *)0;
Fl_Box *sql1color=(Fl_Box *)0;
Fl_Box *rxidcolorwide=(Fl_Box *)0;
Fl_Box *xmtcolor=(Fl_Box *)0;
Fl_Box *afccolor=(Fl_Box *)0;
Fl_Box *sql2color=(Fl_Box *)0;
Fl_Box *txidcolor=(Fl_Box *)0;
Fl_Button *btn_default_btn_color=(Fl_Button *)0;
static void cb_btn_default_btn_color(Fl_Button*, void*) {
progdefaults.default_btn_color = fl_show_colormap(progdefaults.default_btn_color);
default_btn_color->color(progdefaults.default_btn_color);
default_btn_color->redraw();
set_default_btn_color();
progdefaults.changed = true;
}
Fl_Box *default_btn_color=(Fl_Box *)0;
Fl_Box *FDdisplay=(Fl_Box *)0;
Fl_Button *btn_freq_control_font=(Fl_Button *)0;
static void cb_btn_freq_control_font(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.FreqControlFontnbr);
font_browser->fontSize(14);
font_browser->fontColor(FL_FOREGROUND_COLOR);
font_browser->fontFilter(Font_Browser::FIXED_WIDTH);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback(cbFreqControlFontBrowser);
font_browser->show();
}
Fl_Button *btnBackgroundColor=(Fl_Button *)0;
static void cb_btnBackgroundColor(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.FDbackground.R;
g = progdefaults.FDbackground.G;
b = progdefaults.FDbackground.B;
if (!fl_color_chooser("Background", r, g, b))
return;
progdefaults.FDbackground.R = r;
progdefaults.FDbackground.G = g;
progdefaults.FDbackground.B = b;
FDdisplay->color(fl_rgb_color(r,g,b));
FDdisplay->redraw();
if (qsoFreqDisp) {
qsoFreqDisp->SetONOFFCOLOR(
fl_rgb_color( progdefaults.FDforeground.R,
progdefaults.FDforeground.G,
progdefaults.FDforeground.B),
fl_rgb_color( progdefaults.FDbackground.R,
progdefaults.FDbackground.G,
progdefaults.FDbackground.B));
qsoFreqDisp->redraw();
}
progdefaults.changed = true;
}
Fl_Button *btnForegroundColor=(Fl_Button *)0;
static void cb_btnForegroundColor(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.FDforeground.R;
g = progdefaults.FDforeground.G;
b = progdefaults.FDforeground.B;
if (!fl_color_chooser("Foreground", r, g, b))
return;
progdefaults.FDforeground.R = r;
progdefaults.FDforeground.G = g;
progdefaults.FDforeground.B = b;
FDdisplay->labelcolor(fl_rgb_color(r,g,b));
FDdisplay->redraw();
if (qsoFreqDisp) {
qsoFreqDisp->SetONOFFCOLOR(
fl_rgb_color( progdefaults.FDforeground.R,
progdefaults.FDforeground.G,
progdefaults.FDforeground.B),
fl_rgb_color( progdefaults.FDbackground.R,
progdefaults.FDbackground.G,
progdefaults.FDbackground.B));
qsoFreqDisp->redraw();
}
progdefaults.changed = true;
}
Fl_Button *btnFD_SystemColor=(Fl_Button *)0;
static void cb_btnFD_SystemColor(Fl_Button*, void*) {
uchar r, g, b;
Fl_Color clr = FL_BACKGROUND2_COLOR;
Fl::get_color(clr, r, g, b);
progdefaults.FDbackground.R = r;
progdefaults.FDbackground.G = g;
progdefaults.FDbackground.B = b;
FDdisplay->color(clr);
clr = FL_FOREGROUND_COLOR;
Fl::get_color(clr, r, g, b);
FDdisplay->labelcolor(clr);
FDdisplay->redraw();
progdefaults.FDforeground.R = r;
progdefaults.FDforeground.G = g;
progdefaults.FDforeground.B = b;
if (qsoFreqDisp) {
qsoFreqDisp->SetONOFFCOLOR(
fl_rgb_color( progdefaults.FDforeground.R,
progdefaults.FDforeground.G,
progdefaults.FDforeground.B),
fl_rgb_color( progdefaults.FDbackground.R,
progdefaults.FDbackground.G,
progdefaults.FDbackground.B));
qsoFreqDisp->redraw();
}
progdefaults.changed = true;
}
Fl_Button *btnSmeter_bg_color=(Fl_Button *)0;
static void cb_btnSmeter_bg_color(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.Smeter_bg_color.R;
g = progdefaults.Smeter_bg_color.G;
b = progdefaults.Smeter_bg_color.B;
if (!fl_color_chooser("Background", r, g, b))
return;
progdefaults.Smeter_bg_color.R = r;
progdefaults.Smeter_bg_color.G = g;
progdefaults.Smeter_bg_color.B = b;
set_smeter_colors();
progdefaults.changed = true;
}
Fl_Button *btnSmeter_scale_color=(Fl_Button *)0;
static void cb_btnSmeter_scale_color(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.Smeter_scale_color.R;
g = progdefaults.Smeter_scale_color.G;
b = progdefaults.Smeter_scale_color.B;
if (!fl_color_chooser("Scale", r, g, b))
return;
progdefaults.Smeter_scale_color.R = r;
progdefaults.Smeter_scale_color.G = g;
progdefaults.Smeter_scale_color.B = b;
set_smeter_colors();
progdefaults.changed = true;
}
Fl_Button *btnSmeter_meter_color=(Fl_Button *)0;
static void cb_btnSmeter_meter_color(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.Smeter_meter_color.R;
g = progdefaults.Smeter_meter_color.G;
b = progdefaults.Smeter_meter_color.B;
if (!fl_color_chooser("Meter", r, g, b))
return;
progdefaults.Smeter_meter_color.R = r;
progdefaults.Smeter_meter_color.G = g;
progdefaults.Smeter_meter_color.B = b;
set_smeter_colors();
progdefaults.changed = true;
}
Fl_Button *btnPWR_bg_color=(Fl_Button *)0;
static void cb_btnPWR_bg_color(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.PWRmeter_bg_color.R;
g = progdefaults.PWRmeter_bg_color.G;
b = progdefaults.PWRmeter_bg_color.B;
if (!fl_color_chooser("Background", r, g, b))
return;
progdefaults.PWRmeter_bg_color.R = r;
progdefaults.PWRmeter_bg_color.G = g;
progdefaults.PWRmeter_bg_color.B = b;
set_smeter_colors();
progdefaults.changed = true;
}
Fl_Button *btnPWR_scale_color=(Fl_Button *)0;
static void cb_btnPWR_scale_color(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.PWRmeter_scale_color.R;
g = progdefaults.PWRmeter_scale_color.G;
b = progdefaults.PWRmeter_scale_color.B;
if (!fl_color_chooser("Scale", r, g, b))
return;
progdefaults.PWRmeter_scale_color.R = r;
progdefaults.PWRmeter_scale_color.G = g;
progdefaults.PWRmeter_scale_color.B = b;
set_smeter_colors();
progdefaults.changed = true;
}
Fl_Button *btnPWR_meter_Color=(Fl_Button *)0;
static void cb_btnPWR_meter_Color(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.PWRmeter_meter_color.R;
g = progdefaults.PWRmeter_meter_color.G;
b = progdefaults.PWRmeter_meter_color.B;
if (!fl_color_chooser("Meter", r, g, b))
return;
progdefaults.PWRmeter_meter_color.R = r;
progdefaults.PWRmeter_meter_color.G = g;
progdefaults.PWRmeter_meter_color.B = b;
set_smeter_colors();
progdefaults.changed = true;
}
Fl_ListBox *listboxPWRselect=(Fl_ListBox *)0;
static void cb_listboxPWRselect(Fl_ListBox* o, void*) {
progdefaults.PWRselect = o->index();
set_smeter_colors();
progdefaults.changed = true;
}
Fl_Check_Button *btnUseGroupColors=(Fl_Check_Button *)0;
static void cb_btnUseGroupColors(Fl_Check_Button* o, void*) {
progdefaults.useGroupColors = o->value();
colorize_macros();
progdefaults.changed = true;
}
Fl_Button *btnGroup1=(Fl_Button *)0;
static void cb_btnGroup1(Fl_Button* o, void*) {
uchar r, g, b;
r = progdefaults.btnGroup1.R;
g = progdefaults.btnGroup1.G;
b = progdefaults.btnGroup1.B;
if (fl_color_chooser("Group 1", r, g, b) == 0)
return;
progdefaults.btnGroup1.R = r;
progdefaults.btnGroup1.G = g;
progdefaults.btnGroup1.B = b;
o->color(fl_rgb_color(r,g,b));
colorize_macros();
progdefaults.changed = true;
}
Fl_Button *btnGroup2=(Fl_Button *)0;
static void cb_btnGroup2(Fl_Button* o, void*) {
uchar r, g, b;
r = progdefaults.btnGroup2.R;
g = progdefaults.btnGroup2.G;
b = progdefaults.btnGroup2.B;
if (fl_color_chooser("Group 2", r, g, b) == 0)
return;
progdefaults.btnGroup2.R = r;
progdefaults.btnGroup2.G = g;
progdefaults.btnGroup2.B = b;
o->color(fl_rgb_color(r,g,b));
colorize_macros();
progdefaults.changed = true;
}
Fl_Button *btnGroup3=(Fl_Button *)0;
static void cb_btnGroup3(Fl_Button* o, void*) {
uchar r, g, b;
r = progdefaults.btnGroup3.R;
g = progdefaults.btnGroup3.G;
b = progdefaults.btnGroup3.B;
if (fl_color_chooser("Group 3", r, g, b) == 0)
return;
progdefaults.btnGroup3.R = r;
progdefaults.btnGroup3.G = g;
progdefaults.btnGroup3.B = b;
o->color(fl_rgb_color(r,g,b));
colorize_macros();
progdefaults.changed = true;
}
Fl_Button *btnFkeyDEfaults=(Fl_Button *)0;
static void cb_btnFkeyDEfaults(Fl_Button*, void*) {
uchar r, g, b;
Fl_Color clr;
r = 80; g = 144; b = 144;
clr = fl_rgb_color(r,g,b);
btnGroup1->color(clr);
progdefaults.btnGroup1.R = r;
progdefaults.btnGroup1.G = g;
progdefaults.btnGroup1.B = b;
r = 144; g = 80; b = 80;
clr = fl_rgb_color(r,g,b);
btnGroup2->color(clr);
progdefaults.btnGroup2.R = r;
progdefaults.btnGroup2.G = g;
progdefaults.btnGroup2.B = b;
r = 80; g = 80; b = 144;
clr = fl_rgb_color(r,g,b);
btnGroup3->color(clr);
progdefaults.btnGroup3.R = r;
progdefaults.btnGroup3.G = g;
progdefaults.btnGroup3.B = b;
progdefaults.MacroBtnFontcolor = FL_BLACK;
progdefaults.MacroBtnFontnbr = FL_HELVETICA;
progdefaults.MacroBtnFontsize = 12;
btnGroup1->labelcolor(progdefaults.MacroBtnFontcolor);
btnGroup2->labelcolor(progdefaults.MacroBtnFontcolor);
btnGroup3->labelcolor(progdefaults.MacroBtnFontcolor);
btnGroup1->labelfont(progdefaults.MacroBtnFontnbr);
btnGroup2->labelfont(progdefaults.MacroBtnFontnbr);
btnGroup3->labelfont(progdefaults.MacroBtnFontnbr);
btnGroup1->labelsize(progdefaults.MacroBtnFontsize);
btnGroup2->labelsize(progdefaults.MacroBtnFontsize);
btnGroup3->labelsize(progdefaults.MacroBtnFontsize);
btnGroup1->redraw_label();
btnGroup2->redraw_label();
btnGroup3->redraw_label();
colorize_macros();
progdefaults.changed = true;
}
Fl_Button *btnMacroBtnFont=(Fl_Button *)0;
static void cb_btnMacroBtnFont(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.MacroBtnFontnbr);
font_browser->fontSize(progdefaults.MacroBtnFontsize);
font_browser->fontColor(progdefaults.MacroBtnFontcolor);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback(cbMacroBtnFontBrowser);
font_browser->show();
}
Fl_Output *LOGGINGdisplay=(Fl_Output *)0;
Fl_Button *btnLOGGING_color=(Fl_Button *)0;
static void cb_btnLOGGING_color(Fl_Button*, void*) {
uchar r, g, b;
Fl::get_color(progdefaults.LOGGINGcolor, r, g, b);
if (!fl_color_chooser("Background", r, g, b))
return;
progdefaults.LOGGINGcolor = fl_rgb_color(r, g, b);
LOGGINGdisplay->color(progdefaults.LOGGINGcolor);
LOGGINGdisplay->redraw();
LOGGING_colors_font();
progdefaults.changed = true;
}
Fl_Button *btn_LOGGING_font=(Fl_Button *)0;
static void cb_btn_LOGGING_font(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.LOGGINGtextfont);
font_browser->fontSize(progdefaults.LOGGINGtextsize);
font_browser->fontColor(progdefaults.LOGGINGtextcolor);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback(cbLOGGINGFontBrowser);
font_browser->show();
}
Fl_Button *btnLOGGINGdefault_colors_font=(Fl_Button *)0;
static void cb_btnLOGGINGdefault_colors_font(Fl_Button*, void*) {
progdefaults.LOGGINGcolor = FL_BACKGROUND2_COLOR;
progdefaults.LOGGINGtextfont = (Fl_Font)0;
progdefaults.LOGGINGtextsize = 14;
progdefaults.LOGGINGtextcolor = FL_BLACK;
LOGGINGdisplay->color(progdefaults.LOGGINGcolor);
LOGGINGdisplay->textsize(progdefaults.LOGGINGtextsize);
LOGGINGdisplay->textcolor(progdefaults.LOGGINGtextcolor);
LOGGINGdisplay->textfont(progdefaults.LOGGINGtextfont);
LOGGINGdisplay->redraw();
LOGGING_colors_font();
progdefaults.changed = true;
}
Fl_Output *LOGBOOKdisplay=(Fl_Output *)0;
Fl_Button *btnLOGBOOK_color=(Fl_Button *)0;
static void cb_btnLOGBOOK_color(Fl_Button*, void*) {
uchar r, g, b;
Fl::get_color(progdefaults.LOGBOOKcolor, r, g, b);
if (!fl_color_chooser("Background", r, g, b))
return;
progdefaults.LOGBOOKcolor = fl_rgb_color(r, g, b);
LOGBOOKdisplay->color(progdefaults.LOGBOOKcolor);
LOGBOOKdisplay->redraw();
LOGBOOK_colors_font();
progdefaults.changed = true;
}
Fl_Button *btn_LOGBOOK_font=(Fl_Button *)0;
static void cb_btn_LOGBOOK_font(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.LOGBOOKtextfont);
font_browser->fontSize(progdefaults.LOGBOOKtextsize);
font_browser->fontColor(progdefaults.LOGBOOKtextcolor);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback(cbLOGBOOKFontBrowser);
font_browser->show();
}
Fl_Button *btnLOGBOOKdefault_colors_font=(Fl_Button *)0;
static void cb_btnLOGBOOKdefault_colors_font(Fl_Button*, void*) {
progdefaults.LOGBOOKcolor = FL_BACKGROUND2_COLOR;
progdefaults.LOGBOOKtextfont = (Fl_Font)0;
progdefaults.LOGBOOKtextsize = 14;
progdefaults.LOGBOOKtextcolor = FL_BLACK;
LOGBOOKdisplay->color(progdefaults.LOGBOOKcolor);
LOGBOOKdisplay->textsize(progdefaults.LOGBOOKtextsize);
LOGBOOKdisplay->textcolor(progdefaults.LOGBOOKtextcolor);
LOGBOOKdisplay->textfont(progdefaults.LOGBOOKtextfont);
LOGBOOKdisplay->redraw();
LOGBOOK_colors_font();
progdefaults.changed = true;
}
Fl_Output *DXC_display=(Fl_Output *)0;
Fl_Button *btn_DXC_font=(Fl_Button *)0;
static void cb_btn_DXC_font(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.DXC_textfont);
font_browser->fontSize(progdefaults.DXC_textsize);
font_browser->fontColor(progdefaults.DXC_textcolor);
font_browser->fontFilter(Font_Browser::FIXED_WIDTH);
font_browser->callback(cbDXC_FontBrowser);
font_browser->show();
}
Fl_Button *btnDXCdefault_colors_font=(Fl_Button *)0;
static void cb_btnDXCdefault_colors_font(Fl_Button*, void*) {
progdefaults.DXC_textfont = FL_COURIER;
progdefaults.DXC_textsize = 14;
progdefaults.DXC_textcolor = FL_BLACK;
progdefaults.DXC_even_color = 7;
progdefaults.DXC_odd_color = 246;
DXC_display->textsize(progdefaults.DXC_textsize);
DXC_display->textcolor(progdefaults.DXC_textcolor);
DXC_display->textfont(progdefaults.DXC_textfont);
DXC_display->redraw();
}
Fl_Button *btn_DXC_even_lines=(Fl_Button *)0;
static void cb_btn_DXC_even_lines(Fl_Button* o, void*) {
progdefaults.DXC_even_color = fl_show_colormap((Fl_Color)progdefaults.DXC_even_color);
o->color(progdefaults.DXC_even_color);
o->redraw();
dxc_lines_redraw();
progdefaults.changed = true;
}
Fl_Button *btn_DXC_odd_lines=(Fl_Button *)0;
static void cb_btn_DXC_odd_lines(Fl_Button* o, void*) {
progdefaults.DXC_odd_color = fl_show_colormap((Fl_Color)progdefaults.DXC_odd_color);
o->color(progdefaults.DXC_odd_color);
o->redraw();
dxc_lines_redraw();
progdefaults.changed = true;
}
Fl_Input *StreamText=(Fl_Input *)0;
Fl_Button *btnDXcolor=(Fl_Button *)0;
static void cb_btnDXcolor(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.DX_Color.R;
g = progdefaults.DX_Color.G;
b = progdefaults.DX_Color.B;
if (!fl_color_chooser("DX Color", r, g, b))
return;
progdefaults.DX_Color.R = r;
progdefaults.DX_Color.G = g;
progdefaults.DX_Color.B = b;
StreamText->color(fl_rgb_color(r,g,b));
StreamText->redraw();
brws_tcpip_stream->color(fl_rgb_color(r,g,b));
brws_tcpip_stream->redraw();
brws_dxcluster_hosts->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_dxcluster_hosts->textcolor(progdefaults.DXfontcolor);
brws_dxcluster_hosts->textfont(progdefaults.DXfontnbr);
brws_dxcluster_hosts->textsize(progdefaults.DXfontsize);
brws_dxcluster_hosts->redraw();
brws_dxc_help->color(fl_rgb_color(r,g,b));
brws_dxc_help->setFont(progdefaults.DXfontnbr);
brws_dxc_help->setFontSize(progdefaults.DXfontsize);
brws_dxc_help->setFontColor(progdefaults.DXfontcolor, FTextBase::RECV);
brws_dxc_help->redraw();
ed_telnet_cmds->color(fl_rgb_color(r,g,b));
ed_telnet_cmds->redraw();
dxcluster_hosts_load();
progdefaults.changed = true;
}
Fl_Button *btnDXfont=(Fl_Button *)0;
static void cb_btnDXfont(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.DXfontnbr);
font_browser->fontSize(progdefaults.DXfontsize);
font_browser->fontColor(progdefaults.DXfontcolor);
font_browser->fontFilter(Font_Browser::FIXED_WIDTH);
font_browser->callback(cbDXfont_browser);
font_browser->show();
}
Fl_Button *btnDXalt_color=(Fl_Button *)0;
static void cb_btnDXalt_color(Fl_Button* o, void*) {
choose_color(progdefaults.DXalt_color);
o->labelcolor(progdefaults.DXalt_color);
o->redraw_label();
brws_tcpip_stream->setFontColor(progdefaults.DXalt_color, FTextBase::XMIT);
brws_tcpip_stream->redraw();
progdefaults.changed = true;
}
Fl_Button *btnDXdefault_colors_font=(Fl_Button *)0;
static void cb_btnDXdefault_colors_font(Fl_Button*, void*) {
progdefaults.DX_Color.R = 255;
progdefaults.DX_Color.G = 255;
progdefaults.DX_Color.B = 255;
progdefaults.DXfontnbr = FL_COURIER;
progdefaults.DXfontsize = 14;
progdefaults.DXfontcolor = FL_BLACK;
progdefaults.DXalt_color = fl_rgb_color(200, 0, 0);
btnDXalt_color->labelcolor(progdefaults.DXalt_color);
btnDXalt_color->redraw_label();
brws_tcpip_stream->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_tcpip_stream->setFont(progdefaults.DXfontnbr);
brws_tcpip_stream->setFontSize(progdefaults.DXfontsize);
brws_tcpip_stream->setFontColor(progdefaults.DXfontcolor, FTextBase::RECV);
brws_tcpip_stream->setFontColor(progdefaults.DXalt_color, FTextBase::XMIT);
brws_tcpip_stream->redraw();
ed_telnet_cmds->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
ed_telnet_cmds->setFont(progdefaults.DXfontnbr);
ed_telnet_cmds->setFontSize(progdefaults.DXfontsize);
ed_telnet_cmds->setFontColor(progdefaults.DXfontcolor);
ed_telnet_cmds->redraw();
brws_dxc_help->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_dxc_help->setFont(progdefaults.DXfontnbr);
brws_dxc_help->setFontSize(progdefaults.DXfontsize);
brws_dxc_help->setFontColor(progdefaults.DXfontcolor, FTextBase::RECV);
brws_dxc_help->redraw();
StreamText->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
StreamText->textcolor(progdefaults.DXfontcolor);
StreamText->redraw();
dxcluster_hosts_load();
font_browser->hide();
progdefaults.changed = true;
}
Fl_ListBox *listbox_charset_status=(Fl_ListBox *)0;
Fl_Input *RxText=(Fl_Input *)0;
Fl_Button *btnRxColor=(Fl_Button *)0;
static void cb_btnRxColor(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.RxColor.R;
g = progdefaults.RxColor.G;
b = progdefaults.RxColor.B;
if (!fl_color_chooser("Rx Color", r, g, b))
return;
progdefaults.RxColor.R = r;
progdefaults.RxColor.G = g;
progdefaults.RxColor.B = b;
RxText->color(fl_rgb_color(r,g,b));
ReceiveText->color(RxText->color());
RxText->redraw();
ReceiveText->redraw();
progdefaults.changed = true;
}
Fl_Button *btnTxColor=(Fl_Button *)0;
static void cb_btnTxColor(Fl_Button*, void*) {
uchar r, g, b;
r = progdefaults.TxColor.R;
g = progdefaults.TxColor.G;
b = progdefaults.TxColor.B;
if (!fl_color_chooser("Tx Color", r, g, b))
return;
progdefaults.TxColor.R = r;
progdefaults.TxColor.G = g;
progdefaults.TxColor.B = b;
TxText->color(fl_rgb_color(r,g,b));
TransmitText->color(TxText->color());
TxText->redraw();
TransmitText->redraw();
progdefaults.changed = true;
}
Fl_Input *TxText=(Fl_Input *)0;
Fl_Button *btnRxFont=(Fl_Button *)0;
static void cb_btnRxFont(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.RxFontnbr);
font_browser->fontSize(progdefaults.RxFontsize);
font_browser->fontColor(progdefaults.RxFontcolor);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback(cbRxFontBrowser);
font_browser->show();
}
Fl_Button *btnTxFont=(Fl_Button *)0;
static void cb_btnTxFont(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.TxFontnbr);
font_browser->fontSize(progdefaults.TxFontsize);
font_browser->fontColor(progdefaults.TxFontcolor);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback(cbTxFontBrowser);
font_browser->show();
}
Fl_Input *MacroText=(Fl_Input *)0;
Fl_Button *btnMacroEditFont=(Fl_Button *)0;
static void cb_btnMacroEditFont(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.MacroEditFontnbr);
font_browser->fontSize(progdefaults.MacroEditFontsize);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback(cbMacroEditFontBrowser);
font_browser->show();
}
Fl_Button *btnXMIT=(Fl_Button *)0;
static void cb_btnXMIT(Fl_Button*, void*) {
choose_color(progdefaults.XMITcolor);
btnXMIT->color( progdefaults.XMITcolor );
btnXMIT->redraw();
TransmitText->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
ReceiveText->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
progdefaults.changed = true;
}
Fl_Button *btnCTRL=(Fl_Button *)0;
static void cb_btnCTRL(Fl_Button*, void*) {
choose_color(progdefaults.CTRLcolor);
btnCTRL->color( progdefaults.CTRLcolor );
btnCTRL->redraw();
TransmitText->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
ReceiveText->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
progdefaults.changed = true;
}
Fl_Button *btnSKIP=(Fl_Button *)0;
static void cb_btnSKIP(Fl_Button*, void*) {
choose_color(progdefaults.SKIPcolor);
btnSKIP->color( progdefaults.SKIPcolor );
btnSKIP->redraw();
TransmitText->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
ReceiveText->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
progdefaults.changed = true;
}
Fl_Button *btnALTR=(Fl_Button *)0;
static void cb_btnALTR(Fl_Button*, void*) {
choose_color(progdefaults.ALTRcolor);
btnALTR->color( progdefaults.ALTRcolor );
btnALTR->redraw();
TransmitText->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
ReceiveText->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
progdefaults.changed = true;
}
Fl_Button *btnSEL=(Fl_Button *)0;
static void cb_btnSEL(Fl_Button*, void*) {
choose_color(progdefaults.RxTxSelectcolor);
btnSEL->color( progdefaults.RxTxSelectcolor );
btnSEL->redraw();
ReceiveText->color(
fl_rgb_color(
progdefaults.RxColor.R,
progdefaults.RxColor.G,
progdefaults.RxColor.B),
progdefaults.RxTxSelectcolor);
TransmitText->color(
fl_rgb_color(
progdefaults.TxColor.R,
progdefaults.TxColor.G,
progdefaults.TxColor.B),
progdefaults.RxTxSelectcolor);
progdefaults.changed = true;
}
Fl_Button *btnNoTextColor=(Fl_Button *)0;
static void cb_btnNoTextColor(Fl_Button*, void*) {
uchar r, g, b;
Fl_Color clr = FL_BACKGROUND2_COLOR;
Fl::get_color(clr, r, g, b);
progdefaults.TxFontcolor = FL_BLACK;
progdefaults.RxFontcolor = FL_BLACK;
progdefaults.XMITcolor = FL_RED;
progdefaults.CTRLcolor = FL_DARK_GREEN;
progdefaults.SKIPcolor = FL_BLUE;
progdefaults.ALTRcolor = FL_DARK_MAGENTA;
btnXMIT->color(progdefaults.XMITcolor);
btnCTRL->color(progdefaults.CTRLcolor);
btnSKIP->color(progdefaults.SKIPcolor);
btnALTR->color(progdefaults.ALTRcolor);
btnXMIT->redraw();
btnCTRL->redraw();
btnSKIP->redraw();
btnALTR->redraw();
progdefaults.RxColor.R = r;
progdefaults.RxColor.G = g;
progdefaults.RxColor.B = b;
clr = fl_rgb_color(r,g,b);
RxText->color(clr);
RxText->textcolor(progdefaults.RxFontcolor);
RxText->redraw();
ReceiveText->color(clr);
ReceiveText->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
ReceiveText->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
ReceiveText->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
ReceiveText->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
ReceiveText->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
ReceiveText->redraw();
progdefaults.TxColor.R = r;
progdefaults.TxColor.G = g;
progdefaults.TxColor.B = b;
TxText->color(clr);
TxText->textcolor(progdefaults.TxFontcolor);
TxText->redraw();
TransmitText->color(clr);
TransmitText->setFontColor(progdefaults.TxFontcolor, FTextBase::RECV);
TransmitText->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
TransmitText->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
TransmitText->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
TransmitText->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
TransmitText->redraw();
progdefaults.changed = true;
}
Fl_Button *btnTextDefaults=(Fl_Button *)0;
static void cb_btnTextDefaults(Fl_Button*, void*) {
uchar r, g, b;
Fl_Color clr;
progdefaults.TxFontcolor = FL_BLACK;
progdefaults.RxFontcolor = FL_BLACK;
progdefaults.XMITcolor = FL_RED;
progdefaults.CTRLcolor = FL_DARK_GREEN;
progdefaults.SKIPcolor = FL_BLUE;
progdefaults.ALTRcolor = FL_DARK_MAGENTA;
btnXMIT->color(progdefaults.XMITcolor);
btnCTRL->color(progdefaults.CTRLcolor);
btnSKIP->color(progdefaults.SKIPcolor);
btnALTR->color(progdefaults.ALTRcolor);
btnXMIT->redraw();
btnCTRL->redraw();
btnSKIP->redraw();
btnALTR->redraw();
r = 255; g = 242; b = 190;
progdefaults.RxColor.R = r;
progdefaults.RxColor.G = g;
progdefaults.RxColor.B = b;
clr = fl_rgb_color(r,g,b);
RxText->color(clr);
RxText->textcolor(progdefaults.RxFontcolor);
RxText->redraw();
ReceiveText->color(clr);
ReceiveText->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
ReceiveText->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
ReceiveText->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
ReceiveText->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
ReceiveText->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
ReceiveText->redraw();
r = 200; g = 235; b = 255;
progdefaults.TxColor.R = r;
progdefaults.TxColor.G = g;
progdefaults.TxColor.B = b;
clr = fl_rgb_color(r,g,b);
TxText->color(clr);
TxText->textcolor(progdefaults.TxFontcolor);
TxText->redraw();
TransmitText->color(clr);
TransmitText->setFontColor(progdefaults.TxFontcolor, FTextBase::RECV);
TransmitText->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
TransmitText->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
TransmitText->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
TransmitText->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
TransmitText->redraw();
progdefaults.changed = true;
}
Fl_Check_Button *btn_show_all_codes=(Fl_Check_Button *)0;
static void cb_btn_show_all_codes(Fl_Check_Button* o, void*) {
progdefaults.show_all_codes=o->value();
progdefaults.changed = true;
}
Fl_Button *btnTabColor=(Fl_Button *)0;
static void cb_btnTabColor(Fl_Button*, void*) {
progdefaults.TabsColor = fl_show_colormap(progdefaults.TabsColor);
setTabColors();
LOGBOOK_colors_font();
progdefaults.changed = true;
}
Fl_Button *btnTabDefaultColor=(Fl_Button *)0;
static void cb_btnTabDefaultColor(Fl_Button*, void*) {
progdefaults.TabsColor = FL_BACKGROUND2_COLOR;
setTabColors();
LOGBOOK_colors_font();
progdefaults.changed = true;
}
Fl_Box *lowcolor=(Fl_Box *)0;
Fl_Button *btnLowSignal=(Fl_Button *)0;
static void cb_btnLowSignal(Fl_Button*, void*) {
progdefaults.LowSignal = fl_show_colormap(progdefaults.LowSignal);
lowcolor->color(progdefaults.LowSignal);
lowcolor->redraw();
progdefaults.changed = true;
}
Fl_Box *normalcolor=(Fl_Box *)0;
Fl_Counter *cnt_normal_signal_level=(Fl_Counter *)0;
static void cb_cnt_normal_signal_level(Fl_Counter* o, void*) {
progdefaults.normal_signal_level = o->value();
if (progdefaults.normal_signal_level > progdefaults.high_signal_level)
progdefaults.high_signal_level = progdefaults.normal_signal_level + 0.1;
if (progdefaults.high_signal_level > progdefaults.over_signal_level)
progdefaults.over_signal_level = progdefaults.high_signal_level + 0.1;
if (progdefaults.over_signal_level > 0)
progdefaults.over_signal_level = 0;
cnt_normal_signal_level->value(progdefaults.normal_signal_level);
cnt_high_signal_level->value(progdefaults.high_signal_level);
cnt_over_signal_level->value(progdefaults.over_signal_level);
}
Fl_Button *btnNormalSignal=(Fl_Button *)0;
static void cb_btnNormalSignal(Fl_Button*, void*) {
progdefaults.NormSignal = fl_show_colormap(progdefaults.NormSignal);
normalcolor->color(progdefaults.NormSignal);
normalcolor->redraw();
progdefaults.changed = true;
}
Fl_Box *highcolor=(Fl_Box *)0;
Fl_Counter *cnt_high_signal_level=(Fl_Counter *)0;
static void cb_cnt_high_signal_level(Fl_Counter* o, void*) {
progdefaults.high_signal_level = o->value();
if (progdefaults.normal_signal_level > progdefaults.high_signal_level)
progdefaults.high_signal_level = progdefaults.normal_signal_level + 0.1;
if (progdefaults.high_signal_level > progdefaults.over_signal_level)
progdefaults.over_signal_level = progdefaults.high_signal_level + 0.1;
if (progdefaults.over_signal_level > 0)
progdefaults.over_signal_level = 0;
cnt_normal_signal_level->value(progdefaults.normal_signal_level);
cnt_high_signal_level->value(progdefaults.high_signal_level);
cnt_over_signal_level->value(progdefaults.over_signal_level);
}
Fl_Button *btnHighSignal=(Fl_Button *)0;
static void cb_btnHighSignal(Fl_Button*, void*) {
progdefaults.HighSignal = fl_show_colormap(progdefaults.HighSignal);
highcolor->color(progdefaults.HighSignal);
highcolor->redraw();
progdefaults.changed = true;
}
Fl_Box *overcolor=(Fl_Box *)0;
Fl_Counter *cnt_over_signal_level=(Fl_Counter *)0;
static void cb_cnt_over_signal_level(Fl_Counter* o, void*) {
progdefaults.over_signal_level = o->value();
if (progdefaults.normal_signal_level > progdefaults.high_signal_level)
progdefaults.high_signal_level = progdefaults.normal_signal_level + 0.1;
if (progdefaults.high_signal_level > progdefaults.over_signal_level)
progdefaults.over_signal_level = progdefaults.high_signal_level + 0.1;
if (progdefaults.over_signal_level > 0)
progdefaults.over_signal_level = 0;
cnt_normal_signal_level->value(progdefaults.normal_signal_level);
cnt_high_signal_level->value(progdefaults.high_signal_level);
cnt_over_signal_level->value(progdefaults.over_signal_level);
}
Fl_Button *btnOverSignal=(Fl_Button *)0;
static void cb_btnOverSignal(Fl_Button*, void*) {
progdefaults.OverSignal = fl_show_colormap(progdefaults.OverSignal);
overcolor->color(progdefaults.OverSignal);
overcolor->redraw();
progdefaults.changed = true;
}
vumeter *sig_vumeter=(vumeter *)0;
Fl_Button *btn_default_signal_levels=(Fl_Button *)0;
static void cb_btn_default_signal_levels(Fl_Button*, void*) {
cnt_normal_signal_level->value(
progdefaults.normal_signal_level = -60.0);
cnt_high_signal_level->value(
progdefaults.high_signal_level = -6.0);
cnt_over_signal_level->value(
progdefaults.over_signal_level = -3.0);
}
Fl_ListBox *listbox_contest=(Fl_ListBox *)0;
static void cb_listbox_contest(Fl_ListBox* o, void*) {
progdefaults.logging = o->index();
if (contests[progdefaults.logging].name == "State QSO parties") {
progdefaults.CONTESTnotes = QSOparties.qso_parties[progdefaults.SQSOcontest].notes;
progdefaults.SQSOinstate = (QSOparties.qso_parties[progdefaults.SQSOcontest].instate[0] == 'T');
} else {
listbox_QP_contests->index(0);
progdefaults.CONTESTnotes = contests[progdefaults.logging].notes;
}
inp_contest_notes->value(progdefaults.CONTESTnotes.c_str());
UI_select();
clear_log_fields();
clearQSO();
progdefaults.changed = true;
}
Fl_ListBox *listbox_QP_contests=(Fl_ListBox *)0;
static void cb_listbox_QP_contests(Fl_ListBox* o, void*) {
int n = o->index();
progdefaults.SQSOcontest = n;
progdefaults.SQSOinstate = (QSOparties.qso_parties[n].instate[0] == 'T');
if (contests[progdefaults.logging].name == "State QSO parties") {
progdefaults.CONTESTnotes = QSOparties.qso_parties[n].notes;
inp_contest_notes->value(progdefaults.CONTESTnotes.c_str());
} else
inp_contest_notes->value("");
adjust_for_contest(0);
UI_select();
clear_log_fields();
clearQSO();
progdefaults.changed = true;
}
Fl_Input2 *inp_contest_notes=(Fl_Input2 *)0;
Fl_Light_Button *btnDupCheckOn=(Fl_Light_Button *)0;
static void cb_btnDupCheckOn(Fl_Light_Button* o, void*) {
progdefaults.EnableDupCheck = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnDupBand=(Fl_Check_Button *)0;
static void cb_btnDupBand(Fl_Check_Button* o, void*) {
progdefaults.dupband = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnDupMode=(Fl_Check_Button *)0;
static void cb_btnDupMode(Fl_Check_Button* o, void*) {
progdefaults.dupmode = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnDupTimeSpan=(Fl_Check_Button *)0;
static void cb_btnDupTimeSpan(Fl_Check_Button* o, void*) {
progdefaults.duptimespan=(int)o->value();
progdefaults.changed = true;
}
Fl_Button *btnDupColor=(Fl_Button *)0;
static void cb_btnDupColor(Fl_Button* o, void*) {
fl_color_chooser("Dup Check",
progdefaults.dup_color.R,
progdefaults.dup_color.G,
progdefaults.dup_color.B);
o->color(
fl_rgb_color(
progdefaults.dup_color.R,
progdefaults.dup_color.G,
progdefaults.dup_color.B));
o->redraw();
progdefaults.changed = true;
}
Fl_Button *btnPossibleDupColor=(Fl_Button *)0;
static void cb_btnPossibleDupColor(Fl_Button* o, void*) {
fl_color_chooser("Possible_Dup Check",
progdefaults.possible_dup_color.R,
progdefaults.possible_dup_color.G,
progdefaults.possible_dup_color.B);
o->color(
fl_rgb_color(
progdefaults.possible_dup_color.R,
progdefaults.possible_dup_color.G,
progdefaults.possible_dup_color.B));
o->redraw();
progdefaults.changed = true;
}
Fl_Check_Button *btnDupXchg1=(Fl_Check_Button *)0;
static void cb_btnDupXchg1(Fl_Check_Button* o, void*) {
progdefaults.dupxchg1 = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnDupState=(Fl_Check_Button *)0;
static void cb_btnDupState(Fl_Check_Button* o, void*) {
progdefaults.dupstate = o->value();
progdefaults.changed = true;
}
Fl_Value_Input2 *nbrTimeSpan=(Fl_Value_Input2 *)0;
static void cb_nbrTimeSpan(Fl_Value_Input2* o, void*) {
progdefaults.timespan = (int)o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpSend1=(Fl_Input2 *)0;
static void cb_inpSend1(Fl_Input2* o, void*) {
progdefaults.myXchg=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn599=(Fl_Check_Button *)0;
static void cb_btn599(Fl_Check_Button* o, void*) {
progdefaults.fixed599 = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCutNbrs=(Fl_Check_Button *)0;
static void cb_btnCutNbrs(Fl_Check_Button* o, void*) {
progdefaults.cutnbrs=o->value();
progdefaults.changed = true;
}
Fl_Value_Input2 *nbrContestStart=(Fl_Value_Input2 *)0;
static void cb_nbrContestStart(Fl_Value_Input2* o, void*) {
progdefaults.ContestStart = (int)o->value();
progdefaults.changed = true;
}
Fl_Value_Input2 *nbrContestDigits=(Fl_Value_Input2 *)0;
static void cb_nbrContestDigits(Fl_Value_Input2* o, void*) {
progdefaults.ContestDigits = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnUseLeadingZeros=(Fl_Check_Button *)0;
static void cb_btnUseLeadingZeros(Fl_Check_Button* o, void*) {
progdefaults.UseLeadingZeros = o->value();
progdefaults.changed = true;
}
Fl_Button *btnResetSerNbr=(Fl_Button *)0;
static void cb_btnResetSerNbr(Fl_Button*, void*) {
cb_ResetSerNbr();
}
Fl_Input2 *inp_my_FD_call=(Fl_Input2 *)0;
static void cb_inp_my_FD_call(Fl_Input2* o, void*) {
progdefaults.fd_op_call=o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_my_FD_section=(Fl_Input2 *)0;
static void cb_inp_my_FD_section(Fl_Input2* o, void*) {
progdefaults.my_FD_section=o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_my_FD_class=(Fl_Input2 *)0;
static void cb_inp_my_FD_class(Fl_Input2* o, void*) {
progdefaults.my_FD_class=o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_my_SCR_class=(Fl_Input2 *)0;
static void cb_inp_my_SCR_class(Fl_Input2* o, void*) {
progdefaults.my_SCR_class=o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_my_JOTA_troop=(Fl_Input2 *)0;
static void cb_inp_my_JOTA_troop(Fl_Input2* o, void*) {
progdefaults.my_JOTA_troop=o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_my_JOTA_scout=(Fl_Input2 *)0;
static void cb_inp_my_JOTA_scout(Fl_Input2* o, void*) {
progdefaults.my_JOTA_scout = o->value();
progdefaults.changed=true;
}
Fl_Group *sld=(Fl_Group *)0;
Fl_Check_Button *btnCWID=(Fl_Check_Button *)0;
static void cb_btnCWID(Fl_Check_Button* o, void*) {
progdefaults.CWid = o->value();
progdefaults.changed = true;
}
Fl_Value_Slider2 *sldrCWIDwpm=(Fl_Value_Slider2 *)0;
static void cb_sldrCWIDwpm(Fl_Value_Slider2* o, void*) {
progdefaults.CWIDwpm = (int)o->value();
progdefaults.changed = true;
}
Fl_Button *bCWIDModes=(Fl_Button *)0;
static void cb_bCWIDModes(Fl_Button* o, void*) {
mode_browser->label(o->label());
mode_browser->callback(0);
mode_browser->show_(&progdefaults.cwid_modes);
progdefaults.changed = true;
}
Fl_Check_Button *chkRSidNotifyOnly=(Fl_Check_Button *)0;
static void cb_chkRSidNotifyOnly(Fl_Check_Button* o, void*) {
progdefaults.rsid_notify_only = o->value();
notify_create_rsid_event(progdefaults.rsid_notify_only);
if (progdefaults.rsid_notify_only) {
chkRetainFreqLock->deactivate();
chkDisableFreqChange->deactivate();
}
else {
chkRetainFreqLock->activate();
chkDisableFreqChange->activate();
}
progdefaults.changed = true;
}
Fl_Button *bRSIDRxModes=(Fl_Button *)0;
static void cb_bRSIDRxModes(Fl_Button* o, void*) {
mode_browser->label(o->label());
mode_browser->callback(0);
mode_browser->show_(&progdefaults.rsid_rx_modes);
progdefaults.changed = true;
}
Fl_Check_Button *chkRSidWideSearch=(Fl_Check_Button *)0;
static void cb_chkRSidWideSearch(Fl_Check_Button* o, void*) {
progdefaults.rsidWideSearch=o->value();
rxid_selection_color();
progdefaults.changed = true;
}
Fl_Check_Button *chkRSidMark=(Fl_Check_Button *)0;
static void cb_chkRSidMark(Fl_Check_Button* o, void*) {
progdefaults.rsid_mark = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chkRSidAutoDisable=(Fl_Check_Button *)0;
static void cb_chkRSidAutoDisable(Fl_Check_Button* o, void*) {
progdefaults.rsid_auto_disable = o->value();
progdefaults.changed = true;
}
Fl_ListBox *listbox_rsid_errors=(Fl_ListBox *)0;
static void cb_listbox_rsid_errors(Fl_ListBox* o, void*) {
progdefaults.RsID_label_type = o->index();
progdefaults.changed = true;
}
Fl_Check_Button *chkRSidShowAlert=(Fl_Check_Button *)0;
static void cb_chkRSidShowAlert(Fl_Check_Button* o, void*) {
progdefaults.disable_rsid_warning_dialog_box = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chkRetainFreqLock=(Fl_Check_Button *)0;
static void cb_chkRetainFreqLock(Fl_Check_Button* o, void*) {
progdefaults.retain_freq_lock = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chkDisableFreqChange=(Fl_Check_Button *)0;
static void cb_chkDisableFreqChange(Fl_Check_Button* o, void*) {
progdefaults.disable_rsid_freq_change = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chk_RSID_EOT=(Fl_Check_Button *)0;
static void cb_chk_RSID_EOT(Fl_Check_Button* o, void*) {
progdefaults.rsid_eot_squelch = o->value();
progdefaults.changed = true;
}
Fl_Counter *val_RSIDsquelch=(Fl_Counter *)0;
static void cb_val_RSIDsquelch(Fl_Counter* o, void*) {
progdefaults.rsid_squelch = (int)o->value();
progdefaults.changed = true;
}
Fl_Counter *val_pretone=(Fl_Counter *)0;
static void cb_val_pretone(Fl_Counter* o, void*) {
progdefaults.pretone = o->value();
progdefaults.changed = true;
}
Fl_Button *bRSIDTxModes=(Fl_Button *)0;
static void cb_bRSIDTxModes(Fl_Button* o, void*) {
mode_browser->label(o->label());
mode_browser->callback(0);
mode_browser->show_(&progdefaults.rsid_tx_modes);
progdefaults.changed = true;
}
Fl_Check_Button *btn_post_rsid=(Fl_Check_Button *)0;
static void cb_btn_post_rsid(Fl_Check_Button* o, void*) {
progdefaults.rsid_post=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnsendid=(Fl_Check_Button *)0;
static void cb_btnsendid(Fl_Check_Button* o, void*) {
progdefaults.sendid=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnsendvideotext=(Fl_Check_Button *)0;
static void cb_btnsendvideotext(Fl_Check_Button* o, void*) {
progdefaults.sendtextid=o->value();
progdefaults.changed = true;
}
Fl_Input2 *valVideotext=(Fl_Input2 *)0;
static void cb_valVideotext(Fl_Input2* o, void*) {
progdefaults.strTextid = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chkID_SMALL=(Fl_Check_Button *)0;
static void cb_chkID_SMALL(Fl_Check_Button* o, void*) {
progdefaults.ID_SMALL=o->value();
progdefaults.changed = true;
}
Fl_Value_Slider2 *sldrVideowidth=(Fl_Value_Slider2 *)0;
static void cb_sldrVideowidth(Fl_Value_Slider2* o, void*) {
progdefaults.videowidth = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_vidlimit=(Fl_Check_Button *)0;
static void cb_btn_vidlimit(Fl_Check_Button* o, void*) {
progdefaults.vidlimit=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_vidmodelimit=(Fl_Check_Button *)0;
static void cb_btn_vidmodelimit(Fl_Check_Button* o, void*) {
progdefaults.vidmodelimit=o->value();
progdefaults.changed=true;
}
Fl_Button *bVideoIDModes=(Fl_Button *)0;
static void cb_bVideoIDModes(Fl_Button* o, void*) {
mode_browser->label(o->label());
mode_browser->callback(0);
mode_browser->show_(&progdefaults.videoid_modes);
progdefaults.changed = true;
}
Fl_Check_Button *btnConnectToMaclogger=(Fl_Check_Button *)0;
static void cb_btnConnectToMaclogger(Fl_Check_Button* o, void*) {
progdefaults.connect_to_maclogger = o->value();
if (progdefaults.connect_to_maclogger == false)
maclogger_close();
else
maclogger_init();
progdefaults.changed = true;
}
Fl_Check_Button *btn_capture_maclogger_radio=(Fl_Check_Button *)0;
static void cb_btn_capture_maclogger_radio(Fl_Check_Button* o, void*) {
progdefaults.capture_maclogger_radio = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_capture_maclogger_log=(Fl_Check_Button *)0;
static void cb_btn_capture_maclogger_log(Fl_Check_Button* o, void*) {
progdefaults.capture_maclogger_log = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_capture_maclogger_lookup=(Fl_Check_Button *)0;
static void cb_btn_capture_maclogger_lookup(Fl_Check_Button* o, void*) {
progdefaults.capture_maclogger_lookup = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_capture_maclogger_spot_tune=(Fl_Check_Button *)0;
static void cb_btn_capture_maclogger_spot_tune(Fl_Check_Button* o, void*) {
progdefaults.capture_maclogger_spot_tune = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_capture_maclogger_spot_report=(Fl_Check_Button *)0;
static void cb_btn_capture_maclogger_spot_report(Fl_Check_Button* o, void*) {
progdefaults.capture_maclogger_spot_report = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_enable_maclogger_log=(Fl_Check_Button *)0;
static void cb_btn_enable_maclogger_log(Fl_Check_Button* o, void*) {
progdefaults.enable_maclogger_log = o->value();
progdefaults.changed = true;
}
Fl_Text_Display *txt_UDP_data=(Fl_Text_Display *)0;
Fl_Output *txt_maclogger_log_filename=(Fl_Output *)0;
static void cb_Clear(Fl_Button*, void*) {
txt_UDP_data->buffer()->text("");
}
Fl_Check_Button *btn_maclogger_spot_rx=(Fl_Check_Button *)0;
static void cb_btn_maclogger_spot_rx(Fl_Check_Button* o, void*) {
progdefaults.maclogger_spot_rx = o->value();
progdefaults.changed = true;
}
Fl_Text_Display *txt_N3FJP_data=(Fl_Text_Display *)0;
static void cb_Clear1(Fl_Button*, void*) {
txt_N3FJP_data->buffer()->text("");
}
Fl_Input2 *txt_N3FJP_ip_address=(Fl_Input2 *)0;
static void cb_txt_N3FJP_ip_address(Fl_Input2* o, void*) {
progdefaults.N3FJP_address = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txt_N3FJP_ip_port_no=(Fl_Input2 *)0;
static void cb_txt_N3FJP_ip_port_no(Fl_Input2* o, void*) {
progdefaults.N3FJP_port = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_default_N3FJP_ip=(Fl_Button *)0;
static void cb_btn_default_N3FJP_ip(Fl_Button*, void*) {
txt_N3FJP_ip_address->value("127.0.0.1");
progdefaults.N3FJP_address = "127.0.0.1";
txt_N3FJP_ip_port_no->value("1100");
progdefaults.N3FJP_port = "1100";
progdefaults.changed = true;
}
Fl_Check_Button *btn_enable_N3FJP_log=(Fl_Check_Button *)0;
static void cb_btn_enable_N3FJP_log(Fl_Check_Button* o, void*) {
progdefaults.enable_N3FJP_log = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_connect_to_n3fjp=(Fl_Check_Button *)0;
static void cb_btn_connect_to_n3fjp(Fl_Check_Button* o, void*) {
progdefaults.connect_to_n3fjp=o->value();
progdefaults.changed=true;
}
Fl_Box *box_n3fjp_connected=(Fl_Box *)0;
Fl_Check_Button *btn_N3FJP_sweet_spot=(Fl_Check_Button *)0;
static void cb_btn_N3FJP_sweet_spot(Fl_Check_Button* o, void*) {
progdefaults.N3FJP_sweet_spot = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_N3FJP_modem_carrier=(Fl_Check_Button *)0;
static void cb_btn_N3FJP_modem_carrier(Fl_Check_Button* o, void*) {
progdefaults.N3FJP_modem_carrier = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_enable_N3FJP_RIGTX=(Fl_Check_Button *)0;
static void cb_btn_enable_N3FJP_RIGTX(Fl_Check_Button* o, void*) {
progdefaults.enable_N3FJP_RIGTX = o->value();
progdefaults.changed = true;
}
Fl_Round_Button *btnQRZWEBnotavailable=(Fl_Round_Button *)0;
static void cb_btnQRZWEBnotavailable(Fl_Round_Button* o, void*) {
set_qrzweb_buttons(o);
progdefaults.QRZWEB = QRZWEBNONE;
progdefaults.changed = true;
}
Fl_Round_Button *btnQRZonline=(Fl_Round_Button *)0;
static void cb_btnQRZonline(Fl_Round_Button* o, void*) {
set_qrzweb_buttons(o);
progdefaults.QRZWEB = QRZHTML;
progdefaults.changed = true;
}
Fl_Round_Button *btnHAMCALLonline=(Fl_Round_Button *)0;
static void cb_btnHAMCALLonline(Fl_Round_Button* o, void*) {
set_qrzweb_buttons(o);
progdefaults.QRZWEB = HAMCALLHTML;
progdefaults.changed = true;
}
Fl_Round_Button *btnHamQTHonline=(Fl_Round_Button *)0;
static void cb_btnHamQTHonline(Fl_Round_Button* o, void*) {
set_qrzweb_buttons(o);
progdefaults.QRZWEB = HAMQTHHTML;
progdefaults.changed = true;
}
Fl_Round_Button *btnCallookOnline=(Fl_Round_Button *)0;
static void cb_btnCallookOnline(Fl_Round_Button* o, void*) {
set_qrzweb_buttons(o);
progdefaults.QRZWEB = CALLOOKHTML;
progdefaults.changed = true;
}
Fl_Input2 *inp_qrzurl=(Fl_Input2 *)0;
static void cb_inp_qrzurl(Fl_Input2* o, void*) {
progdefaults.qrzurl = o->value();
progdefaults.changed=true;
}
Fl_Input2 *inp_hamcallurl=(Fl_Input2 *)0;
static void cb_inp_hamcallurl(Fl_Input2* o, void*) {
progdefaults.hamcallurl = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_hamqthurl=(Fl_Input2 *)0;
static void cb_inp_hamqthurl(Fl_Input2* o, void*) {
progdefaults.hamqthurl = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_callook_url=(Fl_Input2 *)0;
static void cb_inp_callook_url(Fl_Input2* o, void*) {
progdefaults.callookurl = o->value();
progdefaults.changed = true;
}
Fl_Round_Button *btnQRZXMLnotavailable=(Fl_Round_Button *)0;
static void cb_btnQRZXMLnotavailable(Fl_Round_Button* o, void*) {
set_qrzxml_buttons(o);
progdefaults.QRZXML = QRZXMLNONE;
progdefaults.changed = true;
}
Fl_Round_Button *btnQRZcdrom=(Fl_Round_Button *)0;
static void cb_btnQRZcdrom(Fl_Round_Button* o, void*) {
set_qrzxml_buttons(o);
progdefaults.QRZXML = QRZCD;
progdefaults.changed = true;
}
Fl_Round_Button *btnQRZsub=(Fl_Round_Button *)0;
static void cb_btnQRZsub(Fl_Round_Button* o, void*) {
set_qrzxml_buttons(o);
progdefaults.QRZXML = QRZNET;
progdefaults.changed = true;
}
Fl_Round_Button *btnHamcall=(Fl_Round_Button *)0;
static void cb_btnHamcall(Fl_Round_Button* o, void*) {
set_qrzxml_buttons(o);
progdefaults.QRZXML = HAMCALLNET;
progdefaults.changed = true;
}
Fl_Round_Button *btnHamQTH=(Fl_Round_Button *)0;
static void cb_btnHamQTH(Fl_Round_Button* o, void*) {
set_qrzxml_buttons(o);
progdefaults.QRZXML = HAMQTH;
progdefaults.changed = true;
}
Fl_Round_Button *btnCALLOOK=(Fl_Round_Button *)0;
static void cb_btnCALLOOK(Fl_Round_Button* o, void*) {
set_qrzxml_buttons(o);
progdefaults.QRZXML = CALLOOK;
progdefaults.changed = true;
}
Fl_Input2 *txtQRZpathname=(Fl_Input2 *)0;
static void cb_txtQRZpathname(Fl_Input2* o, void*) {
progdefaults.QRZpathname = o->value();
progdefaults.QRZchanged = true;
progdefaults.changed = true;
}
Fl_Input2 *inpQRZusername=(Fl_Input2 *)0;
static void cb_inpQRZusername(Fl_Input2* o, void*) {
progdefaults.QRZusername = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpQRZuserpassword=(Fl_Input2 *)0;
static void cb_inpQRZuserpassword(Fl_Input2* o, void*) {
progdefaults.QRZuserpassword = o->value();
progdefaults.changed = true;
}
Fl_Button *btnQRZpasswordShow=(Fl_Button *)0;
static void cb_btnQRZpasswordShow(Fl_Button* o, void*) {
inpQRZuserpassword->type(inpQRZuserpassword->type() ^ FL_SECRET_INPUT);
inpQRZuserpassword->redraw();
o->label((inpQRZuserpassword->type() & FL_SECRET_INPUT) ? "Show" : "Hide");
}
Fl_Check_Button *btn_notes_address=(Fl_Check_Button *)0;
static void cb_btn_notes_address(Fl_Check_Button* o, void*) {
progdefaults.notes_address = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_clear_notes=(Fl_Check_Button *)0;
static void cb_btn_clear_notes(Fl_Check_Button* o, void*) {
progdefaults.clear_notes = o->value();
progdefaults.changed= true;
}
Fl_Input2 *inpEQSL_www_url=(Fl_Input2 *)0;
static void cb_inpEQSL_www_url(Fl_Input2* o, void*) {
progdefaults.eqsl_www_url = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpEQSL_id=(Fl_Input2 *)0;
static void cb_inpEQSL_id(Fl_Input2* o, void*) {
progdefaults.eqsl_id = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpEQSL_pwd=(Fl_Input2 *)0;
static void cb_inpEQSL_pwd(Fl_Input2* o, void*) {
progdefaults.eqsl_pwd = o->value();
progdefaults.changed = true;
}
Fl_Button *btnEQSL_pwd_show=(Fl_Button *)0;
static void cb_btnEQSL_pwd_show(Fl_Button* o, void*) {
inpEQSL_pwd->type(inpEQSL_pwd->type() ^ FL_SECRET_INPUT);
inpEQSL_pwd->redraw();
o->label((inpEQSL_pwd->type() & FL_SECRET_INPUT) ? _("Show") : _("Hide"));
}
Fl_Input2 *inpEQSL_nick=(Fl_Input2 *)0;
static void cb_inpEQSL_nick(Fl_Input2* o, void*) {
progdefaults.eqsl_nick = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_verify_eqsl=(Fl_Button *)0;
Fl_Check_Button *btn_send_when_logged=(Fl_Check_Button *)0;
static void cb_btn_send_when_logged(Fl_Check_Button* o, void*) {
progdefaults.eqsl_when_logged = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_send_datetime_off=(Fl_Check_Button *)0;
static void cb_btn_send_datetime_off(Fl_Check_Button* o, void*) {
progdefaults.eqsl_datetime_off = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_show_eqsl_delivery=(Fl_Check_Button *)0;
static void cb_btn_show_eqsl_delivery(Fl_Check_Button* o, void*) {
progdefaults.eqsl_show_delivery = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txt_eqsl_default_message=(Fl_Input2 *)0;
static void cb_txt_eqsl_default_message(Fl_Input2* o, void*) {
progdefaults.eqsl_default_message = o->value();
progdefaults.changed = true;
}
Fl_Box *eqsl_txt1=(Fl_Box *)0;
Fl_Box *eqsl_txt2=(Fl_Box *)0;
Fl_Box *eqsl_txt3=(Fl_Box *)0;
Fl_Input2 *txt_lotw_pathname=(Fl_Input2 *)0;
static void cb_txt_lotw_pathname(Fl_Input2* o, void*) {
progdefaults.lotw_pathname = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpLOTW_pwd=(Fl_Input2 *)0;
static void cb_inpLOTW_pwd(Fl_Input2* o, void*) {
progdefaults.lotw_pwd = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_submit_lotw_password=(Fl_Check_Button *)0;
static void cb_btn_submit_lotw_password(Fl_Check_Button* o, void*) {
progdefaults.submit_lotw_password=o->value();
progdefaults.changed=true;
}
Fl_Input2 *inpLOTW_location=(Fl_Input2 *)0;
static void cb_inpLOTW_location(Fl_Input2* o, void*) {
progdefaults.lotw_location = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_lotw=(Fl_Button *)0;
static void cb_btn_select_lotw(Fl_Button*, void*) {
std::string str = select_binary_pathname(progdefaults.lotw_pathname);
txt_lotw_pathname->value(str.c_str());
progdefaults.lotw_pathname = str;
progdefaults.changed = true;
}
Fl_Check_Button *btn_lotw_quiet_mode=(Fl_Check_Button *)0;
static void cb_btn_lotw_quiet_mode(Fl_Check_Button* o, void*) {
progdefaults.lotw_quiet_mode=o->value();
progdefaults.changed=true;
}
Fl_Check_Button *btn_submit_lotw=(Fl_Check_Button *)0;
static void cb_btn_submit_lotw(Fl_Check_Button* o, void*) {
progdefaults.submit_lotw=o->value();
progdefaults.changed=true;
}
Fl_Check_Button *btn_show_lotw_delivery=(Fl_Check_Button *)0;
static void cb_btn_show_lotw_delivery(Fl_Check_Button* o, void*) {
progdefaults.lotw_show_delivery = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_export_lotw=(Fl_Button *)0;
static void cb_btn_export_lotw(Fl_Button*, void*) {
cb_btnExportLoTW();
}
Fl_Button *btn_review_lotw=(Fl_Button *)0;
static void cb_btn_review_lotw(Fl_Button*, void*) {
cb_review_lotw();
}
Fl_Button *btn_send_lotw=(Fl_Button *)0;
static void cb_btn_send_lotw(Fl_Button*, void*) {
cb_send_lotw();
}
Fl_Button *btnLOTW_pwd_show=(Fl_Button *)0;
static void cb_btnLOTW_pwd_show(Fl_Button* o, void*) {
inpLOTW_pwd->type(inpLOTW_pwd->type() ^ FL_SECRET_INPUT);
inpLOTW_pwd->redraw();
o->label((inpLOTW_pwd->type() & FL_SECRET_INPUT) ? _("Show") : _("Hide"));
}
Fl_Button *btn_verify_lotw=(Fl_Button *)0;
Fl_Button *btn_view_unmatched=(Fl_Button *)0;
Fl_Counter *cnt_tracefile_timeout=(Fl_Counter *)0;
static void cb_cnt_tracefile_timeout(Fl_Counter* o, void*) {
progdefaults.tracefile_timeout = o->value();
}
Fl_Check_Button *btnNagMe=(Fl_Check_Button *)0;
static void cb_btnNagMe(Fl_Check_Button* o, void*) {
btn2NagMe->value(o->value());
progdefaults.NagMe=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnClearOnSave=(Fl_Check_Button *)0;
static void cb_btnClearOnSave(Fl_Check_Button* o, void*) {
progdefaults.ClearOnSave=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCallUpperCase=(Fl_Check_Button *)0;
static void cb_btnCallUpperCase(Fl_Check_Button* o, void*) {
progdefaults.calluppercase = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnAutoFillQSO=(Fl_Check_Button *)0;
static void cb_btnAutoFillQSO(Fl_Check_Button* o, void*) {
progdefaults.autofill_qso_fields = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnDateTimeSort=(Fl_Check_Button *)0;
static void cb_btnDateTimeSort(Fl_Check_Button* o, void*) {
progdefaults.sort_date_time_off = o->value();
progdefaults.changed = true;
reload_browser();
}
Fl_Check_Button *btndate_time_force=(Fl_Check_Button *)0;
static void cb_btndate_time_force(Fl_Check_Button* o, void*) {
progdefaults.force_date_time = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnRSTindefault=(Fl_Check_Button *)0;
static void cb_btnRSTindefault(Fl_Check_Button* o, void*) {
progdefaults.RSTin_default = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnRSTdefault=(Fl_Check_Button *)0;
static void cb_btnRSTdefault(Fl_Check_Button* o, void*) {
progdefaults.RSTdefault = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txt_cty_dat_pathname=(Fl_Input2 *)0;
static void cb_txt_cty_dat_pathname(Fl_Input2* o, void*) {
progdefaults.cty_dat_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_cty_dat=(Fl_Button *)0;
static void cb_btn_select_cty_dat(Fl_Button*, void*) {
select_cty_dat_pathname();
}
Fl_Button *btn_default_cty_dat=(Fl_Button *)0;
static void cb_btn_default_cty_dat(Fl_Button*, void*) {
default_cty_dat_pathname();
}
Fl_Button *btn_reload_cty_dat=(Fl_Button *)0;
static void cb_btn_reload_cty_dat(Fl_Button*, void*) {
reload_cty_dat();
}
Fl_Input2 *inpMyPower=(Fl_Input2 *)0;
static void cb_inpMyPower(Fl_Input2* o, void*) {
progdefaults.mytxpower = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnDisplayLogbookRead=(Fl_Check_Button *)0;
static void cb_btnDisplayLogbookRead(Fl_Check_Button* o, void*) {
progdefaults.DisplayLogbookRead = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCWuseSOMdecoding=(Fl_Check_Button *)0;
static void cb_btnCWuseSOMdecoding(Fl_Check_Button* o, void*) {
progdefaults.CWuseSOMdecoding = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCWrcvTrack=(Fl_Check_Button *)0;
static void cb_btnCWrcvTrack(Fl_Check_Button* o, void*) {
progdefaults.CWtrack = o->value();
progdefaults.changed = true;
}
Fl_Value_Slider2 *sldrCWbandwidth=(Fl_Value_Slider2 *)0;
static void cb_sldrCWbandwidth(Fl_Value_Slider2* o, void*) {
progdefaults.CWbandwidth = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCWmfilt=(Fl_Check_Button *)0;
static void cb_btnCWmfilt(Fl_Check_Button* o, void*) {
progdefaults.CWmfilt = o->value();
progdefaults.changed = true;
}
Fl_Value_Output *valCWrcvWPM=(Fl_Value_Output *)0;
static void cb_valCWrcvWPM(Fl_Value_Output*, void*) {
progdefaults.changed = true;
}
Fl_Progress *prgsCWrcvWPM=(Fl_Progress *)0;
Fl_Counter2 *cntLower=(Fl_Counter2 *)0;
static void cb_cntLower(Fl_Counter2* o, void*) {
progdefaults.CWlower = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntUpper=(Fl_Counter2 *)0;
static void cb_cntUpper(Fl_Counter2* o, void*) {
progdefaults.CWupper = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntCWrange=(Fl_Counter2 *)0;
static void cb_cntCWrange(Fl_Counter2* o, void*) {
progdefaults.CWrange = (int)o->value();
progdefaults.changed = true;
}
Fl_Choice *mnu_cwrx_attack=(Fl_Choice *)0;
static void cb_mnu_cwrx_attack(Fl_Choice* o, void*) {
progdefaults.cwrx_attack = o->value();
progdefaults.changed = true;
}
Fl_Choice *mnu_cwrx_decay=(Fl_Choice *)0;
static void cb_mnu_cwrx_decay(Fl_Choice* o, void*) {
progdefaults.cwrx_decay = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_cw_tracking_defaults=(Fl_Button *)0;
static void cb_btn_cw_tracking_defaults(Fl_Button*, void*) {
progdefaults.cwrx_attack = 1;
progdefaults.cwrx_decay = 0;
mnu_cwrx_attack->value(progdefaults.cwrx_attack);
mnu_cwrx_decay->value(progdefaults.cwrx_decay);
progdefaults.changed = true;
}
Fl_Value_Slider2 *sldrCWxmtWPM=(Fl_Value_Slider2 *)0;
static void cb_sldrCWxmtWPM(Fl_Value_Slider2* o, void*) {
progdefaults.CWspeed = (int)o->value();
cntCW_WPM->value(progdefaults.CWspeed);
cntr_nanoCW_WPM->value(progdefaults.CWspeed);
progdefaults.changed = true;
sync_cw_parameters();
}
Fl_Counter2 *cntCWdefWPM=(Fl_Counter2 *)0;
static void cb_cntCWdefWPM(Fl_Counter2* o, void*) {
progdefaults.defCWspeed = (int)o->value();
progdefaults.changed = true;
}
Fl_Counter *cntCWlowerlimit=(Fl_Counter *)0;
static void cb_cntCWlowerlimit(Fl_Counter* o, void*) {
progdefaults.CWlowerlimit = (int)o->value();
progdefaults.changed = true;
sldrCWxmtWPM->minimum(progdefaults.CWlowerlimit);
sldrCWxmtWPM->value(progdefaults.CWspeed);
sldrCWxmtWPM->redraw();
cntCWupperlimit->minimum(progdefaults.CWlowerlimit+20);
cntCW_WPM->minimum(progdefaults.CWlowerlimit);
}
Fl_Counter *cntCWupperlimit=(Fl_Counter *)0;
static void cb_cntCWupperlimit(Fl_Counter* o, void*) {
progdefaults.CWupperlimit = (int)o->value();
progdefaults.changed = true;
sldrCWxmtWPM->maximum(progdefaults.CWupperlimit);
sldrCWxmtWPM->value(progdefaults.CWspeed);
sldrCWxmtWPM->redraw();
cntCWlowerlimit->maximum(progdefaults.CWupperlimit-20);
cntCW_WPM->maximum(progdefaults.CWupperlimit);
}
Fl_Value_Slider2 *sldrCWfarnsworth=(Fl_Value_Slider2 *)0;
static void cb_sldrCWfarnsworth(Fl_Value_Slider2* o, void*) {
progdefaults.CWfarnsworth = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCWusefarnsworth=(Fl_Check_Button *)0;
static void cb_btnCWusefarnsworth(Fl_Check_Button* o, void*) {
progdefaults.CWusefarnsworth=o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntCWdash2dot=(Fl_Counter2 *)0;
static void cb_cntCWdash2dot(Fl_Counter2* o, void*) {
progdefaults.CWdash2dot=o->value();
cnt_nanoCWdash2dot->value(progdefaults.CWdash2dot);
progdefaults.changed = true;
}
Fl_Counter2 *cntCWrisetime=(Fl_Counter2 *)0;
static void cb_cntCWrisetime(Fl_Counter2* o, void*) {
progdefaults.CWrisetime=o->value();
progdefaults.changed = true;
}
Fl_ListBox *i_listboxQSKshape=(Fl_ListBox *)0;
static void cb_i_listboxQSKshape(Fl_ListBox* o, void*) {
progdefaults.QSKshape = o->index();
progdefaults.changed = true;
}
Fl_Check_Button *btnQSK=(Fl_Check_Button *)0;
static void cb_btnQSK(Fl_Check_Button* o, void*) {
progdefaults.QSK = o->value();
btnQSK2->value(o->value());
progdefaults.changed = true;
if (o->value()) {
progdefaults.sig_on_right_channel = false;
chkAudioStereoOut->value(0);
progdefaults.PTTrightchannel = false;
btnPTTrightchannel->value(0);
};
}
Fl_Counter2 *cntQSKfrequency=(Fl_Counter2 *)0;
static void cb_cntQSKfrequency(Fl_Counter2* o, void*) {
progdefaults.QSKfrequency=o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntPreTiming=(Fl_Counter2 *)0;
static void cb_cntPreTiming(Fl_Counter2* o, void*) {
progdefaults.CWpre = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntPostTiming=(Fl_Counter2 *)0;
static void cb_cntPostTiming(Fl_Counter2* o, void*) {
progdefaults.CWpost = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntQSKamp=(Fl_Counter2 *)0;
static void cb_cntQSKamp(Fl_Counter2* o, void*) {
progdefaults.QSKamp=o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntQSKrisetime=(Fl_Counter2 *)0;
static void cb_cntQSKrisetime(Fl_Counter2* o, void*) {
progdefaults.QSKrisetime=o->value();
progdefaults.changed = true;
}
Fl_ListBox *i_listbox_test_char=(Fl_ListBox *)0;
static void cb_i_listbox_test_char(Fl_ListBox* o, void*) {
progdefaults.TestChar = o->index();
}
Fl_Check_Button *btnQSKadjust=(Fl_Check_Button *)0;
static void cb_btnQSKadjust(Fl_Check_Button* o, void*) {
progdefaults.QSKadjust = o->value();
}
static void cb_listbox_prosign(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[0] = ps[c];
progdefaults.changed = true;
}
static void cb_listbox_prosign1(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[1] = ps[c];
progdefaults.changed = true;
}
static void cb_listbox_prosign2(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[2] = ps[c];
progdefaults.changed = true;
}
static void cb_listbox_prosign3(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[3] = ps[c];
progdefaults.changed = true;
}
static void cb_listbox_prosign4(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[4] = ps[c];
progdefaults.changed = true;
}
static void cb_listbox_prosign5(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[5] = ps[c];
progdefaults.changed = true;
}
static void cb_listbox_prosign6(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[6] = ps[c];
progdefaults.changed = true;
}
static void cb_listbox_prosign7(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[7] = ps[c];
progdefaults.changed = true;;
}
Fl_ListBox *listbox_prosign[9]={(Fl_ListBox *)0};
static void cb_listbox_prosign8(Fl_ListBox* o, void*) {
int c = o->index();
for (int i = 0; i < 9; i++)
if (listbox_prosign[i]->index() == c) {
listbox_prosign[i]->index(12);
progdefaults.CW_prosigns[i] = ' ';
}
o->index(c);
char ps[] = "~%&+={}<>[] ";
progdefaults.CW_prosigns[8] = ps[c];
progdefaults.changed = true;
}
Fl_Check_Button *btnCW_use_paren=(Fl_Check_Button *)0;
static void cb_btnCW_use_paren(Fl_Check_Button* o, void*) {
progdefaults.CW_use_paren=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCW_prosign_display=(Fl_Check_Button *)0;
static void cb_btnCW_prosign_display(Fl_Check_Button* o, void*) {
progdefaults.CW_prosign_display=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_A_aelig=(Fl_Check_Button *)0;
static void cb_btn_A_aelig(Fl_Check_Button* o, void*) {
progdefaults.A_aelig = o->value();
if (progdefaults.A_aelig) {
progdefaults.A_umlaut = false;
btn_A_umlaut->value(0);
}
btn_A_umlaut->redraw();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_A_umlaut=(Fl_Check_Button *)0;
static void cb_btn_A_umlaut(Fl_Check_Button* o, void*) {
progdefaults.A_umlaut = o->value();
if (progdefaults.A_umlaut) {
progdefaults.A_aelig = false;
btn_A_aelig->value(0);
}
btn_A_aelig->redraw();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_A_ring=(Fl_Check_Button *)0;
static void cb_btn_A_ring(Fl_Check_Button* o, void*) {
progdefaults.A_ring = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_O_acute=(Fl_Check_Button *)0;
static void cb_btn_O_acute(Fl_Check_Button* o, void*) {
progdefaults.O_acute = o->value();
if (progdefaults.O_acute) {
progdefaults.O_umlaut = false;
btn_O_umlaut->value(0);
progdefaults.O_slash = false;
btn_O_slash->value(0);
}
btn_O_umlaut->redraw();
btn_O_slash->redraw();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_O_slash=(Fl_Check_Button *)0;
static void cb_btn_O_slash(Fl_Check_Button* o, void*) {
progdefaults.O_slash = o->value();
if (progdefaults.O_slash) {
progdefaults.O_umlaut = false;
btn_O_umlaut->value(0);
progdefaults.O_acute = false;
btn_O_acute->value(0);
}
btn_O_umlaut->redraw();
btn_O_acute->redraw();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_O_umlaut=(Fl_Check_Button *)0;
static void cb_btn_O_umlaut(Fl_Check_Button* o, void*) {
progdefaults.O_umlaut = o->value();
if (progdefaults.O_umlaut) {
progdefaults.O_acute = false;
btn_O_acute->value(0);
progdefaults.O_slash = false;
btn_O_slash->value(0);
}
btn_O_acute->redraw();
btn_O_slash->redraw();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_C_cedilla=(Fl_Check_Button *)0;
static void cb_btn_C_cedilla(Fl_Check_Button* o, void*) {
progdefaults.C_cedilla = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_E_grave=(Fl_Check_Button *)0;
static void cb_btn_E_grave(Fl_Check_Button* o, void*) {
progdefaults.E_grave = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_E_acute=(Fl_Check_Button *)0;
static void cb_btn_E_acute(Fl_Check_Button* o, void*) {
progdefaults.E_acute = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_N_tilde=(Fl_Check_Button *)0;
static void cb_btn_N_tilde(Fl_Check_Button* o, void*) {
progdefaults.N_tilde = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_U_umlaut=(Fl_Check_Button *)0;
static void cb_btn_U_umlaut(Fl_Check_Button* o, void*) {
progdefaults.U_umlaut = o->value();
if (progdefaults.U_umlaut) {
progdefaults.U_circ = false;
btn_U_circ->value(0);
}
btn_U_circ->redraw();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_U_circ=(Fl_Check_Button *)0;
static void cb_btn_U_circ(Fl_Check_Button* o, void*) {
progdefaults.U_circ = o->value();
if (progdefaults.U_circ) {
progdefaults.U_umlaut = false;
btn_U_umlaut->value(0);
}
btn_U_umlaut->redraw();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_backslash=(Fl_Check_Button *)0;
static void cb_btn_CW_backslash(Fl_Check_Button* o, void*) {
progdefaults.CW_backslash = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_single_quote=(Fl_Check_Button *)0;
static void cb_btn_CW_single_quote(Fl_Check_Button* o, void*) {
progdefaults.CW_single_quote = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_dollar_sign=(Fl_Check_Button *)0;
static void cb_btn_CW_dollar_sign(Fl_Check_Button* o, void*) {
progdefaults.CW_dollar_sign = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_open_paren=(Fl_Check_Button *)0;
static void cb_btn_CW_open_paren(Fl_Check_Button* o, void*) {
progdefaults.CW_open_paren = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_close_paren=(Fl_Check_Button *)0;
static void cb_btn_CW_close_paren(Fl_Check_Button* o, void*) {
progdefaults.CW_close_paren = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_colon=(Fl_Check_Button *)0;
static void cb_btn_CW_colon(Fl_Check_Button* o, void*) {
progdefaults.CW_colon = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_semi_colon=(Fl_Check_Button *)0;
static void cb_btn_CW_semi_colon(Fl_Check_Button* o, void*) {
progdefaults.CW_semi_colon = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_underscore=(Fl_Check_Button *)0;
static void cb_btn_CW_underscore(Fl_Check_Button* o, void*) {
progdefaults.CW_underscore = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_at_symbol=(Fl_Check_Button *)0;
static void cb_btn_CW_at_symbol(Fl_Check_Button* o, void*) {
progdefaults.CW_at_symbol = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_exclamation=(Fl_Check_Button *)0;
static void cb_btn_CW_exclamation(Fl_Check_Button* o, void*) {
progdefaults.CW_exclamation = o->value();
progdefaults.changed = true;
CW_table_changed = true;
}
Fl_Check_Button *btn_CW_noise0=(Fl_Check_Button *)0;
static void cb_btn_CW_noise0(Fl_Check_Button* o, void*) {
progdefaults.CW_noise = 0;
if (o->value()) {
btn_CW_noise1->value(0);
btn_CW_noise2->value(0);
btn_CW_noise3->value(0);
}
else
progdefaults.CW_noise = 0;
progdefaults.changed = true;
}
Fl_Check_Button *btn_CW_noise1=(Fl_Check_Button *)0;
static void cb_btn_CW_noise1(Fl_Check_Button* o, void*) {
progdefaults.CW_noise = '*';
if (o->value()) {
btn_CW_noise0->value(0);
btn_CW_noise2->value(0);
btn_CW_noise3->value(0);
}
else
progdefaults.CW_noise = 0;
progdefaults.changed = true;
}
Fl_Check_Button *btn_CW_noise2=(Fl_Check_Button *)0;
static void cb_btn_CW_noise2(Fl_Check_Button* o, void*) {
progdefaults.CW_noise = o->value();
if (o->value()) {
btn_CW_noise0->value(0);
btn_CW_noise1->value(0);
btn_CW_noise3->value(0);
}
else
progdefaults.CW_noise = 0;
progdefaults.changed = true;
}
Fl_Check_Button *btn_CW_noise3=(Fl_Check_Button *)0;
static void cb_btn_CW_noise3(Fl_Check_Button* o, void*) {
progdefaults.CW_noise = ' ';
if (o->value()) {
btn_CW_noise0->value(0);
btn_CW_noise1->value(0);
btn_CW_noise2->value(0);
}
else
progdefaults.CW_noise = 0;
progdefaults.changed = true;
}
Fl_ComboBox *select_WK_CommPort=(Fl_ComboBox *)0;
static void cb_select_WK_CommPort(Fl_ComboBox* o, void*) {
progStatus.WK_serial_port_name = o->value();
select_WKFSK_CommPort->value(progStatus.WK_serial_port_name.c_str());
}
Fl_Light_Button *btn_WKCW_connect=(Fl_Light_Button *)0;
static void cb_btn_WKCW_connect(Fl_Light_Button* o, void*) {
WKCW_connect(o->value());
}
Fl_Box *box_WK_wait=(Fl_Box *)0;
Fl_Box *box_WK_break_in=(Fl_Box *)0;
Fl_Box *box_WK_busy=(Fl_Box *)0;
Fl_Box *box_WK_xoff=(Fl_Box *)0;
Fl_Box *box_WK_keydown=(Fl_Box *)0;
Fl_ComboBox *choice_WK_keyer_mode=(Fl_ComboBox *)0;
static void cb_choice_WK_keyer_mode(Fl_ComboBox*, void*) {
WK_change_choice_keyer_mode();
}
Fl_ComboBox *choice_WK_hang=(Fl_ComboBox *)0;
static void cb_choice_WK_hang(Fl_ComboBox*, void*) {
WK_change_choice_hang();
}
Fl_ComboBox *choice_WK_sidetone=(Fl_ComboBox *)0;
static void cb_choice_WK_sidetone(Fl_ComboBox*, void*) {
WK_change_choice_sidetone();
}
Fl_ComboBox *choice_WK_output_pins=(Fl_ComboBox *)0;
static void cb_choice_WK_output_pins(Fl_ComboBox*, void*) {
WK_change_choice_output_pins();
}
Fl_Check_Button *btn_WK_use_pot=(Fl_Check_Button *)0;
static void cb_btn_WK_use_pot(Fl_Check_Button*, void*) {
WK_use_pot_changed();
}
Fl_Output *txt_WK_wpm=(Fl_Output *)0;
Fl_Check_Button *btn_WK_swap=(Fl_Check_Button *)0;
static void cb_btn_WK_swap(Fl_Check_Button*, void*) {
WK_change_btn_swap();
}
Fl_Check_Button *btn_WK_auto_space=(Fl_Check_Button *)0;
static void cb_btn_WK_auto_space(Fl_Check_Button*, void*) {
WK_change_btn_auto_space();
}
Fl_Check_Button *btn_WK_ct_space=(Fl_Check_Button *)0;
static void cb_btn_WK_ct_space(Fl_Check_Button*, void*) {
WK_change_btn_ct_space();
}
Fl_Check_Button *btn_WK_paddledog=(Fl_Check_Button *)0;
static void cb_btn_WK_paddledog(Fl_Check_Button*, void*) {
WK_change_btn_paddledog();
}
Fl_Check_Button *btn_WK_cut_zeronine=(Fl_Check_Button *)0;
static void cb_btn_WK_cut_zeronine(Fl_Check_Button*, void*) {
WK_change_btn_cut_zeronine();
}
Fl_Check_Button *btn_WK_paddle_echo=(Fl_Check_Button *)0;
static void cb_btn_WK_paddle_echo(Fl_Check_Button*, void*) {
WK_change_btn_paddle_echo();
}
Fl_Check_Button *btn_WK_serial_echo=(Fl_Check_Button *)0;
static void cb_btn_WK_serial_echo(Fl_Check_Button*, void*) {
WK_change_btn_serial_echo();
}
Fl_Check_Button *btn_WK_sidetone_on=(Fl_Check_Button *)0;
static void cb_btn_WK_sidetone_on(Fl_Check_Button*, void*) {
WK_change_btn_sidetone_on();
}
Fl_Check_Button *btn_WK_tone_on=(Fl_Check_Button *)0;
static void cb_btn_WK_tone_on(Fl_Check_Button*, void*) {
WK_change_btn_tone_on();
}
Fl_Check_Button *btn_WK_ptt_on=(Fl_Check_Button *)0;
static void cb_btn_WK_ptt_on(Fl_Check_Button*, void*) {
WK_change_btn_ptt_on();
}
Fl_Counter *cntr_WK_min_wpm=(Fl_Counter *)0;
static void cb_cntr_WK_min_wpm(Fl_Counter* o, void*) {
WK_change_cntr_min_wpm();
if ((o->value() + cntr_WK_rng_wpm->value()) > 55)
cntr_WK_rng_wpm->value(55 - o->value());
}
Fl_Counter *cntr_WK_rng_wpm=(Fl_Counter *)0;
static void cb_cntr_WK_rng_wpm(Fl_Counter* o, void*) {
WK_change_cntr_rng_wpm();
if ((cntr_WK_min_wpm->value() + o->value()) > 55)
o->value(55 - cntr_WK_min_wpm->value());
}
Fl_Counter *cntr_WK_farnsworth=(Fl_Counter *)0;
static void cb_cntr_WK_farnsworth(Fl_Counter*, void*) {
WK_change_cntr_farnsworth();
}
Fl_Counter *cntr_WK_cmd_wpm=(Fl_Counter *)0;
static void cb_cntr_WK_cmd_wpm(Fl_Counter*, void*) {
WK_change_cntr_cmd_wpm();
}
Fl_Counter *cntr_WK_ratio=(Fl_Counter *)0;
static void cb_cntr_WK_ratio(Fl_Counter*, void*) {
WK_change_cntr_ratio();
}
Fl_Counter *cntr_WK_comp=(Fl_Counter *)0;
static void cb_cntr_WK_comp(Fl_Counter*, void*) {
WK_change_cntr_comp();
}
Fl_Counter *cntr_WK_first_ext=(Fl_Counter *)0;
static void cb_cntr_WK_first_ext(Fl_Counter*, void*) {
WK_change_cntr_first_ext();
}
Fl_Counter *cntr_WK_sample=(Fl_Counter *)0;
static void cb_cntr_WK_sample(Fl_Counter*, void*) {
WK_change_cntr_sample();
}
Fl_Counter *cntr_WK_weight=(Fl_Counter *)0;
static void cb_cntr_WK_weight(Fl_Counter*, void*) {
WK_change_cntr_weight();
}
Fl_Counter *cntr_WK_leadin=(Fl_Counter *)0;
static void cb_cntr_WK_leadin(Fl_Counter*, void*) {
WK_change_cntr_leadin();
}
Fl_Counter *cntr_WK_tail=(Fl_Counter *)0;
static void cb_cntr_WK_tail(Fl_Counter*, void*) {
WK_change_cntr_tail();
}
Fl_Check_Button *btnK3NG=(Fl_Check_Button *)0;
static void cb_btnK3NG(Fl_Check_Button* o, void*) {
progdefaults.WK_K3NGsketch = o->value();
progdefaults.changed = true;
}
Fl_ComboBox *select_nanoCW_CommPort=(Fl_ComboBox *)0;
static void cb_select_nanoCW_CommPort(Fl_ComboBox* o, void*) {
progdefaults.nanoIO_serial_port_name = o->value();
}
Fl_Light_Button *btn_nanoCW_connect=(Fl_Light_Button *)0;
static void cb_btn_nanoCW_connect(Fl_Light_Button* o, void*) {
if (o->value()) {
if (open_nanoCW()) {
btn_nanoIO_connect->value(1);
chk_nanoIO_CW_io->value(1);
} else {
o->value(0);
btn_nanoIO_connect->value(0);
chk_nanoIO_CW_io->value(0);
chk_nanoIO_FSK_io->value(0);
}
} else {
close_nanoIO();
o->value(0);
btn_nanoIO_connect->value(0);
chk_nanoIO_FSK_io->value(0);
chk_nanoIO_CW_io->value(0);
};
}
Fl_Counter *cntr_nanoCW_paddle_WPM=(Fl_Counter *)0;
static void cb_cntr_nanoCW_paddle_WPM(Fl_Counter* o, void*) {
progdefaults.CW_keyspeed = (int)o->value();
set_nano_keyerWPM(progdefaults.CW_keyspeed);
progdefaults.changed = true;
}
FTextView *txt_nano_CW_io=(FTextView *)0;
Fl_Counter *cntr_nanoCW_WPM=(Fl_Counter *)0;
static void cb_cntr_nanoCW_WPM(Fl_Counter* o, void*) {
progdefaults.CWspeed = (int)o->value();
cntCW_WPM->value(progdefaults.CWspeed);
sldrCWxmtWPM->value(progdefaults.CWspeed);
progdefaults.changed = true;
sync_cw_parameters();
}
Fl_Counter2 *cnt_nanoCWdash2dot=(Fl_Counter2 *)0;
static void cb_cnt_nanoCWdash2dot(Fl_Counter2* o, void*) {
progdefaults.CWdash2dot=o->value();
cntCWdash2dot->value(progdefaults.CWdash2dot);
progdefaults.changed = true;
}
Fl_ListBox *listbox_nanoIO_serbaud=(Fl_ListBox *)0;
static void cb_listbox_nanoIO_serbaud(Fl_ListBox* o, void*) {
progdefaults.nanoIO_serbaud = o->index();
listbox_nanoIO_serbaud2->index(o->index());
progdefaults.changed = true;
}
Fl_ListBox *listbox_nano_keyer=(Fl_ListBox *)0;
static void cb_listbox_nano_keyer(Fl_ListBox* o, void*) {
progdefaults.nanoIO_CW_keyer = o->index();
set_nanoIO_keyer(o->index());
progdefaults.changed = true;
}
Fl_ListBox *listbox_incr=(Fl_ListBox *)0;
static void cb_listbox_incr(Fl_ListBox* o, void*) {
progdefaults.nanoIO_CW_incr = o->index() + '1';
set_nanoIO_incr();
progdefaults.changed = true;
}
Fl_Button *btn_cwfsk_save=(Fl_Button *)0;
static void cb_btn_cwfsk_save(Fl_Button*, void*) {
nano_CW_save();
}
Fl_Button *btn_cwfsk_query=(Fl_Button *)0;
static void cb_btn_cwfsk_query(Fl_Button*, void*) {
nano_CW_query();
}
Fl_Check_Button *btn_nanoIO_pot=(Fl_Check_Button *)0;
static void cb_btn_nanoIO_pot(Fl_Check_Button* o, void*) {
progdefaults.nanoIO_speed_pot=o->value();
progdefaults.changed=true;
nanoIO_use_pot();
}
Fl_Counter *cntr_nanoIO_min_wpm=(Fl_Counter *)0;
static void cb_cntr_nanoIO_min_wpm(Fl_Counter* o, void*) {
if ((o->value() + cntr_nanoIO_rng_wpm->value()) > 100)
cntr_nanoIO_rng_wpm->value(100 - o->value());
set_nanoIO_min_max();
}
Fl_Counter *cntr_nanoIO_rng_wpm=(Fl_Counter *)0;
static void cb_cntr_nanoIO_rng_wpm(Fl_Counter* o, void*) {
if ((cntr_nanoIO_min_wpm->value() + o->value()) > 100)
o->value(100 - cntr_nanoIO_min_wpm->value());
set_nanoIO_min_max();
}
Fl_Check_Button *btn_disable_CW_PTT=(Fl_Check_Button *)0;
static void cb_btn_disable_CW_PTT(Fl_Check_Button* o, void*) {
progdefaults.disable_CW_PTT=o->value();
progdefaults.changed=true;
nanoIO_set_cw_ptt();
}
Fl_Counter *cntrWPMtest=(Fl_Counter *)0;
static void cb_cntrWPMtest(Fl_Counter* o, void*) {
progdefaults.nanoCW_test_wpm = o->value();
progdefaults.changed=true;
}
Fl_Button *btn_cal_variable=(Fl_Button *)0;
static void cb_btn_cal_variable(Fl_Button*, void*) {
nanoIO_wpm_cal();
}
Fl_Value_Input *corr_var_wpm=(Fl_Value_Input *)0;
Fl_Value_Input *usec_correc=(Fl_Value_Input *)0;
Fl_Button *btn_correction=(Fl_Button *)0;
static void cb_btn_correction(Fl_Button*, void*) {
nanoIO_correction();
}
Fl_Check_Button *chk_nanoIO_CW_io=(Fl_Check_Button *)0;
static void cb_chk_nanoIO_CW_io(Fl_Check_Button* o, void*) {
if (o->value() == 0) {
o->value(1);
return;
}
set_nanoCW();
chk_nanoIO_FSK_io->value(0);
}
Fl_Check_Button *btn_CW_KEYLINE_flrig=(Fl_Check_Button *)0;
static void cb_btn_CW_KEYLINE_flrig(Fl_Check_Button* o, void*) {
int val = o->value();
progdefaults.use_FLRIGkeying = val;
if (val) {
progdefaults.CW_KEYLINE_on_cat_port = 0;
progdefaults.CW_KEYLINE_on_ptt_port = 0;
btn_CW_KEYLINE_catport->value(0);
btn_CW_KEYLINE_shared_PTT->value(0);
}
progdefaults.CW_KEYLINE_changed = true;
}
Fl_Check_Button *btn_FLRIG_CW_disable_ptt=(Fl_Check_Button *)0;
static void cb_btn_FLRIG_CW_disable_ptt(Fl_Check_Button* o, void*) {
progdefaults.CATkeying_disable_ptt = o->value();
btn_CAT_CW_disable_ptt->value(o->value());
progdefaults.changed = true;
}
Fl_Check_Button *btn_CW_KEYLINE_catport=(Fl_Check_Button *)0;
static void cb_btn_CW_KEYLINE_catport(Fl_Check_Button* o, void*) {
int val = o->value();
progdefaults.CW_KEYLINE_on_cat_port = val;
if (val) {
progdefaults.CW_KEYLINE_on_ptt_port = 0;
progdefaults.use_FLRIGkeying = 0;
btn_CW_KEYLINE_shared_PTT->value(0);
btn_CW_KEYLINE_flrig->value(0);
}
progdefaults.CW_KEYLINE_changed = true;
}
Fl_Check_Button *btn_CW_KEYLINE_shared_PTT=(Fl_Check_Button *)0;
static void cb_btn_CW_KEYLINE_shared_PTT(Fl_Check_Button* o, void*) {
int val = o->value();
progdefaults.CW_KEYLINE_on_ptt_port = val;
if (val) {
progdefaults.CW_KEYLINE_on_cat_port = 0;
progdefaults.use_FLRIGkeying = 0;
btn_CW_KEYLINE_catport->value(0);
btn_CW_KEYLINE_flrig->value(0);
}
progdefaults.CW_KEYLINE_changed = true;
}
Fl_ListBox *listbox_CW_KEYLINE=(Fl_ListBox *)0;
static void cb_listbox_CW_KEYLINE(Fl_ListBox* o, void*) {
progdefaults.CW_KEYLINE = o->index();
}
Fl_Counter2 *cntCWkeycomp=(Fl_Counter2 *)0;
static void cb_cntCWkeycomp(Fl_Counter2* o, void*) {
progdefaults.CWkeycomp =o->value();
progdefaults.changed = true;
}
Fl_ListBox *listbox_PTT_KEYLINE=(Fl_ListBox *)0;
static void cb_listbox_PTT_KEYLINE(Fl_ListBox* o, void*) {
progdefaults.PTT_KEYLINE = o->index();
progdefaults.changed = true;
}
Fl_ComboBox *select_CW_KEYLINE_CommPort=(Fl_ComboBox *)0;
static void cb_select_CW_KEYLINE_CommPort(Fl_ComboBox* o, void*) {
progdefaults.CW_KEYLINE_serial_port_name = o->value();
if (progStatus.useCW_KEYLINE) {
close_CW_KEYLINE();
if (!open_CW_KEYLINE()) {
btn_CW_KEYLINE_connect->value(0);
progStatus.useCW_KEYLINE = 0;
}
progStatus.useCW_KEYLINE = 1;
}
progdefaults.CW_KEYLINE_changed = true;
}
Fl_Light_Button *btn_CW_KEYLINE_connect=(Fl_Light_Button *)0;
static void cb_btn_CW_KEYLINE_connect(Fl_Light_Button* o, void*) {
if (o->value()) {
if (!open_CW_KEYLINE())
o->value(0);
else {
progStatus.useCW_KEYLINE = 1;
btn_use_ELCTkeying->value(0);
btn_use_KNWDkeying->value(0);
btn_use_ICOMkeying->value(0);
btn_use_YAESUkeying->value(0);
progdefaults.use_ELCTkeying = 0;
progdefaults.use_ICOMkeying = 0;
progdefaults.use_KNWDkeying = 0;
progdefaults.use_YAESUkeying = 0;
}
} else {
close_CW_KEYLINE();
progStatus.useCW_KEYLINE = 0;
};
}
Fl_Light_Button *btn_cw_dtr_calibrate=(Fl_Light_Button *)0;
static void cb_btn_cw_dtr_calibrate(Fl_Light_Button*, void*) {
calibrate_cwio();
}
Fl_Output *cwio_test_result=(Fl_Output *)0;
Fl_Check_Button *btn_use_ICOMkeying=(Fl_Check_Button *)0;
static void cb_btn_use_ICOMkeying(Fl_Check_Button* o, void*) {
progdefaults.use_ICOMkeying = o->value();
if (o->value()) {
btn_use_ELCTkeying->value(0);
btn_use_KNWDkeying->value(0);
btn_use_YAESUkeying->value(0);
progdefaults.use_ELCTkeying = 0;
progdefaults.use_KNWDkeying = 0;
progdefaults.use_YAESUkeying = 0;
close_CW_KEYLINE();
progStatus.useCW_KEYLINE = 0;
btn_cw_dtr_calibrate->value(0);
}
progdefaults.changed=true;
}
Fl_Input *val_ICOMcivaddr=(Fl_Input *)0;
static void cb_val_ICOMcivaddr(Fl_Input* o, void*) {
progdefaults.ICOMcivaddr=o->value();
progdefaults.changed=true;
}
Fl_Check_Button *btn_use_ELCTkeying=(Fl_Check_Button *)0;
static void cb_btn_use_ELCTkeying(Fl_Check_Button* o, void*) {
progdefaults.use_ELCTkeying = o->value();
if (o->value()) {
btn_use_YAESUkeying->value(0);
btn_use_ICOMkeying->value(0);
btn_use_KNWDkeying->value(0);
progdefaults.use_YAESUkeying = 0;
progdefaults.use_ICOMkeying = 0;
progdefaults.use_KNWDkeying = 0;
close_CW_KEYLINE();
progStatus.useCW_KEYLINE = 0;
btn_cw_dtr_calibrate->value(0);
}
progdefaults.changed=true;
}
Fl_Check_Button *btn_use_KNWDkeying=(Fl_Check_Button *)0;
static void cb_btn_use_KNWDkeying(Fl_Check_Button* o, void*) {
progdefaults.use_KNWDkeying = o->value();
if (o->value()) {
btn_use_YAESUkeying->value(0);
btn_use_ICOMkeying->value(0);
btn_use_ELCTkeying->value(0);
progdefaults.use_YAESUkeying = 0;
progdefaults.use_ICOMkeying = 0;
progdefaults.use_ELCTkeying = 0;
close_CW_KEYLINE();
progStatus.useCW_KEYLINE = 0;
btn_cw_dtr_calibrate->value(0);
}
progdefaults.changed=true;
}
Fl_Check_Button *btn_use_YAESUkeying=(Fl_Check_Button *)0;
static void cb_btn_use_YAESUkeying(Fl_Check_Button* o, void*) {
progdefaults.use_YAESUkeying = o->value();
if (o->value()) {
btn_use_ELCTkeying->value(0);
btn_use_KNWDkeying->value(0);
btn_use_ICOMkeying->value(0);
progdefaults.use_ELCTkeying = 0;
progdefaults.use_KNWDkeying = 0;
progdefaults.use_ICOMkeying = 0;
close_CW_KEYLINE();
progStatus.useCW_KEYLINE = 0;
btn_cw_dtr_calibrate->value(0);
}
progdefaults.changed=true;
}
Fl_Check_Button *btn_CAT_CW_disable_ptt=(Fl_Check_Button *)0;
static void cb_btn_CAT_CW_disable_ptt(Fl_Check_Button* o, void*) {
progdefaults.CATkeying_disable_ptt = o->value();
btn_FLRIG_CW_disable_ptt->value(o->value());
progdefaults.changed = true;
}
Fl_Button *btn_CAT_keying_calibrate=(Fl_Button *)0;
static void cb_btn_CAT_keying_calibrate(Fl_Button*, void*) {
CAT_keying_calibrate();
}
Fl_Value_Input *out_CATkeying_compensation=(Fl_Value_Input *)0;
static void cb_out_CATkeying_compensation(Fl_Value_Input* o, void*) {
progdefaults.CATkeying_compensation = o->value() * 1000;
progdefaults.changed=true;
}
Fl_Button *btn_CAT_keying_clear=(Fl_Button *)0;
static void cb_btn_CAT_keying_clear(Fl_Button*, void*) {
progdefaults.CATkeying_compensation = 0;
out_CATkeying_compensation->value(0);
out_CATkeying_test_result->value(0);
}
Fl_Button *btn_CAT_keying_test=(Fl_Button *)0;
static void cb_btn_CAT_keying_test(Fl_Button*, void*) {
CAT_keying_test();
}
Fl_Value_Input *out_CATkeying_test_result=(Fl_Value_Input *)0;
Fl_Input2 *txtSecondary=(Fl_Input2 *)0;
static void cb_txtSecondary(Fl_Input2* o, void*) {
progdefaults.secText = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *valDominoEX_FILTER=(Fl_Check_Button *)0;
static void cb_valDominoEX_FILTER(Fl_Check_Button* o, void*) {
progdefaults.DOMINOEX_FILTER = o->value();
resetDOMEX();
progdefaults.changed = true;
}
Fl_Counter2 *valDominoEX_BW=(Fl_Counter2 *)0;
static void cb_valDominoEX_BW(Fl_Counter2* o, void*) {
progdefaults.DOMINOEX_BW = o->value();
resetDOMEX();
progdefaults.changed = true;
}
Fl_Check_Button *chkDominoEX_FEC=(Fl_Check_Button *)0;
static void cb_chkDominoEX_FEC(Fl_Check_Button* o, void*) {
progdefaults.DOMINOEX_FEC = o->value();
progdefaults.changed = true;
}
Fl_Value_Slider2 *valDomCWI=(Fl_Value_Slider2 *)0;
static void cb_valDomCWI(Fl_Value_Slider2* o, void*) {
progdefaults.DomCWI = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *valDominoEX_PATHS=(Fl_Counter2 *)0;
static void cb_valDominoEX_PATHS(Fl_Counter2* o, void*) {
progdefaults.DOMINOEX_PATHS = (int)o->value();
progdefaults.changed = true;
}
Fl_ListBox *listboxHellFont=(Fl_ListBox *)0;
static void cb_listboxHellFont(Fl_ListBox* o, void*) {
progdefaults.feldfontnbr=o->index();
progdefaults.changed = true;
}
Fl_ListBox *listboxHellPulse=(Fl_ListBox *)0;
static void cb_listboxHellPulse(Fl_ListBox* o, void*) {
progdefaults.HellPulseFast = o->index();
progdefaults.changed = true;
}
Fl_Check_Button *btnFeldHellIdle=(Fl_Check_Button *)0;
static void cb_btnFeldHellIdle(Fl_Check_Button* o, void*) {
progdefaults.HellXmtIdle=o->value();
progdefaults.changed = true;
}
Fl_Value_Slider *valHellXmtWidth=(Fl_Value_Slider *)0;
static void cb_valHellXmtWidth(Fl_Value_Slider* o, void*) {
progdefaults.HellXmtWidth=(int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnBlackboard=(Fl_Check_Button *)0;
static void cb_btnBlackboard(Fl_Check_Button* o, void*) {
progdefaults.HellBlackboard=o->value();
FHdisp->reverse(progdefaults.HellBlackboard);
progdefaults.changed = true;
}
Fl_Check_Button *btnHellMarquee=(Fl_Check_Button *)0;
static void cb_btnHellMarquee(Fl_Check_Button* o, void*) {
progdefaults.HellMarquee=o->value();
FHdisp->set_marquee(progdefaults.HellMarquee);
progdefaults.changed = true;
}
Fl_Value_Slider *valHellRcvWidth=(Fl_Value_Slider *)0;
static void cb_valHellRcvWidth(Fl_Value_Slider* o, void*) {
progdefaults.HellRcvWidth=(int)o->value();
progdefaults.changed = true;
}
Fl_Value_Slider *valHellRcvHeight=(Fl_Value_Slider *)0;
static void cb_valHellRcvHeight(Fl_Value_Slider*, void*) {
FHdisp_char_height();
}
Fl_Value_Slider2 *sldrHellBW=(Fl_Value_Slider2 *)0;
static void cb_sldrHellBW(Fl_Value_Slider2*, void*) {
progdefaults.HELL_BW = sldrHellBW->value();
}
Fl_Value_Slider *val_hellagc=(Fl_Value_Slider *)0;
static void cb_val_hellagc(Fl_Value_Slider* o, void*) {
progdefaults.hellagc=(int)o->value();
progdefaults.changed = true;
}
Fl_ListBox *listbox_fmt_sr=(Fl_ListBox *)0;
static void cb_listbox_fmt_sr(Fl_ListBox* o, void*) {
progdefaults.FMT_sr=o->index();
progdefaults.changed = true;
}
Fl_Counter *cnt_fmt_rx_ppm=(Fl_Counter *)0;
static void cb_cnt_fmt_rx_ppm(Fl_Counter* o, void*) {
progdefaults.RX_corr = (int)o->value();
cntRxRateCorr->value(progdefaults.RX_corr);
progdefaults.changed = true;
}
Fl_Button *btnFMT_plot_background=(Fl_Button *)0;
static void cb_btnFMT_plot_background(Fl_Button*, void*) {
static uchar r, g, b;
Fl::get_color(progdefaults.FMT_background, r, g, b);
if (!fl_color_chooser("FMT Background", r, g, b))
return;
progdefaults.FMT_background = fl_rgb_color(r,g,b);
fmt_plot->bk_color(progdefaults.FMT_background);
fmt_plot->redraw();
progdefaults.changed = true;
}
Fl_Button *btnFMT_unk_color=(Fl_Button *)0;
static void cb_btnFMT_unk_color(Fl_Button*, void*) {
static uchar r, g, b;
Fl::get_color(progdefaults.FMT_unk_color, r, g, b);
if (!fl_color_chooser("FMT Background", r, g, b))
return;
progdefaults.FMT_unk_color = fl_rgb_color(r,g,b);
fmt_plot->line_color_1(progdefaults.FMT_unk_color);
fmt_plot->redraw();
unk_color->color(progdefaults.FMT_unk_color);
unk_color->redraw();
progdefaults.changed = true;
}
Fl_Button *btnFMT_plot_ref_color=(Fl_Button *)0;
static void cb_btnFMT_plot_ref_color(Fl_Button*, void*) {
static uchar r, g, b;
Fl::get_color(progdefaults.FMT_ref_color, r, g, b);
if (!fl_color_chooser("FMT Background", r, g, b))
return;
progdefaults.FMT_ref_color = fl_rgb_color(r,g,b);
fmt_plot->line_color_2(progdefaults.FMT_ref_color);
fmt_plot->redraw();
ref_color->color(progdefaults.FMT_ref_color);
ref_color->redraw();
progdefaults.changed = true;
}
Fl_Button *btnFMT_plot_axis=(Fl_Button *)0;
static void cb_btnFMT_plot_axis(Fl_Button*, void*) {
static uchar r, g, b;
Fl::get_color(progdefaults.FMT_axis_color, r, g, b);
if (!fl_color_chooser("FMT Axis Color", r, g, b))
return;
progdefaults.FMT_axis_color = fl_rgb_color(r,g,b);
fmt_plot->axis_color(progdefaults.FMT_axis_color);
fmt_plot->redraw();
progdefaults.changed = true;
}
Fl_Button *btnFMT_legend_color=(Fl_Button *)0;
static void cb_btnFMT_legend_color(Fl_Button*, void*) {
static uchar r, g, b;
Fl::get_color(progdefaults.FMT_legend_color, r, g, b);
if (!fl_color_chooser("FMT Legend Color", r, g, b))
return;
progdefaults.FMT_legend_color = fl_rgb_color(r,g,b);
fmt_plot->legend_color(progdefaults.FMT_legend_color);
fmt_plot->redraw();
progdefaults.changed = true;
}
Fl_Check_Button *btn_fmt_plot_over_axis=(Fl_Check_Button *)0;
static void cb_btn_fmt_plot_over_axis(Fl_Check_Button* o, void*) {
progdefaults.FMT_plot_over_axis = o->value();
fmt_plot->plot_over_axis(progdefaults.FMT_plot_over_axis);
progdefaults.changed = true;
}
Fl_Check_Button *btn_fmt_thick_lines=(Fl_Check_Button *)0;
static void cb_btn_fmt_thick_lines(Fl_Check_Button* o, void*) {
progdefaults.FMT_thick_lines = o->value();
fmt_plot->thick_lines(progdefaults.FMT_thick_lines);
progdefaults.changed = true;
}
Fl_Counter *cnt_fmt_freq_corr=(Fl_Counter *)0;
static void cb_cnt_fmt_freq_corr(Fl_Counter* o, void*) {
progdefaults.FMT_freq_corr=o->value();
progdefaults.RIT=progdefaults.FMT_freq_corr;
cntRIT->value(progdefaults.RIT);
progdefaults.changed = true;
}
Fl_Button *bnt_FMT_dec_corr=(Fl_Button *)0;
static void cb_bnt_FMT_dec_corr(Fl_Button*, void*) {
progdefaults.FMT_freq_corr -= 0.1;
cnt_fmt_freq_corr->value(progdefaults.FMT_freq_corr);
progdefaults.RIT=progdefaults.FMT_freq_corr;
cntRIT->value(progdefaults.RIT);
progdefaults.changed = true;
}
Fl_Button *btn_FMT_incr_corr=(Fl_Button *)0;
static void cb_btn_FMT_incr_corr(Fl_Button*, void*) {
progdefaults.FMT_freq_corr += 0.1;
cnt_fmt_freq_corr->value(progdefaults.FMT_freq_corr);
progdefaults.RIT=progdefaults.FMT_freq_corr;
cntRIT->value(progdefaults.RIT);
progdefaults.changed = true;
}
Fl_Counter *cnt_fmt_freq_err=(Fl_Counter *)0;
static void cb_cnt_fmt_freq_err(Fl_Counter* o, void*) {
progdefaults.FMT_freq_err=o->value();
progdefaults.changed = true;
}
Fl_Counter *cnt_FMT_movavg_len=(Fl_Counter *)0;
static void cb_cnt_FMT_movavg_len(Fl_Counter* o, void*) {
progdefaults.FMT_movavg_len = o->value();
progdefaults.changed = true;
}
Fl_ListBox *listbox_fmt_dft_rate=(Fl_ListBox *)0;
static void cb_listbox_fmt_dft_rate(Fl_ListBox* o, void*) {
progdefaults.FMT_dft_rate=o->index();
progdefaults.changed = true;
}
Fl_Counter *cnt_FMT_bpf=(Fl_Counter *)0;
static void cb_cnt_FMT_bpf(Fl_Counter* o, void*) {
progdefaults.FMT_bpf_width = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_fmt_unk_bpf_on=(Fl_Check_Button *)0;
static void cb_btn_fmt_unk_bpf_on(Fl_Check_Button* o, void*) {
progdefaults.FMT_unk_bpf_on = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_fmt_ref_bpf_on=(Fl_Check_Button *)0;
static void cb_btn_fmt_ref_bpf_on(Fl_Check_Button* o, void*) {
progdefaults.FMT_ref_bpf_on = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_fmt_autorecord=(Fl_Check_Button *)0;
Fl_Counter *cnt_fmt_auto_record_time=(Fl_Counter *)0;
Fl_Check_Button *btn_fmt_record_wav=(Fl_Check_Button *)0;
static void cb_btn_fmt_record_wav(Fl_Check_Button* o, void*) {
cb_fmt_record_wav(o->value());
if (o->value() == 1)
btn_fmt_sync_wav->deactivate();
else
btn_fmt_sync_wav->activate();
}
Fl_Check_Button *btn_fmt_sync_wav=(Fl_Check_Button *)0;
static void cb_btn_fmt_sync_wav(Fl_Check_Button* o, void*) {
progdefaults.fmt_sync_wav_file = o->value();
if (o->value() == 1)
btn_fmt_record_wav->deactivate();
else
btn_fmt_record_wav->activate();
progdefaults.changed = true;
}
Fl_Output *txt_fmt_wav_filename=(Fl_Output *)0;
Fl_Check_Button *btn_fmt_center_on_unknown=(Fl_Check_Button *)0;
static void cb_btn_fmt_center_on_unknown(Fl_Check_Button* o, void*) {
progdefaults.fmt_center_on_unknown = o->value();
if (o->value()) {
progdefaults.fmt_center_on_median = 0;
progdefaults.fmt_center_on_reference = 0;
btn_fmt_center_on_median->value(0);
btn_fmt_center_on_reference->value(0);
}
progdefaults.changed = true;
}
Fl_Check_Button *btn_fmt_center_on_reference=(Fl_Check_Button *)0;
static void cb_btn_fmt_center_on_reference(Fl_Check_Button* o, void*) {
progdefaults.fmt_center_on_reference = o->value();
if (o->value()) {
progdefaults.fmt_center_on_unknown = 0;
progdefaults.fmt_center_on_median = 0;
btn_fmt_center_on_median->value(0);
btn_fmt_center_on_unknown->value(0);
}
progdefaults.changed = true;
}
Fl_Check_Button *btn_fmt_center_on_median=(Fl_Check_Button *)0;
static void cb_btn_fmt_center_on_median(Fl_Check_Button* o, void*) {
progdefaults.fmt_center_on_median = o->value();
if (o->value()) {
progdefaults.fmt_center_on_unknown = 0;
progdefaults.fmt_center_on_reference = 0;
btn_fmt_center_on_unknown->value(0);
btn_fmt_center_on_reference->value(0);
}
progdefaults.changed = true;
}
Fl_Check_Button *btn_fmt_use_tabs=(Fl_Check_Button *)0;
static void cb_btn_fmt_use_tabs(Fl_Check_Button* o, void*) {
progdefaults.FMT_use_tabs = o->value();
progdefaults.changed = true;
}
Fl_Value_Slider *valhits=(Fl_Value_Slider *)0;
static void cb_valhits(Fl_Value_Slider* o, void*) {
progdefaults.fsqhits=(int)o->value();
progdefaults.changed = true;
}
Fl_Choice *sel_fsq_lpf=(Fl_Choice *)0;
static void cb_sel_fsq_lpf(Fl_Choice* o, void*) {
progdefaults.fsq_img_filter=o->value();
progdefaults.changed = true;
}
Fl_Value_Slider *sldrMovAvg=(Fl_Value_Slider *)0;
static void cb_sldrMovAvg(Fl_Value_Slider* o, void*) {
progdefaults.fsq_movavg = o->value();
progdefaults.changed = true;
}
Fl_Choice *sel_fsq_heard_aging=(Fl_Choice *)0;
static void cb_sel_fsq_heard_aging(Fl_Choice* o, void*) {
progdefaults.fsq_heard_aging=o->value();
progdefaults.changed = true;
}
static void cb_btn_fsqbaud(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
progdefaults.fsqbaud = 1.5;
btn_fsqbaud[1]->value(0);
btn_fsqbaud[2]->value(0);
btn_fsqbaud[3]->value(0);
btn_fsqbaud[4]->value(0);
}
progdefaults.changed = true;
}
static void cb_btn_fsqbaud1(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
progdefaults.fsqbaud = 2;
btn_fsqbaud[0]->value(0);
btn_fsqbaud[2]->value(0);
btn_fsqbaud[3]->value(0);
btn_fsqbaud[4]->value(0);
}
progdefaults.changed = true;
}
static void cb_btn_fsqbaud2(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
progdefaults.fsqbaud = 3;
btn_fsqbaud[0]->value(0);
btn_fsqbaud[1]->value(0);
btn_fsqbaud[3]->value(0);
btn_fsqbaud[4]->value(0);
}
progdefaults.changed = true;
}
static void cb_btn_fsqbaud3(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
progdefaults.fsqbaud = 4.5;
btn_fsqbaud[0]->value(0);
btn_fsqbaud[1]->value(0);
btn_fsqbaud[2]->value(0);
btn_fsqbaud[4]->value(0);
}
progdefaults.changed = true;
}
Fl_Round_Button *btn_fsqbaud[5]={(Fl_Round_Button *)0};
static void cb_btn_fsqbaud4(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
progdefaults.fsqbaud = 6;
btn_fsqbaud[0]->value(0);
btn_fsqbaud[1]->value(0);
btn_fsqbaud[2]->value(0);
btn_fsqbaud[3]->value(0);
}
progdefaults.changed = true;
}
Fl_Choice *sel_fsq_frequency=(Fl_Choice *)0;
static void cb_sel_fsq_frequency(Fl_Choice* o, void*) {
progdefaults.fsq_frequency=o->value();
progdefaults.changed = true;
}
Fl_Choice *sel_fsq_sounder=(Fl_Choice *)0;
static void cb_sel_fsq_sounder(Fl_Choice* o, void*) {
progdefaults.fsq_sounder=o->value();
progdefaults.changed = true;
}
Fl_Counter *cntr_FSQ_time_out=(Fl_Counter *)0;
static void cb_cntr_FSQ_time_out(Fl_Counter* o, void*) {
progdefaults.fsq_time_out = o->value();
progdefaults.changed = true;
}
static void cb_QTC(Fl_Input* o, void*) {
progdefaults.fsqQTCtext = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_fsq_lowercase=(Fl_Check_Button *)0;
static void cb_btn_fsq_lowercase(Fl_Check_Button* o, void*) {
progdefaults.fsq_lowercase=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_fsq_msg_dt_stamp=(Fl_Check_Button *)0;
static void cb_btn_fsq_msg_dt_stamp(Fl_Check_Button* o, void*) {
progdefaults.add_fsq_msg_dt=o->value();
progdefaults.changed=true;
}
Fl_Check_Button *btn_fsq_msg_append=(Fl_Check_Button *)0;
static void cb_btn_fsq_msg_append(Fl_Check_Button* o, void*) {
progdefaults.always_append=o->value();
progdefaults.changed=true;
}
Fl_Counter *cntr_FSQ_notify_time_out=(Fl_Counter *)0;
static void cb_cntr_FSQ_notify_time_out(Fl_Counter* o, void*) {
progdefaults.fsq_notify_time_out = o->value();
progdefaults.changed = true;
}
Fl_Output *txtAuditLog=(Fl_Output *)0;
Fl_Light_Button *btn_enable_auditlog=(Fl_Light_Button *)0;
static void cb_btn_enable_auditlog(Fl_Light_Button* o, void*) {
progdefaults.fsq_enable_audit_log = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_auditlog=(Fl_Button *)0;
static void cb_btn_select_auditlog(Fl_Button*, void*) {
std::string str = std::string(TempDir);
str.append(progdefaults.fsq_audit_log);
const char *fname = FSEL::saveas("Audit log", "*.txt\t*", str.c_str());
if (!fname) return;
if (!*fname) return;
progdefaults.fsq_audit_log = fl_filename_name(fname);
txtAuditLog->value(progdefaults.fsq_audit_log.c_str());
progdefaults.changed = true;
}
Fl_Output *txtHeardLog=(Fl_Output *)0;
Fl_Light_Button *btn_enable_fsq_heard_log=(Fl_Light_Button *)0;
static void cb_btn_enable_fsq_heard_log(Fl_Light_Button* o, void*) {
progdefaults.fsq_enable_heard_log = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_fsq_heard_log=(Fl_Button *)0;
static void cb_btn_select_fsq_heard_log(Fl_Button*, void*) {
std::string str = std::string(TempDir);
str.append(progdefaults.fsq_heard_log);
const char *fname = FSEL::saveas("Heard log", "*.txt\t*", str.c_str());
if (!fname) return;
if (!*fname) return;
progdefaults.fsq_heard_log = fl_filename_name(fname);
txtHeardLog->value(progdefaults.fsq_heard_log.c_str());
progdefaults.changed = true;
}
Fl_Button *btn_fsq_xmt_color=(Fl_Button *)0;
static void cb_btn_fsq_xmt_color(Fl_Button*, void*) {
choose_color(progdefaults.fsq_xmt_color);
btn_fsq_xmt_color->color( progdefaults.fsq_xmt_color );
btn_fsq_xmt_color->redraw();
fsq_rx_text->setFontColor(progdefaults.fsq_xmt_color, FTextBase::FSQ_TX);
progdefaults.changed = true;
}
Fl_Button *btn_fsq_directed_color=(Fl_Button *)0;
static void cb_btn_fsq_directed_color(Fl_Button*, void*) {
choose_color(progdefaults.fsq_directed_color);
btn_fsq_directed_color->color( progdefaults.fsq_directed_color );
btn_fsq_directed_color->redraw();
fsq_rx_text->setFontColor(progdefaults.fsq_directed_color, FTextBase::FSQ_DIR);
progdefaults.changed = true;
}
Fl_Button *btn_fsq_undirected_color=(Fl_Button *)0;
static void cb_btn_fsq_undirected_color(Fl_Button*, void*) {
choose_color(progdefaults.fsq_undirected_color);
btn_fsq_undirected_color->color( progdefaults.fsq_undirected_color);
btn_fsq_undirected_color->redraw();
fsq_rx_text->setFontColor(progdefaults.fsq_undirected_color, FTextBase::FSQ_UND);
progdefaults.changed = true;
}
Fl_Button *btn_fsq_color_defaults=(Fl_Button *)0;
static void cb_btn_fsq_color_defaults(Fl_Button*, void*) {
progdefaults.fsq_xmt_color = FL_RED;
btn_fsq_xmt_color->color(progdefaults.fsq_xmt_color);
btn_fsq_xmt_color->redraw();
progdefaults.fsq_directed_color = FL_BLUE;
btn_fsq_directed_color->color(progdefaults.fsq_directed_color);
btn_fsq_directed_color->redraw();
progdefaults.fsq_undirected_color = FL_DARK_GREEN;
btn_fsq_undirected_color->color(progdefaults.fsq_undirected_color);
btn_fsq_undirected_color->redraw();
fsq_rx_text->setFontColor(progdefaults.fsq_xmt_color, FTextBase::FSQ_TX);
fsq_rx_text->setFontColor(progdefaults.fsq_directed_color, FTextBase::FSQ_DIR);
fsq_rx_text->setFontColor(progdefaults.fsq_undirected_color, FTextBase::FSQ_UND);
progdefaults.changed = true;
}
static void cb_btn_ifkpbaud(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
progdefaults.ifkp_baud = 0;
btn_ifkpbaud[1]->value(0);
btn_ifkpbaud[2]->value(0);
}
progdefaults.changed = true;
}
static void cb_btn_ifkpbaud1(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
progdefaults.ifkp_baud = 1;
btn_ifkpbaud[0]->value(0);
btn_ifkpbaud[2]->value(0);
}
progdefaults.changed = true;
}
Fl_Round_Button *btn_ifkpbaud[3]={(Fl_Round_Button *)0};
static void cb_btn_ifkpbaud2(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
progdefaults.ifkp_baud = 2;
btn_ifkpbaud[0]->value(0);
btn_ifkpbaud[1]->value(0);
}
progdefaults.changed = true;
}
Fl_Check_Button *btn_ifkp_lowercase=(Fl_Check_Button *)0;
static void cb_btn_ifkp_lowercase(Fl_Check_Button* o, void*) {
progdefaults.ifkp_lowercase=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_ifkp_lowercase_call=(Fl_Check_Button *)0;
static void cb_btn_ifkp_lowercase_call(Fl_Check_Button* o, void*) {
progdefaults.ifkp_lowercase_call=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_ifkp_freqlock=(Fl_Check_Button *)0;
static void cb_btn_ifkp_freqlock(Fl_Check_Button* o, void*) {
progdefaults.ifkp_freqlock=o->value();
if (active_modem == ifkp_modem &&
o->value() )
active_modem->set_freq(1500);
progdefaults.changed = true;
}
Fl_Output *txt_ifkp_audit_log=(Fl_Output *)0;
Fl_Light_Button *btn_enable_ifkp_audit_log=(Fl_Light_Button *)0;
static void cb_btn_enable_ifkp_audit_log(Fl_Light_Button* o, void*) {
progdefaults.ifkp_enable_audit_log = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_ifkp_select_auditlog=(Fl_Button *)0;
static void cb_btn_ifkp_select_auditlog(Fl_Button*, void*) {
std::string str = std::string(TempDir);
str.append(progdefaults.ifkp_audit_log);
const char *fname = FSEL::saveas("Audit log", "*.txt\t*", str.c_str());
if (!fname) return;
if (!*fname) return;
progdefaults.ifkp_audit_log = fl_filename_name(fname);
txt_ifkp_audit_log->value(progdefaults.ifkp_audit_log.c_str());
progdefaults.changed = true;
}
Fl_Output *txt_ifkp_heard_log=(Fl_Output *)0;
Fl_Light_Button *btn_enable_ifkp_heard_log=(Fl_Light_Button *)0;
static void cb_btn_enable_ifkp_heard_log(Fl_Light_Button* o, void*) {
progdefaults.ifkp_enable_heard_log = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_ifkp_heard_log=(Fl_Button *)0;
static void cb_btn_select_ifkp_heard_log(Fl_Button*, void*) {
std::string str = std::string(TempDir);
str.append(progdefaults.ifkp_heard_log);
const char *fname = FSEL::saveas("Heard log", "*.txt\t*", str.c_str());
if (!fname) return;
if (!*fname) return;
progdefaults.ifkp_heard_log = fl_filename_name(fname);
txt_ifkp_heard_log->value(progdefaults.ifkp_heard_log.c_str());
progdefaults.changed = true;
}
Fl_Check_Button *btnMT63_8bit=(Fl_Check_Button *)0;
static void cb_btnMT63_8bit(Fl_Check_Button* o, void*) {
progdefaults.mt63_8bit = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnMT63_rx_integration=(Fl_Check_Button *)0;
static void cb_btnMT63_rx_integration(Fl_Check_Button* o, void*) {
progdefaults.mt63_rx_integration = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnMT63_usetones=(Fl_Check_Button *)0;
static void cb_btnMT63_usetones(Fl_Check_Button* o, void*) {
progdefaults.mt63_usetones = o->value();
if (!o->value()) {
btnMT63_upper_lower->value(0);
btnMT63_upper_lower->do_callback();
btnMT63_upper_lower->deactivate();
}
else
btnMT63_upper_lower->activate();
progdefaults.changed = true;
}
Fl_Check_Button *btnMT63_upper_lower=(Fl_Check_Button *)0;
static void cb_btnMT63_upper_lower(Fl_Check_Button* o, void*) {
progdefaults.mt63_twotones = o->value();
progdefaults.changed = true;
}
Fl_Spinner2 *MT63_tone_duration=(Fl_Spinner2 *)0;
static void cb_MT63_tone_duration(Fl_Spinner2* o, void*) {
progdefaults.mt63_tone_duration=(int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnMT63_at500=(Fl_Check_Button *)0;
static void cb_btnMT63_at500(Fl_Check_Button* o, void*) {
o->value(1);
progdefaults.mt63_at500 = true;
progdefaults.mt63_centered = false;
btnMT63_centered->value(0);
btnMT63_manual->value(0);
progdefaults.changed = true;
}
Fl_Check_Button *btnMT63_centered=(Fl_Check_Button *)0;
static void cb_btnMT63_centered(Fl_Check_Button* o, void*) {
o->value(1);
progdefaults.mt63_centered = true;
progdefaults.mt63_at500 = false;
btnMT63_at500->value(0);
btnMT63_manual->value(0);
progdefaults.changed = true;
}
Fl_Check_Button *btnMT63_manual=(Fl_Check_Button *)0;
static void cb_btnMT63_manual(Fl_Check_Button* o, void*) {
o->value(1);
progdefaults.mt63_centered = false;
progdefaults.mt63_at500 = false;
btnMT63_at500->value(0);
btnMT63_centered->value(0);
progdefaults.changed = true;
}
Fl_ListBox *i_listbox_contestia_bandwidth=(Fl_ListBox *)0;
static void cb_i_listbox_contestia_bandwidth(Fl_ListBox* o, void*) {
progdefaults.contestiabw = o->index();
set_contestia_default_integ();
resetCONTESTIA();
progdefaults.changed = true;
}
Fl_ListBox *i_listbox_contestia_tones=(Fl_ListBox *)0;
static void cb_i_listbox_contestia_tones(Fl_ListBox* o, void*) {
progdefaults.contestiatones = o->index();
set_contestia_default_integ();
resetCONTESTIA();
progdefaults.changed = true;
}
Fl_Counter2 *cntContestia_smargin=(Fl_Counter2 *)0;
static void cb_cntContestia_smargin(Fl_Counter2* o, void*) {
progdefaults.contestiasmargin = (int)(o->value());
resetCONTESTIA();
progdefaults.changed = true;
}
Fl_Counter2 *cntContestia_sinteg=(Fl_Counter2 *)0;
static void cb_cntContestia_sinteg(Fl_Counter2* o, void*) {
progdefaults.contestiasinteg = (int)(o->value());
resetCONTESTIA();
progdefaults.changed = true;
}
Fl_Check_Button *btnContestia_8bit=(Fl_Check_Button *)0;
static void cb_btnContestia_8bit(Fl_Check_Button* o, void*) {
progdefaults.contestia8bit = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnContestia_start_stop_tones=(Fl_Check_Button *)0;
static void cb_btnContestia_start_stop_tones(Fl_Check_Button* o, void*) {
progdefaults.contestia_start_tones = o->value();
progdefaults.changed = true;
}
Fl_ListBox *i_listbox_olivia_bandwidth=(Fl_ListBox *)0;
static void cb_i_listbox_olivia_bandwidth(Fl_ListBox* o, void*) {
progdefaults.oliviabw = o->index();
set_olivia_default_integ();
resetOLIVIA();
progdefaults.changed = true;
}
Fl_ListBox *i_listbox_olivia_tones=(Fl_ListBox *)0;
static void cb_i_listbox_olivia_tones(Fl_ListBox* o, void*) {
progdefaults.oliviatones = o->index();
set_olivia_default_integ();
resetOLIVIA();
progdefaults.changed = true;
}
Fl_Counter2 *cntOlivia_smargin=(Fl_Counter2 *)0;
static void cb_cntOlivia_smargin(Fl_Counter2* o, void*) {
progdefaults.oliviasmargin = (int)(o->value());
resetOLIVIA();
progdefaults.changed = true;
}
Fl_Counter2 *cntOlivia_sinteg=(Fl_Counter2 *)0;
static void cb_cntOlivia_sinteg(Fl_Counter2* o, void*) {
progdefaults.oliviasinteg = (int)(o->value());
resetOLIVIA();
progdefaults.changed = true;
}
Fl_Check_Button *btn_olivia_reset_fec=(Fl_Check_Button *)0;
static void cb_btn_olivia_reset_fec(Fl_Check_Button* o, void*) {
progdefaults.olivia_reset_fec = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnOlivia_8bit=(Fl_Check_Button *)0;
static void cb_btnOlivia_8bit(Fl_Check_Button* o, void*) {
progdefaults.olivia8bit = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnOlivia_start_stop_tones=(Fl_Check_Button *)0;
static void cb_btnOlivia_start_stop_tones(Fl_Check_Button* o, void*) {
progdefaults.olivia_start_tones = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntSearchRange=(Fl_Counter2 *)0;
static void cb_cntSearchRange(Fl_Counter2* o, void*) {
progdefaults.SearchRange = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;
}
Fl_Counter2 *cntACQsn=(Fl_Counter2 *)0;
static void cb_cntACQsn(Fl_Counter2* o, void*) {
progdefaults.ACQsn = o->value();
progdefaults.changed = true;
}
Fl_ListBox *listbox_psk_status_timeout=(Fl_ListBox *)0;
static void cb_listbox_psk_status_timeout(Fl_ListBox* o, void*) {
progdefaults.StatusDim = o->index();
progdefaults.changed = true;
}
static void cb_seconds(Fl_Counter2* o, void*) {
progdefaults.StatusTimeout = (int)(o->value());
progdefaults.changed = true;
}
Fl_Check_Button *btnEnablePSKbrowsing=(Fl_Check_Button *)0;
static void cb_btnEnablePSKbrowsing(Fl_Check_Button* o, void*) {
progdefaults.pskbrowser_on = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnPSKpilot=(Fl_Check_Button *)0;
static void cb_btnPSKpilot(Fl_Check_Button* o, void*) {
progdefaults.pskpilot = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cnt_pilot_power=(Fl_Counter2 *)0;
static void cb_cnt_pilot_power(Fl_Counter2* o, void*) {
progdefaults.pilot_power = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnPSK8Preamble=(Fl_Check_Button *)0;
static void cb_btnPSK8Preamble(Fl_Check_Button* o, void*) {
progStatus.psk8DCDShortFlag = o->value();
}
Fl_ListBox *i_listbox_rtty_afc_speed=(Fl_ListBox *)0;
static void cb_i_listbox_rtty_afc_speed(Fl_ListBox* o, void*) {
progdefaults.rtty_afcspeed = o->index();
progdefaults.changed = true;
}
Fl_Check_Button *chkUOSrx=(Fl_Check_Button *)0;
static void cb_chkUOSrx(Fl_Check_Button* o, void*) {
progdefaults.UOSrx=o->value();
progdefaults.changed = true;
}
Fl_Value_Input *rtty_rx_shape=(Fl_Value_Input *)0;
static void cb_rtty_rx_shape(Fl_Value_Input* o, void*) {
progdefaults.rtty_filter = o->value();
progStatus.rtty_filter_changed = true;
progdefaults.changed = true;
}
static void cb_btnRxTones(Fl_Check_Button* o, void*) {
if (o->value()) {
btnRxTones[1]->value(0);
btnRxTones[2]->value(0);
progdefaults.rtty_cwi = 0;
};
}
static void cb_btnRxTones1(Fl_Check_Button* o, void*) {
if (o->value()) {
btnRxTones[0]->value(0);
btnRxTones[2]->value(0);
progdefaults.rtty_cwi = 1;
};
}
Fl_Check_Button *btnRxTones[3]={(Fl_Check_Button *)0};
static void cb_btnRxTones2(Fl_Check_Button* o, void*) {
if (o->value()) {
btnRxTones[1]->value(0);
btnRxTones[0]->value(0);
progdefaults.rtty_cwi = 2;
};
}
Fl_Check_Button *btnPreferXhairScope=(Fl_Check_Button *)0;
static void cb_btnPreferXhairScope(Fl_Check_Button* o, void*) {
progdefaults.PreferXhairScope=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chk_true_scope=(Fl_Check_Button *)0;
static void cb_chk_true_scope(Fl_Check_Button* o, void*) {
progdefaults.true_scope=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chk_useMARKfreq=(Fl_Check_Button *)0;
static void cb_chk_useMARKfreq(Fl_Check_Button* o, void*) {
progdefaults.useMARKfreq=o->value();
progdefaults.changed = true;
}
Fl_Button *btnRTTY_mark_color=(Fl_Button *)0;
static void cb_btnRTTY_mark_color(Fl_Button* o, void*) {
if (fl_color_chooser("MARK freq track",
progdefaults.rttymarkRGBI.R,
progdefaults.rttymarkRGBI.G,
progdefaults.rttymarkRGBI.B) ) {
o->color(fl_rgb_color(progdefaults.rttymarkRGBI.R,progdefaults.rttymarkRGBI.G,progdefaults.rttymarkRGBI.B));
o->redraw();
wf->redraw_marker();
progdefaults.changed = true;
};
}
Fl_Check_Button *chk_audibleBELL=(Fl_Check_Button *)0;
static void cb_chk_audibleBELL(Fl_Check_Button* o, void*) {
progdefaults.audibleBELL=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chk_visibleBELL=(Fl_Check_Button *)0;
static void cb_chk_visibleBELL(Fl_Check_Button* o, void*) {
progdefaults.visibleBELL=o->value();
progdefaults.changed = true;
}
Fl_File_Input *inp_wav_fname_bell_ring=(Fl_File_Input *)0;
Fl_Button *btn_select_bell_ring_wav=(Fl_Button *)0;
static void cb_btn_select_bell_ring_wav(Fl_Button*, void*) {
Fl_Native_File_Chooser fnfc;
fnfc.title("Pick a file");
fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE);
fnfc.filter("wav files\t*.{mp3,wav}\n");
fnfc.directory("./"); // default directory to use
// Show native chooser
switch ( fnfc.show() ) {
case -1: break; // ERROR
case 1: break; // CANCEL
default: {
progdefaults.BELL_RING = fnfc.filename();
inp_wav_fname_bell_ring->value(progdefaults.BELL_RING.c_str());
progdefaults.BELL_RING_MENU = 0;
mnu_bell_ring_menu->value(progdefaults.BELL_RING_MENU);
break; // FILE CHOSEN
}
};
}
Fl_Choice *mnu_bell_ring_menu=(Fl_Choice *)0;
static void cb_mnu_bell_ring_menu(Fl_Choice* o, void*) {
if (o->value() > 0) {
switch (o->value()) {
case 1 : progdefaults.BELL_RING = "bark"; break;
case 2 : progdefaults.BELL_RING = "checkout"; break;
case 3 : progdefaults.BELL_RING = "diesel"; break;
case 4 : progdefaults.BELL_RING = "steam_train"; break;
case 5 : progdefaults.BELL_RING = "doesnot"; break;
case 6 : progdefaults.BELL_RING = "beeboo"; break;
case 7 : progdefaults.BELL_RING = "phone"; break;
case 8 : progdefaults.BELL_RING = "dinner_bell"; break;
case 9 : progdefaults.BELL_RING = "rtty_bell"; break;
case 10 : progdefaults.BELL_RING = "standard_tone"; break;
}
inp_wav_fname_bell_ring->value(progdefaults.BELL_RING.c_str());
}
progdefaults.BELL_RING_MENU = o->value();
}
Fl_Button *btn_test_bell_ring_wav=(Fl_Button *)0;
static void cb_btn_test_bell_ring_wav(Fl_Button*, void*) {
audio_alert->alert(progdefaults.BELL_RING.c_str());
}
Fl_ListBox *selShift=(Fl_ListBox *)0;
static void cb_selShift(Fl_ListBox* o, void*) {
progdefaults.rtty_shift = o->index();
sel_xcvr_FSK_shift->index(progdefaults.rtty_shift);
if (progdefaults.rtty_shift == o->lsize() - 1)
selCustomShift->activate();
else
selCustomShift->deactivate();
selCustomShift->redraw();
resetRTTY();
progdefaults.changed = true;
}
Fl_Counter2 *selCustomShift=(Fl_Counter2 *)0;
static void cb_selCustomShift(Fl_Counter2* o, void*) {
progdefaults.rtty_custom_shift = o->value();
resetRTTY();
progdefaults.changed = true;
}
Fl_ListBox *selBaud=(Fl_ListBox *)0;
static void cb_selBaud(Fl_ListBox* o, void*) {
progdefaults.rtty_baud = o->index();
resetRTTY();
progdefaults.changed = true;
}
Fl_ListBox *selBits=(Fl_ListBox *)0;
static void cb_selBits(Fl_ListBox* o, void*) {
progdefaults.rtty_bits = o->index();
selParity->do_callback();
}
Fl_ListBox *selParity=(Fl_ListBox *)0;
static void cb_selParity(Fl_ListBox* o, void*) {
if (progdefaults.rtty_bits == 0) {
progdefaults.rtty_parity = rtty::RTTY_PARITY_NONE;
o->index(progdefaults.rtty_parity);
} else
progdefaults.rtty_parity = o->index();
resetRTTY();
progdefaults.changed = true;
}
Fl_ListBox *selStopBits=(Fl_ListBox *)0;
static void cb_selStopBits(Fl_ListBox* o, void*) {
progdefaults.rtty_stop = o->index();
resetRTTY();
progdefaults.changed = true;
}
Fl_Check_Button *btnAUTOCRLF=(Fl_Check_Button *)0;
static void cb_btnAUTOCRLF(Fl_Check_Button* o, void*) {
progdefaults.rtty_autocrlf = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntrAUTOCRLF=(Fl_Counter2 *)0;
static void cb_cntrAUTOCRLF(Fl_Counter2* o, void*) {
progdefaults.rtty_autocount = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCRCRLF=(Fl_Check_Button *)0;
static void cb_btnCRCRLF(Fl_Check_Button* o, void*) {
progdefaults.rtty_crcrlf = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chkUOStx=(Fl_Check_Button *)0;
static void cb_chkUOStx(Fl_Check_Button* o, void*) {
progdefaults.UOStx=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chk_shaped_rtty=(Fl_Check_Button *)0;
static void cb_chk_shaped_rtty(Fl_Check_Button* o, void*) {
progStatus.shaped_rtty = o->value();
}
Fl_Check_Button *chkPseudoFSK=(Fl_Check_Button *)0;
static void cb_chkPseudoFSK(Fl_Check_Button* o, void*) {
progdefaults.PseudoFSK = o->value();
chkPseudoFSK2->value(o->value());
progdefaults.changed = true;
if (o->value()) {
progdefaults.sig_on_right_channel = false;
chkAudioStereoOut->value(0);
progdefaults.PTTrightchannel = false;
btnPTTrightchannel->value(0);
};
}
Fl_Counter *cnt_TTY_LTRS=(Fl_Counter *)0;
static void cb_cnt_TTY_LTRS(Fl_Counter* o, void*) {
progdefaults.TTY_LTRS = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnFSKenabled=(Fl_Check_Button *)0;
static void cb_btnFSKenabled(Fl_Check_Button* o, void*) {
progdefaults.useFSK = o->value();
resetRTTY();
resetFSK();
progdefaults.changed = true;
}
Fl_Check_Button *btnFSKshared=(Fl_Check_Button *)0;
static void cb_btnFSKshared(Fl_Check_Button* o, void*) {
progdefaults.fsk_shares_port = o->value();
if (progdefaults.useFSK) {
resetRTTY();
resetFSK();
}
progdefaults.changed = true;
}
Fl_ComboBox *select_FSK_CommPort=(Fl_ComboBox *)0;
static void cb_select_FSK_CommPort(Fl_ComboBox* o, void*) {
progdefaults.fsk_port = o->value();
if (progdefaults.useFSK) {
resetRTTY();
resetFSK();
}
progdefaults.changed = true;
}
Fl_Check_Button *btnFSKreverse=(Fl_Check_Button *)0;
static void cb_btnFSKreverse(Fl_Check_Button* o, void*) {
progdefaults.fsk_reverse = o->value();
if (progdefaults.useFSK) {
resetRTTY();
resetFSK();
}
progdefaults.changed = true;
}
Fl_Check_Button *btnFSKuseDTR=(Fl_Check_Button *)0;
static void cb_btnFSKuseDTR(Fl_Check_Button* o, void*) {
progdefaults.fsk_on_dtr = o->value();
if (progdefaults.useFSK) {
resetRTTY();
resetFSK();
}
progdefaults.changed = true;
}
Fl_Button *btnFSKreset=(Fl_Button *)0;
static void cb_btnFSKreset(Fl_Button*, void*) {
resetRTTY();
resetFSK();
}
Fl_Counter *cntr_xcvr_FSK_MARK=(Fl_Counter *)0;
static void cb_cntr_xcvr_FSK_MARK(Fl_Counter* o, void*) {
progdefaults.xcvr_FSK_MARK = o->value();
progdefaults.RTTYsweetspot = progdefaults.xcvr_FSK_MARK + rtty::SHIFT[progdefaults.rtty_shift] / 2;
valRTTYsweetspot->value(progdefaults.RTTYsweetspot);
if (progdefaults.useFSK) {
resetRTTY();
resetFSK();
}
progdefaults.changed = true;
}
Fl_ListBox *sel_xcvr_FSK_shift=(Fl_ListBox *)0;
static void cb_sel_xcvr_FSK_shift(Fl_ListBox* o, void*) {
progdefaults.rtty_shift = o->index();
selShift->index(progdefaults.rtty_shift);
progdefaults.RTTYsweetspot = progdefaults.xcvr_FSK_MARK + rtty::SHIFT[progdefaults.rtty_shift] / 2;
valRTTYsweetspot->value(progdefaults.RTTYsweetspot);
if (progdefaults.useFSK) {
resetRTTY();
resetFSK();
}
progdefaults.changed = true;
}
Fl_Check_Button *btnFSK_STOPBITS=(Fl_Check_Button *)0;
static void cb_btnFSK_STOPBITS(Fl_Check_Button* o, void*) {
progdefaults.fsk_STOPBITS = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_FSK_KEYLINE_flrig=(Fl_Check_Button *)0;
static void cb_btn_FSK_KEYLINE_flrig(Fl_Check_Button* o, void*) {
int val = o->value();
progdefaults.use_FLRIG_FSK = val;
progdefaults.changed = true;
}
Fl_ComboBox *select_nanoIO_CommPort=(Fl_ComboBox *)0;
static void cb_select_nanoIO_CommPort(Fl_ComboBox* o, void*) {
progdefaults.nanoIO_serial_port_name = o->value();
}
Fl_Light_Button *btn_nanoIO_connect=(Fl_Light_Button *)0;
static void cb_btn_nanoIO_connect(Fl_Light_Button* o, void*) {
if (o->value()) {
if (open_nanoIO()) {
btn_nanoCW_connect->value(1);
chk_nanoIO_FSK_io->value(1);
} else {
o->value(0);
btn_nanoCW_connect->value(0);
chk_nanoIO_CW_io->value(0);
chk_nanoIO_FSK_io->value(0);
}
} else {
close_nanoIO();
o->value(0);
btn_nanoCW_connect->value(0);
chk_nanoIO_FSK_io->value(0);
chk_nanoIO_CW_io->value(0);
};
}
Fl_ListBox *listbox_nanoIO_serbaud2=(Fl_ListBox *)0;
static void cb_listbox_nanoIO_serbaud2(Fl_ListBox* o, void*) {
progdefaults.nanoIO_serbaud = o->index();
listbox_nanoIO_serbaud->index(o->index());
progdefaults.changed = true;
}
FTextView *txt_nano_io=(FTextView *)0;
Fl_Button *btn_nanofsk_save=(Fl_Button *)0;
static void cb_btn_nanofsk_save(Fl_Button*, void*) {
nano_CW_save();
}
Fl_Button *btn_nanofsk_query=(Fl_Button *)0;
static void cb_btn_nanofsk_query(Fl_Button*, void*) {
nano_CW_query();
}
Fl_Check_Button *chk_nanoIO_polarity=(Fl_Check_Button *)0;
static void cb_chk_nanoIO_polarity(Fl_Check_Button* o, void*) {
progdefaults.nanoIO_polarity=o->value();
nano_mark_polarity(progdefaults.nanoIO_polarity);
progdefaults.changed = true;
}
Fl_ListBox *sel_nanoIO_baud=(Fl_ListBox *)0;
static void cb_sel_nanoIO_baud(Fl_ListBox* o, void*) {
progdefaults.nanoIO_baud = o->index();
nano_set_baud(progdefaults.nanoIO_baud);
progdefaults.changed = true;
}
Fl_Group *grp_nanoio_debug=(Fl_Group *)0;
Fl_Browser *brws_nanoio_sent=(Fl_Browser *)0;
Fl_Browser *brws_nanoio_rcvd=(Fl_Browser *)0;
Fl_Button *btn_nanoio_clear_sent=(Fl_Button *)0;
static void cb_btn_nanoio_clear_sent(Fl_Button*, void*) {
brws_nanoio_sent->clear();
}
Fl_Button *btn_nanoio_clear_both=(Fl_Button *)0;
static void cb_btn_nanoio_clear_both(Fl_Button*, void*) {
brws_nanoio_rcvd->clear();
brws_nanoio_sent->clear();
}
Fl_Button *btn_nanoio_clear_rcvd=(Fl_Button *)0;
static void cb_btn_nanoio_clear_rcvd(Fl_Button*, void*) {
brws_nanoio_rcvd->clear();
}
Fl_Light_Button *btn_nanoio_debug=(Fl_Light_Button *)0;
static void cb_btn_nanoio_debug(Fl_Light_Button* o, void*) {
if (o->value()) {
grp_nanoio_debug->show();
txt_nano_io->hide();
} else {
grp_nanoio_debug->hide();
txt_nano_io->show();
};
}
Fl_Check_Button *chk_nanoIO_FSK_io=(Fl_Check_Button *)0;
static void cb_chk_nanoIO_FSK_io(Fl_Check_Button* o, void*) {
if (o->value() == 0) {
o->value(1);
return;
}
set_nanoIO();
chk_nanoIO_CW_io->value(0);
}
Fl_ComboBox *select_USN_FSK_port=(Fl_ComboBox *)0;
static void cb_select_USN_FSK_port(Fl_ComboBox* o, void*) {
progdefaults.Nav_FSK_port = o->value();
}
Fl_Light_Button *btn_Nav_connect=(Fl_Light_Button *)0;
static void cb_btn_Nav_connect(Fl_Light_Button* o, void*) {
if (o->value()) {
if (!open_NavFSK())
o->value(0);
} else {
close_NavFSK();
};
}
Fl_ComboBox *select_Nav_config_port=(Fl_ComboBox *)0;
static void cb_select_Nav_config_port(Fl_ComboBox* o, void*) {
progdefaults.Nav_config_port = o->value();
}
Fl_ListBox *sel_Nav_ch1=(Fl_ListBox *)0;
static void cb_sel_Nav_ch1(Fl_ListBox* o, void*) {
progdefaults.Nav_channel_1_att = o->index();
Nav_set_channel_1_att(progdefaults.Nav_channel_1_att);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_ch2=(Fl_ListBox *)0;
static void cb_sel_Nav_ch2(Fl_ListBox* o, void*) {
progdefaults.Nav_channel_2_att = o->index();
Nav_set_channel_2_att(progdefaults.Nav_channel_2_att);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_rf_att=(Fl_ListBox *)0;
static void cb_sel_Nav_rf_att(Fl_ListBox* o, void*) {
progdefaults.Nav_rf_att = o->index();
Nav_set_rf_att(progdefaults.Nav_rf_att);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_wk_ptt=(Fl_ListBox *)0;
static void cb_sel_Nav_wk_ptt(Fl_ListBox* o, void*) {
progdefaults.Nav_wk_ptt = o->index();
Nav_set_wk_ptt(progdefaults.Nav_wk_ptt);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_LED=(Fl_ListBox *)0;
static void cb_sel_Nav_LED(Fl_ListBox* o, void*) {
progdefaults.Nav_led = o->index();
Nav_set_led(progdefaults.Nav_led);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_CAT_LED=(Fl_ListBox *)0;
static void cb_sel_Nav_CAT_LED(Fl_ListBox* o, void*) {
progdefaults.Nav_cat_led = o->index();
Nav_set_cat_led(progdefaults.Nav_cat_led);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_FSK_baud=(Fl_ListBox *)0;
static void cb_sel_Nav_FSK_baud(Fl_ListBox* o, void*) {
progdefaults.Nav_FSK_baud = o->index();
Nav_set_baud(progdefaults.Nav_FSK_baud);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_FSK_stopbits=(Fl_ListBox *)0;
static void cb_sel_Nav_FSK_stopbits(Fl_ListBox* o, void*) {
progdefaults.Nav_FSK_stopbits = o->index();
Nav_set_stopbits(progdefaults.Nav_FSK_stopbits);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_FSK_polarity=(Fl_ListBox *)0;
static void cb_sel_Nav_FSK_polarity(Fl_ListBox* o, void*) {
progdefaults.Nav_FSK_polarity = o->index();
Nav_set_polarity(progdefaults.Nav_FSK_polarity);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_FSK_sidetone=(Fl_ListBox *)0;
static void cb_sel_Nav_FSK_sidetone(Fl_ListBox* o, void*) {
progdefaults.Nav_FSK_sidetone = o->index();
Nav_set_sidetone(progdefaults.Nav_FSK_sidetone);
progdefaults.changed = true;
}
Fl_ListBox *sel_Nav_FSK_ptt=(Fl_ListBox *)0;
static void cb_sel_Nav_FSK_ptt(Fl_ListBox* o, void*) {
progdefaults.Nav_FSK_ptt = o->index();
Nav_set_ptt(progdefaults.Nav_FSK_ptt);
progdefaults.changed = true;
}
Fl_Light_Button *btn_Nav_config=(Fl_Light_Button *)0;
static void cb_btn_Nav_config(Fl_Light_Button* o, void*) {
if (o->value()) {
if (!open_NavConfig())
o->value(0);
} else {
close_NavConfig();
};
}
Fl_Check_Button *btnSynopAdifDecoding=(Fl_Check_Button *)0;
static void cb_btnSynopAdifDecoding(Fl_Check_Button* o, void*) {
progdefaults.SynopAdifDecoding=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnSynopKmlDecoding=(Fl_Check_Button *)0;
static void cb_btnSynopKmlDecoding(Fl_Check_Button* o, void*) {
progdefaults.SynopKmlDecoding=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnSynopInterleaved=(Fl_Check_Button *)0;
static void cb_btnSynopInterleaved(Fl_Check_Button* o, void*) {
progdefaults.SynopInterleaved=o->value();
progdefaults.changed = true;
}
Fl_ComboBox *select_WKFSK_CommPort=(Fl_ComboBox *)0;
static void cb_select_WKFSK_CommPort(Fl_ComboBox* o, void*) {
progStatus.WK_serial_port_name = o->value();
select_WK_CommPort->value(progStatus.WK_serial_port_name.c_str());
}
Fl_Light_Button *btn_WKFSK_connect=(Fl_Light_Button *)0;
static void cb_btn_WKFSK_connect(Fl_Light_Button* o, void*) {
WKFSK_connect(o->value());
}
Fl_ListBox *sel_WKFSK_baud=(Fl_ListBox *)0;
static void cb_sel_WKFSK_baud(Fl_ListBox* o, void*) {
progStatus.WKFSK_baud = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_stopbits=(Fl_ListBox *)0;
static void cb_sel_WKFSK_stopbits(Fl_ListBox* o, void*) {
progStatus.WKFSK_stopbits = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_ptt=(Fl_ListBox *)0;
static void cb_sel_WKFSK_ptt(Fl_ListBox* o, void*) {
progStatus.WKFSK_ptt = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_polarity=(Fl_ListBox *)0;
static void cb_sel_WKFSK_polarity(Fl_ListBox* o, void*) {
progStatus.WKFSK_polarity = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_sidetone=(Fl_ListBox *)0;
static void cb_sel_WKFSK_sidetone(Fl_ListBox* o, void*) {
progStatus.WKFSK_sidetone = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_auto_crlf=(Fl_ListBox *)0;
static void cb_sel_WKFSK_auto_crlf(Fl_ListBox* o, void*) {
progStatus.WKFSK_auto_crlf = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_diddle=(Fl_ListBox *)0;
static void cb_sel_WKFSK_diddle(Fl_ListBox* o, void*) {
progStatus.WKFSK_diddle = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_diddle_char=(Fl_ListBox *)0;
static void cb_sel_WKFSK_diddle_char(Fl_ListBox* o, void*) {
progStatus.WKFSK_diddle_char = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_usos=(Fl_ListBox *)0;
static void cb_sel_WKFSK_usos(Fl_ListBox* o, void*) {
progStatus.WKFSK_usos = o->index();
WKFSK_init();
}
Fl_ListBox *sel_WKFSK_monitor=(Fl_ListBox *)0;
static void cb_sel_WKFSK_monitor(Fl_ListBox* o, void*) {
progStatus.WKFSK_monitor = o->index();
WKFSK_init();
}
Fl_Input2 *txtTHORSecondary=(Fl_Input2 *)0;
static void cb_txtTHORSecondary(Fl_Input2* o, void*) {
progdefaults.THORsecText = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *valTHOR_FILTER=(Fl_Check_Button *)0;
static void cb_valTHOR_FILTER(Fl_Check_Button* o, void*) {
progdefaults.THOR_FILTER = o->value();
resetTHOR();
progdefaults.changed = true;
}
Fl_Counter2 *valTHOR_BW=(Fl_Counter2 *)0;
static void cb_valTHOR_BW(Fl_Counter2* o, void*) {
progdefaults.THOR_BW = o->value();
resetTHOR();
progdefaults.changed = true;
}
Fl_Value_Slider2 *valThorCWI=(Fl_Value_Slider2 *)0;
static void cb_valThorCWI(Fl_Value_Slider2* o, void*) {
progdefaults.ThorCWI = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *valTHOR_PREAMBLE=(Fl_Check_Button *)0;
static void cb_valTHOR_PREAMBLE(Fl_Check_Button* o, void*) {
progdefaults.THOR_PREAMBLE = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *valTHOR_SOFTSYMBOLS=(Fl_Check_Button *)0;
static void cb_valTHOR_SOFTSYMBOLS(Fl_Check_Button* o, void*) {
progdefaults.THOR_SOFTSYMBOLS = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *valTHOR_SOFTBITS=(Fl_Check_Button *)0;
static void cb_valTHOR_SOFTBITS(Fl_Check_Button* o, void*) {
progdefaults.THOR_SOFTBITS = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *valTHOR_PATHS=(Fl_Counter2 *)0;
static void cb_valTHOR_PATHS(Fl_Counter2* o, void*) {
progdefaults.THOR_PATHS = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnNvtxAdifLog=(Fl_Check_Button *)0;
static void cb_btnNvtxAdifLog(Fl_Check_Button* o, void*) {
progdefaults.NVTX_AdifLog=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnNvtxKmlLog=(Fl_Check_Button *)0;
static void cb_btnNvtxKmlLog(Fl_Check_Button* o, void*) {
progdefaults.NVTX_KmlLog=o->value();
progdefaults.changed = true;
}
Fl_Counter *cntrWEFAX_Shift=(Fl_Counter *)0;
static void cb_cntrWEFAX_Shift(Fl_Counter* o, void*) {
progdefaults.WEFAX_Shift=o->value();
progdefaults.changed = true;
}
Fl_Counter *cntrWEFAX_Center=(Fl_Counter *)0;
static void cb_cntrWEFAX_Center(Fl_Counter* o, void*) {
progdefaults.WEFAX_Center=o->value();
progdefaults.changed = true;
}
Fl_Counter *cntrWEFAX_MaxRows=(Fl_Counter *)0;
static void cb_cntrWEFAX_MaxRows(Fl_Counter* o, void*) {
progdefaults.WEFAX_MaxRows=o->value();
progdefaults.changed = true;
}
Fl_Input *btnWefaxSaveDir=(Fl_Input *)0;
static void cb_btnWefaxSaveDir(Fl_Input* o, void*) {
progdefaults.wefax_save_dir=o->value();
progdefaults.changed = true;
}
Fl_Button *btnSelectFaxDestDir=(Fl_Button *)0;
static void cb_btnSelectFaxDestDir(Fl_Button*, void*) {
Fl_File_Chooser *fc = new Fl_File_Chooser(".",NULL,Fl_File_Chooser::DIRECTORY,"Input File");
fc->callback(WefaxDestDirSet);
fc->show();
}
Fl_Check_Button *btnWefaxAdifLog=(Fl_Check_Button *)0;
static void cb_btnWefaxAdifLog(Fl_Check_Button* o, void*) {
progdefaults.WEFAX_AdifLog=o->value();
progdefaults.changed = true;
}
Fl_Choice *wefax_choice_rx_filter=(Fl_Choice *)0;
static void cb_wefax_choice_rx_filter(Fl_Choice* o, void*) {
progdefaults.wefax_filter=o->value();
}
Fl_Counter *auto_after_nrows=(Fl_Counter *)0;
static void cb_auto_after_nrows(Fl_Counter* o, void*) {
progdefaults.wefax_auto_after = o->value();
progdefaults.changed = true;
}
Fl_Counter *align_stop_after=(Fl_Counter *)0;
static void cb_align_stop_after(Fl_Counter* o, void*) {
progdefaults.wefax_align_stop = o->value();
progdefaults.changed = true;
}
Fl_Counter *align_every_nrows=(Fl_Counter *)0;
static void cb_align_every_nrows(Fl_Counter* o, void*) {
progdefaults.wefax_align_rows = o->value();
if (auto_after_nrows->minimum() < progdefaults.wefax_align_rows) {
auto_after_nrows->minimum(progdefaults.wefax_align_rows);
auto_after_nrows->value(progdefaults.wefax_align_rows);
}
progdefaults.changed = true;
}
Fl_Counter *wefax_correlation=(Fl_Counter *)0;
static void cb_wefax_correlation(Fl_Counter* o, void*) {
progdefaults.wefax_correlation = o->value();
progdefaults.changed = true;
}
Fl_Counter *cntr_correlation_rows=(Fl_Counter *)0;
static void cb_cntr_correlation_rows(Fl_Counter* o, void*) {
progdefaults.wefax_correlation_rows = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txt_auto_flrig_pathname=(Fl_Input2 *)0;
static void cb_txt_auto_flrig_pathname(Fl_Input2* o, void*) {
progdefaults.auto_flrig_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_flrig=(Fl_Button *)0;
static void cb_btn_select_flrig(Fl_Button*, void*) {
std::string str = select_binary_pathname(progdefaults.auto_flrig_pathname);
txt_auto_flrig_pathname->value(str.c_str());
progdefaults.auto_flrig_pathname = str;
progdefaults.changed = true;
}
Fl_Input2 *txt_auto_flamp_pathname=(Fl_Input2 *)0;
static void cb_txt_auto_flamp_pathname(Fl_Input2* o, void*) {
progdefaults.auto_flamp_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_auto_flamp=(Fl_Button *)0;
static void cb_btn_select_auto_flamp(Fl_Button*, void*) {
std::string str = select_binary_pathname(progdefaults.auto_flamp_pathname);
txt_auto_flamp_pathname->value(str.c_str());
progdefaults.auto_flamp_pathname = str;
progdefaults.changed = true;
}
Fl_Input2 *txt_auto_flnet_pathname=(Fl_Input2 *)0;
static void cb_txt_auto_flnet_pathname(Fl_Input2* o, void*) {
progdefaults.auto_flnet_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_auto_flnet=(Fl_Button *)0;
static void cb_btn_select_auto_flnet(Fl_Button*, void*) {
std::string str = select_binary_pathname(progdefaults.auto_flnet_pathname);
txt_auto_flnet_pathname->value(str.c_str());
progdefaults.auto_flnet_pathname = str;
progdefaults.changed = true;
}
Fl_Input2 *txt_auto_fllog_pathname=(Fl_Input2 *)0;
static void cb_txt_auto_fllog_pathname(Fl_Input2* o, void*) {
progdefaults.auto_fllog_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_fllog=(Fl_Button *)0;
static void cb_btn_select_fllog(Fl_Button*, void*) {
std::string str = select_binary_pathname(progdefaults.auto_fllog_pathname);
txt_auto_fllog_pathname->value(str.c_str());
progdefaults.auto_fllog_pathname = str;
progdefaults.changed = true;
}
Fl_Input2 *txt_auto_prog1_pathname=(Fl_Input2 *)0;
static void cb_txt_auto_prog1_pathname(Fl_Input2* o, void*) {
progdefaults.auto_prog1_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_prog1=(Fl_Button *)0;
static void cb_btn_select_prog1(Fl_Button*, void*) {
std::string str = select_binary_pathname(progdefaults.auto_prog1_pathname);
txt_auto_prog1_pathname->value(str.c_str());
progdefaults.auto_prog1_pathname = str;
progdefaults.changed = true;
}
Fl_Input2 *txt_auto_prog2_pathname=(Fl_Input2 *)0;
static void cb_txt_auto_prog2_pathname(Fl_Input2* o, void*) {
progdefaults.auto_prog2_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_prog2=(Fl_Button *)0;
static void cb_btn_select_prog2(Fl_Button*, void*) {
std::string str = select_binary_pathname(progdefaults.auto_prog2_pathname);
txt_auto_prog2_pathname->value(str.c_str());
progdefaults.auto_prog2_pathname = str;
progdefaults.changed = true;
}
Fl_Input2 *txt_auto_prog3_pathname=(Fl_Input2 *)0;
static void cb_txt_auto_prog3_pathname(Fl_Input2* o, void*) {
progdefaults.auto_prog3_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_prog3=(Fl_Button *)0;
static void cb_btn_select_prog3(Fl_Button*, void*) {
std::string str = select_binary_pathname(progdefaults.auto_prog3_pathname);
txt_auto_prog3_pathname->value(str.c_str());
progdefaults.auto_prog3_pathname = str;
progdefaults.changed = true;
}
Fl_Check_Button *btn_flrig_auto_enable=(Fl_Check_Button *)0;
static void cb_btn_flrig_auto_enable(Fl_Check_Button* o, void*) {
progdefaults.flrig_auto_enable = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_flamp_auto_enable=(Fl_Check_Button *)0;
static void cb_btn_flamp_auto_enable(Fl_Check_Button* o, void*) {
progdefaults.flamp_auto_enable = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_flnet_auto_enable=(Fl_Check_Button *)0;
static void cb_btn_flnet_auto_enable(Fl_Check_Button* o, void*) {
progdefaults.flnet_auto_enable = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_fllog_auto_enable=(Fl_Check_Button *)0;
static void cb_btn_fllog_auto_enable(Fl_Check_Button* o, void*) {
progdefaults.fllog_auto_enable = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_prog1_auto_enable=(Fl_Check_Button *)0;
static void cb_btn_prog1_auto_enable(Fl_Check_Button* o, void*) {
progdefaults.prog1_auto_enable = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_prog2_auto_enable=(Fl_Check_Button *)0;
static void cb_btn_prog2_auto_enable(Fl_Check_Button* o, void*) {
progdefaults.prog2_auto_enable = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_prog3_auto_enable=(Fl_Check_Button *)0;
static void cb_btn_prog3_auto_enable(Fl_Check_Button* o, void*) {
progdefaults.prog3_auto_enable = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_test_flrig=(Fl_Button *)0;
static void cb_btn_test_flrig(Fl_Button*, void*) {
start_process(progdefaults.auto_flrig_pathname);
}
Fl_Button *btn_test_flamp=(Fl_Button *)0;
static void cb_btn_test_flamp(Fl_Button*, void*) {
start_process(progdefaults.auto_flamp_pathname);
}
Fl_Button *btn_test_flnet=(Fl_Button *)0;
static void cb_btn_test_flnet(Fl_Button*, void*) {
start_process(progdefaults.auto_flnet_pathname);
}
Fl_Button *btn_test_fllog=(Fl_Button *)0;
static void cb_btn_test_fllog(Fl_Button*, void*) {
start_process(progdefaults.auto_fllog_pathname);
}
Fl_Button *btn_test_prog1=(Fl_Button *)0;
static void cb_btn_test_prog1(Fl_Button*, void*) {
start_process(progdefaults.auto_prog1_pathname);
}
Fl_Button *btn_test_prog2=(Fl_Button *)0;
static void cb_btn_test_prog2(Fl_Button*, void*) {
start_process(progdefaults.auto_prog2_pathname);
}
Fl_Button *btn_test_prog3=(Fl_Button *)0;
static void cb_btn_test_prog3(Fl_Button*, void*) {
start_process(progdefaults.auto_prog3_pathname);
}
Fl_Check_Button *chkSlowCpu=(Fl_Check_Button *)0;
static void cb_chkSlowCpu(Fl_Check_Button* o, void*) {
progdefaults.slowcpu = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chkDTMFdecode=(Fl_Check_Button *)0;
static void cb_chkDTMFdecode(Fl_Check_Button* o, void*) {
progdefaults.DTMFdecode = o->value();
}
Fl_Input *btnKmlSaveDir=(Fl_Input *)0;
static void cb_btnKmlSaveDir(Fl_Input* o, void*) {
progdefaults.kml_save_dir=o->value();
progdefaults.changed = true;
kml_init();
}
Fl_Input *inputKmlRootFile=(Fl_Input *)0;
Fl_Counter *cntKmlMergeDistance=(Fl_Counter *)0;
static void cb_cntKmlMergeDistance(Fl_Counter* o, void*) {
progdefaults.kml_merge_distance = o->value();
progdefaults.changed = true;
kml_init();
}
Fl_Counter *cntKmlRetentionTime=(Fl_Counter *)0;
static void cb_cntKmlRetentionTime(Fl_Counter* o, void*) {
progdefaults.kml_retention_time = o->value();
progdefaults.changed = true;
kml_init();
}
Fl_Spinner2 *cntKmlRefreshInterval=(Fl_Spinner2 *)0;
static void cb_cntKmlRefreshInterval(Fl_Spinner2* o, void*) {
progdefaults.kml_refresh_interval = (int)(o->value());
progdefaults.changed = true;
kml_init();
}
Fl_ListBox *listbox_kml_balloon_style=(Fl_ListBox *)0;
static void cb_listbox_kml_balloon_style(Fl_ListBox* o, void*) {
progdefaults.kml_balloon_style = o->index();
progdefaults.changed = true;
kml_init();
}
Fl_Input *btnKmlCommand=(Fl_Input *)0;
static void cb_btnKmlCommand(Fl_Input* o, void*) {
progdefaults.kml_command=o->value();
progdefaults.changed = true;
kml_init();
}
Fl_Button *btlTestKmlCommand=(Fl_Button *)0;
static void cb_btlTestKmlCommand(Fl_Button*, void*) {
KmlServer::SpawnProcess();
}
Fl_Button *btnSelectKmlDestDir=(Fl_Button *)0;
static void cb_btnSelectKmlDestDir(Fl_Button*, void*) {
Fl_File_Chooser *fc = new Fl_File_Chooser(".",NULL,Fl_File_Chooser::DIRECTORY,"Input File");
fc->callback(KmlDestDirSet);
fc->show();
}
Fl_Button *btlPurge=(Fl_Button *)0;
static void cb_btlPurge(Fl_Button*, void*) {
KmlServer::GetInstance()->Reset();
}
Fl_Check_Button *btnKmlPurgeOnStartup=(Fl_Check_Button *)0;
static void cb_btnKmlPurgeOnStartup(Fl_Check_Button* o, void*) {
progdefaults.kml_purge_on_startup = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_kml_enabled=(Fl_Check_Button *)0;
static void cb_btn_kml_enabled(Fl_Check_Button* o, void*) {
progdefaults.kml_enabled = o->value();
if (progdefaults.kml_enabled) {
kml_init(true);
progdefaults.changed = true;
} else {
KmlServer::Exit();
};
}
Fl_Check_Button *chkAutoExtract=(Fl_Check_Button *)0;
static void cb_chkAutoExtract(Fl_Check_Button* o, void*) {
progdefaults.autoextract = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chk_open_wrap_folder=(Fl_Check_Button *)0;
static void cb_chk_open_wrap_folder(Fl_Check_Button* o, void*) {
progdefaults.open_nbems_folder = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chk_open_flmsg=(Fl_Check_Button *)0;
static void cb_chk_open_flmsg(Fl_Check_Button* o, void*) {
progdefaults.open_flmsg = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *chk_open_flmsg_print=(Fl_Check_Button *)0;
static void cb_chk_open_flmsg_print(Fl_Check_Button* o, void*) {
progdefaults.open_flmsg_print = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txt_flmsg_pathname=(Fl_Input2 *)0;
static void cb_txt_flmsg_pathname(Fl_Input2* o, void*) {
progdefaults.flmsg_pathname = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_select_flmsg=(Fl_Button *)0;
static void cb_btn_select_flmsg(Fl_Button*, void*) {
select_flmsg_pathname();
}
Fl_Value_Slider *sldr_extract_timeout=(Fl_Value_Slider *)0;
static void cb_sldr_extract_timeout(Fl_Value_Slider* o, void*) {
progdefaults.extract_timeout=o->value();
progdefaults.changed=true;
}
Fl_Check_Button *chk_transfer__to_open_flmsg=(Fl_Check_Button *)0;
static void cb_chk_transfer__to_open_flmsg(Fl_Check_Button* o, void*) {
progdefaults.flmsg_transfer_direct = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnPSKRepAuto=(Fl_Check_Button *)0;
static void cb_btnPSKRepAuto(Fl_Check_Button* o, void*) {
progdefaults.pskrep_auto = o->value();
btnPSKRepInit->labelcolor(FL_RED);
btnPSKRepInit->redraw_label();
progdefaults.changed = true;
}
Fl_Check_Button *btnPSKRepLog=(Fl_Check_Button *)0;
static void cb_btnPSKRepLog(Fl_Check_Button* o, void*) {
progdefaults.pskrep_log = o->value();
btnPSKRepInit->labelcolor(FL_RED);
btnPSKRepInit->redraw_label();
progdefaults.changed = true;
}
Fl_Check_Button *btnPSKRepQRG=(Fl_Check_Button *)0;
static void cb_btnPSKRepQRG(Fl_Check_Button* o, void*) {
progdefaults.pskrep_qrg = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_report_when_visible=(Fl_Check_Button *)0;
static void cb_btn_report_when_visible(Fl_Check_Button* o, void*) {
progdefaults.report_when_visible = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_pskrep_autostart=(Fl_Check_Button *)0;
static void cb_btn_pskrep_autostart(Fl_Check_Button* o, void*) {
progdefaults.pskrep_autostart = o->value();
progdefaults.changed = true;
}
Fl_Box *box_connected_to_pskrep=(Fl_Box *)0;
Fl_Input2 *inpPSKRepHost=(Fl_Input2 *)0;
static void cb_inpPSKRepHost(Fl_Input2* o, void*) {
progdefaults.pskrep_host = o->value();
btnPSKRepInit->labelcolor(FL_RED);
btnPSKRepInit->redraw_label();
progdefaults.changed = true;
}
Fl_Input2 *inpPSKRepPort=(Fl_Input2 *)0;
static void cb_inpPSKRepPort(Fl_Input2* o, void*) {
progdefaults.pskrep_port = o->value();
btnPSKRepInit->labelcolor(FL_RED);
btnPSKRepInit->redraw_label();
progdefaults.changed = true;
}
Fl_Button *btnPSKRepInit=(Fl_Button *)0;
static void cb_btnPSKRepInit(Fl_Button* o, void*) {
pskrep_stop();
if (!pskrep_start()) {
boxPSKRepMsg->copy_label(pskrep_error());
progdefaults.usepskrep = false;
box_connected_to_pskrep->color(FL_WHITE);
box_connected_to_pskrep->redraw();
} else {
boxPSKRepMsg->label(0);
o->labelcolor(FL_FOREGROUND_COLOR);
progdefaults.usepskrep = true;
box_connected_to_pskrep->color(FL_GREEN);
box_connected_to_pskrep->redraw();
};
}
Fl_Box *boxPSKRepMsg=(Fl_Box *)0;
Fl_Counter *cntBusyChannelSeconds=(Fl_Counter *)0;
static void cb_cntBusyChannelSeconds(Fl_Counter* o, void*) {
progStatus.busyChannelSeconds = (int) o->value();
progdefaults.busyChannelSeconds = (int) o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnEnableBusyChannel=(Fl_Check_Button *)0;
static void cb_btnEnableBusyChannel(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.enableBusyChannel = true;
progdefaults.enableBusyChannel = true;
}
else {
progStatus.enableBusyChannel = false;
progdefaults.enableBusyChannel = false;
}
progdefaults.changed = true;
}
Fl_Counter *cntPSMTXBufferFlushTimer=(Fl_Counter *)0;
static void cb_cntPSMTXBufferFlushTimer(Fl_Counter* o, void*) {
progStatus.psm_flush_buffer_timeout = (int) o->value();
progdefaults.psm_flush_buffer_timeout = (int) o->value();
progdefaults.changed = true;
}
Fl_Counter *cntPSMBandwidthMargins=(Fl_Counter *)0;
static void cb_cntPSMBandwidthMargins(Fl_Counter* o, void*) {
progStatus.psm_minimum_bandwidth_margin = (int) o->value();
progdefaults.psm_minimum_bandwidth_margin = (int) o->value();
progdefaults.changed = true;
}
Fl_Counter *cntPSMValidSamplePeriod=(Fl_Counter *)0;
static void cb_cntPSMValidSamplePeriod(Fl_Counter* o, void*) {
progStatus.psm_hit_time_window = (int) o->value();
progdefaults.psm_hit_time_window = (int) o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnEnable_csma=(Fl_Check_Button *)0;
static void cb_btnEnable_csma(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.csma_enabled = true;
progdefaults.csma_enabled = true;
} else {
progStatus.csma_enabled = false;
progdefaults.csma_enabled = false;
}
progdefaults.changed = true;
}
Fl_Counter *cntPersistance=(Fl_Counter *)0;
static void cb_cntPersistance(Fl_Counter* o, void*) {
progStatus.csma_persistance = (int) o->value();
progdefaults.csma_persistance = (int) o->value();
progdefaults.changed = true;
update_csma_io_config(CSMA_PERSISTANCE);
}
Fl_Counter *cntSlotTime=(Fl_Counter *)0;
static void cb_cntSlotTime(Fl_Counter* o, void*) {
progStatus.csma_slot_time = (int) o->value();
progdefaults.csma_slot_time = (int) o->value();
progdefaults.changed = true;
update_csma_io_config(CSMA_SLOT_TIME);
}
Fl_Counter *cntTransmitDelay=(Fl_Counter *)0;
static void cb_cntTransmitDelay(Fl_Counter* o, void*) {
progStatus.csma_transmit_delay = (int) o->value();
progdefaults.csma_transmit_delay = (int) o->value();
progdefaults.changed = true;
update_csma_io_config(CSMA_TX_DELAY);
}
Fl_Output *OutputSlotTimeMS=(Fl_Output *)0;
Fl_Output *OutputTransmitDelayMS=(Fl_Output *)0;
Fl_Output *OutputPersistancePercent=(Fl_Output *)0;
Fl_Check_Button *btnEnable_histogram=(Fl_Check_Button *)0;
static void cb_btnEnable_histogram(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.psm_use_histogram = true;
progdefaults.psm_use_histogram = true;
} else {
progStatus.psm_use_histogram = false;
progdefaults.psm_use_histogram = false;
}
progdefaults.changed = true;
}
Fl_Counter *cntPSMThreshold=(Fl_Counter *)0;
static void cb_cntPSMThreshold(Fl_Counter* o, void*) {
progStatus.psm_histogram_offset_threshold = (int) o->value();
progdefaults.psm_histogram_offset_threshold = (int) o->value();
progdefaults.changed = true;
}
Fl_Counter *cntKPSQLAttenuation=(Fl_Counter *)0;
static void cb_cntKPSQLAttenuation(Fl_Counter* o, void*) {
progStatus.kpsql_attenuation = (int) o->value();
progdefaults.kpsql_attenuation = (int) o->value();
update_kpsql_fractional_gain(progStatus.kpsql_attenuation);
progdefaults.changed = true;
}
Fl_Check_Button *btn_show_psm_button=(Fl_Check_Button *)0;
static void cb_btn_show_psm_button(Fl_Check_Button* o, void*) {
progdefaults.show_psm_btn = o->value();
UI_select();
progdefaults.changed = true;
}
Fl_Button *btnBuyChannelDefaults=(Fl_Button *)0;
static void cb_btnBuyChannelDefaults(Fl_Button*, void*) {
psm_set_defaults();
}
Fl_Group *grpTalker=(Fl_Group *)0;
Fl_Light_Button *btnConnectTalker=(Fl_Light_Button *)0;
static void cb_btnConnectTalker(Fl_Light_Button* o, void*) {
if (o->value()) open_talker();
else close_talker();
}
Fl_Check_Button *btn_auto_talk=(Fl_Check_Button *)0;
static void cb_btn_auto_talk(Fl_Check_Button* o, void*) {
progdefaults.auto_talk = o->value();
}
Fl_Check_Button *chkRxStream=(Fl_Check_Button *)0;
static void cb_chkRxStream(Fl_Check_Button* o, void*) {
progdefaults.speak = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnTXLEVEL_by_mode=(Fl_Check_Button *)0;
static void cb_btnTXLEVEL_by_mode(Fl_Check_Button* o, void*) {
progdefaults.txlevel_by_mode=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnSQLCH_by_mode=(Fl_Check_Button *)0;
static void cb_btnSQLCH_by_mode(Fl_Check_Button* o, void*) {
progdefaults.sqlch_by_mode=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnAFC_by_mode=(Fl_Check_Button *)0;
static void cb_btnAFC_by_mode(Fl_Check_Button* o, void*) {
progdefaults.afc_by_mode=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnREVERSE_by_mode=(Fl_Check_Button *)0;
static void cb_btnREVERSE_by_mode(Fl_Check_Button* o, void*) {
progdefaults.reverse_by_mode=o->value();
progdefaults.changed = true;
}
Fl_Value_Input2 *valCWsweetspot=(Fl_Value_Input2 *)0;
static void cb_valCWsweetspot(Fl_Value_Input2* o, void*) {
progdefaults.CWsweetspot=o->value();
progdefaults.changed = true;
}
Fl_Value_Input2 *valRTTYsweetspot=(Fl_Value_Input2 *)0;
static void cb_valRTTYsweetspot(Fl_Value_Input2* o, void*) {
progdefaults.RTTYsweetspot=o->value();
cntr_xcvr_FSK_MARK->value(progdefaults.RTTYsweetspot - rtty::SHIFT[progdefaults.rtty_shift] / 2);
resetRTTY();
progdefaults.changed = true;
}
Fl_Value_Input2 *valPSKsweetspot=(Fl_Value_Input2 *)0;
static void cb_valPSKsweetspot(Fl_Value_Input2* o, void*) {
progdefaults.PSKsweetspot=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnStartAtSweetSpot=(Fl_Check_Button *)0;
static void cb_btnStartAtSweetSpot(Fl_Check_Button* o, void*) {
progdefaults.StartAtSweetSpot = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnCWIsLSB=(Fl_Check_Button *)0;
static void cb_btnCWIsLSB(Fl_Check_Button* o, void*) {
progdefaults.CWIsLSB=o->value();
progdefaults.changed=true;
}
static void cb_Misc(Fl_Group*, void*) {
btnDisable_p2p_io_widgets->value(1);
}
Fl_Check_Button *btnDisable_p2p_io_widgets=(Fl_Check_Button *)0;
static void cb_btnDisable_p2p_io_widgets(Fl_Check_Button* o, long) {
progStatus.ip_lock = o->value();
if(o->value())
disable_config_p2p_io_widgets();
else
enable_config_p2p_io_widgets();
kiss_io_set_button_state(0);
}
Fl_Check_Button *btnEnable_arq=(Fl_Check_Button *)0;
static void cb_btnEnable_arq(Fl_Check_Button* o, void*) {
if(o->value()) {
enable_arq();
}
progdefaults.changed = true;
}
Fl_Check_Button *btnEnable_kiss=(Fl_Check_Button *)0;
static void cb_btnEnable_kiss(Fl_Check_Button* o, void*) {
if(o->value()) {
enable_kiss();
}
progdefaults.changed = true;
}
Fl_Input2 *txtKiss_ip_address=(Fl_Input2 *)0;
static void cb_txtKiss_ip_address(Fl_Input2* o, void*) {
progStatus.kiss_address = o->value();
progdefaults.kiss_address = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txtKiss_ip_io_port_no=(Fl_Input2 *)0;
static void cb_txtKiss_ip_io_port_no(Fl_Input2* o, void*) {
progStatus.kiss_io_port = o->value();
progdefaults.kiss_io_port = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txtKiss_ip_out_port_no=(Fl_Input2 *)0;
static void cb_txtKiss_ip_out_port_no(Fl_Input2* o, void*) {
progStatus.kiss_out_port = o->value();
progdefaults.kiss_out_port = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnEnable_dual_port=(Fl_Check_Button *)0;
static void cb_btnEnable_dual_port(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.kiss_dual_port_enabled = true;
progdefaults.kiss_dual_port_enabled = true;
}
else {
progStatus.kiss_dual_port_enabled = false;
progdefaults.kiss_dual_port_enabled = false;
}
progdefaults.changed = true;
}
Fl_Button *btn_restart_kiss=(Fl_Button *)0;
static void cb_btn_restart_kiss(Fl_Button*, void*) {
//restart_kiss_server();
}
Fl_Button *btn_connect_kiss_io=(Fl_Button *)0;
static void cb_btn_connect_kiss_io(Fl_Button*, void*) {
connect_to_kiss_io(true);
}
Fl_Button *btnDefault_kiss_ip=(Fl_Button *)0;
static void cb_btnDefault_kiss_ip(Fl_Button*, void*) {
set_ip_to_default(KISS_IO);
progdefaults.changed = true;
}
Fl_Check_Button *btnKissTCPIO=(Fl_Check_Button *)0;
static void cb_btnKissTCPIO(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.kiss_tcp_io = true;
progdefaults.kiss_tcp_io = true;
} else {
progStatus.kiss_tcp_io = false;
progdefaults.kiss_tcp_io = false;
}
kiss_io_set_button_state(0);
progdefaults.changed = true;
}
Fl_Check_Button *btnKissUDPIO=(Fl_Check_Button *)0;
static void cb_btnKissUDPIO(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.kiss_tcp_io = false;
progdefaults.kiss_tcp_io = false;
} else {
progStatus.kiss_tcp_io = true;
progdefaults.kiss_tcp_io = true;
}
kiss_io_set_button_state(0);
progdefaults.changed = true;
}
Fl_Check_Button *btnKissTCPListen=(Fl_Check_Button *)0;
static void cb_btnKissTCPListen(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.kiss_tcp_listen = true;
progdefaults.kiss_tcp_listen = true;
} else {
progStatus.kiss_tcp_listen = false;
progdefaults.kiss_tcp_listen = false;
}
progdefaults.changed = true;
}
Fl_Check_Button *btnEnable_7bit_modem_inhibit=(Fl_Check_Button *)0;
static void cb_btnEnable_7bit_modem_inhibit(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.kiss_io_modem_change_inhibit = true;
progdefaults.kiss_io_modem_change_inhibit = true;
}
else {
progStatus.kiss_io_modem_change_inhibit = false;
progdefaults.kiss_io_modem_change_inhibit = false;
}
progdefaults.changed = true;
}
Fl_Check_Button *btnEnable_auto_connect=(Fl_Check_Button *)0;
static void cb_btnEnable_auto_connect(Fl_Check_Button* o, void*) {
if(o->value()) {
progdefaults.tcp_udp_auto_connect = true;
}
else {
progdefaults.tcp_udp_auto_connect = false;
}
progdefaults.changed = true;
}
Fl_Check_Button *btnEnable_ax25_decode=(Fl_Check_Button *)0;
static void cb_btnEnable_ax25_decode(Fl_Check_Button* o, void*) {
if(o->value()) {
progStatus.ax25_decode_enabled = true;
progdefaults.ax25_decode_enabled = true;
}
else {
progStatus.ax25_decode_enabled = false;
progdefaults.ax25_decode_enabled = false;
}
progdefaults.changed = true;
}
Fl_Input2 *txtArq_ip_address=(Fl_Input2 *)0;
static void cb_txtArq_ip_address(Fl_Input2* o, void*) {
progdefaults.arq_address = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txtArq_ip_port_no=(Fl_Input2 *)0;
static void cb_txtArq_ip_port_no(Fl_Input2* o, void*) {
progdefaults.arq_port = o->value();
progdefaults.changed = true;
}
Fl_Button *btnDefault_arq_ip=(Fl_Button *)0;
static void cb_btnDefault_arq_ip(Fl_Button*, void*) {
set_ip_to_default(ARQ_IO);
progdefaults.changed = true;
}
Fl_Button *btn_restart_arq=(Fl_Button *)0;
static void cb_btn_restart_arq(Fl_Button*, void*) {
//arq_restart();
}
Fl_Button *btnDefault_xmlrpc_ip=(Fl_Button *)0;
static void cb_btnDefault_xmlrpc_ip(Fl_Button*, void*) {
set_ip_to_default(XMLRPC_IO);
progdefaults.changed = true;
}
Fl_Input2 *txtXmlrpc_ip_address=(Fl_Input2 *)0;
static void cb_txtXmlrpc_ip_address(Fl_Input2* o, void*) {
progdefaults.xmlrpc_address = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txtXmlrpc_ip_port_no=(Fl_Input2 *)0;
static void cb_txtXmlrpc_ip_port_no(Fl_Input2* o, void*) {
progdefaults.xmlrpc_port = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_restart_xml=(Fl_Button *)0;
static void cb_btn_restart_xml(Fl_Button*, void*) {
//restart_xml_server();
}
Fl_Button *btnDefault_flrig_ip=(Fl_Button *)0;
static void cb_btnDefault_flrig_ip(Fl_Button*, void*) {
set_ip_to_default(FLRIG_IO);
progdefaults.changed = true;
}
Fl_Input2 *txt_flrig_ip_address=(Fl_Input2 *)0;
static void cb_txt_flrig_ip_address(Fl_Input2* o, void*) {
progdefaults.flrig_ip_address = o->value();
progdefaults.changed = true;
}
Fl_Input2 *txt_flrig_ip_port=(Fl_Input2 *)0;
static void cb_txt_flrig_ip_port(Fl_Input2* o, void*) {
progdefaults.flrig_ip_port = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_reconnect_flrig_server=(Fl_Button *)0;
static void cb_btn_reconnect_flrig_server(Fl_Button*, void*) {
reconnect_to_flrig();
}
Fl_Input *txt_fllog_ip_address=(Fl_Input *)0;
static void cb_txt_fllog_ip_address(Fl_Input* o, void*) {
progdefaults.xmllog_address = o->value();
}
Fl_Input *txt_fllog_ip_port=(Fl_Input *)0;
static void cb_txt_fllog_ip_port(Fl_Input* o, void*) {
progdefaults.xmllog_port = o->value();
}
Fl_Button *btn_reconnect_log_server=(Fl_Button *)0;
static void cb_btn_reconnect_log_server(Fl_Button*, void*) {
progdefaults.xml_logbook = true;
progdefaults.changed = true;
connect_to_log_server();
}
Fl_Button *btnDefault_fllog_ip=(Fl_Button *)0;
static void cb_btnDefault_fllog_ip(Fl_Button*, void*) {
set_ip_to_default(FLLOG_IO);
progdefaults.changed = true;
}
Fl_Group *grpOperator=(Fl_Group *)0;
Fl_Input2 *inpMyCallsign=(Fl_Input2 *)0;
static void cb_inpMyCallsign(Fl_Input2*, void*) {
const char *triggers = " !#$%&'()*+,-.;<=>?@[\\]^_{|}~";
std::string mycall = inpMyCallsign->value();
bool modified = false;
for (size_t k = 0; k < mycall.length(); k++) {
for (size_t n = 0; n < strlen(triggers); n++) {
if (mycall[k] == triggers[n]) {
if ( fl_choice2("Replace FSQ trigger character with slash /", _("no"), _("yes"), NULL ) ) {
mycall[k] = '/';
modified = true;
}
}
}
}
if (modified) {
int p = inpMyCallsign->position();
inpMyCallsign->value(mycall.c_str());
inpMyCallsign->position(p); // causes a redraw
}
progdefaults.myCall = mycall;
if (progdefaults.THORsecText.empty()) {
progdefaults.THORsecText = mycall;
progdefaults.THORsecText.append(" ");
txtTHORSecondary->value(progdefaults.THORsecText.c_str());
}
if (progdefaults.secText.empty()) {
progdefaults.secText = mycall;
progdefaults.secText.append(" ");
txtSecondary->value(progdefaults.secText.c_str());
}
update_main_title();
notify_change_callsign();
progdefaults.changed = true;
}
Fl_Input2 *inpOperCallsign=(Fl_Input2 *)0;
static void cb_inpOperCallsign(Fl_Input2* o, void*) {
progdefaults.operCall = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpMyName=(Fl_Input2 *)0;
static void cb_inpMyName(Fl_Input2* o, void*) {
progdefaults.myName = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpMyAntenna=(Fl_Input2 *)0;
static void cb_inpMyAntenna(Fl_Input2* o, void*) {
progdefaults.myAntenna = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpMyQth=(Fl_Input2 *)0;
static void cb_inpMyQth(Fl_Input2* o, void*) {
progdefaults.myQth = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpMyLocator=(Fl_Input2 *)0;
static void cb_inpMyLocator(Fl_Input2* o, void*) {
progdefaults.myLocator = o->value();
progdefaults.changed = true;
}
Fl_ListBox *listbox_states=(Fl_ListBox *)0;
static void cb_listbox_states(Fl_ListBox* o, void*) {
listbox_counties->clear();
listbox_counties->add(states.counties(o->value()).c_str());
listbox_counties->index(0);
inp_QP_short_county->value(states.cnty_short(listbox_states->value(),listbox_counties->value()).c_str());
inp_QP_state_short->value(states.state_short(o->value()).c_str());
progdefaults.SQSOstate = o->index();
progdefaults.changed = true;
}
Fl_Input2 *inp_QP_state_short=(Fl_Input2 *)0;
Fl_ListBox *listbox_counties=(Fl_ListBox *)0;
static void cb_listbox_counties(Fl_ListBox* o, void*) {
inp_QP_short_county->value(states.cnty_short(listbox_states->value(),o->value()).c_str());
progdefaults.SQSOcounty = o->index();
progdefaults.changed = true;
}
Fl_Input2 *inp_QP_short_county=(Fl_Input2 *)0;
Fl_Group *grpRigFlrig=(Fl_Group *)0;
Fl_Check_Button *chk_flrig_keys_modem=(Fl_Check_Button *)0;
static void cb_chk_flrig_keys_modem(Fl_Check_Button* o, void*) {
progdefaults.flrig_keys_modem = o->value();
progdefaults.changed = true;
}
Fl_Button *btnDefault_flrig_ip_mirror=(Fl_Button *)0;
static void cb_btnDefault_flrig_ip_mirror(Fl_Button*, void*) {
set_ip_to_default(FLRIG_IO);
txt_flrig_ip_address_mirror->value(progdefaults.flrig_ip_address.c_str());
txt_flrig_ip_port_mirror->value(progdefaults.flrig_ip_port.c_str());
progdefaults.changed = true;
}
Fl_Input2 *txt_flrig_ip_address_mirror=(Fl_Input2 *)0;
static void cb_txt_flrig_ip_address_mirror(Fl_Input2* o, void*) {
progdefaults.flrig_ip_address = o->value();
txt_flrig_ip_address->value(progdefaults.flrig_ip_address.c_str());
progdefaults.changed = true;
}
Fl_Input2 *txt_flrig_ip_port_mirror=(Fl_Input2 *)0;
static void cb_txt_flrig_ip_port_mirror(Fl_Input2* o, void*) {
progdefaults.flrig_ip_port = o->value();
txt_flrig_ip_port->value(progdefaults.flrig_ip_port.c_str());
progdefaults.changed = true;
}
Fl_Button *btn_reconnect_flrig_server_mirror=(Fl_Button *)0;
static void cb_btn_reconnect_flrig_server_mirror(Fl_Button*, void*) {
reconnect_to_flrig();
}
Fl_Check_Button *btn_fldigi_client_to_flrig=(Fl_Check_Button *)0;
static void cb_btn_fldigi_client_to_flrig(Fl_Check_Button* o, void*) {
progdefaults.fldigi_client_to_flrig=o->value();
if (o->value()) {
progdefaults.chkUSEHAMLIBis = false;
progdefaults.chkUSERIGCATis = false;
chkUSEHAMLIB->value(0);
chkUSERIGCAT->value(0);
}
progdefaults.changed=true;
}
Fl_Check_Button *btn_flrig_auto_shutdown=(Fl_Check_Button *)0;
static void cb_btn_flrig_auto_shutdown(Fl_Check_Button* o, void*) {
progdefaults.flrig_auto_shutdown=o->value();
progdefaults.changed=true;
}
Fl_Counter2 *val_flrig_poll=(Fl_Counter2 *)0;
static void cb_val_flrig_poll(Fl_Counter2* o, void*) {
progdefaults.flrig_poll = o->value();
}
Fl_Group *grpRigCat=(Fl_Group *)0;
Fl_Check_Button *chkUSERIGCAT=(Fl_Check_Button *)0;
static void cb_chkUSERIGCAT(Fl_Check_Button* o, void*) {
if (o->value() == 1) {
chkUSEHAMLIB->value(0);
btn_fldigi_client_to_flrig->value(0);
progdefaults.chkUSERIGCATis = true;
progdefaults.fldigi_client_to_flrig = false;
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw();
} else {
progdefaults.chkUSERIGCATis = false;
progdefaults.initInterface();
}
progdefaults.changed=true;
}
Fl_Group *grpRigCAT=(Fl_Group *)0;
Fl_Output *txtXmlRigFilename=(Fl_Output *)0;
Fl_Button *btnSelectRigXmlFile=(Fl_Button *)0;
static void cb_btnSelectRigXmlFile(Fl_Button*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
selectRigXmlFilename();
}
Fl_ComboBox *inpXmlRigDevice=(Fl_ComboBox *)0;
static void cb_inpXmlRigDevice(Fl_ComboBox*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Value_Input2 *cntRigCatRetries=(Fl_Value_Input2 *)0;
static void cb_cntRigCatRetries(Fl_Value_Input2*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Value_Input2 *cntRigCatTimeout=(Fl_Value_Input2 *)0;
static void cb_cntRigCatTimeout(Fl_Value_Input2*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Value_Input2 *cntRigCatWait=(Fl_Value_Input2 *)0;
static void cb_cntRigCatWait(Fl_Value_Input2*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_ListBox *listbox_xml_rig_baudrate=(Fl_ListBox *)0;
static void cb_listbox_xml_rig_baudrate(Fl_ListBox*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Counter2 *valRigCatStopbits=(Fl_Counter2 *)0;
static void cb_valRigCatStopbits(Fl_Counter2*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw();
}
Fl_Button *btnInitRIGCAT=(Fl_Button *)0;
static void cb_btnInitRIGCAT(Fl_Button* o, void*) {
progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
progdefaults.changed = true;
}
Fl_Check_Button *btnRigCatEcho=(Fl_Check_Button *)0;
static void cb_btnRigCatEcho(Fl_Check_Button*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
progdefaults.changed = true;
}
Fl_Round_Button *btnRigCatCMDptt=(Fl_Round_Button *)0;
static void cb_btnRigCatCMDptt(Fl_Round_Button* o, void*) {
if (o->value()== 1) {
btnRigCatRTSptt->value(0);
btnRigCatDTRptt->value(0);
progdefaults.RigCatCMDptt = true;
progdefaults.TTYptt =
progdefaults.UsePPortPTT =
progdefaults.UseUHrouterPTT =
progdefaults.RigCatRTSptt =
progdefaults.RigCatDTRptt =
progdefaults.HamlibCMDptt = false;
} else
progdefaults.RigCatCMDptt = false;
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw();
}
Fl_Round_Button *btnRigCatRTSptt=(Fl_Round_Button *)0;
static void cb_btnRigCatRTSptt(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
btnRigCatCMDptt->value(0);
progdefaults.RigCatRTSptt = true;
progdefaults.TTYptt =
progdefaults.UsePPortPTT =
progdefaults.UseUHrouterPTT =
progdefaults.RigCatCMDptt =
progdefaults.HamlibCMDptt = false;
} else
progdefaults.RigCatRTSptt = false;
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Round_Button *btnRigCatDTRptt=(Fl_Round_Button *)0;
static void cb_btnRigCatDTRptt(Fl_Round_Button* o, void*) {
if (o->value() == 1) {
btnRigCatCMDptt->value(0);
progdefaults.RigCatDTRptt = true;
progdefaults.TTYptt =
progdefaults.UsePPortPTT =
progdefaults.UseUHrouterPTT =
progdefaults.RigCatCMDptt =
progdefaults.HamlibCMDptt = false;
} else
progdefaults.RigCatDTRptt = false;
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Check_Button *btnRigCatRTSplus=(Fl_Check_Button *)0;
static void cb_btnRigCatRTSplus(Fl_Check_Button*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Check_Button *btnRigCatDTRplus=(Fl_Check_Button *)0;
static void cb_btnRigCatDTRplus(Fl_Check_Button*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Check_Button *chkRigCatRTSCTSflow=(Fl_Check_Button *)0;
static void cb_chkRigCatRTSCTSflow(Fl_Check_Button*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Check_Button *chk_restore_tio=(Fl_Check_Button *)0;
static void cb_chk_restore_tio(Fl_Check_Button*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Check_Button *chkRigCatVSP=(Fl_Check_Button *)0;
static void cb_chkRigCatVSP(Fl_Check_Button*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Value_Input2 *cntRigCatInitDelay=(Fl_Value_Input2 *)0;
static void cb_cntRigCatInitDelay(Fl_Value_Input2*, void*) {
btnInitRIGCAT->labelcolor(FL_RED);
btnInitRIGCAT->redraw_label();
}
Fl_Group *grpRigGPIO=(Fl_Group *)0;
Fl_Check_Button *btn_gpio_ptt2=(Fl_Check_Button *)0;
static void cb_btn_gpio_ptt2(Fl_Check_Button* o, void*) {
btnTTYptt->value(0);
btnUsePPortPTT->value(0);
btn_gpio_ptt->value(o->value());
if (o->value()) {
progdefaults.gpio_ptt = true;
progdefaults.UseUHrouterPTT =
progdefaults.TTYptt =
progdefaults.UsePPortPTT =
progdefaults.RigCatRTSptt =
progdefaults.RigCatDTRptt =
progdefaults.RigCatCMDptt =
progdefaults.cmedia_ptt =
progdefaults.HamlibCMDptt = false;
} else
progdefaults.gpio_ptt = false;
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT2->labelcolor(FL_RED);
btnInitHWPTT->redraw();
btnInitHWPTT2->redraw();
progdefaults.changed = true;
}
Fl_Button *btnInitHWPTT2=(Fl_Button *)0;
static void cb_btnInitHWPTT2(Fl_Button* o, void*) {
progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
o->redraw();
btnInitHWPTT->labelcolor(FL_FOREGROUND_COLOR);
btnInitHWPTT2->redraw();
progdefaults.changed = true;
}
static void cb_btn_enable_gpio(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= 1;
export_gpio(0);
} else {
progdefaults.enable_gpio &= ~1;
unexport_gpio(0);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio1(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<1);
export_gpio(1);
} else {
progdefaults.enable_gpio &= ~(1<<1);
unexport_gpio(1);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio2(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<2);
export_gpio(2);
} else {
progdefaults.enable_gpio &= ~(1<<2);
unexport_gpio(2);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio3(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<3);
export_gpio(3);
} else {
progdefaults.enable_gpio &= ~(1<<3);
unexport_gpio(3);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio4(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<4);
export_gpio(4);
} else {
progdefaults.enable_gpio &= ~(1<<4);
unexport_gpio(4);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio5(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<5);
export_gpio(5);
} else {
progdefaults.enable_gpio &= ~(1<<5);
unexport_gpio(5);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio6(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<6);
export_gpio(6);
} else {
progdefaults.enable_gpio &= ~(1<<6);
unexport_gpio(6);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio7(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<7);
export_gpio(7);
} else {
progdefaults.enable_gpio &= ~(1<<7);
unexport_gpio(7);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio8(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<8);
export_gpio(8);
} else {
progdefaults.enable_gpio &= ~(1<<8);
unexport_gpio(8);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpio9(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<9);
export_gpio(9);
} else {
progdefaults.enable_gpio &= ~(1<<9);
unexport_gpio(9);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpioa(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<10);
export_gpio(10);
} else {
progdefaults.enable_gpio &= ~(1<<10);
unexport_gpio(10);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpiob(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<11);
export_gpio(11);
} else {
progdefaults.enable_gpio &= ~(1<<11);
unexport_gpio(11);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpioc(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<12);
export_gpio(12);
} else {
progdefaults.enable_gpio &= ~(1<<12);
unexport_gpio(12);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpiod(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<13);
export_gpio(13);
} else {
progdefaults.enable_gpio &= ~(1<<13);
unexport_gpio(13);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpioe(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<14);
export_gpio(14);
} else {
progdefaults.enable_gpio &= ~(1<<14);
unexport_gpio(14);
}
progdefaults.changed = true;
}
static void cb_btn_enable_gpiof(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<15);
export_gpio(15);
} else {
progdefaults.enable_gpio &= ~(1<<15);
unexport_gpio(15);
}
progdefaults.changed = true;
}
Fl_Check_Button *btn_enable_gpio[17]={(Fl_Check_Button *)0};
static void cb_btn_enable_gpio10(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.enable_gpio |= (1<<16);
export_gpio(16);
} else {
progdefaults.enable_gpio &= ~(1<<16);
unexport_gpio(16);
}
progdefaults.changed = true;
}
static void cb_btn_gpio_on(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= 1;
} else {
progdefaults.gpio_on &= ~1;
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on1(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<1);
} else {
progdefaults.gpio_on &= ~(1<<1);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on2(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<2);
} else {
progdefaults.gpio_on &= ~(1<<2);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on3(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<3);
} else {
progdefaults.gpio_on &= ~(1<<3);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on4(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<4);
} else {
progdefaults.gpio_on &= ~(1<<4);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on5(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<5);
} else {
progdefaults.gpio_on &= ~(1<<5);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on6(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<6);
} else {
progdefaults.gpio_on &= ~(1<<6);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on7(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<7);
} else {
progdefaults.gpio_on &= ~(1<<7);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on8(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<8);
} else {
progdefaults.gpio_on &= ~(1<<8);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_on9(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<9);
} else {
progdefaults.gpio_on &= ~(1<<9);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_ona(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<10);
} else {
progdefaults.gpio_on &= ~(1<<10);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_onb(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<11);
} else {
progdefaults.gpio_on &= ~(1<<11);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_onc(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<12);
} else {
progdefaults.gpio_on &= ~(1<<12);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_ond(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<13);
} else {
progdefaults.gpio_on &= ~(1<<13);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_one(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<14);
} else {
progdefaults.gpio_on &= ~(1<<14);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
static void cb_btn_gpio_onf(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<15);
} else {
progdefaults.gpio_on &= ~(1<<15);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
Fl_Check_Button *btn_gpio_on[17]={(Fl_Check_Button *)0};
static void cb_btn_gpio_on10(Fl_Check_Button* o, void*) {
if (o->value()){
progdefaults.gpio_on |= (1<<16);
} else {
progdefaults.gpio_on &= ~(1<<16);
}
wf->xmtrcv->value(0);
progdefaults.changed = true;
}
Fl_Counter *cnt_gpio_pulse_width=(Fl_Counter *)0;
static void cb_cnt_gpio_pulse_width(Fl_Counter* o, void*) {
progdefaults.gpio_pulse_width=(int)o->value();
progdefaults.changed=true;
}
Fl_Group *grpRigHamlib=(Fl_Group *)0;
Fl_Check_Button *chkUSEHAMLIB=(Fl_Check_Button *)0;
static void cb_chkUSEHAMLIB(Fl_Check_Button* o, void*) {
progdefaults.chkUSEHAMLIBis = o->value();
if (o->value() == 1) {
chkUSERIGCAT->value(0);
btn_fldigi_client_to_flrig->value(0);
progdefaults.chkUSERIGCATis = false;
progdefaults.fldigi_client_to_flrig = false;
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->activate();
btnInitHAMLIB->redraw();
} else {
progdefaults.initInterface();
}
progdefaults.changed = true;
}
Fl_Group *grpHamlib=(Fl_Group *)0;
Fl_ListBox *cboHamlibRig=(Fl_ListBox *)0;
static void cb_cboHamlibRig(Fl_ListBox*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
#if USE_HAMLIB
hamlib_get_defaults();
#endif
}
Fl_ComboBox *inpRIGdev=(Fl_ComboBox *)0;
static void cb_inpRIGdev(Fl_ComboBox*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Value_Input2 *cntHamlibRetries=(Fl_Value_Input2 *)0;
static void cb_cntHamlibRetries(Fl_Value_Input2*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Value_Input2 *cntHamlibTimeout=(Fl_Value_Input2 *)0;
static void cb_cntHamlibTimeout(Fl_Value_Input2*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Value_Input2 *cntHamlibWriteDelay=(Fl_Value_Input2 *)0;
static void cb_cntHamlibWriteDelay(Fl_Value_Input2*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Value_Input2 *cntHamlibWait=(Fl_Value_Input2 *)0;
static void cb_cntHamlibWait(Fl_Value_Input2*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_ListBox *listbox_baudrate=(Fl_ListBox *)0;
static void cb_listbox_baudrate(Fl_ListBox*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Counter2 *valHamRigStopbits=(Fl_Counter2 *)0;
static void cb_valHamRigStopbits(Fl_Counter2* o, void*) {
progdefaults.HamRigStopbits = (int)o->value();
progdefaults.changed = true;
}
Fl_Counter2 *valHamRigPollrate=(Fl_Counter2 *)0;
static void cb_valHamRigPollrate(Fl_Counter2* o, void*) {
progdefaults.HamRigPollrate = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnHamlibCMDptt=(Fl_Check_Button *)0;
static void cb_btnHamlibCMDptt(Fl_Check_Button* o, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
if (o->value()) {
progdefaults.HamlibCMDptt = true;
progdefaults.TTYptt =
progdefaults.UsePPortPTT =
progdefaults.UseUHrouterPTT =
progdefaults.RigCatRTSptt =
progdefaults.RigCatDTRptt =
progdefaults.RigCatCMDptt = false;
} else
progdefaults.HamlibCMDptt = false;
progdefaults.changed = true;
}
Fl_Check_Button *btnHamlibPTT_ON_DATA=(Fl_Check_Button *)0;
static void cb_btnHamlibPTT_ON_DATA(Fl_Check_Button* o, void*) {
progdefaults.hamlib_ptt_on_data = o->value();
}
Fl_Check_Button *btnHamlibDTRplus=(Fl_Check_Button *)0;
static void cb_btnHamlibDTRplus(Fl_Check_Button*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Check_Button *chkHamlibRTSplus=(Fl_Check_Button *)0;
static void cb_chkHamlibRTSplus(Fl_Check_Button* o, void*) {
if (o->value() == 1)
chkHamlibRTSCTSflow->value(0);
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Check_Button *chkHamlibRTSCTSflow=(Fl_Check_Button *)0;
static void cb_chkHamlibRTSCTSflow(Fl_Check_Button* o, void*) {
if (o->value() == 1) {
chkHamlibXONXOFFflow->value(0);
chkHamlibRTSplus->deactivate();
} else
chkHamlibRTSplus->activate();
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Check_Button *chkHamlibXONXOFFflow=(Fl_Check_Button *)0;
static void cb_chkHamlibXONXOFFflow(Fl_Check_Button* o, void*) {
if (o->value() == 1)
chkHamlibRTSCTSflow->value(0);
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Check_Button *chk_hamlib_cw_is_lsb=(Fl_Check_Button *)0;
static void cb_chk_hamlib_cw_is_lsb(Fl_Check_Button* o, void*) {
progdefaults.hamlib_cw_islsb = o->value();
}
Fl_Check_Button *chk_hamlib_rtty_is_usb=(Fl_Check_Button *)0;
static void cb_chk_hamlib_rtty_is_usb(Fl_Check_Button* o, void*) {
progdefaults.hamlib_rtty_isusb = o->value();
}
Fl_Counter2 *val_hamlib_mode_delay=(Fl_Counter2 *)0;
static void cb_val_hamlib_mode_delay(Fl_Counter2* o, void*) {
progdefaults.hamlib_mode_delay = (int)o->value();
progdefaults.changed = true;
}
Fl_ListBox *listbox_sideband=(Fl_ListBox *)0;
Fl_Input2 *inpHamlibConfig=(Fl_Input2 *)0;
static void cb_inpHamlibConfig(Fl_Input2*, void*) {
btnInitHAMLIB->labelcolor(FL_RED);
btnInitHAMLIB->redraw_label();
}
Fl_Button *btnInitHAMLIB=(Fl_Button *)0;
static void cb_btnInitHAMLIB(Fl_Button* o, void*) {
progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
progdefaults.changed = true;
}
Fl_Button *btn_hamlib_get_defaults=(Fl_Button *)0;
static void cb_btn_hamlib_get_defaults(Fl_Button*, void*) {
#if USE_HAMLIB
hamlib_get_defaults();
#endif
}
Fl_Group *grpRigHardware=(Fl_Group *)0;
Fl_Check_Button *btnPTTrightchannel=(Fl_Check_Button *)0;
static void cb_btnPTTrightchannel(Fl_Check_Button* o, void*) {
progdefaults.PTTrightchannel = o->value();
btnPTTrightchannel2->value(o->value());
if (o->value()) {
progdefaults.QSK = false;
btnQSK->value(0);
progdefaults.PseudoFSK = false;
chkPseudoFSK->value(0);
progdefaults.sig_on_right_channel = false;
chkAudioStereoOut->value(0);
}
progdefaults.changed = true;
}
Fl_Round_Button *btnTTYptt=(Fl_Round_Button *)0;
static void cb_btnTTYptt(Fl_Round_Button* o, void*) {
btnUsePPortPTT->value(0);
btnUseUHrouterPTT->value(0);
btn_gpio_ptt->value(0);
if (o->value()) {
progdefaults.TTYptt = true;
progdefaults.UsePPortPTT =
progdefaults.UseUHrouterPTT =
progdefaults.RigCatRTSptt =
progdefaults.RigCatDTRptt =
progdefaults.RigCatCMDptt =
progdefaults.cmedia_ptt =
progdefaults.gpio_ptt =
progdefaults.HamlibCMDptt = false;
} else
progdefaults.TTYptt = false;
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;
}
Fl_ComboBox *inpTTYdev=(Fl_ComboBox *)0;
static void cb_inpTTYdev(Fl_ComboBox*, void*) {
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;
}
Fl_Round_Button *btnSCU_17=(Fl_Round_Button *)0;
static void cb_btnSCU_17(Fl_Round_Button* o, void*) {
progdefaults.SCU_17=o->value();
progdefaults.changed = true;
}
Fl_Round_Button *btnUsePPortPTT=(Fl_Round_Button *)0;
static void cb_btnUsePPortPTT(Fl_Round_Button* o, void*) {
btnTTYptt->value(0);
btnUseUHrouterPTT->value(0);
btn_gpio_ptt->value(0);
if (o->value()) {
progdefaults.UsePPortPTT = true;
progdefaults.TTYptt =
progdefaults.UseUHrouterPTT =
progdefaults.RigCatRTSptt =
progdefaults.RigCatDTRptt =
progdefaults.RigCatCMDptt =
progdefaults.cmedia_ptt =
progdefaults.gpio_ptt =
progdefaults.HamlibCMDptt = false;
} else
progdefaults.UsePPortPTT = false;
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;
}
Fl_Round_Button *btnUseUHrouterPTT=(Fl_Round_Button *)0;
static void cb_btnUseUHrouterPTT(Fl_Round_Button* o, void*) {
btnTTYptt->value(0);
btnUsePPortPTT->value(0);
btn_gpio_ptt->value(0);
if (o->value()) {
progdefaults.UseUHrouterPTT = true;
progdefaults.TTYptt =
progdefaults.UsePPortPTT =
progdefaults.RigCatRTSptt =
progdefaults.RigCatDTRptt =
progdefaults.RigCatCMDptt =
progdefaults.cmedia_ptt =
progdefaults.gpio_ptt =
progdefaults.HamlibCMDptt = false;
} else
progdefaults.UseUHrouterPTT = false;
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;
}
Fl_Round_Button *btnRTSptt=(Fl_Round_Button *)0;
static void cb_btnRTSptt(Fl_Round_Button*, void*) {
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;
}
Fl_Round_Button *btnRTSplusV=(Fl_Round_Button *)0;
static void cb_btnRTSplusV(Fl_Round_Button*, void*) {
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;
}
Fl_Round_Button *btnDTRptt=(Fl_Round_Button *)0;
static void cb_btnDTRptt(Fl_Round_Button*, void*) {
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;
}
Fl_Round_Button *btnDTRplusV=(Fl_Round_Button *)0;
static void cb_btnDTRplusV(Fl_Round_Button*, void*) {
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT->redraw();
progdefaults.changed = true;
}
Fl_Check_Button *btn_gpio_ptt=(Fl_Check_Button *)0;
static void cb_btn_gpio_ptt(Fl_Check_Button* o, void*) {
btnTTYptt->value(0);
btnUsePPortPTT->value(0);
btn_gpio_ptt2->value(o->value());
if (o->value()) {
progdefaults.gpio_ptt = true;
progdefaults.UseUHrouterPTT =
progdefaults.TTYptt =
progdefaults.UsePPortPTT =
progdefaults.RigCatRTSptt =
progdefaults.RigCatDTRptt =
progdefaults.RigCatCMDptt =
progdefaults.cmedia_ptt =
progdefaults.HamlibCMDptt = false;
} else
progdefaults.gpio_ptt = false;
btnInitHWPTT->labelcolor(FL_RED);
btnInitHWPTT2->labelcolor(FL_RED);
btnInitHWPTT->redraw();
btnInitHWPTT2->redraw();
progdefaults.changed = true;
}
Fl_Button *btnInitHWPTT=(Fl_Button *)0;
static void cb_btnInitHWPTT(Fl_Button* o, void*) {
progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
o->redraw();
btnInitHWPTT2->labelcolor(FL_FOREGROUND_COLOR);
btnInitHWPTT2->redraw();
progdefaults.changed = true;
}
Fl_Group *grpPTTdelays=(Fl_Group *)0;
Fl_Counter *cntPTT_on_delay=(Fl_Counter *)0;
static void cb_cntPTT_on_delay(Fl_Counter* o, void*) {
progdefaults.PTT_on_delay = o->value();
progdefaults.changed = true;
}
Fl_Counter *cntPTT_off_delay=(Fl_Counter *)0;
static void cb_cntPTT_off_delay(Fl_Counter* o, void*) {
progdefaults.PTT_off_delay = o->value();
progdefaults.changed = true;
}
Fl_Group *grp_cmedia_ptt=(Fl_Group *)0;
Fl_Round_Button *btn_use_cmedia_PTT=(Fl_Round_Button *)0;
static void cb_btn_use_cmedia_PTT(Fl_Round_Button* o, void*) {
if (o->value()) {
progdefaults.cmedia_ptt = true;
progdefaults.UsePPortPTT =
progdefaults.UseUHrouterPTT =
progdefaults.RigCatRTSptt =
progdefaults.RigCatDTRptt =
progdefaults.RigCatCMDptt =
progdefaults.HamlibCMDptt = false;
btn_init_cmedia_PTT->labelcolor(FL_RED);
btn_init_cmedia_PTT->redraw();
} else {
progdefaults.cmedia_ptt = false;
close_cmedia();
}
progdefaults.changed = true;
}
Fl_ComboBox *inp_cmedia_dev=(Fl_ComboBox *)0;
static void cb_inp_cmedia_dev(Fl_ComboBox* o, void*) {
close_cmedia();
progdefaults.cmedia_device = o->value();
btn_init_cmedia_PTT->labelcolor(FL_RED);
btn_init_cmedia_PTT->redraw();
progdefaults.changed = true;
}
Fl_ComboBox *inp_cmedia_GPIO_line=(Fl_ComboBox *)0;
static void cb_inp_cmedia_GPIO_line(Fl_ComboBox* o, void*) {
progdefaults.cmedia_gpio_line = o->value();
}
Fl_Button *btn_init_cmedia_PTT=(Fl_Button *)0;
static void cb_btn_init_cmedia_PTT(Fl_Button* o, void*) {
progdefaults.initInterface();
o->labelcolor(FL_FOREGROUND_COLOR);
progdefaults.changed = true;
}
Fl_Button *btn_test_cmedia=(Fl_Button *)0;
static void cb_btn_test_cmedia(Fl_Button*, void*) {
test_hid_ptt();
}
Fl_File_Input *inp_wav_fname_regex=(Fl_File_Input *)0;
Fl_Button *btn_select_regex_wav=(Fl_Button *)0;
static void cb_btn_select_regex_wav(Fl_Button*, void*) {
Fl_Native_File_Chooser fnfc;
fnfc.title("Pick a file");
fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE);
fnfc.filter("wav files\t*.{mp3,wav}\n");
fnfc.directory("./"); // default directory to use
// Show native chooser
switch ( fnfc.show() ) {
case -1: break; // ERROR
case 1: break; // CANCEL
default: {
progdefaults.BWSR_REGEX_MATCH = fnfc.filename();
inp_wav_fname_regex->value(progdefaults.BWSR_REGEX_MATCH.c_str());
progdefaults.REGEX_ALERT_MENU = 0;
mnu_regex_alert_menu->value(progdefaults.REGEX_ALERT_MENU);
break; // FILE CHOSEN
}
};
}
Fl_Choice *mnu_regex_alert_menu=(Fl_Choice *)0;
static void cb_mnu_regex_alert_menu(Fl_Choice* o, void*) {
if (o->value() > 0) {
switch (o->value()) {
case 1 : progdefaults.BWSR_REGEX_MATCH = "bark"; break;
case 2 : progdefaults.BWSR_REGEX_MATCH = "checkout"; break;
case 3 : progdefaults.BWSR_REGEX_MATCH = "diesel"; break;
case 4 : progdefaults.BWSR_REGEX_MATCH = "steam_train"; break;
case 5 : progdefaults.BWSR_REGEX_MATCH = "doesnot"; break;
case 6 : progdefaults.BWSR_REGEX_MATCH = "beeboo"; break;
case 7 : progdefaults.BWSR_REGEX_MATCH = "phone"; break;
case 8 : progdefaults.BWSR_REGEX_MATCH = "dinner_bell"; break;
case 9 : progdefaults.BWSR_REGEX_MATCH = "rtty_bell"; break;
case 10 : progdefaults.BWSR_REGEX_MATCH = "standard_tone"; break;
}
inp_wav_fname_regex->value(progdefaults.BWSR_REGEX_MATCH.c_str());
}
progdefaults.REGEX_ALERT_MENU = o->value();
}
Fl_Check_Button *btn_enable_regex_match_wa=(Fl_Check_Button *)0;
static void cb_btn_enable_regex_match_wa(Fl_Check_Button* o, void*) {
progdefaults.ENABLE_BWSR_REGEX_MATCH=o->value();
}
Fl_Button *btn_test_regex_wav=(Fl_Button *)0;
static void cb_btn_test_regex_wav(Fl_Button*, void*) {
audio_alert->alert(progdefaults.BWSR_REGEX_MATCH.c_str());
}
Fl_File_Input *inp_wav_fname_mycall=(Fl_File_Input *)0;
Fl_Button *btn_select_mycall_wav=(Fl_Button *)0;
static void cb_btn_select_mycall_wav(Fl_Button*, void*) {
Fl_Native_File_Chooser fnfc;
fnfc.title("Pick a file");
fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE);
fnfc.filter("wav files\t*.{mp3,wav}\n");
fnfc.directory("./"); // default directory to use
// Show native chooser
switch ( fnfc.show() ) {
case -1: break; // ERROR
case 1: break; // CANCEL
default: {
progdefaults.BWSR_MYCALL_MATCH = fnfc.filename();
inp_wav_fname_mycall->value(progdefaults.BWSR_MYCALL_MATCH.c_str());
progdefaults.MYCALL_ALERT_MENU = 0;
mnu_mycall_alert_menu->value(progdefaults.MYCALL_ALERT_MENU);
break; // FILE CHOSEN
}
};
}
Fl_Choice *mnu_mycall_alert_menu=(Fl_Choice *)0;
static void cb_mnu_mycall_alert_menu(Fl_Choice* o, void*) {
if (o->value() > 0) {
switch (o->value()) {
case 1 : progdefaults.BWSR_MYCALL_MATCH = "bark"; break;
case 2 : progdefaults.BWSR_MYCALL_MATCH = "checkout"; break;
case 3 : progdefaults.BWSR_MYCALL_MATCH = "diesel"; break;
case 4 : progdefaults.BWSR_MYCALL_MATCH = "steam_train"; break;
case 5 : progdefaults.BWSR_MYCALL_MATCH = "doesnot"; break;
case 6 : progdefaults.BWSR_MYCALL_MATCH = "beeboo"; break;
case 7 : progdefaults.BWSR_MYCALL_MATCH = "phone"; break;
case 8 : progdefaults.BWSR_MYCALL_MATCH = "dinner_bell"; break;
case 9 : progdefaults.BWSR_MYCALL_MATCH = "rtty_bell"; break;
case 10 : progdefaults.BWSR_MYCALL_MATCH = "standard_tone"; break;
}
inp_wav_fname_mycall->value(progdefaults.BWSR_MYCALL_MATCH.c_str());
}
progdefaults.MYCALL_ALERT_MENU = o->value();
}
Fl_Check_Button *btn_enable_mycall_match_wav=(Fl_Check_Button *)0;
static void cb_btn_enable_mycall_match_wav(Fl_Check_Button* o, void*) {
progdefaults.ENABLE_BWSR_MYCALL_MATCH=o->value();
}
Fl_Button *btn_test_mycall_wav=(Fl_Button *)0;
static void cb_btn_test_mycall_wav(Fl_Button*, void*) {
audio_alert->alert(progdefaults.BWSR_MYCALL_MATCH.c_str());
}
Fl_File_Input *inp_wav_fname_rsid=(Fl_File_Input *)0;
Fl_Button *btn_select_rsid_wav=(Fl_Button *)0;
static void cb_btn_select_rsid_wav(Fl_Button*, void*) {
Fl_Native_File_Chooser fnfc;
fnfc.title("Pick a file");
fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE);
fnfc.filter("wav files\t*.{mp3,wav}\n");
fnfc.directory("./"); // default directory to use
// Show native chooser
switch ( fnfc.show() ) {
case -1: break; // ERROR
case 1: break; // CANCEL
default: {
progdefaults.RSID_MATCH = fnfc.filename();
inp_wav_fname_rsid->value(progdefaults.RSID_MATCH.c_str());
progdefaults.RSID_ALERT_MENU = 0;
mnu_rsid_alert_menu->value(progdefaults.RSID_ALERT_MENU);
break; // FILE CHOSEN
}
};
}
Fl_Choice *mnu_rsid_alert_menu=(Fl_Choice *)0;
static void cb_mnu_rsid_alert_menu(Fl_Choice* o, void*) {
if (o->value() > 0) {
switch (o->value()) {
case 1 : progdefaults.RSID_MATCH = "bark"; break;
case 2 : progdefaults.RSID_MATCH = "checkout"; break;
case 3 : progdefaults.RSID_MATCH = "diesel"; break;
case 4 : progdefaults.RSID_MATCH = "steam_train"; break;
case 5 : progdefaults.RSID_MATCH = "doesnot"; break;
case 6 : progdefaults.RSID_MATCH = "beeboo"; break;
case 7 : progdefaults.RSID_MATCH = "phone"; break;
case 8 : progdefaults.RSID_MATCH = "dinner_bell"; break;
case 9 : progdefaults.RSID_MATCH = "rtty_bell"; break;
case 10 : progdefaults.RSID_MATCH = "standard_tone"; break;
}
inp_wav_fname_rsid->value(progdefaults.RSID_MATCH.c_str());
}
progdefaults.RSID_ALERT_MENU = o->value();
}
Fl_Check_Button *btn_enable_rsid_match_wav=(Fl_Check_Button *)0;
static void cb_btn_enable_rsid_match_wav(Fl_Check_Button* o, void*) {
progdefaults.ENABLE_RSID_MATCH=o->value();
}
Fl_Button *btn_test_rsid_wav=(Fl_Button *)0;
static void cb_btn_test_rsid_wav(Fl_Button*, void*) {
audio_alert->alert(progdefaults.RSID_MATCH.c_str());
}
Fl_File_Input *inp_wav_flmsg_rcvd=(Fl_File_Input *)0;
Fl_Button *btn_select_rx_extract_msg=(Fl_Button *)0;
static void cb_btn_select_rx_extract_msg(Fl_Button*, void*) {
Fl_Native_File_Chooser fnfc;
fnfc.title("Pick a file");
fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE);
fnfc.filter("wav files\t*.{mp3,wav}\n");
fnfc.directory("./"); // default directory to use
// Show native chooser
switch ( fnfc.show() ) {
case -1: break; // ERROR
case 1: break; // CANCEL
default: {
progdefaults.RX_EXTRACT_MSG_RCVD = fnfc.filename();
inp_wav_flmsg_rcvd->value(progdefaults.RX_EXTRACT_MSG_RCVD.c_str());
progdefaults.RX_EXTRACT_ALERT_MENU = 0;
mnu_rx_extract_alert_menu->value(progdefaults.RX_EXTRACT_ALERT_MENU);
break; // FILE CHOSEN
}
};
}
Fl_Choice *mnu_rx_extract_alert_menu=(Fl_Choice *)0;
static void cb_mnu_rx_extract_alert_menu(Fl_Choice* o, void*) {
if (o->value() > 0) {
switch (o->value()) {
case 1 : progdefaults.RX_EXTRACT_MSG_RCVD = "bark"; break;
case 2 : progdefaults.RX_EXTRACT_MSG_RCVD = "checkout"; break;
case 3 : progdefaults.RX_EXTRACT_MSG_RCVD = "diesel"; break;
case 4 : progdefaults.RX_EXTRACT_MSG_RCVD = "steam_train"; break;
case 5 : progdefaults.RX_EXTRACT_MSG_RCVD = "doesnot"; break;
case 6 : progdefaults.RX_EXTRACT_MSG_RCVD = "beeboo"; break;
case 7 : progdefaults.RX_EXTRACT_MSG_RCVD = "phone"; break;
case 8 : progdefaults.RX_EXTRACT_MSG_RCVD = "dinner_bell"; break;
case 9 : progdefaults.RX_EXTRACT_MSG_RCVD = "rtty_bell"; break;
case 10 : progdefaults.RX_EXTRACT_MSG_RCVD = "standard_tone"; break;
}
inp_wav_flmsg_rcvd->value(progdefaults.RX_EXTRACT_MSG_RCVD.c_str());
}
progdefaults.RX_EXTRACT_ALERT_MENU = o->value();
}
Fl_Check_Button *btn_enable_flmsg_wav=(Fl_Check_Button *)0;
static void cb_btn_enable_flmsg_wav(Fl_Check_Button* o, void*) {
progdefaults.ENABLE_RX_EXTRACT_MSG_RCVD=o->value();
}
Fl_Button *btn_test_flmsg_extract_wav=(Fl_Button *)0;
static void cb_btn_test_flmsg_extract_wav(Fl_Button*, void*) {
audio_alert->alert(progdefaults.RX_EXTRACT_MSG_RCVD.c_str());
}
Fl_File_Input *inp_wav_flmsg_timed_out=(Fl_File_Input *)0;
Fl_Button *btn_select_rx_extract_timed_out=(Fl_Button *)0;
static void cb_btn_select_rx_extract_timed_out(Fl_Button*, void*) {
Fl_Native_File_Chooser fnfc;
fnfc.title("Pick a file");
fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE);
fnfc.filter("wav files\t*.{mp3,wav}\n");
fnfc.directory("./"); // default directory to use
// Show native chooser
switch ( fnfc.show() ) {
case -1: break; // ERROR
case 1: break; // CANCEL
default: {
progdefaults.RX_EXTRACT_TIMED_OUT = fnfc.filename();
inp_wav_flmsg_timed_out->value(progdefaults.RX_EXTRACT_TIMED_OUT.c_str());
progdefaults.TIMED_OUT_ALERT_MENU = 0;
mnu_rx_timed_out_alert_menu->value(progdefaults.TIMED_OUT_ALERT_MENU);
break; // FILE CHOSEN
}
};
}
Fl_Choice *mnu_rx_timed_out_alert_menu=(Fl_Choice *)0;
static void cb_mnu_rx_timed_out_alert_menu(Fl_Choice* o, void*) {
if (o->value() > 0) {
switch (o->value()) {
case 1 : progdefaults.RX_EXTRACT_TIMED_OUT = "bark"; break;
case 2 : progdefaults.RX_EXTRACT_TIMED_OUT = "checkout"; break;
case 3 : progdefaults.RX_EXTRACT_TIMED_OUT = "diesel"; break;
case 4 : progdefaults.RX_EXTRACT_TIMED_OUT = "steam_train"; break;
case 5 : progdefaults.RX_EXTRACT_TIMED_OUT = "doesnot"; break;
case 6 : progdefaults.RX_EXTRACT_TIMED_OUT = "beeboo"; break;
case 7 : progdefaults.RX_EXTRACT_TIMED_OUT = "phone"; break;
case 8 : progdefaults.RX_EXTRACT_TIMED_OUT = "dinner_bell"; break;
case 9 : progdefaults.RX_EXTRACT_TIMED_OUT = "rtty_bell"; break;
case 10 : progdefaults.RX_EXTRACT_TIMED_OUT = "standard_tone"; break;
}
inp_wav_flmsg_timed_out->value(progdefaults.RX_EXTRACT_TIMED_OUT.c_str());
}
progdefaults.TIMED_OUT_ALERT_MENU = o->value();
}
Fl_Button *btn_test_rx_extract_timed_out=(Fl_Button *)0;
static void cb_btn_test_rx_extract_timed_out(Fl_Button*, void*) {
audio_alert->alert(progdefaults.RX_EXTRACT_TIMED_OUT.c_str());
}
Fl_Check_Button *btn_enable_flmsg_time_out_wav=(Fl_Check_Button *)0;
static void cb_btn_enable_flmsg_time_out_wav(Fl_Check_Button* o, void*) {
progdefaults.ENABLE_RX_EXTRACT_TIMED_OUT=o->value();
}
Fl_Value_Slider2 *sldrAlertVolume=(Fl_Value_Slider2 *)0;
static void cb_sldrAlertVolume(Fl_Value_Slider2* o, void*) {
progdefaults.alert_volume = (int)o->value();
progdefaults.changed = true;
}
Fl_Group *grpSoundDevices=(Fl_Group *)0;
Fl_Group *AudioOSS=(Fl_Group *)0;
static void cb_btnAudioIO(Fl_Round_Button*, void*) {
sound_update(SND_IDX_OSS);
progdefaults.changed = true;
resetSoundCard();
}
Fl_Input_Choice *menuOSSDev=(Fl_Input_Choice *)0;
static void cb_menuOSSDev(Fl_Input_Choice* o, void*) {
scDevice[0] = scDevice[1] = progdefaults.OSSdevice = o->value();
resetSoundCard();
progdefaults.changed = true;
}
Fl_Group *AudioPort=(Fl_Group *)0;
static void cb_btnAudioIO1(Fl_Round_Button*, void*) {
sound_update(SND_IDX_PORT);
progdefaults.changed = true;
resetSoundCard();
}
Fl_Choice *menuPortInDev=(Fl_Choice *)0;
static void cb_menuPortInDev(Fl_Choice* o, void*) {
scDevice[0] = progdefaults.PortInDevice = o->text();
progdefaults.PortInIndex = reinterpret_cast<intptr_t>(o->mvalue()->user_data());
resetSoundCard();
progdefaults.changed = true;
}
Fl_Choice *menuPortOutDev=(Fl_Choice *)0;
static void cb_menuPortOutDev(Fl_Choice* o, void*) {
scDevice[1] = progdefaults.PortOutDevice = o->text();
progdefaults.PortOutIndex = reinterpret_cast<intptr_t>(o->mvalue()->user_data());
resetSoundCard();
progdefaults.changed = true;
}
Fl_Group *AudioPulse=(Fl_Group *)0;
static void cb_btnAudioIO2(Fl_Round_Button*, void*) {
sound_update(SND_IDX_PULSE);
progdefaults.changed = true;
resetSoundCard();
}
Fl_Input2 *inpPulseServer=(Fl_Input2 *)0;
static void cb_inpPulseServer(Fl_Input2* o, void*) {
scDevice[0] = scDevice[1] = progdefaults.PulseServer = o->value();
resetSoundCard();
progdefaults.changed = true;
}
Fl_Group *AudioNull=(Fl_Group *)0;
Fl_Round_Button *btnAudioIO[4]={(Fl_Round_Button *)0};
static void cb_btnAudioIO3(Fl_Round_Button*, void*) {
sound_update(SND_IDX_NULL);
progdefaults.changed = true;
resetSoundCard();
}
Fl_Group *AudioDuplex=(Fl_Group *)0;
Fl_Round_Button *btn_is_full_duplex=(Fl_Round_Button *)0;
static void cb_btn_is_full_duplex(Fl_Round_Button* o, void*) {
progdefaults.is_full_duplex = o->value();
progdefaults.changed = true;
resetSoundCard();
}
Fl_Group *AudioAlerts=(Fl_Group *)0;
Fl_Choice *menuAlertsDev=(Fl_Choice *)0;
static void cb_menuAlertsDev(Fl_Choice* o, void*) {
progdefaults.AlertDevice = o->text();
progdefaults.AlertIndex = reinterpret_cast<intptr_t>(o->mvalue()->user_data());
progdefaults.changed = true;
}
Fl_Round_Button *btn_enable_audio_alerts=(Fl_Round_Button *)0;
static void cb_btn_enable_audio_alerts(Fl_Round_Button* o, void*) {
progdefaults.enable_audio_alerts = o->value();
progdefaults.changed = true;
reset_audio_alerts();
}
Fl_Check_Button *chkAudioStereoOut=(Fl_Check_Button *)0;
static void cb_chkAudioStereoOut(Fl_Check_Button* o, void*) {
progdefaults.sig_on_right_channel = o->value();
progdefaults.changed = true;
if (o->value()) {
progdefaults.QSK = false;
btnQSK->value(0);
btnQSK2->value(0);
progdefaults.PseudoFSK = false;
chkPseudoFSK->value(0);
chkPseudoFSK2->value(0);
progdefaults.PTTrightchannel = false;
btnPTTrightchannel->value(0);
btnPTTrightchannel2->value(0);
};
}
Fl_Check_Button *chkReverseAudio=(Fl_Check_Button *)0;
static void cb_chkReverseAudio(Fl_Check_Button* o, void*) {
progdefaults.ReverseAudio = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnPTTrightchannel2=(Fl_Check_Button *)0;
static void cb_btnPTTrightchannel2(Fl_Check_Button* o, void*) {
progdefaults.PTTrightchannel = o->value();
btnPTTrightchannel->value(o->value());
progdefaults.changed = true;
if (o->value()) {
progdefaults.QSK = false;
btnQSK->value(0);
btnQSK2->value(0);
progdefaults.PseudoFSK = false;
chkPseudoFSK->value(0);
chkPseudoFSK2->value(0);
progdefaults.sig_on_right_channel = false;
chkAudioStereoOut->value(0);
};
}
Fl_Check_Button *btnQSK2=(Fl_Check_Button *)0;
static void cb_btnQSK2(Fl_Check_Button* o, void*) {
progdefaults.QSK = o->value();
btnQSK->value(o->value());
progdefaults.changed = true;
if (o->value()) {
progdefaults.sig_on_right_channel = false;
chkAudioStereoOut->value(0);
progdefaults.PTTrightchannel = false;
btnPTTrightchannel->value(0);
btnPTTrightchannel2->value(0);
};
}
Fl_Check_Button *chkPseudoFSK2=(Fl_Check_Button *)0;
static void cb_chkPseudoFSK2(Fl_Check_Button* o, void*) {
progdefaults.PseudoFSK = o->value();
chkPseudoFSK->value(o->value());
progdefaults.changed = true;
if (o->value()) {
progdefaults.sig_on_right_channel = false;
chkAudioStereoOut->value(0);
progdefaults.PTTrightchannel = false;
btnPTTrightchannel->value(0);
btnPTTrightchannel2->value(0);
};
}
Fl_Check_Button *chkReverseRxAudio=(Fl_Check_Button *)0;
static void cb_chkReverseRxAudio(Fl_Check_Button* o, void*) {
progdefaults.ReverseRxAudio = o->value();
progdefaults.changed = true;
}
Fl_Group *grpAudioSampleRate=(Fl_Group *)0;
Fl_ListBox *menuInSampleRate=(Fl_ListBox *)0;
static void cb_menuInSampleRate(Fl_ListBox* o, void*) {
progdefaults.in_sample_rate = o->index() > 1 ? strtol(o->value(), 0, 10) : o->index();
resetSoundCard();
progdefaults.changed = true;
}
Fl_ListBox *menuOutSampleRate=(Fl_ListBox *)0;
static void cb_menuOutSampleRate(Fl_ListBox* o, void*) {
progdefaults.out_sample_rate = o->index() > 1 ? strtol(o->value(), 0, 10) : o->index();
resetSoundCard();
progdefaults.changed = true;
}
Fl_ListBox *menuSampleConverter=(Fl_ListBox *)0;
static void cb_menuSampleConverter(Fl_ListBox* o, void*) {
if ((o->index()) == FLDIGI_SRC_BEST)
fl_alert2("The best quality SINC interpolator has very high CPU overhead");
progdefaults.sample_converter = sample_rate_converters[o->index()];
resetSoundCard();
progdefaults.changed = true;
o->tooltip(src_get_description(progdefaults.sample_converter));
}
Fl_Spinner2 *cntRxRateCorr=(Fl_Spinner2 *)0;
static void cb_cntRxRateCorr(Fl_Spinner2* o, void*) {
progdefaults.RX_corr = (int)o->value();
cnt_fmt_rx_ppm->value(progdefaults.RX_corr);
progdefaults.changed = true;
}
Fl_Spinner2 *cntTxRateCorr=(Fl_Spinner2 *)0;
static void cb_cntTxRateCorr(Fl_Spinner2* o, void*) {
progdefaults.TX_corr = (int)o->value();
progdefaults.changed = true;
}
Fl_Spinner2 *cntTxOffset=(Fl_Spinner2 *)0;
static void cb_cntTxOffset(Fl_Spinner2* o, void*) {
progdefaults.TxOffset = (int)o->value();
progdefaults.changed = true;
}
Fl_Button *bnt_dec_rit=(Fl_Button *)0;
static void cb_bnt_dec_rit(Fl_Button* o, void*) {
progdefaults.RIT -= 0.1;
cntRIT->value(progdefaults.RIT);
progdefaults.FMT_freq_corr=o->value();
cnt_fmt_freq_corr->value(progdefaults.FMT_freq_corr);
progdefaults.changed = true;
}
Fl_Counter *cntRIT=(Fl_Counter *)0;
static void cb_cntRIT(Fl_Counter* o, void*) {
progdefaults.RIT=o->value();
progdefaults.FMT_freq_corr=o->value();
cnt_fmt_freq_corr->value(progdefaults.FMT_freq_corr);
}
Fl_Button *btn_incr_rit=(Fl_Button *)0;
static void cb_btn_incr_rit(Fl_Button* o, void*) {
progdefaults.RIT += 0.1;
cntRIT->value(progdefaults.RIT);
progdefaults.FMT_freq_corr=o->value();
cnt_fmt_freq_corr->value(progdefaults.FMT_freq_corr);
progdefaults.changed = true;
}
Fl_Box *lowcolor2=(Fl_Box *)0;
Fl_Button *btnLowSignal2=(Fl_Button *)0;
static void cb_btnLowSignal2(Fl_Button*, void*) {
progdefaults.LowSignal = fl_show_colormap(progdefaults.LowSignal);
lowcolor->color(progdefaults.LowSignal);
lowcolor->redraw();
lowcolor2->color(progdefaults.LowSignal);
lowcolor2->redraw();
progdefaults.changed = true;
}
Fl_Box *normalcolor2=(Fl_Box *)0;
Fl_Counter *cnt_normal_signal_level2=(Fl_Counter *)0;
static void cb_cnt_normal_signal_level2(Fl_Counter* o, void*) {
progdefaults.normal_signal_level = o->value();
if (progdefaults.normal_signal_level > progdefaults.high_signal_level)
progdefaults.high_signal_level = progdefaults.normal_signal_level + 0.1;
if (progdefaults.high_signal_level > progdefaults.over_signal_level)
progdefaults.over_signal_level = progdefaults.high_signal_level + 0.1;
if (progdefaults.over_signal_level > 0)
progdefaults.over_signal_level = 0;
cnt_normal_signal_level->value(progdefaults.normal_signal_level);
cnt_high_signal_level->value(progdefaults.high_signal_level);
cnt_over_signal_level->value(progdefaults.over_signal_level);
cnt_normal_signal_level2->value(progdefaults.normal_signal_level);
cnt_high_signal_level2->value(progdefaults.high_signal_level);
cnt_over_signal_level2->value(progdefaults.over_signal_level);
}
Fl_Button *btnNormalSignal2=(Fl_Button *)0;
static void cb_btnNormalSignal2(Fl_Button*, void*) {
progdefaults.NormSignal = fl_show_colormap(progdefaults.NormSignal);
normalcolor->color(progdefaults.NormSignal);
normalcolor->redraw();
normalcolor2->color(progdefaults.NormSignal);
normalcolor2->redraw();
progdefaults.changed = true;
}
Fl_Box *highcolor2=(Fl_Box *)0;
Fl_Counter *cnt_high_signal_level2=(Fl_Counter *)0;
static void cb_cnt_high_signal_level2(Fl_Counter* o, void*) {
progdefaults.high_signal_level = o->value();
if (progdefaults.normal_signal_level > progdefaults.high_signal_level)
progdefaults.high_signal_level = progdefaults.normal_signal_level + 0.1;
if (progdefaults.high_signal_level > progdefaults.over_signal_level)
progdefaults.over_signal_level = progdefaults.high_signal_level + 0.1;
if (progdefaults.over_signal_level > 0)
progdefaults.over_signal_level = 0;
cnt_normal_signal_level->value(progdefaults.normal_signal_level);
cnt_high_signal_level->value(progdefaults.high_signal_level);
cnt_over_signal_level->value(progdefaults.over_signal_level);
cnt_normal_signal_level2->value(progdefaults.normal_signal_level);
cnt_high_signal_level2->value(progdefaults.high_signal_level);
cnt_over_signal_level2->value(progdefaults.over_signal_level);
}
Fl_Button *btnHighSignal2=(Fl_Button *)0;
static void cb_btnHighSignal2(Fl_Button*, void*) {
progdefaults.HighSignal = fl_show_colormap(progdefaults.HighSignal);
highcolor->color(progdefaults.HighSignal);
highcolor->redraw();
highcolor2->color(progdefaults.HighSignal);
highcolor2->redraw();
progdefaults.changed = true;
}
Fl_Box *overcolor2=(Fl_Box *)0;
Fl_Counter *cnt_over_signal_level2=(Fl_Counter *)0;
static void cb_cnt_over_signal_level2(Fl_Counter* o, void*) {
progdefaults.over_signal_level = o->value();
if (progdefaults.normal_signal_level > progdefaults.high_signal_level)
progdefaults.high_signal_level = progdefaults.normal_signal_level + 0.1;
if (progdefaults.high_signal_level > progdefaults.over_signal_level)
progdefaults.over_signal_level = progdefaults.high_signal_level + 0.1;
if (progdefaults.over_signal_level > 0)
progdefaults.over_signal_level = 0;
cnt_normal_signal_level->value(progdefaults.normal_signal_level);
cnt_high_signal_level->value(progdefaults.high_signal_level);
cnt_over_signal_level->value(progdefaults.over_signal_level);
cnt_normal_signal_level2->value(progdefaults.normal_signal_level);
cnt_high_signal_level2->value(progdefaults.high_signal_level);
cnt_over_signal_level2->value(progdefaults.over_signal_level);
}
Fl_Button *btnOverSignal2=(Fl_Button *)0;
static void cb_btnOverSignal2(Fl_Button*, void*) {
progdefaults.OverSignal = fl_show_colormap(progdefaults.OverSignal);
overcolor->color(progdefaults.OverSignal);
overcolor->redraw();
overcolor2->color(progdefaults.OverSignal);
overcolor2->redraw();
progdefaults.changed = true;
}
vumeter *sig_vumeter2=(vumeter *)0;
Fl_Button *btn_default_signal_levels2=(Fl_Button *)0;
static void cb_btn_default_signal_levels2(Fl_Button*, void*) {
cnt_normal_signal_level->value(
progdefaults.normal_signal_level = -60.0);
cnt_high_signal_level->value(
progdefaults.high_signal_level = -6.0);
cnt_over_signal_level->value(
progdefaults.over_signal_level = -3.0);
cnt_normal_signal_level2->value(progdefaults.normal_signal_level);
cnt_high_signal_level2->value(progdefaults.high_signal_level);
cnt_over_signal_level2->value(progdefaults.over_signal_level);
}
Fl_ListBox *listbox_wav_samplerate=(Fl_ListBox *)0;
static void cb_listbox_wav_samplerate(Fl_ListBox* o, void*) {
progdefaults.wavSampleRate = o->index();
progdefaults.changed = true;
}
Fl_Check_Button *btn_record_both=(Fl_Check_Button *)0;
static void cb_btn_record_both(Fl_Check_Button* o, void*) {
progdefaults.record_both_channels=o->value();
progdefaults.changed=true;
}
Fl_Spinner2 *cntChannels=(Fl_Spinner2 *)0;
static void cb_cntChannels(Fl_Spinner2* o, void*) {
progdefaults.VIEWERchannels = (int)(o->value());
initViewer();
}
Fl_Spinner2 *cntTimeout=(Fl_Spinner2 *)0;
static void cb_cntTimeout(Fl_Spinner2* o, void*) {
progdefaults.VIEWERtimeout = (int)(o->value());
progdefaults.changed = true;
}
Fl_ListBox *listboxViewerLabel=(Fl_ListBox *)0;
static void cb_listboxViewerLabel(Fl_ListBox* o, void*) {
progdefaults.VIEWERlabeltype = o->index();
initViewer();
progdefaults.changed = true;
}
Fl_Button *btnViewerFont=(Fl_Button *)0;
static void cb_btnViewerFont(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.ViewerFontnbr);
font_browser->fontSize(progdefaults.ViewerFontsize);
font_browser->fontColor(FL_FOREGROUND_COLOR);
font_browser->fontFilter(Font_Browser::FIXED_WIDTH);
font_browser->callback(cbViewerFontBrowser);
font_browser->show();
}
Fl_Check_Button *btnFixedIntervals=(Fl_Check_Button *)0;
static void cb_btnFixedIntervals(Fl_Check_Button* o, void*) {
progdefaults.VIEWERfixed = o->value();
progdefaults.changed = true;
initViewer();
}
Fl_Check_Button *btnMarquee=(Fl_Check_Button *)0;
static void cb_btnMarquee(Fl_Check_Button* o, void*) {
progdefaults.VIEWERmarquee = o->value();
progdefaults.changed = true;
initViewer();
}
Fl_Check_Button *btnAscend=(Fl_Check_Button *)0;
static void cb_btnAscend(Fl_Check_Button* o, void*) {
progdefaults.VIEWERascend = o->value();
progdefaults.changed = true;
initViewer();
}
Fl_Check_Button *btnBrowserHistory=(Fl_Check_Button *)0;
static void cb_btnBrowserHistory(Fl_Check_Button* o, void*) {
progdefaults.VIEWERhistory = o->value();
progdefaults.changed = true;
}
Fl_Button *bwsrHiLite_1_color=(Fl_Button *)0;
static void cb_bwsrHiLite_1_color(Fl_Button*, void*) {
progdefaults.bwsrHiLight1 = fl_show_colormap((Fl_Color)progdefaults.bwsrHiLight1);
bwsrHiLite_1_color->color((Fl_Color)progdefaults.bwsrHiLight1);
viewer_redraw();
progdefaults.changed = true;
}
Fl_Button *bwsrHiLite_2_color=(Fl_Button *)0;
static void cb_bwsrHiLite_2_color(Fl_Button*, void*) {
progdefaults.bwsrHiLight2 = fl_show_colormap((Fl_Color)progdefaults.bwsrHiLight2);
bwsrHiLite_2_color->color((Fl_Color)progdefaults.bwsrHiLight2);
viewer_redraw();
progdefaults.changed = true;
}
Fl_Button *bwsrHiLite_even_lines=(Fl_Button *)0;
static void cb_bwsrHiLite_even_lines(Fl_Button*, void*) {
progdefaults.bwsrBackgnd2 = fl_show_colormap((Fl_Color)progdefaults.bwsrBackgnd2);
bwsrHiLite_even_lines->color((Fl_Color)progdefaults.bwsrBackgnd2);
viewer_redraw();
progdefaults.changed = true;;
}
Fl_Button *bwsrHiLite_odd_lines=(Fl_Button *)0;
static void cb_bwsrHiLite_odd_lines(Fl_Button*, void*) {
progdefaults.bwsrBackgnd1 = fl_show_colormap((Fl_Color)progdefaults.bwsrBackgnd1);
bwsrHiLite_odd_lines->color((Fl_Color)progdefaults.bwsrBackgnd1);
viewer_redraw();
progdefaults.changed = true;
}
Fl_Button *bwsrHiLite_select=(Fl_Button *)0;
static void cb_bwsrHiLite_select(Fl_Button*, void*) {
progdefaults.bwsrSelect = fl_show_colormap((Fl_Color)progdefaults.bwsrSelect);
bwsrHiLite_select->color((Fl_Color)progdefaults.bwsrSelect);
viewer_redraw();
progdefaults.changed = true;
}
Fl_Button *bwsrSliderColor=(Fl_Button *)0;
static void cb_bwsrSliderColor(Fl_Button* o, void*) {
uchar r, g, b;
r = progdefaults.bwsrSliderColor.R;
g = progdefaults.bwsrSliderColor.G;
b = progdefaults.bwsrSliderColor.B;
if (fl_color_chooser("Slider Color", r, g, b) == 0)
return;
progdefaults.bwsrSliderColor.R = r;
progdefaults.bwsrSliderColor.G = g;
progdefaults.bwsrSliderColor.B = b;
o->color(fl_rgb_color(r,g,b));
o->redraw();
sldrViewerSquelch->color(fl_rgb_color(r,g,b));
sldrViewerSquelch->redraw();
mvsquelch->color(fl_rgb_color(r,g,b));
mvsquelch->redraw();
progdefaults.changed = true;
}
Fl_Button *bwsrSldrSelColor=(Fl_Button *)0;
static void cb_bwsrSldrSelColor(Fl_Button* o, void*) {
uchar r, g, b;
r = progdefaults.bwsrSldrSelColor.R;
g = progdefaults.bwsrSldrSelColor.G;
b = progdefaults.bwsrSldrSelColor.B;
if (fl_color_chooser("Button Color", r, g, b) == 0)
return;
progdefaults.bwsrSldrSelColor.R = r;
progdefaults.bwsrSldrSelColor.G = g;
progdefaults.bwsrSldrSelColor.B = b;
o->color(fl_rgb_color(r,g,b));
o->redraw();
sldrViewerSquelch->selection_color(fl_rgb_color(r,g,b));
sldrViewerSquelch->redraw();
mvsquelch->selection_color(fl_rgb_color(r,g,b));
mvsquelch->redraw();
progdefaults.changed = true;
}
Fl_Check_Button *btnShowTooltips=(Fl_Check_Button *)0;
static void cb_btnShowTooltips(Fl_Check_Button* o, void*) {
progdefaults.tooltips = o->value();
Fl_Tooltip::enable(progdefaults.tooltips);
progdefaults.changed = true;
}
Fl_Check_Button *chkMenuIcons=(Fl_Check_Button *)0;
static void cb_chkMenuIcons(Fl_Check_Button* o, void*) {
progdefaults.menuicons = o->value();
icons::toggle_icon_labels();
progdefaults.changed = true;
}
Fl_ListBox *listboxScheme=(Fl_ListBox *)0;
static void cb_listboxScheme(Fl_ListBox* o, void*) {
progdefaults.ui_scheme = o->value();
Fl::scheme(progdefaults.ui_scheme.c_str());
progdefaults.changed = true;
}
Fl_Button *bVisibleModes=(Fl_Button *)0;
static void cb_bVisibleModes(Fl_Button* o, void*) {
mode_browser->label(o->label());
mode_browser->callback(toggle_visible_modes);
mode_browser->show_(&progdefaults.visible_modes);
progdefaults.changed = true;
}
Fl_ListBox *listbox_language=(Fl_ListBox *)0;
static void cb_listbox_language(Fl_ListBox* o, void*) {
progdefaults.ui_language = o->index();
progdefaults.changed = true;
}
Fl_Check_Button *btn_rx_lowercase=(Fl_Check_Button *)0;
static void cb_btn_rx_lowercase(Fl_Check_Button* o, void*) {
progdefaults.rx_lowercase = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_tx_lowercase=(Fl_Check_Button *)0;
static void cb_btn_tx_lowercase(Fl_Check_Button* o, void*) {
progdefaults.tx_lowercase = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_save_config_on_exit=(Fl_Check_Button *)0;
static void cb_btn_save_config_on_exit(Fl_Check_Button* o, void*) {
progdefaults.SaveConfig = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn2_save_macros_on_exit=(Fl_Check_Button *)0;
static void cb_btn2_save_macros_on_exit(Fl_Check_Button* o, void*) {
btn_save_macros_on_exit->value(o->value());
progdefaults.SaveMacros = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn2NagMe=(Fl_Check_Button *)0;
static void cb_btn2NagMe(Fl_Check_Button* o, void*) {
btnNagMe->value(o->value());
progdefaults.NagMe=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn2_confirm_exit=(Fl_Check_Button *)0;
static void cb_btn2_confirm_exit(Fl_Check_Button* o, void*) {
btn2_confirm_exit->value(o->value());
progdefaults.confirmExit=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_check_for_updates=(Fl_Check_Button *)0;
static void cb_btn_check_for_updates(Fl_Check_Button* o, void*) {
progdefaults.check_for_updates = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_tx_show_timer=(Fl_Check_Button *)0;
static void cb_btn_tx_show_timer(Fl_Check_Button* o, void*) {
progdefaults.show_tx_timer = o->value();
progdefaults.changed = true;
}
Fl_Spinner *val_tx_timeout=(Fl_Spinner *)0;
static void cb_val_tx_timeout(Fl_Spinner* o, void*) {
progdefaults.tx_timeout=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnMacroMouseWheel=(Fl_Check_Button *)0;
static void cb_btnMacroMouseWheel(Fl_Check_Button* o, void*) {
progdefaults.macro_wheel = o->value();
progdefaults.changed = true;
}
Fl_Counter *cnt_macro_height=(Fl_Counter *)0;
static void cb_cnt_macro_height(Fl_Counter* o, void*) {
progdefaults.macro_height = (int)o->value();
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_0=(Fl_Round_Button *)0;
static void cb_btn_scheme_0(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 0;
set_macroLabels();
UI_select();
progdefaults.changed = true;
}
Fl_Round_Button *btn_scheme_1=(Fl_Round_Button *)0;
static void cb_btn_scheme_1(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 1;
set_macroLabels();
UI_select();
progdefaults.changed = true;
}
Fl_Round_Button *btn_scheme_2=(Fl_Round_Button *)0;
static void cb_btn_scheme_2(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 2;
set_macroLabels();
UI_select();
progdefaults.changed = true;
}
Fl_Round_Button *btn_scheme_3=(Fl_Round_Button *)0;
static void cb_btn_scheme_3(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 3;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_4=(Fl_Round_Button *)0;
static void cb_btn_scheme_4(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 4;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_5=(Fl_Round_Button *)0;
static void cb_btn_scheme_5(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 5;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_6=(Fl_Round_Button *)0;
static void cb_btn_scheme_6(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 6;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_7=(Fl_Round_Button *)0;
static void cb_btn_scheme_7(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 7;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_8=(Fl_Round_Button *)0;
static void cb_btn_scheme_8(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 8;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_9=(Fl_Round_Button *)0;
static void cb_btn_scheme_9(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 9;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_10=(Fl_Round_Button *)0;
static void cb_btn_scheme_10(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 10;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_11=(Fl_Round_Button *)0;
static void cb_btn_scheme_11(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 11;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Round_Button *btn_scheme_12=(Fl_Round_Button *)0;
static void cb_btn_scheme_12(Fl_Round_Button*, void*) {
progdefaults.mbar_scheme = 12;
progdefaults.changed = true;
set_macroLabels();
UI_select();
}
Fl_Check_Button *btnUseLastMacro=(Fl_Check_Button *)0;
static void cb_btnUseLastMacro(Fl_Check_Button* o, void*) {
progdefaults.UseLastMacro = o->value();
update_main_title();
progdefaults.changed = true;
}
Fl_Check_Button *btnDisplayMacroFilename=(Fl_Check_Button *)0;
static void cb_btnDisplayMacroFilename(Fl_Check_Button* o, void*) {
progdefaults.DisplayMacroFilename = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_save_macros_on_exit=(Fl_Check_Button *)0;
static void cb_btn_save_macros_on_exit(Fl_Check_Button* o, void*) {
btn2_save_macros_on_exit->value(o->value());
progdefaults.SaveMacros = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_macro_post=(Fl_Check_Button *)0;
static void cb_btn_macro_post(Fl_Check_Button* o, void*) {
progdefaults.macro_post = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_4bar_position=(Fl_Check_Button *)0;
static void cb_btn_4bar_position(Fl_Check_Button* o, void*) {
progdefaults.four_bar_position = o->value();
UI_select();
progdefaults.changed = true;
}
Fl_Check_Button *btnRXClicks=(Fl_Check_Button *)0;
static void cb_btnRXClicks(Fl_Check_Button* o, void*) {
progdefaults.rxtext_clicks_qso_data = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnRXTooltips=(Fl_Check_Button *)0;
static void cb_btnRXTooltips(Fl_Check_Button* o, void*) {
progdefaults.rxtext_tooltips = o->value();
progdefaults.changed = true;
}
Fl_Input2 *inpNonword=(Fl_Input2 *)0;
static void cb_inpNonword(Fl_Input2* o, void*) {
progdefaults.nonwordchars = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnUSunits=(Fl_Check_Button *)0;
static void cb_btnUSunits(Fl_Check_Button* o, void*) {
progdefaults.us_units = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_clear_fields=(Fl_Check_Button *)0;
static void cb_btn_clear_fields(Fl_Check_Button* o, void*) {
progdefaults.clear_fields=o->value();
progdefaults.changed = true;
}
Fl_Choice *sel_lsd=(Fl_Choice *)0;
static void cb_sel_lsd(Fl_Choice* o, void*) {
progdefaults.sel_lsd = o->value();
set_freq_control_lsd();
progdefaults.changed = true;
}
Fl_Check_Button *btn_rxtx_swap=(Fl_Check_Button *)0;
static void cb_btn_rxtx_swap(Fl_Check_Button* o, void*) {
progdefaults.rxtx_swap = o->value();
progdefaults.changed = true;
UI_select();
}
Fl_Check_Button *btnWF_UIrev=(Fl_Check_Button *)0;
static void cb_btnWF_UIrev(Fl_Check_Button* o, void*) {
progdefaults.WF_UIrev = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIx1=(Fl_Check_Button *)0;
static void cb_btnWF_UIx1(Fl_Check_Button* o, void*) {
progdefaults.WF_UIx1 = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIwfcarrier=(Fl_Check_Button *)0;
static void cb_btnWF_UIwfcarrier(Fl_Check_Button* o, void*) {
progdefaults.WF_UIwfcarrier = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIwfshift=(Fl_Check_Button *)0;
static void cb_btnWF_UIwfshift(Fl_Check_Button* o, void*) {
progdefaults.WF_UIwfshift = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIwfreflevel=(Fl_Check_Button *)0;
static void cb_btnWF_UIwfreflevel(Fl_Check_Button* o, void*) {
progdefaults.WF_UIwfreflevel = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIwfdrop=(Fl_Check_Button *)0;
static void cb_btnWF_UIwfdrop(Fl_Check_Button* o, void*) {
progdefaults.WF_UIwfdrop = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIwfampspan=(Fl_Check_Button *)0;
static void cb_btnWF_UIwfampspan(Fl_Check_Button* o, void*) {
progdefaults.WF_UIwfampspan = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIwfstore=(Fl_Check_Button *)0;
static void cb_btnWF_UIwfstore(Fl_Check_Button* o, void*) {
progdefaults.WF_UIwfstore = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIwfmode=(Fl_Check_Button *)0;
static void cb_btnWF_UIwfmode(Fl_Check_Button* o, void*) {
progdefaults.WF_UIwfmode = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIqsy=(Fl_Check_Button *)0;
static void cb_btnWF_UIqsy(Fl_Check_Button* o, void*) {
progdefaults.WF_UIqsy = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Check_Button *btnWF_UIxmtlock=(Fl_Check_Button *)0;
static void cb_btnWF_UIxmtlock(Fl_Check_Button* o, void*) {
progdefaults.WF_UIxmtlock = o->value();
progdefaults.changed = true;
WF_UI();
}
Fl_Button *btn_wf_enable_all=(Fl_Button *)0;
static void cb_btn_wf_enable_all(Fl_Button*, void*) {
btnWF_UIrev->value(progdefaults.WF_UIrev = 1);
btnWF_UIwfcarrier->value(progdefaults.WF_UIwfcarrier = 1);
btnWF_UIwfreflevel->value(progdefaults.WF_UIwfreflevel = 1);
btnWF_UIwfampspan->value(progdefaults.WF_UIwfampspan = 1);
btnWF_UIwfmode->value(progdefaults.WF_UIwfmode = 1);
btnWF_UIx1->value(progdefaults.WF_UIx1 = 1);
btnWF_UIwfshift->value(progdefaults.WF_UIwfshift = 1);
btnWF_UIwfdrop->value(progdefaults.WF_UIwfdrop = 1);
btnWF_UIwfstore->value(progdefaults.WF_UIwfstore = 1);
btnWF_UIqsy->value(progdefaults.WF_UIqsy = 1);
btnWF_UIxmtlock->value(progdefaults.WF_UIxmtlock = 1);
progdefaults.changed = true;
WF_UI();
}
Fl_Button *btn_wf_disable_all=(Fl_Button *)0;
static void cb_btn_wf_disable_all(Fl_Button*, void*) {
btnWF_UIrev->value(progdefaults.WF_UIrev = 0);
btnWF_UIwfcarrier->value(progdefaults.WF_UIwfcarrier = 0);
btnWF_UIwfreflevel->value(progdefaults.WF_UIwfreflevel = 0);
btnWF_UIwfampspan->value(progdefaults.WF_UIwfampspan = 0);
btnWF_UIwfmode->value(progdefaults.WF_UIwfmode = 0);
btnWF_UIx1->value(progdefaults.WF_UIx1 = 0);
btnWF_UIwfshift->value(progdefaults.WF_UIwfshift = 0);
btnWF_UIwfdrop->value(progdefaults.WF_UIwfdrop = 0);
btnWF_UIwfstore->value(progdefaults.WF_UIwfstore = 0);
btnWF_UIqsy->value(progdefaults.WF_UIqsy = 0);
btnWF_UIxmtlock->value(progdefaults.WF_UIxmtlock = 0);
progdefaults.changed = true;
WF_UI();
}
colorbox *WF_Palette=(colorbox *)0;
static void cb_WF_Palette(colorbox*, void*) {
progdefaults.changed = true;
}
static void cb_btnColor(Fl_Button*, void*) {
selectColor(0);
progdefaults.changed = true;
}
static void cb_btnColor1(Fl_Button*, void*) {
selectColor(1);
progdefaults.changed = true;
}
static void cb_btnColor2(Fl_Button*, void*) {
selectColor(2);
progdefaults.changed = true;
}
static void cb_btnColor3(Fl_Button*, void*) {
selectColor(3);
progdefaults.changed = true;
}
static void cb_btnColor4(Fl_Button*, void*) {
selectColor(4);
progdefaults.changed = true;
}
static void cb_btnColor5(Fl_Button*, void*) {
selectColor(5);
progdefaults.changed = true;
}
static void cb_btnColor6(Fl_Button*, void*) {
selectColor(6);
progdefaults.changed = true;
}
static void cb_btnColor7(Fl_Button*, void*) {
selectColor(7);
progdefaults.changed = true;
}
Fl_Button *btnColor[9]={(Fl_Button *)0};
static void cb_btnColor8(Fl_Button*, void*) {
selectColor(8);
progdefaults.changed = true;
}
Fl_Button *btnLoadPalette=(Fl_Button *)0;
static void cb_btnLoadPalette(Fl_Button*, void*) {
loadPalette();
progdefaults.changed = true;
}
Fl_Button *btnSavePalette=(Fl_Button *)0;
static void cb_btnSavePalette(Fl_Button*, void*) {
savePalette();
}
Fl_Check_Button *btnUseCursorLines=(Fl_Check_Button *)0;
static void cb_btnUseCursorLines(Fl_Check_Button* o, void*) {
progdefaults.UseCursorLines = o->value();
if (o->value())
btnCursorBWcolor->activate();
else
btnCursorBWcolor->deactivate();
progdefaults.changed = true;
}
Fl_Button *btnCursorBWcolor=(Fl_Button *)0;
static void cb_btnCursorBWcolor(Fl_Button* o, void*) {
if (fl_color_chooser("Cursor BW Lines",
progdefaults.cursorLineRGBI.R,
progdefaults.cursorLineRGBI.G,
progdefaults.cursorLineRGBI.B) ) {
o->color(fl_rgb_color(progdefaults.cursorLineRGBI.R,progdefaults.cursorLineRGBI.G,progdefaults.cursorLineRGBI.B));
o->redraw();
progdefaults.changed = true;
};
}
Fl_Check_Button *btnUseWideCursor=(Fl_Check_Button *)0;
static void cb_btnUseWideCursor(Fl_Check_Button* o, void*) {
progdefaults.UseWideCursor = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnUseCursorCenterLine=(Fl_Check_Button *)0;
static void cb_btnUseCursorCenterLine(Fl_Check_Button* o, void*) {
progdefaults.UseCursorCenterLine = o->value();
progdefaults.changed = true;
}
Fl_Button *btnCursorCenterLineColor=(Fl_Button *)0;
static void cb_btnCursorCenterLineColor(Fl_Button* o, void*) {
if (fl_color_chooser("Cursor Center Line",
progdefaults.cursorCenterRGBI.R,
progdefaults.cursorCenterRGBI.G,
progdefaults.cursorCenterRGBI.B) ) {
o->color(fl_rgb_color(progdefaults.cursorCenterRGBI.R,progdefaults.cursorCenterRGBI.G,progdefaults.cursorCenterRGBI.B));
o->redraw();
progdefaults.changed = true;
};
}
Fl_Check_Button *btnUseWideCenter=(Fl_Check_Button *)0;
static void cb_btnUseWideCenter(Fl_Check_Button* o, void*) {
progdefaults.UseWideCenter = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnUseBWTracks=(Fl_Check_Button *)0;
static void cb_btnUseBWTracks(Fl_Check_Button* o, void*) {
progdefaults.UseBWTracks = o->value();
progdefaults.changed = true;
}
Fl_Button *btnBwTracksColor=(Fl_Button *)0;
static void cb_btnBwTracksColor(Fl_Button* o, void*) {
if (fl_color_chooser("Track Lines",
progdefaults.bwTrackRGBI.R,
progdefaults.bwTrackRGBI.G,
progdefaults.bwTrackRGBI.B) ) {
o->color(fl_rgb_color(progdefaults.bwTrackRGBI.R,progdefaults.bwTrackRGBI.G,progdefaults.bwTrackRGBI.B));
o->redraw();
wf->redraw_marker();
progdefaults.changed = true;
};
}
Fl_Check_Button *btnUseWideTracks=(Fl_Check_Button *)0;
static void cb_btnUseWideTracks(Fl_Check_Button* o, void*) {
progdefaults.UseWideTracks = o->value();
progdefaults.changed = true;
}
Fl_Button *btnNotchColor=(Fl_Button *)0;
static void cb_btnNotchColor(Fl_Button* o, void*) {
if (fl_color_chooser("Notch Indicator",
progdefaults.notchRGBI.R,
progdefaults.notchRGBI.G,
progdefaults.notchRGBI.B) ) {
o->color(fl_rgb_color(progdefaults.notchRGBI.R,progdefaults.notchRGBI.G,progdefaults.notchRGBI.B));
o->redraw();
wf->redraw_marker();
progdefaults.changed = true;
};
}
Fl_Check_Button *chkShowAudioScale=(Fl_Check_Button *)0;
static void cb_chkShowAudioScale(Fl_Check_Button* o, void*) {
progdefaults.wf_audioscale = o->value();
progdefaults.changed = true;
}
Fl_Button *btnWaterfallFont=(Fl_Button *)0;
static void cb_btnWaterfallFont(Fl_Button*, void*) {
font_browser->fontNumber(progdefaults.WaterfallFontnbr);
font_browser->fontSize(progdefaults.WaterfallFontsize);
font_browser->fontColor(FL_FOREGROUND_COLOR);
font_browser->fontFilter(Font_Browser::ALL_TYPES);
font_browser->callback((Fl_Callback*)cbWaterfallFontBrowser);
font_browser->show();
}
Fl_Check_Button *btnViewXmtSignal=(Fl_Check_Button *)0;
static void cb_btnViewXmtSignal(Fl_Check_Button* o, void*) {
progdefaults.viewXmtSignal=o->value();
progdefaults.changed = true;
}
Fl_Counter *valTxMonitorLevel=(Fl_Counter *)0;
static void cb_valTxMonitorLevel(Fl_Counter* o, void*) {
progdefaults.TxMonitorLevel = pow(10.0, o->value()/20);
progdefaults.changed = true;
}
Fl_Counter2 *cntLowFreqCutoff=(Fl_Counter2 *)0;
static void cb_cntLowFreqCutoff(Fl_Counter2* o, void*) {
progdefaults.LowFreqCutoff=(int)(o->value());
progdefaults.changed = true;
setwfrange();
}
Fl_Check_Button *btnWFaveraging=(Fl_Check_Button *)0;
static void cb_btnWFaveraging(Fl_Check_Button* o, void*) {
progdefaults.WFaveraging = o->value();
progdefaults.changed = true;
}
Fl_ListBox *listboxFFTPrefilter=(Fl_ListBox *)0;
static void cb_listboxFFTPrefilter(Fl_ListBox* o, void*) {
progdefaults.wfPreFilter = o->index();
progdefaults.changed = true;
}
Fl_Counter2 *cntrWfwidth=(Fl_Counter2 *)0;
static void cb_cntrWfwidth(Fl_Counter2* o, void*) {
progdefaults.HighFreqCutoff = (int)o->value();
progdefaults.changed = true;
setwfrange();
}
Fl_Counter2 *wf_latency=(Fl_Counter2 *)0;
static void cb_wf_latency(Fl_Counter2* o, void*) {
progdefaults.wf_latency = (int)o->value();
progdefaults.changed = true;
}
Fl_Counter *cntr_drop_speed=(Fl_Counter *)0;
static void cb_cntr_drop_speed(Fl_Counter* o, void*) {
progdefaults.drop_speed=(int)o->value();
progdefaults.changed=true;
}
Fl_Counter2 *cntrWfheight=(Fl_Counter2 *)0;
static void cb_cntrWfheight(Fl_Counter2* o, void*) {
progdefaults.wfheight = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnWaterfallHistoryDefault=(Fl_Check_Button *)0;
static void cb_btnWaterfallHistoryDefault(Fl_Check_Button* o, void*) {
progdefaults.WaterfallHistoryDefault = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnWaterfallQSY=(Fl_Check_Button *)0;
static void cb_btnWaterfallQSY(Fl_Check_Button* o, void*) {
progdefaults.WaterfallQSY = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnWaterfallClickInsert=(Fl_Check_Button *)0;
static void cb_btnWaterfallClickInsert(Fl_Check_Button* o, void*) {
progdefaults.WaterfallClickInsert = o->value();
if (progdefaults.WaterfallClickInsert)
inpWaterfallClickText->activate();
else
inpWaterfallClickText->deactivate();
progdefaults.changed = true;
}
Fl_Input2 *inpWaterfallClickText=(Fl_Input2 *)0;
static void cb_inpWaterfallClickText(Fl_Input2* o, void*) {
progdefaults.WaterfallClickText = o->value();
progdefaults.changed = true;
}
Fl_ListBox *listboxWaterfallWheelAction=(Fl_ListBox *)0;
static void cb_listboxWaterfallWheelAction(Fl_ListBox* o, void*) {
progdefaults.WaterfallWheelAction = o->index();
progdefaults.changed = true;
}
Fl_Check_Button *btnWFspectrum_center=(Fl_Check_Button *)0;
static void cb_btnWFspectrum_center(Fl_Check_Button* o, void*) {
progdefaults.wf_spectrum_center = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnWFspectrum_dbvals=(Fl_Check_Button *)0;
static void cb_btnWFspectrum_dbvals(Fl_Check_Button* o, void*) {
progdefaults.wf_spectrum_dbvals = o->value();
progdefaults.changed = true;
}
Fl_Counter *cntr_spectrum_freq_scale=(Fl_Counter *)0;
static void cb_cntr_spectrum_freq_scale(Fl_Counter* o, void*) {
progdefaults.wf_spectrum_scale_factor = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_spectrum_modem_scale=(Fl_Check_Button *)0;
static void cb_btn_spectrum_modem_scale(Fl_Check_Button* o, void*) {
progdefaults.wf_spectrum_modem_scale = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntServerCarrier=(Fl_Counter2 *)0;
static void cb_cntServerCarrier(Fl_Counter2* o, void*) {
progdefaults.ServerCarrier = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;
}
Fl_Counter2 *cntServerOffset=(Fl_Counter2 *)0;
static void cb_cntServerOffset(Fl_Counter2* o, void*) {
progdefaults.ServerOffset = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;
}
Fl_Counter2 *cntServerACQsn=(Fl_Counter2 *)0;
static void cb_cntServerACQsn(Fl_Counter2* o, void*) {
progdefaults.ServerACQsn = o->value();
progdefaults.changed = true;
}
Fl_Counter2 *cntServerAFCrange=(Fl_Counter2 *)0;
static void cb_cntServerAFCrange(Fl_Counter2* o, void*) {
progdefaults.ServerAFCrange = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;
}
Fl_Check_Button *btnPSKmailSweetSpot=(Fl_Check_Button *)0;
static void cb_btnPSKmailSweetSpot(Fl_Check_Button* o, void*) {
progdefaults.PSKmailSweetSpot = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_arq_s2n_report=(Fl_Check_Button *)0;
static void cb_btn_arq_s2n_report(Fl_Check_Button* o, void*) {
progdefaults.Pskmails2nreport=o->value();
}
Fl_Input *txt_wx_url=(Fl_Input *)0;
static void cb_txt_wx_url(Fl_Input* o, void*) {
progdefaults.wx_url = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_default_wx_url=(Fl_Button *)0;
static void cb_btn_default_wx_url(Fl_Button*, void*) {
txt_wx_url->value(
"https://tgftp.nws.noaa.gov/data/observations/metar/decoded");
progdefaults.wx_url=txt_wx_url->value();
progdefaults.changed=true;
}
Fl_Input *inpWXsta=(Fl_Input *)0;
static void cb_inpWXsta(Fl_Input* o, void*) {
progdefaults.wx_sta = o->value();
progdefaults.changed = true;
}
Fl_Button *btn_metar_search=(Fl_Button *)0;
static void cb_btn_metar_search(Fl_Button*, void*) {
get_METAR_station();
}
Fl_Check_Button *btn_wx_full=(Fl_Check_Button *)0;
static void cb_btn_wx_full(Fl_Check_Button* o, void*) {
progdefaults.wx_full=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_wx_station_name=(Fl_Check_Button *)0;
static void cb_btn_wx_station_name(Fl_Check_Button* o, void*) {
progdefaults.wx_station_name = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_wx_condx=(Fl_Check_Button *)0;
static void cb_btn_wx_condx(Fl_Check_Button* o, void*) {
progdefaults.wx_condx=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_wx_fahrenheit=(Fl_Check_Button *)0;
static void cb_btn_wx_fahrenheit(Fl_Check_Button* o, void*) {
progdefaults.wx_fahrenheit=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_wx_celsius=(Fl_Check_Button *)0;
static void cb_btn_wx_celsius(Fl_Check_Button* o, void*) {
progdefaults.wx_celsius=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_wx_mph=(Fl_Check_Button *)0;
static void cb_btn_wx_mph(Fl_Check_Button* o, void*) {
progdefaults.wx_mph=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_wx_kph=(Fl_Check_Button *)0;
static void cb_btn_wx_kph(Fl_Check_Button* o, void*) {
progdefaults.wx_kph=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_wx_inches=(Fl_Check_Button *)0;
static void cb_btn_wx_inches(Fl_Check_Button* o, void*) {
progdefaults.wx_inches=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_wx_mbars=(Fl_Check_Button *)0;
static void cb_btn_wx_mbars(Fl_Check_Button* o, void*) {
progdefaults.wx_mbars=o->value();
progdefaults.changed = true;
}
Fl_Button *btnSaveConfig=(Fl_Button *)0;
static void cb_btnSaveConfig(Fl_Button*, void*) {
progdefaults.saveDefaults();
}
Fl_Return_Button *btnCloseConfig=(Fl_Return_Button *)0;
static void cb_btnCloseConfig(Fl_Return_Button*, void*) {
closeDialog();
}
Fl_Button *btnResetConfig=(Fl_Button *)0;
static void cb_btnResetConfig(Fl_Button*, void*) {
if (fl_choice2("This will effect every configuration item!\nConfirm", "Yes", "No", NULL)) {
progdefaults.resetDefaults();
progdefaults.changed = false;
};
}
Fl_Double_Window* ConfigureDialog() {
Fl_Double_Window* w;
font_browser = new Font_Browser;
static const char szShifts[] = "23|85|160|170|182|200|240|350|425|850|Custom";
static const char szBauds[] = "45|45.45|50|56|75|100|110|150|200|300";
static const char szSelBits[] = "5 (baudot)|7 (ascii)|8 (ascii)";
static const char szParity[] = "none|even|odd|zero|one";
static const char szStopBits[] = "1|1.5|2";
static const char szOliviaTones[] = "2|4|8|16|32|64|128|256";
static const char szOliviaBandwidth[] = "125|250|500|1000|2000";
static const char szContestiaTones[] = "2|4|8|16|32|64|128|256";
static const char szContestiaBandwidth[] = "125|250|500|1000|2000";
static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600|115200|230400|460800";
static const char szProsigns[] = "~|%|&|+|=|{|}|<|>|[|]| ";
{ Fl_Double_Window* o = new Fl_Double_Window(800, 380, _("Fldigi configuration"));
w = o; if (w) {/* empty */}
o->color(FL_DARK2);
o->selection_color((Fl_Color)51);
o->labelsize(18);
o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
{ Fl_Group* o = new Fl_Group(0, 0, 201, 385);
{ Fl_Tree* o = tab_tree = new Fl_Tree(0, 0, 200, 350);
tab_tree->callback((Fl_Callback*)SelectItem_CB);
Fl_Group::current()->resizable(tab_tree);
o->root_label(_("Configure"));
o->selectmode(FL_TREE_SELECT_SINGLE);
o->connectorstyle(FL_TREE_CONNECTOR_DOTTED); // default is NONE on Mac
o->connectorwidth(15); // default is 17
} // Fl_Tree* tab_tree
{ Fl_Group* o = new Fl_Group(0, 350, 201, 35);
{ Fl_Group* o = new Fl_Group(0, 350, 100, 30);
o->end();
Fl_Group::current()->resizable(o);
} // Fl_Group* o
{ btn_collapse_tab_tree = new Fl_Button(95, 353, 105, 22, _("Collapse Tree"));
btn_collapse_tab_tree->callback((Fl_Callback*)cb_btn_collapse_tab_tree);
} // Fl_Button* btn_collapse_tab_tree
o->end();
} // Fl_Group* o
o->end();
Fl_Group::current()->resizable(o);
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Colors-Fonts/Buttons"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ btnSpotColor = new Fl_Button(334, 75, 85, 21, _("Spot"));
btnSpotColor->callback((Fl_Callback*)cb_btnSpotColor);
} // Fl_Button* btnSpotColor
{ btnRevColor = new Fl_Button(334, 111, 85, 21, _("Rev"));
btnRevColor->callback((Fl_Callback*)cb_btnRevColor);
} // Fl_Button* btnRevColor
{ btnTuneColor = new Fl_Button(334, 148, 85, 21, _("Tune"));
btnTuneColor->callback((Fl_Callback*)cb_btnTuneColor);
} // Fl_Button* btnTuneColor
{ btnRxIDColor = new Fl_Button(334, 183, 85, 21, _("RxID nar"));
btnRxIDColor->callback((Fl_Callback*)cb_btnRxIDColor);
} // Fl_Button* btnRxIDColor
{ btnLkColor = new Fl_Button(469, 75, 85, 21, _("Lk"));
btnLkColor->callback((Fl_Callback*)cb_btnLkColor);
} // Fl_Button* btnLkColor
{ btnSql1Color = new Fl_Button(470, 111, 85, 21, _("SQL-1"));
btnSql1Color->callback((Fl_Callback*)cb_btnSql1Color);
} // Fl_Button* btnSql1Color
{ btnXmtColor = new Fl_Button(469, 148, 85, 20, _("T/R"));
btnXmtColor->callback((Fl_Callback*)cb_btnXmtColor);
} // Fl_Button* btnXmtColor
{ btnRxIDwideColor = new Fl_Button(469, 183, 85, 21, _("RxID wide"));
btnRxIDwideColor->callback((Fl_Callback*)cb_btnRxIDwideColor);
} // Fl_Button* btnRxIDwideColor
{ btnAfcColor = new Fl_Button(605, 75, 85, 21, _("AFC"));
btnAfcColor->callback((Fl_Callback*)cb_btnAfcColor);
} // Fl_Button* btnAfcColor
{ btnSql2Color = new Fl_Button(605, 111, 85, 20, _("SQL-2"));
btnSql2Color->callback((Fl_Callback*)cb_btnSql2Color);
} // Fl_Button* btnSql2Color
{ btnTxIDColor = new Fl_Button(604, 183, 85, 20, _("TxID"));
btnTxIDColor->callback((Fl_Callback*)cb_btnTxIDColor);
} // Fl_Button* btnTxIDColor
{ Fl_Box* o = spotcolor = new Fl_Box(310, 76, 18, 19);
spotcolor->box(FL_THIN_DOWN_BOX);
spotcolor->color((Fl_Color)3);
o->color(progdefaults.SpotColor);
} // Fl_Box* spotcolor
{ Fl_Box* o = revcolor = new Fl_Box(310, 112, 18, 19);
revcolor->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.RevColor);
} // Fl_Box* revcolor
{ Fl_Box* o = tunecolor = new Fl_Box(310, 149, 18, 19);
tunecolor->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.TuneColor);
} // Fl_Box* tunecolor
{ Fl_Box* o = rxidcolor = new Fl_Box(310, 184, 18, 19);
rxidcolor->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.RxIDColor);
} // Fl_Box* rxidcolor
{ Fl_Box* o = lockcolor = new Fl_Box(445, 76, 18, 19);
lockcolor->box(FL_THIN_DOWN_BOX);
lockcolor->color((Fl_Color)3);
o->color(progdefaults.LkColor);
} // Fl_Box* lockcolor
{ Fl_Box* o = sql1color = new Fl_Box(445, 112, 18, 19);
sql1color->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.Sql1Color);
} // Fl_Box* sql1color
{ Fl_Box* o = rxidcolorwide = new Fl_Box(445, 184, 18, 19);
rxidcolorwide->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.RxIDwideColor);
} // Fl_Box* rxidcolorwide
{ Fl_Box* o = xmtcolor = new Fl_Box(445, 149, 18, 18);
xmtcolor->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.XmtColor);
} // Fl_Box* xmtcolor
{ Fl_Box* o = afccolor = new Fl_Box(580, 76, 18, 19);
afccolor->box(FL_THIN_DOWN_BOX);
afccolor->color((Fl_Color)3);
o->color(progdefaults.AfcColor);
} // Fl_Box* afccolor
{ Fl_Box* o = sql2color = new Fl_Box(580, 112, 18, 18);
sql2color->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.Sql2Color);
} // Fl_Box* sql2color
{ Fl_Box* o = txidcolor = new Fl_Box(580, 184, 18, 18);
txidcolor->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.TxIDColor);
} // Fl_Box* txidcolor
{ Fl_Box* o = new Fl_Box(390, 264, 220, 20, _("Lighted button enabled colors"));
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ btn_default_btn_color = new Fl_Button(469, 218, 85, 21, _("All Others"));
btn_default_btn_color->callback((Fl_Callback*)cb_btn_default_btn_color);
} // Fl_Button* btn_default_btn_color
{ Fl_Box* o = default_btn_color = new Fl_Box(445, 218, 18, 19);
default_btn_color->box(FL_THIN_DOWN_BOX);
o->color(progdefaults.default_btn_color);
} // Fl_Box* default_btn_color
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Colors-Fonts/Buttons"));
config_pages.push_back(p);
tab_tree->add(_("Colors-Fonts/Buttons"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Colors-Fonts/FreqDisp - Meters"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(304, 51, 395, 87);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Box* o = FDdisplay = new Fl_Box(384, 55, 235, 45, _("14070.150"));
FDdisplay->box(FL_DOWN_BOX);
FDdisplay->color((Fl_Color)55);
FDdisplay->labelfont(4);
FDdisplay->labelsize(40);
o->color(fl_rgb_color(progdefaults.FDbackground.R,progdefaults.FDbackground.G,progdefaults.FDbackground.B));
o->labelcolor(fl_rgb_color(progdefaults.FDforeground.R,progdefaults.FDforeground.G,progdefaults.FDforeground.B));
o->labelfont(progdefaults.FreqControlFontnbr);
} // Fl_Box* FDdisplay
{ btn_freq_control_font = new Fl_Button(311, 106, 90, 24, _("Font"));
btn_freq_control_font->callback((Fl_Callback*)cb_btn_freq_control_font);
} // Fl_Button* btn_freq_control_font
{ btnBackgroundColor = new Fl_Button(407, 106, 90, 24, _("Bg Color"));
btnBackgroundColor->callback((Fl_Callback*)cb_btnBackgroundColor);
} // Fl_Button* btnBackgroundColor
{ btnForegroundColor = new Fl_Button(503, 106, 90, 24, _("Digit Color"));
btnForegroundColor->callback((Fl_Callback*)cb_btnForegroundColor);
} // Fl_Button* btnForegroundColor
{ btnFD_SystemColor = new Fl_Button(599, 106, 90, 24, _("Sys Colors"));
btnFD_SystemColor->callback((Fl_Callback*)cb_btnFD_SystemColor);
} // Fl_Button* btnFD_SystemColor
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(304, 142, 395, 62, _("S-meter"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btnSmeter_bg_color = new Fl_Button(311, 169, 90, 24, _("Bg Color"));
btnSmeter_bg_color->callback((Fl_Callback*)cb_btnSmeter_bg_color);
} // Fl_Button* btnSmeter_bg_color
{ btnSmeter_scale_color = new Fl_Button(407, 169, 90, 24, _("Scale Color"));
btnSmeter_scale_color->callback((Fl_Callback*)cb_btnSmeter_scale_color);
} // Fl_Button* btnSmeter_scale_color
{ btnSmeter_meter_color = new Fl_Button(503, 169, 90, 24, _("Meter Color"));
btnSmeter_meter_color->callback((Fl_Callback*)cb_btnSmeter_meter_color);
} // Fl_Button* btnSmeter_meter_color
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(304, 211, 395, 67, _("PWR-meter"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btnPWR_bg_color = new Fl_Button(311, 238, 90, 24, _("Bg Color"));
btnPWR_bg_color->callback((Fl_Callback*)cb_btnPWR_bg_color);
} // Fl_Button* btnPWR_bg_color
{ btnPWR_scale_color = new Fl_Button(407, 238, 90, 24, _("Scale Color"));
btnPWR_scale_color->callback((Fl_Callback*)cb_btnPWR_scale_color);
} // Fl_Button* btnPWR_scale_color
{ btnPWR_meter_Color = new Fl_Button(503, 238, 90, 24, _("Meter Color"));
btnPWR_meter_Color->callback((Fl_Callback*)cb_btnPWR_meter_Color);
} // Fl_Button* btnPWR_meter_Color
{ Fl_ListBox* o = listboxPWRselect = new Fl_ListBox(599, 238, 80, 24, _("Power scale"));
listboxPWRselect->tooltip(_("Select the type of FFT prefilter"));
listboxPWRselect->box(FL_DOWN_BOX);
listboxPWRselect->color(FL_BACKGROUND2_COLOR);
listboxPWRselect->selection_color(FL_BACKGROUND_COLOR);
listboxPWRselect->labeltype(FL_NORMAL_LABEL);
listboxPWRselect->labelfont(0);
listboxPWRselect->labelsize(14);
listboxPWRselect->labelcolor(FL_FOREGROUND_COLOR);
listboxPWRselect->callback((Fl_Callback*)cb_listboxPWRselect);
listboxPWRselect->align(Fl_Align(FL_ALIGN_TOP));
listboxPWRselect->when(FL_WHEN_RELEASE);
o->add(_("25 W")); o->add("50 W");
o->add("100 W"); o->add("200 W"); o->add("AUTO");
o->index(progdefaults.PWRselect);o->labelsize(FL_NORMAL_SIZE);
listboxPWRselect->end();
} // Fl_ListBox* listboxPWRselect
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Colors-Fonts/FreqDisp - Meters"));
config_pages.push_back(p);
tab_tree->add(_("Colors-Fonts/FreqDisp - Meters"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Colors-Fonts/Function keys"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ btnUseGroupColors = new Fl_Check_Button(337, 92, 165, 21, _("Use colored buttons"));
btnUseGroupColors->down_box(FL_DOWN_BOX);
btnUseGroupColors->callback((Fl_Callback*)cb_btnUseGroupColors);
btnUseGroupColors->value(progdefaults.useGroupColors);
} // Fl_Check_Button* btnUseGroupColors
{ btnGroup1 = new Fl_Button(305, 140, 90, 30, _("Group 1"));
btnGroup1->tooltip(_("Background color for Function key group 1"));
btnGroup1->callback((Fl_Callback*)cb_btnGroup1);
btnGroup1->color(fl_rgb_color(progdefaults.btnGroup1.R, progdefaults.btnGroup1.G,progdefaults.btnGroup1.B));
btnGroup1->labelcolor(progdefaults.MacroBtnFontcolor);
} // Fl_Button* btnGroup1
{ btnGroup2 = new Fl_Button(407, 140, 90, 30, _("Group 2"));
btnGroup2->tooltip(_("Background color for Function key group 2"));
btnGroup2->callback((Fl_Callback*)cb_btnGroup2);
btnGroup2->color(fl_rgb_color(progdefaults.btnGroup2.R, progdefaults.btnGroup2.G,progdefaults.btnGroup2.B));
btnGroup2->labelcolor(progdefaults.MacroBtnFontcolor);
} // Fl_Button* btnGroup2
{ btnGroup3 = new Fl_Button(509, 140, 90, 30, _("Group 3"));
btnGroup3->tooltip(_("Background color for Function key group 3"));
btnGroup3->callback((Fl_Callback*)cb_btnGroup3);
btnGroup3->color(fl_rgb_color(progdefaults.btnGroup3.R, progdefaults.btnGroup3.G,progdefaults.btnGroup3.B));
btnGroup3->labelcolor(progdefaults.MacroBtnFontcolor);
} // Fl_Button* btnGroup3
{ btnFkeyDEfaults = new Fl_Button(612, 140, 90, 30, _("Defaults"));
btnFkeyDEfaults->callback((Fl_Callback*)cb_btnFkeyDEfaults);
} // Fl_Button* btnFkeyDEfaults
{ btnMacroBtnFont = new Fl_Button(509, 87, 90, 30, _("Font/Color"));
btnMacroBtnFont->callback((Fl_Callback*)cb_btnMacroBtnFont);
} // Fl_Button* btnMacroBtnFont
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Colors-Fonts/Function keys"));
config_pages.push_back(p);
tab_tree->add(_("Colors-Fonts/Function keys"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Colors-Fonts/Logging controls"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 33, 590, 65, _("Logging Panel Controls"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Output* o = LOGGINGdisplay = new Fl_Output(233, 57, 184, 25);
o->textfont(progdefaults.LOGGINGtextfont);o->textsize(progdefaults.LOGGINGtextsize);o->textcolor(progdefaults.LOGGINGtextcolor);
o->color(progdefaults.LOGGINGcolor);
o->value("W1HKJ");
o->redraw();
} // Fl_Output* LOGGINGdisplay
{ btnLOGGING_color = new Fl_Button(476, 57, 80, 25, _("Bg Color"));
btnLOGGING_color->callback((Fl_Callback*)cb_btnLOGGING_color);
} // Fl_Button* btnLOGGING_color
{ btn_LOGGING_font = new Fl_Button(566, 57, 55, 25, _("Font"));
btn_LOGGING_font->callback((Fl_Callback*)cb_btn_LOGGING_font);
} // Fl_Button* btn_LOGGING_font
{ btnLOGGINGdefault_colors_font = new Fl_Button(632, 57, 80, 25, _("Default"));
btnLOGGINGdefault_colors_font->callback((Fl_Callback*)cb_btnLOGGINGdefault_colors_font);
} // Fl_Button* btnLOGGINGdefault_colors_font
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 99, 590, 65, _("Logbook Dialog"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Output* o = LOGBOOKdisplay = new Fl_Output(233, 123, 184, 25);
o->textfont(progdefaults.LOGGINGtextfont);o->textsize(progdefaults.LOGGINGtextsize);o->textcolor(progdefaults.LOGBOOKtextcolor);
o->color(progdefaults.LOGBOOKcolor);
o->value("14.070000");
o->redraw();
} // Fl_Output* LOGBOOKdisplay
{ btnLOGBOOK_color = new Fl_Button(475, 123, 80, 25, _("Bg Color"));
btnLOGBOOK_color->callback((Fl_Callback*)cb_btnLOGBOOK_color);
} // Fl_Button* btnLOGBOOK_color
{ btn_LOGBOOK_font = new Fl_Button(565, 123, 55, 25, _("Font"));
btn_LOGBOOK_font->callback((Fl_Callback*)cb_btn_LOGBOOK_font);
} // Fl_Button* btn_LOGBOOK_font
{ btnLOGBOOKdefault_colors_font = new Fl_Button(631, 123, 80, 25, _("Default"));
btnLOGBOOKdefault_colors_font->callback((Fl_Callback*)cb_btnLOGBOOKdefault_colors_font);
} // Fl_Button* btnLOGBOOKdefault_colors_font
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 168, 590, 147, _("DX Cluster Dialog"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Output* o = DXC_display = new Fl_Output(233, 203, 184, 25, _("Report Browser"));
DXC_display->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->textfont(progdefaults.LOGGINGtextfont);o->textsize(progdefaults.LOGGINGtextsize);
o->value("DX de W1HKJ-1");
o->redraw();
} // Fl_Output* DXC_display
{ btn_DXC_font = new Fl_Button(422, 203, 86, 25, _("Font"));
btn_DXC_font->callback((Fl_Callback*)cb_btn_DXC_font);
} // Fl_Button* btn_DXC_font
{ btnDXCdefault_colors_font = new Fl_Button(514, 203, 86, 25, _("Default"));
btnDXCdefault_colors_font->callback((Fl_Callback*)cb_btnDXCdefault_colors_font);
} // Fl_Button* btnDXCdefault_colors_font
{ Fl_Button* o = btn_DXC_even_lines = new Fl_Button(422, 234, 86, 25, _("Even Lines"));
btn_DXC_even_lines->color((Fl_Color)55);
btn_DXC_even_lines->callback((Fl_Callback*)cb_btn_DXC_even_lines);
o->color(progdefaults.DXC_even_color);
} // Fl_Button* btn_DXC_even_lines
{ Fl_Button* o = btn_DXC_odd_lines = new Fl_Button(514, 234, 86, 25, _("Odd Lines"));
btn_DXC_odd_lines->color((Fl_Color)246);
btn_DXC_odd_lines->callback((Fl_Callback*)cb_btn_DXC_odd_lines);
o->color(progdefaults.DXC_odd_color);
} // Fl_Button* btn_DXC_odd_lines
{ Fl_Input* o = StreamText = new Fl_Input(233, 273, 184, 25, _("Stream Text"));
StreamText->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value("DX de W1HKJ...");
o->color(fl_rgb_color(progdefaults.DX_Color.R, progdefaults.DX_Color.G, progdefaults.DX_Color.B));
o->textfont(progdefaults.DXfontnbr); o->textsize(progdefaults.DXfontsize); o->textcolor(progdefaults.DXfontcolor);
} // Fl_Input* StreamText
{ btnDXcolor = new Fl_Button(422, 273, 86, 25, _("Bg color"));
btnDXcolor->callback((Fl_Callback*)cb_btnDXcolor);
} // Fl_Button* btnDXcolor
{ btnDXfont = new Fl_Button(514, 273, 86, 25, _("Font"));
btnDXfont->callback((Fl_Callback*)cb_btnDXfont);
} // Fl_Button* btnDXfont
{ Fl_Button* o = btnDXalt_color = new Fl_Button(606, 272, 86, 25, _("Alt Color"));
btnDXalt_color->tooltip(_("Color for outgoing telnet text"));
btnDXalt_color->callback((Fl_Callback*)cb_btnDXalt_color);
o->labelcolor(progdefaults.DXalt_color);
} // Fl_Button* btnDXalt_color
{ btnDXdefault_colors_font = new Fl_Button(700, 272, 86, 25, _("Default"));
btnDXdefault_colors_font->callback((Fl_Callback*)cb_btnDXdefault_colors_font);
} // Fl_Button* btnDXdefault_colors_font
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Colors-Fonts/Logging controls"));
config_pages.push_back(p);
tab_tree->add(_("Colors-Fonts/Logging controls"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Colors-Fonts/Rx-Tx"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_ListBox* o = listbox_charset_status = new Fl_ListBox(293, 40, 165, 24, _("Rx/Tx Character set"));
listbox_charset_status->tooltip(_("Select Rx/Tx Character Set"));
listbox_charset_status->box(FL_BORDER_BOX);
listbox_charset_status->color((Fl_Color)55);
listbox_charset_status->selection_color(FL_BACKGROUND_COLOR);
listbox_charset_status->labeltype(FL_NORMAL_LABEL);
listbox_charset_status->labelfont(0);
listbox_charset_status->labelsize(14);
listbox_charset_status->labelcolor(FL_FOREGROUND_COLOR);
listbox_charset_status->align(Fl_Align(FL_ALIGN_RIGHT));
listbox_charset_status->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
listbox_charset_status->callback(cb_listbox_charset, 0);
listbox_charset_status->end();
} // Fl_ListBox* listbox_charset_status
{ RxText = new Fl_Input(293, 71, 220, 36);
RxText->value("Receive Text");
RxText->color(fl_rgb_color(progdefaults.RxColor.R, progdefaults.RxColor.G, progdefaults.RxColor.B));
RxText->textfont(progdefaults.RxFontnbr); RxText->textsize(progdefaults.RxFontsize); RxText->textcolor(progdefaults.RxFontcolor);
RxText->type(FL_MULTILINE_INPUT_WRAP);
} // Fl_Input* RxText
{ btnRxColor = new Fl_Button(523, 78, 75, 21, _("Rx bkgnd"));
btnRxColor->callback((Fl_Callback*)cb_btnRxColor);
} // Fl_Button* btnRxColor
{ btnTxColor = new Fl_Button(523, 121, 75, 21, _("Tx bkgnd"));
btnTxColor->callback((Fl_Callback*)cb_btnTxColor);
} // Fl_Button* btnTxColor
{ TxText = new Fl_Input(293, 113, 220, 37);
TxText->value("Transmit Text");
TxText->color(fl_rgb_color(progdefaults.TxColor.R, progdefaults.TxColor.G, progdefaults.TxColor.B));
TxText->textfont(progdefaults.TxFontnbr); TxText->textsize(progdefaults.TxFontsize); TxText->textcolor(progdefaults.TxFontcolor);
TxText->type(FL_MULTILINE_INPUT_WRAP);
} // Fl_Input* TxText
{ btnRxFont = new Fl_Button(608, 78, 75, 21, _("Rx font"));
btnRxFont->callback((Fl_Callback*)cb_btnRxFont);
} // Fl_Button* btnRxFont
{ btnTxFont = new Fl_Button(608, 121, 75, 21, _("Tx font"));
btnTxFont->callback((Fl_Callback*)cb_btnTxFont);
} // Fl_Button* btnTxFont
{ MacroText = new Fl_Input(293, 156, 220, 37);
MacroText->value("Macro editor text");
MacroText->textfont(progdefaults.MacroEditFontnbr);
MacroText->textsize(progdefaults.MacroEditFontsize);
MacroText->type(FL_MULTILINE_INPUT_WRAP);
} // Fl_Input* MacroText
{ btnMacroEditFont = new Fl_Button(523, 164, 120, 21, _("Macro Edit Font"));
btnMacroEditFont->callback((Fl_Callback*)cb_btnMacroEditFont);
} // Fl_Button* btnMacroEditFont
{ Fl_Group* o = new Fl_Group(283, 203, 404, 81, _("Text Highlighting"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ btnXMIT = new Fl_Button(301, 231, 40, 21, _("XMIT"));
btnXMIT->tooltip(_("Sent chars in Rx/Tx pane"));
btnXMIT->callback((Fl_Callback*)cb_btnXMIT);
btnXMIT->align(Fl_Align(FL_ALIGN_BOTTOM));
btnXMIT->color(progdefaults.XMITcolor);
} // Fl_Button* btnXMIT
{ btnCTRL = new Fl_Button(344, 231, 40, 21, _("CTRL"));
btnCTRL->tooltip(_("Control chars in Rx/Tx pane"));
btnCTRL->callback((Fl_Callback*)cb_btnCTRL);
btnCTRL->align(Fl_Align(FL_ALIGN_BOTTOM));
btnCTRL->color(progdefaults.CTRLcolor);
} // Fl_Button* btnCTRL
{ btnSKIP = new Fl_Button(388, 231, 40, 21, _("SKIP"));
btnSKIP->tooltip(_("Skipped chars in Tx pane\n(Tx on/off in CW)"));
btnSKIP->callback((Fl_Callback*)cb_btnSKIP);
btnSKIP->align(Fl_Align(FL_ALIGN_BOTTOM));
btnSKIP->color(progdefaults.SKIPcolor);
} // Fl_Button* btnSKIP
{ btnALTR = new Fl_Button(431, 231, 40, 21, _("ALTR"));
btnALTR->tooltip(_("Alternate character color in Rx panelr"));
btnALTR->callback((Fl_Callback*)cb_btnALTR);
btnALTR->align(Fl_Align(FL_ALIGN_BOTTOM));
btnALTR->color(progdefaults.ALTRcolor);
} // Fl_Button* btnALTR
{ btnSEL = new Fl_Button(475, 231, 39, 21, _("SEL"));
btnSEL->tooltip(_("Selection background color in Rx Tx panels"));
btnSEL->callback((Fl_Callback*)cb_btnSEL);
btnSEL->align(Fl_Align(FL_ALIGN_BOTTOM));
btnSEL->color(progdefaults.RxTxSelectcolor);
} // Fl_Button* btnSEL
{ btnNoTextColor = new Fl_Button(522, 231, 70, 21, _("System"));
btnNoTextColor->callback((Fl_Callback*)cb_btnNoTextColor);
} // Fl_Button* btnNoTextColor
{ btnTextDefaults = new Fl_Button(596, 231, 70, 21, _("Defaults"));
btnTextDefaults->callback((Fl_Callback*)cb_btnTextDefaults);
} // Fl_Button* btnTextDefaults
o->end();
} // Fl_Group* o
{ Fl_Check_Button* o = btn_show_all_codes = new Fl_Check_Button(307, 295, 25, 25, _("display Rx control chars as ascii string"));
btn_show_all_codes->down_box(FL_DOWN_BOX);
btn_show_all_codes->callback((Fl_Callback*)cb_btn_show_all_codes);
o->value(progdefaults.show_all_codes);
} // Fl_Check_Button* btn_show_all_codes
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Colors-Fonts/Rx-Tx"));
config_pages.push_back(p);
tab_tree->add(_("Colors-Fonts/Rx-Tx"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Colors-Fonts/Tabs"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ btnTabColor = new Fl_Button(396, 69, 75, 21, _("Tab Color"));
btnTabColor->callback((Fl_Callback*)cb_btnTabColor);
} // Fl_Button* btnTabColor
{ btnTabDefaultColor = new Fl_Button(526, 69, 75, 21, _("System"));
btnTabDefaultColor->callback((Fl_Callback*)cb_btnTabDefaultColor);
} // Fl_Button* btnTabDefaultColor
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Colors-Fonts/Tabs"));
config_pages.push_back(p);
tab_tree->add(_("Colors-Fonts/Tabs"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Colors-Fonts/Signal Level"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ new Fl_Box(340, 39, 316, 21, _("Signal Level Indicator"));
} // Fl_Box* o
{ Fl_Box* o = lowcolor = new Fl_Box(365, 96, 21, 21);
lowcolor->box(FL_DIAMOND_DOWN_BOX);
lowcolor->color(FL_FOREGROUND_COLOR);
o->color(progdefaults.LowSignal);
} // Fl_Box* lowcolor
{ btnLowSignal = new Fl_Button(402, 96, 70, 21, _("Low"));
btnLowSignal->callback((Fl_Callback*)cb_btnLowSignal);
} // Fl_Button* btnLowSignal
{ Fl_Box* o = normalcolor = new Fl_Box(365, 142, 21, 21);
normalcolor->box(FL_DIAMOND_DOWN_BOX);
normalcolor->color((Fl_Color)2);
o->color(progdefaults.NormSignal);
} // Fl_Box* normalcolor
{ Fl_Counter* o = cnt_normal_signal_level = new Fl_Counter(480, 119, 114, 21, _("Transition\nLevel (dB)"));
cnt_normal_signal_level->minimum(-90);
cnt_normal_signal_level->maximum(0);
cnt_normal_signal_level->callback((Fl_Callback*)cb_cnt_normal_signal_level);
cnt_normal_signal_level->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.normal_signal_level);
o->lstep(1.0);
} // Fl_Counter* cnt_normal_signal_level
{ btnNormalSignal = new Fl_Button(402, 142, 70, 21, _("Normal"));
btnNormalSignal->callback((Fl_Callback*)cb_btnNormalSignal);
} // Fl_Button* btnNormalSignal
{ Fl_Box* o = highcolor = new Fl_Box(365, 189, 21, 21);
highcolor->box(FL_DIAMOND_DOWN_BOX);
highcolor->color((Fl_Color)3);
o->color(progdefaults.HighSignal);
} // Fl_Box* highcolor
{ Fl_Counter* o = cnt_high_signal_level = new Fl_Counter(480, 165, 114, 21);
cnt_high_signal_level->minimum(-90);
cnt_high_signal_level->maximum(0);
cnt_high_signal_level->callback((Fl_Callback*)cb_cnt_high_signal_level);
o->value(progdefaults.high_signal_level);
o->lstep(1.0);
} // Fl_Counter* cnt_high_signal_level
{ btnHighSignal = new Fl_Button(402, 189, 70, 21, _("High"));
btnHighSignal->callback((Fl_Callback*)cb_btnHighSignal);
} // Fl_Button* btnHighSignal
{ Fl_Box* o = overcolor = new Fl_Box(365, 236, 21, 21);
overcolor->box(FL_DIAMOND_DOWN_BOX);
overcolor->color((Fl_Color)1);
o->color(progdefaults.OverSignal);
} // Fl_Box* overcolor
{ Fl_Counter* o = cnt_over_signal_level = new Fl_Counter(480, 212, 114, 21);
cnt_over_signal_level->minimum(-90);
cnt_over_signal_level->maximum(0);
cnt_over_signal_level->callback((Fl_Callback*)cb_cnt_over_signal_level);
o->value(progdefaults.over_signal_level);
o->lstep(1.0);
} // Fl_Counter* cnt_over_signal_level
{ btnOverSignal = new Fl_Button(402, 236, 70, 21, _("Over"));
btnOverSignal->callback((Fl_Callback*)cb_btnOverSignal);
} // Fl_Button* btnOverSignal
{ Fl_Progress* o = new Fl_Progress(295, 289, 416, 25, _("label"));
o->hide();
} // Fl_Progress* o
{ sig_vumeter = new vumeter(322, 280, 360, 24, _("label"));
sig_vumeter->box(FL_DOWN_BOX);
sig_vumeter->color(FL_BACKGROUND2_COLOR);
sig_vumeter->selection_color(FL_YELLOW);
sig_vumeter->labeltype(FL_NORMAL_LABEL);
sig_vumeter->labelfont(0);
sig_vumeter->labelsize(14);
sig_vumeter->labelcolor(FL_FOREGROUND_COLOR);
sig_vumeter->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
sig_vumeter->when(FL_WHEN_RELEASE);
} // vumeter* sig_vumeter
{ new Fl_Box(375, 307, 237, 17, _("Input signal level"));
} // Fl_Box* o
{ btn_default_signal_levels = new Fl_Button(618, 166, 70, 20, _("Default"));
btn_default_signal_levels->callback((Fl_Callback*)cb_btn_default_signal_levels);
} // Fl_Button* btn_default_signal_levels
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Colors-Fonts/Signal Level"));
config_pages.push_back(p);
tab_tree->add(_("Colors-Fonts/Signal Level"));
tab_tree->close(_("Colors-Fonts"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Contests/General"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_ListBox* o = listbox_contest = new Fl_ListBox(287, 41, 500, 24, _("Contest"));
listbox_contest->tooltip(_("Select Logging as QSO or Contest"));
listbox_contest->box(FL_DOWN_BOX);
listbox_contest->color(FL_BACKGROUND2_COLOR);
listbox_contest->selection_color(FL_BACKGROUND_COLOR);
listbox_contest->labeltype(FL_NORMAL_LABEL);
listbox_contest->labelfont(0);
listbox_contest->labelsize(14);
listbox_contest->labelcolor(FL_FOREGROUND_COLOR);
listbox_contest->callback((Fl_Callback*)cb_listbox_contest);
listbox_contest->align(Fl_Align(FL_ALIGN_LEFT));
listbox_contest->when(FL_WHEN_RELEASE);
o->add(contest_names().c_str());
o->index(progdefaults.logging);
listbox_contest->end();
} // Fl_ListBox* listbox_contest
{ Fl_ListBox* o = listbox_QP_contests = new Fl_ListBox(367, 75, 420, 24, _("State QSO Party"));
listbox_QP_contests->box(FL_DOWN_BOX);
listbox_QP_contests->color(FL_BACKGROUND2_COLOR);
listbox_QP_contests->selection_color(FL_BACKGROUND_COLOR);
listbox_QP_contests->labeltype(FL_NORMAL_LABEL);
listbox_QP_contests->labelfont(0);
listbox_QP_contests->labelsize(14);
listbox_QP_contests->labelcolor(FL_FOREGROUND_COLOR);
listbox_QP_contests->callback((Fl_Callback*)cb_listbox_QP_contests);
listbox_QP_contests->align(Fl_Align(FL_ALIGN_LEFT));
listbox_QP_contests->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
o->add(QSOparties.names().c_str());
o->index(progdefaults.SQSOcontest);
listbox_QP_contests->end();
} // Fl_ListBox* listbox_QP_contests
{ Fl_Input2* o = inp_contest_notes = new Fl_Input2(367, 110, 420, 24, _("Text capture order"));
inp_contest_notes->tooltip(_("Context Notes"));
inp_contest_notes->box(FL_DOWN_BOX);
inp_contest_notes->color(FL_BACKGROUND2_COLOR);
inp_contest_notes->selection_color(FL_SELECTION_COLOR);
inp_contest_notes->labeltype(FL_NORMAL_LABEL);
inp_contest_notes->labelfont(0);
inp_contest_notes->labelsize(14);
inp_contest_notes->labelcolor(FL_FOREGROUND_COLOR);
inp_contest_notes->align(Fl_Align(FL_ALIGN_LEFT));
inp_contest_notes->when(FL_WHEN_RELEASE);
o->value(progdefaults.CONTESTnotes.c_str());
} // Fl_Input2* inp_contest_notes
{ Fl_Group* o = new Fl_Group(204, 149, 590, 86, _("Duplicate check, CALL plus"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Light_Button* o = btnDupCheckOn = new Fl_Light_Button(221, 174, 74, 20, _("On/Off"));
btnDupCheckOn->tooltip(_("Check for duplicates"));
btnDupCheckOn->selection_color((Fl_Color)2);
btnDupCheckOn->callback((Fl_Callback*)cb_btnDupCheckOn);
o->value(progdefaults.EnableDupCheck);
} // Fl_Light_Button* btnDupCheckOn
{ Fl_Check_Button* o = btnDupBand = new Fl_Check_Button(333, 174, 70, 20, _("Band"));
btnDupBand->tooltip(_("Bands must match"));
btnDupBand->down_box(FL_DOWN_BOX);
btnDupBand->callback((Fl_Callback*)cb_btnDupBand);
o->value(progdefaults.dupband);
} // Fl_Check_Button* btnDupBand
{ Fl_Check_Button* o = btnDupMode = new Fl_Check_Button(446, 174, 70, 20, _("Mode"));
btnDupMode->tooltip(_("Mode must match"));
btnDupMode->down_box(FL_DOWN_BOX);
btnDupMode->callback((Fl_Callback*)cb_btnDupMode);
o->value(progdefaults.dupmode);
} // Fl_Check_Button* btnDupMode
{ Fl_Check_Button* o = btnDupTimeSpan = new Fl_Check_Button(571, 174, 129, 20, _("Time span over"));
btnDupTimeSpan->tooltip(_("QSO must not occur within a time period of"));
btnDupTimeSpan->down_box(FL_DOWN_BOX);
btnDupTimeSpan->callback((Fl_Callback*)cb_btnDupTimeSpan);
o->value(progdefaults.duptimespan);
} // Fl_Check_Button* btnDupTimeSpan
{ Fl_Button* o = btnDupColor = new Fl_Button(221, 201, 90, 24, _("Dup Color"));
btnDupColor->tooltip(_("Left click to select dup color"));
btnDupColor->box(FL_DOWN_BOX);
btnDupColor->down_box(FL_DOWN_BOX);
btnDupColor->color(FL_BACKGROUND2_COLOR);
btnDupColor->selection_color(FL_BACKGROUND2_COLOR);
btnDupColor->callback((Fl_Callback*)cb_btnDupColor);
o->color(fl_rgb_color(progdefaults.dup_color.R, progdefaults.dup_color.G, progdefaults.dup_color.B));
} // Fl_Button* btnDupColor
{ Fl_Button* o = btnPossibleDupColor = new Fl_Button(333, 201, 90, 24, _("? Dup Color"));
btnPossibleDupColor->tooltip(_("Left click to select possible dup color"));
btnPossibleDupColor->box(FL_DOWN_BOX);
btnPossibleDupColor->down_box(FL_DOWN_BOX);
btnPossibleDupColor->color(FL_BACKGROUND2_COLOR);
btnPossibleDupColor->selection_color(FL_BACKGROUND2_COLOR);
btnPossibleDupColor->callback((Fl_Callback*)cb_btnPossibleDupColor);
o->color(fl_rgb_color(progdefaults.possible_dup_color.R, progdefaults.possible_dup_color.G, progdefaults.possible_dup_color.B));
} // Fl_Button* btnPossibleDupColor
{ Fl_Check_Button* o = btnDupXchg1 = new Fl_Check_Button(446, 203, 105, 20, _("Exchange In"));
btnDupXchg1->tooltip(_("free form 1 must match"));
btnDupXchg1->down_box(FL_DOWN_BOX);
btnDupXchg1->callback((Fl_Callback*)cb_btnDupXchg1);
o->value(progdefaults.dupxchg1);
} // Fl_Check_Button* btnDupXchg1
{ Fl_Check_Button* o = btnDupState = new Fl_Check_Button(571, 203, 70, 20, _("State"));
btnDupState->tooltip(_("State must match"));
btnDupState->down_box(FL_DOWN_BOX);
btnDupState->callback((Fl_Callback*)cb_btnDupState);
o->value(progdefaults.dupstate);
} // Fl_Check_Button* btnDupState
{ Fl_Value_Input2* o = nbrTimeSpan = new Fl_Value_Input2(664, 201, 53, 24, _("minutes"));
nbrTimeSpan->tooltip(_("Enter time span in minutes"));
nbrTimeSpan->box(FL_DOWN_BOX);
nbrTimeSpan->color(FL_BACKGROUND2_COLOR);
nbrTimeSpan->selection_color(FL_SELECTION_COLOR);
nbrTimeSpan->labeltype(FL_NORMAL_LABEL);
nbrTimeSpan->labelfont(0);
nbrTimeSpan->labelsize(14);
nbrTimeSpan->labelcolor(FL_FOREGROUND_COLOR);
nbrTimeSpan->maximum(1440);
nbrTimeSpan->step(1);
nbrTimeSpan->value(120);
nbrTimeSpan->callback((Fl_Callback*)cb_nbrTimeSpan);
nbrTimeSpan->align(Fl_Align(FL_ALIGN_RIGHT));
nbrTimeSpan->when(FL_WHEN_CHANGED);
o->value(progdefaults.timespan);
} // Fl_Value_Input2* nbrTimeSpan
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(204, 233, 590, 100, _("Contest Exchange / Serial #"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Input2* o = inpSend1 = new Fl_Input2(269, 257, 200, 24, _("Send"));
inpSend1->tooltip(_("free form exchange"));
inpSend1->box(FL_DOWN_BOX);
inpSend1->color(FL_BACKGROUND2_COLOR);
inpSend1->selection_color(FL_SELECTION_COLOR);
inpSend1->labeltype(FL_NORMAL_LABEL);
inpSend1->labelfont(0);
inpSend1->labelsize(14);
inpSend1->labelcolor(FL_FOREGROUND_COLOR);
inpSend1->callback((Fl_Callback*)cb_inpSend1);
inpSend1->align(Fl_Align(FL_ALIGN_LEFT));
inpSend1->when(FL_WHEN_RELEASE);
o->value(progdefaults.myXchg.c_str());
inpSend1->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpSend1
{ Fl_Check_Button* o = btn599 = new Fl_Check_Button(484, 259, 130, 20, _("RST always 599/59"));
btn599->tooltip(_("Force RST in/out to 599/59"));
btn599->down_box(FL_DOWN_BOX);
btn599->callback((Fl_Callback*)cb_btn599);
o->value(progdefaults.fixed599);
} // Fl_Check_Button* btn599
{ Fl_Check_Button* o = btnCutNbrs = new Fl_Check_Button(644, 259, 139, 20, _("Send CW cut #\'s"));
btnCutNbrs->tooltip(_("0 = T; 9 = N"));
btnCutNbrs->down_box(FL_DOWN_BOX);
btnCutNbrs->callback((Fl_Callback*)cb_btnCutNbrs);
o->value(progdefaults.cutnbrs);
} // Fl_Check_Button* btnCutNbrs
{ Fl_Group* o = new Fl_Group(211, 286, 576, 42);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Value_Input2* o = nbrContestStart = new Fl_Value_Input2(298, 295, 45, 24, _("Start Nbr"));
nbrContestStart->tooltip(_("Starting number"));
nbrContestStart->box(FL_DOWN_BOX);
nbrContestStart->color(FL_BACKGROUND2_COLOR);
nbrContestStart->selection_color(FL_SELECTION_COLOR);
nbrContestStart->labeltype(FL_NORMAL_LABEL);
nbrContestStart->labelfont(0);
nbrContestStart->labelsize(14);
nbrContestStart->labelcolor(FL_FOREGROUND_COLOR);
nbrContestStart->maximum(10000);
nbrContestStart->step(1);
nbrContestStart->callback((Fl_Callback*)cb_nbrContestStart);
nbrContestStart->align(Fl_Align(FL_ALIGN_LEFT));
nbrContestStart->when(FL_WHEN_CHANGED);
o->value(progdefaults.ContestStart);
} // Fl_Value_Input2* nbrContestStart
{ nbrContestDigits = new Fl_Value_Input2(420, 295, 46, 24, _("Digits"));
nbrContestDigits->tooltip(_("Number of digits in serial number"));
nbrContestDigits->box(FL_DOWN_BOX);
nbrContestDigits->color(FL_BACKGROUND2_COLOR);
nbrContestDigits->selection_color(FL_SELECTION_COLOR);
nbrContestDigits->labeltype(FL_NORMAL_LABEL);
nbrContestDigits->labelfont(0);
nbrContestDigits->labelsize(14);
nbrContestDigits->labelcolor(FL_FOREGROUND_COLOR);
nbrContestDigits->minimum(1);
nbrContestDigits->maximum(5);
nbrContestDigits->step(1);
nbrContestDigits->value(3);
nbrContestDigits->callback((Fl_Callback*)cb_nbrContestDigits);
nbrContestDigits->align(Fl_Align(FL_ALIGN_LEFT));
nbrContestDigits->when(FL_WHEN_CHANGED);
} // Fl_Value_Input2* nbrContestDigits
{ btnUseLeadingZeros = new Fl_Check_Button(485, 297, 157, 20, _("Use leading zeros"));
btnUseLeadingZeros->tooltip(_("Insert leading zeros into Xmtd serial number"));
btnUseLeadingZeros->down_box(FL_DOWN_BOX);
btnUseLeadingZeros->value(1);
btnUseLeadingZeros->callback((Fl_Callback*)cb_btnUseLeadingZeros);
} // Fl_Check_Button* btnUseLeadingZeros
{ btnResetSerNbr = new Fl_Button(682, 295, 71, 24, _("Reset"));
btnResetSerNbr->tooltip(_("Initialize the QSO logging fields"));
btnResetSerNbr->callback((Fl_Callback*)cb_btnResetSerNbr);
} // Fl_Button* btnResetSerNbr
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Contests/General"));
config_pages.push_back(p);
tab_tree->add(_("Contests/General"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Contests/Field Day"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Input2* o = inp_my_FD_call = new Fl_Input2(346, 73, 80, 24, _("Operator Call"));
inp_my_FD_call->tooltip(_("Field Day Callsign\nMay be same as OP callsign"));
inp_my_FD_call->box(FL_DOWN_BOX);
inp_my_FD_call->color(FL_BACKGROUND2_COLOR);
inp_my_FD_call->selection_color(FL_SELECTION_COLOR);
inp_my_FD_call->labeltype(FL_NORMAL_LABEL);
inp_my_FD_call->labelfont(0);
inp_my_FD_call->labelsize(14);
inp_my_FD_call->labelcolor(FL_FOREGROUND_COLOR);
inp_my_FD_call->callback((Fl_Callback*)cb_inp_my_FD_call);
inp_my_FD_call->align(Fl_Align(FL_ALIGN_LEFT));
inp_my_FD_call->when(FL_WHEN_RELEASE);
o->value(progdefaults.fd_op_call.c_str());
inpSend1->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inp_my_FD_call
{ Fl_Input2* o = inp_my_FD_section = new Fl_Input2(654, 73, 45, 24, _("My Section"));
inp_my_FD_section->tooltip(_("Field Day Section"));
inp_my_FD_section->box(FL_DOWN_BOX);
inp_my_FD_section->color(FL_BACKGROUND2_COLOR);
inp_my_FD_section->selection_color(FL_SELECTION_COLOR);
inp_my_FD_section->labeltype(FL_NORMAL_LABEL);
inp_my_FD_section->labelfont(0);
inp_my_FD_section->labelsize(14);
inp_my_FD_section->labelcolor(FL_FOREGROUND_COLOR);
inp_my_FD_section->callback((Fl_Callback*)cb_inp_my_FD_section);
inp_my_FD_section->align(Fl_Align(FL_ALIGN_LEFT));
inp_my_FD_section->when(FL_WHEN_RELEASE);
o->value(progdefaults.my_FD_section.c_str());
inpSend1->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inp_my_FD_section
{ Fl_Input2* o = inp_my_FD_class = new Fl_Input2(507, 73, 50, 24, _("My Class"));
inp_my_FD_class->tooltip(_("Field Day Class"));
inp_my_FD_class->box(FL_DOWN_BOX);
inp_my_FD_class->color(FL_BACKGROUND2_COLOR);
inp_my_FD_class->selection_color(FL_SELECTION_COLOR);
inp_my_FD_class->labeltype(FL_NORMAL_LABEL);
inp_my_FD_class->labelfont(0);
inp_my_FD_class->labelsize(14);
inp_my_FD_class->labelcolor(FL_FOREGROUND_COLOR);
inp_my_FD_class->callback((Fl_Callback*)cb_inp_my_FD_class);
inp_my_FD_class->align(Fl_Align(FL_ALIGN_LEFT));
inp_my_FD_class->when(FL_WHEN_RELEASE);
o->value(progdefaults.my_FD_class.c_str());
inpSend1->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inp_my_FD_class
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Contests/Field Day"));
config_pages.push_back(p);
tab_tree->add(_("Contests/Field Day"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Contests/JOTA School"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(211, 137, 580, 53, _("School Round Up"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Input2* o = inp_my_SCR_class = new Fl_Input2(397, 159, 69, 24, _("My Class"));
inp_my_SCR_class->tooltip(_("School Round Up - allowable I, H, O - see rules"));
inp_my_SCR_class->box(FL_DOWN_BOX);
inp_my_SCR_class->color(FL_BACKGROUND2_COLOR);
inp_my_SCR_class->selection_color(FL_SELECTION_COLOR);
inp_my_SCR_class->labeltype(FL_NORMAL_LABEL);
inp_my_SCR_class->labelfont(0);
inp_my_SCR_class->labelsize(14);
inp_my_SCR_class->labelcolor(FL_FOREGROUND_COLOR);
inp_my_SCR_class->callback((Fl_Callback*)cb_inp_my_SCR_class);
inp_my_SCR_class->align(Fl_Align(FL_ALIGN_LEFT));
inp_my_SCR_class->when(FL_WHEN_RELEASE);
o->value(progdefaults.my_SCR_class.c_str());
inpSend1->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inp_my_SCR_class
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(211, 44, 580, 89, _("Jamboree OTA"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Input2* o = inp_my_JOTA_troop = new Fl_Input2(396, 67, 200, 24, _("My Troop"));
inp_my_JOTA_troop->tooltip(_("My JOTA Troop"));
inp_my_JOTA_troop->box(FL_DOWN_BOX);
inp_my_JOTA_troop->color(FL_BACKGROUND2_COLOR);
inp_my_JOTA_troop->selection_color(FL_SELECTION_COLOR);
inp_my_JOTA_troop->labeltype(FL_NORMAL_LABEL);
inp_my_JOTA_troop->labelfont(0);
inp_my_JOTA_troop->labelsize(14);
inp_my_JOTA_troop->labelcolor(FL_FOREGROUND_COLOR);
inp_my_JOTA_troop->callback((Fl_Callback*)cb_inp_my_JOTA_troop);
inp_my_JOTA_troop->align(Fl_Align(FL_ALIGN_LEFT));
inp_my_JOTA_troop->when(FL_WHEN_RELEASE);
o->value(progdefaults.my_JOTA_troop.c_str());
inpSend1->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inp_my_JOTA_troop
{ Fl_Input2* o = inp_my_JOTA_scout = new Fl_Input2(396, 98, 200, 24, _("Scout Op\'"));
inp_my_JOTA_scout->tooltip(_("Scout Operator Name"));
inp_my_JOTA_scout->box(FL_DOWN_BOX);
inp_my_JOTA_scout->color(FL_BACKGROUND2_COLOR);
inp_my_JOTA_scout->selection_color(FL_SELECTION_COLOR);
inp_my_JOTA_scout->labeltype(FL_NORMAL_LABEL);
inp_my_JOTA_scout->labelfont(0);
inp_my_JOTA_scout->labelsize(14);
inp_my_JOTA_scout->labelcolor(FL_FOREGROUND_COLOR);
inp_my_JOTA_scout->callback((Fl_Callback*)cb_inp_my_JOTA_scout);
inp_my_JOTA_scout->align(Fl_Align(FL_ALIGN_LEFT));
inp_my_JOTA_scout->when(FL_WHEN_RELEASE);
o->value(progdefaults.my_JOTA_scout.c_str());
inpSend1->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inp_my_JOTA_scout
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Contests/JOTA School"));
config_pages.push_back(p);
tab_tree->add(_("Contests/JOTA School"));
tab_tree->close(_("Contests"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("IDs/CW"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ sld = new Fl_Group(234, 83, 536, 127, _("CW Postamble ID"));
sld->box(FL_ENGRAVED_FRAME);
sld->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnCWID = new Fl_Check_Button(287, 121, 140, 24, _("Transmit callsign"));
btnCWID->tooltip(_("Send Callsign in CW at end of every transmission"));
btnCWID->down_box(FL_DOWN_BOX);
btnCWID->callback((Fl_Callback*)cb_btnCWID);
o->value(progdefaults.CWid);
} // Fl_Check_Button* btnCWID
{ Fl_Value_Slider2* o = sldrCWIDwpm = new Fl_Value_Slider2(287, 164, 180, 20, _("Speed (WPM):"));
sldrCWIDwpm->tooltip(_("Send at this WPM"));
sldrCWIDwpm->type(1);
sldrCWIDwpm->box(FL_DOWN_BOX);
sldrCWIDwpm->color(FL_BACKGROUND_COLOR);
sldrCWIDwpm->selection_color(FL_BACKGROUND_COLOR);
sldrCWIDwpm->labeltype(FL_NORMAL_LABEL);
sldrCWIDwpm->labelfont(0);
sldrCWIDwpm->labelsize(14);
sldrCWIDwpm->labelcolor(FL_FOREGROUND_COLOR);
sldrCWIDwpm->minimum(15);
sldrCWIDwpm->maximum(40);
sldrCWIDwpm->step(1);
sldrCWIDwpm->value(18);
sldrCWIDwpm->textsize(14);
sldrCWIDwpm->callback((Fl_Callback*)cb_sldrCWIDwpm);
sldrCWIDwpm->align(Fl_Align(FL_ALIGN_TOP));
sldrCWIDwpm->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWIDwpm);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* sldrCWIDwpm
{ bCWIDModes = new Fl_Button(485, 121, 120, 24, _("CW ID modes"));
bCWIDModes->callback((Fl_Callback*)cb_bCWIDModes);
} // Fl_Button* bCWIDModes
sld->end();
} // Fl_Group* sld
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("IDs/CW"));
config_pages.push_back(p);
tab_tree->add(_("IDs/CW"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("IDs/RsID"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(243, 22, 535, 220, _("Reed-Solomon ID (Rx)"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ chkRSidNotifyOnly = new Fl_Check_Button(251, 89, 168, 20, _("Notify only"));
chkRSidNotifyOnly->tooltip(_("Check this to be notified when an RSID is received\nwithout changing modem an\
d frequency"));
chkRSidNotifyOnly->down_box(FL_DOWN_BOX);
chkRSidNotifyOnly->callback((Fl_Callback*)cb_chkRSidNotifyOnly);
chkRSidNotifyOnly->value(progdefaults.rsid_notify_only);
} // Fl_Check_Button* chkRSidNotifyOnly
{ bRSIDRxModes = new Fl_Button(251, 48, 87, 24, _("Rx modes"));
bRSIDRxModes->callback((Fl_Callback*)cb_bRSIDRxModes);
} // Fl_Button* bRSIDRxModes
{ Fl_Check_Button* o = chkRSidWideSearch = new Fl_Check_Button(251, 119, 203, 20, _("Searches passband"));
chkRSidWideSearch->tooltip(_("ON - search over entire waterfall\nOFF - limit search to +/- 200 Hz"));
chkRSidWideSearch->down_box(FL_DOWN_BOX);
chkRSidWideSearch->callback((Fl_Callback*)cb_chkRSidWideSearch);
o->value(progdefaults.rsidWideSearch);
} // Fl_Check_Button* chkRSidWideSearch
{ chkRSidMark = new Fl_Check_Button(251, 149, 203, 20, _("Mark prev freq/mode"));
chkRSidMark->tooltip(_("Insert RX text marker before\nchanging frequency and modem"));
chkRSidMark->down_box(FL_DOWN_BOX);
chkRSidMark->callback((Fl_Callback*)cb_chkRSidMark);
chkRSidMark->value(progdefaults.rsid_mark);
} // Fl_Check_Button* chkRSidMark
{ chkRSidAutoDisable = new Fl_Check_Button(251, 179, 203, 20, _("Disables detector"));
chkRSidAutoDisable->tooltip(_("Disable further detection when RSID is received"));
chkRSidAutoDisable->down_box(FL_DOWN_BOX);
chkRSidAutoDisable->callback((Fl_Callback*)cb_chkRSidAutoDisable);
if (progdefaults.rsid_notify_only) progdefaults.rsid_auto_disable = false;
chkRSidAutoDisable->value(progdefaults.rsid_auto_disable);
if (progdefaults.rsid_notify_only) chkRSidAutoDisable->deactivate();
} // Fl_Check_Button* chkRSidAutoDisable
{ Fl_ListBox* o = listbox_rsid_errors = new Fl_ListBox(251, 210, 100, 22, _("Allow errors"));
listbox_rsid_errors->tooltip(_("Low = zero errors\nMedium = 1 error\nHigh = 2 errors"));
listbox_rsid_errors->box(FL_DOWN_BOX);
listbox_rsid_errors->color(FL_BACKGROUND2_COLOR);
listbox_rsid_errors->selection_color(FL_BACKGROUND_COLOR);
listbox_rsid_errors->labeltype(FL_NORMAL_LABEL);
listbox_rsid_errors->labelfont(0);
listbox_rsid_errors->labelsize(14);
listbox_rsid_errors->labelcolor(FL_FOREGROUND_COLOR);
listbox_rsid_errors->callback((Fl_Callback*)cb_listbox_rsid_errors);
listbox_rsid_errors->align(Fl_Align(FL_ALIGN_RIGHT));
listbox_rsid_errors->when(FL_WHEN_RELEASE);
listbox_rsid_errors->add(_("Low")); listbox_rsid_errors->add(_("Medium")); listbox_rsid_errors->add(_("High"));
listbox_rsid_errors->index(progdefaults.RsID_label_type);
o->labelsize(FL_NORMAL_SIZE);
listbox_rsid_errors->end();
} // Fl_ListBox* listbox_rsid_errors
{ Fl_Check_Button* o = chkRSidShowAlert = new Fl_Check_Button(487, 89, 203, 20, _("Disable alert dialog"));
chkRSidShowAlert->tooltip(_("Do not show RsID alert dialog box"));
chkRSidShowAlert->down_box(FL_DOWN_BOX);
chkRSidShowAlert->callback((Fl_Callback*)cb_chkRSidShowAlert);
o->value(progdefaults.disable_rsid_warning_dialog_box);
} // Fl_Check_Button* chkRSidShowAlert
{ Fl_Check_Button* o = chkRetainFreqLock = new Fl_Check_Button(487, 119, 203, 20, _("Retain tx freq lock"));
chkRetainFreqLock->tooltip(_("Retain TX lock frequency (Lk) when changing to RX RsID frequency"));
chkRetainFreqLock->down_box(FL_DOWN_BOX);
chkRetainFreqLock->callback((Fl_Callback*)cb_chkRetainFreqLock);
o->value(progdefaults.retain_freq_lock);
} // Fl_Check_Button* chkRetainFreqLock
{ Fl_Check_Button* o = chkDisableFreqChange = new Fl_Check_Button(487, 149, 203, 20, _("Disable freq change"));
chkDisableFreqChange->tooltip(_("Do not automatically change to RX RsID frequency"));
chkDisableFreqChange->down_box(FL_DOWN_BOX);
chkDisableFreqChange->callback((Fl_Callback*)cb_chkDisableFreqChange);
o->value(progdefaults.disable_rsid_freq_change);
} // Fl_Check_Button* chkDisableFreqChange
{ Fl_Check_Button* o = chk_RSID_EOT = new Fl_Check_Button(487, 179, 232, 20, _("Rx/Tx RsID EOT"));
chk_RSID_EOT->tooltip(_("Do not automatically change to RX RsID frequency"));
chk_RSID_EOT->down_box(FL_DOWN_BOX);
chk_RSID_EOT->callback((Fl_Callback*)cb_chk_RSID_EOT);
o->value(progdefaults.rsid_eot_squelch);
} // Fl_Check_Button* chk_RSID_EOT
{ Fl_Counter* o = val_RSIDsquelch = new Fl_Counter(471, 210, 140, 21, _("Squelch open (sec)"));
val_RSIDsquelch->tooltip(_("Use for triggering amplifier carrier detect"));
val_RSIDsquelch->minimum(0);
val_RSIDsquelch->maximum(300);
val_RSIDsquelch->step(1);
val_RSIDsquelch->callback((Fl_Callback*)cb_val_RSIDsquelch);
val_RSIDsquelch->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.rsid_squelch);
o->lstep(10.0);
} // Fl_Counter* val_RSIDsquelch
{ Fl_Group* o = new Fl_Group(363, 45, 406, 38, _("The RsID notification message contents and display\ncharacteristics are confi\
gured on the \"Notifications\" tab."));
o->box(FL_BORDER_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(243, 245, 265, 97, _("Pre-Signal Tone"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter* o = val_pretone = new Fl_Counter(299, 283, 140, 21, _("Seconds"));
val_pretone->tooltip(_("Use for triggering amplifier carrier detect"));
val_pretone->minimum(0);
val_pretone->maximum(10);
val_pretone->callback((Fl_Callback*)cb_val_pretone);
o->value(progdefaults.pretone);
} // Fl_Counter* val_pretone
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(511, 245, 265, 97, _("Reed-Solomon ID (Tx)"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ bRSIDTxModes = new Fl_Button(588, 272, 130, 24, _("Transmit modes"));
bRSIDTxModes->callback((Fl_Callback*)cb_bRSIDTxModes);
} // Fl_Button* bRSIDTxModes
{ Fl_Check_Button* o = btn_post_rsid = new Fl_Check_Button(588, 307, 97, 17, _("End of xmt ID"));
btn_post_rsid->tooltip(_("Add RsID signal to end of transmission"));
btn_post_rsid->down_box(FL_DOWN_BOX);
btn_post_rsid->callback((Fl_Callback*)cb_btn_post_rsid);
o->value(progdefaults.rsid_post);
} // Fl_Check_Button* btn_post_rsid
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("IDs/RsID"));
config_pages.push_back(p);
tab_tree->add(_("IDs/RsID"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("IDs/Video"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(237, 47, 536, 189, _("Video Preamble ID"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btnsendid = new Fl_Check_Button(255, 81, 150, 20, _("Transmit mode ID"));
btnsendid->tooltip(_("Waterfall video ID"));
btnsendid->down_box(FL_DOWN_BOX);
btnsendid->callback((Fl_Callback*)cb_btnsendid);
} // Fl_Check_Button* btnsendid
{ Fl_Check_Button* o = btnsendvideotext = new Fl_Check_Button(255, 113, 155, 20, _("Transmit video text"));
btnsendvideotext->tooltip(_("Waterfall video text"));
btnsendvideotext->down_box(FL_DOWN_BOX);
btnsendvideotext->callback((Fl_Callback*)cb_btnsendvideotext);
o->value(progdefaults.sendtextid);
} // Fl_Check_Button* btnsendvideotext
{ Fl_Input2* o = valVideotext = new Fl_Input2(422, 111, 323, 24, _(":"));
valVideotext->tooltip(_("Limit to a few characters,\nas in CQEM or IOTA etc."));
valVideotext->box(FL_DOWN_BOX);
valVideotext->color(FL_BACKGROUND2_COLOR);
valVideotext->selection_color(FL_SELECTION_COLOR);
valVideotext->labeltype(FL_NORMAL_LABEL);
valVideotext->labelfont(0);
valVideotext->labelsize(14);
valVideotext->labelcolor(FL_FOREGROUND_COLOR);
valVideotext->callback((Fl_Callback*)cb_valVideotext);
valVideotext->align(Fl_Align(FL_ALIGN_LEFT));
valVideotext->when(FL_WHEN_RELEASE);
o->value(progdefaults.strTextid.c_str());
valVideotext->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* valVideotext
{ Fl_Check_Button* o = chkID_SMALL = new Fl_Check_Button(255, 145, 120, 20, _("Use small font"));
chkID_SMALL->tooltip(_("ON - small font\nOFF - large font"));
chkID_SMALL->down_box(FL_DOWN_BOX);
chkID_SMALL->value(1);
chkID_SMALL->callback((Fl_Callback*)cb_chkID_SMALL);
o->value(progdefaults.ID_SMALL);
} // Fl_Check_Button* chkID_SMALL
{ Fl_Value_Slider2* o = sldrVideowidth = new Fl_Value_Slider2(495, 143, 125, 24, _("Chars/Row:"));
sldrVideowidth->tooltip(_("Set the number of characters per row"));
sldrVideowidth->type(1);
sldrVideowidth->box(FL_DOWN_BOX);
sldrVideowidth->color(FL_BACKGROUND_COLOR);
sldrVideowidth->selection_color(FL_BACKGROUND_COLOR);
sldrVideowidth->labeltype(FL_NORMAL_LABEL);
sldrVideowidth->labelfont(0);
sldrVideowidth->labelsize(14);
sldrVideowidth->labelcolor(FL_FOREGROUND_COLOR);
sldrVideowidth->minimum(1);
sldrVideowidth->maximum(8);
sldrVideowidth->step(1);
sldrVideowidth->value(4);
sldrVideowidth->textsize(14);
sldrVideowidth->callback((Fl_Callback*)cb_sldrVideowidth);
sldrVideowidth->align(Fl_Align(FL_ALIGN_LEFT));
sldrVideowidth->when(FL_WHEN_CHANGED);
o->value(progdefaults.videowidth);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* sldrVideowidth
{ Fl_Check_Button* o = btn_vidlimit = new Fl_Check_Button(255, 177, 110, 15, _("500 Hz limit"));
btn_vidlimit->down_box(FL_DOWN_BOX);
btn_vidlimit->callback((Fl_Callback*)cb_btn_vidlimit);
o->value(progdefaults.vidlimit);
} // Fl_Check_Button* btn_vidlimit
{ Fl_Check_Button* o = btn_vidmodelimit = new Fl_Check_Button(255, 205, 110, 15, _("Mode width limit"));
btn_vidmodelimit->down_box(FL_DOWN_BOX);
btn_vidmodelimit->callback((Fl_Callback*)cb_btn_vidmodelimit);
o->value(progdefaults.vidmodelimit);
} // Fl_Check_Button* btn_vidmodelimit
{ bVideoIDModes = new Fl_Button(625, 78, 120, 24, _("Video ID modes"));
bVideoIDModes->callback((Fl_Callback*)cb_bVideoIDModes);
} // Fl_Button* bVideoIDModes
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("IDs/Video"));
config_pages.push_back(p);
tab_tree->add(_("IDs/Video"));
tab_tree->close(_("IDs"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Logging/MacLogger"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Check_Button* o = btnConnectToMaclogger = new Fl_Check_Button(211, 35, 186, 20, _("Connect to MacLogger"));
btnConnectToMaclogger->down_box(FL_DOWN_BOX);
btnConnectToMaclogger->callback((Fl_Callback*)cb_btnConnectToMaclogger);
o->value(progdefaults.connect_to_maclogger);
} // Fl_Check_Button* btnConnectToMaclogger
{ Fl_Check_Button* o = btn_capture_maclogger_radio = new Fl_Check_Button(406, 35, 186, 20, _("Capture Radio Report"));
btn_capture_maclogger_radio->down_box(FL_DOWN_BOX);
btn_capture_maclogger_radio->value(1);
btn_capture_maclogger_radio->callback((Fl_Callback*)cb_btn_capture_maclogger_radio);
o->value(progdefaults.capture_maclogger_radio);
} // Fl_Check_Button* btn_capture_maclogger_radio
{ Fl_Check_Button* o = btn_capture_maclogger_log = new Fl_Check_Button(406, 60, 186, 21, _("Capture Log Report"));
btn_capture_maclogger_log->down_box(FL_DOWN_BOX);
btn_capture_maclogger_log->callback((Fl_Callback*)cb_btn_capture_maclogger_log);
o->value(progdefaults.capture_maclogger_log);
} // Fl_Check_Button* btn_capture_maclogger_log
{ Fl_Check_Button* o = btn_capture_maclogger_lookup = new Fl_Check_Button(606, 35, 186, 20, _("Capture Lookup "));
btn_capture_maclogger_lookup->down_box(FL_DOWN_BOX);
btn_capture_maclogger_lookup->callback((Fl_Callback*)cb_btn_capture_maclogger_lookup);
o->value(progdefaults.capture_maclogger_lookup);
} // Fl_Check_Button* btn_capture_maclogger_lookup
{ Fl_Check_Button* o = btn_capture_maclogger_spot_tune = new Fl_Check_Button(606, 60, 186, 21, _("Capture Spot Tune"));
btn_capture_maclogger_spot_tune->down_box(FL_DOWN_BOX);
btn_capture_maclogger_spot_tune->callback((Fl_Callback*)cb_btn_capture_maclogger_spot_tune);
o->value(progdefaults.capture_maclogger_spot_tune);
} // Fl_Check_Button* btn_capture_maclogger_spot_tune
{ Fl_Check_Button* o = btn_capture_maclogger_spot_report = new Fl_Check_Button(606, 88, 186, 21, _("Capture Spot Report"));
btn_capture_maclogger_spot_report->down_box(FL_DOWN_BOX);
btn_capture_maclogger_spot_report->callback((Fl_Callback*)cb_btn_capture_maclogger_spot_report);
o->value(progdefaults.capture_maclogger_spot_report);
} // Fl_Check_Button* btn_capture_maclogger_spot_report
{ Fl_Check_Button* o = btn_enable_maclogger_log = new Fl_Check_Button(211, 117, 165, 26, _("Enable UDP log file"));
btn_enable_maclogger_log->down_box(FL_DOWN_BOX);
btn_enable_maclogger_log->callback((Fl_Callback*)cb_btn_enable_maclogger_log);
o->value(progdefaults.enable_maclogger_log);
} // Fl_Check_Button* btn_enable_maclogger_log
{ Fl_Text_Display* o = txt_UDP_data = new Fl_Text_Display(210, 164, 580, 161, _("UDP data stream"));
txt_UDP_data->align(Fl_Align(FL_ALIGN_TOP_LEFT));
Fl_Text_Buffer *txtbuffer = new Fl_Text_Buffer();
o->buffer(txtbuffer);
} // Fl_Text_Display* txt_UDP_data
{ Fl_Output* o = txt_maclogger_log_filename = new Fl_Output(379, 117, 272, 26);
o->value(progdefaults.maclogger_log_filename.c_str());
} // Fl_Output* txt_maclogger_log_filename
{ Fl_Button* o = new Fl_Button(661, 117, 129, 26, _("Clear UDP text"));
o->callback((Fl_Callback*)cb_Clear);
} // Fl_Button* o
{ Fl_Check_Button* o = btn_maclogger_spot_rx = new Fl_Check_Button(406, 88, 186, 21, _("Tune to Rx Spot"));
btn_maclogger_spot_rx->tooltip(_("ON - use Rx spot freq\nOFF - use Tx spot freq"));
btn_maclogger_spot_rx->down_box(FL_DOWN_BOX);
btn_maclogger_spot_rx->callback((Fl_Callback*)cb_btn_maclogger_spot_rx);
o->value(progdefaults.maclogger_spot_rx);
} // Fl_Check_Button* btn_maclogger_spot_rx
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Logging/MacLogger"));
config_pages.push_back(p);
tab_tree->add(_("Logging/MacLogger"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Logging/N3FJP logs"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Text_Display* o = txt_N3FJP_data = new Fl_Text_Display(205, 94, 590, 150, _("TCP/IP Data Stream"));
txt_N3FJP_data->align(Fl_Align(FL_ALIGN_TOP_LEFT));
Fl_Text_Buffer *txtbuffer = new Fl_Text_Buffer();
o->buffer(txtbuffer);
} // Fl_Text_Display* txt_N3FJP_data
{ Fl_Button* o = new Fl_Button(701, 247, 90, 24, _("Clear text"));
o->callback((Fl_Callback*)cb_Clear1);
} // Fl_Button* o
{ Fl_Input2* o = txt_N3FJP_ip_address = new Fl_Input2(205, 49, 350, 25, _("Address"));
txt_N3FJP_ip_address->tooltip(_("N3FJP Server IP Address"));
txt_N3FJP_ip_address->box(FL_DOWN_BOX);
txt_N3FJP_ip_address->color(FL_BACKGROUND2_COLOR);
txt_N3FJP_ip_address->selection_color(FL_SELECTION_COLOR);
txt_N3FJP_ip_address->labeltype(FL_NORMAL_LABEL);
txt_N3FJP_ip_address->labelfont(0);
txt_N3FJP_ip_address->labelsize(14);
txt_N3FJP_ip_address->labelcolor(FL_FOREGROUND_COLOR);
txt_N3FJP_ip_address->callback((Fl_Callback*)cb_txt_N3FJP_ip_address);
txt_N3FJP_ip_address->align(Fl_Align(FL_ALIGN_TOP_LEFT));
txt_N3FJP_ip_address->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.N3FJP_address.c_str());
} // Fl_Input2* txt_N3FJP_ip_address
{ Fl_Input2* o = txt_N3FJP_ip_port_no = new Fl_Input2(565, 49, 55, 25, _("Port"));
txt_N3FJP_ip_port_no->tooltip(_("N3FJP Server IP Port"));
txt_N3FJP_ip_port_no->box(FL_DOWN_BOX);
txt_N3FJP_ip_port_no->color(FL_BACKGROUND2_COLOR);
txt_N3FJP_ip_port_no->selection_color(FL_SELECTION_COLOR);
txt_N3FJP_ip_port_no->labeltype(FL_NORMAL_LABEL);
txt_N3FJP_ip_port_no->labelfont(0);
txt_N3FJP_ip_port_no->labelsize(14);
txt_N3FJP_ip_port_no->labelcolor(FL_FOREGROUND_COLOR);
txt_N3FJP_ip_port_no->callback((Fl_Callback*)cb_txt_N3FJP_ip_port_no);
txt_N3FJP_ip_port_no->align(Fl_Align(FL_ALIGN_TOP_LEFT));
txt_N3FJP_ip_port_no->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.N3FJP_port.c_str());
} // Fl_Input2* txt_N3FJP_ip_port_no
{ btn_default_N3FJP_ip = new Fl_Button(623, 49, 67, 25, _("Default"));
btn_default_N3FJP_ip->tooltip(_("Returns IP Address and port\nnumber to the default value."));
btn_default_N3FJP_ip->callback((Fl_Callback*)cb_btn_default_N3FJP_ip);
} // Fl_Button* btn_default_N3FJP_ip
{ Fl_Check_Button* o = btn_enable_N3FJP_log = new Fl_Check_Button(210, 246, 165, 26, _("Enable Data Stream"));
btn_enable_N3FJP_log->down_box(FL_DOWN_BOX);
btn_enable_N3FJP_log->callback((Fl_Callback*)cb_btn_enable_N3FJP_log);
o->value(progdefaults.enable_N3FJP_log);
} // Fl_Check_Button* btn_enable_N3FJP_log
{ Fl_Check_Button* o = btn_connect_to_n3fjp = new Fl_Check_Button(695, 39, 70, 15, _("Connect"));
btn_connect_to_n3fjp->down_box(FL_DOWN_BOX);
btn_connect_to_n3fjp->callback((Fl_Callback*)cb_btn_connect_to_n3fjp);
o->value(progdefaults.connect_to_n3fjp);
} // Fl_Check_Button* btn_connect_to_n3fjp
{ box_n3fjp_connected = new Fl_Box(695, 66, 16, 16, _("Connected"));
box_n3fjp_connected->box(FL_DIAMOND_DOWN_BOX);
box_n3fjp_connected->color(FL_LIGHT2);
box_n3fjp_connected->selection_color((Fl_Color)58);
box_n3fjp_connected->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Box* box_n3fjp_connected
{ Fl_Check_Button* o = btn_N3FJP_sweet_spot = new Fl_Check_Button(210, 299, 255, 26, _("Center DXspot freq at sweet spot"));
btn_N3FJP_sweet_spot->tooltip(_("N3FJP DX spots centered on mode sweet spot"));
btn_N3FJP_sweet_spot->down_box(FL_DOWN_BOX);
btn_N3FJP_sweet_spot->callback((Fl_Callback*)cb_btn_N3FJP_sweet_spot);
o->value(progdefaults.N3FJP_sweet_spot);
} // Fl_Check_Button* btn_N3FJP_sweet_spot
{ Fl_Check_Button* o = btn_N3FJP_modem_carrier = new Fl_Check_Button(475, 299, 255, 26, _("Report actual modem RF frequency"));
btn_N3FJP_modem_carrier->tooltip(_("Suppressed carrier +/- AF injection frequency"));
btn_N3FJP_modem_carrier->down_box(FL_DOWN_BOX);
btn_N3FJP_modem_carrier->callback((Fl_Callback*)cb_btn_N3FJP_modem_carrier);
o->value(progdefaults.N3FJP_modem_carrier);
} // Fl_Check_Button* btn_N3FJP_modem_carrier
{ Fl_Check_Button* o = btn_enable_N3FJP_RIGTX = new Fl_Check_Button(210, 273, 165, 26, _("PTT via <RIGTX> and <RIGRX>"));
btn_enable_N3FJP_RIGTX->down_box(FL_DOWN_BOX);
btn_enable_N3FJP_RIGTX->callback((Fl_Callback*)cb_btn_enable_N3FJP_RIGTX);
o->value(progdefaults.enable_N3FJP_RIGTX);
} // Fl_Check_Button* btn_enable_N3FJP_RIGTX
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Logging/N3FJP logs"));
config_pages.push_back(p);
tab_tree->add(_("Logging/N3FJP logs"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Logging/Call Lookup"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(208, 24, 585, 131, _("Web Browser lookup"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Round_Button* o = btnQRZWEBnotavailable = new Fl_Round_Button(248, 43, 61, 20, _("None"));
btnQRZWEBnotavailable->tooltip(_("Do not use callsign lookup via web browser"));
btnQRZWEBnotavailable->down_box(FL_DOWN_BOX);
btnQRZWEBnotavailable->value(1);
btnQRZWEBnotavailable->callback((Fl_Callback*)cb_btnQRZWEBnotavailable);
o->value(progdefaults.QRZWEB == QRZWEBNONE);
} // Fl_Round_Button* btnQRZWEBnotavailable
{ Fl_Round_Button* o = btnQRZonline = new Fl_Round_Button(248, 63, 83, 20, _("QRZ on line"));
btnQRZonline->tooltip(_("Visit QRZ web site"));
btnQRZonline->down_box(FL_DOWN_BOX);
btnQRZonline->callback((Fl_Callback*)cb_btnQRZonline);
o->value(progdefaults.QRZWEB == QRZHTML);
} // Fl_Round_Button* btnQRZonline
{ Fl_Round_Button* o = btnHAMCALLonline = new Fl_Round_Button(248, 84, 83, 20, _("HamCall online"));
btnHAMCALLonline->tooltip(_("Visit Hamcall web site"));
btnHAMCALLonline->down_box(FL_DOWN_BOX);
btnHAMCALLonline->callback((Fl_Callback*)cb_btnHAMCALLonline);
o->value(progdefaults.QRZWEB == HAMCALLHTML);
} // Fl_Round_Button* btnHAMCALLonline
{ Fl_Round_Button* o = btnHamQTHonline = new Fl_Round_Button(248, 105, 20, 20, _("HamQTH online"));
btnHamQTHonline->tooltip(_("Visit hamQTH web site"));
btnHamQTHonline->down_box(FL_DOWN_BOX);
btnHamQTHonline->callback((Fl_Callback*)cb_btnHamQTHonline);
o->value(progdefaults.QRZWEB == HAMQTHHTML);
} // Fl_Round_Button* btnHamQTHonline
{ Fl_Round_Button* o = btnCallookOnline = new Fl_Round_Button(248, 126, 20, 20, _("Callook online"));
btnCallookOnline->tooltip(_("Visit hamQTH web site"));
btnCallookOnline->down_box(FL_DOWN_BOX);
btnCallookOnline->callback((Fl_Callback*)cb_btnCallookOnline);
o->value(progdefaults.QRZWEB == CALLOOKHTML);
} // Fl_Round_Button* btnCallookOnline
{ Fl_Input2* o = inp_qrzurl = new Fl_Input2(502, 37, 270, 22, _("QRZ"));
inp_qrzurl->box(FL_DOWN_BOX);
inp_qrzurl->color(FL_BACKGROUND2_COLOR);
inp_qrzurl->selection_color(FL_SELECTION_COLOR);
inp_qrzurl->labeltype(FL_NORMAL_LABEL);
inp_qrzurl->labelfont(0);
inp_qrzurl->labelsize(14);
inp_qrzurl->labelcolor(FL_FOREGROUND_COLOR);
inp_qrzurl->callback((Fl_Callback*)cb_inp_qrzurl);
inp_qrzurl->align(Fl_Align(FL_ALIGN_LEFT));
inp_qrzurl->when(FL_WHEN_RELEASE);
o->value(progdefaults.qrzurl.c_str());
} // Fl_Input2* inp_qrzurl
{ Fl_Input2* o = inp_hamcallurl = new Fl_Input2(502, 64, 270, 22, _("Hamcall"));
inp_hamcallurl->box(FL_DOWN_BOX);
inp_hamcallurl->color(FL_BACKGROUND2_COLOR);
inp_hamcallurl->selection_color(FL_SELECTION_COLOR);
inp_hamcallurl->labeltype(FL_NORMAL_LABEL);
inp_hamcallurl->labelfont(0);
inp_hamcallurl->labelsize(14);
inp_hamcallurl->labelcolor(FL_FOREGROUND_COLOR);
inp_hamcallurl->callback((Fl_Callback*)cb_inp_hamcallurl);
inp_hamcallurl->align(Fl_Align(FL_ALIGN_LEFT));
inp_hamcallurl->when(FL_WHEN_RELEASE);
o->value(progdefaults.hamcallurl.c_str());
} // Fl_Input2* inp_hamcallurl
{ Fl_Input2* o = inp_hamqthurl = new Fl_Input2(502, 92, 270, 22, _("HamQTH"));
inp_hamqthurl->box(FL_DOWN_BOX);
inp_hamqthurl->color(FL_BACKGROUND2_COLOR);
inp_hamqthurl->selection_color(FL_SELECTION_COLOR);
inp_hamqthurl->labeltype(FL_NORMAL_LABEL);
inp_hamqthurl->labelfont(0);
inp_hamqthurl->labelsize(14);
inp_hamqthurl->labelcolor(FL_FOREGROUND_COLOR);
inp_hamqthurl->callback((Fl_Callback*)cb_inp_hamqthurl);
inp_hamqthurl->align(Fl_Align(FL_ALIGN_LEFT));
inp_hamqthurl->when(FL_WHEN_RELEASE);
o->value(progdefaults.hamqthurl.c_str());
} // Fl_Input2* inp_hamqthurl
{ Fl_Input2* o = inp_callook_url = new Fl_Input2(502, 121, 270, 22, _("Callook"));
inp_callook_url->tooltip(_("Callook.info web site"));
inp_callook_url->box(FL_DOWN_BOX);
inp_callook_url->color(FL_BACKGROUND2_COLOR);
inp_callook_url->selection_color(FL_SELECTION_COLOR);
inp_callook_url->labeltype(FL_NORMAL_LABEL);
inp_callook_url->labelfont(0);
inp_callook_url->labelsize(14);
inp_callook_url->labelcolor(FL_FOREGROUND_COLOR);
inp_callook_url->callback((Fl_Callback*)cb_inp_callook_url);
inp_callook_url->align(Fl_Align(FL_ALIGN_LEFT));
inp_callook_url->when(FL_WHEN_RELEASE);
o->value(progdefaults.callookurl.c_str());
} // Fl_Input2* inp_callook_url
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(208, 156, 585, 185, _("Data base lookup"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Round_Button* o = btnQRZXMLnotavailable = new Fl_Round_Button(255, 179, 69, 20, _("None"));
btnQRZXMLnotavailable->tooltip(_("Do not use callsign database"));
btnQRZXMLnotavailable->down_box(FL_DOWN_BOX);
btnQRZXMLnotavailable->value(1);
btnQRZXMLnotavailable->callback((Fl_Callback*)cb_btnQRZXMLnotavailable);
o->value(progdefaults.QRZXML == QRZXMLNONE);
} // Fl_Round_Button* btnQRZXMLnotavailable
{ Fl_Round_Button* o = btnQRZcdrom = new Fl_Round_Button(255, 205, 76, 20, _("QRZ cdrom"));
btnQRZcdrom->tooltip(_("Use CD or hard drive CD image"));
btnQRZcdrom->down_box(FL_DOWN_BOX);
btnQRZcdrom->callback((Fl_Callback*)cb_btnQRZcdrom);
o->value(progdefaults.QRZXML == QRZCD);
} // Fl_Round_Button* btnQRZcdrom
{ Fl_Round_Button* o = btnQRZsub = new Fl_Round_Button(255, 231, 137, 20, _("QRZ.com"));
btnQRZsub->tooltip(_("You need a paid QRZ online\nsubscription to access"));
btnQRZsub->down_box(FL_DOWN_BOX);
btnQRZsub->callback((Fl_Callback*)cb_btnQRZsub);
o->value(progdefaults.QRZXML == QRZNET);
} // Fl_Round_Button* btnQRZsub
{ Fl_Round_Button* o = btnHamcall = new Fl_Round_Button(255, 258, 137, 20, _("Hamcall.net"));
btnHamcall->tooltip(_("You need a paid Hamcall online\nsubscription to access"));
btnHamcall->down_box(FL_DOWN_BOX);
btnHamcall->callback((Fl_Callback*)cb_btnHamcall);
o->value(progdefaults.QRZXML == HAMCALLNET);
} // Fl_Round_Button* btnHamcall
{ Fl_Round_Button* o = btnHamQTH = new Fl_Round_Button(255, 284, 137, 20, _("HamQTH.com"));
btnHamQTH->tooltip(_("Free service courtesy of OK"));
btnHamQTH->down_box(FL_DOWN_BOX);
btnHamQTH->callback((Fl_Callback*)cb_btnHamQTH);
o->value(progdefaults.QRZXML == HAMQTH);
} // Fl_Round_Button* btnHamQTH
{ Fl_Round_Button* o = btnCALLOOK = new Fl_Round_Button(255, 311, 113, 20, _("Callook.info"));
btnCALLOOK->tooltip(_("Callook.info lookup (free service US callsigns only)"));
btnCALLOOK->down_box(FL_DOWN_BOX);
btnCALLOOK->callback((Fl_Callback*)cb_btnCALLOOK);
o->value(progdefaults.QRZXML == CALLOOK);
} // Fl_Round_Button* btnCALLOOK
{ Fl_Input2* o = txtQRZpathname = new Fl_Input2(372, 204, 401, 22);
txtQRZpathname->tooltip(_("ie: /home/dave/CALLBK/ or C:/CALLBK/\nLeave blank to search for database"));
txtQRZpathname->box(FL_DOWN_BOX);
txtQRZpathname->color(FL_BACKGROUND2_COLOR);
txtQRZpathname->selection_color(FL_SELECTION_COLOR);
txtQRZpathname->labeltype(FL_NORMAL_LABEL);
txtQRZpathname->labelfont(0);
txtQRZpathname->labelsize(14);
txtQRZpathname->labelcolor(FL_FOREGROUND_COLOR);
txtQRZpathname->callback((Fl_Callback*)cb_txtQRZpathname);
txtQRZpathname->align(Fl_Align(FL_ALIGN_LEFT));
txtQRZpathname->when(FL_WHEN_RELEASE);
o->value(progdefaults.QRZpathname.c_str());
txtQRZpathname->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* txtQRZpathname
{ Fl_Input2* o = inpQRZusername = new Fl_Input2(482, 230, 163, 22, _("User name"));
inpQRZusername->tooltip(_("Login name for QRZ / Hamcall / HamQTH"));
inpQRZusername->box(FL_DOWN_BOX);
inpQRZusername->color(FL_BACKGROUND2_COLOR);
inpQRZusername->selection_color(FL_SELECTION_COLOR);
inpQRZusername->labeltype(FL_NORMAL_LABEL);
inpQRZusername->labelfont(0);
inpQRZusername->labelsize(14);
inpQRZusername->labelcolor(FL_FOREGROUND_COLOR);
inpQRZusername->callback((Fl_Callback*)cb_inpQRZusername);
inpQRZusername->align(Fl_Align(FL_ALIGN_LEFT));
inpQRZusername->when(FL_WHEN_RELEASE);
o->value(progdefaults.QRZusername.c_str());
inpQRZusername->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpQRZusername
{ Fl_Input2* o = inpQRZuserpassword = new Fl_Input2(482, 257, 163, 22, _("Password"));
inpQRZuserpassword->tooltip(_("Password for QRZ / Hamcall / HamQTH"));
inpQRZuserpassword->box(FL_DOWN_BOX);
inpQRZuserpassword->color(FL_BACKGROUND2_COLOR);
inpQRZuserpassword->selection_color(FL_SELECTION_COLOR);
inpQRZuserpassword->labeltype(FL_NORMAL_LABEL);
inpQRZuserpassword->labelfont(0);
inpQRZuserpassword->labelsize(14);
inpQRZuserpassword->labelcolor(FL_FOREGROUND_COLOR);
inpQRZuserpassword->callback((Fl_Callback*)cb_inpQRZuserpassword);
inpQRZuserpassword->align(Fl_Align(FL_ALIGN_LEFT));
inpQRZuserpassword->when(FL_WHEN_RELEASE);
o->value(progdefaults.QRZuserpassword.c_str());
o->type(FL_SECRET_INPUT);
inpQRZuserpassword->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpQRZuserpassword
{ btnQRZpasswordShow = new Fl_Button(657, 257, 76, 22, _("Show"));
btnQRZpasswordShow->tooltip(_("Show password in plain text"));
btnQRZpasswordShow->callback((Fl_Callback*)cb_btnQRZpasswordShow);
} // Fl_Button* btnQRZpasswordShow
{ Fl_Group* o = new Fl_Group(377, 307, 403, 27);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_notes_address = new Fl_Check_Button(401, 313, 207, 15, _("Add address to notes field"));
btn_notes_address->down_box(FL_DOWN_BOX);
btn_notes_address->callback((Fl_Callback*)cb_btn_notes_address);
o->value(progdefaults.notes_address);
} // Fl_Check_Button* btn_notes_address
{ Fl_Check_Button* o = btn_clear_notes = new Fl_Check_Button(628, 313, 122, 15, _("clear old data"));
btn_clear_notes->down_box(FL_DOWN_BOX);
btn_clear_notes->callback((Fl_Callback*)cb_btn_clear_notes);
o->value(progdefaults.clear_notes);
} // Fl_Check_Button* btn_clear_notes
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Logging/Call Lookup"));
config_pages.push_back(p);
tab_tree->add(_("Logging/Call Lookup"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Logging/eQSL"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Input2* o = inpEQSL_www_url = new Fl_Input2(355, 20, 390, 22, _("www url"));
inpEQSL_www_url->tooltip(_("Your login name"));
inpEQSL_www_url->box(FL_DOWN_BOX);
inpEQSL_www_url->color(FL_BACKGROUND2_COLOR);
inpEQSL_www_url->selection_color(FL_SELECTION_COLOR);
inpEQSL_www_url->labeltype(FL_NORMAL_LABEL);
inpEQSL_www_url->labelfont(0);
inpEQSL_www_url->labelsize(14);
inpEQSL_www_url->labelcolor(FL_FOREGROUND_COLOR);
inpEQSL_www_url->callback((Fl_Callback*)cb_inpEQSL_www_url);
inpEQSL_www_url->align(Fl_Align(FL_ALIGN_LEFT));
inpEQSL_www_url->when(FL_WHEN_RELEASE);
o->value(progdefaults.eqsl_www_url.c_str());
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpEQSL_www_url
{ Fl_Input2* o = inpEQSL_id = new Fl_Input2(354, 43, 150, 22, _("User ID"));
inpEQSL_id->tooltip(_("Your login name"));
inpEQSL_id->box(FL_DOWN_BOX);
inpEQSL_id->color(FL_BACKGROUND2_COLOR);
inpEQSL_id->selection_color(FL_SELECTION_COLOR);
inpEQSL_id->labeltype(FL_NORMAL_LABEL);
inpEQSL_id->labelfont(0);
inpEQSL_id->labelsize(14);
inpEQSL_id->labelcolor(FL_FOREGROUND_COLOR);
inpEQSL_id->callback((Fl_Callback*)cb_inpEQSL_id);
inpEQSL_id->align(Fl_Align(FL_ALIGN_LEFT));
inpEQSL_id->when(FL_WHEN_RELEASE);
o->value(progdefaults.eqsl_id.c_str());
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpEQSL_id
{ Fl_Input2* o = inpEQSL_pwd = new Fl_Input2(354, 66, 150, 22, _("Password"));
inpEQSL_pwd->tooltip(_("Your login password"));
inpEQSL_pwd->box(FL_DOWN_BOX);
inpEQSL_pwd->color(FL_BACKGROUND2_COLOR);
inpEQSL_pwd->selection_color(FL_SELECTION_COLOR);
inpEQSL_pwd->labeltype(FL_NORMAL_LABEL);
inpEQSL_pwd->labelfont(0);
inpEQSL_pwd->labelsize(14);
inpEQSL_pwd->labelcolor(FL_FOREGROUND_COLOR);
inpEQSL_pwd->callback((Fl_Callback*)cb_inpEQSL_pwd);
inpEQSL_pwd->align(Fl_Align(FL_ALIGN_LEFT));
inpEQSL_pwd->when(FL_WHEN_RELEASE);
o->value(progdefaults.eqsl_pwd.c_str());
o->type(FL_SECRET_INPUT);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpEQSL_pwd
{ btnEQSL_pwd_show = new Fl_Button(510, 66, 70, 22, _("Show"));
btnEQSL_pwd_show->tooltip(_("Show password in plain text"));
btnEQSL_pwd_show->callback((Fl_Callback*)cb_btnEQSL_pwd_show);
} // Fl_Button* btnEQSL_pwd_show
{ Fl_Input2* o = inpEQSL_nick = new Fl_Input2(354, 90, 150, 22, _("QTH Nickname"));
inpEQSL_nick->tooltip(_("Your login name"));
inpEQSL_nick->box(FL_DOWN_BOX);
inpEQSL_nick->color(FL_BACKGROUND2_COLOR);
inpEQSL_nick->selection_color(FL_SELECTION_COLOR);
inpEQSL_nick->labeltype(FL_NORMAL_LABEL);
inpEQSL_nick->labelfont(0);
inpEQSL_nick->labelsize(14);
inpEQSL_nick->labelcolor(FL_FOREGROUND_COLOR);
inpEQSL_nick->callback((Fl_Callback*)cb_inpEQSL_nick);
inpEQSL_nick->align(Fl_Align(FL_ALIGN_LEFT));
inpEQSL_nick->when(FL_WHEN_RELEASE);
o->value(progdefaults.eqsl_nick.c_str());
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpEQSL_nick
{ btn_verify_eqsl = new Fl_Button(675, 90, 70, 22, _("Verify"));
btn_verify_eqsl->tooltip(_("Verify database with eQSL download file"));
btn_verify_eqsl->callback((Fl_Callback*)cb_btn_verify_eqsl);
} // Fl_Button* btn_verify_eqsl
{ Fl_Group* o = new Fl_Group(242, 118, 516, 223, _("Options"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_send_when_logged = new Fl_Check_Button(326, 127, 70, 15, _("send when logged (log button, <LOG>, <LNW>)"));
btn_send_when_logged->tooltip(_("automatic data upload"));
btn_send_when_logged->down_box(FL_DOWN_BOX);
btn_send_when_logged->callback((Fl_Callback*)cb_btn_send_when_logged);
o->value(progdefaults.eqsl_when_logged);
} // Fl_Check_Button* btn_send_when_logged
{ Fl_Check_Button* o = btn_send_datetime_off = new Fl_Check_Button(326, 147, 70, 15, _("Use date/time off for log entry"));
btn_send_datetime_off->tooltip(_("default uses date/time on"));
btn_send_datetime_off->down_box(FL_DOWN_BOX);
btn_send_datetime_off->callback((Fl_Callback*)cb_btn_send_datetime_off);
o->value(progdefaults.eqsl_datetime_off);
} // Fl_Check_Button* btn_send_datetime_off
{ Fl_Check_Button* o = btn_show_eqsl_delivery = new Fl_Check_Button(326, 167, 70, 15, _("Show delivery message"));
btn_show_eqsl_delivery->tooltip(_("Display timed delivery message if enabled"));
btn_show_eqsl_delivery->down_box(FL_DOWN_BOX);
btn_show_eqsl_delivery->callback((Fl_Callback*)cb_btn_show_eqsl_delivery);
o->value(progdefaults.eqsl_show_delivery);
} // Fl_Check_Button* btn_show_eqsl_delivery
{ Fl_Input2* o = txt_eqsl_default_message = new Fl_Input2(295, 208, 451, 40, _("Default message"));
txt_eqsl_default_message->tooltip(_("default text to send with <LOG> etc"));
txt_eqsl_default_message->type(4);
txt_eqsl_default_message->box(FL_DOWN_BOX);
txt_eqsl_default_message->color(FL_BACKGROUND2_COLOR);
txt_eqsl_default_message->selection_color(FL_SELECTION_COLOR);
txt_eqsl_default_message->labeltype(FL_NORMAL_LABEL);
txt_eqsl_default_message->labelfont(0);
txt_eqsl_default_message->labelsize(14);
txt_eqsl_default_message->labelcolor(FL_FOREGROUND_COLOR);
txt_eqsl_default_message->callback((Fl_Callback*)cb_txt_eqsl_default_message);
txt_eqsl_default_message->align(Fl_Align(FL_ALIGN_TOP_LEFT));
txt_eqsl_default_message->when(FL_WHEN_CHANGED);
o->value(progdefaults.eqsl_default_message.c_str());
} // Fl_Input2* txt_eqsl_default_message
{ Fl_Group* o = new Fl_Group(258, 254, 481, 81, _("Text Tags (tags use {} delimiters)"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ eqsl_txt1 = new Fl_Box(264, 294, 220, 17, _(" {CALL} other ops call sign"));
eqsl_txt1->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* eqsl_txt1
{ eqsl_txt2 = new Fl_Box(262, 313, 220, 17, _(" {MODE} full mode / submode"));
eqsl_txt2->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* eqsl_txt2
{ eqsl_txt3 = new Fl_Box(510, 294, 220, 17, _("{NAME} other ops name"));
eqsl_txt3->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* eqsl_txt3
{ new Fl_Box(280, 273, 440, 17, _("These tags can also be used in <EQSL:[message]>"));
} // Fl_Box* o
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Logging/eQSL"));
config_pages.push_back(p);
tab_tree->add(_("Logging/eQSL"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Logging/LoTW"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Input2* o = txt_lotw_pathname = new Fl_Input2(283, 50, 422, 24, _("tqsl:"));
txt_lotw_pathname->tooltip(_("Enter full path-filename for tqsl executable"));
txt_lotw_pathname->box(FL_DOWN_BOX);
txt_lotw_pathname->color(FL_BACKGROUND2_COLOR);
txt_lotw_pathname->selection_color(FL_SELECTION_COLOR);
txt_lotw_pathname->labeltype(FL_NORMAL_LABEL);
txt_lotw_pathname->labelfont(0);
txt_lotw_pathname->labelsize(14);
txt_lotw_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_lotw_pathname->callback((Fl_Callback*)cb_txt_lotw_pathname);
txt_lotw_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_lotw_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.lotw_pathname.c_str());
} // Fl_Input2* txt_lotw_pathname
{ Fl_Input2* o = inpLOTW_pwd = new Fl_Input2(283, 85, 225, 24, _("Password"));
inpLOTW_pwd->tooltip(_("Your tqsl login password"));
inpLOTW_pwd->box(FL_DOWN_BOX);
inpLOTW_pwd->color(FL_BACKGROUND2_COLOR);
inpLOTW_pwd->selection_color(FL_SELECTION_COLOR);
inpLOTW_pwd->labeltype(FL_NORMAL_LABEL);
inpLOTW_pwd->labelfont(0);
inpLOTW_pwd->labelsize(14);
inpLOTW_pwd->labelcolor(FL_FOREGROUND_COLOR);
inpLOTW_pwd->callback((Fl_Callback*)cb_inpLOTW_pwd);
inpLOTW_pwd->align(Fl_Align(FL_ALIGN_LEFT));
inpLOTW_pwd->when(FL_WHEN_RELEASE);
o->value(progdefaults.lotw_pwd.c_str());
o->type(FL_SECRET_INPUT);
inpLOTW_pwd->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpLOTW_pwd
{ Fl_Check_Button* o = btn_submit_lotw_password = new Fl_Check_Button(605, 89, 162, 16, _("Password required"));
btn_submit_lotw_password->tooltip(_("Submit password with each upload"));
btn_submit_lotw_password->down_box(FL_DOWN_BOX);
btn_submit_lotw_password->callback((Fl_Callback*)cb_btn_submit_lotw_password);
o->value(progdefaults.submit_lotw_password);
} // Fl_Check_Button* btn_submit_lotw_password
{ Fl_Input2* o = inpLOTW_location = new Fl_Input2(283, 116, 250, 24, _("Location"));
inpLOTW_location->tooltip(_("tqsl station location"));
inpLOTW_location->box(FL_DOWN_BOX);
inpLOTW_location->color(FL_BACKGROUND2_COLOR);
inpLOTW_location->selection_color(FL_SELECTION_COLOR);
inpLOTW_location->labeltype(FL_NORMAL_LABEL);
inpLOTW_location->labelfont(0);
inpLOTW_location->labelsize(14);
inpLOTW_location->labelcolor(FL_FOREGROUND_COLOR);
inpLOTW_location->callback((Fl_Callback*)cb_inpLOTW_location);
inpLOTW_location->align(Fl_Align(FL_ALIGN_LEFT));
inpLOTW_location->when(FL_WHEN_RELEASE);
o->value(progdefaults.lotw_location.c_str());
inpLOTW_pwd->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpLOTW_location
{ btn_select_lotw = new Fl_Button(710, 50, 70, 24, _("Locate"));
btn_select_lotw->tooltip(_("Locate tqsl executable"));
btn_select_lotw->callback((Fl_Callback*)cb_btn_select_lotw);
} // Fl_Button* btn_select_lotw
{ Fl_Check_Button* o = btn_lotw_quiet_mode = new Fl_Check_Button(243, 149, 309, 16, _("Quiet mode [-q], do not open tqsl dialog"));
btn_lotw_quiet_mode->tooltip(_("Operate tqsl in batch mode (no dialog)"));
btn_lotw_quiet_mode->down_box(FL_DOWN_BOX);
btn_lotw_quiet_mode->callback((Fl_Callback*)cb_btn_lotw_quiet_mode);
o->value(progdefaults.lotw_quiet_mode);
} // Fl_Check_Button* btn_lotw_quiet_mode
{ Fl_Check_Button* o = btn_submit_lotw = new Fl_Check_Button(243, 176, 289, 16, _("Send QSO data to LoTW when logged"));
btn_submit_lotw->tooltip(_("Submit each QSO as logged"));
btn_submit_lotw->down_box(FL_DOWN_BOX);
btn_submit_lotw->callback((Fl_Callback*)cb_btn_submit_lotw);
o->value(progdefaults.submit_lotw);
} // Fl_Check_Button* btn_submit_lotw
{ Fl_Check_Button* o = btn_show_lotw_delivery = new Fl_Check_Button(243, 203, 70, 15, _("Show delivery message"));
btn_show_lotw_delivery->tooltip(_("Display timed delivery message if enabled"));
btn_show_lotw_delivery->down_box(FL_DOWN_BOX);
btn_show_lotw_delivery->callback((Fl_Callback*)cb_btn_show_lotw_delivery);
o->value(progdefaults.lotw_show_delivery);
} // Fl_Check_Button* btn_show_lotw_delivery
{ btn_export_lotw = new Fl_Button(216, 232, 70, 24, _("Export"));
btn_export_lotw->tooltip(_("Export records for LoTW upload"));
btn_export_lotw->callback((Fl_Callback*)cb_btn_export_lotw);
} // Fl_Button* btn_export_lotw
{ btn_review_lotw = new Fl_Button(216, 259, 70, 24, _("Check"));
btn_review_lotw->tooltip(_("Review lotw.adif file before sending with tqsl"));
btn_review_lotw->callback((Fl_Callback*)cb_btn_review_lotw);
} // Fl_Button* btn_review_lotw
{ btn_send_lotw = new Fl_Button(216, 287, 70, 24, _("Send"));
btn_send_lotw->tooltip(_("Send lotw.adif via tqsl"));
btn_send_lotw->callback((Fl_Callback*)cb_btn_send_lotw);
} // Fl_Button* btn_send_lotw
{ Fl_Box* o = new Fl_Box(291, 232, 346, 24, _("Export logbook records for LoTW upload"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(291, 259, 346, 24, _("Review / edit the exported LoTW upload adif file"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(291, 287, 346, 24, _("Submit the upload adif file to LoTW"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(212, 22, 574, 24, _("You must have tqsl installed and it\'s location recorded for LoTW updates to \
work!"));
o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ btnLOTW_pwd_show = new Fl_Button(516, 85, 70, 24, _("Show"));
btnLOTW_pwd_show->tooltip(_("Show password in plain text"));
btnLOTW_pwd_show->callback((Fl_Callback*)cb_btnLOTW_pwd_show);
} // Fl_Button* btnLOTW_pwd_show
{ Fl_Box* o = new Fl_Box(540, 116, 211, 24, _("Use this tqsl station location"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ btn_verify_lotw = new Fl_Button(216, 315, 70, 24, _("Match"));
btn_verify_lotw->tooltip(_("Verify database with LoTW download file"));
btn_verify_lotw->callback((Fl_Callback*)cb_btn_verify_lotw);
} // Fl_Button* btn_verify_lotw
{ Fl_Box* o = new Fl_Box(291, 315, 346, 24, _("Match logbook records with LoTW download file"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ btn_view_unmatched = new Fl_Button(645, 313, 139, 24, _("View Unmatched"));
btn_view_unmatched->tooltip(_("Verify database with LoTW download file"));
btn_view_unmatched->callback((Fl_Callback*)cb_btn_view_unmatched);
btn_view_unmatched->deactivate();
} // Fl_Button* btn_view_unmatched
{ Fl_Counter* o = cnt_tracefile_timeout = new Fl_Counter(647, 146, 79, 21, _("Timeout"));
cnt_tracefile_timeout->tooltip(_("Wait NN seconds for LoTW response"));
cnt_tracefile_timeout->type(1);
cnt_tracefile_timeout->minimum(4);
cnt_tracefile_timeout->maximum(60);
cnt_tracefile_timeout->step(1);
cnt_tracefile_timeout->value(5);
cnt_tracefile_timeout->callback((Fl_Callback*)cb_cnt_tracefile_timeout);
cnt_tracefile_timeout->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.tracefile_timeout);
} // Fl_Counter* cnt_tracefile_timeout
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Logging/LoTW"));
config_pages.push_back(p);
tab_tree->add(_("Logging/LoTW"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Logging/QSO logging"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Check_Button* o = btnNagMe = new Fl_Check_Button(255, 63, 236, 20, _("Prompt to save log on exit"));
btnNagMe->tooltip(_("Bug me about saving log entries"));
btnNagMe->down_box(FL_DOWN_BOX);
btnNagMe->callback((Fl_Callback*)cb_btnNagMe);
o->value(progdefaults.NagMe);
} // Fl_Check_Button* btnNagMe
{ Fl_Check_Button* o = btnClearOnSave = new Fl_Check_Button(255, 92, 236, 20, _("Clear on save"));
btnClearOnSave->tooltip(_("Clear log entries after saving or using macro <LOG>"));
btnClearOnSave->down_box(FL_DOWN_BOX);
btnClearOnSave->callback((Fl_Callback*)cb_btnClearOnSave);
o->value(progdefaults.ClearOnSave);
} // Fl_Check_Button* btnClearOnSave
{ Fl_Check_Button* o = btnCallUpperCase = new Fl_Check_Button(255, 121, 236, 20, _("Convert callsign to upper case"));
btnCallUpperCase->tooltip(_("Force callsign field to UPPERCASE"));
btnCallUpperCase->down_box(FL_DOWN_BOX);
btnCallUpperCase->callback((Fl_Callback*)cb_btnCallUpperCase);
o->value(progdefaults.calluppercase);
} // Fl_Check_Button* btnCallUpperCase
{ Fl_Check_Button* o = btnAutoFillQSO = new Fl_Check_Button(255, 151, 236, 20, _("Auto-fill Country and Azimuth"));
btnAutoFillQSO->tooltip(_("Fill in Country / Azimuth using cty.dat information"));
btnAutoFillQSO->down_box(FL_DOWN_BOX);
btnAutoFillQSO->callback((Fl_Callback*)cb_btnAutoFillQSO);
o->value(progdefaults.autofill_qso_fields);
} // Fl_Check_Button* btnAutoFillQSO
{ Fl_Check_Button* o = btnDateTimeSort = new Fl_Check_Button(508, 63, 190, 20, _("Sort by Date/Time OFF"));
btnDateTimeSort->tooltip(_("Sort by date/time OFF - effects all ADIF/Cabrillo reports"));
btnDateTimeSort->down_box(FL_DOWN_BOX);
btnDateTimeSort->callback((Fl_Callback*)cb_btnDateTimeSort);
o->value(progdefaults.sort_date_time_off);
} // Fl_Check_Button* btnDateTimeSort
{ Fl_Check_Button* o = btndate_time_force = new Fl_Check_Button(508, 92, 190, 20, _("Date time ON == OFF"));
btndate_time_force->tooltip(_("Force date/time ON == date/time OFF"));
btndate_time_force->down_box(FL_DOWN_BOX);
btndate_time_force->callback((Fl_Callback*)cb_btndate_time_force);
o->value(progdefaults.force_date_time);
} // Fl_Check_Button* btndate_time_force
{ Fl_Check_Button* o = btnRSTindefault = new Fl_Check_Button(508, 121, 213, 20, _("Default RST in to 599/59"));
btnRSTindefault->tooltip(_("Clear log controls sets RST in to 599/59"));
btnRSTindefault->down_box(FL_DOWN_BOX);
btnRSTindefault->callback((Fl_Callback*)cb_btnRSTindefault);
o->value(progdefaults.RSTin_default);
} // Fl_Check_Button* btnRSTindefault
{ Fl_Check_Button* o = btnRSTdefault = new Fl_Check_Button(508, 151, 216, 20, _("Default RST out to 599/59"));
btnRSTdefault->tooltip(_("Clear log controls sets RST out to 599/59"));
btnRSTdefault->down_box(FL_DOWN_BOX);
btnRSTdefault->callback((Fl_Callback*)cb_btnRSTdefault);
o->value(progdefaults.RSTdefault);
} // Fl_Check_Button* btnRSTdefault
{ Fl_Input2* o = txt_cty_dat_pathname = new Fl_Input2(375, 212, 346, 24, _("cty.dat folder"));
txt_cty_dat_pathname->tooltip(_("Enter full path-name for cty.dat folder"));
txt_cty_dat_pathname->box(FL_DOWN_BOX);
txt_cty_dat_pathname->color(FL_BACKGROUND2_COLOR);
txt_cty_dat_pathname->selection_color(FL_SELECTION_COLOR);
txt_cty_dat_pathname->labeltype(FL_NORMAL_LABEL);
txt_cty_dat_pathname->labelfont(0);
txt_cty_dat_pathname->labelsize(14);
txt_cty_dat_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_cty_dat_pathname->callback((Fl_Callback*)cb_txt_cty_dat_pathname);
txt_cty_dat_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_cty_dat_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.cty_dat_pathname.c_str());
} // Fl_Input2* txt_cty_dat_pathname
{ btn_select_cty_dat = new Fl_Button(256, 241, 75, 24, _("Browse"));
btn_select_cty_dat->tooltip(_("Locate cty.dat file"));
btn_select_cty_dat->callback((Fl_Callback*)cb_btn_select_cty_dat);
} // Fl_Button* btn_select_cty_dat
{ btn_default_cty_dat = new Fl_Button(351, 241, 75, 24, _("Default"));
btn_default_cty_dat->tooltip(_("Restore cty.dat default folder"));
btn_default_cty_dat->callback((Fl_Callback*)cb_btn_default_cty_dat);
} // Fl_Button* btn_default_cty_dat
{ btn_reload_cty_dat = new Fl_Button(446, 241, 75, 24, _("Reload"));
btn_reload_cty_dat->tooltip(_("Reload cty.dat"));
btn_reload_cty_dat->callback((Fl_Callback*)cb_btn_reload_cty_dat);
} // Fl_Button* btn_reload_cty_dat
{ Fl_Input2* o = inpMyPower = new Fl_Input2(671, 241, 50, 24, _("Transmit Power"));
inpMyPower->tooltip(_("Tx power used for logbook entries"));
inpMyPower->box(FL_DOWN_BOX);
inpMyPower->color(FL_BACKGROUND2_COLOR);
inpMyPower->selection_color(FL_SELECTION_COLOR);
inpMyPower->labeltype(FL_NORMAL_LABEL);
inpMyPower->labelfont(0);
inpMyPower->labelsize(14);
inpMyPower->labelcolor(FL_FOREGROUND_COLOR);
inpMyPower->callback((Fl_Callback*)cb_inpMyPower);
inpMyPower->align(Fl_Align(FL_ALIGN_LEFT));
inpMyPower->when(FL_WHEN_RELEASE);
o->value(progdefaults.mytxpower.c_str());
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpMyPower
{ Fl_Check_Button* o = btnDisplayLogbookRead = new Fl_Check_Button(255, 181, 277, 20, _("Display logbook read datum at start"));
btnDisplayLogbookRead->tooltip(_("The filename is written to the RX text area"));
btnDisplayLogbookRead->down_box(FL_DOWN_BOX);
btnDisplayLogbookRead->callback((Fl_Callback*)cb_btnDisplayLogbookRead);
o->value(progdefaults.DisplayLogbookRead);
} // Fl_Check_Button* btnDisplayLogbookRead
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Logging/QSO logging"));
config_pages.push_back(p);
tab_tree->add(_("Logging/QSO logging"));
tab_tree->close(_("Logging"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/CW/General"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(225, 37, 560, 147, _("Receive"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnCWuseSOMdecoding = new Fl_Check_Button(296, 72, 125, 20, _("SOM decoding"));
btnCWuseSOMdecoding->tooltip(_("Self Organizing Mapping"));
btnCWuseSOMdecoding->down_box(FL_DOWN_BOX);
btnCWuseSOMdecoding->value(1);
btnCWuseSOMdecoding->callback((Fl_Callback*)cb_btnCWuseSOMdecoding);
o->value(progdefaults.CWuseSOMdecoding);
} // Fl_Check_Button* btnCWuseSOMdecoding
{ Fl_Check_Button* o = btnCWrcvTrack = new Fl_Check_Button(450, 72, 80, 20, _("WPM Tracking"));
btnCWrcvTrack->tooltip(_("Automatic Rx speed tracking"));
btnCWrcvTrack->down_box(FL_DOWN_BOX);
btnCWrcvTrack->value(1);
btnCWrcvTrack->callback((Fl_Callback*)cb_btnCWrcvTrack);
o->value(progdefaults.CWtrack);
} // Fl_Check_Button* btnCWrcvTrack
{ Fl_Value_Slider2* o = sldrCWbandwidth = new Fl_Value_Slider2(250, 113, 250, 20, _("Filter bandwidth"));
sldrCWbandwidth->tooltip(_("CW dsp filter bandwidth"));
sldrCWbandwidth->type(1);
sldrCWbandwidth->box(FL_DOWN_BOX);
sldrCWbandwidth->color(FL_BACKGROUND_COLOR);
sldrCWbandwidth->selection_color(FL_BACKGROUND_COLOR);
sldrCWbandwidth->labeltype(FL_NORMAL_LABEL);
sldrCWbandwidth->labelfont(0);
sldrCWbandwidth->labelsize(14);
sldrCWbandwidth->labelcolor(FL_FOREGROUND_COLOR);
sldrCWbandwidth->minimum(10);
sldrCWbandwidth->maximum(400);
sldrCWbandwidth->step(1);
sldrCWbandwidth->value(66);
sldrCWbandwidth->textsize(14);
sldrCWbandwidth->callback((Fl_Callback*)cb_sldrCWbandwidth);
sldrCWbandwidth->align(Fl_Align(FL_ALIGN_TOP_LEFT));
sldrCWbandwidth->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWbandwidth);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* sldrCWbandwidth
{ Fl_Check_Button* o = btnCWmfilt = new Fl_Check_Button(503, 113, 80, 20, _("Matched Filt\'"));
btnCWmfilt->tooltip(_("Matched Filter bandwidth"));
btnCWmfilt->down_box(FL_DOWN_BOX);
btnCWmfilt->value(1);
btnCWmfilt->callback((Fl_Callback*)cb_btnCWmfilt);
o->value(progdefaults.CWmfilt);
} // Fl_Check_Button* btnCWmfilt
{ valCWrcvWPM = new Fl_Value_Output(250, 152, 35, 20, _("Rx WPM"));
valCWrcvWPM->color(FL_BACKGROUND2_COLOR);
valCWrcvWPM->callback((Fl_Callback*)cb_valCWrcvWPM);
valCWrcvWPM->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Output* valCWrcvWPM
{ prgsCWrcvWPM = new Fl_Progress(286, 152, 214, 20);
prgsCWrcvWPM->tooltip(_("Tracked CW speed in WPM"));
prgsCWrcvWPM->color(FL_BACKGROUND_COLOR);
prgsCWrcvWPM->selection_color(FL_SELECTION_COLOR);
prgsCWrcvWPM->align(Fl_Align(FL_ALIGN_CENTER));
} // Fl_Progress* prgsCWrcvWPM
{ Fl_Counter2* o = cntLower = new Fl_Counter2(409, 72, 65, 20, _("Lower"));
cntLower->tooltip(_("Detector low threshold"));
cntLower->type(1);
cntLower->box(FL_UP_BOX);
cntLower->color(FL_BACKGROUND_COLOR);
cntLower->selection_color(FL_INACTIVE_COLOR);
cntLower->labeltype(FL_NORMAL_LABEL);
cntLower->labelfont(0);
cntLower->labelsize(14);
cntLower->labelcolor(FL_FOREGROUND_COLOR);
cntLower->minimum(0.01);
cntLower->maximum(0.99);
cntLower->step(0.01);
cntLower->value(0.45);
cntLower->callback((Fl_Callback*)cb_cntLower);
cntLower->align(Fl_Align(FL_ALIGN_TOP));
cntLower->when(FL_WHEN_CHANGED);
cntLower->hide();
o->value(progdefaults.CWlower);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntLower
{ Fl_Counter2* o = cntUpper = new Fl_Counter2(502, 72, 65, 20, _("Upper"));
cntUpper->tooltip(_("Detector high threshold"));
cntUpper->type(1);
cntUpper->box(FL_UP_BOX);
cntUpper->color(FL_BACKGROUND_COLOR);
cntUpper->selection_color(FL_INACTIVE_COLOR);
cntUpper->labeltype(FL_NORMAL_LABEL);
cntUpper->labelfont(0);
cntUpper->labelsize(14);
cntUpper->labelcolor(FL_FOREGROUND_COLOR);
cntUpper->minimum(0.01);
cntUpper->maximum(0.99);
cntUpper->step(0.01);
cntUpper->value(0.55);
cntUpper->callback((Fl_Callback*)cb_cntUpper);
cntUpper->align(Fl_Align(FL_ALIGN_TOP));
cntUpper->when(FL_WHEN_CHANGED);
cntUpper->hide();
o->value(progdefaults.CWupper);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntUpper
{ Fl_Counter2* o = cntCWrange = new Fl_Counter2(503, 151, 65, 20, _("Range"));
cntCWrange->tooltip(_("Range +/- wpm"));
cntCWrange->type(1);
cntCWrange->box(FL_UP_BOX);
cntCWrange->color(FL_BACKGROUND_COLOR);
cntCWrange->selection_color(FL_INACTIVE_COLOR);
cntCWrange->labeltype(FL_NORMAL_LABEL);
cntCWrange->labelfont(0);
cntCWrange->labelsize(14);
cntCWrange->labelcolor(FL_FOREGROUND_COLOR);
cntCWrange->minimum(5);
cntCWrange->maximum(25);
cntCWrange->step(1);
cntCWrange->value(10);
cntCWrange->callback((Fl_Callback*)cb_cntCWrange);
cntCWrange->align(Fl_Align(FL_ALIGN_RIGHT));
cntCWrange->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWrange);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntCWrange
{ Fl_Group* o = new Fl_Group(625, 45, 135, 124, _("Signal tracking"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Choice* o = mnu_cwrx_attack = new Fl_Choice(680, 70, 72, 20, _("Attack"));
mnu_cwrx_attack->down_box(FL_BORDER_BOX);
mnu_cwrx_attack->callback((Fl_Callback*)cb_mnu_cwrx_attack);
o->add("Slow|Med|Fast");
o->value(progdefaults.cwrx_attack);
} // Fl_Choice* mnu_cwrx_attack
{ Fl_Choice* o = mnu_cwrx_decay = new Fl_Choice(680, 105, 72, 20, _("Decay"));
mnu_cwrx_decay->down_box(FL_BORDER_BOX);
mnu_cwrx_decay->callback((Fl_Callback*)cb_mnu_cwrx_decay);
o->add("Slow|Med|Fast");
o->value(progdefaults.cwrx_decay);
} // Fl_Choice* mnu_cwrx_decay
{ btn_cw_tracking_defaults = new Fl_Button(680, 135, 70, 20, _("Defaults"));
btn_cw_tracking_defaults->callback((Fl_Callback*)cb_btn_cw_tracking_defaults);
} // Fl_Button* btn_cw_tracking_defaults
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(225, 184, 560, 161, _("Transmit"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Value_Slider2* o = sldrCWxmtWPM = new Fl_Value_Slider2(250, 213, 440, 20, _("char WPM"));
sldrCWxmtWPM->tooltip(_("My transmit CW WPM"));
sldrCWxmtWPM->type(1);
sldrCWxmtWPM->box(FL_DOWN_BOX);
sldrCWxmtWPM->color(FL_BACKGROUND_COLOR);
sldrCWxmtWPM->selection_color(FL_BACKGROUND_COLOR);
sldrCWxmtWPM->labeltype(FL_NORMAL_LABEL);
sldrCWxmtWPM->labelfont(0);
sldrCWxmtWPM->labelsize(14);
sldrCWxmtWPM->labelcolor(FL_FOREGROUND_COLOR);
sldrCWxmtWPM->minimum(5);
sldrCWxmtWPM->maximum(100);
sldrCWxmtWPM->step(1);
sldrCWxmtWPM->value(20);
sldrCWxmtWPM->textsize(14);
sldrCWxmtWPM->callback((Fl_Callback*)cb_sldrCWxmtWPM);
sldrCWxmtWPM->align(Fl_Align(FL_ALIGN_RIGHT));
sldrCWxmtWPM->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWspeed);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* sldrCWxmtWPM
{ Fl_Counter2* o = cntCWdefWPM = new Fl_Counter2(291, 254, 64, 20, _("Default"));
cntCWdefWPM->tooltip(_("The default CW speed"));
cntCWdefWPM->type(1);
cntCWdefWPM->box(FL_UP_BOX);
cntCWdefWPM->color(FL_BACKGROUND_COLOR);
cntCWdefWPM->selection_color(FL_INACTIVE_COLOR);
cntCWdefWPM->labeltype(FL_NORMAL_LABEL);
cntCWdefWPM->labelfont(0);
cntCWdefWPM->labelsize(14);
cntCWdefWPM->labelcolor(FL_FOREGROUND_COLOR);
cntCWdefWPM->minimum(5);
cntCWdefWPM->maximum(200);
cntCWdefWPM->step(1);
cntCWdefWPM->value(18);
cntCWdefWPM->callback((Fl_Callback*)cb_cntCWdefWPM);
cntCWdefWPM->align(Fl_Align(FL_ALIGN_TOP));
cntCWdefWPM->when(FL_WHEN_CHANGED);
o->value(progdefaults.defCWspeed);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntCWdefWPM
{ Fl_Counter* o = cntCWlowerlimit = new Fl_Counter(445, 254, 65, 20, _("Lower limit"));
cntCWlowerlimit->tooltip(_("No slower than this"));
cntCWlowerlimit->type(1);
cntCWlowerlimit->minimum(5);
cntCWlowerlimit->maximum(20);
cntCWlowerlimit->step(5);
cntCWlowerlimit->value(10);
cntCWlowerlimit->callback((Fl_Callback*)cb_cntCWlowerlimit);
cntCWlowerlimit->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.CWlowerlimit);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter* cntCWlowerlimit
{ Fl_Counter* o = cntCWupperlimit = new Fl_Counter(601, 254, 65, 20, _("Upper limit"));
cntCWupperlimit->tooltip(_("No faster than this"));
cntCWupperlimit->type(1);
cntCWupperlimit->minimum(25);
cntCWupperlimit->maximum(200);
cntCWupperlimit->step(5);
cntCWupperlimit->value(100);
cntCWupperlimit->callback((Fl_Callback*)cb_cntCWupperlimit);
cntCWupperlimit->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.CWupperlimit);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter* cntCWupperlimit
{ Fl_Value_Slider2* o = sldrCWfarnsworth = new Fl_Value_Slider2(250, 308, 440, 20, _("text WPM"));
sldrCWfarnsworth->tooltip(_("My transmit CW WPM"));
sldrCWfarnsworth->type(1);
sldrCWfarnsworth->box(FL_DOWN_BOX);
sldrCWfarnsworth->color(FL_BACKGROUND_COLOR);
sldrCWfarnsworth->selection_color(FL_BACKGROUND_COLOR);
sldrCWfarnsworth->labeltype(FL_NORMAL_LABEL);
sldrCWfarnsworth->labelfont(0);
sldrCWfarnsworth->labelsize(14);
sldrCWfarnsworth->labelcolor(FL_FOREGROUND_COLOR);
sldrCWfarnsworth->minimum(5);
sldrCWfarnsworth->maximum(100);
sldrCWfarnsworth->step(1);
sldrCWfarnsworth->value(20);
sldrCWfarnsworth->textsize(14);
sldrCWfarnsworth->callback((Fl_Callback*)cb_sldrCWfarnsworth);
sldrCWfarnsworth->align(Fl_Align(FL_ALIGN_RIGHT));
sldrCWfarnsworth->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWfarnsworth);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* sldrCWfarnsworth
{ Fl_Check_Button* o = btnCWusefarnsworth = new Fl_Check_Button(270, 285, 180, 15, _("Use Farnsworth timing"));
btnCWusefarnsworth->tooltip(_("text WPM <= char WPM"));
btnCWusefarnsworth->down_box(FL_DOWN_BOX);
btnCWusefarnsworth->callback((Fl_Callback*)cb_btnCWusefarnsworth);
o->value(progdefaults.CWusefarnsworth);
} // Fl_Check_Button* btnCWusefarnsworth
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/General"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/General"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/CW/Timing and QSK"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 28, 590, 124, _("Timing"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter2* o = cntCWdash2dot = new Fl_Counter2(335, 44, 125, 24, _("Dash/Dot"));
cntCWdash2dot->tooltip(_("Dash to dot ratio"));
cntCWdash2dot->box(FL_UP_BOX);
cntCWdash2dot->color(FL_BACKGROUND_COLOR);
cntCWdash2dot->selection_color(FL_INACTIVE_COLOR);
cntCWdash2dot->labeltype(FL_NORMAL_LABEL);
cntCWdash2dot->labelfont(0);
cntCWdash2dot->labelsize(14);
cntCWdash2dot->labelcolor(FL_FOREGROUND_COLOR);
cntCWdash2dot->minimum(2.5);
cntCWdash2dot->maximum(4);
cntCWdash2dot->value(3);
cntCWdash2dot->callback((Fl_Callback*)cb_cntCWdash2dot);
cntCWdash2dot->align(Fl_Align(FL_ALIGN_RIGHT));
cntCWdash2dot->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWdash2dot);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(1);
} // Fl_Counter2* cntCWdash2dot
{ Fl_Counter2* o = cntCWrisetime = new Fl_Counter2(335, 75, 125, 24, _("Edge timing"));
cntCWrisetime->tooltip(_("Leading and Trailing edge risetimes (msec)"));
cntCWrisetime->box(FL_UP_BOX);
cntCWrisetime->color(FL_BACKGROUND_COLOR);
cntCWrisetime->selection_color(FL_INACTIVE_COLOR);
cntCWrisetime->labeltype(FL_NORMAL_LABEL);
cntCWrisetime->labelfont(0);
cntCWrisetime->labelsize(14);
cntCWrisetime->labelcolor(FL_FOREGROUND_COLOR);
cntCWrisetime->minimum(0);
cntCWrisetime->maximum(15);
cntCWrisetime->value(4);
cntCWrisetime->callback((Fl_Callback*)cb_cntCWrisetime);
cntCWrisetime->align(Fl_Align(FL_ALIGN_RIGHT));
cntCWrisetime->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWrisetime);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(1);
} // Fl_Counter2* cntCWrisetime
{ Fl_ListBox* o = i_listboxQSKshape = new Fl_ListBox(335, 108, 125, 24, _("Edge shape"));
i_listboxQSKshape->tooltip(_("Hanning/Blackman - use edge timing\nBPF - use BPF bandwidth"));
i_listboxQSKshape->box(FL_DOWN_BOX);
i_listboxQSKshape->color(FL_BACKGROUND2_COLOR);
i_listboxQSKshape->selection_color(FL_BACKGROUND_COLOR);
i_listboxQSKshape->labeltype(FL_NORMAL_LABEL);
i_listboxQSKshape->labelfont(0);
i_listboxQSKshape->labelsize(14);
i_listboxQSKshape->labelcolor(FL_FOREGROUND_COLOR);
i_listboxQSKshape->callback((Fl_Callback*)cb_i_listboxQSKshape);
i_listboxQSKshape->align(Fl_Align(FL_ALIGN_RIGHT));
i_listboxQSKshape->when(FL_WHEN_RELEASE);
o->add("Hanning|Blackman");
o->index(progdefaults.QSKshape);
o->labelsize(FL_NORMAL_SIZE);
i_listboxQSKshape->end();
} // Fl_ListBox* i_listboxQSKshape
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 155, 590, 153, _("QSK"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnQSK = new Fl_Check_Button(267, 172, 217, 20, _("QSK on right audio channel"));
btnQSK->tooltip(_("Generate square wave signal on right channel"));
btnQSK->down_box(FL_DOWN_BOX);
btnQSK->callback((Fl_Callback*)cb_btnQSK);
o->value(progdefaults.QSK);
} // Fl_Check_Button* btnQSK
{ Fl_Counter2* o = cntQSKfrequency = new Fl_Counter2(215, 206, 125, 24, _("QSK frequency"));
cntQSKfrequency->tooltip(_("Fundamental frequency of QSK square wave signal"));
cntQSKfrequency->box(FL_UP_BOX);
cntQSKfrequency->color(FL_BACKGROUND_COLOR);
cntQSKfrequency->selection_color(FL_INACTIVE_COLOR);
cntQSKfrequency->labeltype(FL_NORMAL_LABEL);
cntQSKfrequency->labelfont(0);
cntQSKfrequency->labelsize(14);
cntQSKfrequency->labelcolor(FL_FOREGROUND_COLOR);
cntQSKfrequency->minimum(800);
cntQSKfrequency->maximum(8000);
cntQSKfrequency->step(5);
cntQSKfrequency->value(3200);
cntQSKfrequency->callback((Fl_Callback*)cb_cntQSKfrequency);
cntQSKfrequency->align(Fl_Align(FL_ALIGN_RIGHT));
cntQSKfrequency->when(FL_WHEN_CHANGED);
o->value(progdefaults.QSKfrequency);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(100);
} // Fl_Counter2* cntQSKfrequency
{ Fl_Counter2* o = cntPreTiming = new Fl_Counter2(476, 206, 125, 24, _("Pre-keydown timing (ms)"));
cntPreTiming->tooltip(_("Msec pre-keydown"));
cntPreTiming->box(FL_UP_BOX);
cntPreTiming->color(FL_BACKGROUND_COLOR);
cntPreTiming->selection_color(FL_INACTIVE_COLOR);
cntPreTiming->labeltype(FL_NORMAL_LABEL);
cntPreTiming->labelfont(0);
cntPreTiming->labelsize(14);
cntPreTiming->labelcolor(FL_FOREGROUND_COLOR);
cntPreTiming->minimum(0);
cntPreTiming->maximum(100);
cntPreTiming->callback((Fl_Callback*)cb_cntPreTiming);
cntPreTiming->align(Fl_Align(FL_ALIGN_RIGHT));
cntPreTiming->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWpre);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(1);
} // Fl_Counter2* cntPreTiming
{ Fl_Counter2* o = cntPostTiming = new Fl_Counter2(476, 237, 125, 24, _("Post-keydown timing (ms)"));
cntPostTiming->tooltip(_("Msec post-keydown"));
cntPostTiming->box(FL_UP_BOX);
cntPostTiming->color(FL_BACKGROUND_COLOR);
cntPostTiming->selection_color(FL_INACTIVE_COLOR);
cntPostTiming->labeltype(FL_NORMAL_LABEL);
cntPostTiming->labelfont(0);
cntPostTiming->labelsize(14);
cntPostTiming->labelcolor(FL_FOREGROUND_COLOR);
cntPostTiming->minimum(0);
cntPostTiming->maximum(100);
cntPostTiming->callback((Fl_Callback*)cb_cntPostTiming);
cntPostTiming->align(Fl_Align(FL_ALIGN_RIGHT));
cntPostTiming->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWpost);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(1);
} // Fl_Counter2* cntPostTiming
{ Fl_Counter2* o = cntQSKamp = new Fl_Counter2(215, 237, 125, 24, _("QSK amplitude"));
cntQSKamp->tooltip(_("Amplitude of right channel QSK signal"));
cntQSKamp->box(FL_UP_BOX);
cntQSKamp->color(FL_BACKGROUND_COLOR);
cntQSKamp->selection_color(FL_INACTIVE_COLOR);
cntQSKamp->labeltype(FL_NORMAL_LABEL);
cntQSKamp->labelfont(0);
cntQSKamp->labelsize(14);
cntQSKamp->labelcolor(FL_FOREGROUND_COLOR);
cntQSKamp->minimum(0);
cntQSKamp->maximum(1);
cntQSKamp->step(0.01);
cntQSKamp->value(0.8);
cntQSKamp->callback((Fl_Callback*)cb_cntQSKamp);
cntQSKamp->align(Fl_Align(FL_ALIGN_RIGHT));
cntQSKamp->when(FL_WHEN_CHANGED);
o->value(progdefaults.QSKamp);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(0.1);
} // Fl_Counter2* cntQSKamp
{ Fl_Counter2* o = cntQSKrisetime = new Fl_Counter2(215, 270, 125, 24, _("Edge timing"));
cntQSKrisetime->tooltip(_("Leading and Trailing edge risetimes (msec)"));
cntQSKrisetime->box(FL_UP_BOX);
cntQSKrisetime->color(FL_BACKGROUND_COLOR);
cntQSKrisetime->selection_color(FL_INACTIVE_COLOR);
cntQSKrisetime->labeltype(FL_NORMAL_LABEL);
cntQSKrisetime->labelfont(0);
cntQSKrisetime->labelsize(14);
cntQSKrisetime->labelcolor(FL_FOREGROUND_COLOR);
cntQSKrisetime->minimum(0);
cntQSKrisetime->maximum(15);
cntQSKrisetime->value(4);
cntQSKrisetime->callback((Fl_Callback*)cb_cntQSKrisetime);
cntQSKrisetime->align(Fl_Align(FL_ALIGN_RIGHT));
cntQSKrisetime->when(FL_WHEN_CHANGED);
o->value(progdefaults.QSKrisetime);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(1);
} // Fl_Counter2* cntQSKrisetime
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 310, 590, 40, _("Send Test character"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ListBox* o = i_listbox_test_char = new Fl_ListBox(391, 319, 112, 22, _("Test char"));
i_listbox_test_char->tooltip(_("Test character for QSK adjustment"));
i_listbox_test_char->box(FL_DOWN_BOX);
i_listbox_test_char->color(FL_BACKGROUND2_COLOR);
i_listbox_test_char->selection_color(FL_BACKGROUND_COLOR);
i_listbox_test_char->labeltype(FL_NORMAL_LABEL);
i_listbox_test_char->labelfont(0);
i_listbox_test_char->labelsize(14);
i_listbox_test_char->labelcolor(FL_FOREGROUND_COLOR);
i_listbox_test_char->callback((Fl_Callback*)cb_i_listbox_test_char);
i_listbox_test_char->align(Fl_Align(FL_ALIGN_RIGHT));
i_listbox_test_char->when(FL_WHEN_RELEASE);
o->add(szTestChar);
o->index(progdefaults.TestChar);
o->labelsize(FL_NORMAL_SIZE);
i_listbox_test_char->end();
} // Fl_ListBox* i_listbox_test_char
{ Fl_Check_Button* o = btnQSKadjust = new Fl_Check_Button(585, 321, 152, 18, _("Send continuously"));
btnQSKadjust->tooltip(_("Send a continuous stream of test characters"));
btnQSKadjust->down_box(FL_DOWN_BOX);
btnQSKadjust->callback((Fl_Callback*)cb_btnQSKadjust);
o->value(progdefaults.QSKadjust);
} // Fl_Check_Button* btnQSKadjust
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/Timing and QSK"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/Timing and QSK"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/CW/Prosigns"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(555, 39, 182, 262, _("Use these for WinKeyer\nand nanoCW"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Box* o = new Fl_Box(615, 70, 59, 22, _("\" RR"));
o->tooltip(_(".-..-."));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 90, 59, 22, _("$ SX"));
o->tooltip(_("...-..-"));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 109, 59, 22, _("\' WG"));
o->tooltip(_(".----."));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 128, 59, 22, _("( KN"));
o->tooltip(_("-.--."));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 147, 59, 22, _(") KK"));
o->tooltip(_("-.--.-"));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 166, 59, 22, _("+ AR"));
o->tooltip(_(".-.-."));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 185, 59, 22, _("< AR"));
o->tooltip(_(".-.-."));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 204, 59, 22, _("> SK"));
o->tooltip(_("...-.-"));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 223, 59, 22, _("= BT"));
o->tooltip(_("-...-"));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 242, 59, 22, _("- DU"));
o->tooltip(_("-....-"));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(615, 263, 59, 22, _("@@ AC"));
o->tooltip(_(".--.-."));
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_ListBox* o = listbox_prosign[0] = new Fl_ListBox(304, 50, 47, 22, _("<BT>"));
listbox_prosign[0]->box(FL_DOWN_BOX);
listbox_prosign[0]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[0]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[0]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[0]->labelfont(0);
listbox_prosign[0]->labelsize(14);
listbox_prosign[0]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[0]->callback((Fl_Callback*)cb_listbox_prosign);
listbox_prosign[0]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[0]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[0];
o->value(s);
o->labelsize(FL_NORMAL_SIZE);
listbox_prosign[0]->end();
} // Fl_ListBox* listbox_prosign[0]
{ Fl_ListBox* o = listbox_prosign[1] = new Fl_ListBox(304, 77, 47, 22, _("<AA>"));
listbox_prosign[1]->box(FL_DOWN_BOX);
listbox_prosign[1]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[1]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[1]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[1]->labelfont(0);
listbox_prosign[1]->labelsize(14);
listbox_prosign[1]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[1]->callback((Fl_Callback*)cb_listbox_prosign1);
listbox_prosign[1]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[1]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[1];
o->value(s);
o->labelsize(FL_NORMAL_SIZE);
listbox_prosign[1]->end();
} // Fl_ListBox* listbox_prosign[1]
{ Fl_ListBox* o = listbox_prosign[2] = new Fl_ListBox(304, 105, 47, 22, _("<AS>"));
listbox_prosign[2]->box(FL_DOWN_BOX);
listbox_prosign[2]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[2]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[2]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[2]->labelfont(0);
listbox_prosign[2]->labelsize(14);
listbox_prosign[2]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[2]->callback((Fl_Callback*)cb_listbox_prosign2);
listbox_prosign[2]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[2]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[2];
o->value(s);
o->labelsize(FL_NORMAL_SIZE);
listbox_prosign[2]->end();
} // Fl_ListBox* listbox_prosign[2]
{ Fl_ListBox* o = listbox_prosign[3] = new Fl_ListBox(304, 132, 47, 22, _("<AR>"));
listbox_prosign[3]->box(FL_DOWN_BOX);
listbox_prosign[3]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[3]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[3]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[3]->labelfont(0);
listbox_prosign[3]->labelsize(14);
listbox_prosign[3]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[3]->callback((Fl_Callback*)cb_listbox_prosign3);
listbox_prosign[3]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[3]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[3];
o->value(s);
listbox_prosign[3]->end();
} // Fl_ListBox* listbox_prosign[3]
{ Fl_ListBox* o = listbox_prosign[4] = new Fl_ListBox(304, 160, 47, 22, _("<SK>"));
listbox_prosign[4]->box(FL_DOWN_BOX);
listbox_prosign[4]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[4]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[4]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[4]->labelfont(0);
listbox_prosign[4]->labelsize(14);
listbox_prosign[4]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[4]->callback((Fl_Callback*)cb_listbox_prosign4);
listbox_prosign[4]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[4]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[4];
o->value(s);
o->labelsize(FL_NORMAL_SIZE);
listbox_prosign[4]->end();
} // Fl_ListBox* listbox_prosign[4]
{ Fl_ListBox* o = listbox_prosign[5] = new Fl_ListBox(304, 188, 47, 22, _("<KN>"));
listbox_prosign[5]->box(FL_DOWN_BOX);
listbox_prosign[5]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[5]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[5]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[5]->labelfont(0);
listbox_prosign[5]->labelsize(14);
listbox_prosign[5]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[5]->callback((Fl_Callback*)cb_listbox_prosign5);
listbox_prosign[5]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[5]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[5];
o->value(s);
o->labelsize(FL_NORMAL_SIZE);
listbox_prosign[5]->end();
} // Fl_ListBox* listbox_prosign[5]
{ Fl_ListBox* o = listbox_prosign[6] = new Fl_ListBox(304, 215, 47, 22, _("<INT>"));
listbox_prosign[6]->box(FL_DOWN_BOX);
listbox_prosign[6]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[6]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[6]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[6]->labelfont(0);
listbox_prosign[6]->labelsize(14);
listbox_prosign[6]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[6]->callback((Fl_Callback*)cb_listbox_prosign6);
listbox_prosign[6]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[6]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[6];
o->value(s);
o->labelsize(FL_NORMAL_SIZE);
listbox_prosign[6]->end();
} // Fl_ListBox* listbox_prosign[6]
{ Fl_ListBox* o = listbox_prosign[7] = new Fl_ListBox(304, 243, 47, 22, _("<HM>"));
listbox_prosign[7]->box(FL_DOWN_BOX);
listbox_prosign[7]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[7]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[7]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[7]->labelfont(0);
listbox_prosign[7]->labelsize(14);
listbox_prosign[7]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[7]->callback((Fl_Callback*)cb_listbox_prosign7);
listbox_prosign[7]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[7]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[7];
o->value(s);
o->labelsize(FL_NORMAL_SIZE);
listbox_prosign[7]->end();
} // Fl_ListBox* listbox_prosign[7]
{ Fl_ListBox* o = listbox_prosign[8] = new Fl_ListBox(304, 271, 47, 22, _("<VE>"));
listbox_prosign[8]->box(FL_DOWN_BOX);
listbox_prosign[8]->color(FL_BACKGROUND2_COLOR);
listbox_prosign[8]->selection_color(FL_BACKGROUND_COLOR);
listbox_prosign[8]->labeltype(FL_NORMAL_LABEL);
listbox_prosign[8]->labelfont(0);
listbox_prosign[8]->labelsize(14);
listbox_prosign[8]->labelcolor(FL_FOREGROUND_COLOR);
listbox_prosign[8]->callback((Fl_Callback*)cb_listbox_prosign8);
listbox_prosign[8]->align(Fl_Align(FL_ALIGN_LEFT));
listbox_prosign[8]->when(FL_WHEN_RELEASE);
o->add(szProsigns);
char s[2] = " "; s[0] = progdefaults.CW_prosigns[8];
o->value(s);
o->labelsize(FL_NORMAL_SIZE);
listbox_prosign[8]->end();
} // Fl_ListBox* listbox_prosign[8]
{ Fl_Check_Button* o = btnCW_use_paren = new Fl_Check_Button(354, 187, 68, 15, _("Use \'(\' paren not KN"));
btnCW_use_paren->down_box(FL_DOWN_BOX);
btnCW_use_paren->callback((Fl_Callback*)cb_btnCW_use_paren);
o->value(progdefaults.CW_use_paren);
} // Fl_Check_Button* btnCW_use_paren
{ Fl_Check_Button* o = btnCW_prosign_display = new Fl_Check_Button(304, 301, 68, 15, _("Display decoded as assigned key"));
btnCW_prosign_display->tooltip(_("Display the decoded prosign in the RX text using the short cut key"));
btnCW_prosign_display->down_box(FL_DOWN_BOX);
btnCW_prosign_display->callback((Fl_Callback*)cb_btnCW_prosign_display);
o->value(progdefaults.CW_prosign_display);
} // Fl_Check_Button* btnCW_prosign_display
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/Prosigns"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/Prosigns"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/CW/Extended Chars."));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 30, 590, 286, _("Check to enable character encode/decode\nSelect one character from each group"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Group* o = new Fl_Group(210, 109, 99, 80);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_A_aelig = new Fl_Check_Button(216, 125, 70, 15, _("A aelig"));
btn_A_aelig->tooltip(_("Swap left/right keyer contacts"));
btn_A_aelig->down_box(FL_DOWN_BOX);
btn_A_aelig->callback((Fl_Callback*)cb_btn_A_aelig);
o->value(progdefaults.A_aelig);
} // Fl_Check_Button* btn_A_aelig
{ Fl_Check_Button* o = btn_A_umlaut = new Fl_Check_Button(216, 162, 70, 15, _(" A umlaut"));
btn_A_umlaut->tooltip(_("Swap left/right keyer contacts"));
btn_A_umlaut->down_box(FL_DOWN_BOX);
btn_A_umlaut->callback((Fl_Callback*)cb_btn_A_umlaut);
o->value(progdefaults.A_umlaut);
} // Fl_Check_Button* btn_A_umlaut
o->end();
} // Fl_Group* o
{ Fl_Check_Button* o = btn_A_ring = new Fl_Check_Button(216, 199, 70, 15, _(" A ring"));
btn_A_ring->tooltip(_("Swap left/right keyer contacts"));
btn_A_ring->down_box(FL_DOWN_BOX);
btn_A_ring->callback((Fl_Callback*)cb_btn_A_ring);
o->value(progdefaults.A_ring);
} // Fl_Check_Button* btn_A_ring
{ Fl_Group* o = new Fl_Group(311, 109, 99, 120);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_O_acute = new Fl_Check_Button(316, 125, 70, 15, _(" O acute"));
btn_O_acute->tooltip(_("Swap left/right keyer contacts"));
btn_O_acute->down_box(FL_DOWN_BOX);
btn_O_acute->callback((Fl_Callback*)cb_btn_O_acute);
o->value(progdefaults.O_acute);
} // Fl_Check_Button* btn_O_acute
{ Fl_Check_Button* o = btn_O_slash = new Fl_Check_Button(316, 199, 70, 15, _(" O slash"));
btn_O_slash->tooltip(_("Swap left/right keyer contacts"));
btn_O_slash->down_box(FL_DOWN_BOX);
btn_O_slash->callback((Fl_Callback*)cb_btn_O_slash);
o->value(progdefaults.O_slash);
} // Fl_Check_Button* btn_O_slash
{ Fl_Check_Button* o = btn_O_umlaut = new Fl_Check_Button(316, 162, 70, 15, _(" O umlaut"));
btn_O_umlaut->tooltip(_("Swap left/right keyer contacts"));
btn_O_umlaut->down_box(FL_DOWN_BOX);
btn_O_umlaut->callback((Fl_Callback*)cb_btn_O_umlaut);
o->value(progdefaults.O_umlaut);
} // Fl_Check_Button* btn_O_umlaut
o->end();
} // Fl_Group* o
{ Fl_Check_Button* o = btn_C_cedilla = new Fl_Check_Button(413, 125, 70, 15, _(" C cedilla"));
btn_C_cedilla->tooltip(_("Swap left/right keyer contacts"));
btn_C_cedilla->down_box(FL_DOWN_BOX);
btn_C_cedilla->callback((Fl_Callback*)cb_btn_C_cedilla);
o->value(progdefaults.C_cedilla);
} // Fl_Check_Button* btn_C_cedilla
{ Fl_Check_Button* o = btn_E_grave = new Fl_Check_Button(511, 125, 70, 15, _(" E grave"));
btn_E_grave->tooltip(_("Swap left/right keyer contacts"));
btn_E_grave->down_box(FL_DOWN_BOX);
btn_E_grave->callback((Fl_Callback*)cb_btn_E_grave);
o->value(progdefaults.E_grave);
} // Fl_Check_Button* btn_E_grave
{ Fl_Check_Button* o = btn_E_acute = new Fl_Check_Button(511, 162, 70, 15, _(" E acute"));
btn_E_acute->tooltip(_("Swap left/right keyer contacts"));
btn_E_acute->down_box(FL_DOWN_BOX);
btn_E_acute->callback((Fl_Callback*)cb_btn_E_acute);
o->value(progdefaults.E_acute);
} // Fl_Check_Button* btn_E_acute
{ Fl_Check_Button* o = btn_N_tilde = new Fl_Check_Button(604, 125, 70, 15, _(" N tilde"));
btn_N_tilde->tooltip(_("Swap left/right keyer contacts"));
btn_N_tilde->down_box(FL_DOWN_BOX);
btn_N_tilde->callback((Fl_Callback*)cb_btn_N_tilde);
o->value(progdefaults.N_tilde);
} // Fl_Check_Button* btn_N_tilde
{ Fl_Group* o = new Fl_Group(690, 109, 99, 80);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_U_umlaut = new Fl_Check_Button(695, 125, 70, 15, _(" U umlaut"));
btn_U_umlaut->tooltip(_("Swap left/right keyer contacts"));
btn_U_umlaut->down_box(FL_DOWN_BOX);
btn_U_umlaut->callback((Fl_Callback*)cb_btn_U_umlaut);
o->value(progdefaults.U_umlaut);
} // Fl_Check_Button* btn_U_umlaut
{ Fl_Check_Button* o = btn_U_circ = new Fl_Check_Button(695, 162, 70, 15, _(" U circ"));
btn_U_circ->tooltip(_("Swap left/right keyer contacts"));
btn_U_circ->down_box(FL_DOWN_BOX);
btn_U_circ->callback((Fl_Callback*)cb_btn_U_circ);
o->value(progdefaults.U_circ);
} // Fl_Check_Button* btn_U_circ
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(310, 249, 403, 45, _("See https://en.wikipedia.org/wiki/Morse_code\nfor information regarding exten\
ded Morse characters."));
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/Extended Chars."));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/Extended Chars."));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Punctuation/Noise Processing"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 30, 590, 185, _("Check to enable character encode/decode"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_CW_backslash = new Fl_Check_Button(265, 65, 70, 15, _(" backslash \\ \".-..-.\""));
btn_CW_backslash->tooltip(_("disable for no printed character"));
btn_CW_backslash->down_box(FL_DOWN_BOX);
btn_CW_backslash->value(1);
btn_CW_backslash->labelfont(4);
btn_CW_backslash->callback((Fl_Callback*)cb_btn_CW_backslash);
o->value(progdefaults.CW_backslash);
} // Fl_Check_Button* btn_CW_backslash
{ Fl_Check_Button* o = btn_CW_single_quote = new Fl_Check_Button(265, 92, 70, 15, _(" single quote \' \".----.\""));
btn_CW_single_quote->tooltip(_("disable for no printed character"));
btn_CW_single_quote->down_box(FL_DOWN_BOX);
btn_CW_single_quote->value(1);
btn_CW_single_quote->labelfont(4);
btn_CW_single_quote->callback((Fl_Callback*)cb_btn_CW_single_quote);
o->value(progdefaults.CW_single_quote);
} // Fl_Check_Button* btn_CW_single_quote
{ Fl_Check_Button* o = btn_CW_dollar_sign = new Fl_Check_Button(265, 120, 70, 15, _(" dollar sign $ \"...-..-\""));
btn_CW_dollar_sign->tooltip(_("disable for no printed character"));
btn_CW_dollar_sign->down_box(FL_DOWN_BOX);
btn_CW_dollar_sign->value(1);
btn_CW_dollar_sign->labelfont(4);
btn_CW_dollar_sign->callback((Fl_Callback*)cb_btn_CW_dollar_sign);
o->value(progdefaults.CW_dollar_sign);
} // Fl_Check_Button* btn_CW_dollar_sign
{ Fl_Check_Button* o = btn_CW_open_paren = new Fl_Check_Button(265, 147, 70, 15, _(" open_paren ( \"-.--.\""));
btn_CW_open_paren->tooltip(_("disable for no printed character"));
btn_CW_open_paren->down_box(FL_DOWN_BOX);
btn_CW_open_paren->value(1);
btn_CW_open_paren->labelfont(4);
btn_CW_open_paren->callback((Fl_Callback*)cb_btn_CW_open_paren);
o->value(progdefaults.CW_open_paren);
} // Fl_Check_Button* btn_CW_open_paren
{ Fl_Check_Button* o = btn_CW_close_paren = new Fl_Check_Button(265, 175, 70, 15, _(" close paren ) \"-.--.-\""));
btn_CW_close_paren->tooltip(_("disable for no printed character"));
btn_CW_close_paren->down_box(FL_DOWN_BOX);
btn_CW_close_paren->value(1);
btn_CW_close_paren->labelfont(4);
btn_CW_close_paren->callback((Fl_Callback*)cb_btn_CW_close_paren);
o->value(progdefaults.CW_close_paren);
} // Fl_Check_Button* btn_CW_close_paren
{ Fl_Check_Button* o = btn_CW_colon = new Fl_Check_Button(535, 65, 70, 15, _(" colon : \"---...\""));
btn_CW_colon->tooltip(_("disable for no printed character"));
btn_CW_colon->down_box(FL_DOWN_BOX);
btn_CW_colon->value(1);
btn_CW_colon->labelfont(4);
btn_CW_colon->callback((Fl_Callback*)cb_btn_CW_colon);
o->value(progdefaults.CW_colon);
} // Fl_Check_Button* btn_CW_colon
{ Fl_Check_Button* o = btn_CW_semi_colon = new Fl_Check_Button(535, 92, 70, 15, _(" semi colon ; \"-.-.-.\""));
btn_CW_semi_colon->tooltip(_("disable for no printed character"));
btn_CW_semi_colon->down_box(FL_DOWN_BOX);
btn_CW_semi_colon->value(1);
btn_CW_semi_colon->labelfont(4);
btn_CW_semi_colon->callback((Fl_Callback*)cb_btn_CW_semi_colon);
o->value(progdefaults.CW_semi_colon);
} // Fl_Check_Button* btn_CW_semi_colon
{ Fl_Check_Button* o = btn_CW_underscore = new Fl_Check_Button(535, 120, 70, 15, _(" underscore _ \"..--.-\""));
btn_CW_underscore->tooltip(_("disable for no printed character"));
btn_CW_underscore->down_box(FL_DOWN_BOX);
btn_CW_underscore->value(1);
btn_CW_underscore->labelfont(4);
btn_CW_underscore->callback((Fl_Callback*)cb_btn_CW_underscore);
o->value(progdefaults.CW_underscore);
} // Fl_Check_Button* btn_CW_underscore
{ Fl_Check_Button* o = btn_CW_at_symbol = new Fl_Check_Button(535, 147, 70, 15, _(" at symbol @@ \".--.-.\""));
btn_CW_at_symbol->tooltip(_("disable for no printed character"));
btn_CW_at_symbol->down_box(FL_DOWN_BOX);
btn_CW_at_symbol->value(1);
btn_CW_at_symbol->labelfont(4);
btn_CW_at_symbol->callback((Fl_Callback*)cb_btn_CW_at_symbol);
o->value(progdefaults.CW_at_symbol);
} // Fl_Check_Button* btn_CW_at_symbol
{ Fl_Check_Button* o = btn_CW_exclamation = new Fl_Check_Button(535, 175, 70, 15, _(" exclamation ! \"-.-.--\""));
btn_CW_exclamation->tooltip(_("disable for no printed character"));
btn_CW_exclamation->down_box(FL_DOWN_BOX);
btn_CW_exclamation->value(1);
btn_CW_exclamation->labelfont(4);
btn_CW_exclamation->callback((Fl_Callback*)cb_btn_CW_exclamation);
o->value(progdefaults.CW_exclamation);
} // Fl_Check_Button* btn_CW_exclamation
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 203, 590, 142, _("Unknown character decode (noise)"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_CW_noise0 = new Fl_Check_Button(265, 226, 193, 24, _(" Do not display unknown MORSE symbol"));
btn_CW_noise0->tooltip(_("disable \'*\'or no printed character"));
btn_CW_noise0->down_box(FL_DOWN_BOX);
btn_CW_noise0->labelfont(4);
btn_CW_noise0->callback((Fl_Callback*)cb_btn_CW_noise0);
o->value(progdefaults.CW_noise == 0);
} // Fl_Check_Button* btn_CW_noise0
{ Fl_Check_Button* o = btn_CW_noise1 = new Fl_Check_Button(265, 254, 193, 24, _(" Display \'*\' character for unknown MORSE symbol"));
btn_CW_noise1->tooltip(_("disable \'*\'or no printed character"));
btn_CW_noise1->down_box(FL_DOWN_BOX);
btn_CW_noise1->labelfont(4);
btn_CW_noise1->callback((Fl_Callback*)cb_btn_CW_noise1);
o->value(progdefaults.CW_noise == '*');
} // Fl_Check_Button* btn_CW_noise1
{ Fl_Check_Button* o = btn_CW_noise2 = new Fl_Check_Button(265, 283, 193, 24, _(" Display \'_\' character for unknown MORSE symbol"));
btn_CW_noise2->tooltip(_("disable \'_\' for no printed character"));
btn_CW_noise2->down_box(FL_DOWN_BOX);
btn_CW_noise2->labelfont(4);
btn_CW_noise2->callback((Fl_Callback*)cb_btn_CW_noise2);
o->value(progdefaults.CW_noise == '_');
} // Fl_Check_Button* btn_CW_noise2
{ Fl_Check_Button* o = btn_CW_noise3 = new Fl_Check_Button(265, 312, 193, 24, _(" Display \' \' character for unknown MORSE symbol"));
btn_CW_noise3->tooltip(_("disable \' \' for no printed character"));
btn_CW_noise3->down_box(FL_DOWN_BOX);
btn_CW_noise3->labelfont(4);
btn_CW_noise3->callback((Fl_Callback*)cb_btn_CW_noise3);
o->value(progdefaults.CW_noise == ' ');
} // Fl_Check_Button* btn_CW_noise3
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/Punctuation-Noise"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/Punctuation-Noise"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/CW/WinKeyer"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_ComboBox* o = select_WK_CommPort = new Fl_ComboBox(274, 30, 405, 25, _("Ser. Port"));
select_WK_CommPort->tooltip(_("Xcvr serial port"));
select_WK_CommPort->box(FL_DOWN_BOX);
select_WK_CommPort->color((Fl_Color)55);
select_WK_CommPort->selection_color(FL_BACKGROUND_COLOR);
select_WK_CommPort->labeltype(FL_NORMAL_LABEL);
select_WK_CommPort->labelfont(0);
select_WK_CommPort->labelsize(14);
select_WK_CommPort->labelcolor(FL_FOREGROUND_COLOR);
select_WK_CommPort->callback((Fl_Callback*)cb_select_WK_CommPort);
select_WK_CommPort->align(Fl_Align(FL_ALIGN_LEFT));
select_WK_CommPort->when(FL_WHEN_RELEASE);
o->value(progStatus.WK_serial_port_name.c_str());
select_WK_CommPort->end();
} // Fl_ComboBox* select_WK_CommPort
{ Fl_Light_Button* o = btn_WKCW_connect = new Fl_Light_Button(705, 30, 80, 25, _("Connect"));
btn_WKCW_connect->tooltip(_("Connect / Disconnect from WinKeyer"));
btn_WKCW_connect->callback((Fl_Callback*)cb_btn_WKCW_connect);
o->value(progStatus.WK_online);
} // Fl_Light_Button* btn_WKCW_connect
{ box_WK_wait = new Fl_Box(269, 66, 16, 16, _("Wait"));
box_WK_wait->box(FL_DIAMOND_DOWN_BOX);
box_WK_wait->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Box* box_WK_wait
{ box_WK_break_in = new Fl_Box(344, 66, 16, 16, _("Bk"));
box_WK_break_in->box(FL_DIAMOND_DOWN_BOX);
box_WK_break_in->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Box* box_WK_break_in
{ box_WK_busy = new Fl_Box(419, 66, 16, 16, _("Busy"));
box_WK_busy->box(FL_DIAMOND_DOWN_BOX);
box_WK_busy->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Box* box_WK_busy
{ box_WK_xoff = new Fl_Box(494, 66, 16, 16, _("Bfr"));
box_WK_xoff->box(FL_DIAMOND_DOWN_BOX);
box_WK_xoff->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Box* box_WK_xoff
{ box_WK_keydown = new Fl_Box(570, 66, 16, 16, _("Key"));
box_WK_keydown->box(FL_DIAMOND_DOWN_BOX);
box_WK_keydown->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Box* box_WK_keydown
{ choice_WK_keyer_mode = new Fl_ComboBox(237, 104, 90, 22, _("Keyer Mode"));
choice_WK_keyer_mode->box(FL_BORDER_BOX);
choice_WK_keyer_mode->color((Fl_Color)55);
choice_WK_keyer_mode->selection_color(FL_BACKGROUND_COLOR);
choice_WK_keyer_mode->labeltype(FL_NORMAL_LABEL);
choice_WK_keyer_mode->labelfont(0);
choice_WK_keyer_mode->labelsize(14);
choice_WK_keyer_mode->labelcolor(FL_FOREGROUND_COLOR);
choice_WK_keyer_mode->callback((Fl_Callback*)cb_choice_WK_keyer_mode);
choice_WK_keyer_mode->align(Fl_Align(FL_ALIGN_TOP));
choice_WK_keyer_mode->when(FL_WHEN_RELEASE);
choice_WK_keyer_mode->end();
} // Fl_ComboBox* choice_WK_keyer_mode
{ choice_WK_hang = new Fl_ComboBox(383, 104, 90, 22, _("Hang"));
choice_WK_hang->box(FL_BORDER_BOX);
choice_WK_hang->color((Fl_Color)55);
choice_WK_hang->selection_color(FL_BACKGROUND_COLOR);
choice_WK_hang->labeltype(FL_NORMAL_LABEL);
choice_WK_hang->labelfont(0);
choice_WK_hang->labelsize(14);
choice_WK_hang->labelcolor(FL_FOREGROUND_COLOR);
choice_WK_hang->callback((Fl_Callback*)cb_choice_WK_hang);
choice_WK_hang->align(Fl_Align(FL_ALIGN_TOP));
choice_WK_hang->when(FL_WHEN_RELEASE);
choice_WK_hang->end();
} // Fl_ComboBox* choice_WK_hang
{ choice_WK_sidetone = new Fl_ComboBox(530, 104, 90, 22, _("Sidetone"));
choice_WK_sidetone->box(FL_BORDER_BOX);
choice_WK_sidetone->color((Fl_Color)55);
choice_WK_sidetone->selection_color(FL_BACKGROUND_COLOR);
choice_WK_sidetone->labeltype(FL_NORMAL_LABEL);
choice_WK_sidetone->labelfont(0);
choice_WK_sidetone->labelsize(14);
choice_WK_sidetone->labelcolor(FL_FOREGROUND_COLOR);
choice_WK_sidetone->callback((Fl_Callback*)cb_choice_WK_sidetone);
choice_WK_sidetone->align(Fl_Align(FL_ALIGN_TOP));
choice_WK_sidetone->when(FL_WHEN_RELEASE);
choice_WK_sidetone->end();
} // Fl_ComboBox* choice_WK_sidetone
{ choice_WK_output_pins = new Fl_ComboBox(677, 104, 90, 22, _("Output PIns"));
choice_WK_output_pins->box(FL_BORDER_BOX);
choice_WK_output_pins->color((Fl_Color)55);
choice_WK_output_pins->selection_color(FL_BACKGROUND_COLOR);
choice_WK_output_pins->labeltype(FL_NORMAL_LABEL);
choice_WK_output_pins->labelfont(0);
choice_WK_output_pins->labelsize(14);
choice_WK_output_pins->labelcolor(FL_FOREGROUND_COLOR);
choice_WK_output_pins->callback((Fl_Callback*)cb_choice_WK_output_pins);
choice_WK_output_pins->align(Fl_Align(FL_ALIGN_TOP));
choice_WK_output_pins->when(FL_WHEN_RELEASE);
choice_WK_output_pins->end();
} // Fl_ComboBox* choice_WK_output_pins
{ btn_WK_use_pot = new Fl_Check_Button(623, 64, 20, 16, _("Use Pot"));
btn_WK_use_pot->tooltip(_("Winkeyer pot controls WPM"));
btn_WK_use_pot->down_box(FL_DOWN_BOX);
btn_WK_use_pot->callback((Fl_Callback*)cb_btn_WK_use_pot);
btn_WK_use_pot->align(Fl_Align(FL_ALIGN_RIGHT));
btn_WK_use_pot->when(FL_WHEN_CHANGED);
} // Fl_Check_Button* btn_WK_use_pot
{ txt_WK_wpm = new Fl_Output(710, 61, 50, 24);
txt_WK_wpm->tooltip(_("WPM setting"));
} // Fl_Output* txt_WK_wpm
{ Fl_Group* o = new Fl_Group(210, 132, 134, 184, _("ModeReg"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ btn_WK_swap = new Fl_Check_Button(220, 174, 70, 15, _("Swap"));
btn_WK_swap->tooltip(_("Swap left/right keyer contacts"));
btn_WK_swap->down_box(FL_DOWN_BOX);
btn_WK_swap->callback((Fl_Callback*)cb_btn_WK_swap);
} // Fl_Check_Button* btn_WK_swap
{ btn_WK_auto_space = new Fl_Check_Button(220, 204, 70, 15, _("Auto Space"));
btn_WK_auto_space->tooltip(_("Enable paddle auto spacing of characters"));
btn_WK_auto_space->down_box(FL_DOWN_BOX);
btn_WK_auto_space->callback((Fl_Callback*)cb_btn_WK_auto_space);
} // Fl_Check_Button* btn_WK_auto_space
{ btn_WK_ct_space = new Fl_Check_Button(220, 234, 70, 15, _("CT space"));
btn_WK_ct_space->tooltip(_("Enable contest character spacing"));
btn_WK_ct_space->down_box(FL_DOWN_BOX);
btn_WK_ct_space->callback((Fl_Callback*)cb_btn_WK_ct_space);
} // Fl_Check_Button* btn_WK_ct_space
{ btn_WK_paddledog = new Fl_Check_Button(220, 264, 70, 15, _("Paddle Dog"));
btn_WK_paddledog->down_box(FL_DOWN_BOX);
btn_WK_paddledog->callback((Fl_Callback*)cb_btn_WK_paddledog);
} // Fl_Check_Button* btn_WK_paddledog
{ btn_WK_cut_zeronine = new Fl_Check_Button(220, 294, 70, 15, _("Cut 0/9"));
btn_WK_cut_zeronine->tooltip(_("Use T/N for 0/9"));
btn_WK_cut_zeronine->down_box(FL_DOWN_BOX);
btn_WK_cut_zeronine->callback((Fl_Callback*)cb_btn_WK_cut_zeronine);
} // Fl_Check_Button* btn_WK_cut_zeronine
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(367, 132, 134, 184, _("ModeReg"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ btn_WK_paddle_echo = new Fl_Check_Button(373, 174, 70, 16, _("Paddle echo"));
btn_WK_paddle_echo->tooltip(_("Echo paddle chars to Rx Panel"));
btn_WK_paddle_echo->down_box(FL_DOWN_BOX);
btn_WK_paddle_echo->callback((Fl_Callback*)cb_btn_WK_paddle_echo);
} // Fl_Check_Button* btn_WK_paddle_echo
{ btn_WK_serial_echo = new Fl_Check_Button(373, 204, 70, 16, _("Serial echo"));
btn_WK_serial_echo->down_box(FL_DOWN_BOX);
btn_WK_serial_echo->value(1);
btn_WK_serial_echo->callback((Fl_Callback*)cb_btn_WK_serial_echo);
} // Fl_Check_Button* btn_WK_serial_echo
{ btn_WK_sidetone_on = new Fl_Check_Button(373, 234, 103, 16, _("Tone Keyer"));
btn_WK_sidetone_on->tooltip(_("Enable Winkeyer tone keying"));
btn_WK_sidetone_on->down_box(FL_DOWN_BOX);
btn_WK_sidetone_on->callback((Fl_Callback*)cb_btn_WK_sidetone_on);
} // Fl_Check_Button* btn_WK_sidetone_on
{ btn_WK_tone_on = new Fl_Check_Button(373, 264, 87, 16, _("Tone ON"));
btn_WK_tone_on->tooltip(_("Enable Winkeyer audio tone"));
btn_WK_tone_on->down_box(FL_DOWN_BOX);
btn_WK_tone_on->callback((Fl_Callback*)cb_btn_WK_tone_on);
} // Fl_Check_Button* btn_WK_tone_on
{ btn_WK_ptt_on = new Fl_Check_Button(373, 294, 87, 16, _("PTT ON"));
btn_WK_ptt_on->tooltip(_("Enable Winkeyer PTT output"));
btn_WK_ptt_on->down_box(FL_DOWN_BOX);
btn_WK_ptt_on->callback((Fl_Callback*)cb_btn_WK_ptt_on);
} // Fl_Check_Button* btn_WK_ptt_on
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(510, 132, 112, 209, _("WPM Settings"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ cntr_WK_min_wpm = new Fl_Counter(531, 172, 64, 22, _("Min WPM"));
cntr_WK_min_wpm->tooltip(_("Minimum WPM setting\ndefault = 10"));
cntr_WK_min_wpm->type(1);
cntr_WK_min_wpm->minimum(10);
cntr_WK_min_wpm->maximum(30);
cntr_WK_min_wpm->step(1);
cntr_WK_min_wpm->value(10);
cntr_WK_min_wpm->callback((Fl_Callback*)cb_cntr_WK_min_wpm);
} // Fl_Counter* cntr_WK_min_wpm
{ cntr_WK_rng_wpm = new Fl_Counter(531, 215, 64, 21, _("Rng WPM"));
cntr_WK_rng_wpm->tooltip(_("Range WPM setting\ndefault = 25"));
cntr_WK_rng_wpm->type(1);
cntr_WK_rng_wpm->callback((Fl_Callback*)cb_cntr_WK_rng_wpm);
} // Fl_Counter* cntr_WK_rng_wpm
{ cntr_WK_farnsworth = new Fl_Counter(531, 257, 64, 22, _("Farsnworth"));
cntr_WK_farnsworth->tooltip(_("Farnsworth keying (0 = none)\ndefault = 0"));
cntr_WK_farnsworth->type(1);
cntr_WK_farnsworth->callback((Fl_Callback*)cb_cntr_WK_farnsworth);
} // Fl_Counter* cntr_WK_farnsworth
{ cntr_WK_cmd_wpm = new Fl_Counter(531, 300, 64, 22, _("Cmd WPM"));
cntr_WK_cmd_wpm->tooltip(_("WPM speed for Winkeyer Command strings\ndefault = 18"));
cntr_WK_cmd_wpm->type(1);
cntr_WK_cmd_wpm->callback((Fl_Callback*)cb_cntr_WK_cmd_wpm);
} // Fl_Counter* cntr_WK_cmd_wpm
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(630, 132, 160, 209, _("Timing/Settings"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ cntr_WK_ratio = new Fl_Counter(642, 172, 64, 22, _("Ratio"));
cntr_WK_ratio->tooltip(_("Keying ratio\ndefault = 3.0"));
cntr_WK_ratio->type(1);
cntr_WK_ratio->callback((Fl_Callback*)cb_cntr_WK_ratio);
} // Fl_Counter* cntr_WK_ratio
{ cntr_WK_comp = new Fl_Counter(642, 215, 64, 21, _("Comp"));
cntr_WK_comp->tooltip(_("Compensation in msec\ndefault = 0"));
cntr_WK_comp->type(1);
cntr_WK_comp->callback((Fl_Callback*)cb_cntr_WK_comp);
} // Fl_Counter* cntr_WK_comp
{ cntr_WK_first_ext = new Fl_Counter(642, 257, 64, 22, _("1st Ext"));
cntr_WK_first_ext->tooltip(_("Extra duration to first dit/dot in msec\ndefault = 0"));
cntr_WK_first_ext->type(1);
cntr_WK_first_ext->callback((Fl_Callback*)cb_cntr_WK_first_ext);
} // Fl_Counter* cntr_WK_first_ext
{ cntr_WK_sample = new Fl_Counter(642, 300, 64, 22, _("Sample"));
cntr_WK_sample->tooltip(_("Paddle sampling (see Winkeyer manual)\ndefault = 50"));
cntr_WK_sample->type(1);
cntr_WK_sample->callback((Fl_Callback*)cb_cntr_WK_sample);
} // Fl_Counter* cntr_WK_sample
{ cntr_WK_weight = new Fl_Counter(713, 172, 64, 22, _("Weight"));
cntr_WK_weight->tooltip(_("Keying weight\ndefault = 50"));
cntr_WK_weight->type(1);
cntr_WK_weight->callback((Fl_Callback*)cb_cntr_WK_weight);
} // Fl_Counter* cntr_WK_weight
{ cntr_WK_leadin = new Fl_Counter(713, 215, 64, 21, _("Leadin"));
cntr_WK_leadin->tooltip(_("Leadin in msec\ndefault = 0"));
cntr_WK_leadin->type(1);
cntr_WK_leadin->callback((Fl_Callback*)cb_cntr_WK_leadin);
} // Fl_Counter* cntr_WK_leadin
{ cntr_WK_tail = new Fl_Counter(713, 257, 64, 22, _("Tail"));
cntr_WK_tail->tooltip(_("Extend last dit/dot in msec\ndefault = 0"));
cntr_WK_tail->type(1);
cntr_WK_tail->callback((Fl_Callback*)cb_cntr_WK_tail);
} // Fl_Counter* cntr_WK_tail
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(210, 317, 291, 25);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btnK3NG = new Fl_Check_Button(220, 324, 223, 15, _("K3NG Arduino sketch emulation"));
btnK3NG->tooltip(_("Activate for Mortty K3NG sketch"));
btnK3NG->down_box(FL_DOWN_BOX);
btnK3NG->callback((Fl_Callback*)cb_btnK3NG);
o->value(progdefaults.WK_K3NGsketch);
} // Fl_Check_Button* btnK3NG
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/WinKeyer"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/WinKeyer"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/CW/nanoIO"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_ComboBox* o = select_nanoCW_CommPort = new Fl_ComboBox(270, 21, 435, 23, _("Ser. Port"));
select_nanoCW_CommPort->tooltip(_("nanoIO serial port"));
select_nanoCW_CommPort->box(FL_DOWN_BOX);
select_nanoCW_CommPort->color((Fl_Color)55);
select_nanoCW_CommPort->selection_color(FL_BACKGROUND_COLOR);
select_nanoCW_CommPort->labeltype(FL_NORMAL_LABEL);
select_nanoCW_CommPort->labelfont(0);
select_nanoCW_CommPort->labelsize(14);
select_nanoCW_CommPort->labelcolor(FL_FOREGROUND_COLOR);
select_nanoCW_CommPort->callback((Fl_Callback*)cb_select_nanoCW_CommPort);
select_nanoCW_CommPort->align(Fl_Align(FL_ALIGN_LEFT));
select_nanoCW_CommPort->when(FL_WHEN_RELEASE);
o->value(progdefaults.nanoIO_serial_port_name.c_str());
select_nanoCW_CommPort->end();
} // Fl_ComboBox* select_nanoCW_CommPort
{ btn_nanoCW_connect = new Fl_Light_Button(711, 21, 80, 22, _("Connect"));
btn_nanoCW_connect->tooltip(_("Connect / Disconnect from nanoIO"));
btn_nanoCW_connect->callback((Fl_Callback*)cb_btn_nanoCW_connect);
} // Fl_Light_Button* btn_nanoCW_connect
{ Fl_Counter* o = cntr_nanoCW_paddle_WPM = new Fl_Counter(260, 48, 110, 22, _("Paddle"));
cntr_nanoCW_paddle_WPM->tooltip(_("CW wpm using paddle keyer"));
cntr_nanoCW_paddle_WPM->minimum(5);
cntr_nanoCW_paddle_WPM->maximum(100);
cntr_nanoCW_paddle_WPM->step(1);
cntr_nanoCW_paddle_WPM->value(20);
cntr_nanoCW_paddle_WPM->callback((Fl_Callback*)cb_cntr_nanoCW_paddle_WPM);
cntr_nanoCW_paddle_WPM->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.CW_keyspeed);
o->lstep(5);
} // Fl_Counter* cntr_nanoCW_paddle_WPM
{ FTextView* o = txt_nano_CW_io = new FTextView(204, 155, 590, 189);
txt_nano_CW_io->box(FL_DOWN_FRAME);
txt_nano_CW_io->color(FL_BACKGROUND2_COLOR);
txt_nano_CW_io->selection_color(FL_SELECTION_COLOR);
txt_nano_CW_io->labeltype(FL_NORMAL_LABEL);
txt_nano_CW_io->labelfont(0);
txt_nano_CW_io->labelsize(14);
txt_nano_CW_io->labelcolor(FL_FOREGROUND_COLOR);
txt_nano_CW_io->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
txt_nano_CW_io->when(FL_WHEN_RELEASE);
o->setFont(progdefaults.RxFontnbr);
o->setFontSize(12);
} // FTextView* txt_nano_CW_io
{ Fl_Counter* o = cntr_nanoCW_WPM = new Fl_Counter(260, 74, 110, 22, _("Comp\'"));
cntr_nanoCW_WPM->tooltip(_("CW wpm keyboard strings"));
cntr_nanoCW_WPM->minimum(5);
cntr_nanoCW_WPM->maximum(100);
cntr_nanoCW_WPM->step(1);
cntr_nanoCW_WPM->value(20);
cntr_nanoCW_WPM->callback((Fl_Callback*)cb_cntr_nanoCW_WPM);
cntr_nanoCW_WPM->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.CWspeed);
o->lstep(5);
} // Fl_Counter* cntr_nanoCW_WPM
{ Fl_Counter2* o = cnt_nanoCWdash2dot = new Fl_Counter2(292, 100, 78, 22, _("Dash/Dot"));
cnt_nanoCWdash2dot->tooltip(_("Dash to dot ratio"));
cnt_nanoCWdash2dot->type(1);
cnt_nanoCWdash2dot->box(FL_UP_BOX);
cnt_nanoCWdash2dot->color(FL_BACKGROUND_COLOR);
cnt_nanoCWdash2dot->selection_color(FL_INACTIVE_COLOR);
cnt_nanoCWdash2dot->labeltype(FL_NORMAL_LABEL);
cnt_nanoCWdash2dot->labelfont(0);
cnt_nanoCWdash2dot->labelsize(14);
cnt_nanoCWdash2dot->labelcolor(FL_FOREGROUND_COLOR);
cnt_nanoCWdash2dot->minimum(2.5);
cnt_nanoCWdash2dot->maximum(3.5);
cnt_nanoCWdash2dot->value(3);
cnt_nanoCWdash2dot->callback((Fl_Callback*)cb_cnt_nanoCWdash2dot);
cnt_nanoCWdash2dot->align(Fl_Align(FL_ALIGN_LEFT));
cnt_nanoCWdash2dot->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWdash2dot);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cnt_nanoCWdash2dot
{ Fl_ListBox* o = listbox_nanoIO_serbaud = new Fl_ListBox(594, 47, 110, 24, _("Baud"));
listbox_nanoIO_serbaud->box(FL_DOWN_BOX);
listbox_nanoIO_serbaud->color(FL_BACKGROUND2_COLOR);
listbox_nanoIO_serbaud->selection_color(FL_BACKGROUND_COLOR);
listbox_nanoIO_serbaud->labeltype(FL_NORMAL_LABEL);
listbox_nanoIO_serbaud->labelfont(0);
listbox_nanoIO_serbaud->labelsize(14);
listbox_nanoIO_serbaud->labelcolor(FL_FOREGROUND_COLOR);
listbox_nanoIO_serbaud->callback((Fl_Callback*)cb_listbox_nanoIO_serbaud);
listbox_nanoIO_serbaud->align(Fl_Align(FL_ALIGN_LEFT));
listbox_nanoIO_serbaud->when(FL_WHEN_RELEASE);
o->add("1200|4800|9600|19200|38400|57600|115200");
o->index(progdefaults.nanoIO_serbaud);
listbox_nanoIO_serbaud->end();
} // Fl_ListBox* listbox_nanoIO_serbaud
{ Fl_ListBox* o = listbox_nano_keyer = new Fl_ListBox(595, 73, 110, 24, _("Keyer"));
listbox_nano_keyer->box(FL_DOWN_BOX);
listbox_nano_keyer->color(FL_BACKGROUND2_COLOR);
listbox_nano_keyer->selection_color(FL_BACKGROUND_COLOR);
listbox_nano_keyer->labeltype(FL_NORMAL_LABEL);
listbox_nano_keyer->labelfont(0);
listbox_nano_keyer->labelsize(14);
listbox_nano_keyer->labelcolor(FL_FOREGROUND_COLOR);
listbox_nano_keyer->callback((Fl_Callback*)cb_listbox_nano_keyer);
listbox_nano_keyer->align(Fl_Align(FL_ALIGN_LEFT));
listbox_nano_keyer->when(FL_WHEN_RELEASE);
o->add("Iambic-A|Iambic-B|Straight");
o->index(progdefaults.nanoIO_CW_keyer);
listbox_nano_keyer->end();
} // Fl_ListBox* listbox_nano_keyer
{ Fl_ListBox* o = listbox_incr = new Fl_ListBox(645, 99, 60, 24, _("Incr\'"));
listbox_incr->box(FL_DOWN_BOX);
listbox_incr->color(FL_BACKGROUND2_COLOR);
listbox_incr->selection_color(FL_BACKGROUND_COLOR);
listbox_incr->labeltype(FL_NORMAL_LABEL);
listbox_incr->labelfont(0);
listbox_incr->labelsize(14);
listbox_incr->labelcolor(FL_FOREGROUND_COLOR);
listbox_incr->callback((Fl_Callback*)cb_listbox_incr);
listbox_incr->align(Fl_Align(FL_ALIGN_LEFT));
listbox_incr->when(FL_WHEN_RELEASE);
o->add("1|2|3|4|5");
o->index(progdefaults.nanoIO_CW_incr - '1');
listbox_incr->end();
} // Fl_ListBox* listbox_incr
{ btn_cwfsk_save = new Fl_Button(711, 74, 80, 22, _("Save"));
btn_cwfsk_save->tooltip(_("Write state of nanoIO to Arduino EEPROM"));
btn_cwfsk_save->callback((Fl_Callback*)cb_btn_cwfsk_save);
} // Fl_Button* btn_cwfsk_save
{ btn_cwfsk_query = new Fl_Button(711, 100, 80, 22, _("Status"));
btn_cwfsk_query->tooltip(_("Query state of nanoIO"));
btn_cwfsk_query->callback((Fl_Callback*)cb_btn_cwfsk_query);
} // Fl_Button* btn_cwfsk_query
{ Fl_Group* o = new Fl_Group(375, 45, 154, 80);
o->box(FL_FLAT_BOX);
{ Fl_Check_Button* o = btn_nanoIO_pot = new Fl_Check_Button(502, 48, 21, 22, _("Use WPM pot\'"));
btn_nanoIO_pot->tooltip(_("WPM pot update to nanoIO required"));
btn_nanoIO_pot->down_box(FL_DOWN_BOX);
btn_nanoIO_pot->callback((Fl_Callback*)cb_btn_nanoIO_pot);
btn_nanoIO_pot->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.nanoIO_speed_pot);
} // Fl_Check_Button* btn_nanoIO_pot
{ cntr_nanoIO_min_wpm = new Fl_Counter(447, 74, 75, 22, _("Min WPM"));
cntr_nanoIO_min_wpm->tooltip(_("Minimum WPM setting\ndefault = 10"));
cntr_nanoIO_min_wpm->type(1);
cntr_nanoIO_min_wpm->minimum(10);
cntr_nanoIO_min_wpm->maximum(30);
cntr_nanoIO_min_wpm->step(1);
cntr_nanoIO_min_wpm->value(10);
cntr_nanoIO_min_wpm->callback((Fl_Callback*)cb_cntr_nanoIO_min_wpm);
cntr_nanoIO_min_wpm->align(Fl_Align(FL_ALIGN_LEFT));
} // Fl_Counter* cntr_nanoIO_min_wpm
{ cntr_nanoIO_rng_wpm = new Fl_Counter(447, 100, 75, 22, _("Rng WPM"));
cntr_nanoIO_rng_wpm->tooltip(_("Range WPM setting\ndefault = 20"));
cntr_nanoIO_rng_wpm->type(1);
cntr_nanoIO_rng_wpm->minimum(10);
cntr_nanoIO_rng_wpm->maximum(40);
cntr_nanoIO_rng_wpm->step(1);
cntr_nanoIO_rng_wpm->value(20);
cntr_nanoIO_rng_wpm->callback((Fl_Callback*)cb_cntr_nanoIO_rng_wpm);
cntr_nanoIO_rng_wpm->align(Fl_Align(FL_ALIGN_LEFT));
} // Fl_Counter* cntr_nanoIO_rng_wpm
o->end();
} // Fl_Group* o
{ Fl_Check_Button* o = btn_disable_CW_PTT = new Fl_Check_Button(531, 99, 70, 24, _("PTT off"));
btn_disable_CW_PTT->tooltip(_("Disable PTT"));
btn_disable_CW_PTT->down_box(FL_DOWN_BOX);
btn_disable_CW_PTT->callback((Fl_Callback*)cb_btn_disable_CW_PTT);
o->value(progdefaults.disable_CW_PTT);
} // Fl_Check_Button* btn_disable_CW_PTT
{ Fl_Group* o = new Fl_Group(204, 125, 590, 30, _("Comp\'"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter* o = cntrWPMtest = new Fl_Counter(302, 129, 78, 22, _("WPM"));
cntrWPMtest->type(1);
cntrWPMtest->minimum(5);
cntrWPMtest->maximum(50);
cntrWPMtest->step(1);
cntrWPMtest->value(30);
cntrWPMtest->callback((Fl_Callback*)cb_cntrWPMtest);
cntrWPMtest->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.nanoCW_test_wpm);
} // Fl_Counter* cntrWPMtest
{ btn_cal_variable = new Fl_Button(384, 129, 70, 22, _("Test =>"));
btn_cal_variable->tooltip(_("Send \"paris \" WPM times"));
btn_cal_variable->callback((Fl_Callback*)cb_btn_cal_variable);
} // Fl_Button* btn_cal_variable
{ corr_var_wpm = new Fl_Value_Input(458, 129, 70, 22, _("secs\' =>"));
corr_var_wpm->tooltip(_("Test duration (60 seconds)"));
corr_var_wpm->color(FL_WHITE);
corr_var_wpm->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Value_Input* corr_var_wpm
{ Fl_Value_Input* o = usec_correc = new Fl_Value_Input(645, 129, 60, 22, _("Comp\'"));
usec_correc->tooltip(_("Compensationin microseconds"));
usec_correc->color(FL_WHITE);
o->value(progdefaults.usec_correc);
} // Fl_Value_Input* usec_correc
{ btn_correction = new Fl_Button(711, 129, 80, 22, _("Adjust"));
btn_correction->tooltip(_("send compensation to nanoIO"));
btn_correction->callback((Fl_Callback*)cb_btn_correction);
} // Fl_Button* btn_correction
o->end();
} // Fl_Group* o
{ chk_nanoIO_CW_io = new Fl_Check_Button(711, 47, 70, 24, _("CW i/o"));
chk_nanoIO_CW_io->tooltip(_("Enable CW operation"));
chk_nanoIO_CW_io->down_box(FL_DOWN_BOX);
chk_nanoIO_CW_io->callback((Fl_Callback*)cb_chk_nanoIO_CW_io);
} // Fl_Check_Button* chk_nanoIO_CW_io
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/nanoIO"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/nanoIO"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/CW/DTR-RTS keying"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 25, 590, 79);
o->box(FL_ENGRAVED_BOX);
{ Fl_Box* o = new Fl_Box(208, 27, 580, 72, _("DTR/RTS keying may be assigned to flrig, share the RigCat serial port,\nshare\
the Separate PTT serial port, or be assigned to separate serial port.\n\nNo s\
ettings for baud, stops bits, etc are needed."));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 107, 590, 40);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_CW_KEYLINE_flrig = new Fl_Check_Button(215, 120, 23, 15, _("Use flrig DTR/CTS keying"));
btn_CW_KEYLINE_flrig->down_box(FL_DOWN_BOX);
btn_CW_KEYLINE_flrig->callback((Fl_Callback*)cb_btn_CW_KEYLINE_flrig);
btn_CW_KEYLINE_flrig->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.use_FLRIGkeying);
} // Fl_Check_Button* btn_CW_KEYLINE_flrig
{ Fl_Check_Button* o = btn_FLRIG_CW_disable_ptt = new Fl_Check_Button(475, 120, 70, 14, _("Disable flrig CW PTT"));
btn_FLRIG_CW_disable_ptt->tooltip(_("Required for some transceivers\ne.g. TS-480"));
btn_FLRIG_CW_disable_ptt->down_box(FL_DOWN_BOX);
btn_FLRIG_CW_disable_ptt->callback((Fl_Callback*)cb_btn_FLRIG_CW_disable_ptt);
o->value(progdefaults.CATkeying_disable_ptt);
} // Fl_Check_Button* btn_FLRIG_CW_disable_ptt
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 151, 590, 195);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_CW_KEYLINE_catport = new Fl_Check_Button(215, 167, 23, 15, _("Share RIGCAT port"));
btn_CW_KEYLINE_catport->down_box(FL_DOWN_BOX);
btn_CW_KEYLINE_catport->callback((Fl_Callback*)cb_btn_CW_KEYLINE_catport);
btn_CW_KEYLINE_catport->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.CW_KEYLINE_on_cat_port);
} // Fl_Check_Button* btn_CW_KEYLINE_catport
{ Fl_Check_Button* o = btn_CW_KEYLINE_shared_PTT = new Fl_Check_Button(215, 199, 23, 15, _("Share Separate PTT port"));
btn_CW_KEYLINE_shared_PTT->down_box(FL_DOWN_BOX);
btn_CW_KEYLINE_shared_PTT->callback((Fl_Callback*)cb_btn_CW_KEYLINE_shared_PTT);
btn_CW_KEYLINE_shared_PTT->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.CW_KEYLINE_on_ptt_port);
} // Fl_Check_Button* btn_CW_KEYLINE_shared_PTT
{ Fl_ListBox* o = listbox_CW_KEYLINE = new Fl_ListBox(454, 162, 90, 24, _("CW Keyline"));
listbox_CW_KEYLINE->box(FL_DOWN_BOX);
listbox_CW_KEYLINE->color(FL_BACKGROUND2_COLOR);
listbox_CW_KEYLINE->selection_color(FL_BACKGROUND_COLOR);
listbox_CW_KEYLINE->labeltype(FL_NORMAL_LABEL);
listbox_CW_KEYLINE->labelfont(0);
listbox_CW_KEYLINE->labelsize(14);
listbox_CW_KEYLINE->labelcolor(FL_FOREGROUND_COLOR);
listbox_CW_KEYLINE->callback((Fl_Callback*)cb_listbox_CW_KEYLINE);
listbox_CW_KEYLINE->align(Fl_Align(FL_ALIGN_RIGHT));
listbox_CW_KEYLINE->when(FL_WHEN_RELEASE);
o->add("None|RTS|DTR");
o->index(progdefaults.CW_KEYLINE);
listbox_CW_KEYLINE->end();
} // Fl_ListBox* listbox_CW_KEYLINE
{ Fl_Counter2* o = cntCWkeycomp = new Fl_Counter2(454, 194, 125, 24, _("Keying compensation (msec)"));
cntCWkeycomp->tooltip(_("Dot / Space timing increment"));
cntCWkeycomp->box(FL_UP_BOX);
cntCWkeycomp->color(FL_BACKGROUND_COLOR);
cntCWkeycomp->selection_color(FL_INACTIVE_COLOR);
cntCWkeycomp->labeltype(FL_NORMAL_LABEL);
cntCWkeycomp->labelfont(0);
cntCWkeycomp->labelsize(14);
cntCWkeycomp->labelcolor(FL_FOREGROUND_COLOR);
cntCWkeycomp->minimum(-10);
cntCWkeycomp->maximum(10);
cntCWkeycomp->step(0.01);
cntCWkeycomp->callback((Fl_Callback*)cb_cntCWkeycomp);
cntCWkeycomp->align(Fl_Align(FL_ALIGN_RIGHT));
cntCWkeycomp->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWkeycomp);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(1.0);
} // Fl_Counter2* cntCWkeycomp
{ Fl_ListBox* o = listbox_PTT_KEYLINE = new Fl_ListBox(693, 162, 90, 24, _("PTT keyline"));
listbox_PTT_KEYLINE->box(FL_DOWN_BOX);
listbox_PTT_KEYLINE->color(FL_BACKGROUND2_COLOR);
listbox_PTT_KEYLINE->selection_color(FL_BACKGROUND_COLOR);
listbox_PTT_KEYLINE->labeltype(FL_NORMAL_LABEL);
listbox_PTT_KEYLINE->labelfont(0);
listbox_PTT_KEYLINE->labelsize(14);
listbox_PTT_KEYLINE->labelcolor(FL_FOREGROUND_COLOR);
listbox_PTT_KEYLINE->callback((Fl_Callback*)cb_listbox_PTT_KEYLINE);
listbox_PTT_KEYLINE->align(Fl_Align(FL_ALIGN_LEFT));
listbox_PTT_KEYLINE->when(FL_WHEN_RELEASE);
listbox_PTT_KEYLINE->hide();
o->add("None|RTS|DTR");
o->index(0);//progdefaults.PTT_KEYLINE);
listbox_PTT_KEYLINE->end();
} // Fl_ListBox* listbox_PTT_KEYLINE
{ Fl_ComboBox* o = select_CW_KEYLINE_CommPort = new Fl_ComboBox(215, 241, 470, 24, _("Use Separate Keying Serial Port"));
select_CW_KEYLINE_CommPort->tooltip(_("nanoIO serial port"));
select_CW_KEYLINE_CommPort->box(FL_DOWN_BOX);
select_CW_KEYLINE_CommPort->color((Fl_Color)55);
select_CW_KEYLINE_CommPort->selection_color(FL_BACKGROUND_COLOR);
select_CW_KEYLINE_CommPort->labeltype(FL_NORMAL_LABEL);
select_CW_KEYLINE_CommPort->labelfont(0);
select_CW_KEYLINE_CommPort->labelsize(14);
select_CW_KEYLINE_CommPort->labelcolor(FL_FOREGROUND_COLOR);
select_CW_KEYLINE_CommPort->callback((Fl_Callback*)cb_select_CW_KEYLINE_CommPort);
select_CW_KEYLINE_CommPort->align(Fl_Align(FL_ALIGN_TOP_LEFT));
select_CW_KEYLINE_CommPort->when(FL_WHEN_RELEASE);
o->value(progdefaults.CW_KEYLINE_serial_port_name.c_str());
select_CW_KEYLINE_CommPort->end();
} // Fl_ComboBox* select_CW_KEYLINE_CommPort
{ Fl_Light_Button* o = btn_CW_KEYLINE_connect = new Fl_Light_Button(698, 241, 90, 24, _("Connect"));
btn_CW_KEYLINE_connect->tooltip(_("Connect / Disconnect from nanoIO"));
btn_CW_KEYLINE_connect->callback((Fl_Callback*)cb_btn_CW_KEYLINE_connect);
o->value(progStatus.useCW_KEYLINE);
} // Fl_Light_Button* btn_CW_KEYLINE_connect
{ btn_cw_dtr_calibrate = new Fl_Light_Button(215, 305, 100, 24, _("Speed test"));
btn_cw_dtr_calibrate->tooltip(_("1 minute \'PARIS \'"));
btn_cw_dtr_calibrate->selection_color((Fl_Color)6);
btn_cw_dtr_calibrate->callback((Fl_Callback*)cb_btn_cw_dtr_calibrate);
} // Fl_Light_Button* btn_cw_dtr_calibrate
{ cwio_test_result = new Fl_Output(376, 305, 300, 24, _("Result"));
} // Fl_Output* cwio_test_result
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/DTR-RTS keying"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/DTR-RTS keying"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/CW/CAT Keying"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Box* o = new Fl_Box(213, 23, 575, 140, _("CW keying using CAT command strings. Available for supported transceivers.\n\
Use with RigCAT or flrig transceiver control. A separate serial port is NOT n\
eeded.\n\nDisable CAT PTT if transceiver interprets that as a keydown command \
(e.g. TS480).\nRecommend setting transceiver to either semi or full break-in.\
\n\nEnter correct CIV address for Icom transceivers."));
o->box(FL_THIN_DOWN_BOX);
o->color(FL_LIGHT3);
o->selection_color(FL_LIGHT3);
o->labelsize(13);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Check_Button* o = btn_use_ICOMkeying = new Fl_Check_Button(273, 192, 70, 15, _("Icom"));
btn_use_ICOMkeying->down_box(FL_DOWN_BOX);
btn_use_ICOMkeying->callback((Fl_Callback*)cb_btn_use_ICOMkeying);
o->value(progdefaults.use_ICOMkeying);
} // Fl_Check_Button* btn_use_ICOMkeying
{ Fl_Input* o = val_ICOMcivaddr = new Fl_Input(343, 188, 58, 22, _("Hex CIV addr"));
val_ICOMcivaddr->tooltip(_("Enter transceiver HEX CIV address"));
val_ICOMcivaddr->callback((Fl_Callback*)cb_val_ICOMcivaddr);
val_ICOMcivaddr->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.ICOMcivaddr.c_str());
} // Fl_Input* val_ICOMcivaddr
{ Fl_Check_Button* o = btn_use_ELCTkeying = new Fl_Check_Button(273, 216, 70, 15, _("Elecraft"));
btn_use_ELCTkeying->down_box(FL_DOWN_BOX);
btn_use_ELCTkeying->callback((Fl_Callback*)cb_btn_use_ELCTkeying);
o->value(progdefaults.use_ELCTkeying);
} // Fl_Check_Button* btn_use_ELCTkeying
{ Fl_Check_Button* o = btn_use_KNWDkeying = new Fl_Check_Button(455, 216, 70, 15, _("Kenwood"));
btn_use_KNWDkeying->down_box(FL_DOWN_BOX);
btn_use_KNWDkeying->callback((Fl_Callback*)cb_btn_use_KNWDkeying);
o->value(progdefaults.use_KNWDkeying);
} // Fl_Check_Button* btn_use_KNWDkeying
{ Fl_Check_Button* o = btn_use_YAESUkeying = new Fl_Check_Button(637, 216, 70, 15, _("Yaesu"));
btn_use_YAESUkeying->down_box(FL_DOWN_BOX);
btn_use_YAESUkeying->callback((Fl_Callback*)cb_btn_use_YAESUkeying);
o->value(progdefaults.use_YAESUkeying);
} // Fl_Check_Button* btn_use_YAESUkeying
{ Fl_Check_Button* o = btn_CAT_CW_disable_ptt = new Fl_Check_Button(273, 240, 70, 15, _("Disable CAT PTT"));
btn_CAT_CW_disable_ptt->tooltip(_("Required for some transceivers\ne.g. TS-480"));
btn_CAT_CW_disable_ptt->down_box(FL_DOWN_BOX);
btn_CAT_CW_disable_ptt->callback((Fl_Callback*)cb_btn_CAT_CW_disable_ptt);
o->value(progdefaults.CATkeying_disable_ptt);
} // Fl_Check_Button* btn_CAT_CW_disable_ptt
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/CAT keying"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/CAT keying"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("CW CAT & WinKeyer Compensation"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Box* o = new Fl_Box(210, 33, 575, 118, _("Compute timing compensation for CAT CW and WinKeyer CW. Computation at curre\
nt\nWPM . Set WPM to nominal (suggest 20 WPM).\n\nCompensation will be good o\
ver a +/- 10 WPM range. Calibration/Test is 1 minute of\n\'PARIS \'."));
o->box(FL_ENGRAVED_BOX);
o->color((Fl_Color)53);
o->labelsize(13);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ btn_CAT_keying_calibrate = new Fl_Button(245, 184, 80, 22, _("Calibrate"));
btn_CAT_keying_calibrate->tooltip(_("Send WPM \'PARIS \' words"));
btn_CAT_keying_calibrate->callback((Fl_Callback*)cb_btn_CAT_keying_calibrate);
} // Fl_Button* btn_CAT_keying_calibrate
{ Fl_Value_Input* o = out_CATkeying_compensation = new Fl_Value_Input(329, 184, 50, 22, _("Compensate (secs)"));
out_CATkeying_compensation->maximum(10);
out_CATkeying_compensation->step(0.01);
out_CATkeying_compensation->callback((Fl_Callback*)cb_out_CATkeying_compensation);
out_CATkeying_compensation->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.CATkeying_compensation / 1000.0);
} // Fl_Value_Input* out_CATkeying_compensation
{ btn_CAT_keying_clear = new Fl_Button(525, 184, 50, 22, _("Clear"));
btn_CAT_keying_clear->tooltip(_("Clear compensation"));
btn_CAT_keying_clear->callback((Fl_Callback*)cb_btn_CAT_keying_clear);
} // Fl_Button* btn_CAT_keying_clear
{ btn_CAT_keying_test = new Fl_Button(589, 184, 50, 22, _("Test"));
btn_CAT_keying_test->tooltip(_("Send WPM \'PARIS \' words"));
btn_CAT_keying_test->callback((Fl_Callback*)cb_btn_CAT_keying_test);
} // Fl_Button* btn_CAT_keying_test
{ Fl_Value_Input* o = out_CATkeying_test_result = new Fl_Value_Input(645, 184, 50, 22, _("secs"));
out_CATkeying_test_result->maximum(10);
out_CATkeying_test_result->step(0.01);
out_CATkeying_test_result->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(0);
} // Fl_Value_Input* out_CATkeying_test_result
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/CW/CAT comp'"));
config_pages.push_back(p);
tab_tree->add(_("Modem/CW/CAT comp'"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/DominoEX"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ txtSecondary = new Fl_Input2(310, 88, 360, 40, _("Secondary Text"));
txtSecondary->tooltip(_("Text to send during keyboard idle times"));
txtSecondary->type(4);
txtSecondary->box(FL_DOWN_BOX);
txtSecondary->color(FL_BACKGROUND2_COLOR);
txtSecondary->selection_color(FL_SELECTION_COLOR);
txtSecondary->labeltype(FL_NORMAL_LABEL);
txtSecondary->labelfont(0);
txtSecondary->labelsize(14);
txtSecondary->labelcolor(FL_FOREGROUND_COLOR);
txtSecondary->callback((Fl_Callback*)cb_txtSecondary);
txtSecondary->align(Fl_Align(FL_ALIGN_TOP_LEFT));
txtSecondary->when(FL_WHEN_CHANGED);
txtSecondary->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* txtSecondary
{ Fl_Check_Button* o = valDominoEX_FILTER = new Fl_Check_Button(310, 142, 80, 20, _("Filtering"));
valDominoEX_FILTER->tooltip(_("Use DSP filter before decoder"));
valDominoEX_FILTER->down_box(FL_DOWN_BOX);
valDominoEX_FILTER->value(1);
valDominoEX_FILTER->callback((Fl_Callback*)cb_valDominoEX_FILTER);
o->value(progdefaults.DOMINOEX_FILTER);
} // Fl_Check_Button* valDominoEX_FILTER
{ Fl_Counter2* o = valDominoEX_BW = new Fl_Counter2(451, 142, 63, 20, _("Filter bandwidth factor"));
valDominoEX_BW->tooltip(_("Filter bandwidth relative to signal width"));
valDominoEX_BW->type(1);
valDominoEX_BW->box(FL_UP_BOX);
valDominoEX_BW->color(FL_BACKGROUND_COLOR);
valDominoEX_BW->selection_color(FL_INACTIVE_COLOR);
valDominoEX_BW->labeltype(FL_NORMAL_LABEL);
valDominoEX_BW->labelfont(0);
valDominoEX_BW->labelsize(14);
valDominoEX_BW->labelcolor(FL_FOREGROUND_COLOR);
valDominoEX_BW->minimum(1);
valDominoEX_BW->maximum(2);
valDominoEX_BW->value(1.5);
valDominoEX_BW->callback((Fl_Callback*)cb_valDominoEX_BW);
valDominoEX_BW->align(Fl_Align(FL_ALIGN_RIGHT));
valDominoEX_BW->when(FL_WHEN_CHANGED);
o->value(progdefaults.DOMINOEX_BW);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* valDominoEX_BW
{ Fl_Check_Button* o = chkDominoEX_FEC = new Fl_Check_Button(310, 172, 51, 20, _("FEC"));
chkDominoEX_FEC->tooltip(_("Enable MultiPSK-compatible FEC"));
chkDominoEX_FEC->down_box(FL_DOWN_BOX);
chkDominoEX_FEC->callback((Fl_Callback*)cb_chkDominoEX_FEC);
o->value(progdefaults.DOMINOEX_FEC);
} // Fl_Check_Button* chkDominoEX_FEC
{ Fl_Value_Slider2* o = valDomCWI = new Fl_Value_Slider2(310, 208, 260, 20, _("CWI threshold"));
valDomCWI->tooltip(_("CWI detection and suppression"));
valDomCWI->type(1);
valDomCWI->box(FL_DOWN_BOX);
valDomCWI->color(FL_BACKGROUND_COLOR);
valDomCWI->selection_color(FL_BACKGROUND_COLOR);
valDomCWI->labeltype(FL_NORMAL_LABEL);
valDomCWI->labelfont(0);
valDomCWI->labelsize(14);
valDomCWI->labelcolor(FL_FOREGROUND_COLOR);
valDomCWI->textsize(14);
valDomCWI->callback((Fl_Callback*)cb_valDomCWI);
valDomCWI->align(Fl_Align(FL_ALIGN_TOP));
valDomCWI->when(FL_WHEN_CHANGED);
o->value(progdefaults.DomCWI);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* valDomCWI
{ Fl_Counter2* o = valDominoEX_PATHS = new Fl_Counter2(634, 195, 63, 20, _("Paths (hidden)"));
valDominoEX_PATHS->type(1);
valDominoEX_PATHS->box(FL_UP_BOX);
valDominoEX_PATHS->color(FL_BACKGROUND_COLOR);
valDominoEX_PATHS->selection_color(FL_INACTIVE_COLOR);
valDominoEX_PATHS->labeltype(FL_NORMAL_LABEL);
valDominoEX_PATHS->labelfont(0);
valDominoEX_PATHS->labelsize(14);
valDominoEX_PATHS->labelcolor(FL_FOREGROUND_COLOR);
valDominoEX_PATHS->minimum(4);
valDominoEX_PATHS->maximum(8);
valDominoEX_PATHS->step(1);
valDominoEX_PATHS->value(5);
valDominoEX_PATHS->callback((Fl_Callback*)cb_valDominoEX_PATHS);
valDominoEX_PATHS->align(Fl_Align(FL_ALIGN_BOTTOM));
valDominoEX_PATHS->when(FL_WHEN_CHANGED);
o->value(progdefaults.DOMINOEX_PATHS);
o->labelsize(FL_NORMAL_SIZE);
o->hide();
} // Fl_Counter2* valDominoEX_PATHS
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/DominoEX"));
config_pages.push_back(p);
tab_tree->add(_("Modem/DominoEX"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/Feld Hell"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(247, 31, 500, 133, _("Hell Transmit Parameters"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_ListBox* o = listboxHellFont = new Fl_ListBox(262, 56, 225, 22, _("Transmit font"));
listboxHellFont->tooltip(_("Select TX raster font"));
listboxHellFont->box(FL_DOWN_BOX);
listboxHellFont->color(FL_BACKGROUND2_COLOR);
listboxHellFont->selection_color(FL_BACKGROUND_COLOR);
listboxHellFont->labeltype(FL_NORMAL_LABEL);
listboxHellFont->labelfont(0);
listboxHellFont->labelsize(14);
listboxHellFont->labelcolor(FL_FOREGROUND_COLOR);
listboxHellFont->callback((Fl_Callback*)cb_listboxHellFont);
listboxHellFont->align(Fl_Align(FL_ALIGN_RIGHT));
listboxHellFont->when(FL_WHEN_RELEASE);
o->add(szFeldFonts);
o->index(progdefaults.feldfontnbr);
o->labelsize(FL_NORMAL_SIZE);
listboxHellFont->end();
} // Fl_ListBox* listboxHellFont
{ Fl_ListBox* o = listboxHellPulse = new Fl_ListBox(262, 104, 150, 22, _("Pulse shape"));
listboxHellPulse->tooltip(_("Raised cosine pulse shape factor"));
listboxHellPulse->box(FL_DOWN_BOX);
listboxHellPulse->color(FL_BACKGROUND2_COLOR);
listboxHellPulse->selection_color(FL_BACKGROUND_COLOR);
listboxHellPulse->labeltype(FL_NORMAL_LABEL);
listboxHellPulse->labelfont(0);
listboxHellPulse->labelsize(14);
listboxHellPulse->labelcolor(FL_FOREGROUND_COLOR);
listboxHellPulse->callback((Fl_Callback*)cb_listboxHellPulse);
listboxHellPulse->align(Fl_Align(FL_ALIGN_TOP_LEFT));
listboxHellPulse->when(FL_WHEN_RELEASE);
o->add(_("Slow (4 msec)|Med (2 msec)|Fast (1 msec)|Hard Keying"));
o->index(progdefaults.HellPulseFast);
o->labelsize(FL_NORMAL_SIZE);
listboxHellPulse->end();
} // Fl_ListBox* listboxHellPulse
{ Fl_Check_Button* o = btnFeldHellIdle = new Fl_Check_Button(262, 139, 230, 20, _("Transmit periods (.) when idle"));
btnFeldHellIdle->tooltip(_("Transmits a diddle dot when no keyboard activity"));
btnFeldHellIdle->down_box(FL_DOWN_BOX);
btnFeldHellIdle->value(1);
btnFeldHellIdle->callback((Fl_Callback*)cb_btnFeldHellIdle);
o->value(progdefaults.HellXmtIdle);
} // Fl_Check_Button* btnFeldHellIdle
{ Fl_Value_Slider* o = valHellXmtWidth = new Fl_Value_Slider(443, 104, 150, 22, _("Tx Width Multiplier"));
valHellXmtWidth->tooltip(_("Range 1...3"));
valHellXmtWidth->type(5);
valHellXmtWidth->color(FL_LIGHT3);
valHellXmtWidth->minimum(1);
valHellXmtWidth->maximum(3);
valHellXmtWidth->step(1);
valHellXmtWidth->value(1);
valHellXmtWidth->textsize(14);
valHellXmtWidth->callback((Fl_Callback*)cb_valHellXmtWidth);
valHellXmtWidth->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.HellXmtWidth);
} // Fl_Value_Slider* valHellXmtWidth
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(247, 167, 500, 173, _("Hell Receive Parameters"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnBlackboard = new Fl_Check_Button(262, 191, 125, 20, _("Reverse video"));
btnBlackboard->tooltip(_("Display RX in reverse video"));
btnBlackboard->down_box(FL_DOWN_BOX);
btnBlackboard->callback((Fl_Callback*)cb_btnBlackboard);
o->value(progdefaults.HellBlackboard);
} // Fl_Check_Button* btnBlackboard
{ Fl_Check_Button* o = btnHellMarquee = new Fl_Check_Button(447, 191, 125, 20, _("Marquee text"));
btnHellMarquee->tooltip(_("Display RX as a scrolling marquee"));
btnHellMarquee->down_box(FL_DOWN_BOX);
btnHellMarquee->callback((Fl_Callback*)cb_btnHellMarquee);
o->value(progdefaults.HellMarquee);
} // Fl_Check_Button* btnHellMarquee
{ Fl_Value_Slider* o = valHellRcvWidth = new Fl_Value_Slider(262, 227, 120, 22, _("Rx Width Multiplier"));
valHellRcvWidth->tooltip(_("Range 1...4"));
valHellRcvWidth->type(5);
valHellRcvWidth->color(FL_LIGHT3);
valHellRcvWidth->minimum(1);
valHellRcvWidth->maximum(4);
valHellRcvWidth->step(1);
valHellRcvWidth->value(1);
valHellRcvWidth->textsize(14);
valHellRcvWidth->callback((Fl_Callback*)cb_valHellRcvWidth);
valHellRcvWidth->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.HellRcvWidth);
} // Fl_Value_Slider* valHellRcvWidth
{ Fl_Value_Slider* o = valHellRcvHeight = new Fl_Value_Slider(262, 266, 250, 22, _("Rx Height in pixels"));
valHellRcvHeight->tooltip(_("May require resizing the Rx/Tx panel"));
valHellRcvHeight->type(5);
valHellRcvHeight->color(FL_LIGHT3);
valHellRcvHeight->minimum(14);
valHellRcvHeight->maximum(42);
valHellRcvHeight->step(2);
valHellRcvHeight->value(20);
valHellRcvHeight->textsize(14);
valHellRcvHeight->callback((Fl_Callback*)cb_valHellRcvHeight);
valHellRcvHeight->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.HellRcvHeight);
} // Fl_Value_Slider* valHellRcvHeight
{ Fl_Value_Slider2* o = sldrHellBW = new Fl_Value_Slider2(262, 305, 250, 22, _("Receive filter bandwidth"));
sldrHellBW->tooltip(_("Adjust the DSP bandwidth"));
sldrHellBW->type(1);
sldrHellBW->box(FL_DOWN_BOX);
sldrHellBW->color(FL_LIGHT3);
sldrHellBW->selection_color(FL_BACKGROUND_COLOR);
sldrHellBW->labeltype(FL_NORMAL_LABEL);
sldrHellBW->labelfont(0);
sldrHellBW->labelsize(14);
sldrHellBW->labelcolor(FL_FOREGROUND_COLOR);
sldrHellBW->minimum(10);
sldrHellBW->maximum(2400);
sldrHellBW->step(5);
sldrHellBW->value(400);
sldrHellBW->textsize(14);
sldrHellBW->callback((Fl_Callback*)cb_sldrHellBW);
sldrHellBW->align(Fl_Align(FL_ALIGN_RIGHT));
sldrHellBW->when(FL_WHEN_CHANGED);
o->value(progdefaults.HELL_BW);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* sldrHellBW
{ Fl_Value_Slider* o = val_hellagc = new Fl_Value_Slider(527, 227, 120, 22, _("Rx AGC"));
val_hellagc->tooltip(_("1 - Slow, 2 - Medium, 3 - Fast"));
val_hellagc->type(5);
val_hellagc->color(FL_LIGHT3);
val_hellagc->minimum(1);
val_hellagc->maximum(3);
val_hellagc->step(1);
val_hellagc->value(2);
val_hellagc->textsize(14);
val_hellagc->callback((Fl_Callback*)cb_val_hellagc);
val_hellagc->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.hellagc);
} // Fl_Value_Slider* val_hellagc
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/Feld Hell"));
config_pages.push_back(p);
tab_tree->add(_("Modem/Feld Hell"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/FMT"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(203, 24, 412, 75, _("Audio Stream Procesing"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ListBox* o = listbox_fmt_sr = new Fl_ListBox(276, 66, 100, 22, _("Sample rate"));
listbox_fmt_sr->tooltip(_("FMT sample rate"));
listbox_fmt_sr->box(FL_DOWN_BOX);
listbox_fmt_sr->color(FL_BACKGROUND2_COLOR);
listbox_fmt_sr->selection_color(FL_BACKGROUND_COLOR);
listbox_fmt_sr->labeltype(FL_NORMAL_LABEL);
listbox_fmt_sr->labelfont(0);
listbox_fmt_sr->labelsize(14);
listbox_fmt_sr->labelcolor(FL_FOREGROUND_COLOR);
listbox_fmt_sr->callback((Fl_Callback*)cb_listbox_fmt_sr);
listbox_fmt_sr->align(Fl_Align(FL_ALIGN_TOP));
listbox_fmt_sr->when(FL_WHEN_RELEASE);
o->add("8000|11025|12000|16000|22050|24000|44100|48000");
o->index(progdefaults.FMT_sr);
listbox_fmt_sr->end();
} // Fl_ListBox* listbox_fmt_sr
{ Fl_Counter* o = cnt_fmt_rx_ppm = new Fl_Counter(419, 66, 120, 22, _("Rx Codec PPM"));
cnt_fmt_rx_ppm->tooltip(_("Audio Codec ppm correction"));
cnt_fmt_rx_ppm->minimum(-500);
cnt_fmt_rx_ppm->maximum(500);
cnt_fmt_rx_ppm->step(1);
cnt_fmt_rx_ppm->callback((Fl_Callback*)cb_cnt_fmt_rx_ppm);
cnt_fmt_rx_ppm->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.RX_corr);
o->lstep(10);
} // Fl_Counter* cnt_fmt_rx_ppm
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(203, 99, 412, 90, _("Tracking"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btnFMT_plot_background = new Fl_Button(209, 122, 60, 22, _("Bgnd"));
btnFMT_plot_background->tooltip(_("Change plot background color"));
btnFMT_plot_background->callback((Fl_Callback*)cb_btnFMT_plot_background);
} // Fl_Button* btnFMT_plot_background
{ btnFMT_unk_color = new Fl_Button(209, 153, 60, 22, _("Unkn"));
btnFMT_unk_color->tooltip(_("Change plot unknown track color"));
btnFMT_unk_color->callback((Fl_Callback*)cb_btnFMT_unk_color);
} // Fl_Button* btnFMT_unk_color
{ btnFMT_plot_ref_color = new Fl_Button(274, 153, 60, 22, _("Ref"));
btnFMT_plot_ref_color->tooltip(_("Change plot reference track color"));
btnFMT_plot_ref_color->callback((Fl_Callback*)cb_btnFMT_plot_ref_color);
} // Fl_Button* btnFMT_plot_ref_color
{ btnFMT_plot_axis = new Fl_Button(274, 122, 60, 22, _("Axis"));
btnFMT_plot_axis->tooltip(_("Change Axis\' color"));
btnFMT_plot_axis->callback((Fl_Callback*)cb_btnFMT_plot_axis);
} // Fl_Button* btnFMT_plot_axis
{ btnFMT_legend_color = new Fl_Button(339, 107, 60, 22, _("Lgnd"));
btnFMT_legend_color->tooltip(_("Change legend color"));
btnFMT_legend_color->callback((Fl_Callback*)cb_btnFMT_legend_color);
} // Fl_Button* btnFMT_legend_color
{ Fl_Check_Button* o = btn_fmt_plot_over_axis = new Fl_Check_Button(341, 135, 31, 18, _("Line/Axis"));
btn_fmt_plot_over_axis->tooltip(_("Enable to always plot data over axis"));
btn_fmt_plot_over_axis->down_box(FL_DOWN_BOX);
btn_fmt_plot_over_axis->callback((Fl_Callback*)cb_btn_fmt_plot_over_axis);
o->value(progdefaults.FMT_plot_over_axis);
} // Fl_Check_Button* btn_fmt_plot_over_axis
{ Fl_Check_Button* o = btn_fmt_thick_lines = new Fl_Check_Button(341, 160, 31, 18, _("Thick lines"));
btn_fmt_thick_lines->tooltip(_("Enable to plot track lines 3 pixels wide"));
btn_fmt_thick_lines->down_box(FL_DOWN_BOX);
btn_fmt_thick_lines->callback((Fl_Callback*)cb_btn_fmt_thick_lines);
o->value(progdefaults.FMT_thick_lines);
} // Fl_Check_Button* btn_fmt_thick_lines
{ Fl_Counter* o = cnt_fmt_freq_corr = new Fl_Counter(465, 118, 123, 24, _("Freq Correction"));
cnt_fmt_freq_corr->tooltip(_("Offset plot lines on vertical scale"));
cnt_fmt_freq_corr->minimum(-5);
cnt_fmt_freq_corr->maximum(5);
cnt_fmt_freq_corr->step(0.001);
cnt_fmt_freq_corr->callback((Fl_Callback*)cb_cnt_fmt_freq_corr);
cnt_fmt_freq_corr->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.FMT_freq_corr);
o->lstep(0.01);
} // Fl_Counter* cnt_fmt_freq_corr
{ bnt_FMT_dec_corr = new Fl_Button(446, 119, 19, 24, _("@|<"));
bnt_FMT_dec_corr->labelsize(10);
bnt_FMT_dec_corr->callback((Fl_Callback*)cb_bnt_FMT_dec_corr);
} // Fl_Button* bnt_FMT_dec_corr
{ btn_FMT_incr_corr = new Fl_Button(588, 119, 18, 24, _("@>|"));
btn_FMT_incr_corr->labelsize(10);
btn_FMT_incr_corr->callback((Fl_Callback*)cb_btn_FMT_incr_corr);
} // Fl_Button* btn_FMT_incr_corr
{ Fl_Counter* o = cnt_fmt_freq_err = new Fl_Counter(470, 160, 123, 24, _("Max Error"));
cnt_fmt_freq_err->tooltip(_("Limit freq estimate error to this value"));
cnt_fmt_freq_err->minimum(0.5);
cnt_fmt_freq_err->maximum(10);
cnt_fmt_freq_err->value(2);
cnt_fmt_freq_err->callback((Fl_Callback*)cb_cnt_fmt_freq_err);
cnt_fmt_freq_err->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.FMT_freq_err);
o->lstep(1.0);
} // Fl_Counter* cnt_fmt_freq_err
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(203, 190, 207, 86, _("DFT Estimator"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter* o = cnt_FMT_movavg_len = new Fl_Counter(214, 232, 110, 24, _("Data Filter"));
cnt_FMT_movavg_len->tooltip(_("Moving average - average over NN seconds^0 - no averaging"));
cnt_FMT_movavg_len->minimum(0);
cnt_FMT_movavg_len->maximum(10);
cnt_FMT_movavg_len->value(1);
cnt_FMT_movavg_len->callback((Fl_Callback*)cb_cnt_FMT_movavg_len);
cnt_FMT_movavg_len->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.FMT_movavg_len);
o->lstep(1.0);
} // Fl_Counter* cnt_FMT_movavg_len
{ Fl_ListBox* o = listbox_fmt_dft_rate = new Fl_ListBox(334, 232, 60, 24, _("DFT rate"));
listbox_fmt_dft_rate->tooltip(_("# DFT computations / second"));
listbox_fmt_dft_rate->box(FL_DOWN_BOX);
listbox_fmt_dft_rate->color(FL_BACKGROUND2_COLOR);
listbox_fmt_dft_rate->selection_color(FL_BACKGROUND_COLOR);
listbox_fmt_dft_rate->labeltype(FL_NORMAL_LABEL);
listbox_fmt_dft_rate->labelfont(0);
listbox_fmt_dft_rate->labelsize(14);
listbox_fmt_dft_rate->labelcolor(FL_FOREGROUND_COLOR);
listbox_fmt_dft_rate->callback((Fl_Callback*)cb_listbox_fmt_dft_rate);
listbox_fmt_dft_rate->align(Fl_Align(FL_ALIGN_TOP));
listbox_fmt_dft_rate->when(FL_WHEN_RELEASE);
o->add("1|2|3|4|5|6|7|8");
o->index(progdefaults.FMT_dft_rate);
listbox_fmt_dft_rate->end();
} // Fl_ListBox* listbox_fmt_dft_rate
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(411, 190, 205, 86, _("FIR Filter"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter* o = cnt_FMT_bpf = new Fl_Counter(457, 218, 100, 24, _("Width"));
cnt_FMT_bpf->tooltip(_("Band pass filter / unknown / reference"));
cnt_FMT_bpf->minimum(5);
cnt_FMT_bpf->maximum(200);
cnt_FMT_bpf->step(5);
cnt_FMT_bpf->value(100);
cnt_FMT_bpf->callback((Fl_Callback*)cb_cnt_FMT_bpf);
cnt_FMT_bpf->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.FMT_bpf_width);
o->lstep(50.0);
} // Fl_Counter* cnt_FMT_bpf
{ Fl_Check_Button* o = btn_fmt_unk_bpf_on = new Fl_Check_Button(429, 246, 70, 18, _("bpf Unk\'"));
btn_fmt_unk_bpf_on->tooltip(_("ON - band pass filter unknown signal"));
btn_fmt_unk_bpf_on->down_box(FL_DOWN_BOX);
btn_fmt_unk_bpf_on->callback((Fl_Callback*)cb_btn_fmt_unk_bpf_on);
o->value(progdefaults.FMT_unk_bpf_on);
} // Fl_Check_Button* btn_fmt_unk_bpf_on
{ Fl_Check_Button* o = btn_fmt_ref_bpf_on = new Fl_Check_Button(526, 246, 70, 18, _("bpf Ref\'"));
btn_fmt_ref_bpf_on->tooltip(_("ON - band pass filter reference signal"));
btn_fmt_ref_bpf_on->down_box(FL_DOWN_BOX);
btn_fmt_ref_bpf_on->callback((Fl_Callback*)cb_btn_fmt_ref_bpf_on);
o->value(progdefaults.FMT_ref_bpf_on);
} // Fl_Check_Button* btn_fmt_ref_bpf_on
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(617, 190, 178, 86, _("CSV Data Recording"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btn_fmt_autorecord = new Fl_Check_Button(658, 246, 107, 18, _("Auto record"));
btn_fmt_autorecord->tooltip(_("Automatically start csv data file recording with wav playback"));
btn_fmt_autorecord->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* btn_fmt_autorecord
{ cnt_fmt_auto_record_time = new Fl_Counter(672, 218, 66, 24);
cnt_fmt_auto_record_time->tooltip(_("Record data for NN minutes after auto start"));
cnt_fmt_auto_record_time->type(1);
cnt_fmt_auto_record_time->minimum(2);
cnt_fmt_auto_record_time->maximum(60);
cnt_fmt_auto_record_time->step(2);
cnt_fmt_auto_record_time->value(2);
cnt_fmt_auto_record_time->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
} // Fl_Counter* cnt_fmt_auto_record_time
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(203, 277, 592, 66, _("Wav file recording"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_fmt_record_wav = new Fl_Check_Button(464, 288, 118, 18, _("Record Audio"));
btn_fmt_record_wav->tooltip(_("Wav file recording - START IMMEDIATELY"));
btn_fmt_record_wav->down_box(FL_DOWN_BOX);
btn_fmt_record_wav->callback((Fl_Callback*)cb_btn_fmt_record_wav);
if (progdefaults.fmt_sync_wav_file) o->deactivate();
} // Fl_Check_Button* btn_fmt_record_wav
{ Fl_Check_Button* o = btn_fmt_sync_wav = new Fl_Check_Button(599, 288, 118, 18, _("Sync to data record"));
btn_fmt_sync_wav->tooltip(_("Wav file recording - SYNCHRONIZE with data recording"));
btn_fmt_sync_wav->down_box(FL_DOWN_BOX);
btn_fmt_sync_wav->callback((Fl_Callback*)cb_btn_fmt_sync_wav);
o->value(progdefaults.fmt_sync_wav_file);
} // Fl_Check_Button* btn_fmt_sync_wav
{ txt_fmt_wav_filename = new Fl_Output(213, 314, 570, 24, _("File pathname:"));
txt_fmt_wav_filename->tooltip(_("Computer generated file name"));
txt_fmt_wav_filename->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Output* txt_fmt_wav_filename
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(616, 24, 180, 131, _("Waterfall"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Box* o = new Fl_Box(626, 44, 168, 35, _("Shft-click: select unknown\nCtrl-click: select reference"));
o->labelsize(12);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Check_Button* o = btn_fmt_center_on_unknown = new Fl_Check_Button(626, 85, 70, 18, _("Center on Unknown"));
btn_fmt_center_on_unknown->tooltip(_("Waterfall Centered on unknown signal"));
btn_fmt_center_on_unknown->down_box(FL_DOWN_BOX);
btn_fmt_center_on_unknown->callback((Fl_Callback*)cb_btn_fmt_center_on_unknown);
o->value(progdefaults.fmt_center_on_unknown);
} // Fl_Check_Button* btn_fmt_center_on_unknown
{ Fl_Check_Button* o = btn_fmt_center_on_reference = new Fl_Check_Button(626, 109, 70, 18, _("Center on Reference"));
btn_fmt_center_on_reference->tooltip(_("Waterfall centered on reference signal"));
btn_fmt_center_on_reference->down_box(FL_DOWN_BOX);
btn_fmt_center_on_reference->callback((Fl_Callback*)cb_btn_fmt_center_on_reference);
o->value(progdefaults.fmt_center_on_reference);
} // Fl_Check_Button* btn_fmt_center_on_reference
{ Fl_Check_Button* o = btn_fmt_center_on_median = new Fl_Check_Button(627, 133, 70, 17, _("Center on median"));
btn_fmt_center_on_median->tooltip(_("Waterfall centered 1/2 way between unknown & reference"));
btn_fmt_center_on_median->down_box(FL_DOWN_BOX);
btn_fmt_center_on_median->callback((Fl_Callback*)cb_btn_fmt_center_on_median);
o->value(progdefaults.fmt_center_on_median);
} // Fl_Check_Button* btn_fmt_center_on_median
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(616, 156, 180, 32);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_fmt_use_tabs = new Fl_Check_Button(627, 165, 70, 18, _("Use TAB delimiters"));
btn_fmt_use_tabs->tooltip(_("Use tab delimiters between columns on csv export file."));
btn_fmt_use_tabs->down_box(FL_DOWN_BOX);
btn_fmt_use_tabs->callback((Fl_Callback*)cb_btn_fmt_use_tabs);
o->value(progdefaults.FMT_use_tabs);
} // Fl_Check_Button* btn_fmt_use_tabs
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/FMT"));
config_pages.push_back(p);
tab_tree->add(_("Modem/FMT"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/FSQ"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(208, 23, 585, 60, _("Rx Parameters"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Value_Slider* o = valhits = new Fl_Value_Slider(343, 28, 125, 22, _("Min Hits"));
valhits->tooltip(_("Minimum # hits in tone detector"));
valhits->type(5);
valhits->minimum(3);
valhits->maximum(6);
valhits->step(1);
valhits->value(3);
valhits->textsize(14);
valhits->callback((Fl_Callback*)cb_valhits);
valhits->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.fsqhits);
} // Fl_Value_Slider* valhits
{ Fl_Choice* o = sel_fsq_lpf = new Fl_Choice(366, 53, 102, 22, _("Image LPF"));
sel_fsq_lpf->tooltip(_("Narrow LPF if image noisy"));
sel_fsq_lpf->down_box(FL_BORDER_BOX);
sel_fsq_lpf->callback((Fl_Callback*)cb_sel_fsq_lpf);
o->add("None"); o->add("300 Hz"); o->add("400 Hz"); o->add("500 Hz");
o->value(progdefaults.fsq_img_filter);
} // Fl_Choice* sel_fsq_lpf
{ Fl_Value_Slider* o = sldrMovAvg = new Fl_Value_Slider(613, 28, 125, 22, _("MovAvg:"));
sldrMovAvg->tooltip(_("Filter FFT output"));
sldrMovAvg->type(1);
sldrMovAvg->minimum(1);
sldrMovAvg->maximum(15);
sldrMovAvg->step(1);
sldrMovAvg->value(4);
sldrMovAvg->textsize(14);
sldrMovAvg->callback((Fl_Callback*)cb_sldrMovAvg);
sldrMovAvg->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.fsq_movavg);
o->maximum(MOVAVGLIMIT);
} // Fl_Value_Slider* sldrMovAvg
{ Fl_Choice* o = sel_fsq_heard_aging = new Fl_Choice(636, 53, 102, 22, _("Heard aging"));
sel_fsq_heard_aging->tooltip(_("Remove call after ..."));
sel_fsq_heard_aging->down_box(FL_BORDER_BOX);
sel_fsq_heard_aging->callback((Fl_Callback*)cb_sel_fsq_heard_aging);
o->add("Never"); o->add("1 min"); o->add("5 min");o->add("10 min"); o->add("20 min"); o->add("20 min"); o->add("30 min"); o->add("60 min"); o->add("90 min"); o->add("120 min");
o->value(progdefaults.fsq_heard_aging);
} // Fl_Choice* sel_fsq_heard_aging
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(208, 83, 585, 100, _("Tx Parameters"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Round_Button* o = btn_fsqbaud[0] = new Fl_Round_Button(340, 90, 55, 15, _("1.5 baud"));
btn_fsqbaud[0]->down_box(FL_ROUND_DOWN_BOX);
btn_fsqbaud[0]->callback((Fl_Callback*)cb_btn_fsqbaud);
o->value(progdefaults.fsqbaud == 1.5);
} // Fl_Round_Button* btn_fsqbaud[0]
{ Fl_Round_Button* o = btn_fsqbaud[1] = new Fl_Round_Button(430, 90, 55, 15, _("2 baud"));
btn_fsqbaud[1]->down_box(FL_ROUND_DOWN_BOX);
btn_fsqbaud[1]->callback((Fl_Callback*)cb_btn_fsqbaud1);
o->value(progdefaults.fsqbaud == 2);
} // Fl_Round_Button* btn_fsqbaud[1]
{ Fl_Round_Button* o = btn_fsqbaud[2] = new Fl_Round_Button(520, 90, 55, 15, _("3 baud"));
btn_fsqbaud[2]->down_box(FL_ROUND_DOWN_BOX);
btn_fsqbaud[2]->callback((Fl_Callback*)cb_btn_fsqbaud2);
o->value(progdefaults.fsqbaud == 3);
} // Fl_Round_Button* btn_fsqbaud[2]
{ Fl_Round_Button* o = btn_fsqbaud[3] = new Fl_Round_Button(610, 90, 55, 15, _("4.5 baud"));
btn_fsqbaud[3]->down_box(FL_ROUND_DOWN_BOX);
btn_fsqbaud[3]->callback((Fl_Callback*)cb_btn_fsqbaud3);
o->value(progdefaults.fsqbaud == 4.5);
} // Fl_Round_Button* btn_fsqbaud[3]
{ Fl_Round_Button* o = btn_fsqbaud[4] = new Fl_Round_Button(700, 90, 55, 15, _("6 baud"));
btn_fsqbaud[4]->down_box(FL_ROUND_DOWN_BOX);
btn_fsqbaud[4]->callback((Fl_Callback*)cb_btn_fsqbaud4);
o->value(progdefaults.fsqbaud == 6);
} // Fl_Round_Button* btn_fsqbaud[4]
{ Fl_Choice* o = sel_fsq_frequency = new Fl_Choice(638, 110, 102, 22, _("Center freq"));
sel_fsq_frequency->down_box(FL_BORDER_BOX);
sel_fsq_frequency->callback((Fl_Callback*)cb_sel_fsq_frequency);
o->add("1150"); o->add("1500"); o->add("Variable");
o->value(progdefaults.fsq_frequency);
} // Fl_Choice* sel_fsq_frequency
{ Fl_Choice* o = sel_fsq_sounder = new Fl_Choice(283, 110, 100, 22, _("Sounder"));
sel_fsq_sounder->tooltip(_("Send beacon every ..."));
sel_fsq_sounder->down_box(FL_BORDER_BOX);
sel_fsq_sounder->callback((Fl_Callback*)cb_sel_fsq_sounder);
o->add("OFF"); o->add("1 min"); o->add("10 min"); o->add("30 min"); o->add("60 min");
o->value(progdefaults.fsq_sounder);
} // Fl_Choice* sel_fsq_sounder
{ Fl_Counter* o = cntr_FSQ_time_out = new Fl_Counter(457, 110, 80, 22, _("Time out"));
cntr_FSQ_time_out->tooltip(_("Time out xmt attempt in XX seconds"));
cntr_FSQ_time_out->type(1);
cntr_FSQ_time_out->minimum(2);
cntr_FSQ_time_out->maximum(20);
cntr_FSQ_time_out->step(1);
cntr_FSQ_time_out->value(6);
cntr_FSQ_time_out->callback((Fl_Callback*)cb_cntr_FSQ_time_out);
cntr_FSQ_time_out->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.fsq_time_out);
} // Fl_Counter* cntr_FSQ_time_out
{ Fl_Input* o = new Fl_Input(283, 136, 456, 22, _("QTC:"));
o->tooltip(_("Enter QTC text"));
o->callback((Fl_Callback*)cb_QTC);
o->value(progdefaults.fsqQTCtext.c_str());
} // Fl_Input* o
{ Fl_Check_Button* o = btn_fsq_lowercase = new Fl_Check_Button(283, 162, 214, 15, _("MYCALL always lower case"));
btn_fsq_lowercase->tooltip(_("convert operator callsign to lower case"));
btn_fsq_lowercase->down_box(FL_DOWN_BOX);
btn_fsq_lowercase->callback((Fl_Callback*)cb_btn_fsq_lowercase);
o->value(progdefaults.fsq_lowercase);
} // Fl_Check_Button* btn_fsq_lowercase
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(208, 184, 585, 44, _("Message Logging"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_fsq_msg_dt_stamp = new Fl_Check_Button(238, 205, 135, 15, _("Add date/time"));
btn_fsq_msg_dt_stamp->tooltip(_("Add date/time stamp to each # received message"));
btn_fsq_msg_dt_stamp->down_box(FL_DOWN_BOX);
btn_fsq_msg_dt_stamp->value(1);
btn_fsq_msg_dt_stamp->callback((Fl_Callback*)cb_btn_fsq_msg_dt_stamp);
o->value(progdefaults.add_fsq_msg_dt);
} // Fl_Check_Button* btn_fsq_msg_dt_stamp
{ Fl_Check_Button* o = btn_fsq_msg_append = new Fl_Check_Button(385, 205, 210, 15, _("always append to file(s)"));
btn_fsq_msg_append->tooltip(_("append # directive msgs to named file"));
btn_fsq_msg_append->down_box(FL_DOWN_BOX);
btn_fsq_msg_append->value(1);
btn_fsq_msg_append->callback((Fl_Callback*)cb_btn_fsq_msg_append);
o->value(progdefaults.always_append);
} // Fl_Check_Button* btn_fsq_msg_append
{ Fl_Counter* o = cntr_FSQ_notify_time_out = new Fl_Counter(698, 201, 80, 22, _("Notify time out"));
cntr_FSQ_notify_time_out->tooltip(_("Notification dialog closes after XX seconds;^j0 == dialog remains open"));
cntr_FSQ_notify_time_out->type(1);
cntr_FSQ_notify_time_out->minimum(0);
cntr_FSQ_notify_time_out->maximum(30);
cntr_FSQ_notify_time_out->step(1);
cntr_FSQ_notify_time_out->value(10);
cntr_FSQ_notify_time_out->callback((Fl_Callback*)cb_cntr_FSQ_notify_time_out);
cntr_FSQ_notify_time_out->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.fsq_notify_time_out);
} // Fl_Counter* cntr_FSQ_notify_time_out
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(208, 228, 585, 80, _("Logging"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Output* o = txtAuditLog = new Fl_Output(285, 248, 325, 22, _("Audit log"));
o->value(progdefaults.fsq_audit_log.c_str());
} // Fl_Output* txtAuditLog
{ Fl_Light_Button* o = btn_enable_auditlog = new Fl_Light_Button(624, 249, 74, 20, _("Enable"));
btn_enable_auditlog->selection_color((Fl_Color)2);
btn_enable_auditlog->callback((Fl_Callback*)cb_btn_enable_auditlog);
o->value(progdefaults.fsq_enable_audit_log);
} // Fl_Light_Button* btn_enable_auditlog
{ btn_select_auditlog = new Fl_Button(712, 249, 70, 20, _("Select"));
btn_select_auditlog->callback((Fl_Callback*)cb_btn_select_auditlog);
} // Fl_Button* btn_select_auditlog
{ Fl_Output* o = txtHeardLog = new Fl_Output(285, 276, 325, 22, _("Heard log"));
o->value(progdefaults.fsq_heard_log.c_str());
} // Fl_Output* txtHeardLog
{ Fl_Light_Button* o = btn_enable_fsq_heard_log = new Fl_Light_Button(624, 277, 74, 20, _("Enable"));
btn_enable_fsq_heard_log->selection_color((Fl_Color)2);
btn_enable_fsq_heard_log->callback((Fl_Callback*)cb_btn_enable_fsq_heard_log);
o->value(progdefaults.fsq_enable_heard_log);
} // Fl_Light_Button* btn_enable_fsq_heard_log
{ btn_select_fsq_heard_log = new Fl_Button(712, 277, 70, 20, _("Select"));
btn_select_fsq_heard_log->callback((Fl_Callback*)cb_btn_select_fsq_heard_log);
} // Fl_Button* btn_select_fsq_heard_log
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(208, 308, 585, 35, _("Text Colors"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btn_fsq_xmt_color = new Fl_Button(348, 315, 40, 20, _("XMIT"));
btn_fsq_xmt_color->tooltip(_("Transmit text"));
btn_fsq_xmt_color->callback((Fl_Callback*)cb_btn_fsq_xmt_color);
btn_fsq_xmt_color->align(Fl_Align(FL_ALIGN_LEFT));
btn_fsq_xmt_color->color(progdefaults.fsq_xmt_color);
} // Fl_Button* btn_fsq_xmt_color
{ btn_fsq_directed_color = new Fl_Button(478, 315, 40, 20, _("DIRECTED"));
btn_fsq_directed_color->tooltip(_("Directed received text"));
btn_fsq_directed_color->callback((Fl_Callback*)cb_btn_fsq_directed_color);
btn_fsq_directed_color->align(Fl_Align(FL_ALIGN_LEFT));
btn_fsq_directed_color->color(progdefaults.fsq_directed_color);
} // Fl_Button* btn_fsq_directed_color
{ btn_fsq_undirected_color = new Fl_Button(628, 315, 40, 20, _("UNDIRECTED"));
btn_fsq_undirected_color->tooltip(_("Undirected received text"));
btn_fsq_undirected_color->callback((Fl_Callback*)cb_btn_fsq_undirected_color);
btn_fsq_undirected_color->align(Fl_Align(FL_ALIGN_LEFT));
btn_fsq_undirected_color->color(progdefaults.fsq_undirected_color);
} // Fl_Button* btn_fsq_undirected_color
{ btn_fsq_color_defaults = new Fl_Button(710, 315, 74, 20, _("Defaults"));
btn_fsq_color_defaults->callback((Fl_Callback*)cb_btn_fsq_color_defaults);
} // Fl_Button* btn_fsq_color_defaults
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/FSQ"));
config_pages.push_back(p);
tab_tree->add(_("Modem/FSQ"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/IFKP"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(208, 46, 587, 120, _("Tx Parameters"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Round_Button* o = btn_ifkpbaud[0] = new Fl_Round_Button(303, 74, 100, 17, _("1/2 speed"));
btn_ifkpbaud[0]->down_box(FL_ROUND_DOWN_BOX);
btn_ifkpbaud[0]->callback((Fl_Callback*)cb_btn_ifkpbaud);
o->value(progdefaults.ifkp_baud == 0);
} // Fl_Round_Button* btn_ifkpbaud[0]
{ Fl_Round_Button* o = btn_ifkpbaud[1] = new Fl_Round_Button(411, 74, 100, 17, _("1x speed"));
btn_ifkpbaud[1]->tooltip(_("default"));
btn_ifkpbaud[1]->down_box(FL_ROUND_DOWN_BOX);
btn_ifkpbaud[1]->callback((Fl_Callback*)cb_btn_ifkpbaud1);
o->value(progdefaults.ifkp_baud == 1);
} // Fl_Round_Button* btn_ifkpbaud[1]
{ Fl_Round_Button* o = btn_ifkpbaud[2] = new Fl_Round_Button(519, 74, 100, 17, _("2x speed"));
btn_ifkpbaud[2]->down_box(FL_ROUND_DOWN_BOX);
btn_ifkpbaud[2]->callback((Fl_Callback*)cb_btn_ifkpbaud2);
o->value(progdefaults.ifkp_baud == 2);
} // Fl_Round_Button* btn_ifkpbaud[2]
{ Fl_Check_Button* o = btn_ifkp_lowercase = new Fl_Check_Button(303, 106, 220, 15, _("MYCALL always lower case"));
btn_ifkp_lowercase->tooltip(_("convert operator callsign to lower case"));
btn_ifkp_lowercase->down_box(FL_DOWN_BOX);
btn_ifkp_lowercase->callback((Fl_Callback*)cb_btn_ifkp_lowercase);
o->value(progdefaults.ifkp_lowercase);
} // Fl_Check_Button* btn_ifkp_lowercase
{ Fl_Check_Button* o = btn_ifkp_lowercase_call = new Fl_Check_Button(528, 106, 220, 15, _("CALLSIGN always lower case"));
btn_ifkp_lowercase_call->tooltip(_("convert other callsign to lower case"));
btn_ifkp_lowercase_call->down_box(FL_DOWN_BOX);
btn_ifkp_lowercase_call->callback((Fl_Callback*)cb_btn_ifkp_lowercase_call);
o->value(progdefaults.ifkp_lowercase_call);
} // Fl_Check_Button* btn_ifkp_lowercase_call
{ Fl_Check_Button* o = btn_ifkp_freqlock = new Fl_Check_Button(303, 136, 220, 15, _("lock WF at 1500 Hz"));
btn_ifkp_freqlock->tooltip(_("Always transmit at 1500 Hertz center freq."));
btn_ifkp_freqlock->down_box(FL_DOWN_BOX);
btn_ifkp_freqlock->callback((Fl_Callback*)cb_btn_ifkp_freqlock);
o->value(progdefaults.ifkp_freqlock);
} // Fl_Check_Button* btn_ifkp_freqlock
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(208, 171, 587, 100, _("Logging"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Output* o = txt_ifkp_audit_log = new Fl_Output(295, 201, 323, 25, _("Audit log"));
o->value(progdefaults.ifkp_audit_log.c_str());
} // Fl_Output* txt_ifkp_audit_log
{ Fl_Light_Button* o = btn_enable_ifkp_audit_log = new Fl_Light_Button(632, 201, 73, 25, _("Enable"));
btn_enable_ifkp_audit_log->selection_color((Fl_Color)2);
btn_enable_ifkp_audit_log->callback((Fl_Callback*)cb_btn_enable_ifkp_audit_log);
o->value(progdefaults.ifkp_enable_audit_log);
} // Fl_Light_Button* btn_enable_ifkp_audit_log
{ btn_ifkp_select_auditlog = new Fl_Button(713, 201, 70, 25, _("Select"));
btn_ifkp_select_auditlog->callback((Fl_Callback*)cb_btn_ifkp_select_auditlog);
} // Fl_Button* btn_ifkp_select_auditlog
{ Fl_Output* o = txt_ifkp_heard_log = new Fl_Output(295, 230, 323, 25, _("Heard log"));
o->value(progdefaults.ifkp_heard_log.c_str());
} // Fl_Output* txt_ifkp_heard_log
{ Fl_Light_Button* o = btn_enable_ifkp_heard_log = new Fl_Light_Button(632, 230, 73, 25, _("Enable"));
btn_enable_ifkp_heard_log->selection_color((Fl_Color)2);
btn_enable_ifkp_heard_log->callback((Fl_Callback*)cb_btn_enable_ifkp_heard_log);
o->value(progdefaults.ifkp_enable_heard_log);
} // Fl_Light_Button* btn_enable_ifkp_heard_log
{ btn_select_ifkp_heard_log = new Fl_Button(713, 230, 70, 25, _("Select"));
btn_select_ifkp_heard_log->callback((Fl_Callback*)cb_btn_select_ifkp_heard_log);
} // Fl_Button* btn_select_ifkp_heard_log
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/IFKP"));
config_pages.push_back(p);
tab_tree->add(_("Modem/IFKP"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/MT-63"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(249, 36, 490, 84);
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnMT63_8bit = new Fl_Check_Button(394, 50, 205, 20, _("8-bit extended characters (UTF-8)"));
btnMT63_8bit->tooltip(_("Enable this for UTF-8 characters"));
btnMT63_8bit->down_box(FL_DOWN_BOX);
btnMT63_8bit->value(1);
btnMT63_8bit->callback((Fl_Callback*)cb_btnMT63_8bit);
o->value(progdefaults.mt63_8bit);
} // Fl_Check_Button* btnMT63_8bit
{ Fl_Check_Button* o = btnMT63_rx_integration = new Fl_Check_Button(394, 80, 190, 20, _("Long receive integration"));
btnMT63_rx_integration->tooltip(_("Enable for very weak signals"));
btnMT63_rx_integration->down_box(FL_DOWN_BOX);
btnMT63_rx_integration->value(1);
btnMT63_rx_integration->callback((Fl_Callback*)cb_btnMT63_rx_integration);
o->value(progdefaults.mt63_rx_integration);
} // Fl_Check_Button* btnMT63_rx_integration
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(249, 132, 490, 178);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btnMT63_usetones = new Fl_Check_Button(393, 140, 200, 20, _("Transmit lower start tone"));
btnMT63_usetones->down_box(FL_DOWN_BOX);
btnMT63_usetones->callback((Fl_Callback*)cb_btnMT63_usetones);
o->value(progdefaults.mt63_usetones);
} // Fl_Check_Button* btnMT63_usetones
{ Fl_Check_Button* o = btnMT63_upper_lower = new Fl_Check_Button(393, 170, 200, 20, _("Transmit upper start tone"));
btnMT63_upper_lower->down_box(FL_DOWN_BOX);
btnMT63_upper_lower->callback((Fl_Callback*)cb_btnMT63_upper_lower);
o->value(progdefaults.mt63_twotones);
if (!btnMT63_usetones->value()) o->deactivate();
} // Fl_Check_Button* btnMT63_upper_lower
{ Fl_Spinner2* o = MT63_tone_duration = new Fl_Spinner2(393, 196, 40, 20, _("Tone Duration (secs)"));
MT63_tone_duration->box(FL_NO_BOX);
MT63_tone_duration->color(FL_BACKGROUND_COLOR);
MT63_tone_duration->selection_color(FL_BACKGROUND_COLOR);
MT63_tone_duration->labeltype(FL_NORMAL_LABEL);
MT63_tone_duration->labelfont(0);
MT63_tone_duration->labelsize(14);
MT63_tone_duration->labelcolor(FL_FOREGROUND_COLOR);
MT63_tone_duration->maximum(10);
MT63_tone_duration->value(4);
MT63_tone_duration->callback((Fl_Callback*)cb_MT63_tone_duration);
MT63_tone_duration->align(Fl_Align(FL_ALIGN_RIGHT));
MT63_tone_duration->when(FL_WHEN_RELEASE);
o->value(progdefaults.mt63_tone_duration);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* MT63_tone_duration
{ Fl_Check_Button* o = btnMT63_at500 = new Fl_Check_Button(393, 225, 200, 20, _("Low tone at 500 Hz"));
btnMT63_at500->down_box(FL_DOWN_BOX);
btnMT63_at500->callback((Fl_Callback*)cb_btnMT63_at500);
o->value(progdefaults.mt63_at500);
} // Fl_Check_Button* btnMT63_at500
{ Fl_Check_Button* o = btnMT63_centered = new Fl_Check_Button(393, 250, 248, 20, _("Centered at 1500 Hz (SHARES)"));
btnMT63_centered->down_box(FL_DOWN_BOX);
btnMT63_centered->callback((Fl_Callback*)cb_btnMT63_centered);
o->value(progdefaults.mt63_centered);
} // Fl_Check_Button* btnMT63_centered
{ Fl_Check_Button* o = btnMT63_manual = new Fl_Check_Button(393, 275, 200, 20, _("Manual tuning"));
btnMT63_manual->down_box(FL_DOWN_BOX);
btnMT63_manual->callback((Fl_Callback*)cb_btnMT63_manual);
o->value(!progdefaults.mt63_at500 && !progdefaults.mt63_centered);
} // Fl_Check_Button* btnMT63_manual
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/MT-63"));
config_pages.push_back(p);
tab_tree->add(_("Modem/MT-63"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/Contestia"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(257, 40, 490, 240);
o->box(FL_ENGRAVED_FRAME);
{ Fl_ListBox* o = i_listbox_contestia_bandwidth = new Fl_ListBox(312, 60, 85, 22, _("Bandwidth"));
i_listbox_contestia_bandwidth->tooltip(_("Select bandwidth"));
i_listbox_contestia_bandwidth->box(FL_DOWN_BOX);
i_listbox_contestia_bandwidth->color(FL_BACKGROUND2_COLOR);
i_listbox_contestia_bandwidth->selection_color(FL_BACKGROUND_COLOR);
i_listbox_contestia_bandwidth->labeltype(FL_NORMAL_LABEL);
i_listbox_contestia_bandwidth->labelfont(0);
i_listbox_contestia_bandwidth->labelsize(14);
i_listbox_contestia_bandwidth->labelcolor(FL_FOREGROUND_COLOR);
i_listbox_contestia_bandwidth->callback((Fl_Callback*)cb_i_listbox_contestia_bandwidth);
i_listbox_contestia_bandwidth->align(Fl_Align(FL_ALIGN_RIGHT));
i_listbox_contestia_bandwidth->when(FL_WHEN_RELEASE);
o->add(szContestiaBandwidth);
o->index(progdefaults.contestiabw);
o->labelsize(FL_NORMAL_SIZE);
i_listbox_contestia_bandwidth->end();
} // Fl_ListBox* i_listbox_contestia_bandwidth
{ Fl_ListBox* o = i_listbox_contestia_tones = new Fl_ListBox(573, 60, 70, 22, _("Tones"));
i_listbox_contestia_tones->tooltip(_("Select number of tones"));
i_listbox_contestia_tones->box(FL_DOWN_BOX);
i_listbox_contestia_tones->color(FL_BACKGROUND2_COLOR);
i_listbox_contestia_tones->selection_color(FL_BACKGROUND_COLOR);
i_listbox_contestia_tones->labeltype(FL_NORMAL_LABEL);
i_listbox_contestia_tones->labelfont(0);
i_listbox_contestia_tones->labelsize(14);
i_listbox_contestia_tones->labelcolor(FL_FOREGROUND_COLOR);
i_listbox_contestia_tones->callback((Fl_Callback*)cb_i_listbox_contestia_tones);
i_listbox_contestia_tones->align(Fl_Align(FL_ALIGN_RIGHT));
i_listbox_contestia_tones->when(FL_WHEN_RELEASE);
o->add(szContestiaTones);
o->index(progdefaults.contestiatones);
o->labelsize(FL_NORMAL_SIZE);
i_listbox_contestia_tones->end();
} // Fl_ListBox* i_listbox_contestia_tones
{ Fl_Group* o = new Fl_Group(295, 99, 414, 101, _("Receive synchronizer"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter2* o = cntContestia_smargin = new Fl_Counter2(314, 130, 70, 22, _("Tune margin (tone frequency spacing)"));
cntContestia_smargin->tooltip(_("Change ONLY to experiment"));
cntContestia_smargin->type(1);
cntContestia_smargin->box(FL_UP_BOX);
cntContestia_smargin->color(FL_BACKGROUND_COLOR);
cntContestia_smargin->selection_color(FL_INACTIVE_COLOR);
cntContestia_smargin->labeltype(FL_NORMAL_LABEL);
cntContestia_smargin->labelfont(0);
cntContestia_smargin->labelsize(14);
cntContestia_smargin->labelcolor(FL_FOREGROUND_COLOR);
cntContestia_smargin->minimum(2);
cntContestia_smargin->maximum(128);
cntContestia_smargin->step(1);
cntContestia_smargin->value(8);
cntContestia_smargin->callback((Fl_Callback*)cb_cntContestia_smargin);
cntContestia_smargin->align(Fl_Align(FL_ALIGN_RIGHT));
cntContestia_smargin->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntContestia_smargin
{ Fl_Counter2* o = cntContestia_sinteg = new Fl_Counter2(314, 162, 70, 22, _("Integration period (FEC blocks)"));
cntContestia_sinteg->tooltip(_("Change ONLY to experiment"));
cntContestia_sinteg->type(1);
cntContestia_sinteg->box(FL_UP_BOX);
cntContestia_sinteg->color(FL_BACKGROUND_COLOR);
cntContestia_sinteg->selection_color(FL_INACTIVE_COLOR);
cntContestia_sinteg->labeltype(FL_NORMAL_LABEL);
cntContestia_sinteg->labelfont(0);
cntContestia_sinteg->labelsize(14);
cntContestia_sinteg->labelcolor(FL_FOREGROUND_COLOR);
cntContestia_sinteg->minimum(2);
cntContestia_sinteg->maximum(128);
cntContestia_sinteg->step(1);
cntContestia_sinteg->value(4);
cntContestia_sinteg->callback((Fl_Callback*)cb_cntContestia_sinteg);
cntContestia_sinteg->align(Fl_Align(FL_ALIGN_RIGHT));
cntContestia_sinteg->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntContestia_sinteg
o->end();
} // Fl_Group* o
{ btnContestia_8bit = new Fl_Check_Button(312, 209, 200, 20, _("8-bit extended characters"));
btnContestia_8bit->tooltip(_("Enable this for Latin-1 accented characters"));
btnContestia_8bit->down_box(FL_DOWN_BOX);
btnContestia_8bit->callback((Fl_Callback*)cb_btnContestia_8bit);
} // Fl_Check_Button* btnContestia_8bit
{ Fl_Check_Button* o = btnContestia_start_stop_tones = new Fl_Check_Button(312, 240, 265, 20, _("xmt start/stop tones"));
btnContestia_start_stop_tones->tooltip(_("Enable this to send start/stop tones"));
btnContestia_start_stop_tones->down_box(FL_DOWN_BOX);
btnContestia_start_stop_tones->callback((Fl_Callback*)cb_btnContestia_start_stop_tones);
o->value(progdefaults.contestia_start_tones);
} // Fl_Check_Button* btnContestia_start_stop_tones
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/Contestia"));
config_pages.push_back(p);
tab_tree->add(_("Modem/Contestia"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/Olivia"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(253, 40, 490, 280);
o->box(FL_ENGRAVED_FRAME);
{ Fl_ListBox* o = i_listbox_olivia_bandwidth = new Fl_ListBox(308, 60, 85, 22, _("Bandwidth"));
i_listbox_olivia_bandwidth->tooltip(_("Select bandwidth"));
i_listbox_olivia_bandwidth->box(FL_DOWN_BOX);
i_listbox_olivia_bandwidth->color(FL_BACKGROUND2_COLOR);
i_listbox_olivia_bandwidth->selection_color(FL_BACKGROUND_COLOR);
i_listbox_olivia_bandwidth->labeltype(FL_NORMAL_LABEL);
i_listbox_olivia_bandwidth->labelfont(0);
i_listbox_olivia_bandwidth->labelsize(14);
i_listbox_olivia_bandwidth->labelcolor(FL_FOREGROUND_COLOR);
i_listbox_olivia_bandwidth->callback((Fl_Callback*)cb_i_listbox_olivia_bandwidth);
i_listbox_olivia_bandwidth->align(Fl_Align(FL_ALIGN_RIGHT));
i_listbox_olivia_bandwidth->when(FL_WHEN_RELEASE);
o->add(szOliviaBandwidth);
o->index(progdefaults.oliviabw);
o->labelsize(FL_NORMAL_SIZE);
i_listbox_olivia_bandwidth->end();
} // Fl_ListBox* i_listbox_olivia_bandwidth
{ Fl_ListBox* o = i_listbox_olivia_tones = new Fl_ListBox(569, 60, 70, 22, _("Tones"));
i_listbox_olivia_tones->tooltip(_("Select number of tones"));
i_listbox_olivia_tones->box(FL_DOWN_BOX);
i_listbox_olivia_tones->color(FL_BACKGROUND2_COLOR);
i_listbox_olivia_tones->selection_color(FL_BACKGROUND_COLOR);
i_listbox_olivia_tones->labeltype(FL_NORMAL_LABEL);
i_listbox_olivia_tones->labelfont(0);
i_listbox_olivia_tones->labelsize(14);
i_listbox_olivia_tones->labelcolor(FL_FOREGROUND_COLOR);
i_listbox_olivia_tones->callback((Fl_Callback*)cb_i_listbox_olivia_tones);
i_listbox_olivia_tones->align(Fl_Align(FL_ALIGN_RIGHT));
i_listbox_olivia_tones->when(FL_WHEN_RELEASE);
o->add(szOliviaTones);
o->index(progdefaults.oliviatones);
o->labelsize(FL_NORMAL_SIZE);
i_listbox_olivia_tones->end();
} // Fl_ListBox* i_listbox_olivia_tones
{ Fl_Group* o = new Fl_Group(308, 99, 379, 133, _("Receive synchronizer"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter2* o = cntOlivia_smargin = new Fl_Counter2(323, 130, 70, 22, _("Tune margin (tone frequency spacing)"));
cntOlivia_smargin->tooltip(_("Change ONLY to experiment"));
cntOlivia_smargin->type(1);
cntOlivia_smargin->box(FL_UP_BOX);
cntOlivia_smargin->color(FL_BACKGROUND_COLOR);
cntOlivia_smargin->selection_color(FL_INACTIVE_COLOR);
cntOlivia_smargin->labeltype(FL_NORMAL_LABEL);
cntOlivia_smargin->labelfont(0);
cntOlivia_smargin->labelsize(14);
cntOlivia_smargin->labelcolor(FL_FOREGROUND_COLOR);
cntOlivia_smargin->minimum(2);
cntOlivia_smargin->maximum(128);
cntOlivia_smargin->step(1);
cntOlivia_smargin->value(8);
cntOlivia_smargin->callback((Fl_Callback*)cb_cntOlivia_smargin);
cntOlivia_smargin->align(Fl_Align(FL_ALIGN_RIGHT));
cntOlivia_smargin->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.oliviasmargin);
} // Fl_Counter2* cntOlivia_smargin
{ Fl_Counter2* o = cntOlivia_sinteg = new Fl_Counter2(323, 162, 70, 22, _("Integration period (FEC blocks)"));
cntOlivia_sinteg->tooltip(_("Change ONLY to experiment"));
cntOlivia_sinteg->type(1);
cntOlivia_sinteg->box(FL_UP_BOX);
cntOlivia_sinteg->color(FL_BACKGROUND_COLOR);
cntOlivia_sinteg->selection_color(FL_INACTIVE_COLOR);
cntOlivia_sinteg->labeltype(FL_NORMAL_LABEL);
cntOlivia_sinteg->labelfont(0);
cntOlivia_sinteg->labelsize(14);
cntOlivia_sinteg->labelcolor(FL_FOREGROUND_COLOR);
cntOlivia_sinteg->minimum(2);
cntOlivia_sinteg->maximum(128);
cntOlivia_sinteg->step(1);
cntOlivia_sinteg->value(4);
cntOlivia_sinteg->callback((Fl_Callback*)cb_cntOlivia_sinteg);
cntOlivia_sinteg->align(Fl_Align(FL_ALIGN_RIGHT));
cntOlivia_sinteg->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.oliviasinteg);
} // Fl_Counter2* cntOlivia_sinteg
{ Fl_Check_Button* o = btn_olivia_reset_fec = new Fl_Check_Button(324, 194, 349, 20, _("Reset FEC blocks when changing BW or Tones"));
btn_olivia_reset_fec->tooltip(_("Enable this for UTF-8 character transmission"));
btn_olivia_reset_fec->down_box(FL_DOWN_BOX);
btn_olivia_reset_fec->callback((Fl_Callback*)cb_btn_olivia_reset_fec);
o->value(progdefaults.olivia_reset_fec);
} // Fl_Check_Button* btn_olivia_reset_fec
o->end();
} // Fl_Group* o
{ Fl_Check_Button* o = btnOlivia_8bit = new Fl_Check_Button(329, 255, 265, 20, _("8-bit extended characters (UTF-8)"));
btnOlivia_8bit->tooltip(_("Enable this for UTF-8 character transmission"));
btnOlivia_8bit->down_box(FL_DOWN_BOX);
btnOlivia_8bit->callback((Fl_Callback*)cb_btnOlivia_8bit);
o->value(progdefaults.olivia8bit);
} // Fl_Check_Button* btnOlivia_8bit
{ Fl_Check_Button* o = btnOlivia_start_stop_tones = new Fl_Check_Button(329, 279, 265, 20, _("xmt start/stop tones"));
btnOlivia_start_stop_tones->tooltip(_("Enable this to send start/stop tones"));
btnOlivia_start_stop_tones->down_box(FL_DOWN_BOX);
btnOlivia_start_stop_tones->callback((Fl_Callback*)cb_btnOlivia_start_stop_tones);
o->value(progdefaults.olivia_start_tones);
} // Fl_Check_Button* btnOlivia_start_stop_tones
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/Olivia"));
config_pages.push_back(p);
tab_tree->add(_("Modem/Olivia"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/Psk"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(255, 33, 490, 86, _("AFC behavior"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter2* o = cntSearchRange = new Fl_Counter2(400, 57, 75, 20, _("Acquisition search range (Hz)"));
cntSearchRange->tooltip(_("Capture signals within this frequency range"));
cntSearchRange->type(1);
cntSearchRange->box(FL_UP_BOX);
cntSearchRange->color(FL_BACKGROUND_COLOR);
cntSearchRange->selection_color(FL_INACTIVE_COLOR);
cntSearchRange->labeltype(FL_NORMAL_LABEL);
cntSearchRange->labelfont(0);
cntSearchRange->labelsize(14);
cntSearchRange->labelcolor(FL_FOREGROUND_COLOR);
cntSearchRange->minimum(10);
cntSearchRange->maximum(500);
cntSearchRange->step(10);
cntSearchRange->value(200);
cntSearchRange->callback((Fl_Callback*)cb_cntSearchRange);
cntSearchRange->align(Fl_Align(FL_ALIGN_RIGHT));
cntSearchRange->when(FL_WHEN_CHANGED);
o->value(progdefaults.SearchRange);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntSearchRange
{ Fl_Counter2* o = cntACQsn = new Fl_Counter2(400, 86, 75, 20, _("Acquisition S/N (dB)"));
cntACQsn->tooltip(_("Capture signals over this threshold"));
cntACQsn->type(1);
cntACQsn->box(FL_UP_BOX);
cntACQsn->color(FL_BACKGROUND_COLOR);
cntACQsn->selection_color(FL_INACTIVE_COLOR);
cntACQsn->labeltype(FL_NORMAL_LABEL);
cntACQsn->labelfont(0);
cntACQsn->labelsize(14);
cntACQsn->labelcolor(FL_FOREGROUND_COLOR);
cntACQsn->minimum(3);
cntACQsn->maximum(20);
cntACQsn->step(1);
cntACQsn->value(6);
cntACQsn->callback((Fl_Callback*)cb_cntACQsn);
cntACQsn->align(Fl_Align(FL_ALIGN_RIGHT));
cntACQsn->when(FL_WHEN_CHANGED);
o->value(progdefaults.ACQsn);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntACQsn
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(255, 121, 490, 65, _("S/N and IMD behavior"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ListBox* o = listbox_psk_status_timeout = new Fl_ListBox(380, 152, 80, 20, _("after"));
listbox_psk_status_timeout->tooltip(_("Behavior of s/n imd"));
listbox_psk_status_timeout->box(FL_DOWN_BOX);
listbox_psk_status_timeout->color(FL_BACKGROUND2_COLOR);
listbox_psk_status_timeout->selection_color(FL_BACKGROUND_COLOR);
listbox_psk_status_timeout->labeltype(FL_NORMAL_LABEL);
listbox_psk_status_timeout->labelfont(0);
listbox_psk_status_timeout->labelsize(14);
listbox_psk_status_timeout->labelcolor(FL_FOREGROUND_COLOR);
listbox_psk_status_timeout->callback((Fl_Callback*)cb_listbox_psk_status_timeout);
listbox_psk_status_timeout->align(Fl_Align(FL_ALIGN_RIGHT));
listbox_psk_status_timeout->when(FL_WHEN_RELEASE);
o->add(_("Clear")); o->add(_("Dim"));
o->index(progdefaults.StatusDim);
o->labelsize(FL_NORMAL_SIZE);
listbox_psk_status_timeout->end();
} // Fl_ListBox* listbox_psk_status_timeout
{ Fl_Counter2* o = new Fl_Counter2(521, 152, 75, 20, _("seconds"));
o->tooltip(_("Will occur after this time in seconds"));
o->type(1);
o->box(FL_UP_BOX);
o->color(FL_BACKGROUND_COLOR);
o->selection_color(FL_INACTIVE_COLOR);
o->labeltype(FL_NORMAL_LABEL);
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_FOREGROUND_COLOR);
o->minimum(0);
o->maximum(30);
o->step(1);
o->callback((Fl_Callback*)cb_seconds);
o->align(Fl_Align(FL_ALIGN_RIGHT));
o->when(FL_WHEN_CHANGED);
o->value(progdefaults.StatusTimeout);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(255, 191, 490, 80, _("Multi-Channel Signal Processing"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnEnablePSKbrowsing = new Fl_Check_Button(425, 241, 180, 20, _("Multi-channel detector"));
btnEnablePSKbrowsing->down_box(FL_DOWN_BOX);
btnEnablePSKbrowsing->callback((Fl_Callback*)cb_btnEnablePSKbrowsing);
o->value(progdefaults.pskbrowser_on);
} // Fl_Check_Button* btnEnablePSKbrowsing
{ Fl_Box* o = new Fl_Box(265, 218, 440, 20, _("Disable on very slow CPUs or if signal browser is not used"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(255, 273, 490, 47, _("8 psk"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnPSKpilot = new Fl_Check_Button(300, 286, 113, 20, _("Pilot tone"));
btnPSKpilot->tooltip(_("Enable encode/decode vestigial pilot tone"));
btnPSKpilot->down_box(FL_DOWN_BOX);
btnPSKpilot->callback((Fl_Callback*)cb_btnPSKpilot);
o->value(progdefaults.pskpilot);
} // Fl_Check_Button* btnPSKpilot
{ Fl_Counter2* o = cnt_pilot_power = new Fl_Counter2(405, 286, 75, 20, _("pilot power (dB)"));
cnt_pilot_power->tooltip(_("Pilot tone power relative to signal"));
cnt_pilot_power->type(1);
cnt_pilot_power->box(FL_UP_BOX);
cnt_pilot_power->color(FL_BACKGROUND_COLOR);
cnt_pilot_power->selection_color(FL_INACTIVE_COLOR);
cnt_pilot_power->labeltype(FL_NORMAL_LABEL);
cnt_pilot_power->labelfont(0);
cnt_pilot_power->labelsize(14);
cnt_pilot_power->labelcolor(FL_FOREGROUND_COLOR);
cnt_pilot_power->minimum(-60);
cnt_pilot_power->maximum(-20);
cnt_pilot_power->step(1);
cnt_pilot_power->value(-30);
cnt_pilot_power->callback((Fl_Callback*)cb_cnt_pilot_power);
cnt_pilot_power->align(Fl_Align(FL_ALIGN_RIGHT));
cnt_pilot_power->when(FL_WHEN_CHANGED);
o->value(progdefaults.pilot_power);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cnt_pilot_power
{ Fl_Check_Button* o = btnPSK8Preamble = new Fl_Check_Button(610, 286, 113, 20, _("Short Preamble"));
btnPSK8Preamble->tooltip(_("Enable short preamble for 8PSK transmission"));
btnPSK8Preamble->down_box(FL_DOWN_BOX);
btnPSK8Preamble->callback((Fl_Callback*)cb_btnPSK8Preamble);
o->value(progStatus.psk8DCDShortFlag);
} // Fl_Check_Button* btnPSK8Preamble
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/Psk"));
config_pages.push_back(p);
tab_tree->add(_("Modem/Psk"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/TTY/Rx"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(202, 22, 595, 50, _("Receive"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ListBox* o = i_listbox_rtty_afc_speed = new Fl_ListBox(296, 43, 90, 22, _("AFC speed"));
i_listbox_rtty_afc_speed->tooltip(_("AFC tracking speed"));
i_listbox_rtty_afc_speed->box(FL_DOWN_BOX);
i_listbox_rtty_afc_speed->color(FL_BACKGROUND2_COLOR);
i_listbox_rtty_afc_speed->selection_color(FL_BACKGROUND_COLOR);
i_listbox_rtty_afc_speed->labeltype(FL_NORMAL_LABEL);
i_listbox_rtty_afc_speed->labelfont(0);
i_listbox_rtty_afc_speed->labelsize(14);
i_listbox_rtty_afc_speed->labelcolor(FL_FOREGROUND_COLOR);
i_listbox_rtty_afc_speed->callback((Fl_Callback*)cb_i_listbox_rtty_afc_speed);
i_listbox_rtty_afc_speed->align(Fl_Align(FL_ALIGN_LEFT));
i_listbox_rtty_afc_speed->when(FL_WHEN_RELEASE);
o->add("Slow"); o->add("Normal"); o->add("Fast");
o->index(progdefaults.rtty_afcspeed);
o->labelsize(FL_NORMAL_SIZE);
i_listbox_rtty_afc_speed->end();
} // Fl_ListBox* i_listbox_rtty_afc_speed
{ Fl_Check_Button* o = chkUOSrx = new Fl_Check_Button(400, 45, 63, 18, _("RX - unshift on space"));
chkUOSrx->tooltip(_("Revert to unshifted char\'s on a space"));
chkUOSrx->down_box(FL_DOWN_BOX);
chkUOSrx->callback((Fl_Callback*)cb_chkUOSrx);
o->value(progdefaults.UOSrx);
} // Fl_Check_Button* chkUOSrx
{ Fl_Value_Input* o = rtty_rx_shape = new Fl_Value_Input(745, 42, 48, 25, _("Filter Shape Factor"));
rtty_rx_shape->tooltip(_("rcos timing coefficient:\n1.0 ... 2.0\nW1HKJ best 1.275\nDO2SMF best 1.500"));
rtty_rx_shape->minimum(1);
rtty_rx_shape->maximum(2);
rtty_rx_shape->step(0.001);
rtty_rx_shape->value(1.25);
rtty_rx_shape->callback((Fl_Callback*)cb_rtty_rx_shape);
o->value(progdefaults.rtty_filter);
} // Fl_Value_Input* rtty_rx_shape
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(202, 72, 595, 55, _("Decode (CWI suppression)"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnRxTones[0] = new Fl_Check_Button(308, 98, 77, 13, _("Mark-Space"));
btnRxTones[0]->down_box(FL_DOWN_BOX);
btnRxTones[0]->callback((Fl_Callback*)cb_btnRxTones);
o->value(progdefaults.rtty_cwi == 0);
} // Fl_Check_Button* btnRxTones[0]
{ Fl_Check_Button* o = btnRxTones[1] = new Fl_Check_Button(455, 98, 77, 13, _("Mark only"));
btnRxTones[1]->down_box(FL_DOWN_BOX);
btnRxTones[1]->callback((Fl_Callback*)cb_btnRxTones1);
o->value(progdefaults.rtty_cwi == 1);
} // Fl_Check_Button* btnRxTones[1]
{ Fl_Check_Button* o = btnRxTones[2] = new Fl_Check_Button(602, 98, 78, 13, _("Space only"));
btnRxTones[2]->down_box(FL_DOWN_BOX);
btnRxTones[2]->callback((Fl_Callback*)cb_btnRxTones2);
o->value(progdefaults.rtty_cwi == 2);
} // Fl_Check_Button* btnRxTones[2]
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(202, 128, 595, 55, _("RTTY Scope Display"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnPreferXhairScope = new Fl_Check_Button(308, 150, 182, 20, _("Use cross hair scope"));
btnPreferXhairScope->tooltip(_("Default to cross hair digiscope"));
btnPreferXhairScope->down_box(FL_DOWN_BOX);
btnPreferXhairScope->callback((Fl_Callback*)cb_btnPreferXhairScope);
o->value(progdefaults.PreferXhairScope);
} // Fl_Check_Button* btnPreferXhairScope
{ Fl_Check_Button* o = chk_true_scope = new Fl_Check_Button(551, 150, 77, 20, _("XY - classic scope"));
chk_true_scope->tooltip(_("Enabled - use Mark/Space filter outputs\nDisabled - use pseudo signals"));
chk_true_scope->down_box(FL_DOWN_BOX);
chk_true_scope->callback((Fl_Callback*)cb_chk_true_scope);
o->value(progdefaults.true_scope);
} // Fl_Check_Button* chk_true_scope
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(202, 184, 595, 54, _("Log RTTY frequency"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chk_useMARKfreq = new Fl_Check_Button(308, 208, 161, 17, _("Use MARK freq\'"));
chk_useMARKfreq->tooltip(_("Enabled - log QSO using Mark frequency\nDisabled - log QSO using center frequ\
ency"));
chk_useMARKfreq->down_box(FL_DOWN_BOX);
chk_useMARKfreq->value(1);
chk_useMARKfreq->callback((Fl_Callback*)cb_chk_useMARKfreq);
o->value(progdefaults.useMARKfreq);
} // Fl_Check_Button* chk_useMARKfreq
{ Fl_Button* o = btnRTTY_mark_color = new Fl_Button(551, 205, 45, 20, _("track color"));
btnRTTY_mark_color->tooltip(_("Color of Mark Track"));
btnRTTY_mark_color->color((Fl_Color)2);
btnRTTY_mark_color->callback((Fl_Callback*)cb_btnRTTY_mark_color);
btnRTTY_mark_color->align(Fl_Align(FL_ALIGN_RIGHT));
o->color(fl_rgb_color(progdefaults.rttymarkRGBI.R,progdefaults.rttymarkRGBI.G,progdefaults.rttymarkRGBI.B));
} // Fl_Button* btnRTTY_mark_color
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(202, 240, 595, 104, _("RTTY Bell"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chk_audibleBELL = new Fl_Check_Button(308, 259, 161, 22, _("Audible BELL"));
chk_audibleBELL->tooltip(_("Enabled - log QSO using Mark frequency\nDisabled - log QSO using center frequ\
ency"));
chk_audibleBELL->down_box(FL_DOWN_BOX);
chk_audibleBELL->value(1);
chk_audibleBELL->callback((Fl_Callback*)cb_chk_audibleBELL);
o->value(progdefaults.audibleBELL);
} // Fl_Check_Button* chk_audibleBELL
{ Fl_Check_Button* o = chk_visibleBELL = new Fl_Check_Button(551, 259, 161, 22, _("Visible BELL"));
chk_visibleBELL->tooltip(_("Enabled - log QSO using Mark frequency\nDisabled - log QSO using center frequ\
ency"));
chk_visibleBELL->down_box(FL_DOWN_BOX);
chk_visibleBELL->value(1);
chk_visibleBELL->callback((Fl_Callback*)cb_chk_visibleBELL);
o->value(progdefaults.visibleBELL);
} // Fl_Check_Button* chk_visibleBELL
{ Fl_File_Input* o = inp_wav_fname_bell_ring = new Fl_File_Input(223, 301, 301, 35, _("RTTY Bell audio wav"));
inp_wav_fname_bell_ring->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value(progdefaults.BELL_RING.c_str());
} // Fl_File_Input* inp_wav_fname_bell_ring
{ btn_select_bell_ring_wav = new Fl_Button(526, 312, 59, 24, _("Select"));
btn_select_bell_ring_wav->callback((Fl_Callback*)cb_btn_select_bell_ring_wav);
} // Fl_Button* btn_select_bell_ring_wav
{ Fl_Choice* o = mnu_bell_ring_menu = new Fl_Choice(589, 312, 134, 24, _("Sound:"));
mnu_bell_ring_menu->box(FL_DOWN_BOX);
mnu_bell_ring_menu->down_box(FL_BORDER_BOX);
mnu_bell_ring_menu->color((Fl_Color)53);
mnu_bell_ring_menu->callback((Fl_Callback*)cb_mnu_bell_ring_menu);
mnu_bell_ring_menu->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->add("wav file|bark|checkout|diesel|steam_train|doesnot|beeboo|phone|dinner_bell|rtty_bell|standard_tone");
o->value(progdefaults.BELL_RING_MENU);
} // Fl_Choice* mnu_bell_ring_menu
{ btn_test_bell_ring_wav = new Fl_Button(728, 312, 59, 24, _("Test"));
btn_test_bell_ring_wav->callback((Fl_Callback*)cb_btn_test_bell_ring_wav);
} // Fl_Button* btn_test_bell_ring_wav
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/TTY/Rx"));
config_pages.push_back(p);
tab_tree->add(_("Modem/TTY/Rx"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/TTY/Tx"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 21, 590, 200, _("Sound Card FSK"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ListBox* o = selShift = new Fl_ListBox(281, 43, 100, 22, _("Carrier shift"));
selShift->tooltip(_("Select carrier shift"));
selShift->box(FL_DOWN_BOX);
selShift->color(FL_BACKGROUND2_COLOR);
selShift->selection_color(FL_BACKGROUND_COLOR);
selShift->labeltype(FL_NORMAL_LABEL);
selShift->labelfont(0);
selShift->labelsize(14);
selShift->labelcolor(FL_FOREGROUND_COLOR);
selShift->callback((Fl_Callback*)cb_selShift);
selShift->align(Fl_Align(FL_ALIGN_RIGHT));
selShift->when(FL_WHEN_CHANGED);
o->add(szShifts);o->index(progdefaults.rtty_shift);
o->labelsize(FL_NORMAL_SIZE);
selShift->end();
} // Fl_ListBox* selShift
{ Fl_Counter2* o = selCustomShift = new Fl_Counter2(281, 73, 100, 22, _("Custom shift"));
selCustomShift->tooltip(_("Input carrier shift"));
selCustomShift->box(FL_UP_BOX);
selCustomShift->color(FL_BACKGROUND_COLOR);
selCustomShift->selection_color(FL_INACTIVE_COLOR);
selCustomShift->labeltype(FL_NORMAL_LABEL);
selCustomShift->labelfont(0);
selCustomShift->labelsize(14);
selCustomShift->labelcolor(FL_FOREGROUND_COLOR);
selCustomShift->minimum(10);
selCustomShift->maximum(1200);
selCustomShift->step(10);
selCustomShift->value(450);
selCustomShift->callback((Fl_Callback*)cb_selCustomShift);
selCustomShift->align(Fl_Align(FL_ALIGN_RIGHT));
selCustomShift->when(FL_WHEN_CHANGED);
o->lstep(100.0);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* selCustomShift
{ Fl_ListBox* o = selBaud = new Fl_ListBox(281, 103, 100, 22, _("Baud rate"));
selBaud->tooltip(_("Select carrier baudrate"));
selBaud->box(FL_DOWN_BOX);
selBaud->color(FL_BACKGROUND2_COLOR);
selBaud->selection_color(FL_BACKGROUND_COLOR);
selBaud->labeltype(FL_NORMAL_LABEL);
selBaud->labelfont(0);
selBaud->labelsize(14);
selBaud->labelcolor(FL_FOREGROUND_COLOR);
selBaud->callback((Fl_Callback*)cb_selBaud);
selBaud->align(Fl_Align(FL_ALIGN_RIGHT));
selBaud->when(FL_WHEN_CHANGED);
o->add(szBauds);
o->index(progdefaults.rtty_baud);
o->labelsize(FL_NORMAL_SIZE);
selBaud->end();
} // Fl_ListBox* selBaud
{ Fl_ListBox* o = selBits = new Fl_ListBox(281, 133, 100, 22, _("Bits per character"));
selBits->tooltip(_("Select # bits / char"));
selBits->box(FL_DOWN_BOX);
selBits->color(FL_BACKGROUND2_COLOR);
selBits->selection_color(FL_BACKGROUND_COLOR);
selBits->labeltype(FL_NORMAL_LABEL);
selBits->labelfont(0);
selBits->labelsize(14);
selBits->labelcolor(FL_FOREGROUND_COLOR);
selBits->callback((Fl_Callback*)cb_selBits);
selBits->align(Fl_Align(FL_ALIGN_RIGHT));
selBits->when(FL_WHEN_CHANGED);
o->add(szSelBits);o->index(progdefaults.rtty_bits);
o->labelsize(FL_NORMAL_SIZE);
selBits->end();
} // Fl_ListBox* selBits
{ Fl_ListBox* o = selParity = new Fl_ListBox(281, 163, 100, 22, _("Parity"));
selParity->tooltip(_("Select parity"));
selParity->box(FL_DOWN_BOX);
selParity->color(FL_BACKGROUND2_COLOR);
selParity->selection_color(FL_BACKGROUND_COLOR);
selParity->labeltype(FL_NORMAL_LABEL);
selParity->labelfont(0);
selParity->labelsize(14);
selParity->labelcolor(FL_FOREGROUND_COLOR);
selParity->callback((Fl_Callback*)cb_selParity);
selParity->align(Fl_Align(FL_ALIGN_RIGHT));
selParity->when(FL_WHEN_CHANGED);
o->add(szParity);o->index(progdefaults.rtty_parity);
o->labelsize(FL_NORMAL_SIZE);
selParity->end();
} // Fl_ListBox* selParity
{ Fl_ListBox* o = selStopBits = new Fl_ListBox(281, 193, 100, 22, _("Stop bits"));
selStopBits->tooltip(_("Select # stop bits"));
selStopBits->box(FL_DOWN_BOX);
selStopBits->color(FL_BACKGROUND2_COLOR);
selStopBits->selection_color(FL_BACKGROUND_COLOR);
selStopBits->labeltype(FL_NORMAL_LABEL);
selStopBits->labelfont(0);
selStopBits->labelsize(14);
selStopBits->labelcolor(FL_FOREGROUND_COLOR);
selStopBits->callback((Fl_Callback*)cb_selStopBits);
selStopBits->align(Fl_Align(FL_ALIGN_RIGHT));
selStopBits->when(FL_WHEN_CHANGED);
o->add(szStopBits);o->index(progdefaults.rtty_stop);
o->labelsize(FL_NORMAL_SIZE);
selStopBits->end();
} // Fl_ListBox* selStopBits
{ Fl_Check_Button* o = btnAUTOCRLF = new Fl_Check_Button(532, 43, 90, 22, _("AutoCRLF"));
btnAUTOCRLF->tooltip(_("Add CRLF after page width characters"));
btnAUTOCRLF->down_box(FL_DOWN_BOX);
btnAUTOCRLF->callback((Fl_Callback*)cb_btnAUTOCRLF);
o->value(progdefaults.rtty_autocrlf);
} // Fl_Check_Button* btnAUTOCRLF
{ Fl_Counter2* o = cntrAUTOCRLF = new Fl_Counter2(643, 43, 75, 22, _("chars"));
cntrAUTOCRLF->tooltip(_("Auto CRLF line length"));
cntrAUTOCRLF->type(1);
cntrAUTOCRLF->box(FL_UP_BOX);
cntrAUTOCRLF->color(FL_BACKGROUND_COLOR);
cntrAUTOCRLF->selection_color(FL_INACTIVE_COLOR);
cntrAUTOCRLF->labeltype(FL_NORMAL_LABEL);
cntrAUTOCRLF->labelfont(0);
cntrAUTOCRLF->labelsize(14);
cntrAUTOCRLF->labelcolor(FL_FOREGROUND_COLOR);
cntrAUTOCRLF->minimum(68);
cntrAUTOCRLF->maximum(80);
cntrAUTOCRLF->step(1);
cntrAUTOCRLF->value(72);
cntrAUTOCRLF->callback((Fl_Callback*)cb_cntrAUTOCRLF);
cntrAUTOCRLF->align(Fl_Align(FL_ALIGN_RIGHT));
cntrAUTOCRLF->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntrAUTOCRLF
{ Fl_Check_Button* o = btnCRCRLF = new Fl_Check_Button(532, 73, 90, 22, _("CR-CR-LF"));
btnCRCRLF->tooltip(_("Use \"cr cr lf\" for \"cr lf\""));
btnCRCRLF->down_box(FL_DOWN_BOX);
btnCRCRLF->callback((Fl_Callback*)cb_btnCRCRLF);
btnCRCRLF->when(FL_WHEN_RELEASE_ALWAYS);
o->value(progdefaults.rtty_crcrlf);
} // Fl_Check_Button* btnCRCRLF
{ Fl_Check_Button* o = chkUOStx = new Fl_Check_Button(532, 103, 63, 22, _("TX - unshift on space"));
chkUOStx->tooltip(_("Revert to Unsifted char\'s on a space"));
chkUOStx->down_box(FL_DOWN_BOX);
chkUOStx->callback((Fl_Callback*)cb_chkUOStx);
o->value(progdefaults.UOStx);
} // Fl_Check_Button* chkUOStx
{ Fl_Check_Button* o = chk_shaped_rtty = new Fl_Check_Button(532, 133, 212, 22, _("Shaped Tx"));
chk_shaped_rtty->tooltip(_("Use wave shaping on Tx signal"));
chk_shaped_rtty->down_box(FL_DOWN_BOX);
chk_shaped_rtty->value(1);
chk_shaped_rtty->callback((Fl_Callback*)cb_chk_shaped_rtty);
o->value(progStatus.shaped_rtty);
} // Fl_Check_Button* chk_shaped_rtty
{ Fl_Check_Button* o = chkPseudoFSK = new Fl_Check_Button(532, 163, 212, 22, _("Pseudo-FSK - right channel"));
chkPseudoFSK->tooltip(_("Create keyed square wave on right audio channel"));
chkPseudoFSK->down_box(FL_DOWN_BOX);
chkPseudoFSK->callback((Fl_Callback*)cb_chkPseudoFSK);
o->value(progdefaults.PseudoFSK);
} // Fl_Check_Button* chkPseudoFSK
{ Fl_Counter* o = cnt_TTY_LTRS = new Fl_Counter(532, 193, 75, 22, _("LTRS at start"));
cnt_TTY_LTRS->tooltip(_("Insert NN LTRS bytes at start of each transmission"));
cnt_TTY_LTRS->type(1);
cnt_TTY_LTRS->minimum(0);
cnt_TTY_LTRS->maximum(10);
cnt_TTY_LTRS->step(1);
cnt_TTY_LTRS->value(1);
cnt_TTY_LTRS->callback((Fl_Callback*)cb_cnt_TTY_LTRS);
cnt_TTY_LTRS->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.TTY_LTRS);
} // Fl_Counter* cnt_TTY_LTRS
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/TTY/Tx"));
config_pages.push_back(p);
tab_tree->add(_("Modem/TTY/Tx"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/TTY/FSK"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 21, 590, 165, _("DTR/RTS signal line FSK"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnFSKenabled = new Fl_Check_Button(224, 56, 90, 22, _("Enabled"));
btnFSKenabled->tooltip(_("Enable FSK on serial port"));
btnFSKenabled->down_box(FL_DOWN_BOX);
btnFSKenabled->callback((Fl_Callback*)cb_btnFSKenabled);
btnFSKenabled->when(FL_WHEN_RELEASE_ALWAYS);
o->value(progdefaults.useFSK);
} // Fl_Check_Button* btnFSKenabled
{ Fl_Check_Button* o = btnFSKshared = new Fl_Check_Button(333, 56, 90, 22, _("Shares RIGIO serial port, or uses"));
btnFSKshared->tooltip(_("Share the RIGIO port"));
btnFSKshared->down_box(FL_DOWN_BOX);
btnFSKshared->callback((Fl_Callback*)cb_btnFSKshared);
btnFSKshared->when(FL_WHEN_RELEASE_ALWAYS);
o->value(progdefaults.fsk_shares_port);
} // Fl_Check_Button* btnFSKshared
{ Fl_ComboBox* o = select_FSK_CommPort = new Fl_ComboBox(314, 88, 470, 24, _("Serial Port"));
select_FSK_CommPort->tooltip(_("FSK independent serial port"));
select_FSK_CommPort->box(FL_DOWN_BOX);
select_FSK_CommPort->color((Fl_Color)55);
select_FSK_CommPort->selection_color(FL_BACKGROUND_COLOR);
select_FSK_CommPort->labeltype(FL_NORMAL_LABEL);
select_FSK_CommPort->labelfont(0);
select_FSK_CommPort->labelsize(14);
select_FSK_CommPort->labelcolor(FL_FOREGROUND_COLOR);
select_FSK_CommPort->callback((Fl_Callback*)cb_select_FSK_CommPort);
select_FSK_CommPort->align(Fl_Align(FL_ALIGN_LEFT));
select_FSK_CommPort->when(FL_WHEN_RELEASE);
o->value(progdefaults.fsk_port.c_str());
select_FSK_CommPort->end();
} // Fl_ComboBox* select_FSK_CommPort
{ Fl_Check_Button* o = btnFSKreverse = new Fl_Check_Button(225, 120, 90, 22, _("MARK/SPACE reversed"));
btnFSKreverse->tooltip(_("Reverse Mark/Space"));
btnFSKreverse->down_box(FL_DOWN_BOX);
btnFSKreverse->callback((Fl_Callback*)cb_btnFSKreverse);
btnFSKreverse->when(FL_WHEN_RELEASE_ALWAYS);
o->value(progdefaults.fsk_reverse);
} // Fl_Check_Button* btnFSKreverse
{ Fl_Check_Button* o = btnFSKuseDTR = new Fl_Check_Button(460, 120, 90, 22, _("Use DTR"));
btnFSKuseDTR->tooltip(_("Enable DTR signal line, default is RTS"));
btnFSKuseDTR->down_box(FL_DOWN_BOX);
btnFSKuseDTR->callback((Fl_Callback*)cb_btnFSKuseDTR);
btnFSKuseDTR->when(FL_WHEN_RELEASE_ALWAYS);
o->value(progdefaults.fsk_on_dtr);
} // Fl_Check_Button* btnFSKuseDTR
{ btnFSKreset = new Fl_Button(714, 152, 70, 24, _("Reset"));
btnFSKreset->tooltip(_("Restart the FSK interface\nNecessary if changes made to configuration"));
btnFSKreset->callback((Fl_Callback*)cb_btnFSKreset);
btnFSKreset->hide();
} // Fl_Button* btnFSKreset
{ Fl_Counter* o = cntr_xcvr_FSK_MARK = new Fl_Counter(225, 152, 126, 24, _("Mark"));
cntr_xcvr_FSK_MARK->tooltip(_("Mark frequency in Hertz"));
cntr_xcvr_FSK_MARK->minimum(500);
cntr_xcvr_FSK_MARK->maximum(3000);
cntr_xcvr_FSK_MARK->step(1);
cntr_xcvr_FSK_MARK->value(1275);
cntr_xcvr_FSK_MARK->callback((Fl_Callback*)cb_cntr_xcvr_FSK_MARK);
cntr_xcvr_FSK_MARK->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.xcvr_FSK_MARK);
o->lstep(10);
} // Fl_Counter* cntr_xcvr_FSK_MARK
{ Fl_ListBox* o = sel_xcvr_FSK_shift = new Fl_ListBox(460, 152, 100, 24, _("Carrier shift"));
sel_xcvr_FSK_shift->tooltip(_("Carrier shift in Hertz"));
sel_xcvr_FSK_shift->box(FL_DOWN_BOX);
sel_xcvr_FSK_shift->color(FL_BACKGROUND2_COLOR);
sel_xcvr_FSK_shift->selection_color(FL_BACKGROUND_COLOR);
sel_xcvr_FSK_shift->labeltype(FL_NORMAL_LABEL);
sel_xcvr_FSK_shift->labelfont(0);
sel_xcvr_FSK_shift->labelsize(14);
sel_xcvr_FSK_shift->labelcolor(FL_FOREGROUND_COLOR);
sel_xcvr_FSK_shift->callback((Fl_Callback*)cb_sel_xcvr_FSK_shift);
sel_xcvr_FSK_shift->align(Fl_Align(FL_ALIGN_RIGHT));
sel_xcvr_FSK_shift->when(FL_WHEN_CHANGED);
o->add(szShifts);
o->index(progdefaults.rtty_shift);
sel_xcvr_FSK_shift->end();
} // Fl_ListBox* sel_xcvr_FSK_shift
{ Fl_Check_Button* o = btnFSK_STOPBITS = new Fl_Check_Button(640, 120, 111, 22, _("1.5 stop bits"));
btnFSK_STOPBITS->tooltip(_("Enabled - 1.5 stop bits\nDisabled - 2 stop bits"));
btnFSK_STOPBITS->down_box(FL_DOWN_BOX);
btnFSK_STOPBITS->callback((Fl_Callback*)cb_btnFSK_STOPBITS);
btnFSK_STOPBITS->when(FL_WHEN_RELEASE_ALWAYS);
o->value(progdefaults.fsk_STOPBITS);
} // Fl_Check_Button* btnFSK_STOPBITS
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 193, 590, 39);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_FSK_KEYLINE_flrig = new Fl_Check_Button(225, 205, 23, 15, _("Use flrig FSK keying"));
btn_FSK_KEYLINE_flrig->tooltip(_("Enable to use flrig FSK keyer"));
btn_FSK_KEYLINE_flrig->down_box(FL_DOWN_BOX);
btn_FSK_KEYLINE_flrig->callback((Fl_Callback*)cb_btn_FSK_KEYLINE_flrig);
btn_FSK_KEYLINE_flrig->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.use_FLRIG_FSK);
} // Fl_Check_Button* btn_FSK_KEYLINE_flrig
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/TTY/FSK"));
config_pages.push_back(p);
tab_tree->add(_("Modem/TTY/FSK"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/TTY/nanoIO"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_ComboBox* o = select_nanoIO_CommPort = new Fl_ComboBox(290, 23, 420, 25, _("Ser. Port"));
select_nanoIO_CommPort->tooltip(_("nanoIO serial port"));
select_nanoIO_CommPort->box(FL_DOWN_BOX);
select_nanoIO_CommPort->color((Fl_Color)55);
select_nanoIO_CommPort->selection_color(FL_BACKGROUND_COLOR);
select_nanoIO_CommPort->labeltype(FL_NORMAL_LABEL);
select_nanoIO_CommPort->labelfont(0);
select_nanoIO_CommPort->labelsize(14);
select_nanoIO_CommPort->labelcolor(FL_FOREGROUND_COLOR);
select_nanoIO_CommPort->callback((Fl_Callback*)cb_select_nanoIO_CommPort);
select_nanoIO_CommPort->align(Fl_Align(FL_ALIGN_LEFT));
select_nanoIO_CommPort->when(FL_WHEN_RELEASE);
o->value(progdefaults.nanoIO_serial_port_name.c_str());
select_nanoIO_CommPort->end();
} // Fl_ComboBox* select_nanoIO_CommPort
{ btn_nanoIO_connect = new Fl_Light_Button(715, 23, 80, 25, _("Connect"));
btn_nanoIO_connect->tooltip(_("Connect / Disconnect from nanoIO"));
btn_nanoIO_connect->callback((Fl_Callback*)cb_btn_nanoIO_connect);
} // Fl_Light_Button* btn_nanoIO_connect
{ Fl_ListBox* o = listbox_nanoIO_serbaud2 = new Fl_ListBox(293, 57, 92, 24, _("Serial Baud"));
listbox_nanoIO_serbaud2->box(FL_DOWN_BOX);
listbox_nanoIO_serbaud2->color(FL_BACKGROUND2_COLOR);
listbox_nanoIO_serbaud2->selection_color(FL_BACKGROUND_COLOR);
listbox_nanoIO_serbaud2->labeltype(FL_NORMAL_LABEL);
listbox_nanoIO_serbaud2->labelfont(0);
listbox_nanoIO_serbaud2->labelsize(14);
listbox_nanoIO_serbaud2->labelcolor(FL_FOREGROUND_COLOR);
listbox_nanoIO_serbaud2->callback((Fl_Callback*)cb_listbox_nanoIO_serbaud2);
listbox_nanoIO_serbaud2->align(Fl_Align(FL_ALIGN_LEFT));
listbox_nanoIO_serbaud2->when(FL_WHEN_RELEASE);
o->add("1200|4800|9600|19200|38400|57600|115200");
o->index(progdefaults.nanoIO_serbaud);
listbox_nanoIO_serbaud2->end();
} // Fl_ListBox* listbox_nanoIO_serbaud2
{ FTextView* o = txt_nano_io = new FTextView(202, 126, 596, 220, _("USB serial I/O"));
txt_nano_io->box(FL_DOWN_FRAME);
txt_nano_io->color(FL_BACKGROUND2_COLOR);
txt_nano_io->selection_color(FL_SELECTION_COLOR);
txt_nano_io->labeltype(FL_NORMAL_LABEL);
txt_nano_io->labelfont(0);
txt_nano_io->labelsize(14);
txt_nano_io->labelcolor(FL_FOREGROUND_COLOR);
txt_nano_io->align(Fl_Align(FL_ALIGN_TOP_LEFT));
txt_nano_io->when(FL_WHEN_RELEASE);
o->setFont(progdefaults.RxFontnbr);
o->setFontSize(12);
} // FTextView* txt_nano_io
{ btn_nanofsk_save = new Fl_Button(715, 90, 80, 25, _("Save"));
btn_nanofsk_save->tooltip(_("Write state of nanoIO to Arduino EEPROM"));
btn_nanofsk_save->callback((Fl_Callback*)cb_btn_nanofsk_save);
} // Fl_Button* btn_nanofsk_save
{ btn_nanofsk_query = new Fl_Button(630, 57, 80, 25, _("Status"));
btn_nanofsk_query->tooltip(_("Query state of nanoIO"));
btn_nanofsk_query->callback((Fl_Callback*)cb_btn_nanofsk_query);
} // Fl_Button* btn_nanofsk_query
{ Fl_Check_Button* o = chk_nanoIO_polarity = new Fl_Check_Button(323, 90, 53, 24, _("MARK polarity"));
chk_nanoIO_polarity->tooltip(_("Set - mark logical HIGH\nRead from nanoIO"));
chk_nanoIO_polarity->down_box(FL_DOWN_BOX);
chk_nanoIO_polarity->callback((Fl_Callback*)cb_chk_nanoIO_polarity);
o->value(progdefaults.nanoIO_polarity);
} // Fl_Check_Button* chk_nanoIO_polarity
{ Fl_ListBox* o = sel_nanoIO_baud = new Fl_ListBox(447, 90, 84, 25, _("TTY Baud"));
sel_nanoIO_baud->tooltip(_("nanoIO - TTY baud"));
sel_nanoIO_baud->box(FL_DOWN_BOX);
sel_nanoIO_baud->color(FL_BACKGROUND2_COLOR);
sel_nanoIO_baud->selection_color(FL_BACKGROUND_COLOR);
sel_nanoIO_baud->labeltype(FL_NORMAL_LABEL);
sel_nanoIO_baud->labelfont(0);
sel_nanoIO_baud->labelsize(14);
sel_nanoIO_baud->labelcolor(FL_FOREGROUND_COLOR);
sel_nanoIO_baud->callback((Fl_Callback*)cb_sel_nanoIO_baud);
sel_nanoIO_baud->align(Fl_Align(FL_ALIGN_RIGHT));
sel_nanoIO_baud->when(FL_WHEN_CHANGED);
o->add("45.45|50.0|75.0|100.0");
o->index(progdefaults.nanoIO_baud);
o->labelsize(FL_NORMAL_SIZE);
sel_nanoIO_baud->end();
} // Fl_ListBox* sel_nanoIO_baud
{ grp_nanoio_debug = new Fl_Group(202, 126, 596, 220, _("Debug Output"));
grp_nanoio_debug->box(FL_ENGRAVED_FRAME);
grp_nanoio_debug->align(Fl_Align(FL_ALIGN_TOP_LEFT));
grp_nanoio_debug->hide();
{ brws_nanoio_sent = new Fl_Browser(202, 126, 298, 190);
brws_nanoio_sent->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
} // Fl_Browser* brws_nanoio_sent
{ brws_nanoio_rcvd = new Fl_Browser(500, 126, 298, 190);
brws_nanoio_rcvd->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
} // Fl_Browser* brws_nanoio_rcvd
{ btn_nanoio_clear_sent = new Fl_Button(309, 319, 85, 20, _("Clear Sent"));
btn_nanoio_clear_sent->callback((Fl_Callback*)cb_btn_nanoio_clear_sent);
} // Fl_Button* btn_nanoio_clear_sent
{ btn_nanoio_clear_both = new Fl_Button(457, 319, 85, 20, _("Clear Both"));
btn_nanoio_clear_both->callback((Fl_Callback*)cb_btn_nanoio_clear_both);
} // Fl_Button* btn_nanoio_clear_both
{ btn_nanoio_clear_rcvd = new Fl_Button(605, 319, 85, 20, _("Clear Rcvd"));
btn_nanoio_clear_rcvd->callback((Fl_Callback*)cb_btn_nanoio_clear_rcvd);
} // Fl_Button* btn_nanoio_clear_rcvd
grp_nanoio_debug->end();
Fl_Group::current()->resizable(grp_nanoio_debug);
} // Fl_Group* grp_nanoio_debug
{ btn_nanoio_debug = new Fl_Light_Button(630, 90, 80, 25, _("Debug"));
btn_nanoio_debug->callback((Fl_Callback*)cb_btn_nanoio_debug);
} // Fl_Light_Button* btn_nanoio_debug
{ chk_nanoIO_FSK_io = new Fl_Check_Button(715, 57, 70, 24, _("TTY i/o"));
chk_nanoIO_FSK_io->tooltip(_("Enable TTY operation"));
chk_nanoIO_FSK_io->down_box(FL_DOWN_BOX);
chk_nanoIO_FSK_io->callback((Fl_Callback*)cb_chk_nanoIO_FSK_io);
} // Fl_Check_Button* chk_nanoIO_FSK_io
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/TTY/nanoIO"));
config_pages.push_back(p);
tab_tree->add(_("Modem/TTY/nanoIO"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/TTY/Navigator"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(206, 36, 591, 70, _("FSK Interface"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ComboBox* o = select_USN_FSK_port = new Fl_ComboBox(249, 65, 455, 23, _("Port"));
select_USN_FSK_port->tooltip(_("Navigator serial port"));
select_USN_FSK_port->box(FL_DOWN_BOX);
select_USN_FSK_port->color((Fl_Color)55);
select_USN_FSK_port->selection_color(FL_BACKGROUND_COLOR);
select_USN_FSK_port->labeltype(FL_NORMAL_LABEL);
select_USN_FSK_port->labelfont(0);
select_USN_FSK_port->labelsize(14);
select_USN_FSK_port->labelcolor(FL_FOREGROUND_COLOR);
select_USN_FSK_port->callback((Fl_Callback*)cb_select_USN_FSK_port);
select_USN_FSK_port->align(Fl_Align(FL_ALIGN_LEFT));
select_USN_FSK_port->when(FL_WHEN_RELEASE);
o->value(progdefaults.Nav_FSK_port.c_str());
select_USN_FSK_port->end();
} // Fl_ComboBox* select_USN_FSK_port
{ btn_Nav_connect = new Fl_Light_Button(711, 65, 80, 23, _("FSK"));
btn_Nav_connect->tooltip(_("Connect / Disconnect from Nav FSK port"));
btn_Nav_connect->callback((Fl_Callback*)cb_btn_Nav_connect);
} // Fl_Light_Button* btn_Nav_connect
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(206, 107, 591, 239, _("Configuration Interface"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ComboBox* o = select_Nav_config_port = new Fl_ComboBox(250, 137, 455, 23, _("Port"));
select_Nav_config_port->tooltip(_("Navigator configuration port"));
select_Nav_config_port->box(FL_DOWN_BOX);
select_Nav_config_port->color((Fl_Color)55);
select_Nav_config_port->selection_color(FL_BACKGROUND_COLOR);
select_Nav_config_port->labeltype(FL_NORMAL_LABEL);
select_Nav_config_port->labelfont(0);
select_Nav_config_port->labelsize(14);
select_Nav_config_port->labelcolor(FL_FOREGROUND_COLOR);
select_Nav_config_port->callback((Fl_Callback*)cb_select_Nav_config_port);
select_Nav_config_port->align(Fl_Align(FL_ALIGN_LEFT));
select_Nav_config_port->when(FL_WHEN_RELEASE);
o->value(progdefaults.Nav_config_port.c_str());
select_Nav_config_port->end();
} // Fl_ComboBox* select_Nav_config_port
{ Fl_ListBox* o = sel_Nav_ch1 = new Fl_ListBox(378, 164, 80, 23, _("Channel 1 Attenuator"));
sel_Nav_ch1->tooltip(_("Nav Channel 1 attenuator"));
sel_Nav_ch1->box(FL_DOWN_BOX);
sel_Nav_ch1->color(FL_BACKGROUND2_COLOR);
sel_Nav_ch1->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_ch1->labeltype(FL_NORMAL_LABEL);
sel_Nav_ch1->labelfont(0);
sel_Nav_ch1->labelsize(14);
sel_Nav_ch1->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_ch1->callback((Fl_Callback*)cb_sel_Nav_ch1);
sel_Nav_ch1->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_ch1->when(FL_WHEN_CHANGED);
o->add("15 db|Normal");
o->index(progdefaults.Nav_channel_1_att);
sel_Nav_ch1->end();
} // Fl_ListBox* sel_Nav_ch1
{ Fl_ListBox* o = sel_Nav_ch2 = new Fl_ListBox(378, 193, 80, 23, _("Channel 2 attenuator"));
sel_Nav_ch2->tooltip(_("NavChannel 2 Attenuator"));
sel_Nav_ch2->box(FL_DOWN_BOX);
sel_Nav_ch2->color(FL_BACKGROUND2_COLOR);
sel_Nav_ch2->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_ch2->labeltype(FL_NORMAL_LABEL);
sel_Nav_ch2->labelfont(0);
sel_Nav_ch2->labelsize(14);
sel_Nav_ch2->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_ch2->callback((Fl_Callback*)cb_sel_Nav_ch2);
sel_Nav_ch2->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_ch2->when(FL_WHEN_CHANGED);
o->add("15 db|Normal");
o->index(progdefaults.Nav_channel_2_att);
sel_Nav_ch2->end();
} // Fl_ListBox* sel_Nav_ch2
{ Fl_ListBox* o = sel_Nav_rf_att = new Fl_ListBox(378, 223, 80, 23, _("RF attenuator"));
sel_Nav_rf_att->tooltip(_("NavRF Attenuator"));
sel_Nav_rf_att->box(FL_DOWN_BOX);
sel_Nav_rf_att->color(FL_BACKGROUND2_COLOR);
sel_Nav_rf_att->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_rf_att->labeltype(FL_NORMAL_LABEL);
sel_Nav_rf_att->labelfont(0);
sel_Nav_rf_att->labelsize(14);
sel_Nav_rf_att->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_rf_att->callback((Fl_Callback*)cb_sel_Nav_rf_att);
sel_Nav_rf_att->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_rf_att->when(FL_WHEN_CHANGED);
o->add("20 db|Normal");
o->index(progdefaults.Nav_rf_att);
sel_Nav_rf_att->end();
} // Fl_ListBox* sel_Nav_rf_att
{ Fl_ListBox* o = sel_Nav_wk_ptt = new Fl_ListBox(378, 253, 80, 23, _("WinKey PTT"));
sel_Nav_wk_ptt->tooltip(_("NavWinkey PTT"));
sel_Nav_wk_ptt->box(FL_DOWN_BOX);
sel_Nav_wk_ptt->color(FL_BACKGROUND2_COLOR);
sel_Nav_wk_ptt->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_wk_ptt->labeltype(FL_NORMAL_LABEL);
sel_Nav_wk_ptt->labelfont(0);
sel_Nav_wk_ptt->labelsize(14);
sel_Nav_wk_ptt->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_wk_ptt->callback((Fl_Callback*)cb_sel_Nav_wk_ptt);
sel_Nav_wk_ptt->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_wk_ptt->when(FL_WHEN_CHANGED);
o->index(progdefaults.Nav_wk_ptt);
o->add("On|Off");
sel_Nav_wk_ptt->end();
} // Fl_ListBox* sel_Nav_wk_ptt
{ Fl_ListBox* o = sel_Nav_LED = new Fl_ListBox(378, 283, 80, 23, _("LED brightness"));
sel_Nav_LED->tooltip(_("NavLED brightness"));
sel_Nav_LED->box(FL_DOWN_BOX);
sel_Nav_LED->color(FL_BACKGROUND2_COLOR);
sel_Nav_LED->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_LED->labeltype(FL_NORMAL_LABEL);
sel_Nav_LED->labelfont(0);
sel_Nav_LED->labelsize(14);
sel_Nav_LED->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_LED->callback((Fl_Callback*)cb_sel_Nav_LED);
sel_Nav_LED->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_LED->when(FL_WHEN_CHANGED);
o->index(progdefaults.Nav_led);
o->add("Dim|Normal");
sel_Nav_LED->end();
} // Fl_ListBox* sel_Nav_LED
{ Fl_ListBox* o = sel_Nav_CAT_LED = new Fl_ListBox(378, 313, 80, 23, _("CAT LED state"));
sel_Nav_CAT_LED->tooltip(_("NavCAT state LED"));
sel_Nav_CAT_LED->box(FL_DOWN_BOX);
sel_Nav_CAT_LED->color(FL_BACKGROUND2_COLOR);
sel_Nav_CAT_LED->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_CAT_LED->labeltype(FL_NORMAL_LABEL);
sel_Nav_CAT_LED->labelfont(0);
sel_Nav_CAT_LED->labelsize(14);
sel_Nav_CAT_LED->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_CAT_LED->callback((Fl_Callback*)cb_sel_Nav_CAT_LED);
sel_Nav_CAT_LED->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_CAT_LED->when(FL_WHEN_CHANGED);
o->index(progdefaults.Nav_cat_led);
o->add("Steady|Polling");
sel_Nav_CAT_LED->end();
} // Fl_ListBox* sel_Nav_CAT_LED
{ Fl_ListBox* o = sel_Nav_FSK_baud = new Fl_ListBox(586, 164, 80, 23, _("Baud rate"));
sel_Nav_FSK_baud->tooltip(_("Nav FSK baud rate"));
sel_Nav_FSK_baud->box(FL_DOWN_BOX);
sel_Nav_FSK_baud->color(FL_BACKGROUND2_COLOR);
sel_Nav_FSK_baud->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_FSK_baud->labeltype(FL_NORMAL_LABEL);
sel_Nav_FSK_baud->labelfont(0);
sel_Nav_FSK_baud->labelsize(14);
sel_Nav_FSK_baud->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_FSK_baud->callback((Fl_Callback*)cb_sel_Nav_FSK_baud);
sel_Nav_FSK_baud->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_FSK_baud->when(FL_WHEN_CHANGED);
o->add("45.45|75|100");
o->index(progdefaults.Nav_FSK_baud);
sel_Nav_FSK_baud->end();
} // Fl_ListBox* sel_Nav_FSK_baud
{ Fl_ListBox* o = sel_Nav_FSK_stopbits = new Fl_ListBox(585, 193, 80, 23, _("Stop bits"));
sel_Nav_FSK_stopbits->tooltip(_("Nav FSK Stop bits"));
sel_Nav_FSK_stopbits->box(FL_DOWN_BOX);
sel_Nav_FSK_stopbits->color(FL_BACKGROUND2_COLOR);
sel_Nav_FSK_stopbits->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_FSK_stopbits->labeltype(FL_NORMAL_LABEL);
sel_Nav_FSK_stopbits->labelfont(0);
sel_Nav_FSK_stopbits->labelsize(14);
sel_Nav_FSK_stopbits->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_FSK_stopbits->callback((Fl_Callback*)cb_sel_Nav_FSK_stopbits);
sel_Nav_FSK_stopbits->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_FSK_stopbits->when(FL_WHEN_CHANGED);
o->add("1|1.5|2");
o->index(progdefaults.Nav_FSK_stopbits);
sel_Nav_FSK_stopbits->end();
} // Fl_ListBox* sel_Nav_FSK_stopbits
{ Fl_ListBox* o = sel_Nav_FSK_polarity = new Fl_ListBox(585, 223, 80, 23, _("Mark Polarity"));
sel_Nav_FSK_polarity->tooltip(_("Nav FSK MARK Polarity"));
sel_Nav_FSK_polarity->box(FL_DOWN_BOX);
sel_Nav_FSK_polarity->color(FL_BACKGROUND2_COLOR);
sel_Nav_FSK_polarity->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_FSK_polarity->labeltype(FL_NORMAL_LABEL);
sel_Nav_FSK_polarity->labelfont(0);
sel_Nav_FSK_polarity->labelsize(14);
sel_Nav_FSK_polarity->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_FSK_polarity->callback((Fl_Callback*)cb_sel_Nav_FSK_polarity);
sel_Nav_FSK_polarity->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_FSK_polarity->when(FL_WHEN_CHANGED);
o->add("Normal|Reverse");
o->index(progdefaults.Nav_FSK_polarity);
sel_Nav_FSK_polarity->end();
} // Fl_ListBox* sel_Nav_FSK_polarity
{ Fl_ListBox* o = sel_Nav_FSK_sidetone = new Fl_ListBox(585, 253, 80, 23, _("Side tone"));
sel_Nav_FSK_sidetone->tooltip(_("Nav FSK side tone"));
sel_Nav_FSK_sidetone->box(FL_DOWN_BOX);
sel_Nav_FSK_sidetone->color(FL_BACKGROUND2_COLOR);
sel_Nav_FSK_sidetone->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_FSK_sidetone->labeltype(FL_NORMAL_LABEL);
sel_Nav_FSK_sidetone->labelfont(0);
sel_Nav_FSK_sidetone->labelsize(14);
sel_Nav_FSK_sidetone->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_FSK_sidetone->callback((Fl_Callback*)cb_sel_Nav_FSK_sidetone);
sel_Nav_FSK_sidetone->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_FSK_sidetone->when(FL_WHEN_CHANGED);
o->add("On|Off");
o->index(progdefaults.Nav_FSK_sidetone);
sel_Nav_FSK_sidetone->end();
} // Fl_ListBox* sel_Nav_FSK_sidetone
{ Fl_ListBox* o = sel_Nav_FSK_ptt = new Fl_ListBox(585, 283, 80, 23, _("FSK PTT"));
sel_Nav_FSK_ptt->tooltip(_("Nav FSK PTT - should always be on"));
sel_Nav_FSK_ptt->box(FL_DOWN_BOX);
sel_Nav_FSK_ptt->color(FL_BACKGROUND2_COLOR);
sel_Nav_FSK_ptt->selection_color(FL_BACKGROUND_COLOR);
sel_Nav_FSK_ptt->labeltype(FL_NORMAL_LABEL);
sel_Nav_FSK_ptt->labelfont(0);
sel_Nav_FSK_ptt->labelsize(14);
sel_Nav_FSK_ptt->labelcolor(FL_FOREGROUND_COLOR);
sel_Nav_FSK_ptt->callback((Fl_Callback*)cb_sel_Nav_FSK_ptt);
sel_Nav_FSK_ptt->align(Fl_Align(FL_ALIGN_LEFT));
sel_Nav_FSK_ptt->when(FL_WHEN_CHANGED);
o->add("On|Off");
o->index(progdefaults.Nav_FSK_ptt);
sel_Nav_FSK_ptt->end();
} // Fl_ListBox* sel_Nav_FSK_ptt
{ btn_Nav_config = new Fl_Light_Button(710, 137, 80, 23, _("Config"));
btn_Nav_config->tooltip(_("Connect / Disconnect from Nav Config port"));
btn_Nav_config->callback((Fl_Callback*)cb_btn_Nav_config);
} // Fl_Light_Button* btn_Nav_config
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/TTY/Navigator"));
config_pages.push_back(p);
tab_tree->add(_("Modem/TTY/Navigator"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/TTY/Synop"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Check_Button* o = btnSynopAdifDecoding = new Fl_Check_Button(406, 71, 127, 24, _("SYNOP to ADIF"));
btnSynopAdifDecoding->tooltip(_("Decodes SYNOP messages (Ex: Deutsche Wetterdienst) to ADIF log file"));
btnSynopAdifDecoding->down_box(FL_DOWN_BOX);
btnSynopAdifDecoding->callback((Fl_Callback*)cb_btnSynopAdifDecoding);
btnSynopAdifDecoding->align(Fl_Align(132|FL_ALIGN_INSIDE));
o->value(progdefaults.SynopAdifDecoding);
} // Fl_Check_Button* btnSynopAdifDecoding
{ Fl_Check_Button* o = btnSynopKmlDecoding = new Fl_Check_Button(406, 112, 120, 24, _("SYNOP to KML"));
btnSynopKmlDecoding->tooltip(_("Decodes SYNOP messages (Ex: Deutsche Wetterdienst) to KML documents (Ex: Goog\
le Earth)"));
btnSynopKmlDecoding->down_box(FL_DOWN_BOX);
btnSynopKmlDecoding->callback((Fl_Callback*)cb_btnSynopKmlDecoding);
btnSynopKmlDecoding->align(Fl_Align(132|FL_ALIGN_INSIDE));
o->value(progdefaults.SynopKmlDecoding);
} // Fl_Check_Button* btnSynopKmlDecoding
{ Fl_Check_Button* o = btnSynopInterleaved = new Fl_Check_Button(406, 154, 211, 24, _("Interleave SYNOP and text"));
btnSynopInterleaved->tooltip(_("Interleave text with decoded SYNOP messages, or replacement."));
btnSynopInterleaved->down_box(FL_DOWN_BOX);
btnSynopInterleaved->callback((Fl_Callback*)cb_btnSynopInterleaved);
btnSynopInterleaved->align(Fl_Align(132|FL_ALIGN_INSIDE));
o->value(progdefaults.SynopInterleaved);
} // Fl_Check_Button* btnSynopInterleaved
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/TTY/Synop"));
config_pages.push_back(p);
tab_tree->add(_("Modem/TTY/Synop"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/TTY/Winkeyer 3"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(206, 43, 591, 72, _("Serial Interface"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ComboBox* o = select_WKFSK_CommPort = new Fl_ComboBox(274, 71, 405, 23, _("Port"));
select_WKFSK_CommPort->tooltip(_("Xcvr serial port"));
select_WKFSK_CommPort->box(FL_DOWN_BOX);
select_WKFSK_CommPort->color((Fl_Color)55);
select_WKFSK_CommPort->selection_color(FL_BACKGROUND_COLOR);
select_WKFSK_CommPort->labeltype(FL_NORMAL_LABEL);
select_WKFSK_CommPort->labelfont(0);
select_WKFSK_CommPort->labelsize(14);
select_WKFSK_CommPort->labelcolor(FL_FOREGROUND_COLOR);
select_WKFSK_CommPort->callback((Fl_Callback*)cb_select_WKFSK_CommPort);
select_WKFSK_CommPort->align(Fl_Align(FL_ALIGN_LEFT));
select_WKFSK_CommPort->when(FL_WHEN_RELEASE);
o->value(progStatus.WK_serial_port_name.c_str());
select_WKFSK_CommPort->end();
} // Fl_ComboBox* select_WKFSK_CommPort
{ Fl_Light_Button* o = btn_WKFSK_connect = new Fl_Light_Button(705, 71, 80, 23, _("Connect"));
btn_WKFSK_connect->tooltip(_("Connect / Disconnect from WinKeyer"));
btn_WKFSK_connect->callback((Fl_Callback*)cb_btn_WKFSK_connect);
o->value(progStatus.WK_online);
} // Fl_Light_Button* btn_WKFSK_connect
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(206, 116, 591, 231, _("Configuration Interface"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ListBox* o = sel_WKFSK_baud = new Fl_ListBox(391, 148, 78, 23, _("Baud rate"));
sel_WKFSK_baud->tooltip(_("Nav FSK baud rate"));
sel_WKFSK_baud->box(FL_DOWN_BOX);
sel_WKFSK_baud->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_baud->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_baud->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_baud->labelfont(0);
sel_WKFSK_baud->labelsize(14);
sel_WKFSK_baud->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_baud->callback((Fl_Callback*)cb_sel_WKFSK_baud);
sel_WKFSK_baud->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_baud->when(FL_WHEN_CHANGED);
o->add("45.45|50|75|100");
o->index(progStatus.WKFSK_baud);
sel_WKFSK_baud->end();
} // Fl_ListBox* sel_WKFSK_baud
{ Fl_ListBox* o = sel_WKFSK_stopbits = new Fl_ListBox(391, 177, 78, 23, _("Stop bits"));
sel_WKFSK_stopbits->tooltip(_("Nav FSK Stop bits"));
sel_WKFSK_stopbits->box(FL_DOWN_BOX);
sel_WKFSK_stopbits->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_stopbits->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_stopbits->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_stopbits->labelfont(0);
sel_WKFSK_stopbits->labelsize(14);
sel_WKFSK_stopbits->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_stopbits->callback((Fl_Callback*)cb_sel_WKFSK_stopbits);
sel_WKFSK_stopbits->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_stopbits->when(FL_WHEN_CHANGED);
o->add("2|1.5");
o->index(progStatus.WKFSK_stopbits);
sel_WKFSK_stopbits->end();
} // Fl_ListBox* sel_WKFSK_stopbits
{ Fl_ListBox* o = sel_WKFSK_ptt = new Fl_ListBox(391, 206, 78, 23, _("FSK port"));
sel_WKFSK_ptt->tooltip(_("NavWinkey PTT"));
sel_WKFSK_ptt->box(FL_DOWN_BOX);
sel_WKFSK_ptt->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_ptt->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_ptt->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_ptt->labelfont(0);
sel_WKFSK_ptt->labelsize(14);
sel_WKFSK_ptt->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_ptt->callback((Fl_Callback*)cb_sel_WKFSK_ptt);
sel_WKFSK_ptt->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_ptt->when(FL_WHEN_CHANGED);
o->add("On PTT|On KEY");
o->index(progStatus.WKFSK_ptt);
sel_WKFSK_ptt->end();
} // Fl_ListBox* sel_WKFSK_ptt
{ Fl_ListBox* o = sel_WKFSK_polarity = new Fl_ListBox(391, 236, 78, 23, _("Mark Polarity"));
sel_WKFSK_polarity->tooltip(_("Nav FSK MARK Polarity"));
sel_WKFSK_polarity->box(FL_DOWN_BOX);
sel_WKFSK_polarity->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_polarity->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_polarity->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_polarity->labelfont(0);
sel_WKFSK_polarity->labelsize(14);
sel_WKFSK_polarity->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_polarity->callback((Fl_Callback*)cb_sel_WKFSK_polarity);
sel_WKFSK_polarity->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_polarity->when(FL_WHEN_CHANGED);
o->add("Normal|Reverse");
o->index(progStatus.WKFSK_polarity);
sel_WKFSK_polarity->end();
} // Fl_ListBox* sel_WKFSK_polarity
{ Fl_ListBox* o = sel_WKFSK_sidetone = new Fl_ListBox(391, 265, 78, 23, _("Sidetone"));
sel_WKFSK_sidetone->tooltip(_("Nav FSK side tone"));
sel_WKFSK_sidetone->box(FL_DOWN_BOX);
sel_WKFSK_sidetone->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_sidetone->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_sidetone->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_sidetone->labelfont(0);
sel_WKFSK_sidetone->labelsize(14);
sel_WKFSK_sidetone->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_sidetone->callback((Fl_Callback*)cb_sel_WKFSK_sidetone);
sel_WKFSK_sidetone->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_sidetone->when(FL_WHEN_CHANGED);
o->add("Off|On");
o->index(progStatus.WKFSK_sidetone);
sel_WKFSK_sidetone->end();
} // Fl_ListBox* sel_WKFSK_sidetone
{ Fl_ListBox* o = sel_WKFSK_auto_crlf = new Fl_ListBox(391, 295, 78, 23, _("Auto CRLF"));
sel_WKFSK_auto_crlf->tooltip(_("Nav FSK side tone"));
sel_WKFSK_auto_crlf->box(FL_DOWN_BOX);
sel_WKFSK_auto_crlf->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_auto_crlf->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_auto_crlf->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_auto_crlf->labelfont(0);
sel_WKFSK_auto_crlf->labelsize(14);
sel_WKFSK_auto_crlf->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_auto_crlf->callback((Fl_Callback*)cb_sel_WKFSK_auto_crlf);
sel_WKFSK_auto_crlf->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_auto_crlf->when(FL_WHEN_CHANGED);
o->add("Off|On");
o->index(progStatus.WKFSK_auto_crlf);
sel_WKFSK_auto_crlf->end();
} // Fl_ListBox* sel_WKFSK_auto_crlf
{ Fl_ListBox* o = sel_WKFSK_diddle = new Fl_ListBox(581, 148, 78, 23, _("Diddle"));
sel_WKFSK_diddle->tooltip(_("Diddle On/OFF"));
sel_WKFSK_diddle->box(FL_DOWN_BOX);
sel_WKFSK_diddle->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_diddle->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_diddle->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_diddle->labelfont(0);
sel_WKFSK_diddle->labelsize(14);
sel_WKFSK_diddle->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_diddle->callback((Fl_Callback*)cb_sel_WKFSK_diddle);
sel_WKFSK_diddle->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_diddle->when(FL_WHEN_CHANGED);
o->add("Off|On");
o->index(progStatus.WKFSK_diddle);
sel_WKFSK_diddle->end();
} // Fl_ListBox* sel_WKFSK_diddle
{ Fl_ListBox* o = sel_WKFSK_diddle_char = new Fl_ListBox(581, 177, 78, 23, _("Diddle char"));
sel_WKFSK_diddle_char->tooltip(_("Diddle character"));
sel_WKFSK_diddle_char->box(FL_DOWN_BOX);
sel_WKFSK_diddle_char->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_diddle_char->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_diddle_char->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_diddle_char->labelfont(0);
sel_WKFSK_diddle_char->labelsize(14);
sel_WKFSK_diddle_char->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_diddle_char->callback((Fl_Callback*)cb_sel_WKFSK_diddle_char);
sel_WKFSK_diddle_char->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_diddle_char->when(FL_WHEN_CHANGED);
o->add("BLANK|LTRS");
o->index(progStatus.WKFSK_diddle_char);
sel_WKFSK_diddle_char->end();
} // Fl_ListBox* sel_WKFSK_diddle_char
{ Fl_ListBox* o = sel_WKFSK_usos = new Fl_ListBox(581, 206, 78, 23, _("USOS"));
sel_WKFSK_usos->tooltip(_("Unshift on space"));
sel_WKFSK_usos->box(FL_DOWN_BOX);
sel_WKFSK_usos->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_usos->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_usos->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_usos->labelfont(0);
sel_WKFSK_usos->labelsize(14);
sel_WKFSK_usos->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_usos->callback((Fl_Callback*)cb_sel_WKFSK_usos);
sel_WKFSK_usos->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_usos->when(FL_WHEN_CHANGED);
o->add("Off|On");
o->index(progStatus.WKFSK_usos);
sel_WKFSK_usos->end();
} // Fl_ListBox* sel_WKFSK_usos
{ Fl_ListBox* o = sel_WKFSK_monitor = new Fl_ListBox(581, 236, 78, 23, _("Echo"));
sel_WKFSK_monitor->tooltip(_("Unshift on space"));
sel_WKFSK_monitor->box(FL_DOWN_BOX);
sel_WKFSK_monitor->color(FL_BACKGROUND2_COLOR);
sel_WKFSK_monitor->selection_color(FL_BACKGROUND_COLOR);
sel_WKFSK_monitor->labeltype(FL_NORMAL_LABEL);
sel_WKFSK_monitor->labelfont(0);
sel_WKFSK_monitor->labelsize(14);
sel_WKFSK_monitor->labelcolor(FL_FOREGROUND_COLOR);
sel_WKFSK_monitor->callback((Fl_Callback*)cb_sel_WKFSK_monitor);
sel_WKFSK_monitor->align(Fl_Align(FL_ALIGN_LEFT));
sel_WKFSK_monitor->when(FL_WHEN_CHANGED);
o->add("Off|On");
o->index(progStatus.WKFSK_monitor);
sel_WKFSK_monitor->end();
} // Fl_ListBox* sel_WKFSK_monitor
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/TTY/Winkeyer 3"));
config_pages.push_back(p);
tab_tree->add(_("Modem/TTY/Winkeyer 3"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/Thor"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(262, 40, 490, 270);
o->box(FL_ENGRAVED_FRAME);
{ txtTHORSecondary = new Fl_Input2(291, 67, 430, 40, _("Secondary Text"));
txtTHORSecondary->tooltip(_("Text to send during keyboard idle times"));
txtTHORSecondary->type(4);
txtTHORSecondary->box(FL_DOWN_BOX);
txtTHORSecondary->color(FL_BACKGROUND2_COLOR);
txtTHORSecondary->selection_color(FL_SELECTION_COLOR);
txtTHORSecondary->labeltype(FL_NORMAL_LABEL);
txtTHORSecondary->labelfont(0);
txtTHORSecondary->labelsize(14);
txtTHORSecondary->labelcolor(FL_FOREGROUND_COLOR);
txtTHORSecondary->callback((Fl_Callback*)cb_txtTHORSecondary);
txtTHORSecondary->align(Fl_Align(FL_ALIGN_TOP_LEFT));
txtTHORSecondary->when(FL_WHEN_CHANGED);
txtTHORSecondary->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* txtTHORSecondary
{ Fl_Check_Button* o = valTHOR_FILTER = new Fl_Check_Button(291, 121, 80, 20, _("Filtering"));
valTHOR_FILTER->tooltip(_("Enable DSP prior to decoder"));
valTHOR_FILTER->down_box(FL_DOWN_BOX);
valTHOR_FILTER->value(1);
valTHOR_FILTER->callback((Fl_Callback*)cb_valTHOR_FILTER);
o->value(progdefaults.THOR_FILTER);
} // Fl_Check_Button* valTHOR_FILTER
{ Fl_Counter2* o = valTHOR_BW = new Fl_Counter2(436, 121, 63, 20, _("Filter bandwidth factor"));
valTHOR_BW->tooltip(_("Filter bandwidth relative to signal width"));
valTHOR_BW->type(1);
valTHOR_BW->box(FL_UP_BOX);
valTHOR_BW->color(FL_BACKGROUND_COLOR);
valTHOR_BW->selection_color(FL_INACTIVE_COLOR);
valTHOR_BW->labeltype(FL_NORMAL_LABEL);
valTHOR_BW->labelfont(0);
valTHOR_BW->labelsize(14);
valTHOR_BW->labelcolor(FL_FOREGROUND_COLOR);
valTHOR_BW->minimum(1);
valTHOR_BW->maximum(2);
valTHOR_BW->value(1.5);
valTHOR_BW->callback((Fl_Callback*)cb_valTHOR_BW);
valTHOR_BW->align(Fl_Align(FL_ALIGN_RIGHT));
valTHOR_BW->when(FL_WHEN_CHANGED);
o->value(progdefaults.THOR_BW);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* valTHOR_BW
{ Fl_Value_Slider2* o = valThorCWI = new Fl_Value_Slider2(291, 174, 260, 20, _("CWI threshold"));
valThorCWI->tooltip(_("CWI detection and suppression"));
valThorCWI->type(1);
valThorCWI->box(FL_DOWN_BOX);
valThorCWI->color(FL_BACKGROUND_COLOR);
valThorCWI->selection_color(FL_BACKGROUND_COLOR);
valThorCWI->labeltype(FL_NORMAL_LABEL);
valThorCWI->labelfont(0);
valThorCWI->labelsize(14);
valThorCWI->labelcolor(FL_FOREGROUND_COLOR);
valThorCWI->textsize(14);
valThorCWI->callback((Fl_Callback*)cb_valThorCWI);
valThorCWI->align(Fl_Align(FL_ALIGN_TOP));
valThorCWI->when(FL_WHEN_CHANGED);
o->value(progdefaults.ThorCWI);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* valThorCWI
{ Fl_Check_Button* o = valTHOR_PREAMBLE = new Fl_Check_Button(291, 216, 200, 20, _("Preamble Detection"));
valTHOR_PREAMBLE->tooltip(_("Detect the THOR preamble\nClear the Rx pipeline"));
valTHOR_PREAMBLE->down_box(FL_DOWN_BOX);
valTHOR_PREAMBLE->callback((Fl_Callback*)cb_valTHOR_PREAMBLE);
o->value(progdefaults.THOR_PREAMBLE);
} // Fl_Check_Button* valTHOR_PREAMBLE
{ Fl_Check_Button* o = valTHOR_SOFTSYMBOLS = new Fl_Check_Button(291, 246, 190, 20, _("Soft-symbol decoding"));
valTHOR_SOFTSYMBOLS->tooltip(_("Use soft-decision decoding for symbol detection\nAssists soft-bit decoding"));
valTHOR_SOFTSYMBOLS->down_box(FL_DOWN_BOX);
valTHOR_SOFTSYMBOLS->callback((Fl_Callback*)cb_valTHOR_SOFTSYMBOLS);
o->value(progdefaults.THOR_SOFTSYMBOLS);
} // Fl_Check_Button* valTHOR_SOFTSYMBOLS
{ Fl_Check_Button* o = valTHOR_SOFTBITS = new Fl_Check_Button(291, 276, 170, 20, _("Soft-bit decoding"));
valTHOR_SOFTBITS->tooltip(_("Use soft-bit viterbi decoding for better Forward Error Correction\nWorks best\
with soft-symbol decoding enabled"));
valTHOR_SOFTBITS->down_box(FL_DOWN_BOX);
valTHOR_SOFTBITS->callback((Fl_Callback*)cb_valTHOR_SOFTBITS);
o->value(progdefaults.THOR_SOFTBITS);
} // Fl_Check_Button* valTHOR_SOFTBITS
{ Fl_Counter2* o = valTHOR_PATHS = new Fl_Counter2(638, 265, 75, 21, _("Paths (hidden)"));
valTHOR_PATHS->type(1);
valTHOR_PATHS->box(FL_UP_BOX);
valTHOR_PATHS->color(FL_BACKGROUND_COLOR);
valTHOR_PATHS->selection_color(FL_INACTIVE_COLOR);
valTHOR_PATHS->labeltype(FL_NORMAL_LABEL);
valTHOR_PATHS->labelfont(0);
valTHOR_PATHS->labelsize(14);
valTHOR_PATHS->labelcolor(FL_FOREGROUND_COLOR);
valTHOR_PATHS->minimum(4);
valTHOR_PATHS->maximum(8);
valTHOR_PATHS->step(1);
valTHOR_PATHS->value(5);
valTHOR_PATHS->callback((Fl_Callback*)cb_valTHOR_PATHS);
valTHOR_PATHS->align(Fl_Align(FL_ALIGN_TOP));
valTHOR_PATHS->when(FL_WHEN_CHANGED);
o->value(progdefaults.THOR_PATHS);
o->labelsize(FL_NORMAL_SIZE);
o->hide();
} // Fl_Counter2* valTHOR_PATHS
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/Thor"));
config_pages.push_back(p);
tab_tree->add(_("Modem/Thor"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/Navtex"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Check_Button* o = btnNvtxAdifLog = new Fl_Check_Button(316, 84, 235, 30, _("Log Navtex messages to Adif file"));
btnNvtxAdifLog->down_box(FL_DOWN_BOX);
btnNvtxAdifLog->callback((Fl_Callback*)cb_btnNvtxAdifLog);
o->value(progdefaults.NVTX_AdifLog);
} // Fl_Check_Button* btnNvtxAdifLog
{ Fl_Check_Button* o = btnNvtxKmlLog = new Fl_Check_Button(315, 130, 270, 30, _("Log Navtex messages to KML"));
btnNvtxKmlLog->tooltip(_("Logs messages to Keyhole Markup Language (Google Earth, Marble, Gaia, etc...)"));
btnNvtxKmlLog->down_box(FL_DOWN_BOX);
btnNvtxKmlLog->callback((Fl_Callback*)cb_btnNvtxKmlLog);
o->value(progdefaults.NVTX_KmlLog);
} // Fl_Check_Button* btnNvtxKmlLog
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/Navtex"));
config_pages.push_back(p);
tab_tree->add(_("Modem/Navtex"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Modem/Wefax"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Counter* o = cntrWEFAX_Shift = new Fl_Counter(262, 50, 150, 24, _("Frequency shift"));
cntrWEFAX_Shift->tooltip(_("Frequency shift of WEFAX signal\nNominal 800 Hz"));
cntrWEFAX_Shift->minimum(750);
cntrWEFAX_Shift->maximum(900);
cntrWEFAX_Shift->step(10);
cntrWEFAX_Shift->value(800);
cntrWEFAX_Shift->callback((Fl_Callback*)cb_cntrWEFAX_Shift);
cntrWEFAX_Shift->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.WEFAX_Shift);
o->lstep(100.0);
} // Fl_Counter* cntrWEFAX_Shift
{ Fl_Counter* o = cntrWEFAX_Center = new Fl_Counter(262, 99, 150, 24, _("Center freq"));
cntrWEFAX_Center->tooltip(_("Center of WEFAX signal\nNominal 1900 Hz"));
cntrWEFAX_Center->minimum(1000);
cntrWEFAX_Center->maximum(2000);
cntrWEFAX_Center->step(10);
cntrWEFAX_Center->value(1900);
cntrWEFAX_Center->callback((Fl_Callback*)cb_cntrWEFAX_Center);
cntrWEFAX_Center->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.WEFAX_Center);
o->lstep(100.0);
} // Fl_Counter* cntrWEFAX_Center
{ Fl_Counter* o = cntrWEFAX_MaxRows = new Fl_Counter(588, 50, 150, 24, _("Max Image Rows"));
cntrWEFAX_MaxRows->tooltip(_("Force save split image"));
cntrWEFAX_MaxRows->minimum(1000);
cntrWEFAX_MaxRows->maximum(10000);
cntrWEFAX_MaxRows->step(100);
cntrWEFAX_MaxRows->value(1500);
cntrWEFAX_MaxRows->callback((Fl_Callback*)cb_cntrWEFAX_MaxRows);
cntrWEFAX_MaxRows->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.WEFAX_MaxRows);
o->lstep(1000.0);
} // Fl_Counter* cntrWEFAX_MaxRows
{ Fl_Input* o = btnWefaxSaveDir = new Fl_Input(216, 267, 470, 24, _("Fax images destination directory"));
btnWefaxSaveDir->tooltip(_("Store images in this directory"));
btnWefaxSaveDir->callback((Fl_Callback*)cb_btnWefaxSaveDir);
btnWefaxSaveDir->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value(progdefaults.wefax_save_dir.c_str());
} // Fl_Input* btnWefaxSaveDir
{ btnSelectFaxDestDir = new Fl_Button(695, 267, 90, 24, _("Directory..."));
btnSelectFaxDestDir->tooltip(_("Select destination directory"));
btnSelectFaxDestDir->callback((Fl_Callback*)cb_btnSelectFaxDestDir);
} // Fl_Button* btnSelectFaxDestDir
{ Fl_Check_Button* o = btnWefaxAdifLog = new Fl_Check_Button(216, 298, 235, 30, _("Log Wefax messages to Adif file"));
btnWefaxAdifLog->tooltip(_("Sent and received faxes are logged to Adif file."));
btnWefaxAdifLog->down_box(FL_DOWN_BOX);
btnWefaxAdifLog->callback((Fl_Callback*)cb_btnWefaxAdifLog);
o->value(progdefaults.WEFAX_AdifLog);
} // Fl_Check_Button* btnWefaxAdifLog
{ Fl_Choice* o = wefax_choice_rx_filter = new Fl_Choice(302, 137, 110, 24, _("Filter"));
wefax_choice_rx_filter->down_box(FL_BORDER_BOX);
wefax_choice_rx_filter->callback((Fl_Callback*)cb_wefax_choice_rx_filter);
o->add("Narrow|Medium|Wide");
o->value(progdefaults.wefax_filter < 3 ? progdefaults.wefax_filter : 0);
} // Fl_Choice* wefax_choice_rx_filter
{ Fl_Counter* o = auto_after_nrows = new Fl_Counter(588, 81, 150, 24, _("Enable Auto-align after"));
auto_after_nrows->minimum(5);
auto_after_nrows->maximum(100);
auto_after_nrows->step(5);
auto_after_nrows->value(50);
auto_after_nrows->callback((Fl_Callback*)cb_auto_after_nrows);
auto_after_nrows->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.wefax_auto_after);
o->lstep(50);
} // Fl_Counter* auto_after_nrows
{ Fl_Counter* o = align_stop_after = new Fl_Counter(588, 113, 150, 24, _("Stop Auto-align after"));
align_stop_after->minimum(50);
align_stop_after->maximum(500);
align_stop_after->step(5);
align_stop_after->value(500);
align_stop_after->callback((Fl_Callback*)cb_align_stop_after);
align_stop_after->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.wefax_align_stop);
o->lstep(50);
} // Fl_Counter* align_stop_after
{ Fl_Counter* o = align_every_nrows = new Fl_Counter(624, 145, 80, 24, _("Auto-align every"));
align_every_nrows->type(1);
align_every_nrows->minimum(5);
align_every_nrows->maximum(100);
align_every_nrows->step(5);
align_every_nrows->value(25);
align_every_nrows->callback((Fl_Callback*)cb_align_every_nrows);
align_every_nrows->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.wefax_align_rows);
} // Fl_Counter* align_every_nrows
{ Fl_Box* o = new Fl_Box(743, 81, 42, 22, _("rows"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(743, 113, 42, 22, _("rows"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(706, 146, 42, 22, _("rows"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Counter* o = wefax_correlation = new Fl_Counter(589, 179, 150, 24, _("Correlation"));
wefax_correlation->tooltip(_("Row-to-row correlation\nUsed to detect presence of WEFAX signal\nLower: more \
false detections"));
wefax_correlation->minimum(0.01);
wefax_correlation->maximum(0.1);
wefax_correlation->step(0.001);
wefax_correlation->value(0.05);
wefax_correlation->callback((Fl_Callback*)cb_wefax_correlation);
wefax_correlation->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.wefax_correlation);
o->lstep (0.01);
} // Fl_Counter* wefax_correlation
{ Fl_Counter* o = cntr_correlation_rows = new Fl_Counter(624, 213, 80, 24, _("# Correlation rows"));
cntr_correlation_rows->tooltip(_("Compute correlation factor over this # rows"));
cntr_correlation_rows->type(1);
cntr_correlation_rows->minimum(2);
cntr_correlation_rows->maximum(50);
cntr_correlation_rows->step(1);
cntr_correlation_rows->value(10);
cntr_correlation_rows->callback((Fl_Callback*)cb_cntr_correlation_rows);
cntr_correlation_rows->align(Fl_Align(FL_ALIGN_LEFT));
o->value(progdefaults.wefax_correlation_rows);
} // Fl_Counter* cntr_correlation_rows
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Modem/Wefax"));
config_pages.push_back(p);
tab_tree->add(_("Modem/Wefax"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/Autostart"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Input2* o = txt_auto_flrig_pathname = new Fl_Input2(267, 56, 310, 24, _("flrig:"));
txt_auto_flrig_pathname->tooltip(_("Enter full path-filename for flrig"));
txt_auto_flrig_pathname->box(FL_DOWN_BOX);
txt_auto_flrig_pathname->color(FL_BACKGROUND2_COLOR);
txt_auto_flrig_pathname->selection_color(FL_SELECTION_COLOR);
txt_auto_flrig_pathname->labeltype(FL_NORMAL_LABEL);
txt_auto_flrig_pathname->labelfont(0);
txt_auto_flrig_pathname->labelsize(14);
txt_auto_flrig_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_auto_flrig_pathname->callback((Fl_Callback*)cb_txt_auto_flrig_pathname);
txt_auto_flrig_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_auto_flrig_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.auto_flrig_pathname.c_str());
} // Fl_Input2* txt_auto_flrig_pathname
{ btn_select_flrig = new Fl_Button(599, 56, 70, 24, _("Locate"));
btn_select_flrig->tooltip(_("Locate flrig executable"));
btn_select_flrig->callback((Fl_Callback*)cb_btn_select_flrig);
} // Fl_Button* btn_select_flrig
{ Fl_Input2* o = txt_auto_flamp_pathname = new Fl_Input2(267, 94, 310, 24, _("flamp:"));
txt_auto_flamp_pathname->tooltip(_("Enter full path-filename for flamp"));
txt_auto_flamp_pathname->box(FL_DOWN_BOX);
txt_auto_flamp_pathname->color(FL_BACKGROUND2_COLOR);
txt_auto_flamp_pathname->selection_color(FL_SELECTION_COLOR);
txt_auto_flamp_pathname->labeltype(FL_NORMAL_LABEL);
txt_auto_flamp_pathname->labelfont(0);
txt_auto_flamp_pathname->labelsize(14);
txt_auto_flamp_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_auto_flamp_pathname->callback((Fl_Callback*)cb_txt_auto_flamp_pathname);
txt_auto_flamp_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_auto_flamp_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.auto_flamp_pathname.c_str());
} // Fl_Input2* txt_auto_flamp_pathname
{ btn_select_auto_flamp = new Fl_Button(599, 94, 70, 24, _("Locate"));
btn_select_auto_flamp->tooltip(_("Locate flamp executable"));
btn_select_auto_flamp->callback((Fl_Callback*)cb_btn_select_auto_flamp);
} // Fl_Button* btn_select_auto_flamp
{ Fl_Input2* o = txt_auto_flnet_pathname = new Fl_Input2(267, 132, 310, 24, _("flnet:"));
txt_auto_flnet_pathname->tooltip(_("Enter full path-filename for flnet"));
txt_auto_flnet_pathname->box(FL_DOWN_BOX);
txt_auto_flnet_pathname->color(FL_BACKGROUND2_COLOR);
txt_auto_flnet_pathname->selection_color(FL_SELECTION_COLOR);
txt_auto_flnet_pathname->labeltype(FL_NORMAL_LABEL);
txt_auto_flnet_pathname->labelfont(0);
txt_auto_flnet_pathname->labelsize(14);
txt_auto_flnet_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_auto_flnet_pathname->callback((Fl_Callback*)cb_txt_auto_flnet_pathname);
txt_auto_flnet_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_auto_flnet_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.auto_flnet_pathname.c_str());
} // Fl_Input2* txt_auto_flnet_pathname
{ btn_select_auto_flnet = new Fl_Button(599, 132, 70, 24, _("Locate"));
btn_select_auto_flnet->tooltip(_("Locate flnet executable"));
btn_select_auto_flnet->callback((Fl_Callback*)cb_btn_select_auto_flnet);
} // Fl_Button* btn_select_auto_flnet
{ Fl_Input2* o = txt_auto_fllog_pathname = new Fl_Input2(267, 171, 310, 24, _("fllog:"));
txt_auto_fllog_pathname->tooltip(_("Enter full path-filename for fllog"));
txt_auto_fllog_pathname->box(FL_DOWN_BOX);
txt_auto_fllog_pathname->color(FL_BACKGROUND2_COLOR);
txt_auto_fllog_pathname->selection_color(FL_SELECTION_COLOR);
txt_auto_fllog_pathname->labeltype(FL_NORMAL_LABEL);
txt_auto_fllog_pathname->labelfont(0);
txt_auto_fllog_pathname->labelsize(14);
txt_auto_fllog_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_auto_fllog_pathname->callback((Fl_Callback*)cb_txt_auto_fllog_pathname);
txt_auto_fllog_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_auto_fllog_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.auto_fllog_pathname.c_str());
} // Fl_Input2* txt_auto_fllog_pathname
{ btn_select_fllog = new Fl_Button(599, 171, 70, 24, _("Locate"));
btn_select_fllog->tooltip(_("Locate fllog executable"));
btn_select_fllog->callback((Fl_Callback*)cb_btn_select_fllog);
} // Fl_Button* btn_select_fllog
{ Fl_Input2* o = txt_auto_prog1_pathname = new Fl_Input2(267, 209, 310, 24, _("Prog 1:"));
txt_auto_prog1_pathname->tooltip(_("Enter full path-filename for external program"));
txt_auto_prog1_pathname->box(FL_DOWN_BOX);
txt_auto_prog1_pathname->color(FL_BACKGROUND2_COLOR);
txt_auto_prog1_pathname->selection_color(FL_SELECTION_COLOR);
txt_auto_prog1_pathname->labeltype(FL_NORMAL_LABEL);
txt_auto_prog1_pathname->labelfont(0);
txt_auto_prog1_pathname->labelsize(14);
txt_auto_prog1_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_auto_prog1_pathname->callback((Fl_Callback*)cb_txt_auto_prog1_pathname);
txt_auto_prog1_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_auto_prog1_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.auto_prog1_pathname.c_str());
} // Fl_Input2* txt_auto_prog1_pathname
{ btn_select_prog1 = new Fl_Button(599, 209, 70, 24, _("Locate"));
btn_select_prog1->tooltip(_("Locate program #1 executable"));
btn_select_prog1->callback((Fl_Callback*)cb_btn_select_prog1);
} // Fl_Button* btn_select_prog1
{ Fl_Input2* o = txt_auto_prog2_pathname = new Fl_Input2(267, 247, 310, 24, _("Prog 2:"));
txt_auto_prog2_pathname->tooltip(_("Enter full path-filename for external program"));
txt_auto_prog2_pathname->box(FL_DOWN_BOX);
txt_auto_prog2_pathname->color(FL_BACKGROUND2_COLOR);
txt_auto_prog2_pathname->selection_color(FL_SELECTION_COLOR);
txt_auto_prog2_pathname->labeltype(FL_NORMAL_LABEL);
txt_auto_prog2_pathname->labelfont(0);
txt_auto_prog2_pathname->labelsize(14);
txt_auto_prog2_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_auto_prog2_pathname->callback((Fl_Callback*)cb_txt_auto_prog2_pathname);
txt_auto_prog2_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_auto_prog2_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.auto_prog2_pathname.c_str());
} // Fl_Input2* txt_auto_prog2_pathname
{ btn_select_prog2 = new Fl_Button(599, 247, 70, 24, _("Locate"));
btn_select_prog2->tooltip(_("Locate program #2 executable"));
btn_select_prog2->callback((Fl_Callback*)cb_btn_select_prog2);
} // Fl_Button* btn_select_prog2
{ Fl_Input2* o = txt_auto_prog3_pathname = new Fl_Input2(267, 286, 310, 24, _("Prog 3:"));
txt_auto_prog3_pathname->tooltip(_("Enter full path-filename for external program"));
txt_auto_prog3_pathname->box(FL_DOWN_BOX);
txt_auto_prog3_pathname->color(FL_BACKGROUND2_COLOR);
txt_auto_prog3_pathname->selection_color(FL_SELECTION_COLOR);
txt_auto_prog3_pathname->labeltype(FL_NORMAL_LABEL);
txt_auto_prog3_pathname->labelfont(0);
txt_auto_prog3_pathname->labelsize(14);
txt_auto_prog3_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_auto_prog3_pathname->callback((Fl_Callback*)cb_txt_auto_prog3_pathname);
txt_auto_prog3_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_auto_prog3_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.auto_prog3_pathname.c_str());
} // Fl_Input2* txt_auto_prog3_pathname
{ btn_select_prog3 = new Fl_Button(599, 286, 70, 24, _("Locate"));
btn_select_prog3->tooltip(_("Locate program #3 executable"));
btn_select_prog3->callback((Fl_Callback*)cb_btn_select_prog3);
} // Fl_Button* btn_select_prog3
{ Fl_Check_Button* o = btn_flrig_auto_enable = new Fl_Check_Button(679, 60, 19, 15, _("Enable\n-"));
btn_flrig_auto_enable->tooltip(_("Enable this entry when fldigi first starts"));
btn_flrig_auto_enable->down_box(FL_DOWN_BOX);
btn_flrig_auto_enable->callback((Fl_Callback*)cb_btn_flrig_auto_enable);
btn_flrig_auto_enable->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.flrig_auto_enable);
} // Fl_Check_Button* btn_flrig_auto_enable
{ Fl_Check_Button* o = btn_flamp_auto_enable = new Fl_Check_Button(679, 98, 23, 15);
btn_flamp_auto_enable->tooltip(_("Enable this entry when fldigi first starts"));
btn_flamp_auto_enable->down_box(FL_DOWN_BOX);
btn_flamp_auto_enable->callback((Fl_Callback*)cb_btn_flamp_auto_enable);
o->value(progdefaults.flamp_auto_enable);
} // Fl_Check_Button* btn_flamp_auto_enable
{ Fl_Check_Button* o = btn_flnet_auto_enable = new Fl_Check_Button(679, 136, 23, 15);
btn_flnet_auto_enable->tooltip(_("Enable this entry when fldigi first starts"));
btn_flnet_auto_enable->down_box(FL_DOWN_BOX);
btn_flnet_auto_enable->callback((Fl_Callback*)cb_btn_flnet_auto_enable);
o->value(progdefaults.flnet_auto_enable);
} // Fl_Check_Button* btn_flnet_auto_enable
{ Fl_Check_Button* o = btn_fllog_auto_enable = new Fl_Check_Button(679, 175, 23, 15);
btn_fllog_auto_enable->tooltip(_("Enable this entry when fldigi first starts"));
btn_fllog_auto_enable->down_box(FL_DOWN_BOX);
btn_fllog_auto_enable->callback((Fl_Callback*)cb_btn_fllog_auto_enable);
o->value(progdefaults.fllog_auto_enable);
} // Fl_Check_Button* btn_fllog_auto_enable
{ Fl_Check_Button* o = btn_prog1_auto_enable = new Fl_Check_Button(679, 213, 23, 15);
btn_prog1_auto_enable->tooltip(_("Enable this entry when fldigi first starts"));
btn_prog1_auto_enable->down_box(FL_DOWN_BOX);
btn_prog1_auto_enable->callback((Fl_Callback*)cb_btn_prog1_auto_enable);
o->value(progdefaults.prog1_auto_enable);
} // Fl_Check_Button* btn_prog1_auto_enable
{ Fl_Check_Button* o = btn_prog2_auto_enable = new Fl_Check_Button(679, 251, 23, 15);
btn_prog2_auto_enable->tooltip(_("Enable this entry when fldigi first starts"));
btn_prog2_auto_enable->down_box(FL_DOWN_BOX);
btn_prog2_auto_enable->callback((Fl_Callback*)cb_btn_prog2_auto_enable);
o->value(progdefaults.prog2_auto_enable);
} // Fl_Check_Button* btn_prog2_auto_enable
{ Fl_Check_Button* o = btn_prog3_auto_enable = new Fl_Check_Button(679, 290, 23, 15);
btn_prog3_auto_enable->tooltip(_("Enable this entry when fldigi first starts"));
btn_prog3_auto_enable->down_box(FL_DOWN_BOX);
btn_prog3_auto_enable->callback((Fl_Callback*)cb_btn_prog3_auto_enable);
o->value(progdefaults.prog3_auto_enable);
} // Fl_Check_Button* btn_prog3_auto_enable
{ btn_test_flrig = new Fl_Button(709, 56, 70, 24, _("Test"));
btn_test_flrig->tooltip(_("Start flrig"));
btn_test_flrig->callback((Fl_Callback*)cb_btn_test_flrig);
} // Fl_Button* btn_test_flrig
{ btn_test_flamp = new Fl_Button(709, 94, 70, 24, _("Test"));
btn_test_flamp->tooltip(_("Start flamp"));
btn_test_flamp->callback((Fl_Callback*)cb_btn_test_flamp);
} // Fl_Button* btn_test_flamp
{ btn_test_flnet = new Fl_Button(709, 132, 70, 24, _("Test"));
btn_test_flnet->tooltip(_("Start flnet"));
btn_test_flnet->callback((Fl_Callback*)cb_btn_test_flnet);
} // Fl_Button* btn_test_flnet
{ btn_test_fllog = new Fl_Button(709, 171, 70, 24, _("Test"));
btn_test_fllog->tooltip(_("Start fllog"));
btn_test_fllog->callback((Fl_Callback*)cb_btn_test_fllog);
} // Fl_Button* btn_test_fllog
{ btn_test_prog1 = new Fl_Button(709, 209, 70, 24, _("Test"));
btn_test_prog1->tooltip(_("Start prog1"));
btn_test_prog1->callback((Fl_Callback*)cb_btn_test_prog1);
} // Fl_Button* btn_test_prog1
{ btn_test_prog2 = new Fl_Button(709, 247, 70, 24, _("Test"));
btn_test_prog2->tooltip(_("Start prog2"));
btn_test_prog2->callback((Fl_Callback*)cb_btn_test_prog2);
} // Fl_Button* btn_test_prog2
{ btn_test_prog3 = new Fl_Button(709, 286, 70, 24, _("Test"));
btn_test_prog3->tooltip(_("Start prog3"));
btn_test_prog3->callback((Fl_Callback*)cb_btn_test_prog3);
} // Fl_Button* btn_test_prog3
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/Autostart"));
config_pages.push_back(p);
tab_tree->add(_("Misc/Autostart"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/CPU"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Check_Button* o = chkSlowCpu = new Fl_Check_Button(305, 65, 225, 20, _("Slow CPU (less than 700MHz)"));
chkSlowCpu->tooltip(_("Enable if you\'re computer does not decode properly"));
chkSlowCpu->down_box(FL_DOWN_BOX);
chkSlowCpu->callback((Fl_Callback*)cb_chkSlowCpu);
o->value(progdefaults.slowcpu);
} // Fl_Check_Button* chkSlowCpu
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/CPU"));
config_pages.push_back(p);
tab_tree->add(_("Misc/CPU"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/DTMF"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Check_Button* o = chkDTMFdecode = new Fl_Check_Button(372, 79, 175, 20, _("Decode DTMF tones"));
chkDTMFdecode->tooltip(_("Decode received DTMF tones"));
chkDTMFdecode->down_box(FL_DOWN_BOX);
chkDTMFdecode->callback((Fl_Callback*)cb_chkDTMFdecode);
o->value(progdefaults.DTMFdecode);
} // Fl_Check_Button* chkDTMFdecode
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/DTMF"));
config_pages.push_back(p);
tab_tree->add(_("Misc/DTMF"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/KML"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Input* o = btnKmlSaveDir = new Fl_Input(232, 47, 390, 24, _("KML files directory"));
btnKmlSaveDir->tooltip(_("Where generated KML documents are stored."));
btnKmlSaveDir->callback((Fl_Callback*)cb_btnKmlSaveDir);
btnKmlSaveDir->align(Fl_Align(69));
o->value(progdefaults.kml_save_dir.c_str());
} // Fl_Input* btnKmlSaveDir
{ Fl_Input* o = inputKmlRootFile = new Fl_Input(231, 91, 300, 24, _("KML root file"));
inputKmlRootFile->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value("fldigi.kml");
} // Fl_Input* inputKmlRootFile
{ Fl_Counter* o = cntKmlMergeDistance = new Fl_Counter(232, 127, 100, 24, _("Minimum distance for splitting aliases (Meters)"));
cntKmlMergeDistance->tooltip(_("Minimum distance for splitting alias nodes (Meters)"));
cntKmlMergeDistance->minimum(0);
cntKmlMergeDistance->maximum(100000);
cntKmlMergeDistance->step(10);
cntKmlMergeDistance->value(1000);
cntKmlMergeDistance->callback((Fl_Callback*)cb_cntKmlMergeDistance);
cntKmlMergeDistance->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.kml_merge_distance);
o->lstep(1000);
} // Fl_Counter* cntKmlMergeDistance
{ Fl_Counter* o = cntKmlRetentionTime = new Fl_Counter(231, 163, 100, 24, _("Data retention time, in hours (0 for no limit)"));
cntKmlRetentionTime->tooltip(_("Number of hours data is kept for each node. Zero means keeping everything."));
cntKmlRetentionTime->minimum(0);
cntKmlRetentionTime->maximum(500);
cntKmlRetentionTime->step(1);
cntKmlRetentionTime->callback((Fl_Callback*)cb_cntKmlRetentionTime);
cntKmlRetentionTime->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.kml_retention_time);
o->lstep(24);
} // Fl_Counter* cntKmlRetentionTime
{ Fl_Spinner2* o = cntKmlRefreshInterval = new Fl_Spinner2(230, 199, 50, 24, _("KML refresh interval (seconds)"));
cntKmlRefreshInterval->tooltip(_("Refresh time interval written in KML file (Seconds)"));
cntKmlRefreshInterval->box(FL_NO_BOX);
cntKmlRefreshInterval->color(FL_BACKGROUND_COLOR);
cntKmlRefreshInterval->selection_color(FL_BACKGROUND_COLOR);
cntKmlRefreshInterval->labeltype(FL_NORMAL_LABEL);
cntKmlRefreshInterval->labelfont(0);
cntKmlRefreshInterval->labelsize(14);
cntKmlRefreshInterval->labelcolor(FL_FOREGROUND_COLOR);
cntKmlRefreshInterval->value(10);
cntKmlRefreshInterval->callback((Fl_Callback*)cb_cntKmlRefreshInterval);
cntKmlRefreshInterval->align(Fl_Align(FL_ALIGN_RIGHT));
cntKmlRefreshInterval->when(FL_WHEN_RELEASE);
o->minimum(1); o->maximum(3600); o->step(1);
o->value(progdefaults.kml_refresh_interval);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntKmlRefreshInterval
{ Fl_ListBox* o = listbox_kml_balloon_style = new Fl_ListBox(230, 235, 201, 24, _("KML balloon display style"));
listbox_kml_balloon_style->tooltip(_("KML balloon in plain text, or HTML, in plain tables or matrices."));
listbox_kml_balloon_style->box(FL_DOWN_BOX);
listbox_kml_balloon_style->color(FL_BACKGROUND2_COLOR);
listbox_kml_balloon_style->selection_color(FL_BACKGROUND_COLOR);
listbox_kml_balloon_style->labeltype(FL_NORMAL_LABEL);
listbox_kml_balloon_style->labelfont(0);
listbox_kml_balloon_style->labelsize(14);
listbox_kml_balloon_style->labelcolor(FL_FOREGROUND_COLOR);
listbox_kml_balloon_style->callback((Fl_Callback*)cb_listbox_kml_balloon_style);
listbox_kml_balloon_style->align(Fl_Align(FL_ALIGN_RIGHT));
listbox_kml_balloon_style->when(FL_WHEN_CHANGED);
o->add("Plain text|HTML tables|Single HTML matrix");o->index(progdefaults.kml_balloon_style);
o->labelsize(FL_NORMAL_SIZE);
listbox_kml_balloon_style->end();
} // Fl_ListBox* listbox_kml_balloon_style
{ Fl_Input* o = btnKmlCommand = new Fl_Input(230, 271, 246, 24, _("Command run on KML creation"));
btnKmlCommand->tooltip(_("Command started when KML files are generated. Subprocesses are started once, \
and restarted if needed."));
btnKmlCommand->callback((Fl_Callback*)cb_btnKmlCommand);
btnKmlCommand->align(Fl_Align(72));
o->value(progdefaults.kml_command.c_str());
} // Fl_Input* btnKmlCommand
{ btlTestKmlCommand = new Fl_Button(230, 307, 191, 24, _("Test command"));
btlTestKmlCommand->tooltip(_("Execute command on KML files."));
btlTestKmlCommand->callback((Fl_Callback*)cb_btlTestKmlCommand);
} // Fl_Button* btlTestKmlCommand
{ btnSelectKmlDestDir = new Fl_Button(631, 47, 101, 24, _("Change dir..."));
btnSelectKmlDestDir->tooltip(_("Choose directory to store KML documents"));
btnSelectKmlDestDir->callback((Fl_Callback*)cb_btnSelectKmlDestDir);
} // Fl_Button* btnSelectKmlDestDir
{ btlPurge = new Fl_Button(542, 91, 190, 24, _("Cleanup KML data now !"));
btlPurge->tooltip(_("Cleanups KML documents, empties Google Earth display."));
btlPurge->callback((Fl_Callback*)cb_btlPurge);
} // Fl_Button* btlPurge
{ Fl_Check_Button* o = btnKmlPurgeOnStartup = new Fl_Check_Button(528, 203, 172, 15, _("Cleanup on startup"));
btnKmlPurgeOnStartup->tooltip(_("Empties KML documents when starting program."));
btnKmlPurgeOnStartup->down_box(FL_DOWN_BOX);
btnKmlPurgeOnStartup->callback((Fl_Callback*)cb_btnKmlPurgeOnStartup);
o->value(progdefaults.kml_purge_on_startup);
} // Fl_Check_Button* btnKmlPurgeOnStartup
{ Fl_Group* o = new Fl_Group(475, 301, 310, 40);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_kml_enabled = new Fl_Check_Button(497, 311, 242, 19, _("KML server enabled (On / Off)"));
btn_kml_enabled->tooltip(_("Uncheck if KML is never used"));
btn_kml_enabled->down_box(FL_DOWN_BOX);
btn_kml_enabled->callback((Fl_Callback*)cb_btn_kml_enabled);
o->value(progdefaults.kml_enabled);
} // Fl_Check_Button* btn_kml_enabled
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/KML"));
config_pages.push_back(p);
tab_tree->add(_("Misc/KML"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/NBEMS interface"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(251, 35, 500, 75, _("NBEMS data file interface"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chkAutoExtract = new Fl_Check_Button(305, 66, 75, 20, _("Enable"));
chkAutoExtract->tooltip(_("Extract files for use with external \"wrap / flmsg\" program"));
chkAutoExtract->down_box(FL_DOWN_BOX);
chkAutoExtract->callback((Fl_Callback*)cb_chkAutoExtract);
o->value(progdefaults.autoextract);
} // Fl_Check_Button* chkAutoExtract
{ Fl_Check_Button* o = chk_open_wrap_folder = new Fl_Check_Button(511, 66, 146, 20, _("Open message folder"));
chk_open_wrap_folder->tooltip(_("Opens NBEMS file folder upon successful capture"));
chk_open_wrap_folder->down_box(FL_DOWN_BOX);
chk_open_wrap_folder->callback((Fl_Callback*)cb_chk_open_wrap_folder);
o->value(progdefaults.open_nbems_folder);
} // Fl_Check_Button* chk_open_wrap_folder
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(251, 111, 500, 199, _("Reception of flmsg files"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chk_open_flmsg = new Fl_Check_Button(305, 211, 136, 20, _("Open with flmsg"));
chk_open_flmsg->tooltip(_("Open message with flmsg"));
chk_open_flmsg->down_box(FL_DOWN_BOX);
chk_open_flmsg->callback((Fl_Callback*)cb_chk_open_flmsg);
o->value(progdefaults.open_flmsg);
} // Fl_Check_Button* chk_open_flmsg
{ Fl_Check_Button* o = chk_open_flmsg_print = new Fl_Check_Button(511, 211, 136, 20, _("Open in browser"));
chk_open_flmsg_print->tooltip(_("Open file with default browser"));
chk_open_flmsg_print->down_box(FL_DOWN_BOX);
chk_open_flmsg_print->callback((Fl_Callback*)cb_chk_open_flmsg_print);
o->value(progdefaults.open_flmsg_print);
} // Fl_Check_Button* chk_open_flmsg_print
{ Fl_Input2* o = txt_flmsg_pathname = new Fl_Input2(305, 241, 330, 24, _("flmsg:"));
txt_flmsg_pathname->tooltip(_("Enter full path-filename for flmsg"));
txt_flmsg_pathname->box(FL_DOWN_BOX);
txt_flmsg_pathname->color(FL_BACKGROUND2_COLOR);
txt_flmsg_pathname->selection_color(FL_SELECTION_COLOR);
txt_flmsg_pathname->labeltype(FL_NORMAL_LABEL);
txt_flmsg_pathname->labelfont(0);
txt_flmsg_pathname->labelsize(14);
txt_flmsg_pathname->labelcolor(FL_FOREGROUND_COLOR);
txt_flmsg_pathname->callback((Fl_Callback*)cb_txt_flmsg_pathname);
txt_flmsg_pathname->align(Fl_Align(FL_ALIGN_LEFT));
txt_flmsg_pathname->when(FL_WHEN_CHANGED);
o->value(progdefaults.flmsg_pathname.c_str());
} // Fl_Input2* txt_flmsg_pathname
{ btn_select_flmsg = new Fl_Button(642, 241, 100, 24, _("Locate flmsg"));
btn_select_flmsg->tooltip(_("Locate flmsg executable"));
btn_select_flmsg->callback((Fl_Callback*)cb_btn_select_flmsg);
} // Fl_Button* btn_select_flmsg
{ Fl_Value_Slider* o = sldr_extract_timeout = new Fl_Value_Slider(271, 279, 364, 21, _("Timeout (secs)"));
sldr_extract_timeout->tooltip(_("Extract times out after NN seconds of inactivity."));
sldr_extract_timeout->type(5);
sldr_extract_timeout->color(FL_LIGHT3);
sldr_extract_timeout->selection_color(FL_FOREGROUND_COLOR);
sldr_extract_timeout->minimum(1);
sldr_extract_timeout->maximum(20);
sldr_extract_timeout->step(0.5);
sldr_extract_timeout->value(10);
sldr_extract_timeout->textsize(14);
sldr_extract_timeout->callback((Fl_Callback*)cb_sldr_extract_timeout);
sldr_extract_timeout->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.extract_timeout);
} // Fl_Value_Slider* sldr_extract_timeout
{ Fl_Group* o = new Fl_Group(256, 130, 490, 76, _("Selection of transfer direct takes precedence\nover all other flmsg reception\
settings"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chk_transfer__to_open_flmsg = new Fl_Check_Button(361, 174, 271, 20, _("Transfer direct to executing flmsg"));
chk_transfer__to_open_flmsg->tooltip(_("Send data stream directly to executing flmsg"));
chk_transfer__to_open_flmsg->down_box(FL_DOWN_BOX);
chk_transfer__to_open_flmsg->callback((Fl_Callback*)cb_chk_transfer__to_open_flmsg);
o->value(progdefaults.flmsg_transfer_direct);
} // Fl_Check_Button* chk_transfer__to_open_flmsg
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/NBEMS interface"));
config_pages.push_back(p);
tab_tree->add(_("Misc/NBEMS interface"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/PSK reporter"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ btnPSKRepAuto = new Fl_Check_Button(252, 65, 324, 20, _("Automatically spot callsigns in decoded text"));
btnPSKRepAuto->tooltip(_("Parse all incoming text"));
btnPSKRepAuto->down_box(FL_DOWN_BOX);
btnPSKRepAuto->callback((Fl_Callback*)cb_btnPSKRepAuto);
btnPSKRepAuto->value(progdefaults.pskrep_auto);
} // Fl_Check_Button* btnPSKRepAuto
{ btnPSKRepLog = new Fl_Check_Button(252, 96, 327, 20, _("Send reception report when logging a QSO"));
btnPSKRepLog->tooltip(_("Send report only when QSO is logged"));
btnPSKRepLog->down_box(FL_DOWN_BOX);
btnPSKRepLog->callback((Fl_Callback*)cb_btnPSKRepLog);
btnPSKRepLog->value(progdefaults.pskrep_log);
} // Fl_Check_Button* btnPSKRepLog
{ btnPSKRepQRG = new Fl_Check_Button(252, 128, 416, 20, _("Report rig frequency (enable only if you have rig control!)"));
btnPSKRepQRG->tooltip(_("Include the transmit frequency"));
btnPSKRepQRG->down_box(FL_DOWN_BOX);
btnPSKRepQRG->callback((Fl_Callback*)cb_btnPSKRepQRG);
btnPSKRepQRG->value(progdefaults.pskrep_qrg);
} // Fl_Check_Button* btnPSKRepQRG
{ Fl_Check_Button* o = btn_report_when_visible = new Fl_Check_Button(252, 160, 416, 20, _("Disable spotting when signal browser(s) are not visible."));
btn_report_when_visible->tooltip(_("Check to reduce CPU load in PSK and RTTY modes."));
btn_report_when_visible->down_box(FL_DOWN_BOX);
btn_report_when_visible->value(1);
btn_report_when_visible->callback((Fl_Callback*)cb_btn_report_when_visible);
o->value(progdefaults.report_when_visible);
} // Fl_Check_Button* btn_report_when_visible
{ Fl_Check_Button* o = btn_pskrep_autostart = new Fl_Check_Button(252, 192, 291, 20, _("Log on to pskrep when starting fldigi"));
btn_pskrep_autostart->tooltip(_("Automatically start psk reporter socket connection"));
btn_pskrep_autostart->down_box(FL_DOWN_BOX);
btn_pskrep_autostart->callback((Fl_Callback*)cb_btn_pskrep_autostart);
o->value(progdefaults.pskrep_autostart);
} // Fl_Check_Button* btn_pskrep_autostart
{ box_connected_to_pskrep = new Fl_Box(562, 193, 18, 18, _("Connected"));
box_connected_to_pskrep->box(FL_DIAMOND_DOWN_BOX);
box_connected_to_pskrep->color(FL_BACKGROUND2_COLOR);
box_connected_to_pskrep->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Box* box_connected_to_pskrep
{ inpPSKRepHost = new Fl_Input2(295, 230, 220, 24, _("Host:"));
inpPSKRepHost->tooltip(_("To whom the connection is made"));
inpPSKRepHost->box(FL_DOWN_BOX);
inpPSKRepHost->color(FL_BACKGROUND2_COLOR);
inpPSKRepHost->selection_color(FL_SELECTION_COLOR);
inpPSKRepHost->labeltype(FL_NORMAL_LABEL);
inpPSKRepHost->labelfont(0);
inpPSKRepHost->labelsize(14);
inpPSKRepHost->labelcolor(FL_FOREGROUND_COLOR);
inpPSKRepHost->callback((Fl_Callback*)cb_inpPSKRepHost);
inpPSKRepHost->align(Fl_Align(FL_ALIGN_LEFT));
inpPSKRepHost->when(FL_WHEN_CHANGED);
inpPSKRepHost->value(progdefaults.pskrep_host.c_str());
inpPSKRepHost->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpPSKRepHost
{ inpPSKRepPort = new Fl_Input2(664, 230, 60, 24, _("Port:"));
inpPSKRepPort->tooltip(_("Using UDP port #"));
inpPSKRepPort->box(FL_DOWN_BOX);
inpPSKRepPort->color(FL_BACKGROUND2_COLOR);
inpPSKRepPort->selection_color(FL_SELECTION_COLOR);
inpPSKRepPort->labeltype(FL_NORMAL_LABEL);
inpPSKRepPort->labelfont(0);
inpPSKRepPort->labelsize(14);
inpPSKRepPort->labelcolor(FL_FOREGROUND_COLOR);
inpPSKRepPort->callback((Fl_Callback*)cb_inpPSKRepPort);
inpPSKRepPort->align(Fl_Align(FL_ALIGN_LEFT));
inpPSKRepPort->when(FL_WHEN_CHANGED);
inpPSKRepPort->value(progdefaults.pskrep_port.c_str());
inpPSKRepPort->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpPSKRepPort
{ btnPSKRepInit = new Fl_Button(644, 275, 80, 24, _("Initialize"));
btnPSKRepInit->tooltip(_("Initialize the socket client"));
btnPSKRepInit->callback((Fl_Callback*)cb_btnPSKRepInit);
} // Fl_Button* btnPSKRepInit
{ boxPSKRepMsg = new Fl_Box(254, 259, 300, 48, _("<PSK Reporter error message>"));
boxPSKRepMsg->labelfont(2);
boxPSKRepMsg->label(0);
} // Fl_Box* boxPSKRepMsg
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/PSK reporter"));
config_pages.push_back(p);
tab_tree->add(_("Misc/PSK reporter"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/PSM"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(204, 32, 590, 108);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter* o = cntBusyChannelSeconds = new Fl_Counter(380, 38, 110, 20, _("Allow TX After Signal Detection (Secs)"));
cntBusyChannelSeconds->tooltip(_("Allow transmits after \'N\' seconds of a signal detection."));
cntBusyChannelSeconds->minimum(1);
cntBusyChannelSeconds->maximum(999);
cntBusyChannelSeconds->step(1);
cntBusyChannelSeconds->value(1);
cntBusyChannelSeconds->callback((Fl_Callback*)cb_cntBusyChannelSeconds);
cntBusyChannelSeconds->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.busyChannelSeconds);
o->step(1,10);
} // Fl_Counter* cntBusyChannelSeconds
{ Fl_Check_Button* o = btnEnableBusyChannel = new Fl_Check_Button(210, 40, 115, 20, _("Enable Busy Channel"));
btnEnableBusyChannel->tooltip(_("Enable to inhibit TX on signal Detections"));
btnEnableBusyChannel->down_box(FL_DOWN_BOX);
btnEnableBusyChannel->callback((Fl_Callback*)cb_btnEnableBusyChannel);
if(progdefaults.enableBusyChannel) o->value(true);
else o->value(false);
} // Fl_Check_Button* btnEnableBusyChannel
{ Fl_Counter* o = cntPSMTXBufferFlushTimer = new Fl_Counter(380, 63, 110, 20, _("TX Buffer Flush Timer (Mins, 0=Disable)"));
cntPSMTXBufferFlushTimer->tooltip(_("Flushes the TX buffer after x period when Busy Channel remains on (TX inhibit\
ed)"));
cntPSMTXBufferFlushTimer->minimum(1);
cntPSMTXBufferFlushTimer->maximum(999);
cntPSMTXBufferFlushTimer->step(1);
cntPSMTXBufferFlushTimer->value(1);
cntPSMTXBufferFlushTimer->callback((Fl_Callback*)cb_cntPSMTXBufferFlushTimer);
cntPSMTXBufferFlushTimer->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.psm_flush_buffer_timeout);
o->step(1,10); o->minimum(0); o->maximum(999);
} // Fl_Counter* cntPSMTXBufferFlushTimer
{ Fl_Counter* o = cntPSMBandwidthMargins = new Fl_Counter(380, 88, 110, 20, _("Modem Bandwidth Margins "));
cntPSMBandwidthMargins->tooltip(_("Monitor signals in modem bandwitdh plus margins."));
cntPSMBandwidthMargins->minimum(1);
cntPSMBandwidthMargins->maximum(999);
cntPSMBandwidthMargins->step(1);
cntPSMBandwidthMargins->value(1);
cntPSMBandwidthMargins->callback((Fl_Callback*)cb_cntPSMBandwidthMargins);
cntPSMBandwidthMargins->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.psm_minimum_bandwidth_margin);
o->step(1,10);
} // Fl_Counter* cntPSMBandwidthMargins
{ Fl_Counter* o = cntPSMValidSamplePeriod = new Fl_Counter(380, 114, 110, 20, _("Valid Signal Sample Period (msecs)"));
cntPSMValidSamplePeriod->tooltip(_("Valid signal sample period in Milliseconds"));
cntPSMValidSamplePeriod->minimum(1);
cntPSMValidSamplePeriod->maximum(999);
cntPSMValidSamplePeriod->step(1);
cntPSMValidSamplePeriod->value(1);
cntPSMValidSamplePeriod->callback((Fl_Callback*)cb_cntPSMValidSamplePeriod);
cntPSMValidSamplePeriod->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.psm_hit_time_window);
o->step(1,10);
} // Fl_Counter* cntPSMValidSamplePeriod
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(204, 140, 590, 84);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnEnable_csma = new Fl_Check_Button(214, 148, 114, 20, _("Enable CSMA"));
btnEnable_csma->tooltip(_("Carrier Sense Mulitiple Access"));
btnEnable_csma->down_box(FL_DOWN_BOX);
btnEnable_csma->callback((Fl_Callback*)cb_btnEnable_csma);
if(progdefaults.csma_enabled) o->value(true);
} // Fl_Check_Button* btnEnable_csma
{ Fl_Counter* o = cntPersistance = new Fl_Counter(333, 148, 110, 20, _("Persistance"));
cntPersistance->tooltip(_("Used to adjust the aggressiveness of TX"));
cntPersistance->minimum(1);
cntPersistance->maximum(999);
cntPersistance->step(1);
cntPersistance->value(1);
cntPersistance->callback((Fl_Callback*)cb_cntPersistance);
cntPersistance->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.csma_persistance);
o->step(1,10); o->minimum(0); o->maximum(255);
} // Fl_Counter* cntPersistance
{ Fl_Counter* o = cntSlotTime = new Fl_Counter(333, 173, 110, 20, _("Slot Time"));
cntSlotTime->tooltip(_("Non transmit window after a transmit period"));
cntSlotTime->minimum(1);
cntSlotTime->maximum(999);
cntSlotTime->step(1);
cntSlotTime->value(1);
cntSlotTime->callback((Fl_Callback*)cb_cntSlotTime);
cntSlotTime->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.csma_slot_time);
o->step(1,10); o->minimum(1); o->maximum(255);
} // Fl_Counter* cntSlotTime
{ Fl_Counter* o = cntTransmitDelay = new Fl_Counter(333, 198, 110, 20, _("Transmit Data Delay"));
cntTransmitDelay->tooltip(_("Idle transmit before data sent"));
cntTransmitDelay->minimum(1);
cntTransmitDelay->maximum(999);
cntTransmitDelay->step(1);
cntTransmitDelay->value(1);
cntTransmitDelay->callback((Fl_Callback*)cb_cntTransmitDelay);
cntTransmitDelay->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.csma_transmit_delay);
o->step(1,10); o->minimum(1); o->maximum(255);
} // Fl_Counter* cntTransmitDelay
{ OutputSlotTimeMS = new Fl_Output(599, 173, 95, 20, _("MilliSeconds"));
OutputSlotTimeMS->tooltip(_("Displays the Slot Time in Milliseconds"));
OutputSlotTimeMS->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Output* OutputSlotTimeMS
{ OutputTransmitDelayMS = new Fl_Output(599, 198, 95, 20, _("MilliSeconds"));
OutputTransmitDelayMS->tooltip(_("Displays the Transmit Delay in Milliseconds"));
OutputTransmitDelayMS->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Output* OutputTransmitDelayMS
{ OutputPersistancePercent = new Fl_Output(599, 147, 95, 20, _("Percent (%)"));
OutputPersistancePercent->tooltip(_("Displays the Slot Time in Milliseconds"));
OutputPersistancePercent->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Output* OutputPersistancePercent
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(204, 223, 590, 31);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnEnable_histogram = new Fl_Check_Button(216, 230, 139, 20, _("Enable Histogram"));
btnEnable_histogram->tooltip(_("Enable Histogram threshold signal monitoring"));
btnEnable_histogram->down_box(FL_DOWN_BOX);
btnEnable_histogram->callback((Fl_Callback*)cb_btnEnable_histogram);
if(progdefaults.psm_use_histogram) o->value(true);
} // Fl_Check_Button* btnEnable_histogram
{ Fl_Counter* o = cntPSMThreshold = new Fl_Counter(380, 230, 110, 20, _("PSM Histogram Threshold"));
cntPSMThreshold->tooltip(_("Sets the theshold level to x value above the noise level"));
cntPSMThreshold->minimum(1);
cntPSMThreshold->maximum(999);
cntPSMThreshold->step(1);
cntPSMThreshold->value(1);
cntPSMThreshold->callback((Fl_Callback*)cb_cntPSMThreshold);
cntPSMThreshold->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.psm_histogram_offset_threshold);
o->step(1,10); o->minimum(1); o->maximum(20);
} // Fl_Counter* cntPSMThreshold
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(204, 254, 590, 34);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter* o = cntKPSQLAttenuation = new Fl_Counter(380, 261, 110, 20, _("PSM Attenuate"));
cntKPSQLAttenuation->tooltip(_("Adjust sensitivity by 1/N fractional values."));
cntKPSQLAttenuation->minimum(1);
cntKPSQLAttenuation->maximum(999);
cntKPSQLAttenuation->step(1);
cntKPSQLAttenuation->value(1);
cntKPSQLAttenuation->callback((Fl_Callback*)cb_cntKPSQLAttenuation);
cntKPSQLAttenuation->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.kpsql_attenuation);
o->step(1,10); o->minimum(1); o->maximum(999);
update_kpsql_fractional_gain(progdefaults.kpsql_attenuation);
} // Fl_Counter* cntKPSQLAttenuation
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(204, 287, 590, 28);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_show_psm_button = new Fl_Check_Button(214, 291, 150, 20, _("Show and enable Power Signal Monitor button (PSM)"));
btn_show_psm_button->tooltip(_("display PSM button on main dialog"));
btn_show_psm_button->down_box(FL_DOWN_BOX);
btn_show_psm_button->callback((Fl_Callback*)cb_btn_show_psm_button);
o->value(progdefaults.show_psm_btn);
} // Fl_Check_Button* btn_show_psm_button
o->end();
} // Fl_Group* o
{ btnBuyChannelDefaults = new Fl_Button(669, 320, 126, 22, _("Default Settings"));
btnBuyChannelDefaults->callback((Fl_Callback*)cb_btnBuyChannelDefaults);
} // Fl_Button* btnBuyChannelDefaults
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/PSM"));
config_pages.push_back(p);
tab_tree->add(_("Misc/PSM"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/Rx text capture"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ grpTalker = new Fl_Group(252, 107, 490, 73, _("Talker Socket (MS only)"));
grpTalker->box(FL_ENGRAVED_FRAME);
grpTalker->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btnConnectTalker = new Fl_Light_Button(278, 127, 74, 20, _("Talker"));
btnConnectTalker->selection_color(FL_DARK_GREEN);
btnConnectTalker->callback((Fl_Callback*)cb_btnConnectTalker);
} // Fl_Light_Button* btnConnectTalker
{ Fl_Box* o = new Fl_Box(357, 127, 345, 20, _("Connect/disconnect to Talker socket server"));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Check_Button* o = btn_auto_talk = new Fl_Check_Button(278, 155, 391, 15, _("Auto connect when fldigi opens (server must be up)"));
btn_auto_talk->down_box(FL_DOWN_BOX);
btn_auto_talk->callback((Fl_Callback*)cb_btn_auto_talk);
o->value(progdefaults.auto_talk);
} // Fl_Check_Button* btn_auto_talk
grpTalker->end();
} // Fl_Group* grpTalker
{ Fl_Group* o = new Fl_Group(252, 47, 490, 56, _("Capture rx text to external file"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chkRxStream = new Fl_Check_Button(278, 74, 175, 20, _("Enable rx text stream"));
chkRxStream->tooltip(_("Send rx text to file: textout.txt"));
chkRxStream->down_box(FL_DOWN_BOX);
chkRxStream->callback((Fl_Callback*)cb_chkRxStream);
o->value(progdefaults.speak);
} // Fl_Check_Button* chkRxStream
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/Rx text capture"));
config_pages.push_back(p);
tab_tree->add(_("Misc/Rx text capture"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/Save Parameters"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Check_Button* o = btnTXLEVEL_by_mode = new Fl_Check_Button(360, 96, 235, 30, _("Transmit level control"));
btnTXLEVEL_by_mode->tooltip(_("Save transmit level control by mode"));
btnTXLEVEL_by_mode->down_box(FL_DOWN_BOX);
btnTXLEVEL_by_mode->callback((Fl_Callback*)cb_btnTXLEVEL_by_mode);
o->value(progdefaults.txlevel_by_mode);
} // Fl_Check_Button* btnTXLEVEL_by_mode
{ Fl_Check_Button* o = btnSQLCH_by_mode = new Fl_Check_Button(360, 140, 270, 30, _("Squelch level/activated control(s)"));
btnSQLCH_by_mode->tooltip(_("Save Squelch level and state by mode"));
btnSQLCH_by_mode->down_box(FL_DOWN_BOX);
btnSQLCH_by_mode->callback((Fl_Callback*)cb_btnSQLCH_by_mode);
o->value(progdefaults.sqlch_by_mode);
} // Fl_Check_Button* btnSQLCH_by_mode
{ Fl_Box* o = new Fl_Box(211, 28, 575, 39, _("Enable specific parameter to Save & Restore on a per mode basis."));
o->box(FL_ENGRAVED_BOX);
o->color((Fl_Color)53);
o->labelsize(13);
o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Check_Button* o = btnAFC_by_mode = new Fl_Check_Button(360, 184, 270, 30, _("AFC control"));
btnAFC_by_mode->tooltip(_("Save AFC state by mode"));
btnAFC_by_mode->down_box(FL_DOWN_BOX);
btnAFC_by_mode->callback((Fl_Callback*)cb_btnAFC_by_mode);
o->value(progdefaults.afc_by_mode);
} // Fl_Check_Button* btnAFC_by_mode
{ Fl_Check_Button* o = btnREVERSE_by_mode = new Fl_Check_Button(360, 228, 270, 30, _("Reverse (Rv) control"));
btnREVERSE_by_mode->tooltip(_("Save Reverse state by mode"));
btnREVERSE_by_mode->down_box(FL_DOWN_BOX);
btnREVERSE_by_mode->callback((Fl_Callback*)cb_btnREVERSE_by_mode);
o->value(progdefaults.reverse_by_mode);
} // Fl_Check_Button* btnREVERSE_by_mode
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/Save Parameters"));
config_pages.push_back(p);
tab_tree->add(_("Misc/Save Parameters"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/Sweet Spot"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(253, 70, 490, 75);
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Value_Input2* o = valCWsweetspot = new Fl_Value_Input2(290, 81, 65, 20, _("CW"));
valCWsweetspot->tooltip(_("Default CW tracking point"));
valCWsweetspot->box(FL_DOWN_BOX);
valCWsweetspot->color(FL_BACKGROUND2_COLOR);
valCWsweetspot->selection_color(FL_SELECTION_COLOR);
valCWsweetspot->labeltype(FL_NORMAL_LABEL);
valCWsweetspot->labelfont(0);
valCWsweetspot->labelsize(14);
valCWsweetspot->labelcolor(FL_FOREGROUND_COLOR);
valCWsweetspot->minimum(200);
valCWsweetspot->maximum(4000);
valCWsweetspot->step(1);
valCWsweetspot->value(1000);
valCWsweetspot->callback((Fl_Callback*)cb_valCWsweetspot);
valCWsweetspot->align(Fl_Align(FL_ALIGN_LEFT));
valCWsweetspot->when(FL_WHEN_CHANGED);
o->value(progdefaults.CWsweetspot);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* valCWsweetspot
{ Fl_Value_Input2* o = valRTTYsweetspot = new Fl_Value_Input2(468, 81, 65, 20, _("RTTY"));
valRTTYsweetspot->tooltip(_("Default RTTY tracking point"));
valRTTYsweetspot->box(FL_DOWN_BOX);
valRTTYsweetspot->color(FL_BACKGROUND2_COLOR);
valRTTYsweetspot->selection_color(FL_SELECTION_COLOR);
valRTTYsweetspot->labeltype(FL_NORMAL_LABEL);
valRTTYsweetspot->labelfont(0);
valRTTYsweetspot->labelsize(14);
valRTTYsweetspot->labelcolor(FL_FOREGROUND_COLOR);
valRTTYsweetspot->minimum(200);
valRTTYsweetspot->maximum(4000);
valRTTYsweetspot->step(1);
valRTTYsweetspot->value(1000);
valRTTYsweetspot->callback((Fl_Callback*)cb_valRTTYsweetspot);
valRTTYsweetspot->align(Fl_Align(FL_ALIGN_LEFT));
valRTTYsweetspot->when(FL_WHEN_CHANGED);
o->value(progdefaults.RTTYsweetspot);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* valRTTYsweetspot
{ Fl_Value_Input2* o = valPSKsweetspot = new Fl_Value_Input2(668, 81, 65, 20, _("PSK et al."));
valPSKsweetspot->tooltip(_("Default for all other modems"));
valPSKsweetspot->box(FL_DOWN_BOX);
valPSKsweetspot->color(FL_BACKGROUND2_COLOR);
valPSKsweetspot->selection_color(FL_SELECTION_COLOR);
valPSKsweetspot->labeltype(FL_NORMAL_LABEL);
valPSKsweetspot->labelfont(0);
valPSKsweetspot->labelsize(14);
valPSKsweetspot->labelcolor(FL_FOREGROUND_COLOR);
valPSKsweetspot->minimum(200);
valPSKsweetspot->maximum(4000);
valPSKsweetspot->step(1);
valPSKsweetspot->value(1000);
valPSKsweetspot->callback((Fl_Callback*)cb_valPSKsweetspot);
valPSKsweetspot->align(Fl_Align(FL_ALIGN_LEFT));
valPSKsweetspot->when(FL_WHEN_CHANGED);
o->value(progdefaults.PSKsweetspot);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* valPSKsweetspot
{ Fl_Check_Button* o = btnStartAtSweetSpot = new Fl_Check_Button(263, 111, 348, 20, _("Always start new modems at these frequencies"));
btnStartAtSweetSpot->tooltip(_("ON - start at default\nOFF - keep current wf cursor position"));
btnStartAtSweetSpot->down_box(FL_DOWN_BOX);
btnStartAtSweetSpot->value(1);
btnStartAtSweetSpot->callback((Fl_Callback*)cb_btnStartAtSweetSpot);
o->value(progdefaults.StartAtSweetSpot);
} // Fl_Check_Button* btnStartAtSweetSpot
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(253, 150, 490, 60, _("K3 A1A configuation"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnCWIsLSB = new Fl_Check_Button(468, 171, 70, 15, _("CW is LSB"));
btnCWIsLSB->tooltip(_("Select this for Elecraft K3\nOther radios should not need it."));
btnCWIsLSB->down_box(FL_DOWN_BOX);
btnCWIsLSB->callback((Fl_Callback*)cb_btnCWIsLSB);
o->value(progdefaults.CWIsLSB);
} // Fl_Check_Button* btnCWIsLSB
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/Sweet Spot"));
config_pages.push_back(p);
tab_tree->add(_("Misc/Sweet Spot"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Misc/TCP-IP sessions"));
o->box(FL_ENGRAVED_BOX);
o->callback((Fl_Callback*)cb_Misc);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 18, 588, 102);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnDisable_p2p_io_widgets = new Fl_Check_Button(211, 96, 85, 20, _("Lock"));
btnDisable_p2p_io_widgets->tooltip(_("Allow/Disallow Changes"));
btnDisable_p2p_io_widgets->down_box(FL_DOWN_BOX);
btnDisable_p2p_io_widgets->callback((Fl_Callback*)cb_btnDisable_p2p_io_widgets);
o->value(progStatus.ip_lock);
} // Fl_Check_Button* btnDisable_p2p_io_widgets
{ Fl_Check_Button* o = btnEnable_arq = new Fl_Check_Button(295, 96, 115, 20, _("Enable ARQ"));
btnEnable_arq->tooltip(_("Used For PSKMail and FLDIGI Suite of Programs"));
btnEnable_arq->type(102);
btnEnable_arq->down_box(FL_DOWN_BOX);
btnEnable_arq->callback((Fl_Callback*)cb_btnEnable_arq);
if(progStatus.data_io_enabled == ARQ_IO) o->value(true);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnEnable_arq
{ Fl_Check_Button* o = btnEnable_kiss = new Fl_Check_Button(420, 96, 115, 20, _("Enable KISS"));
btnEnable_kiss->tooltip(_("Used for BPQ32"));
btnEnable_kiss->type(102);
btnEnable_kiss->down_box(FL_DOWN_BOX);
btnEnable_kiss->callback((Fl_Callback*)cb_btnEnable_kiss);
if(progStatus.data_io_enabled == KISS_IO) o->value(true);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnEnable_kiss
{ new Fl_Box(207, 21, 582, 72, _("Enable ARQ for programs that support TCP and FLDIGI ARQ protocol.\nEnable KIS\
S for programs that supports TCP/UDP and TNC-2 KISS protocol.\nOnly one interf\
ace (ARQ/KISS) can be active at any given time.\nKISS/ARQ/XML Addr/Port change\
s require program restart."));
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 122, 588, 80, _("KISS"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Input2* o = txtKiss_ip_address = new Fl_Input2(254, 175, 230, 22, _("Addr"));
txtKiss_ip_address->tooltip(_("IP Address for KISS interface\nIP Address format: nnn.nnn.nnn.nnn\nor name: i\
.e. localhost"));
txtKiss_ip_address->box(FL_DOWN_BOX);
txtKiss_ip_address->color(FL_BACKGROUND2_COLOR);
txtKiss_ip_address->selection_color(FL_SELECTION_COLOR);
txtKiss_ip_address->labeltype(FL_NORMAL_LABEL);
txtKiss_ip_address->labelfont(0);
txtKiss_ip_address->labelsize(14);
txtKiss_ip_address->labelcolor(FL_FOREGROUND_COLOR);
txtKiss_ip_address->callback((Fl_Callback*)cb_txtKiss_ip_address);
txtKiss_ip_address->align(Fl_Align(FL_ALIGN_RIGHT));
txtKiss_ip_address->when(FL_WHEN_CHANGED);
txtKiss_ip_address->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.kiss_address.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txtKiss_ip_address
{ Fl_Input2* o = txtKiss_ip_io_port_no = new Fl_Input2(529, 175, 55, 22, _("I/O"));
txtKiss_ip_io_port_no->tooltip(_("IP Address Port Number"));
txtKiss_ip_io_port_no->box(FL_DOWN_BOX);
txtKiss_ip_io_port_no->color(FL_BACKGROUND2_COLOR);
txtKiss_ip_io_port_no->selection_color(FL_SELECTION_COLOR);
txtKiss_ip_io_port_no->labeltype(FL_NORMAL_LABEL);
txtKiss_ip_io_port_no->labelfont(0);
txtKiss_ip_io_port_no->labelsize(14);
txtKiss_ip_io_port_no->labelcolor(FL_FOREGROUND_COLOR);
txtKiss_ip_io_port_no->callback((Fl_Callback*)cb_txtKiss_ip_io_port_no);
txtKiss_ip_io_port_no->align(Fl_Align(FL_ALIGN_RIGHT));
txtKiss_ip_io_port_no->when(FL_WHEN_CHANGED);
txtKiss_ip_io_port_no->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.kiss_io_port.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txtKiss_ip_io_port_no
{ Fl_Input2* o = txtKiss_ip_out_port_no = new Fl_Input2(621, 175, 55, 22, _("O"));
txtKiss_ip_out_port_no->tooltip(_("Output port number when same IP address used"));
txtKiss_ip_out_port_no->box(FL_DOWN_BOX);
txtKiss_ip_out_port_no->color(FL_BACKGROUND2_COLOR);
txtKiss_ip_out_port_no->selection_color(FL_SELECTION_COLOR);
txtKiss_ip_out_port_no->labeltype(FL_NORMAL_LABEL);
txtKiss_ip_out_port_no->labelfont(0);
txtKiss_ip_out_port_no->labelsize(14);
txtKiss_ip_out_port_no->labelcolor(FL_FOREGROUND_COLOR);
txtKiss_ip_out_port_no->callback((Fl_Callback*)cb_txtKiss_ip_out_port_no);
txtKiss_ip_out_port_no->align(Fl_Align(FL_ALIGN_RIGHT));
txtKiss_ip_out_port_no->when(FL_WHEN_CHANGED);
txtKiss_ip_out_port_no->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.kiss_out_port.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txtKiss_ip_out_port_no
{ Fl_Check_Button* o = btnEnable_dual_port = new Fl_Check_Button(330, 126, 140, 20, _("DP"));
btnEnable_dual_port->tooltip(_("Enable when both programs are using the same IP address"));
btnEnable_dual_port->down_box(FL_DOWN_BOX);
btnEnable_dual_port->callback((Fl_Callback*)cb_btnEnable_dual_port);
if(progdefaults.kiss_dual_port_enabled) o->value(true); else o->value(false);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnEnable_dual_port
{ Fl_Button* o = btn_restart_kiss = new Fl_Button(705, 149, 82, 22, _("Restart"));
btn_restart_kiss->callback((Fl_Callback*)cb_btn_restart_kiss);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btn_restart_kiss
{ Fl_Button* o = btn_connect_kiss_io = new Fl_Button(617, 149, 82, 22, _("Start"));
btn_connect_kiss_io->tooltip(_("Return KISS TCP IO connection to a Listening state"));
btn_connect_kiss_io->callback((Fl_Callback*)cb_btn_connect_kiss_io);
(progStatus.ip_lock || !progdefaults.kiss_tcp_io) ? o->deactivate() : o->activate();
} // Fl_Button* btn_connect_kiss_io
{ Fl_Button* o = btnDefault_kiss_ip = new Fl_Button(705, 175, 82, 22, _("Default"));
btnDefault_kiss_ip->tooltip(_("Returns IP Address and port\nnumber to the default value."));
btnDefault_kiss_ip->callback((Fl_Callback*)cb_btnDefault_kiss_ip);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btnDefault_kiss_ip
{ Fl_Check_Button* o = btnKissTCPIO = new Fl_Check_Button(416, 126, 70, 20, _("TCP/IP"));
btnKissTCPIO->tooltip(_("Check to enable TCP/IP IO Connection"));
btnKissTCPIO->down_box(FL_DOWN_BOX);
btnKissTCPIO->callback((Fl_Callback*)cb_btnKissTCPIO);
if(progdefaults.kiss_tcp_io) o->value(true); else o->value(false);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnKissTCPIO
{ Fl_Check_Button* o = btnKissUDPIO = new Fl_Check_Button(254, 126, 70, 20, _("UDP/IP"));
btnKissUDPIO->tooltip(_("Check to enable UDP/IP IO"));
btnKissUDPIO->down_box(FL_DOWN_BOX);
btnKissUDPIO->callback((Fl_Callback*)cb_btnKissUDPIO);
if(progdefaults.kiss_tcp_io) o->value(true); else o->value(false);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnKissUDPIO
{ Fl_Check_Button* o = btnKissTCPListen = new Fl_Check_Button(500, 126, 95, 20, _("Listen / Bind"));
btnKissTCPListen->tooltip(_("Monitor for TCP connection."));
btnKissTCPListen->down_box(FL_DOWN_BOX);
btnKissTCPListen->callback((Fl_Callback*)cb_btnKissTCPListen);
if(progStatus.kiss_tcp_listen) o->value(true); else o->value(false);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnKissTCPListen
{ Fl_Check_Button* o = btnEnable_7bit_modem_inhibit = new Fl_Check_Button(254, 149, 140, 20, _("Inhibit 7bit Modem"));
btnEnable_7bit_modem_inhibit->tooltip(_("Inhibit 7 bit modem change notice on user or RSID reception"));
btnEnable_7bit_modem_inhibit->down_box(FL_DOWN_BOX);
btnEnable_7bit_modem_inhibit->callback((Fl_Callback*)cb_btnEnable_7bit_modem_inhibit);
if(progdefaults.kiss_io_modem_change_inhibit) o->value(true); else o->value(false);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnEnable_7bit_modem_inhibit
{ Fl_Check_Button* o = btnEnable_auto_connect = new Fl_Check_Button(416, 149, 155, 20, _("Auto Connect / Retry"));
btnEnable_auto_connect->tooltip(_("Connect to host program on FLDIGI start up"));
btnEnable_auto_connect->down_box(FL_DOWN_BOX);
btnEnable_auto_connect->callback((Fl_Callback*)cb_btnEnable_auto_connect);
if(progdefaults.tcp_udp_auto_connect) o->value(true); else o->value(false);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnEnable_auto_connect
{ Fl_Check_Button* o = btnEnable_ax25_decode = new Fl_Check_Button(610, 126, 115, 20, _("AX25 Decode"));
btnEnable_ax25_decode->tooltip(_("Decode AX25 Packets into human readable form"));
btnEnable_ax25_decode->down_box(FL_DOWN_BOX);
btnEnable_ax25_decode->callback((Fl_Callback*)cb_btnEnable_ax25_decode);
if(progdefaults.ax25_decode_enabled) o->value(true); else o->value(false);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Check_Button* btnEnable_ax25_decode
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 203, 588, 35, _("ARQ"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Input2* o = txtArq_ip_address = new Fl_Input2(255, 207, 230, 22, _("Addr"));
txtArq_ip_address->tooltip(_("IP Address for ARQ interface\nIP Address format: nnn.nnn.nnn.nnn\nor name: i.\
e. localhost"));
txtArq_ip_address->box(FL_DOWN_BOX);
txtArq_ip_address->color(FL_BACKGROUND2_COLOR);
txtArq_ip_address->selection_color(FL_SELECTION_COLOR);
txtArq_ip_address->labeltype(FL_NORMAL_LABEL);
txtArq_ip_address->labelfont(0);
txtArq_ip_address->labelsize(14);
txtArq_ip_address->labelcolor(FL_FOREGROUND_COLOR);
txtArq_ip_address->callback((Fl_Callback*)cb_txtArq_ip_address);
txtArq_ip_address->align(Fl_Align(FL_ALIGN_RIGHT));
txtArq_ip_address->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.arq_address.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txtArq_ip_address
{ Fl_Input2* o = txtArq_ip_port_no = new Fl_Input2(529, 207, 55, 22, _("Port"));
txtArq_ip_port_no->tooltip(_("IP Address Port Number"));
txtArq_ip_port_no->box(FL_DOWN_BOX);
txtArq_ip_port_no->color(FL_BACKGROUND2_COLOR);
txtArq_ip_port_no->selection_color(FL_SELECTION_COLOR);
txtArq_ip_port_no->labeltype(FL_NORMAL_LABEL);
txtArq_ip_port_no->labelfont(0);
txtArq_ip_port_no->labelsize(14);
txtArq_ip_port_no->labelcolor(FL_FOREGROUND_COLOR);
txtArq_ip_port_no->callback((Fl_Callback*)cb_txtArq_ip_port_no);
txtArq_ip_port_no->align(Fl_Align(FL_ALIGN_RIGHT));
txtArq_ip_port_no->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.arq_port.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txtArq_ip_port_no
{ Fl_Button* o = btnDefault_arq_ip = new Fl_Button(624, 207, 73, 22, _("Default"));
btnDefault_arq_ip->tooltip(_("Returns IP Address and port\nnumber to the default value."));
btnDefault_arq_ip->callback((Fl_Callback*)cb_btnDefault_arq_ip);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btnDefault_arq_ip
{ Fl_Button* o = btn_restart_arq = new Fl_Button(704, 207, 82, 22, _("Restart"));
btn_restart_arq->callback((Fl_Callback*)cb_btn_restart_arq);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btn_restart_arq
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 239, 588, 35, _("XML"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Button* o = btnDefault_xmlrpc_ip = new Fl_Button(624, 243, 73, 22, _("Default"));
btnDefault_xmlrpc_ip->tooltip(_("Returns IP Address and port\nnumber to the default value."));
btnDefault_xmlrpc_ip->callback((Fl_Callback*)cb_btnDefault_xmlrpc_ip);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btnDefault_xmlrpc_ip
{ Fl_Input2* o = txtXmlrpc_ip_address = new Fl_Input2(255, 243, 230, 22, _("Addr"));
txtXmlrpc_ip_address->tooltip(_("IP Address for XMLRPC interface\nIP Address format: nnn.nnn.nnn.nnn\nor name:\
i.e. localhost"));
txtXmlrpc_ip_address->box(FL_DOWN_BOX);
txtXmlrpc_ip_address->color(FL_BACKGROUND2_COLOR);
txtXmlrpc_ip_address->selection_color(FL_SELECTION_COLOR);
txtXmlrpc_ip_address->labeltype(FL_NORMAL_LABEL);
txtXmlrpc_ip_address->labelfont(0);
txtXmlrpc_ip_address->labelsize(14);
txtXmlrpc_ip_address->labelcolor(FL_FOREGROUND_COLOR);
txtXmlrpc_ip_address->callback((Fl_Callback*)cb_txtXmlrpc_ip_address);
txtXmlrpc_ip_address->align(Fl_Align(FL_ALIGN_RIGHT));
txtXmlrpc_ip_address->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.xmlrpc_address.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txtXmlrpc_ip_address
{ Fl_Input2* o = txtXmlrpc_ip_port_no = new Fl_Input2(529, 243, 55, 22, _("Port"));
txtXmlrpc_ip_port_no->tooltip(_("IP Address Port Number"));
txtXmlrpc_ip_port_no->box(FL_DOWN_BOX);
txtXmlrpc_ip_port_no->color(FL_BACKGROUND2_COLOR);
txtXmlrpc_ip_port_no->selection_color(FL_SELECTION_COLOR);
txtXmlrpc_ip_port_no->labeltype(FL_NORMAL_LABEL);
txtXmlrpc_ip_port_no->labelfont(0);
txtXmlrpc_ip_port_no->labelsize(14);
txtXmlrpc_ip_port_no->labelcolor(FL_FOREGROUND_COLOR);
txtXmlrpc_ip_port_no->callback((Fl_Callback*)cb_txtXmlrpc_ip_port_no);
txtXmlrpc_ip_port_no->align(Fl_Align(FL_ALIGN_RIGHT));
txtXmlrpc_ip_port_no->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.xmlrpc_port.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txtXmlrpc_ip_port_no
{ Fl_Button* o = btn_restart_xml = new Fl_Button(704, 243, 82, 22, _("Restart"));
btn_restart_xml->callback((Fl_Callback*)cb_btn_restart_xml);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btn_restart_xml
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 277, 588, 30, _("flrig"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Button* o = btnDefault_flrig_ip = new Fl_Button(624, 282, 73, 25, _("Default"));
btnDefault_flrig_ip->tooltip(_("Returns IP Address and port\nnumber to the default value."));
btnDefault_flrig_ip->callback((Fl_Callback*)cb_btnDefault_flrig_ip);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btnDefault_flrig_ip
{ Fl_Input2* o = txt_flrig_ip_address = new Fl_Input2(255, 282, 230, 22, _("Addr"));
txt_flrig_ip_address->tooltip(_("IP Address for flrig interface\nIP Address format: nnn.nnn.nnn.nnn\nor name: \
i.e. localhost"));
txt_flrig_ip_address->box(FL_DOWN_BOX);
txt_flrig_ip_address->color(FL_BACKGROUND2_COLOR);
txt_flrig_ip_address->selection_color(FL_SELECTION_COLOR);
txt_flrig_ip_address->labeltype(FL_NORMAL_LABEL);
txt_flrig_ip_address->labelfont(0);
txt_flrig_ip_address->labelsize(14);
txt_flrig_ip_address->labelcolor(FL_FOREGROUND_COLOR);
txt_flrig_ip_address->callback((Fl_Callback*)cb_txt_flrig_ip_address);
txt_flrig_ip_address->align(Fl_Align(FL_ALIGN_RIGHT));
txt_flrig_ip_address->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.flrig_ip_address.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txt_flrig_ip_address
{ Fl_Input2* o = txt_flrig_ip_port = new Fl_Input2(529, 282, 55, 22, _("Port"));
txt_flrig_ip_port->tooltip(_("IP Address Port Number"));
txt_flrig_ip_port->box(FL_DOWN_BOX);
txt_flrig_ip_port->color(FL_BACKGROUND2_COLOR);
txt_flrig_ip_port->selection_color(FL_SELECTION_COLOR);
txt_flrig_ip_port->labeltype(FL_NORMAL_LABEL);
txt_flrig_ip_port->labelfont(0);
txt_flrig_ip_port->labelsize(14);
txt_flrig_ip_port->labelcolor(FL_FOREGROUND_COLOR);
txt_flrig_ip_port->callback((Fl_Callback*)cb_txt_flrig_ip_port);
txt_flrig_ip_port->align(Fl_Align(FL_ALIGN_RIGHT));
txt_flrig_ip_port->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.flrig_ip_port.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input2* txt_flrig_ip_port
{ Fl_Button* o = btn_reconnect_flrig_server = new Fl_Button(704, 282, 82, 22, _("Reconnect"));
btn_reconnect_flrig_server->callback((Fl_Callback*)cb_btn_reconnect_flrig_server);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btn_reconnect_flrig_server
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 308, 588, 36, _("fllog"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Input* o = txt_fllog_ip_address = new Fl_Input(255, 313, 230, 22, _("Addr"));
txt_fllog_ip_address->tooltip(_("IP Address for fllog interface\nIP Address format: nnn.nnn.nnn.nnn\nor name: \
i.e. localhost"));
txt_fllog_ip_address->callback((Fl_Callback*)cb_txt_fllog_ip_address);
txt_fllog_ip_address->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.xmllog_address.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input* txt_fllog_ip_address
{ Fl_Input* o = txt_fllog_ip_port = new Fl_Input(529, 313, 55, 22, _("Port"));
txt_fllog_ip_port->tooltip(_("IP Address Port Number"));
txt_fllog_ip_port->callback((Fl_Callback*)cb_txt_fllog_ip_port);
txt_fllog_ip_port->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.xmllog_port.c_str());
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Input* txt_fllog_ip_port
{ Fl_Button* o = btn_reconnect_log_server = new Fl_Button(704, 313, 82, 22, _("Reconnect"));
btn_reconnect_log_server->callback((Fl_Callback*)cb_btn_reconnect_log_server);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btn_reconnect_log_server
{ Fl_Button* o = btnDefault_fllog_ip = new Fl_Button(624, 313, 73, 22, _("Default"));
btnDefault_fllog_ip->tooltip(_("Returns IP Address and port\nnumber to the default value."));
btnDefault_fllog_ip->callback((Fl_Callback*)cb_btnDefault_fllog_ip);
progStatus.ip_lock ? o->deactivate() : o->activate();
} // Fl_Button* btnDefault_fllog_ip
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Misc/TCP-IP sessions"));
config_pages.push_back(p);
tab_tree->add(_("Misc/TCP-IP sessions"));
tab_tree->close(_("Misc"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = grpOperator = new Fl_Group(200, 0, 600, 350, _("Operator-Station"));
grpOperator->box(FL_ENGRAVED_BOX);
grpOperator->color(FL_LIGHT1);
grpOperator->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
grpOperator->hide();
{ inpMyCallsign = new Fl_Input2(386, 54, 110, 24, _("Station Callsign:"));
inpMyCallsign->tooltip(_("Station callsign"));
inpMyCallsign->box(FL_DOWN_BOX);
inpMyCallsign->color(FL_BACKGROUND2_COLOR);
inpMyCallsign->selection_color(FL_SELECTION_COLOR);
inpMyCallsign->labeltype(FL_NORMAL_LABEL);
inpMyCallsign->labelfont(0);
inpMyCallsign->labelsize(14);
inpMyCallsign->labelcolor(FL_FOREGROUND_COLOR);
inpMyCallsign->callback((Fl_Callback*)cb_inpMyCallsign);
inpMyCallsign->align(Fl_Align(FL_ALIGN_LEFT));
inpMyCallsign->when(FL_WHEN_CHANGED);
inpMyCallsign->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpMyCallsign
{ Fl_Input2* o = inpOperCallsign = new Fl_Input2(386, 84, 110, 24, _("Operator Callsign:"));
inpOperCallsign->tooltip(_("Operator callsign (if different than station callsign)"));
inpOperCallsign->box(FL_DOWN_BOX);
inpOperCallsign->color(FL_BACKGROUND2_COLOR);
inpOperCallsign->selection_color(FL_SELECTION_COLOR);
inpOperCallsign->labeltype(FL_NORMAL_LABEL);
inpOperCallsign->labelfont(0);
inpOperCallsign->labelsize(14);
inpOperCallsign->labelcolor(FL_FOREGROUND_COLOR);
inpOperCallsign->callback((Fl_Callback*)cb_inpOperCallsign);
inpOperCallsign->align(Fl_Align(FL_ALIGN_LEFT));
inpOperCallsign->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.operCall.c_str());
} // Fl_Input2* inpOperCallsign
{ inpMyName = new Fl_Input2(386, 115, 140, 24, _("Operator Name:"));
inpMyName->tooltip(_("Operators name"));
inpMyName->box(FL_DOWN_BOX);
inpMyName->color(FL_BACKGROUND2_COLOR);
inpMyName->selection_color(FL_SELECTION_COLOR);
inpMyName->labeltype(FL_NORMAL_LABEL);
inpMyName->labelfont(0);
inpMyName->labelsize(14);
inpMyName->labelcolor(FL_FOREGROUND_COLOR);
inpMyName->callback((Fl_Callback*)cb_inpMyName);
inpMyName->align(Fl_Align(FL_ALIGN_LEFT));
inpMyName->when(FL_WHEN_RELEASE);
inpMyName->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpMyName
{ inpMyAntenna = new Fl_Input2(386, 145, 320, 24, _("Antenna:"));
inpMyAntenna->tooltip(_("Short description of antenna"));
inpMyAntenna->box(FL_DOWN_BOX);
inpMyAntenna->color(FL_BACKGROUND2_COLOR);
inpMyAntenna->selection_color(FL_SELECTION_COLOR);
inpMyAntenna->labeltype(FL_NORMAL_LABEL);
inpMyAntenna->labelfont(0);
inpMyAntenna->labelsize(14);
inpMyAntenna->labelcolor(FL_FOREGROUND_COLOR);
inpMyAntenna->callback((Fl_Callback*)cb_inpMyAntenna);
inpMyAntenna->align(Fl_Align(FL_ALIGN_LEFT));
inpMyAntenna->when(FL_WHEN_RELEASE);
inpMyAntenna->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpMyAntenna
{ inpMyQth = new Fl_Input2(386, 176, 320, 24, _("Station QTH:"));
inpMyQth->tooltip(_("Operators QTH"));
inpMyQth->box(FL_DOWN_BOX);
inpMyQth->color(FL_BACKGROUND2_COLOR);
inpMyQth->selection_color(FL_SELECTION_COLOR);
inpMyQth->labeltype(FL_NORMAL_LABEL);
inpMyQth->labelfont(0);
inpMyQth->labelsize(14);
inpMyQth->labelcolor(FL_FOREGROUND_COLOR);
inpMyQth->callback((Fl_Callback*)cb_inpMyQth);
inpMyQth->align(Fl_Align(FL_ALIGN_LEFT));
inpMyQth->when(FL_WHEN_RELEASE);
inpMyQth->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpMyQth
{ inpMyLocator = new Fl_Input2(386, 206, 85, 24, _("Station Locator:"));
inpMyLocator->tooltip(_("Maidenhead locator as in EM64qv"));
inpMyLocator->box(FL_DOWN_BOX);
inpMyLocator->color(FL_BACKGROUND2_COLOR);
inpMyLocator->selection_color(FL_SELECTION_COLOR);
inpMyLocator->labeltype(FL_NORMAL_LABEL);
inpMyLocator->labelfont(0);
inpMyLocator->labelsize(14);
inpMyLocator->labelcolor(FL_FOREGROUND_COLOR);
inpMyLocator->callback((Fl_Callback*)cb_inpMyLocator);
inpMyLocator->align(Fl_Align(FL_ALIGN_LEFT));
inpMyLocator->when(FL_WHEN_RELEASE);
inpMyLocator->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpMyLocator
{ Fl_ListBox* o = listbox_states = new Fl_ListBox(386, 237, 319, 24, _("State / Provinces"));
listbox_states->tooltip(_("US States / Canadian Provinces"));
listbox_states->box(FL_DOWN_BOX);
listbox_states->color(FL_BACKGROUND2_COLOR);
listbox_states->selection_color(FL_BACKGROUND_COLOR);
listbox_states->labeltype(FL_NORMAL_LABEL);
listbox_states->labelfont(0);
listbox_states->labelsize(14);
listbox_states->labelcolor(FL_FOREGROUND_COLOR);
listbox_states->callback((Fl_Callback*)cb_listbox_states);
listbox_states->align(Fl_Align(FL_ALIGN_LEFT));
listbox_states->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
o->add(states.names().c_str());
o->index(progdefaults.SQSOstate);
listbox_states->end();
} // Fl_ListBox* listbox_states
{ Fl_Input2* o = inp_QP_state_short = new Fl_Input2(710, 237, 60, 24);
inp_QP_state_short->tooltip(_("Abbreviation for State/Province"));
inp_QP_state_short->box(FL_DOWN_BOX);
inp_QP_state_short->color(FL_BACKGROUND2_COLOR);
inp_QP_state_short->selection_color(FL_SELECTION_COLOR);
inp_QP_state_short->labeltype(FL_NORMAL_LABEL);
inp_QP_state_short->labelfont(0);
inp_QP_state_short->labelsize(14);
inp_QP_state_short->labelcolor(FL_FOREGROUND_COLOR);
inp_QP_state_short->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inp_QP_state_short->when(FL_WHEN_RELEASE);
o->value(states.state_short(listbox_states->value()).c_str());
} // Fl_Input2* inp_QP_state_short
{ Fl_ListBox* o = listbox_counties = new Fl_ListBox(386, 268, 319, 24, _("Counties / Regions"));
listbox_counties->tooltip(_("US/Canadian Counties / Regions"));
listbox_counties->box(FL_DOWN_BOX);
listbox_counties->color(FL_BACKGROUND2_COLOR);
listbox_counties->selection_color(FL_BACKGROUND_COLOR);
listbox_counties->labeltype(FL_NORMAL_LABEL);
listbox_counties->labelfont(0);
listbox_counties->labelsize(14);
listbox_counties->labelcolor(FL_FOREGROUND_COLOR);
listbox_counties->callback((Fl_Callback*)cb_listbox_counties);
listbox_counties->align(Fl_Align(FL_ALIGN_LEFT));
listbox_counties->when(FL_WHEN_RELEASE);
o->clear(); o->add(states.counties(listbox_states->value()).c_str());
o->index(progdefaults.SQSOcounty);
o->labelsize(FL_NORMAL_SIZE);
listbox_counties->end();
} // Fl_ListBox* listbox_counties
{ inp_QP_short_county = new Fl_Input2(710, 268, 60, 24);
inp_QP_short_county->tooltip(_("Abbreviation for County/Region"));
inp_QP_short_county->box(FL_DOWN_BOX);
inp_QP_short_county->color(FL_BACKGROUND2_COLOR);
inp_QP_short_county->selection_color(FL_SELECTION_COLOR);
inp_QP_short_county->labeltype(FL_NORMAL_LABEL);
inp_QP_short_county->labelfont(0);
inp_QP_short_county->labelsize(14);
inp_QP_short_county->labelcolor(FL_FOREGROUND_COLOR);
inp_QP_short_county->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inp_QP_short_county->when(FL_WHEN_RELEASE);
inp_QP_short_county->value(states.cnty_short(listbox_states->value(),listbox_counties->value()).c_str());
} // Fl_Input2* inp_QP_short_county
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Operator-Station"));
config_pages.push_back(p);
tab_tree->add(_("Operator-Station"));
grpOperator->end();
} // Fl_Group* grpOperator
{ Fl_Group* o = grpRigFlrig = new Fl_Group(200, 0, 600, 350, _("Rig Control/flrig"));
grpRigFlrig->box(FL_ENGRAVED_BOX);
grpRigFlrig->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
grpRigFlrig->hide();
{ Fl_Group* o = new Fl_Group(209, 233, 580, 90, _("\"Disable PTT keys modem if multiple instances of fldigi (client)\nare connec\
ted to a single flrig (server)."));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chk_flrig_keys_modem = new Fl_Check_Button(439, 281, 183, 20, _("Flrig PTT keys modem"));
chk_flrig_keys_modem->tooltip(_("\" \""));
chk_flrig_keys_modem->down_box(FL_DOWN_BOX);
chk_flrig_keys_modem->callback((Fl_Callback*)cb_chk_flrig_keys_modem);
o->value(progdefaults.flrig_keys_modem);
} // Fl_Check_Button* chk_flrig_keys_modem
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(209, 148, 580, 81, _("flrig xmlrpc server parameters\nthese controls are mirrored on the IO configu\
ration tab"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btnDefault_flrig_ip_mirror = new Fl_Button(613, 194, 73, 24, _("Default"));
btnDefault_flrig_ip_mirror->tooltip(_("Returns IP Address and port\nnumber to the default value."));
btnDefault_flrig_ip_mirror->callback((Fl_Callback*)cb_btnDefault_flrig_ip_mirror);
} // Fl_Button* btnDefault_flrig_ip_mirror
{ Fl_Input2* o = txt_flrig_ip_address_mirror = new Fl_Input2(244, 194, 230, 24, _("Addr"));
txt_flrig_ip_address_mirror->tooltip(_("IP Address for flrig interface\nIP Address format: nnn.nnn.nnn.nnn\nor name: \
i.e. localhost"));
txt_flrig_ip_address_mirror->box(FL_DOWN_BOX);
txt_flrig_ip_address_mirror->color(FL_BACKGROUND2_COLOR);
txt_flrig_ip_address_mirror->selection_color(FL_SELECTION_COLOR);
txt_flrig_ip_address_mirror->labeltype(FL_NORMAL_LABEL);
txt_flrig_ip_address_mirror->labelfont(0);
txt_flrig_ip_address_mirror->labelsize(14);
txt_flrig_ip_address_mirror->labelcolor(FL_FOREGROUND_COLOR);
txt_flrig_ip_address_mirror->callback((Fl_Callback*)cb_txt_flrig_ip_address_mirror);
txt_flrig_ip_address_mirror->align(Fl_Align(FL_ALIGN_RIGHT));
txt_flrig_ip_address_mirror->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.flrig_ip_address.c_str());
} // Fl_Input2* txt_flrig_ip_address_mirror
{ Fl_Input2* o = txt_flrig_ip_port_mirror = new Fl_Input2(518, 194, 55, 24, _("Port"));
txt_flrig_ip_port_mirror->tooltip(_("IP Address Port Number"));
txt_flrig_ip_port_mirror->box(FL_DOWN_BOX);
txt_flrig_ip_port_mirror->color(FL_BACKGROUND2_COLOR);
txt_flrig_ip_port_mirror->selection_color(FL_SELECTION_COLOR);
txt_flrig_ip_port_mirror->labeltype(FL_NORMAL_LABEL);
txt_flrig_ip_port_mirror->labelfont(0);
txt_flrig_ip_port_mirror->labelsize(14);
txt_flrig_ip_port_mirror->labelcolor(FL_FOREGROUND_COLOR);
txt_flrig_ip_port_mirror->callback((Fl_Callback*)cb_txt_flrig_ip_port_mirror);
txt_flrig_ip_port_mirror->align(Fl_Align(FL_ALIGN_RIGHT));
txt_flrig_ip_port_mirror->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.flrig_ip_port.c_str());
} // Fl_Input2* txt_flrig_ip_port_mirror
{ btn_reconnect_flrig_server_mirror = new Fl_Button(693, 194, 82, 24, _("Reconnect"));
btn_reconnect_flrig_server_mirror->tooltip(_("Press only if you change the address/port"));
btn_reconnect_flrig_server_mirror->callback((Fl_Callback*)cb_btn_reconnect_flrig_server_mirror);
} // Fl_Button* btn_reconnect_flrig_server_mirror
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(209, 54, 580, 90, _("flrig is the preferred method of tranceiver control"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_fldigi_client_to_flrig = new Fl_Check_Button(234, 81, 70, 15, _("Enable flrig xcvr control with fldigi as client"));
btn_fldigi_client_to_flrig->tooltip(_("Disable if flrig not used."));
btn_fldigi_client_to_flrig->down_box(FL_DOWN_BOX);
btn_fldigi_client_to_flrig->callback((Fl_Callback*)cb_btn_fldigi_client_to_flrig);
o->value(progdefaults.fldigi_client_to_flrig);
} // Fl_Check_Button* btn_fldigi_client_to_flrig
{ Fl_Check_Button* o = btn_flrig_auto_shutdown = new Fl_Check_Button(234, 112, 70, 15, _("Shutdown flrig with fldigi"));
btn_flrig_auto_shutdown->tooltip(_("Disable if flrig not used."));
btn_flrig_auto_shutdown->down_box(FL_DOWN_BOX);
btn_flrig_auto_shutdown->callback((Fl_Callback*)cb_btn_flrig_auto_shutdown);
o->value(progdefaults.flrig_auto_shutdown);
} // Fl_Check_Button* btn_flrig_auto_shutdown
{ Fl_Counter2* o = val_flrig_poll = new Fl_Counter2(620, 107, 130, 24, _("Poll Interval (msec)"));
val_flrig_poll->tooltip(_("Request updates every \'poll interval\' milliseconds"));
val_flrig_poll->box(FL_UP_BOX);
val_flrig_poll->color(FL_BACKGROUND_COLOR);
val_flrig_poll->selection_color(FL_INACTIVE_COLOR);
val_flrig_poll->labeltype(FL_NORMAL_LABEL);
val_flrig_poll->labelfont(0);
val_flrig_poll->labelsize(14);
val_flrig_poll->labelcolor(FL_FOREGROUND_COLOR);
val_flrig_poll->minimum(50);
val_flrig_poll->maximum(5000);
val_flrig_poll->step(10);
val_flrig_poll->value(1);
val_flrig_poll->callback((Fl_Callback*)cb_val_flrig_poll);
val_flrig_poll->align(Fl_Align(FL_ALIGN_LEFT));
val_flrig_poll->when(FL_WHEN_CHANGED);
o->value(progdefaults.flrig_poll);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(100);
} // Fl_Counter2* val_flrig_poll
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Rig Control/flrig"));
config_pages.push_back(p);
tab_tree->add(_("Rig Control/flrig"));
grpRigFlrig->end();
} // Fl_Group* grpRigFlrig
{ Fl_Group* o = grpRigCat = new Fl_Group(200, 0, 600, 350, _("Rig Control/CAT (rigcat)"));
grpRigCat->box(FL_ENGRAVED_BOX);
grpRigCat->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
grpRigCat->hide();
{ chkUSERIGCAT = new Fl_Check_Button(434, 32, 110, 20, _("Use RigCAT"));
chkUSERIGCAT->tooltip(_("RigCAT used for rig control"));
chkUSERIGCAT->down_box(FL_DOWN_BOX);
chkUSERIGCAT->callback((Fl_Callback*)cb_chkUSERIGCAT);
} // Fl_Check_Button* chkUSERIGCAT
{ grpRigCAT = new Fl_Group(244, 55, 490, 279);
grpRigCAT->box(FL_ENGRAVED_FRAME);
grpRigCAT->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Output* o = txtXmlRigFilename = new Fl_Output(254, 79, 130, 22, _("Rig description file:"));
txtXmlRigFilename->tooltip(_("Use Open to select descriptor file"));
txtXmlRigFilename->color(FL_LIGHT2);
txtXmlRigFilename->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value(fl_filename_name(progdefaults.XmlRigFilename.c_str()));
} // Fl_Output* txtXmlRigFilename
{ btnSelectRigXmlFile = new Fl_Button(387, 79, 60, 22, _("Open..."));
btnSelectRigXmlFile->tooltip(_("Select rig descriptor file"));
btnSelectRigXmlFile->callback((Fl_Callback*)cb_btnSelectRigXmlFile);
btnSelectRigXmlFile->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Button* btnSelectRigXmlFile
{ Fl_ComboBox* o = inpXmlRigDevice = new Fl_ComboBox(580, 79, 144, 22, _("Device:"));
inpXmlRigDevice->box(FL_DOWN_BOX);
inpXmlRigDevice->color(FL_BACKGROUND2_COLOR);
inpXmlRigDevice->selection_color(FL_BACKGROUND_COLOR);
inpXmlRigDevice->labeltype(FL_NORMAL_LABEL);
inpXmlRigDevice->labelfont(0);
inpXmlRigDevice->labelsize(14);
inpXmlRigDevice->labelcolor(FL_FOREGROUND_COLOR);
inpXmlRigDevice->callback((Fl_Callback*)cb_inpXmlRigDevice);
inpXmlRigDevice->align(Fl_Align(FL_ALIGN_LEFT));
inpXmlRigDevice->when(FL_WHEN_RELEASE);
o->value(progdefaults.XmlRigDevice.c_str());
o->labelsize(FL_NORMAL_SIZE);
inpXmlRigDevice->end();
} // Fl_ComboBox* inpXmlRigDevice
{ Fl_Value_Input2* o = cntRigCatRetries = new Fl_Value_Input2(269, 122, 60, 22, _("Retries"));
cntRigCatRetries->tooltip(_("# retries before giving up"));
cntRigCatRetries->box(FL_DOWN_BOX);
cntRigCatRetries->color(FL_BACKGROUND2_COLOR);
cntRigCatRetries->selection_color(FL_SELECTION_COLOR);
cntRigCatRetries->labeltype(FL_NORMAL_LABEL);
cntRigCatRetries->labelfont(0);
cntRigCatRetries->labelsize(14);
cntRigCatRetries->labelcolor(FL_FOREGROUND_COLOR);
cntRigCatRetries->maximum(1000);
cntRigCatRetries->step(1);
cntRigCatRetries->callback((Fl_Callback*)cb_cntRigCatRetries);
cntRigCatRetries->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntRigCatRetries->when(FL_WHEN_CHANGED);
o->value(progdefaults.RigCatRetries);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* cntRigCatRetries
{ Fl_Value_Input2* o = cntRigCatTimeout = new Fl_Value_Input2(399, 122, 60, 22, _("Retry interval (ms)"));
cntRigCatTimeout->tooltip(_("Time between retires in msec"));
cntRigCatTimeout->box(FL_DOWN_BOX);
cntRigCatTimeout->color(FL_BACKGROUND2_COLOR);
cntRigCatTimeout->selection_color(FL_SELECTION_COLOR);
cntRigCatTimeout->labeltype(FL_NORMAL_LABEL);
cntRigCatTimeout->labelfont(0);
cntRigCatTimeout->labelsize(14);
cntRigCatTimeout->labelcolor(FL_FOREGROUND_COLOR);
cntRigCatTimeout->maximum(10000);
cntRigCatTimeout->step(1);
cntRigCatTimeout->callback((Fl_Callback*)cb_cntRigCatTimeout);
cntRigCatTimeout->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntRigCatTimeout->when(FL_WHEN_CHANGED);
o->value(progdefaults.RigCatTimeout);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* cntRigCatTimeout
{ Fl_Value_Input2* o = cntRigCatWait = new Fl_Value_Input2(269, 162, 60, 22, _("Write delay (ms)"));
cntRigCatWait->tooltip(_("Wait for response to subsequent command"));
cntRigCatWait->box(FL_DOWN_BOX);
cntRigCatWait->color(FL_BACKGROUND2_COLOR);
cntRigCatWait->selection_color(FL_SELECTION_COLOR);
cntRigCatWait->labeltype(FL_NORMAL_LABEL);
cntRigCatWait->labelfont(0);
cntRigCatWait->labelsize(14);
cntRigCatWait->labelcolor(FL_FOREGROUND_COLOR);
cntRigCatWait->maximum(10000);
cntRigCatWait->step(1);
cntRigCatWait->callback((Fl_Callback*)cb_cntRigCatWait);
cntRigCatWait->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntRigCatWait->when(FL_WHEN_CHANGED);
o->value(progdefaults.RigCatWait);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* cntRigCatWait
{ Fl_ListBox* o = listbox_xml_rig_baudrate = new Fl_ListBox(625, 122, 99, 22, _("Baud rate:"));
listbox_xml_rig_baudrate->box(FL_DOWN_BOX);
listbox_xml_rig_baudrate->color(FL_BACKGROUND2_COLOR);
listbox_xml_rig_baudrate->selection_color(FL_BACKGROUND_COLOR);
listbox_xml_rig_baudrate->labeltype(FL_NORMAL_LABEL);
listbox_xml_rig_baudrate->labelfont(0);
listbox_xml_rig_baudrate->labelsize(14);
listbox_xml_rig_baudrate->labelcolor(FL_FOREGROUND_COLOR);
listbox_xml_rig_baudrate->callback((Fl_Callback*)cb_listbox_xml_rig_baudrate);
listbox_xml_rig_baudrate->align(Fl_Align(FL_ALIGN_LEFT));
listbox_xml_rig_baudrate->when(FL_WHEN_RELEASE);
o->add(szBaudRates);
o->index(progdefaults.XmlRigBaudrate);
o->labelsize(FL_NORMAL_SIZE);
listbox_xml_rig_baudrate->end();
} // Fl_ListBox* listbox_xml_rig_baudrate
{ Fl_Counter2* o = valRigCatStopbits = new Fl_Counter2(627, 156, 95, 21, _("Stopbits"));
valRigCatStopbits->type(1);
valRigCatStopbits->box(FL_UP_BOX);
valRigCatStopbits->color(FL_BACKGROUND_COLOR);
valRigCatStopbits->selection_color(FL_INACTIVE_COLOR);
valRigCatStopbits->labeltype(FL_NORMAL_LABEL);
valRigCatStopbits->labelfont(0);
valRigCatStopbits->labelsize(14);
valRigCatStopbits->labelcolor(FL_FOREGROUND_COLOR);
valRigCatStopbits->minimum(1);
valRigCatStopbits->maximum(2);
valRigCatStopbits->step(1);
valRigCatStopbits->value(1);
valRigCatStopbits->callback((Fl_Callback*)cb_valRigCatStopbits);
valRigCatStopbits->align(Fl_Align(FL_ALIGN_LEFT));
valRigCatStopbits->when(FL_WHEN_CHANGED);
o->value(progdefaults.RigCatStopbits);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* valRigCatStopbits
{ btnInitRIGCAT = new Fl_Button(604, 293, 113, 24, _("Initialize"));
btnInitRIGCAT->tooltip(_("Initialize RigCAT interface"));
btnInitRIGCAT->callback((Fl_Callback*)cb_btnInitRIGCAT);
btnInitRIGCAT->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Button* btnInitRIGCAT
{ Fl_Check_Button* o = btnRigCatEcho = new Fl_Check_Button(289, 188, 192, 22, _("Commands are echoed"));
btnRigCatEcho->tooltip(_("Rig or interface echos serial data"));
btnRigCatEcho->down_box(FL_DOWN_BOX);
btnRigCatEcho->callback((Fl_Callback*)cb_btnRigCatEcho);
o->value(progdefaults.RigCatECHO);
} // Fl_Check_Button* btnRigCatEcho
{ Fl_Round_Button* o = btnRigCatCMDptt = new Fl_Round_Button(495, 189, 207, 20, _("CAT command for PTT"));
btnRigCatCMDptt->tooltip(_("PTT is a CAT command (not hardware)"));
btnRigCatCMDptt->down_box(FL_DOWN_BOX);
btnRigCatCMDptt->selection_color((Fl_Color)1);
btnRigCatCMDptt->callback((Fl_Callback*)cb_btnRigCatCMDptt);
o->value(progdefaults.RigCatCMDptt);
} // Fl_Round_Button* btnRigCatCMDptt
{ Fl_Round_Button* o = btnRigCatRTSptt = new Fl_Round_Button(289, 218, 160, 20, _("Toggle RTS for PTT"));
btnRigCatRTSptt->tooltip(_("RTS is ptt line"));
btnRigCatRTSptt->down_box(FL_DOWN_BOX);
btnRigCatRTSptt->callback((Fl_Callback*)cb_btnRigCatRTSptt);
o->value(progdefaults.RigCatRTSptt);
} // Fl_Round_Button* btnRigCatRTSptt
{ Fl_Round_Button* o = btnRigCatDTRptt = new Fl_Round_Button(495, 216, 160, 20, _("Toggle DTR for PTT"));
btnRigCatDTRptt->tooltip(_("DTR is ptt line"));
btnRigCatDTRptt->down_box(FL_DOWN_BOX);
btnRigCatDTRptt->callback((Fl_Callback*)cb_btnRigCatDTRptt);
o->value(progdefaults.RigCatDTRptt);
} // Fl_Round_Button* btnRigCatDTRptt
{ Fl_Check_Button* o = btnRigCatRTSplus = new Fl_Check_Button(289, 247, 100, 20, _("RTS +12 v"));
btnRigCatRTSplus->tooltip(_("Initial state of RTS"));
btnRigCatRTSplus->down_box(FL_DOWN_BOX);
btnRigCatRTSplus->callback((Fl_Callback*)cb_btnRigCatRTSplus);
o->value(progdefaults.RigCatRTSplus);
} // Fl_Check_Button* btnRigCatRTSplus
{ Fl_Check_Button* o = btnRigCatDTRplus = new Fl_Check_Button(495, 244, 100, 20, _("DTR +12 v"));
btnRigCatDTRplus->tooltip(_("Initial state of DTR"));
btnRigCatDTRplus->down_box(FL_DOWN_BOX);
btnRigCatDTRplus->callback((Fl_Callback*)cb_btnRigCatDTRplus);
o->value(progdefaults.RigCatDTRplus);
} // Fl_Check_Button* btnRigCatDTRplus
{ Fl_Check_Button* o = chkRigCatRTSCTSflow = new Fl_Check_Button(289, 275, 170, 20, _("RTS/CTS flow control"));
chkRigCatRTSCTSflow->tooltip(_("Rig uses RTS/CTS handshake"));
chkRigCatRTSCTSflow->down_box(FL_DOWN_BOX);
chkRigCatRTSCTSflow->callback((Fl_Callback*)cb_chkRigCatRTSCTSflow);
o->value(progdefaults.RigCatRTSCTSflow);
} // Fl_Check_Button* chkRigCatRTSCTSflow
{ Fl_Check_Button* o = chk_restore_tio = new Fl_Check_Button(289, 304, 205, 20, _("Restore UART Settings on Close"));
chk_restore_tio->tooltip(_("Restore the serial (COM) port settings"));
chk_restore_tio->down_box(FL_DOWN_BOX);
chk_restore_tio->callback((Fl_Callback*)cb_chk_restore_tio);
o->value(progdefaults.RigCatRestoreTIO);
} // Fl_Check_Button* chk_restore_tio
{ Fl_Check_Button* o = chkRigCatVSP = new Fl_Check_Button(495, 272, 100, 25, _("VSP Enable"));
chkRigCatVSP->tooltip(_("Virtual Serial Port Emulator - suppress WARNINGS"));
chkRigCatVSP->down_box(FL_DOWN_BOX);
chkRigCatVSP->callback((Fl_Callback*)cb_chkRigCatVSP);
o->value(progdefaults.RigCatVSP);
} // Fl_Check_Button* chkRigCatVSP
{ Fl_Value_Input2* o = cntRigCatInitDelay = new Fl_Value_Input2(399, 162, 75, 22, _("Init delay (ms)"));
cntRigCatInitDelay->tooltip(_("Wait for response to first CAT command"));
cntRigCatInitDelay->box(FL_DOWN_BOX);
cntRigCatInitDelay->color(FL_BACKGROUND2_COLOR);
cntRigCatInitDelay->selection_color(FL_SELECTION_COLOR);
cntRigCatInitDelay->labeltype(FL_NORMAL_LABEL);
cntRigCatInitDelay->labelfont(0);
cntRigCatInitDelay->labelsize(14);
cntRigCatInitDelay->labelcolor(FL_FOREGROUND_COLOR);
cntRigCatInitDelay->maximum(10000);
cntRigCatInitDelay->step(1);
cntRigCatInitDelay->callback((Fl_Callback*)cb_cntRigCatInitDelay);
cntRigCatInitDelay->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntRigCatInitDelay->when(FL_WHEN_CHANGED);
o->value(progdefaults.RigCatInitDelay);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* cntRigCatInitDelay
grpRigCAT->end();
} // Fl_Group* grpRigCAT
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Rig Control/CAT (rigcat)"));
config_pages.push_back(p);
tab_tree->add(_("Rig Control/CAT (rigcat)"));
grpRigCat->end();
} // Fl_Group* grpRigCat
{ Fl_Group* o = grpRigGPIO = new Fl_Group(200, 0, 600, 350, _("Rig Control/GPIO"));
grpRigGPIO->box(FL_ENGRAVED_BOX);
grpRigGPIO->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
grpRigGPIO->hide();
{ Fl_Check_Button* o = btn_gpio_ptt2 = new Fl_Check_Button(256, 25, 330, 15, _("Enable GPIO PTT (Pi specific controls)"));
btn_gpio_ptt2->tooltip(_("Select PTT on state"));
btn_gpio_ptt2->down_box(FL_DOWN_BOX);
btn_gpio_ptt2->labelfont(4);
btn_gpio_ptt2->callback((Fl_Callback*)cb_btn_gpio_ptt2);
o->value(progdefaults.gpio_ptt);
} // Fl_Check_Button* btn_gpio_ptt2
{ btnInitHWPTT2 = new Fl_Button(640, 20, 113, 24, _("Initialize"));
btnInitHWPTT2->tooltip(_("Initialize the H/W PTT interface"));
btnInitHWPTT2->callback((Fl_Callback*)cb_btnInitHWPTT2);
} // Fl_Button* btnInitHWPTT2
{ Fl_Box* o = new Fl_Box(265, 53, 189, 17, _("BCM GPIO pin Value"));
o->labelfont(4);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Check_Button* o = btn_enable_gpio[0] = new Fl_Check_Button(255, 78, 125, 15, _("17 00 11"));
btn_enable_gpio[0]->tooltip(_("Select pin number"));
btn_enable_gpio[0]->down_box(FL_DOWN_BOX);
btn_enable_gpio[0]->labelfont(4);
btn_enable_gpio[0]->callback((Fl_Callback*)cb_btn_enable_gpio);
o->value(progdefaults.enable_gpio & 0x01);
} // Fl_Check_Button* btn_enable_gpio[0]
{ Fl_Check_Button* o = btn_enable_gpio[1] = new Fl_Check_Button(255, 107, 125, 15, _("18 01 12"));
btn_enable_gpio[1]->tooltip(_("Select pin number"));
btn_enable_gpio[1]->down_box(FL_DOWN_BOX);
btn_enable_gpio[1]->labelfont(4);
btn_enable_gpio[1]->callback((Fl_Callback*)cb_btn_enable_gpio1);
o->value((progdefaults.enable_gpio >> 1) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[1]
{ Fl_Check_Button* o = btn_enable_gpio[2] = new Fl_Check_Button(255, 137, 125, 15, _("27 02 13"));
btn_enable_gpio[2]->tooltip(_("Select pin number"));
btn_enable_gpio[2]->down_box(FL_DOWN_BOX);
btn_enable_gpio[2]->labelfont(4);
btn_enable_gpio[2]->callback((Fl_Callback*)cb_btn_enable_gpio2);
o->value((progdefaults.enable_gpio >> 2) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[2]
{ Fl_Check_Button* o = btn_enable_gpio[3] = new Fl_Check_Button(255, 167, 125, 15, _("22 03 15"));
btn_enable_gpio[3]->tooltip(_("Select pin number"));
btn_enable_gpio[3]->down_box(FL_DOWN_BOX);
btn_enable_gpio[3]->labelfont(4);
btn_enable_gpio[3]->callback((Fl_Callback*)cb_btn_enable_gpio3);
o->value((progdefaults.enable_gpio >> 3) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[3]
{ Fl_Check_Button* o = btn_enable_gpio[4] = new Fl_Check_Button(255, 197, 125, 15, _("23 04 16"));
btn_enable_gpio[4]->tooltip(_("Select pin number"));
btn_enable_gpio[4]->down_box(FL_DOWN_BOX);
btn_enable_gpio[4]->labelfont(4);
btn_enable_gpio[4]->callback((Fl_Callback*)cb_btn_enable_gpio4);
o->value((progdefaults.enable_gpio >> 4) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[4]
{ Fl_Check_Button* o = btn_enable_gpio[5] = new Fl_Check_Button(255, 227, 125, 15, _("24 05 18"));
btn_enable_gpio[5]->tooltip(_("Select pin number"));
btn_enable_gpio[5]->down_box(FL_DOWN_BOX);
btn_enable_gpio[5]->labelfont(4);
btn_enable_gpio[5]->callback((Fl_Callback*)cb_btn_enable_gpio5);
o->value((progdefaults.enable_gpio >> 5) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[5]
{ Fl_Check_Button* o = btn_enable_gpio[6] = new Fl_Check_Button(255, 257, 125, 15, _("25 06 22"));
btn_enable_gpio[6]->tooltip(_("Select pin number"));
btn_enable_gpio[6]->down_box(FL_DOWN_BOX);
btn_enable_gpio[6]->labelfont(4);
btn_enable_gpio[6]->callback((Fl_Callback*)cb_btn_enable_gpio6);
o->value((progdefaults.enable_gpio >> 6) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[6]
{ Fl_Check_Button* o = btn_enable_gpio[7] = new Fl_Check_Button(255, 287, 125, 15, _(" 4 07 7"));
btn_enable_gpio[7]->tooltip(_("Select pin number"));
btn_enable_gpio[7]->down_box(FL_DOWN_BOX);
btn_enable_gpio[7]->labelfont(4);
btn_enable_gpio[7]->callback((Fl_Callback*)cb_btn_enable_gpio7);
o->value((progdefaults.enable_gpio >> 7) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[7]
{ Fl_Check_Button* o = btn_enable_gpio[8] = new Fl_Check_Button(515, 78, 125, 15, _(" 5 21 29"));
btn_enable_gpio[8]->tooltip(_("Select pin number"));
btn_enable_gpio[8]->down_box(FL_DOWN_BOX);
btn_enable_gpio[8]->labelfont(4);
btn_enable_gpio[8]->callback((Fl_Callback*)cb_btn_enable_gpio8);
o->value((progdefaults.enable_gpio >> 8) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[8]
{ Fl_Check_Button* o = btn_enable_gpio[9] = new Fl_Check_Button(515, 107, 125, 15, _(" 6 22 31"));
btn_enable_gpio[9]->tooltip(_("Select pin number"));
btn_enable_gpio[9]->down_box(FL_DOWN_BOX);
btn_enable_gpio[9]->labelfont(4);
btn_enable_gpio[9]->callback((Fl_Callback*)cb_btn_enable_gpio9);
o->value((progdefaults.enable_gpio >> 9) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[9]
{ Fl_Check_Button* o = btn_enable_gpio[10] = new Fl_Check_Button(515, 137, 125, 15, _("13 23 33"));
btn_enable_gpio[10]->tooltip(_("Select pin number"));
btn_enable_gpio[10]->down_box(FL_DOWN_BOX);
btn_enable_gpio[10]->labelfont(4);
btn_enable_gpio[10]->callback((Fl_Callback*)cb_btn_enable_gpioa);
o->value((progdefaults.enable_gpio >> 10) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[10]
{ Fl_Check_Button* o = btn_enable_gpio[11] = new Fl_Check_Button(515, 167, 125, 15, _("19 24 35"));
btn_enable_gpio[11]->tooltip(_("Select pin number"));
btn_enable_gpio[11]->down_box(FL_DOWN_BOX);
btn_enable_gpio[11]->labelfont(4);
btn_enable_gpio[11]->callback((Fl_Callback*)cb_btn_enable_gpiob);
o->value((progdefaults.enable_gpio >> 11) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[11]
{ Fl_Check_Button* o = btn_enable_gpio[12] = new Fl_Check_Button(515, 197, 125, 15, _("26 25 37"));
btn_enable_gpio[12]->tooltip(_("Select pin number"));
btn_enable_gpio[12]->down_box(FL_DOWN_BOX);
btn_enable_gpio[12]->labelfont(4);
btn_enable_gpio[12]->callback((Fl_Callback*)cb_btn_enable_gpioc);
o->value((progdefaults.enable_gpio >> 12) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[12]
{ Fl_Check_Button* o = btn_enable_gpio[13] = new Fl_Check_Button(515, 227, 125, 15, _("12 26 32"));
btn_enable_gpio[13]->tooltip(_("Select pin number"));
btn_enable_gpio[13]->down_box(FL_DOWN_BOX);
btn_enable_gpio[13]->labelfont(4);
btn_enable_gpio[13]->callback((Fl_Callback*)cb_btn_enable_gpiod);
o->value((progdefaults.enable_gpio >> 13) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[13]
{ Fl_Check_Button* o = btn_enable_gpio[14] = new Fl_Check_Button(515, 257, 125, 15, _("16 27 36"));
btn_enable_gpio[14]->tooltip(_("Select pin number"));
btn_enable_gpio[14]->down_box(FL_DOWN_BOX);
btn_enable_gpio[14]->labelfont(4);
btn_enable_gpio[14]->callback((Fl_Callback*)cb_btn_enable_gpioe);
o->value((progdefaults.enable_gpio >> 14) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[14]
{ Fl_Check_Button* o = btn_enable_gpio[15] = new Fl_Check_Button(515, 287, 125, 15, _("20 28 38"));
btn_enable_gpio[15]->tooltip(_("Select pin number"));
btn_enable_gpio[15]->down_box(FL_DOWN_BOX);
btn_enable_gpio[15]->labelfont(4);
btn_enable_gpio[15]->callback((Fl_Callback*)cb_btn_enable_gpiof);
o->value((progdefaults.enable_gpio >> 15) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[15]
{ Fl_Check_Button* o = btn_enable_gpio[16] = new Fl_Check_Button(515, 317, 125, 15, _("21 29 40"));
btn_enable_gpio[16]->tooltip(_("Select pin number"));
btn_enable_gpio[16]->down_box(FL_DOWN_BOX);
btn_enable_gpio[16]->labelfont(4);
btn_enable_gpio[16]->callback((Fl_Callback*)cb_btn_enable_gpio10);
o->value((progdefaults.enable_gpio >> 16) & 0x01);
} // Fl_Check_Button* btn_enable_gpio[16]
{ Fl_Check_Button* o = btn_gpio_on[0] = new Fl_Check_Button(395, 77, 84, 15, _("= 1 (on)"));
btn_gpio_on[0]->tooltip(_("Select PTT on state"));
btn_gpio_on[0]->down_box(FL_DOWN_BOX);
btn_gpio_on[0]->labelfont(4);
btn_gpio_on[0]->callback((Fl_Callback*)cb_btn_gpio_on);
o->value((progdefaults.gpio_on) & 0x01);
} // Fl_Check_Button* btn_gpio_on[0]
{ Fl_Check_Button* o = btn_gpio_on[1] = new Fl_Check_Button(395, 107, 84, 15, _("= 1 (on)"));
btn_gpio_on[1]->tooltip(_("Select PTT on state"));
btn_gpio_on[1]->down_box(FL_DOWN_BOX);
btn_gpio_on[1]->labelfont(4);
btn_gpio_on[1]->callback((Fl_Callback*)cb_btn_gpio_on1);
o->value((progdefaults.gpio_on >> 1) & 0x01);
} // Fl_Check_Button* btn_gpio_on[1]
{ Fl_Check_Button* o = btn_gpio_on[2] = new Fl_Check_Button(395, 137, 84, 15, _("= 1 (on)"));
btn_gpio_on[2]->tooltip(_("Select PTT on state"));
btn_gpio_on[2]->down_box(FL_DOWN_BOX);
btn_gpio_on[2]->labelfont(4);
btn_gpio_on[2]->callback((Fl_Callback*)cb_btn_gpio_on2);
o->value((progdefaults.gpio_on >> 2) & 0x01);
} // Fl_Check_Button* btn_gpio_on[2]
{ Fl_Check_Button* o = btn_gpio_on[3] = new Fl_Check_Button(395, 167, 84, 15, _("= 1 (on)"));
btn_gpio_on[3]->tooltip(_("Select PTT on state"));
btn_gpio_on[3]->down_box(FL_DOWN_BOX);
btn_gpio_on[3]->labelfont(4);
btn_gpio_on[3]->callback((Fl_Callback*)cb_btn_gpio_on3);
o->value((progdefaults.gpio_on >> 3) & 0x01);
} // Fl_Check_Button* btn_gpio_on[3]
{ Fl_Check_Button* o = btn_gpio_on[4] = new Fl_Check_Button(395, 197, 84, 15, _("= 1 (on)"));
btn_gpio_on[4]->tooltip(_("Select PTT on state"));
btn_gpio_on[4]->down_box(FL_DOWN_BOX);
btn_gpio_on[4]->labelfont(4);
btn_gpio_on[4]->callback((Fl_Callback*)cb_btn_gpio_on4);
o->value((progdefaults.gpio_on >> 4) & 0x01);
} // Fl_Check_Button* btn_gpio_on[4]
{ Fl_Check_Button* o = btn_gpio_on[5] = new Fl_Check_Button(395, 227, 84, 15, _("= 1 (on)"));
btn_gpio_on[5]->tooltip(_("Select PTT on state"));
btn_gpio_on[5]->down_box(FL_DOWN_BOX);
btn_gpio_on[5]->labelfont(4);
btn_gpio_on[5]->callback((Fl_Callback*)cb_btn_gpio_on5);
o->value((progdefaults.gpio_on >> 5) & 0x01);
} // Fl_Check_Button* btn_gpio_on[5]
{ Fl_Check_Button* o = btn_gpio_on[6] = new Fl_Check_Button(395, 257, 84, 15, _("= 1 (on)"));
btn_gpio_on[6]->tooltip(_("Select PTT on state"));
btn_gpio_on[6]->down_box(FL_DOWN_BOX);
btn_gpio_on[6]->labelfont(4);
btn_gpio_on[6]->callback((Fl_Callback*)cb_btn_gpio_on6);
o->value((progdefaults.gpio_on >> 6) & 0x01);
} // Fl_Check_Button* btn_gpio_on[6]
{ Fl_Check_Button* o = btn_gpio_on[7] = new Fl_Check_Button(395, 287, 84, 15, _("= 1 (on)"));
btn_gpio_on[7]->tooltip(_("Select PTT on state"));
btn_gpio_on[7]->down_box(FL_DOWN_BOX);
btn_gpio_on[7]->labelfont(4);
btn_gpio_on[7]->callback((Fl_Callback*)cb_btn_gpio_on7);
o->value((progdefaults.gpio_on >> 7) & 0x01);
} // Fl_Check_Button* btn_gpio_on[7]
{ Fl_Check_Button* o = btn_gpio_on[8] = new Fl_Check_Button(655, 78, 84, 15, _("= 1 (on)"));
btn_gpio_on[8]->tooltip(_("Select PTT on state"));
btn_gpio_on[8]->down_box(FL_DOWN_BOX);
btn_gpio_on[8]->labelfont(4);
btn_gpio_on[8]->callback((Fl_Callback*)cb_btn_gpio_on8);
o->value((progdefaults.gpio_on >> 8) & 0x01);
} // Fl_Check_Button* btn_gpio_on[8]
{ Fl_Check_Button* o = btn_gpio_on[9] = new Fl_Check_Button(655, 107, 84, 15, _("= 1 (on)"));
btn_gpio_on[9]->tooltip(_("Select PTT on state"));
btn_gpio_on[9]->down_box(FL_DOWN_BOX);
btn_gpio_on[9]->labelfont(4);
btn_gpio_on[9]->callback((Fl_Callback*)cb_btn_gpio_on9);
o->value((progdefaults.gpio_on >> 9) & 0x01);
} // Fl_Check_Button* btn_gpio_on[9]
{ Fl_Check_Button* o = btn_gpio_on[10] = new Fl_Check_Button(655, 137, 84, 15, _("= 1 (on)"));
btn_gpio_on[10]->tooltip(_("Select PTT on state"));
btn_gpio_on[10]->down_box(FL_DOWN_BOX);
btn_gpio_on[10]->labelfont(4);
btn_gpio_on[10]->callback((Fl_Callback*)cb_btn_gpio_ona);
o->value((progdefaults.gpio_on >> 10) & 0x01);
} // Fl_Check_Button* btn_gpio_on[10]
{ Fl_Check_Button* o = btn_gpio_on[11] = new Fl_Check_Button(655, 167, 84, 15, _("= 1 (on)"));
btn_gpio_on[11]->tooltip(_("Select PTT on state"));
btn_gpio_on[11]->down_box(FL_DOWN_BOX);
btn_gpio_on[11]->labelfont(4);
btn_gpio_on[11]->callback((Fl_Callback*)cb_btn_gpio_onb);
o->value((progdefaults.gpio_on >> 11) & 0x01);
} // Fl_Check_Button* btn_gpio_on[11]
{ Fl_Check_Button* o = btn_gpio_on[12] = new Fl_Check_Button(655, 197, 84, 15, _("= 1 (on)"));
btn_gpio_on[12]->tooltip(_("Select PTT on state"));
btn_gpio_on[12]->down_box(FL_DOWN_BOX);
btn_gpio_on[12]->labelfont(4);
btn_gpio_on[12]->callback((Fl_Callback*)cb_btn_gpio_onc);
o->value((progdefaults.gpio_on >> 12) & 0x01);
} // Fl_Check_Button* btn_gpio_on[12]
{ Fl_Check_Button* o = btn_gpio_on[13] = new Fl_Check_Button(655, 227, 84, 15, _("= 1 (on)"));
btn_gpio_on[13]->tooltip(_("Select PTT on state"));
btn_gpio_on[13]->down_box(FL_DOWN_BOX);
btn_gpio_on[13]->labelfont(4);
btn_gpio_on[13]->callback((Fl_Callback*)cb_btn_gpio_ond);
o->value((progdefaults.gpio_on >> 13) & 0x01);
} // Fl_Check_Button* btn_gpio_on[13]
{ Fl_Check_Button* o = btn_gpio_on[14] = new Fl_Check_Button(655, 257, 84, 15, _("= 1 (on)"));
btn_gpio_on[14]->tooltip(_("Select PTT on state"));
btn_gpio_on[14]->down_box(FL_DOWN_BOX);
btn_gpio_on[14]->labelfont(4);
btn_gpio_on[14]->callback((Fl_Callback*)cb_btn_gpio_one);
o->value((progdefaults.gpio_on >> 14) & 0x01);
} // Fl_Check_Button* btn_gpio_on[14]
{ Fl_Check_Button* o = btn_gpio_on[15] = new Fl_Check_Button(655, 287, 84, 15, _("= 1 (on)"));
btn_gpio_on[15]->tooltip(_("Select PTT on state"));
btn_gpio_on[15]->down_box(FL_DOWN_BOX);
btn_gpio_on[15]->labelfont(4);
btn_gpio_on[15]->callback((Fl_Callback*)cb_btn_gpio_onf);
o->value((progdefaults.gpio_on >> 15) & 0x01);
} // Fl_Check_Button* btn_gpio_on[15]
{ Fl_Check_Button* o = btn_gpio_on[16] = new Fl_Check_Button(655, 317, 84, 15, _("= 1 (on)"));
btn_gpio_on[16]->tooltip(_("Select PTT on state"));
btn_gpio_on[16]->down_box(FL_DOWN_BOX);
btn_gpio_on[16]->labelfont(4);
btn_gpio_on[16]->callback((Fl_Callback*)cb_btn_gpio_on10);
o->value((progdefaults.gpio_on >> 16) & 0x01);
} // Fl_Check_Button* btn_gpio_on[16]
{ Fl_Box* o = new Fl_Box(525, 53, 194, 17, _("BCM GPIO pin Value"));
o->labelfont(4);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Counter* o = cnt_gpio_pulse_width = new Fl_Counter(255, 314, 80, 21, _("Pulse width (msec)"));
cnt_gpio_pulse_width->tooltip(_("Set >0 if pulsed PTT used"));
cnt_gpio_pulse_width->type(1);
cnt_gpio_pulse_width->minimum(0);
cnt_gpio_pulse_width->maximum(50);
cnt_gpio_pulse_width->step(1);
cnt_gpio_pulse_width->callback((Fl_Callback*)cb_cnt_gpio_pulse_width);
cnt_gpio_pulse_width->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.gpio_pulse_width);
} // Fl_Counter* cnt_gpio_pulse_width
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Rig Control/GPIO"));
config_pages.push_back(p);
tab_tree->add(_("Rig Control/GPIO"));
grpRigGPIO->end();
} // Fl_Group* grpRigGPIO
{ Fl_Group* o = grpRigHamlib = new Fl_Group(200, 0, 600, 350, _("Rig Control/Hamlib"));
grpRigHamlib->box(FL_ENGRAVED_BOX);
grpRigHamlib->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
grpRigHamlib->hide();
{ chkUSEHAMLIB = new Fl_Check_Button(451, 21, 100, 20, _("Use Hamlib"));
chkUSEHAMLIB->tooltip(_("Hamlib used for rig control"));
chkUSEHAMLIB->down_box(FL_DOWN_BOX);
chkUSEHAMLIB->callback((Fl_Callback*)cb_chkUSEHAMLIB);
} // Fl_Check_Button* chkUSEHAMLIB
{ grpHamlib = new Fl_Group(206, 51, 585, 293);
grpHamlib->box(FL_ENGRAVED_FRAME);
{ Fl_ListBox* o = cboHamlibRig = new Fl_ListBox(242, 61, 250, 22, _("Rig:"));
cboHamlibRig->box(FL_DOWN_BOX);
cboHamlibRig->color(FL_BACKGROUND2_COLOR);
cboHamlibRig->selection_color(FL_BACKGROUND_COLOR);
cboHamlibRig->labeltype(FL_NORMAL_LABEL);
cboHamlibRig->labelfont(0);
cboHamlibRig->labelsize(14);
cboHamlibRig->labelcolor(FL_FOREGROUND_COLOR);
cboHamlibRig->callback((Fl_Callback*)cb_cboHamlibRig);
cboHamlibRig->align(Fl_Align(FL_ALIGN_LEFT));
cboHamlibRig->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
cboHamlibRig->end();
} // Fl_ListBox* cboHamlibRig
{ Fl_ComboBox* o = inpRIGdev = new Fl_ComboBox(556, 61, 220, 22, _("Device:"));
inpRIGdev->box(FL_DOWN_BOX);
inpRIGdev->color(FL_BACKGROUND2_COLOR);
inpRIGdev->selection_color(FL_BACKGROUND_COLOR);
inpRIGdev->labeltype(FL_NORMAL_LABEL);
inpRIGdev->labelfont(0);
inpRIGdev->labelsize(14);
inpRIGdev->labelcolor(FL_FOREGROUND_COLOR);
inpRIGdev->callback((Fl_Callback*)cb_inpRIGdev);
inpRIGdev->align(Fl_Align(FL_ALIGN_LEFT));
inpRIGdev->when(FL_WHEN_RELEASE);
o->value(progdefaults.HamRigDevice.c_str());
o->labelsize(FL_NORMAL_SIZE);
inpRIGdev->end();
} // Fl_ComboBox* inpRIGdev
{ Fl_Value_Input2* o = cntHamlibRetries = new Fl_Value_Input2(241, 101, 70, 24, _("Retries"));
cntHamlibRetries->tooltip(_("# times to resend command before giving up"));
cntHamlibRetries->box(FL_DOWN_BOX);
cntHamlibRetries->color(FL_BACKGROUND2_COLOR);
cntHamlibRetries->selection_color(FL_SELECTION_COLOR);
cntHamlibRetries->labeltype(FL_NORMAL_LABEL);
cntHamlibRetries->labelfont(0);
cntHamlibRetries->labelsize(14);
cntHamlibRetries->labelcolor(FL_FOREGROUND_COLOR);
cntHamlibRetries->maximum(1000);
cntHamlibRetries->step(1);
cntHamlibRetries->callback((Fl_Callback*)cb_cntHamlibRetries);
cntHamlibRetries->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntHamlibRetries->when(FL_WHEN_CHANGED);
o->value(progdefaults.HamlibRetries);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* cntHamlibRetries
{ Fl_Value_Input2* o = cntHamlibTimeout = new Fl_Value_Input2(381, 101, 70, 24, _("Timeout (msec)"));
cntHamlibTimeout->tooltip(_("Hamlib read timeout"));
cntHamlibTimeout->box(FL_DOWN_BOX);
cntHamlibTimeout->color(FL_BACKGROUND2_COLOR);
cntHamlibTimeout->selection_color(FL_SELECTION_COLOR);
cntHamlibTimeout->labeltype(FL_NORMAL_LABEL);
cntHamlibTimeout->labelfont(0);
cntHamlibTimeout->labelsize(14);
cntHamlibTimeout->labelcolor(FL_FOREGROUND_COLOR);
cntHamlibTimeout->maximum(10000);
cntHamlibTimeout->step(1);
cntHamlibTimeout->callback((Fl_Callback*)cb_cntHamlibTimeout);
cntHamlibTimeout->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntHamlibTimeout->when(FL_WHEN_CHANGED);
o->value(progdefaults.HamlibTimeout);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* cntHamlibTimeout
{ Fl_Value_Input2* o = cntHamlibWriteDelay = new Fl_Value_Input2(241, 144, 70, 24, _("Write delay (msec)"));
cntHamlibWriteDelay->tooltip(_("Msec\'s between sequential commands"));
cntHamlibWriteDelay->box(FL_DOWN_BOX);
cntHamlibWriteDelay->color(FL_BACKGROUND2_COLOR);
cntHamlibWriteDelay->selection_color(FL_SELECTION_COLOR);
cntHamlibWriteDelay->labeltype(FL_NORMAL_LABEL);
cntHamlibWriteDelay->labelfont(0);
cntHamlibWriteDelay->labelsize(14);
cntHamlibWriteDelay->labelcolor(FL_FOREGROUND_COLOR);
cntHamlibWriteDelay->maximum(10000);
cntHamlibWriteDelay->step(1);
cntHamlibWriteDelay->callback((Fl_Callback*)cb_cntHamlibWriteDelay);
cntHamlibWriteDelay->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntHamlibWriteDelay->when(FL_WHEN_CHANGED);
o->value(progdefaults.HamlibWriteDelay);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* cntHamlibWriteDelay
{ Fl_Value_Input2* o = cntHamlibWait = new Fl_Value_Input2(381, 144, 70, 24, _("Post write delay (msec)"));
cntHamlibWait->tooltip(_("Wait interval (msecs) before reading response"));
cntHamlibWait->box(FL_DOWN_BOX);
cntHamlibWait->color(FL_BACKGROUND2_COLOR);
cntHamlibWait->selection_color(FL_SELECTION_COLOR);
cntHamlibWait->labeltype(FL_NORMAL_LABEL);
cntHamlibWait->labelfont(0);
cntHamlibWait->labelsize(14);
cntHamlibWait->labelcolor(FL_FOREGROUND_COLOR);
cntHamlibWait->maximum(10000);
cntHamlibWait->step(1);
cntHamlibWait->callback((Fl_Callback*)cb_cntHamlibWait);
cntHamlibWait->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntHamlibWait->when(FL_WHEN_CHANGED);
o->value(progdefaults.HamlibWait);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Value_Input2* cntHamlibWait
{ Fl_ListBox* o = listbox_baudrate = new Fl_ListBox(677, 89, 99, 22, _("Baud rate:"));
listbox_baudrate->box(FL_DOWN_BOX);
listbox_baudrate->color(FL_BACKGROUND2_COLOR);
listbox_baudrate->selection_color(FL_BACKGROUND_COLOR);
listbox_baudrate->labeltype(FL_NORMAL_LABEL);
listbox_baudrate->labelfont(0);
listbox_baudrate->labelsize(14);
listbox_baudrate->labelcolor(FL_FOREGROUND_COLOR);
listbox_baudrate->callback((Fl_Callback*)cb_listbox_baudrate);
listbox_baudrate->align(Fl_Align(FL_ALIGN_LEFT));
listbox_baudrate->when(FL_WHEN_RELEASE);
o->add(szBaudRates);
o->index(progdefaults.HamRigBaudrate);
o->labelsize(FL_NORMAL_SIZE);
listbox_baudrate->end();
} // Fl_ListBox* listbox_baudrate
{ Fl_Counter2* o = valHamRigStopbits = new Fl_Counter2(681, 117, 95, 21, _("Stopbits"));
valHamRigStopbits->type(1);
valHamRigStopbits->box(FL_UP_BOX);
valHamRigStopbits->color(FL_BACKGROUND_COLOR);
valHamRigStopbits->selection_color(FL_INACTIVE_COLOR);
valHamRigStopbits->labeltype(FL_NORMAL_LABEL);
valHamRigStopbits->labelfont(0);
valHamRigStopbits->labelsize(14);
valHamRigStopbits->labelcolor(FL_FOREGROUND_COLOR);
valHamRigStopbits->minimum(1);
valHamRigStopbits->maximum(2);
valHamRigStopbits->step(1);
valHamRigStopbits->value(1);
valHamRigStopbits->callback((Fl_Callback*)cb_valHamRigStopbits);
valHamRigStopbits->align(Fl_Align(FL_ALIGN_LEFT));
valHamRigStopbits->when(FL_WHEN_CHANGED);
o->value(progdefaults.HamRigStopbits);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* valHamRigStopbits
{ Fl_Counter2* o = valHamRigPollrate = new Fl_Counter2(681, 145, 95, 21, _("Polling Interval (msec)"));
valHamRigPollrate->type(1);
valHamRigPollrate->box(FL_UP_BOX);
valHamRigPollrate->color(FL_BACKGROUND_COLOR);
valHamRigPollrate->selection_color(FL_INACTIVE_COLOR);
valHamRigPollrate->labeltype(FL_NORMAL_LABEL);
valHamRigPollrate->labelfont(0);
valHamRigPollrate->labelsize(14);
valHamRigPollrate->labelcolor(FL_FOREGROUND_COLOR);
valHamRigPollrate->minimum(100);
valHamRigPollrate->maximum(2000);
valHamRigPollrate->step(50);
valHamRigPollrate->value(100);
valHamRigPollrate->callback((Fl_Callback*)cb_valHamRigPollrate);
valHamRigPollrate->align(Fl_Align(FL_ALIGN_LEFT));
valHamRigPollrate->when(FL_WHEN_CHANGED);
o->value(progdefaults.HamRigPollrate);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* valHamRigPollrate
{ Fl_Check_Button* o = btnHamlibCMDptt = new Fl_Check_Button(256, 192, 215, 20, _("PTT via Hamlib command"));
btnHamlibCMDptt->tooltip(_("PTT using hamlib command"));
btnHamlibCMDptt->down_box(FL_DOWN_BOX);
btnHamlibCMDptt->callback((Fl_Callback*)cb_btnHamlibCMDptt);
o->value(progdefaults.HamlibCMDptt);
} // Fl_Check_Button* btnHamlibCMDptt
{ Fl_Check_Button* o = btnHamlibPTT_ON_DATA = new Fl_Check_Button(256, 217, 215, 20, _("Audio on Auxiliary Port"));
btnHamlibPTT_ON_DATA->tooltip(_("PTT enables auxiliary audio source"));
btnHamlibPTT_ON_DATA->down_box(FL_DOWN_BOX);
btnHamlibPTT_ON_DATA->callback((Fl_Callback*)cb_btnHamlibPTT_ON_DATA);
o->value(progdefaults.hamlib_ptt_on_data);
} // Fl_Check_Button* btnHamlibPTT_ON_DATA
{ Fl_Check_Button* o = btnHamlibDTRplus = new Fl_Check_Button(256, 243, 90, 20, _("DTR +12"));
btnHamlibDTRplus->tooltip(_("Initial state of DTR"));
btnHamlibDTRplus->down_box(FL_DOWN_BOX);
btnHamlibDTRplus->callback((Fl_Callback*)cb_btnHamlibDTRplus);
o->value(progdefaults.HamlibDTRplus);
} // Fl_Check_Button* btnHamlibDTRplus
{ Fl_Check_Button* o = chkHamlibRTSplus = new Fl_Check_Button(446, 243, 85, 20, _("RTS +12"));
chkHamlibRTSplus->tooltip(_("Initial state of RTS"));
chkHamlibRTSplus->down_box(FL_DOWN_BOX);
chkHamlibRTSplus->callback((Fl_Callback*)cb_chkHamlibRTSplus);
o->value(progdefaults.HamlibRTSplus);
} // Fl_Check_Button* chkHamlibRTSplus
{ Fl_Check_Button* o = chkHamlibRTSCTSflow = new Fl_Check_Button(256, 269, 170, 20, _("RTS/CTS flow control"));
chkHamlibRTSCTSflow->tooltip(_("Rig requires RTS/CTS flow control"));
chkHamlibRTSCTSflow->down_box(FL_DOWN_BOX);
chkHamlibRTSCTSflow->callback((Fl_Callback*)cb_chkHamlibRTSCTSflow);
o->value(progdefaults.HamlibRTSCTSflow);
if (o->value()) chkHamlibRTSplus->deactivate();
} // Fl_Check_Button* chkHamlibRTSCTSflow
{ Fl_Check_Button* o = chkHamlibXONXOFFflow = new Fl_Check_Button(446, 269, 185, 20, _("XON/XOFF flow control"));
chkHamlibXONXOFFflow->tooltip(_("Rig requires Xon/Xoff flow control"));
chkHamlibXONXOFFflow->down_box(FL_DOWN_BOX);
chkHamlibXONXOFFflow->callback((Fl_Callback*)cb_chkHamlibXONXOFFflow);
o->value(progdefaults.HamlibXONXOFFflow);
} // Fl_Check_Button* chkHamlibXONXOFFflow
{ Fl_Check_Button* o = chk_hamlib_cw_is_lsb = new Fl_Check_Button(636, 243, 142, 20, _("CW is LSB mode"));
chk_hamlib_cw_is_lsb->tooltip(_("Check if xcvr uses LSB for CW"));
chk_hamlib_cw_is_lsb->down_box(FL_DOWN_BOX);
chk_hamlib_cw_is_lsb->callback((Fl_Callback*)cb_chk_hamlib_cw_is_lsb);
o->value(progdefaults.hamlib_cw_islsb);
} // Fl_Check_Button* chk_hamlib_cw_is_lsb
{ Fl_Check_Button* o = chk_hamlib_rtty_is_usb = new Fl_Check_Button(636, 269, 152, 20, _("RTTY is USB mode"));
chk_hamlib_rtty_is_usb->tooltip(_("Check if xcvr uses USB for RTTY"));
chk_hamlib_rtty_is_usb->down_box(FL_DOWN_BOX);
chk_hamlib_rtty_is_usb->callback((Fl_Callback*)cb_chk_hamlib_rtty_is_usb);
o->value(progdefaults.hamlib_rtty_isusb);
} // Fl_Check_Button* chk_hamlib_rtty_is_usb
{ Fl_Counter2* o = val_hamlib_mode_delay = new Fl_Counter2(681, 191, 95, 21, _("Mode delay (msec)"));
val_hamlib_mode_delay->tooltip(_("Delay NN msec after executing mode change"));
val_hamlib_mode_delay->type(1);
val_hamlib_mode_delay->box(FL_UP_BOX);
val_hamlib_mode_delay->color(FL_BACKGROUND_COLOR);
val_hamlib_mode_delay->selection_color(FL_INACTIVE_COLOR);
val_hamlib_mode_delay->labeltype(FL_NORMAL_LABEL);
val_hamlib_mode_delay->labelfont(0);
val_hamlib_mode_delay->labelsize(14);
val_hamlib_mode_delay->labelcolor(FL_FOREGROUND_COLOR);
val_hamlib_mode_delay->minimum(0);
val_hamlib_mode_delay->maximum(2000);
val_hamlib_mode_delay->step(100);
val_hamlib_mode_delay->value(200);
val_hamlib_mode_delay->callback((Fl_Callback*)cb_val_hamlib_mode_delay);
val_hamlib_mode_delay->align(Fl_Align(FL_ALIGN_LEFT));
val_hamlib_mode_delay->when(FL_WHEN_CHANGED);
o->value(progdefaults.hamlib_mode_delay);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* val_hamlib_mode_delay
{ Fl_ListBox* o = listbox_sideband = new Fl_ListBox(632, 216, 144, 22, _("Sideband:"));
listbox_sideband->box(FL_DOWN_BOX);
listbox_sideband->color(FL_BACKGROUND2_COLOR);
listbox_sideband->selection_color(FL_BACKGROUND_COLOR);
listbox_sideband->labeltype(FL_NORMAL_LABEL);
listbox_sideband->labelfont(0);
listbox_sideband->labelsize(14);
listbox_sideband->labelcolor(FL_FOREGROUND_COLOR);
listbox_sideband->align(Fl_Align(FL_ALIGN_LEFT));
listbox_sideband->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
listbox_sideband->end();
} // Fl_ListBox* listbox_sideband
{ inpHamlibConfig = new Fl_Input2(231, 313, 460, 24, _("Advanced configuration:"));
inpHamlibConfig->tooltip(_("Optional configuration\nin format: param=val ..."));
inpHamlibConfig->box(FL_DOWN_BOX);
inpHamlibConfig->color(FL_BACKGROUND2_COLOR);
inpHamlibConfig->selection_color(FL_SELECTION_COLOR);
inpHamlibConfig->labeltype(FL_NORMAL_LABEL);
inpHamlibConfig->labelfont(0);
inpHamlibConfig->labelsize(14);
inpHamlibConfig->labelcolor(FL_FOREGROUND_COLOR);
inpHamlibConfig->callback((Fl_Callback*)cb_inpHamlibConfig);
inpHamlibConfig->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inpHamlibConfig->when(FL_WHEN_RELEASE);
inpHamlibConfig->value(progdefaults.HamConfig.c_str());
inpHamlibConfig->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpHamlibConfig
{ btnInitHAMLIB = new Fl_Button(696, 313, 80, 24, _("Initialize"));
btnInitHAMLIB->tooltip(_("Initialize hamlib interface"));
btnInitHAMLIB->callback((Fl_Callback*)cb_btnInitHAMLIB);
} // Fl_Button* btnInitHAMLIB
grpHamlib->end();
} // Fl_Group* grpHamlib
{ btn_hamlib_get_defaults = new Fl_Button(696, 19, 80, 24, _("Defaults"));
btn_hamlib_get_defaults->callback((Fl_Callback*)cb_btn_hamlib_get_defaults);
} // Fl_Button* btn_hamlib_get_defaults
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Rig Control/Hamlib"));
config_pages.push_back(p);
tab_tree->add(_("Rig Control/Hamlib"));
grpRigHamlib->end();
} // Fl_Group* grpRigHamlib
{ Fl_Group* o = grpRigHardware = new Fl_Group(200, 0, 600, 350, _("Rig Control/Hardware PTT"));
grpRigHardware->box(FL_ENGRAVED_BOX);
grpRigHardware->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
grpRigHardware->hide();
{ Fl_Group* o = new Fl_Group(209, 27, 580, 38);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btnPTTrightchannel = new Fl_Check_Button(224, 36, 250, 20, _("PTT tone on right audio channel "));
btnPTTrightchannel->tooltip(_("Can be used in lieu of or in addition to other PTT types"));
btnPTTrightchannel->down_box(FL_DOWN_BOX);
btnPTTrightchannel->callback((Fl_Callback*)cb_btnPTTrightchannel);
o->value(progdefaults.PTTrightchannel);
} // Fl_Check_Button* btnPTTrightchannel
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(209, 67, 580, 184, _("h/w ptt device-pin"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ btnTTYptt = new Fl_Round_Button(224, 94, 220, 20, _("Use separate serial port PTT"));
btnTTYptt->down_box(FL_DOWN_BOX);
btnTTYptt->selection_color((Fl_Color)1);
btnTTYptt->callback((Fl_Callback*)cb_btnTTYptt);
} // Fl_Round_Button* btnTTYptt
{ Fl_ComboBox* o = inpTTYdev = new Fl_ComboBox(217, 135, 350, 22, _("Device:"));
inpTTYdev->box(FL_DOWN_BOX);
inpTTYdev->color(FL_BACKGROUND2_COLOR);
inpTTYdev->selection_color(FL_BACKGROUND_COLOR);
inpTTYdev->labeltype(FL_NORMAL_LABEL);
inpTTYdev->labelfont(0);
inpTTYdev->labelsize(14);
inpTTYdev->labelcolor(FL_FOREGROUND_COLOR);
inpTTYdev->callback((Fl_Callback*)cb_inpTTYdev);
inpTTYdev->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inpTTYdev->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
inpTTYdev->end();
} // Fl_ComboBox* inpTTYdev
{ Fl_Round_Button* o = btnSCU_17 = new Fl_Round_Button(459, 94, 236, 20, _("Port is second SCU-17 device"));
btnSCU_17->tooltip(_("Driver requires stop bits to be ZERO!"));
btnSCU_17->down_box(FL_DOWN_BOX);
btnSCU_17->selection_color((Fl_Color)1);
btnSCU_17->callback((Fl_Callback*)cb_btnSCU_17);
o->value(progdefaults.SCU_17);
} // Fl_Round_Button* btnSCU_17
{ btnUsePPortPTT = new Fl_Round_Button(224, 168, 170, 20, _("Use parallel port PTT"));
btnUsePPortPTT->down_box(FL_DOWN_BOX);
btnUsePPortPTT->selection_color((Fl_Color)1);
btnUsePPortPTT->callback((Fl_Callback*)cb_btnUsePPortPTT);
} // Fl_Round_Button* btnUsePPortPTT
{ btnUseUHrouterPTT = new Fl_Round_Button(224, 194, 170, 20, _("Use uHRouter PTT"));
btnUseUHrouterPTT->down_box(FL_DOWN_BOX);
btnUseUHrouterPTT->selection_color((Fl_Color)1);
btnUseUHrouterPTT->callback((Fl_Callback*)cb_btnUseUHrouterPTT);
} // Fl_Round_Button* btnUseUHrouterPTT
{ btnRTSptt = new Fl_Round_Button(579, 123, 85, 20, _("Use RTS"));
btnRTSptt->tooltip(_("RTS is PTT signal line"));
btnRTSptt->down_box(FL_DOWN_BOX);
btnRTSptt->callback((Fl_Callback*)cb_btnRTSptt);
} // Fl_Round_Button* btnRTSptt
{ btnRTSplusV = new Fl_Round_Button(670, 123, 100, 20, _("RTS = +V"));
btnRTSplusV->tooltip(_("Initial voltage on RTS"));
btnRTSplusV->down_box(FL_DOWN_BOX);
btnRTSplusV->callback((Fl_Callback*)cb_btnRTSplusV);
} // Fl_Round_Button* btnRTSplusV
{ btnDTRptt = new Fl_Round_Button(579, 155, 85, 20, _("Use DTR"));
btnDTRptt->tooltip(_("DTR is PTT signal line"));
btnDTRptt->down_box(FL_DOWN_BOX);
btnDTRptt->callback((Fl_Callback*)cb_btnDTRptt);
} // Fl_Round_Button* btnDTRptt
{ btnDTRplusV = new Fl_Round_Button(670, 155, 100, 20, _("DTR = +V"));
btnDTRplusV->tooltip(_("Initial voltage on DTR"));
btnDTRplusV->down_box(FL_DOWN_BOX);
btnDTRplusV->callback((Fl_Callback*)cb_btnDTRplusV);
} // Fl_Round_Button* btnDTRplusV
{ Fl_Check_Button* o = btn_gpio_ptt = new Fl_Check_Button(224, 221, 278, 15, _("GPIO PTT (Pi specific controls)"));
btn_gpio_ptt->tooltip(_("Select PTT on state"));
btn_gpio_ptt->down_box(FL_DOWN_BOX);
btn_gpio_ptt->labelfont(4);
btn_gpio_ptt->callback((Fl_Callback*)cb_btn_gpio_ptt);
o->value(progdefaults.gpio_ptt);
} // Fl_Check_Button* btn_gpio_ptt
{ btnInitHWPTT = new Fl_Button(649, 212, 113, 24, _("Initialize"));
btnInitHWPTT->tooltip(_("Initialize the H/W PTT interface"));
btnInitHWPTT->callback((Fl_Callback*)cb_btnInitHWPTT);
} // Fl_Button* btnInitHWPTT
o->end();
} // Fl_Group* o
{ grpPTTdelays = new Fl_Group(210, 252, 580, 91, _("PTT delays valid for all CAT/PTT types"));
grpPTTdelays->box(FL_ENGRAVED_FRAME);
grpPTTdelays->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter* o = cntPTT_on_delay = new Fl_Counter(274, 279, 100, 21, _("Start of transmit PTT delay"));
cntPTT_on_delay->tooltip(_("Delay NN msec before starting audio"));
cntPTT_on_delay->minimum(0);
cntPTT_on_delay->maximum(5000);
cntPTT_on_delay->step(10);
cntPTT_on_delay->callback((Fl_Callback*)cb_cntPTT_on_delay);
cntPTT_on_delay->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.PTT_on_delay);
o->lstep(100);
} // Fl_Counter* cntPTT_on_delay
{ Fl_Counter* o = cntPTT_off_delay = new Fl_Counter(274, 309, 100, 21, _("PTT end of transmit delay"));
cntPTT_off_delay->tooltip(_("Delay NN msec before releasing PTT"));
cntPTT_off_delay->minimum(0);
cntPTT_off_delay->maximum(5000);
cntPTT_off_delay->step(10);
cntPTT_off_delay->callback((Fl_Callback*)cb_cntPTT_off_delay);
cntPTT_off_delay->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.PTT_off_delay);
o->lstep(100);
} // Fl_Counter* cntPTT_off_delay
grpPTTdelays->end();
} // Fl_Group* grpPTTdelays
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Rig Control/Hardware PTT"));
config_pages.push_back(p);
tab_tree->add(_("Rig Control/Hardware PTT"));
tab_tree->close(_("Rig Control"));
grpRigHardware->end();
} // Fl_Group* grpRigHardware
{ Fl_Group* o = grp_cmedia_ptt = new Fl_Group(200, 0, 600, 350, _("C-Media PTT"));
grp_cmedia_ptt->box(FL_ENGRAVED_BOX);
grp_cmedia_ptt->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
grp_cmedia_ptt->hide();
{ Fl_Group* o = new Fl_Group(205, 30, 590, 173, _("C-Media audio codecs used in DRA Series have 8 user controllable GPIO pins. G\
PIO signal line 3 (pin 13) is used for PTT control.\n\nFldigi accesses the GPI\
O lines as a Human Interface Device (HID). Discovered C-Media devices are enu\
merated in the \'C-Media device\' list box.\n\nOn Linux: add a file named cmed\
ia.rules to /etc/udev/rules.d/\nThe file should contain a single line\n\nKERNE\
L==\"hidraw*\", SUBSYSTEM==\"hidraw\", MODE=\"0664\", GROUP=\"plugdev\""));
o->align(Fl_Align(132|FL_ALIGN_INSIDE));
o->end();
} // Fl_Group* o
{ btn_use_cmedia_PTT = new Fl_Round_Button(235, 218, 220, 20, _("Use C-Media PTT"));
btn_use_cmedia_PTT->down_box(FL_DOWN_BOX);
btn_use_cmedia_PTT->selection_color((Fl_Color)1);
btn_use_cmedia_PTT->callback((Fl_Callback*)cb_btn_use_cmedia_PTT);
} // Fl_Round_Button* btn_use_cmedia_PTT
{ Fl_ComboBox* o = inp_cmedia_dev = new Fl_ComboBox(235, 261, 350, 22, _("C-Media device"));
inp_cmedia_dev->box(FL_DOWN_BOX);
inp_cmedia_dev->color(FL_BACKGROUND2_COLOR);
inp_cmedia_dev->selection_color(FL_BACKGROUND_COLOR);
inp_cmedia_dev->labeltype(FL_NORMAL_LABEL);
inp_cmedia_dev->labelfont(0);
inp_cmedia_dev->labelsize(14);
inp_cmedia_dev->labelcolor(FL_FOREGROUND_COLOR);
inp_cmedia_dev->callback((Fl_Callback*)cb_inp_cmedia_dev);
inp_cmedia_dev->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inp_cmedia_dev->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.cmedia_device.c_str());
inp_cmedia_dev->end();
} // Fl_ComboBox* inp_cmedia_dev
{ Fl_ComboBox* o = inp_cmedia_GPIO_line = new Fl_ComboBox(235, 304, 114, 22, _("GPIO line"));
inp_cmedia_GPIO_line->box(FL_DOWN_BOX);
inp_cmedia_GPIO_line->color(FL_BACKGROUND2_COLOR);
inp_cmedia_GPIO_line->selection_color(FL_BACKGROUND_COLOR);
inp_cmedia_GPIO_line->labeltype(FL_NORMAL_LABEL);
inp_cmedia_GPIO_line->labelfont(0);
inp_cmedia_GPIO_line->labelsize(14);
inp_cmedia_GPIO_line->labelcolor(FL_FOREGROUND_COLOR);
inp_cmedia_GPIO_line->callback((Fl_Callback*)cb_inp_cmedia_GPIO_line);
inp_cmedia_GPIO_line->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inp_cmedia_GPIO_line->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
o->value(progdefaults.cmedia_gpio_line);
o->add("GPIO-1|GPIO-2|GPIO-3|GPIO-4");
inp_cmedia_GPIO_line->end();
} // Fl_ComboBox* inp_cmedia_GPIO_line
{ btn_init_cmedia_PTT = new Fl_Button(600, 261, 70, 22, _("Select"));
btn_init_cmedia_PTT->tooltip(_("Select device & Initialize the H/W PTT interface"));
btn_init_cmedia_PTT->callback((Fl_Callback*)cb_btn_init_cmedia_PTT);
} // Fl_Button* btn_init_cmedia_PTT
{ btn_test_cmedia = new Fl_Button(695, 261, 70, 22, _("TEST"));
btn_test_cmedia->tooltip(_("Toggles PTT line 20x; check DRA-30 ptt LED"));
btn_test_cmedia->callback((Fl_Callback*)cb_btn_test_cmedia);
} // Fl_Button* btn_test_cmedia
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("C-Media PTT"));
config_pages.push_back(p);
tab_tree->add(_("Rig Control/C-Media PTT"));
tab_tree->close(_("Rig Control"));
grp_cmedia_ptt->end();
} // Fl_Group* grp_cmedia_ptt
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Soundcard/Alerts"));
o->box(FL_ENGRAVED_BOX);
o->color(FL_LIGHT1);
o->selection_color(FL_LIGHT1);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(203, 18, 590, 64);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_File_Input* o = inp_wav_fname_regex = new Fl_File_Input(208, 41, 304, 35, _("REGEX detected wav"));
inp_wav_fname_regex->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value(progdefaults.BWSR_REGEX_MATCH.c_str());
} // Fl_File_Input* inp_wav_fname_regex
{ btn_select_regex_wav = new Fl_Button(514, 52, 60, 24, _("Select"));
btn_select_regex_wav->callback((Fl_Callback*)cb_btn_select_regex_wav);
} // Fl_Button* btn_select_regex_wav
{ Fl_Choice* o = mnu_regex_alert_menu = new Fl_Choice(578, 52, 135, 24, _("Sound:"));
mnu_regex_alert_menu->box(FL_DOWN_BOX);
mnu_regex_alert_menu->down_box(FL_BORDER_BOX);
mnu_regex_alert_menu->color((Fl_Color)53);
mnu_regex_alert_menu->callback((Fl_Callback*)cb_mnu_regex_alert_menu);
mnu_regex_alert_menu->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->add("wav file|bark|checkout|diesel|steam_train|doesnot|beeboo|phone|dinner_bell|rtty_bell|standard_tone");
o->value(progdefaults.REGEX_ALERT_MENU);
} // Fl_Choice* mnu_regex_alert_menu
{ Fl_Check_Button* o = btn_enable_regex_match_wa = new Fl_Check_Button(718, 31, 70, 15, _("Enable"));
btn_enable_regex_match_wa->down_box(FL_DOWN_BOX);
btn_enable_regex_match_wa->callback((Fl_Callback*)cb_btn_enable_regex_match_wa);
o->value(progdefaults.ENABLE_BWSR_REGEX_MATCH);
} // Fl_Check_Button* btn_enable_regex_match_wa
{ btn_test_regex_wav = new Fl_Button(718, 52, 60, 24, _("Test"));
btn_test_regex_wav->callback((Fl_Callback*)cb_btn_test_regex_wav);
} // Fl_Button* btn_test_regex_wav
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(203, 81, 590, 64);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_File_Input* o = inp_wav_fname_mycall = new Fl_File_Input(208, 103, 304, 35, _("MYCALL detected wav"));
inp_wav_fname_mycall->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value(progdefaults.BWSR_MYCALL_MATCH.c_str());
} // Fl_File_Input* inp_wav_fname_mycall
{ btn_select_mycall_wav = new Fl_Button(514, 114, 60, 24, _("Select"));
btn_select_mycall_wav->callback((Fl_Callback*)cb_btn_select_mycall_wav);
} // Fl_Button* btn_select_mycall_wav
{ Fl_Choice* o = mnu_mycall_alert_menu = new Fl_Choice(578, 114, 135, 24, _("Sound:"));
mnu_mycall_alert_menu->box(FL_DOWN_BOX);
mnu_mycall_alert_menu->down_box(FL_BORDER_BOX);
mnu_mycall_alert_menu->color((Fl_Color)53);
mnu_mycall_alert_menu->callback((Fl_Callback*)cb_mnu_mycall_alert_menu);
mnu_mycall_alert_menu->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->add("wav file|bark|checkout|diesel|steam_train|doesnot|beeboo|phone|dinner_bell|rtty_bell|standard_tone");
o->value(progdefaults.MYCALL_ALERT_MENU);
} // Fl_Choice* mnu_mycall_alert_menu
{ Fl_Check_Button* o = btn_enable_mycall_match_wav = new Fl_Check_Button(718, 92, 70, 15, _("Enable"));
btn_enable_mycall_match_wav->down_box(FL_DOWN_BOX);
btn_enable_mycall_match_wav->callback((Fl_Callback*)cb_btn_enable_mycall_match_wav);
o->value(progdefaults.ENABLE_BWSR_MYCALL_MATCH);
} // Fl_Check_Button* btn_enable_mycall_match_wav
{ btn_test_mycall_wav = new Fl_Button(718, 114, 60, 24, _("Test"));
btn_test_mycall_wav->callback((Fl_Callback*)cb_btn_test_mycall_wav);
} // Fl_Button* btn_test_mycall_wav
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(203, 144, 590, 64);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_File_Input* o = inp_wav_fname_rsid = new Fl_File_Input(208, 166, 304, 35, _("RsID audio alert wav"));
inp_wav_fname_rsid->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value(progdefaults.RSID_MATCH.c_str());
} // Fl_File_Input* inp_wav_fname_rsid
{ btn_select_rsid_wav = new Fl_Button(514, 177, 60, 24, _("Select"));
btn_select_rsid_wav->callback((Fl_Callback*)cb_btn_select_rsid_wav);
} // Fl_Button* btn_select_rsid_wav
{ Fl_Choice* o = mnu_rsid_alert_menu = new Fl_Choice(578, 177, 135, 24, _("Sound:"));
mnu_rsid_alert_menu->box(FL_DOWN_BOX);
mnu_rsid_alert_menu->down_box(FL_BORDER_BOX);
mnu_rsid_alert_menu->color((Fl_Color)53);
mnu_rsid_alert_menu->callback((Fl_Callback*)cb_mnu_rsid_alert_menu);
mnu_rsid_alert_menu->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->add("wav file|bark|checkout|diesel|steam_train|doesnot|beeboo|phone|dinner_bell|rtty_bell|standard_tone");
o->value(progdefaults.RSID_ALERT_MENU);
} // Fl_Choice* mnu_rsid_alert_menu
{ Fl_Check_Button* o = btn_enable_rsid_match_wav = new Fl_Check_Button(718, 156, 70, 15, _("Enable"));
btn_enable_rsid_match_wav->down_box(FL_DOWN_BOX);
btn_enable_rsid_match_wav->callback((Fl_Callback*)cb_btn_enable_rsid_match_wav);
o->value(progdefaults.ENABLE_RSID_MATCH);
} // Fl_Check_Button* btn_enable_rsid_match_wav
{ btn_test_rsid_wav = new Fl_Button(718, 177, 60, 24, _("Test"));
btn_test_rsid_wav->callback((Fl_Callback*)cb_btn_test_rsid_wav);
} // Fl_Button* btn_test_rsid_wav
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(203, 207, 590, 114);
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_File_Input* o = inp_wav_flmsg_rcvd = new Fl_File_Input(208, 227, 304, 35, _("flmsg received wav"));
inp_wav_flmsg_rcvd->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value(progdefaults.RX_EXTRACT_MSG_RCVD.c_str());
} // Fl_File_Input* inp_wav_flmsg_rcvd
{ btn_select_rx_extract_msg = new Fl_Button(514, 238, 60, 24, _("Select"));
btn_select_rx_extract_msg->callback((Fl_Callback*)cb_btn_select_rx_extract_msg);
} // Fl_Button* btn_select_rx_extract_msg
{ Fl_Choice* o = mnu_rx_extract_alert_menu = new Fl_Choice(578, 238, 135, 24, _("Sound:"));
mnu_rx_extract_alert_menu->box(FL_DOWN_BOX);
mnu_rx_extract_alert_menu->down_box(FL_BORDER_BOX);
mnu_rx_extract_alert_menu->color((Fl_Color)53);
mnu_rx_extract_alert_menu->callback((Fl_Callback*)cb_mnu_rx_extract_alert_menu);
mnu_rx_extract_alert_menu->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->add("wav file|bark|checkout|diesel|steam_train|doesnot|beeboo|phone|dinner_bell|rtty_bell|standard_tone");
o->value(progdefaults.RX_EXTRACT_ALERT_MENU);
} // Fl_Choice* mnu_rx_extract_alert_menu
{ Fl_Check_Button* o = btn_enable_flmsg_wav = new Fl_Check_Button(718, 216, 70, 15, _("Enable"));
btn_enable_flmsg_wav->down_box(FL_DOWN_BOX);
btn_enable_flmsg_wav->callback((Fl_Callback*)cb_btn_enable_flmsg_wav);
o->value(progdefaults.ENABLE_RX_EXTRACT_MSG_RCVD);
} // Fl_Check_Button* btn_enable_flmsg_wav
{ btn_test_flmsg_extract_wav = new Fl_Button(718, 238, 60, 24, _("Test"));
btn_test_flmsg_extract_wav->callback((Fl_Callback*)cb_btn_test_flmsg_extract_wav);
} // Fl_Button* btn_test_flmsg_extract_wav
{ Fl_File_Input* o = inp_wav_flmsg_timed_out = new Fl_File_Input(208, 282, 304, 35, _("flmsg timed out wav"));
inp_wav_flmsg_timed_out->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->value(progdefaults.RX_EXTRACT_TIMED_OUT.c_str());
} // Fl_File_Input* inp_wav_flmsg_timed_out
{ btn_select_rx_extract_timed_out = new Fl_Button(514, 293, 60, 24, _("Select"));
btn_select_rx_extract_timed_out->callback((Fl_Callback*)cb_btn_select_rx_extract_timed_out);
} // Fl_Button* btn_select_rx_extract_timed_out
{ Fl_Choice* o = mnu_rx_timed_out_alert_menu = new Fl_Choice(578, 293, 135, 24, _("Sound:"));
mnu_rx_timed_out_alert_menu->box(FL_DOWN_BOX);
mnu_rx_timed_out_alert_menu->down_box(FL_BORDER_BOX);
mnu_rx_timed_out_alert_menu->color((Fl_Color)53);
mnu_rx_timed_out_alert_menu->callback((Fl_Callback*)cb_mnu_rx_timed_out_alert_menu);
mnu_rx_timed_out_alert_menu->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->add("wav file|bark|checkout|diesel|steam_train|doesnot|beeboo|phone|dinner_bell|rtty_bell|standard_tone");
o->value(progdefaults.TIMED_OUT_ALERT_MENU);
} // Fl_Choice* mnu_rx_timed_out_alert_menu
{ btn_test_rx_extract_timed_out = new Fl_Button(718, 293, 60, 24, _("Test"));
btn_test_rx_extract_timed_out->callback((Fl_Callback*)cb_btn_test_rx_extract_timed_out);
} // Fl_Button* btn_test_rx_extract_timed_out
{ Fl_Check_Button* o = btn_enable_flmsg_time_out_wav = new Fl_Check_Button(718, 271, 70, 15, _("Enable"));
btn_enable_flmsg_time_out_wav->down_box(FL_DOWN_BOX);
btn_enable_flmsg_time_out_wav->callback((Fl_Callback*)cb_btn_enable_flmsg_time_out_wav);
o->value(progdefaults.ENABLE_RX_EXTRACT_TIMED_OUT);
} // Fl_Check_Button* btn_enable_flmsg_time_out_wav
o->end();
} // Fl_Group* o
{ Fl_Value_Slider2* o = sldrAlertVolume = new Fl_Value_Slider2(256, 325, 403, 20, _("Alert volume"));
sldrAlertVolume->type(1);
sldrAlertVolume->box(FL_DOWN_BOX);
sldrAlertVolume->color(FL_BACKGROUND_COLOR);
sldrAlertVolume->selection_color(FL_BACKGROUND_COLOR);
sldrAlertVolume->labeltype(FL_NORMAL_LABEL);
sldrAlertVolume->labelfont(0);
sldrAlertVolume->labelsize(14);
sldrAlertVolume->labelcolor(FL_FOREGROUND_COLOR);
sldrAlertVolume->maximum(100);
sldrAlertVolume->step(1);
sldrAlertVolume->value(20);
sldrAlertVolume->textsize(14);
sldrAlertVolume->callback((Fl_Callback*)cb_sldrAlertVolume);
sldrAlertVolume->align(Fl_Align(FL_ALIGN_RIGHT));
sldrAlertVolume->when(FL_WHEN_CHANGED);
o->value(progdefaults.alert_volume);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* sldrAlertVolume
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Soundcard/Alerts"));
config_pages.push_back(p);
tab_tree->add(_("Soundcard/Alerts"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = grpSoundDevices = new Fl_Group(200, -4, 600, 350, _("Soundcard/Devices"));
grpSoundDevices->box(FL_ENGRAVED_BOX);
grpSoundDevices->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
grpSoundDevices->hide();
{ AudioOSS = new Fl_Group(255, 20, 500, 45);
AudioOSS->box(FL_ENGRAVED_FRAME);
{ btnAudioIO[0] = new Fl_Round_Button(267, 30, 53, 25, _("OSS"));
btnAudioIO[0]->tooltip(_("Use OSS audio server"));
btnAudioIO[0]->down_box(FL_DOWN_BOX);
btnAudioIO[0]->selection_color((Fl_Color)1);
btnAudioIO[0]->callback((Fl_Callback*)cb_btnAudioIO);
} // Fl_Round_Button* btnAudioIO[0]
{ Fl_Input_Choice* o = menuOSSDev = new Fl_Input_Choice(572, 30, 165, 25, _("Device:"));
menuOSSDev->tooltip(_("Select device"));
menuOSSDev->callback((Fl_Callback*)cb_menuOSSDev);
o->value(progdefaults.OSSdevice.c_str());
} // Fl_Input_Choice* menuOSSDev
AudioOSS->end();
} // Fl_Group* AudioOSS
{ AudioPort = new Fl_Group(255, 65, 500, 79);
AudioPort->box(FL_ENGRAVED_FRAME);
{ btnAudioIO[1] = new Fl_Round_Button(267, 93, 95, 25, _("PortAudio"));
btnAudioIO[1]->tooltip(_("Use Port Audio server"));
btnAudioIO[1]->down_box(FL_DOWN_BOX);
btnAudioIO[1]->selection_color((Fl_Color)1);
btnAudioIO[1]->callback((Fl_Callback*)cb_btnAudioIO1);
} // Fl_Round_Button* btnAudioIO[1]
{ menuPortInDev = new Fl_Choice(427, 76, 310, 25, _("Capture:"));
menuPortInDev->tooltip(_("Audio input device"));
menuPortInDev->down_box(FL_BORDER_BOX);
menuPortInDev->callback((Fl_Callback*)cb_menuPortInDev);
} // Fl_Choice* menuPortInDev
{ menuPortOutDev = new Fl_Choice(427, 111, 310, 25, _("Playback:"));
menuPortOutDev->tooltip(_("Audio output device"));
menuPortOutDev->down_box(FL_BORDER_BOX);
menuPortOutDev->callback((Fl_Callback*)cb_menuPortOutDev);
} // Fl_Choice* menuPortOutDev
AudioPort->end();
} // Fl_Group* AudioPort
{ AudioPulse = new Fl_Group(255, 145, 500, 45);
AudioPulse->box(FL_ENGRAVED_FRAME);
{ btnAudioIO[2] = new Fl_Round_Button(267, 156, 100, 25, _("PulseAudio"));
btnAudioIO[2]->tooltip(_("Use Pulse Audio server"));
btnAudioIO[2]->down_box(FL_DOWN_BOX);
btnAudioIO[2]->selection_color((Fl_Color)1);
btnAudioIO[2]->callback((Fl_Callback*)cb_btnAudioIO2);
} // Fl_Round_Button* btnAudioIO[2]
{ Fl_Input2* o = inpPulseServer = new Fl_Input2(512, 156, 225, 24, _("Server string:"));
inpPulseServer->tooltip(_("Leave this blank or refer to\nhttp://www.pulseaudio.org/wiki/ServerStrings"));
inpPulseServer->box(FL_DOWN_BOX);
inpPulseServer->color(FL_BACKGROUND2_COLOR);
inpPulseServer->selection_color(FL_SELECTION_COLOR);
inpPulseServer->labeltype(FL_NORMAL_LABEL);
inpPulseServer->labelfont(0);
inpPulseServer->labelsize(14);
inpPulseServer->labelcolor(FL_FOREGROUND_COLOR);
inpPulseServer->callback((Fl_Callback*)cb_inpPulseServer);
inpPulseServer->align(Fl_Align(FL_ALIGN_LEFT));
inpPulseServer->when(FL_WHEN_RELEASE);
o->value(progdefaults.PulseServer.c_str());
inpPulseServer->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpPulseServer
AudioPulse->end();
} // Fl_Group* AudioPulse
{ AudioNull = new Fl_Group(255, 190, 135, 45);
AudioNull->box(FL_ENGRAVED_FRAME);
{ btnAudioIO[3] = new Fl_Round_Button(268, 200, 100, 25, _("File I/O only"));
btnAudioIO[3]->tooltip(_("NO AUDIO DEVICE AVAILABLE (or testing)"));
btnAudioIO[3]->down_box(FL_DOWN_BOX);
btnAudioIO[3]->selection_color((Fl_Color)1);
btnAudioIO[3]->callback((Fl_Callback*)cb_btnAudioIO3);
} // Fl_Round_Button* btnAudioIO[3]
AudioNull->end();
} // Fl_Group* AudioNull
{ AudioDuplex = new Fl_Group(390, 190, 365, 45);
AudioDuplex->box(FL_ENGRAVED_FRAME);
{ Fl_Round_Button* o = btn_is_full_duplex = new Fl_Round_Button(433, 200, 225, 25, _("Device supports full duplex"));
btn_is_full_duplex->tooltip(_("Capture/Playback supports full duplex operation"));
btn_is_full_duplex->down_box(FL_DOWN_BOX);
btn_is_full_duplex->value(1);
btn_is_full_duplex->selection_color((Fl_Color)1);
btn_is_full_duplex->callback((Fl_Callback*)cb_btn_is_full_duplex);
o->value(progdefaults.is_full_duplex);
} // Fl_Round_Button* btn_is_full_duplex
AudioDuplex->end();
} // Fl_Group* AudioDuplex
{ AudioAlerts = new Fl_Group(255, 235, 500, 90);
AudioAlerts->box(FL_ENGRAVED_FRAME);
AudioAlerts->align(Fl_Align(FL_ALIGN_CENTER));
{ menuAlertsDev = new Fl_Choice(265, 260, 365, 25, _("Audio device shared by Audio Alerts and Rx Monitor"));
menuAlertsDev->tooltip(_("Audio output device"));
menuAlertsDev->down_box(FL_BORDER_BOX);
menuAlertsDev->callback((Fl_Callback*)cb_menuAlertsDev);
menuAlertsDev->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Choice* menuAlertsDev
{ Fl_Round_Button* o = btn_enable_audio_alerts = new Fl_Round_Button(657, 260, 76, 25, _("Enable"));
btn_enable_audio_alerts->tooltip(_("First select audio alert playback device"));
btn_enable_audio_alerts->down_box(FL_DOWN_BOX);
btn_enable_audio_alerts->selection_color((Fl_Color)1);
btn_enable_audio_alerts->callback((Fl_Callback*)cb_btn_enable_audio_alerts);
o->value(progdefaults.enable_audio_alerts);
} // Fl_Round_Button* btn_enable_audio_alerts
{ Fl_Box* o = new Fl_Box(265, 295, 473, 22, _("Note: must be selected and enabled for Rx Audio monitoring!"));
o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Box* o
AudioAlerts->end();
} // Fl_Group* AudioAlerts
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Soundcard/Devices"));
config_pages.push_back(p);
tab_tree->add(_("Soundcard/Devices"));
grpSoundDevices->end();
} // Fl_Group* grpSoundDevices
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Soundcard/Right channel"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(236, 33, 550, 246, _("Transmit Usage"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ chkAudioStereoOut = new Fl_Check_Button(376, 54, 280, 20, _("Modem signal on left and right channels"));
chkAudioStereoOut->tooltip(_("Left and right channels both contain modem audio"));
chkAudioStereoOut->down_box(FL_DOWN_BOX);
chkAudioStereoOut->callback((Fl_Callback*)cb_chkAudioStereoOut);
chkAudioStereoOut->value(progdefaults.sig_on_right_channel);
} // Fl_Check_Button* chkAudioStereoOut
{ Fl_Check_Button* o = chkReverseAudio = new Fl_Check_Button(376, 84, 270, 20, _("Reverse Left/Right channels"));
chkReverseAudio->tooltip(_("Software reversal of left-right audio channels"));
chkReverseAudio->down_box(FL_DOWN_BOX);
chkReverseAudio->callback((Fl_Callback*)cb_chkReverseAudio);
o->value(progdefaults.ReverseAudio);
} // Fl_Check_Button* chkReverseAudio
{ Fl_Group* o = new Fl_Group(286, 107, 454, 162, _("...\nThese controls are on other tabs.\nThey are replicated here for convenie\
nce.\nYou may change the state from either location.\n..."));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnPTTrightchannel2 = new Fl_Check_Button(376, 114, 250, 20, _("PTT tone on right audio channel "));
btnPTTrightchannel2->tooltip(_("1000 Hz tone when PTT enabled\nCan be used in lieu of or in addition to other\
PTT types"));
btnPTTrightchannel2->down_box(FL_DOWN_BOX);
btnPTTrightchannel2->callback((Fl_Callback*)cb_btnPTTrightchannel2);
o->value(progdefaults.PTTrightchannel);
} // Fl_Check_Button* btnPTTrightchannel2
{ Fl_Check_Button* o = btnQSK2 = new Fl_Check_Button(376, 144, 211, 20, _("CW QSK signal on right channel"));
btnQSK2->tooltip(_("Generate 1000 Hz square wave signal on right channel"));
btnQSK2->down_box(FL_DOWN_BOX);
btnQSK2->callback((Fl_Callback*)cb_btnQSK2);
o->value(progdefaults.QSK);
} // Fl_Check_Button* btnQSK2
{ Fl_Check_Button* o = chkPseudoFSK2 = new Fl_Check_Button(376, 175, 270, 20, _("Pseudo-FSK on right audio channel"));
chkPseudoFSK2->tooltip(_("Create 1000 Hz square wave on right channel"));
chkPseudoFSK2->down_box(FL_DOWN_BOX);
chkPseudoFSK2->callback((Fl_Callback*)cb_chkPseudoFSK2);
o->value(progdefaults.PseudoFSK);
} // Fl_Check_Button* chkPseudoFSK2
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(236, 282, 550, 60, _("Receive Usage"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chkReverseRxAudio = new Fl_Check_Button(376, 300, 270, 20, _("Reverse Left/Right channels"));
chkReverseRxAudio->tooltip(_("Software reversal of left-right audio channels"));
chkReverseRxAudio->down_box(FL_DOWN_BOX);
chkReverseRxAudio->callback((Fl_Callback*)cb_chkReverseRxAudio);
o->value(progdefaults.ReverseRxAudio);
} // Fl_Check_Button* chkReverseRxAudio
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Soundcard/Right channel"));
config_pages.push_back(p);
tab_tree->add(_("Soundcard/Right channel"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Soundcard/Settings"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ grpAudioSampleRate = new Fl_Group(260, 48, 490, 90, _("Sample rate"));
grpAudioSampleRate->box(FL_ENGRAVED_FRAME);
grpAudioSampleRate->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_ListBox* o = menuInSampleRate = new Fl_ListBox(284, 77, 100, 22, _("Capture"));
menuInSampleRate->tooltip(_("Force a specific sample rate. Select \"Native\" if \"Auto\"\ndoes not work we\
ll with your audio device."));
menuInSampleRate->box(FL_DOWN_BOX);
menuInSampleRate->color(FL_BACKGROUND2_COLOR);
menuInSampleRate->selection_color(FL_BACKGROUND_COLOR);
menuInSampleRate->labeltype(FL_NORMAL_LABEL);
menuInSampleRate->labelfont(0);
menuInSampleRate->labelsize(14);
menuInSampleRate->labelcolor(FL_FOREGROUND_COLOR);
menuInSampleRate->callback((Fl_Callback*)cb_menuInSampleRate);
menuInSampleRate->align(Fl_Align(FL_ALIGN_RIGHT));
menuInSampleRate->when(FL_WHEN_RELEASE);
o->clear_changed();
o->labelsize(FL_NORMAL_SIZE);
menuInSampleRate->end();
} // Fl_ListBox* menuInSampleRate
{ Fl_ListBox* o = menuOutSampleRate = new Fl_ListBox(284, 107, 100, 22, _("Playback"));
menuOutSampleRate->box(FL_DOWN_BOX);
menuOutSampleRate->color(FL_BACKGROUND2_COLOR);
menuOutSampleRate->selection_color(FL_BACKGROUND_COLOR);
menuOutSampleRate->labeltype(FL_NORMAL_LABEL);
menuOutSampleRate->labelfont(0);
menuOutSampleRate->labelsize(14);
menuOutSampleRate->labelcolor(FL_FOREGROUND_COLOR);
menuOutSampleRate->callback((Fl_Callback*)cb_menuOutSampleRate);
menuOutSampleRate->align(Fl_Align(FL_ALIGN_RIGHT));
menuOutSampleRate->when(FL_WHEN_RELEASE);
o->clear_changed();
o->tooltip(menuInSampleRate->tooltip());
o->labelsize(FL_NORMAL_SIZE);
menuOutSampleRate->end();
} // Fl_ListBox* menuOutSampleRate
{ Fl_ListBox* o = menuSampleConverter = new Fl_ListBox(524, 77, 216, 22, _("Converter"));
menuSampleConverter->tooltip(_("Set the type of resampler used of offset correction"));
menuSampleConverter->box(FL_DOWN_BOX);
menuSampleConverter->color(FL_BACKGROUND2_COLOR);
menuSampleConverter->selection_color(FL_BACKGROUND_COLOR);
menuSampleConverter->labeltype(FL_NORMAL_LABEL);
menuSampleConverter->labelfont(0);
menuSampleConverter->labelsize(14);
menuSampleConverter->labelcolor(FL_FOREGROUND_COLOR);
menuSampleConverter->callback((Fl_Callback*)cb_menuSampleConverter);
menuSampleConverter->align(Fl_Align(FL_ALIGN_TOP_LEFT));
menuSampleConverter->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
menuSampleConverter->end();
} // Fl_ListBox* menuSampleConverter
grpAudioSampleRate->end();
} // Fl_Group* grpAudioSampleRate
{ Fl_Group* o = new Fl_Group(260, 138, 490, 62, _("Corrections"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Spinner2* o = cntRxRateCorr = new Fl_Spinner2(284, 165, 85, 20, _("RX ppm"));
cntRxRateCorr->tooltip(_("RX sound card correction"));
cntRxRateCorr->box(FL_NO_BOX);
cntRxRateCorr->color(FL_BACKGROUND_COLOR);
cntRxRateCorr->selection_color(FL_BACKGROUND_COLOR);
cntRxRateCorr->labeltype(FL_NORMAL_LABEL);
cntRxRateCorr->labelfont(0);
cntRxRateCorr->labelsize(14);
cntRxRateCorr->labelcolor(FL_FOREGROUND_COLOR);
cntRxRateCorr->callback((Fl_Callback*)cb_cntRxRateCorr);
cntRxRateCorr->align(Fl_Align(FL_ALIGN_RIGHT));
cntRxRateCorr->when(FL_WHEN_RELEASE);
o->step(1);
o->minimum(-50000);
o->maximum(50000);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntRxRateCorr
{ Fl_Spinner2* o = cntTxRateCorr = new Fl_Spinner2(431, 165, 85, 20, _("TX ppm"));
cntTxRateCorr->tooltip(_("TX sound card correction"));
cntTxRateCorr->box(FL_NO_BOX);
cntTxRateCorr->color(FL_BACKGROUND_COLOR);
cntTxRateCorr->selection_color(FL_BACKGROUND_COLOR);
cntTxRateCorr->labeltype(FL_NORMAL_LABEL);
cntTxRateCorr->labelfont(0);
cntTxRateCorr->labelsize(14);
cntTxRateCorr->labelcolor(FL_FOREGROUND_COLOR);
cntTxRateCorr->callback((Fl_Callback*)cb_cntTxRateCorr);
cntTxRateCorr->align(Fl_Align(FL_ALIGN_RIGHT));
cntTxRateCorr->when(FL_WHEN_RELEASE);
o->step(1);
o->minimum(-50000);
o->maximum(50000);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntTxRateCorr
{ Fl_Spinner2* o = cntTxOffset = new Fl_Spinner2(591, 165, 85, 20, _("TX offset"));
cntTxOffset->tooltip(_("Difference between Rx & Tx freq (rig offset)"));
cntTxOffset->box(FL_NO_BOX);
cntTxOffset->color(FL_BACKGROUND_COLOR);
cntTxOffset->selection_color(FL_BACKGROUND_COLOR);
cntTxOffset->labeltype(FL_NORMAL_LABEL);
cntTxOffset->labelfont(0);
cntTxOffset->labelsize(14);
cntTxOffset->labelcolor(FL_FOREGROUND_COLOR);
cntTxOffset->callback((Fl_Callback*)cb_cntTxOffset);
cntTxOffset->align(Fl_Align(FL_ALIGN_RIGHT));
cntTxOffset->when(FL_WHEN_RELEASE);
o->value(progdefaults.TxOffset);
o->step(1);
o->minimum(-50); o->maximum(50);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntTxOffset
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(260, 200, 490, 76, _("Frequency Analysis / FMT Rx Correction"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ bnt_dec_rit = new Fl_Button(285, 227, 18, 24, _("@|<"));
bnt_dec_rit->labelsize(10);
bnt_dec_rit->callback((Fl_Callback*)cb_bnt_dec_rit);
bnt_dec_rit->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Button* bnt_dec_rit
{ Fl_Counter* o = cntRIT = new Fl_Counter(303, 227, 130, 24, _("Frequency Correction"));
cntRIT->tooltip(_("Used ONLY for frequency analysis mode"));
cntRIT->minimum(-5);
cntRIT->maximum(5);
cntRIT->step(0.001);
cntRIT->callback((Fl_Callback*)cb_cntRIT);
o->value(progdefaults.RIT);
o->lstep(0.01);
} // Fl_Counter* cntRIT
{ btn_incr_rit = new Fl_Button(433, 227, 18, 24, _("@>|"));
btn_incr_rit->labelsize(10);
btn_incr_rit->callback((Fl_Callback*)cb_btn_incr_rit);
btn_incr_rit->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Button* btn_incr_rit
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Soundcard/Settings"));
config_pages.push_back(p);
tab_tree->add(_("Soundcard/Settings"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Signal Level"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ new Fl_Box(340, 39, 316, 21, _("Signal Levels"));
} // Fl_Box* o
{ Fl_Box* o = lowcolor2 = new Fl_Box(365, 96, 21, 21);
lowcolor2->box(FL_DIAMOND_DOWN_BOX);
lowcolor2->color(FL_FOREGROUND_COLOR);
o->color(progdefaults.LowSignal);
} // Fl_Box* lowcolor2
{ btnLowSignal2 = new Fl_Button(402, 96, 70, 21, _("Low"));
btnLowSignal2->callback((Fl_Callback*)cb_btnLowSignal2);
} // Fl_Button* btnLowSignal2
{ Fl_Box* o = normalcolor2 = new Fl_Box(365, 142, 21, 21);
normalcolor2->box(FL_DIAMOND_DOWN_BOX);
normalcolor2->color((Fl_Color)2);
o->color(progdefaults.NormSignal);
} // Fl_Box* normalcolor2
{ Fl_Counter* o = cnt_normal_signal_level2 = new Fl_Counter(480, 119, 114, 21, _("Transition\nLevel (dB)"));
cnt_normal_signal_level2->minimum(-90);
cnt_normal_signal_level2->maximum(0);
cnt_normal_signal_level2->callback((Fl_Callback*)cb_cnt_normal_signal_level2);
cnt_normal_signal_level2->align(Fl_Align(FL_ALIGN_TOP));
cnt_normal_signal_level2->hide();
o->value(progdefaults.normal_signal_level);
o->lstep(1.0);
} // Fl_Counter* cnt_normal_signal_level2
{ btnNormalSignal2 = new Fl_Button(402, 142, 70, 21, _("Normal"));
btnNormalSignal2->callback((Fl_Callback*)cb_btnNormalSignal2);
} // Fl_Button* btnNormalSignal2
{ Fl_Box* o = highcolor2 = new Fl_Box(365, 189, 21, 21);
highcolor2->box(FL_DIAMOND_DOWN_BOX);
highcolor2->color((Fl_Color)3);
o->color(progdefaults.HighSignal);
} // Fl_Box* highcolor2
{ Fl_Counter* o = cnt_high_signal_level2 = new Fl_Counter(480, 165, 114, 21);
cnt_high_signal_level2->minimum(-90);
cnt_high_signal_level2->maximum(0);
cnt_high_signal_level2->callback((Fl_Callback*)cb_cnt_high_signal_level2);
o->value(progdefaults.high_signal_level);
o->lstep(1.0);
} // Fl_Counter* cnt_high_signal_level2
{ btnHighSignal2 = new Fl_Button(402, 189, 70, 21, _("High"));
btnHighSignal2->callback((Fl_Callback*)cb_btnHighSignal2);
} // Fl_Button* btnHighSignal2
{ Fl_Box* o = overcolor2 = new Fl_Box(365, 236, 21, 21);
overcolor2->box(FL_DIAMOND_DOWN_BOX);
overcolor2->color((Fl_Color)1);
o->color(progdefaults.OverSignal);
} // Fl_Box* overcolor2
{ Fl_Counter* o = cnt_over_signal_level2 = new Fl_Counter(480, 212, 114, 21);
cnt_over_signal_level2->minimum(-90);
cnt_over_signal_level2->maximum(0);
cnt_over_signal_level2->callback((Fl_Callback*)cb_cnt_over_signal_level2);
o->value(progdefaults.over_signal_level);
o->lstep(1.0);
} // Fl_Counter* cnt_over_signal_level2
{ btnOverSignal2 = new Fl_Button(402, 236, 70, 21, _("Over"));
btnOverSignal2->callback((Fl_Callback*)cb_btnOverSignal2);
} // Fl_Button* btnOverSignal2
{ Fl_Progress* o = new Fl_Progress(295, 289, 416, 25, _("label"));
o->hide();
} // Fl_Progress* o
{ sig_vumeter2 = new vumeter(322, 280, 360, 24, _("label"));
sig_vumeter2->box(FL_DOWN_BOX);
sig_vumeter2->color(FL_BACKGROUND2_COLOR);
sig_vumeter2->selection_color(FL_YELLOW);
sig_vumeter2->labeltype(FL_NORMAL_LABEL);
sig_vumeter2->labelfont(0);
sig_vumeter2->labelsize(14);
sig_vumeter2->labelcolor(FL_FOREGROUND_COLOR);
sig_vumeter2->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
sig_vumeter2->when(FL_WHEN_RELEASE);
} // vumeter* sig_vumeter2
{ new Fl_Box(383, 307, 237, 17, _("Input signal level"));
} // Fl_Box* o
{ btn_default_signal_levels2 = new Fl_Button(618, 166, 70, 20, _("Default"));
btn_default_signal_levels2->callback((Fl_Callback*)cb_btn_default_signal_levels2);
} // Fl_Button* btn_default_signal_levels2
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Soundcard/Signal Level"));
config_pages.push_back(p);
tab_tree->add(_("Soundcard/Signal Level"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Soundcard/Wav file recording"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_ListBox* o = listbox_wav_samplerate = new Fl_ListBox(399, 91, 150, 24, _("Wav write sample rate"));
listbox_wav_samplerate->tooltip(_("Pick baud rate from list"));
listbox_wav_samplerate->box(FL_DOWN_BOX);
listbox_wav_samplerate->color(FL_BACKGROUND2_COLOR);
listbox_wav_samplerate->selection_color(FL_BACKGROUND_COLOR);
listbox_wav_samplerate->labeltype(FL_NORMAL_LABEL);
listbox_wav_samplerate->labelfont(0);
listbox_wav_samplerate->labelsize(14);
listbox_wav_samplerate->labelcolor(FL_FOREGROUND_COLOR);
listbox_wav_samplerate->callback((Fl_Callback*)cb_listbox_wav_samplerate);
listbox_wav_samplerate->align(Fl_Align(FL_ALIGN_TOP_LEFT));
listbox_wav_samplerate->when(FL_WHEN_RELEASE);
o->add("8000|11025|16000|22050|24000|44100|48000");
o->index(progdefaults.wavSampleRate);
o->labelsize(FL_NORMAL_SIZE);
listbox_wav_samplerate->end();
} // Fl_ListBox* listbox_wav_samplerate
{ Fl_Check_Button* o = btn_record_both = new Fl_Check_Button(399, 140, 176, 15, _("Record both channels"));
btn_record_both->down_box(FL_DOWN_BOX);
btn_record_both->callback((Fl_Callback*)cb_btn_record_both);
o->value(progdefaults.record_both_channels);
} // Fl_Check_Button* btn_record_both
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Soundcard/Wav file recording"));
config_pages.push_back(p);
tab_tree->add(_("Soundcard/Wav file recording"));
tab_tree->close(_("Soundcard"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("UI/Browser/Channels"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Spinner2* o = cntChannels = new Fl_Spinner2(278, 54, 50, 24, _("Channels, first channel starts at waterfall lower limit"));
cntChannels->tooltip(_("Change # of psk viewer channels"));
cntChannels->box(FL_NO_BOX);
cntChannels->color(FL_BACKGROUND_COLOR);
cntChannels->selection_color(FL_BACKGROUND_COLOR);
cntChannels->labeltype(FL_NORMAL_LABEL);
cntChannels->labelfont(0);
cntChannels->labelsize(14);
cntChannels->labelcolor(FL_FOREGROUND_COLOR);
cntChannels->maximum(30);
cntChannels->value(30);
cntChannels->callback((Fl_Callback*)cb_cntChannels);
cntChannels->align(Fl_Align(FL_ALIGN_RIGHT));
cntChannels->when(FL_WHEN_RELEASE);
o->minimum(5); o->maximum(30); o->step(1);
o->value(progdefaults.VIEWERchannels);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntChannels
{ Fl_Spinner2* o = cntTimeout = new Fl_Spinner2(278, 90, 50, 24, _("Inactivity timeout"));
cntTimeout->tooltip(_("Clear channel text after\n# seconds of inactivity"));
cntTimeout->box(FL_NO_BOX);
cntTimeout->color(FL_BACKGROUND_COLOR);
cntTimeout->selection_color(FL_BACKGROUND_COLOR);
cntTimeout->labeltype(FL_NORMAL_LABEL);
cntTimeout->labelfont(0);
cntTimeout->labelsize(14);
cntTimeout->labelcolor(FL_FOREGROUND_COLOR);
cntTimeout->value(10);
cntTimeout->callback((Fl_Callback*)cb_cntTimeout);
cntTimeout->align(Fl_Align(FL_ALIGN_RIGHT));
cntTimeout->when(FL_WHEN_RELEASE);
o->minimum(1); o->maximum(180); o->step(1);
o->value(progdefaults.VIEWERtimeout);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntTimeout
{ Fl_ListBox* o = listboxViewerLabel = new Fl_ListBox(278, 130, 150, 24, _("Channel label"));
listboxViewerLabel->tooltip(_("Appearance of label on each channel"));
listboxViewerLabel->box(FL_DOWN_BOX);
listboxViewerLabel->color(FL_BACKGROUND2_COLOR);
listboxViewerLabel->selection_color(FL_BACKGROUND_COLOR);
listboxViewerLabel->labeltype(FL_NORMAL_LABEL);
listboxViewerLabel->labelfont(0);
listboxViewerLabel->labelsize(14);
listboxViewerLabel->labelcolor(FL_FOREGROUND_COLOR);
listboxViewerLabel->callback((Fl_Callback*)cb_listboxViewerLabel);
listboxViewerLabel->align(Fl_Align(FL_ALIGN_RIGHT));
listboxViewerLabel->when(FL_WHEN_RELEASE);
listboxViewerLabel->add(_("None")); listboxViewerLabel->add(_("Audio frequency"));
listboxViewerLabel->add(_("Radio frequency")); listboxViewerLabel->add(_("Channel number"));
listboxViewerLabel->index(progdefaults.VIEWERlabeltype);
o->labelsize(FL_NORMAL_SIZE);
listboxViewerLabel->end();
} // Fl_ListBox* listboxViewerLabel
{ btnViewerFont = new Fl_Button(563, 130, 70, 24, _("Font..."));
btnViewerFont->tooltip(_("select browser font"));
btnViewerFont->callback((Fl_Callback*)cb_btnViewerFont);
} // Fl_Button* btnViewerFont
{ Fl_Check_Button* o = btnFixedIntervals = new Fl_Check_Button(468, 92, 165, 20, _("Fixed Intervals"));
btnFixedIntervals->tooltip(_("Force channel spacing to even 100 Hz increments"));
btnFixedIntervals->down_box(FL_DOWN_BOX);
btnFixedIntervals->value(1);
btnFixedIntervals->callback((Fl_Callback*)cb_btnFixedIntervals);
o->value(progdefaults.VIEWERfixed);
} // Fl_Check_Button* btnFixedIntervals
{ Fl_Check_Button* o = btnMarquee = new Fl_Check_Button(278, 168, 165, 20, _("Continuous scrolling"));
btnMarquee->tooltip(_("ON - Marquee style\nOFF - Clear & restart"));
btnMarquee->down_box(FL_DOWN_BOX);
btnMarquee->callback((Fl_Callback*)cb_btnMarquee);
o->value(progdefaults.VIEWERmarquee);
} // Fl_Check_Button* btnMarquee
{ Fl_Check_Button* o = btnAscend = new Fl_Check_Button(278, 192, 253, 20, _("Lowest freq on bottom of viewer"));
btnAscend->tooltip(_("Change positions of low to high channels"));
btnAscend->down_box(FL_DOWN_BOX);
btnAscend->callback((Fl_Callback*)cb_btnAscend);
o->value(progdefaults.VIEWERascend);
} // Fl_Check_Button* btnAscend
{ Fl_Check_Button* o = btnBrowserHistory = new Fl_Check_Button(278, 217, 356, 20, _("Play back history when active channel selected"));
btnBrowserHistory->tooltip(_("Audio stream history decoded on selected signal"));
btnBrowserHistory->down_box(FL_DOWN_BOX);
btnBrowserHistory->callback((Fl_Callback*)cb_btnBrowserHistory);
o->value(progdefaults.VIEWERhistory);
} // Fl_Check_Button* btnBrowserHistory
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("UI/Browser/Channels"));
config_pages.push_back(p);
tab_tree->add(_("UI/Browser/Channels"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("UI/Browser/Colors"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ bwsrHiLite_1_color = new Fl_Button(259, 113, 62, 22, _("HiLite 1"));
bwsrHiLite_1_color->tooltip(_("PSK/RTTY Viewer HiLite Color 1"));
bwsrHiLite_1_color->callback((Fl_Callback*)cb_bwsrHiLite_1_color);
bwsrHiLite_1_color->align(Fl_Align(FL_ALIGN_TOP));
bwsrHiLite_1_color->color((Fl_Color)progdefaults.bwsrHiLight1);
} // Fl_Button* bwsrHiLite_1_color
{ bwsrHiLite_2_color = new Fl_Button(361, 113, 62, 22, _("HiLite 2"));
bwsrHiLite_2_color->tooltip(_("PSK/RTTY Viewer HiLite Color 2"));
bwsrHiLite_2_color->callback((Fl_Callback*)cb_bwsrHiLite_2_color);
bwsrHiLite_2_color->align(Fl_Align(FL_ALIGN_TOP));
bwsrHiLite_2_color->color((Fl_Color)progdefaults.bwsrHiLight2);
} // Fl_Button* bwsrHiLite_2_color
{ bwsrHiLite_even_lines = new Fl_Button(464, 113, 62, 22, _("Even"));
bwsrHiLite_even_lines->tooltip(_("Even lines"));
bwsrHiLite_even_lines->callback((Fl_Callback*)cb_bwsrHiLite_even_lines);
bwsrHiLite_even_lines->align(Fl_Align(FL_ALIGN_TOP));
bwsrHiLite_even_lines->color((Fl_Color)progdefaults.bwsrBackgnd2);
} // Fl_Button* bwsrHiLite_even_lines
{ bwsrHiLite_odd_lines = new Fl_Button(567, 113, 62, 22, _("Odd"));
bwsrHiLite_odd_lines->tooltip(_("Odd lines"));
bwsrHiLite_odd_lines->callback((Fl_Callback*)cb_bwsrHiLite_odd_lines);
bwsrHiLite_odd_lines->align(Fl_Align(FL_ALIGN_TOP));
bwsrHiLite_odd_lines->color((Fl_Color)progdefaults.bwsrBackgnd1);
} // Fl_Button* bwsrHiLite_odd_lines
{ bwsrHiLite_select = new Fl_Button(671, 113, 62, 22, _("Select"));
bwsrHiLite_select->tooltip(_("Select line"));
bwsrHiLite_select->callback((Fl_Callback*)cb_bwsrHiLite_select);
bwsrHiLite_select->align(Fl_Align(FL_ALIGN_TOP));
bwsrHiLite_select->color((Fl_Color)progdefaults.bwsrSelect);
} // Fl_Button* bwsrHiLite_select
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("UI/Browser/Colors"));
config_pages.push_back(p);
tab_tree->add(_("UI/Browser/Colors"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("UI/Browser/Detection Level"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ bwsrSliderColor = new Fl_Button(294, 118, 112, 24, _("Backgnd"));
bwsrSliderColor->tooltip(_("Background color of signal viewer squelch control"));
bwsrSliderColor->callback((Fl_Callback*)cb_bwsrSliderColor);
bwsrSliderColor->align(Fl_Align(FL_ALIGN_TOP));
bwsrSliderColor->color(fl_rgb_color(progdefaults.bwsrSliderColor.R, progdefaults.bwsrSliderColor.G,progdefaults.bwsrSliderColor.B));
} // Fl_Button* bwsrSliderColor
{ bwsrSldrSelColor = new Fl_Button(545, 118, 112, 24, _("Button"));
bwsrSldrSelColor->tooltip(_("Slider hilite color of signal viewer squelch control"));
bwsrSldrSelColor->callback((Fl_Callback*)cb_bwsrSldrSelColor);
bwsrSldrSelColor->align(Fl_Align(FL_ALIGN_TOP));
bwsrSldrSelColor->color(fl_rgb_color(progdefaults.bwsrSldrSelColor.R, progdefaults.bwsrSldrSelColor.G,progdefaults.bwsrSliderColor.B));
} // Fl_Button* bwsrSldrSelColor
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("UI/Browser/Detection Level"));
config_pages.push_back(p);
tab_tree->add(_("UI/Browser/Detection Level"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("UI/General"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(206, 21, 590, 76);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btnShowTooltips = new Fl_Check_Button(276, 34, 120, 20, _("Show tooltips"));
btnShowTooltips->tooltip(_("Enable / disable tooltips"));
btnShowTooltips->down_box(FL_DOWN_BOX);
btnShowTooltips->value(1);
btnShowTooltips->callback((Fl_Callback*)cb_btnShowTooltips);
o->value(progdefaults.tooltips);
} // Fl_Check_Button* btnShowTooltips
{ Fl_Check_Button* o = chkMenuIcons = new Fl_Check_Button(420, 34, 150, 20, _("Show menu icons"));
chkMenuIcons->tooltip(_("Enable / disable icons on menus"));
chkMenuIcons->down_box(FL_DOWN_BOX);
chkMenuIcons->callback((Fl_Callback*)cb_chkMenuIcons);
o->value(progdefaults.menuicons);
} // Fl_Check_Button* chkMenuIcons
{ Fl_ListBox* o = listboxScheme = new Fl_ListBox(394, 63, 80, 20, _("UI scheme"));
listboxScheme->tooltip(_("Change application look and feel"));
listboxScheme->box(FL_DOWN_BOX);
listboxScheme->color(FL_BACKGROUND2_COLOR);
listboxScheme->selection_color(FL_BACKGROUND_COLOR);
listboxScheme->labeltype(FL_NORMAL_LABEL);
listboxScheme->labelfont(0);
listboxScheme->labelsize(14);
listboxScheme->labelcolor(FL_FOREGROUND_COLOR);
listboxScheme->callback((Fl_Callback*)cb_listboxScheme);
listboxScheme->align(Fl_Align(FL_ALIGN_RIGHT));
listboxScheme->when(FL_WHEN_RELEASE);
listboxScheme->add("base");
listboxScheme->add("gtk+");
listboxScheme->add("plastic"); listboxScheme->add("gleam");
listboxScheme->value(progdefaults.ui_scheme.c_str());
o->labelsize(FL_NORMAL_SIZE);
listboxScheme->end();
} // Fl_ListBox* listboxScheme
{ bVisibleModes = new Fl_Button(259, 63, 110, 20, _("Visible modes"));
bVisibleModes->tooltip(_("Select modes for menu access"));
bVisibleModes->callback((Fl_Callback*)cb_bVisibleModes);
} // Fl_Button* bVisibleModes
{ Fl_ListBox* o = listbox_language = new Fl_ListBox(576, 63, 170, 20, _("UI language"));
listbox_language->tooltip(_("Changes take effect on next program startup"));
listbox_language->box(FL_DOWN_BOX);
listbox_language->color(FL_BACKGROUND2_COLOR);
listbox_language->selection_color(FL_BACKGROUND_COLOR);
listbox_language->labeltype(FL_NORMAL_LABEL);
listbox_language->labelfont(0);
listbox_language->labelsize(12);
listbox_language->labelcolor(FL_FOREGROUND_COLOR);
listbox_language->callback((Fl_Callback*)cb_listbox_language);
listbox_language->align(Fl_Align(FL_ALIGN_TOP_LEFT));
listbox_language->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
listbox_language->end();
} // Fl_ListBox* listbox_language
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(206, 103, 590, 34);
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_rx_lowercase = new Fl_Check_Button(246, 110, 441, 20, _("Print CW / RTTY / THROB / CONTESTIA in lowercase"));
btn_rx_lowercase->down_box(FL_DOWN_BOX);
btn_rx_lowercase->callback((Fl_Callback*)cb_btn_rx_lowercase);
o->value(progdefaults.rx_lowercase);
} // Fl_Check_Button* btn_rx_lowercase
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(206, 139, 294, 65);
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_tx_lowercase = new Fl_Check_Button(241, 148, 199, 20, _("Transmit lower case text"));
btn_tx_lowercase->down_box(FL_DOWN_BOX);
btn_tx_lowercase->callback((Fl_Callback*)cb_btn_tx_lowercase);
o->value(progdefaults.tx_lowercase);
} // Fl_Check_Button* btn_tx_lowercase
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(206, 206, 590, 76, _("Exit prompts"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_save_config_on_exit = new Fl_Check_Button(246, 230, 264, 20, _("Prompt to save Configuration"));
btn_save_config_on_exit->down_box(FL_DOWN_BOX);
btn_save_config_on_exit->callback((Fl_Callback*)cb_btn_save_config_on_exit);
o->value(progdefaults.SaveConfig);
} // Fl_Check_Button* btn_save_config_on_exit
{ Fl_Check_Button* o = btn2_save_macros_on_exit = new Fl_Check_Button(246, 252, 264, 20, _("Prompt to save macro file"));
btn2_save_macros_on_exit->tooltip(_("Write current macro set on program exit"));
btn2_save_macros_on_exit->down_box(FL_DOWN_BOX);
btn2_save_macros_on_exit->callback((Fl_Callback*)cb_btn2_save_macros_on_exit);
o->value(progdefaults.SaveMacros);
} // Fl_Check_Button* btn2_save_macros_on_exit
{ Fl_Check_Button* o = btn2NagMe = new Fl_Check_Button(523, 230, 188, 20, _("Prompt to save log"));
btn2NagMe->tooltip(_("Bug me about saving log entries"));
btn2NagMe->down_box(FL_DOWN_BOX);
btn2NagMe->callback((Fl_Callback*)cb_btn2NagMe);
o->value(progdefaults.NagMe);
} // Fl_Check_Button* btn2NagMe
{ Fl_Check_Button* o = btn2_confirm_exit = new Fl_Check_Button(523, 252, 226, 20, _("Confirm exit"));
btn2_confirm_exit->down_box(FL_DOWN_BOX);
btn2_confirm_exit->callback((Fl_Callback*)cb_btn2_confirm_exit);
o->value(progdefaults.confirmExit);
} // Fl_Check_Button* btn2_confirm_exit
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(206, 285, 590, 60, _("Check for updates"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_check_for_updates = new Fl_Check_Button(246, 308, 367, 20, _("Check for updates when starting program"));
btn_check_for_updates->down_box(FL_DOWN_BOX);
btn_check_for_updates->callback((Fl_Callback*)cb_btn_check_for_updates);
o->value(progdefaults.check_for_updates);
} // Fl_Check_Button* btn_check_for_updates
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(501, 139, 295, 65);
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_tx_show_timer = new Fl_Check_Button(520, 148, 219, 20, _("Show TX timer"));
btn_tx_show_timer->down_box(FL_DOWN_BOX);
btn_tx_show_timer->callback((Fl_Callback*)cb_btn_tx_show_timer);
o->value(progdefaults.show_tx_timer);
} // Fl_Check_Button* btn_tx_show_timer
{ Fl_Spinner* o = val_tx_timeout = new Fl_Spinner(521, 173, 45, 24, _("TX deadmen timeout (mins)"));
val_tx_timeout->minimum(0);
val_tx_timeout->maximum(60);
val_tx_timeout->value(10);
val_tx_timeout->callback((Fl_Callback*)cb_val_tx_timeout);
val_tx_timeout->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.tx_timeout);
} // Fl_Spinner* val_tx_timeout
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("UI/General"));
config_pages.push_back(p);
tab_tree->add(_("UI/General"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("UI/Macro buttons"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(205, 205, 590, 35);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btnMacroMouseWheel = new Fl_Check_Button(262, 213, 296, 20, _("Mouse wheel active on macro buttons"));
btnMacroMouseWheel->tooltip(_("enable mouse wheel control of macro bar"));
btnMacroMouseWheel->down_box(FL_DOWN_BOX);
btnMacroMouseWheel->callback((Fl_Callback*)cb_btnMacroMouseWheel);
o->value(progdefaults.macro_wheel);
} // Fl_Check_Button* btnMacroMouseWheel
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 25, 590, 180, _("Number and position of macro bars"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter* o = cnt_macro_height = new Fl_Counter(415, 50, 89, 22, _("Button Height"));
cnt_macro_height->tooltip(_("Height of macro bar"));
cnt_macro_height->type(1);
cnt_macro_height->minimum(18);
cnt_macro_height->maximum(30);
cnt_macro_height->step(1);
cnt_macro_height->value(20);
cnt_macro_height->callback((Fl_Callback*)cb_cnt_macro_height);
cnt_macro_height->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.macro_height);
} // Fl_Counter* cnt_macro_height
{ btn_scheme_0 = new Fl_Round_Button(261, 78, 144, 22, _("One above Rx/Tx"));
btn_scheme_0->tooltip(_("Single macro bar below logging panel\nvariable height"));
btn_scheme_0->type(102);
btn_scheme_0->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_0->callback((Fl_Callback*)cb_btn_scheme_0);
} // Fl_Round_Button* btn_scheme_0
{ btn_scheme_1 = new Fl_Round_Button(261, 103, 144, 22, _("One above waterfall"));
btn_scheme_1->type(102);
btn_scheme_1->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_1->callback((Fl_Callback*)cb_btn_scheme_1);
} // Fl_Round_Button* btn_scheme_1
{ btn_scheme_2 = new Fl_Round_Button(261, 128, 144, 22, _("One below waterfall"));
btn_scheme_2->type(102);
btn_scheme_2->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_2->callback((Fl_Callback*)cb_btn_scheme_2);
} // Fl_Round_Button* btn_scheme_2
{ btn_scheme_3 = new Fl_Round_Button(428, 78, 144, 22, _("Two scheme 1"));
btn_scheme_3->type(102);
btn_scheme_3->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_3->callback((Fl_Callback*)cb_btn_scheme_3);
} // Fl_Round_Button* btn_scheme_3
{ btn_scheme_4 = new Fl_Round_Button(596, 78, 144, 22, _("Two scheme 2"));
btn_scheme_4->type(102);
btn_scheme_4->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_4->callback((Fl_Callback*)cb_btn_scheme_4);
} // Fl_Round_Button* btn_scheme_4
{ btn_scheme_5 = new Fl_Round_Button(428, 103, 144, 22, _("Two scheme 3"));
btn_scheme_5->type(102);
btn_scheme_5->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_5->callback((Fl_Callback*)cb_btn_scheme_5);
} // Fl_Round_Button* btn_scheme_5
{ btn_scheme_6 = new Fl_Round_Button(596, 103, 144, 22, _("Two scheme 4"));
btn_scheme_6->type(102);
btn_scheme_6->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_6->callback((Fl_Callback*)cb_btn_scheme_6);
} // Fl_Round_Button* btn_scheme_6
{ btn_scheme_7 = new Fl_Round_Button(428, 128, 144, 22, _("Two scheme 5"));
btn_scheme_7->type(102);
btn_scheme_7->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_7->callback((Fl_Callback*)cb_btn_scheme_7);
} // Fl_Round_Button* btn_scheme_7
{ btn_scheme_8 = new Fl_Round_Button(596, 128, 144, 22, _("Two scheme 6"));
btn_scheme_8->type(102);
btn_scheme_8->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_8->callback((Fl_Callback*)cb_btn_scheme_8);
} // Fl_Round_Button* btn_scheme_8
{ btn_scheme_9 = new Fl_Round_Button(428, 153, 144, 22, _("Two scheme 7"));
btn_scheme_9->type(102);
btn_scheme_9->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_9->callback((Fl_Callback*)cb_btn_scheme_9);
} // Fl_Round_Button* btn_scheme_9
{ btn_scheme_10 = new Fl_Round_Button(596, 153, 144, 22, _("Two scheme 8"));
btn_scheme_10->type(102);
btn_scheme_10->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_10->callback((Fl_Callback*)cb_btn_scheme_10);
} // Fl_Round_Button* btn_scheme_10
{ btn_scheme_11 = new Fl_Round_Button(428, 178, 144, 22, _("Two scheme 9"));
btn_scheme_11->type(102);
btn_scheme_11->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_11->callback((Fl_Callback*)cb_btn_scheme_11);
} // Fl_Round_Button* btn_scheme_11
{ btn_scheme_12 = new Fl_Round_Button(596, 178, 144, 22, _("Two scheme 10"));
btn_scheme_12->type(102);
btn_scheme_12->down_box(FL_ROUND_DOWN_BOX);
btn_scheme_12->callback((Fl_Callback*)cb_btn_scheme_12);
} // Fl_Round_Button* btn_scheme_12
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 240, 590, 55);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btnUseLastMacro = new Fl_Check_Button(262, 245, 277, 20, _("Load last used macro file at start"));
btnUseLastMacro->tooltip(_("ON - use last set of macros\nOFF - use default set"));
btnUseLastMacro->down_box(FL_DOWN_BOX);
btnUseLastMacro->callback((Fl_Callback*)cb_btnUseLastMacro);
o->value(progdefaults.UseLastMacro);
} // Fl_Check_Button* btnUseLastMacro
{ Fl_Check_Button* o = btnDisplayMacroFilename = new Fl_Check_Button(262, 267, 277, 20, _("Display macro filename at start"));
btnDisplayMacroFilename->tooltip(_("The filename is written to the RX text area"));
btnDisplayMacroFilename->down_box(FL_DOWN_BOX);
btnDisplayMacroFilename->callback((Fl_Callback*)cb_btnDisplayMacroFilename);
o->value(progdefaults.DisplayMacroFilename);
} // Fl_Check_Button* btnDisplayMacroFilename
{ Fl_Check_Button* o = btn_save_macros_on_exit = new Fl_Check_Button(545, 245, 216, 20, _("Prompt to save macro file"));
btn_save_macros_on_exit->tooltip(_("Write current macro set on program exit"));
btn_save_macros_on_exit->down_box(FL_DOWN_BOX);
btn_save_macros_on_exit->callback((Fl_Callback*)cb_btn_save_macros_on_exit);
o->value(progdefaults.SaveMacros);
} // Fl_Check_Button* btn_save_macros_on_exit
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(205, 295, 295, 45);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_macro_post = new Fl_Check_Button(265, 307, 216, 20, _("Show macro control codes"));
btn_macro_post->tooltip(_("print ^! execution codes in Rx panel"));
btn_macro_post->down_box(FL_DOWN_BOX);
btn_macro_post->callback((Fl_Callback*)cb_btn_macro_post);
o->value(progdefaults.macro_post);
} // Fl_Check_Button* btn_macro_post
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(500, 295, 295, 45);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btn_4bar_position = new Fl_Check_Button(532, 307, 216, 20, _("4 bar macro set below Tx"));
btn_4bar_position->tooltip(_("Position the 4 bar macro set below Tx panel\nDefault above Rx panel"));
btn_4bar_position->down_box(FL_DOWN_BOX);
btn_4bar_position->callback((Fl_Callback*)cb_btn_4bar_position);
o->value(progdefaults.four_bar_position);
} // Fl_Check_Button* btn_4bar_position
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("UI/Macro buttons"));
config_pages.push_back(p);
tab_tree->add(_("UI/Macro buttons"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 2, 600, 350, _("UI/Rx Text"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Check_Button* o = btnRXClicks = new Fl_Check_Button(242, 118, 191, 20, _("Single-click to capture"));
btnRXClicks->tooltip(_("Enable for single click capure of text in Rx panel"));
btnRXClicks->down_box(FL_DOWN_BOX);
btnRXClicks->callback((Fl_Callback*)cb_btnRXClicks);
o->value(progdefaults.rxtext_clicks_qso_data);
} // Fl_Check_Button* btnRXClicks
{ Fl_Check_Button* o = btnRXTooltips = new Fl_Check_Button(484, 118, 254, 20, _("callsign tooltips in received text"));
btnRXTooltips->tooltip(_("Popup info after a 2 second hover on a callsign"));
btnRXTooltips->down_box(FL_DOWN_BOX);
btnRXTooltips->callback((Fl_Callback*)cb_btnRXTooltips);
o->value(progdefaults.rxtext_tooltips);
} // Fl_Check_Button* btnRXTooltips
{ Fl_Input2* o = inpNonword = new Fl_Input2(384, 84, 279, 24, _("Word delimiters"));
inpNonword->tooltip(_("RX text QSO data entry is bounded by the non-word characters\ndefined here. T\
ab and newline are automatically included."));
inpNonword->box(FL_DOWN_BOX);
inpNonword->color(FL_BACKGROUND2_COLOR);
inpNonword->selection_color(FL_SELECTION_COLOR);
inpNonword->labeltype(FL_NORMAL_LABEL);
inpNonword->labelfont(0);
inpNonword->labelsize(14);
inpNonword->labelcolor(FL_FOREGROUND_COLOR);
inpNonword->textfont(4);
inpNonword->callback((Fl_Callback*)cb_inpNonword);
inpNonword->align(Fl_Align(FL_ALIGN_LEFT));
inpNonword->when(FL_WHEN_RELEASE);
o->value(progdefaults.nonwordchars.c_str());
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpNonword
{ Fl_Check_Button* o = btnUSunits = new Fl_Check_Button(484, 147, 220, 20, _("US units of distance (QRB)"));
btnUSunits->tooltip(_("Enable for single click capure of text in Rx panel"));
btnUSunits->down_box(FL_DOWN_BOX);
btnUSunits->callback((Fl_Callback*)cb_btnUSunits);
o->value(progdefaults.us_units);
} // Fl_Check_Button* btnUSunits
{ Fl_Check_Button* o = btn_clear_fields = new Fl_Check_Button(242, 147, 198, 20, _("Clear log fields - new CALL"));
btn_clear_fields->down_box(FL_DOWN_BOX);
btn_clear_fields->callback((Fl_Callback*)cb_btn_clear_fields);
o->value(progdefaults.clear_fields);
} // Fl_Check_Button* btn_clear_fields
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("UI/Rx Text"));
config_pages.push_back(p);
tab_tree->add(_("UI/Rx Text"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("UI/Touch"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Box* o = new Fl_Box(216, 44, 570, 52, _("Note:\nThese configuration items are useful for but not unique to using fldig\
i on a\ntouch screen device such as a tablet."));
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Group* o = new Fl_Group(216, 110, 570, 102, _("Arrow Key Control of Frequency Entry"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Box* o = new Fl_Box(231, 135, 290, 74, _("Right/Left = 1 x LSD\nUp/Dn= 10 x LSD\nShift - Right/Left = 100 x LSD\nShift \
- Up/Dn = 1000 x LSD"));
o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Choice* o = sel_lsd = new Fl_Choice(621, 171, 90, 24, _("Right/Left\nSelect Least Signficant Digit"));
sel_lsd->down_box(FL_BORDER_BOX);
sel_lsd->callback((Fl_Callback*)cb_sel_lsd);
sel_lsd->align(Fl_Align(FL_ALIGN_TOP));
o->add("1 Hz|10 Hz|100 Hz|1 kHz");
o->value(progdefaults.sel_lsd);
} // Fl_Choice* sel_lsd
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(216, 221, 570, 64, _("Rx / Tx Panels"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_rxtx_swap = new Fl_Check_Button(336, 225, 116, 30, _("Tx above Rx"));
btn_rxtx_swap->tooltip(_("Enable to put Tx panel above Rx panel"));
btn_rxtx_swap->down_box(FL_DOWN_BOX);
btn_rxtx_swap->callback((Fl_Callback*)cb_btn_rxtx_swap);
o->value(progdefaults.rxtx_swap);
} // Fl_Check_Button* btn_rxtx_swap
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("UI/Touch"));
config_pages.push_back(p);
tab_tree->add(_("UI/Touch"));
tab_tree->close(_("UI"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Waterfall/Buttons & Controls"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Box* o = new Fl_Box(285, 70, 446, 25, _("Enable check box to show each respective operator control"));
o->box(FL_FLAT_BOX);
o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Check_Button* o = btnWF_UIrev = new Fl_Check_Button(312, 103, 150, 20, _("Reverse"));
btnWF_UIrev->down_box(FL_DOWN_BOX);
btnWF_UIrev->value(1);
btnWF_UIrev->callback((Fl_Callback*)cb_btnWF_UIrev);
o->value(progdefaults.WF_UIrev);
} // Fl_Check_Button* btnWF_UIrev
{ Fl_Check_Button* o = btnWF_UIx1 = new Fl_Check_Button(531, 103, 162, 20, _("WF Magnification"));
btnWF_UIx1->down_box(FL_DOWN_BOX);
btnWF_UIx1->value(1);
btnWF_UIx1->callback((Fl_Callback*)cb_btnWF_UIx1);
o->value(progdefaults.WF_UIx1);
} // Fl_Check_Button* btnWF_UIx1
{ Fl_Check_Button* o = btnWF_UIwfcarrier = new Fl_Check_Button(312, 134, 150, 20, _("WF carrier"));
btnWF_UIwfcarrier->down_box(FL_DOWN_BOX);
btnWF_UIwfcarrier->value(1);
btnWF_UIwfcarrier->callback((Fl_Callback*)cb_btnWF_UIwfcarrier);
o->value(progdefaults.WF_UIwfcarrier);
} // Fl_Check_Button* btnWF_UIwfcarrier
{ Fl_Check_Button* o = btnWF_UIwfshift = new Fl_Check_Button(531, 134, 150, 20, _("WF Shift Controls"));
btnWF_UIwfshift->down_box(FL_DOWN_BOX);
btnWF_UIwfshift->value(1);
btnWF_UIwfshift->callback((Fl_Callback*)cb_btnWF_UIwfshift);
o->value(progdefaults.WF_UIwfshift);
} // Fl_Check_Button* btnWF_UIwfshift
{ Fl_Check_Button* o = btnWF_UIwfreflevel = new Fl_Check_Button(312, 166, 150, 20, _("WF ref level"));
btnWF_UIwfreflevel->down_box(FL_DOWN_BOX);
btnWF_UIwfreflevel->value(1);
btnWF_UIwfreflevel->callback((Fl_Callback*)cb_btnWF_UIwfreflevel);
o->value(progdefaults.WF_UIwfreflevel);
} // Fl_Check_Button* btnWF_UIwfreflevel
{ Fl_Check_Button* o = btnWF_UIwfdrop = new Fl_Check_Button(531, 166, 150, 20, _("WF drop rate"));
btnWF_UIwfdrop->down_box(FL_DOWN_BOX);
btnWF_UIwfdrop->value(1);
btnWF_UIwfdrop->callback((Fl_Callback*)cb_btnWF_UIwfdrop);
o->value(progdefaults.WF_UIwfdrop);
} // Fl_Check_Button* btnWF_UIwfdrop
{ Fl_Check_Button* o = btnWF_UIwfampspan = new Fl_Check_Button(312, 198, 150, 20, _("WF amp span"));
btnWF_UIwfampspan->down_box(FL_DOWN_BOX);
btnWF_UIwfampspan->value(1);
btnWF_UIwfampspan->callback((Fl_Callback*)cb_btnWF_UIwfampspan);
o->value(progdefaults.WF_UIwfampspan);
} // Fl_Check_Button* btnWF_UIwfampspan
{ Fl_Check_Button* o = btnWF_UIwfstore = new Fl_Check_Button(531, 198, 150, 20, _("WF Store"));
btnWF_UIwfstore->down_box(FL_DOWN_BOX);
btnWF_UIwfstore->value(1);
btnWF_UIwfstore->callback((Fl_Callback*)cb_btnWF_UIwfstore);
o->value(progdefaults.WF_UIwfstore);
} // Fl_Check_Button* btnWF_UIwfstore
{ Fl_Check_Button* o = btnWF_UIwfmode = new Fl_Check_Button(312, 230, 150, 20, _("WF mode"));
btnWF_UIwfmode->down_box(FL_DOWN_BOX);
btnWF_UIwfmode->value(1);
btnWF_UIwfmode->callback((Fl_Callback*)cb_btnWF_UIwfmode);
o->value(progdefaults.WF_UIwfmode);
} // Fl_Check_Button* btnWF_UIwfmode
{ Fl_Check_Button* o = btnWF_UIqsy = new Fl_Check_Button(531, 230, 150, 20, _("QSY"));
btnWF_UIqsy->down_box(FL_DOWN_BOX);
btnWF_UIqsy->value(1);
btnWF_UIqsy->callback((Fl_Callback*)cb_btnWF_UIqsy);
o->value(progdefaults.WF_UIqsy);
} // Fl_Check_Button* btnWF_UIqsy
{ Fl_Check_Button* o = btnWF_UIxmtlock = new Fl_Check_Button(531, 262, 150, 20, _("XMT lock"));
btnWF_UIxmtlock->down_box(FL_DOWN_BOX);
btnWF_UIxmtlock->value(1);
btnWF_UIxmtlock->callback((Fl_Callback*)cb_btnWF_UIxmtlock);
o->value(progdefaults.WF_UIxmtlock);
} // Fl_Check_Button* btnWF_UIxmtlock
{ btn_wf_enable_all = new Fl_Button(356, 285, 88, 20, _("Enable all"));
btn_wf_enable_all->callback((Fl_Callback*)cb_btn_wf_enable_all);
} // Fl_Button* btn_wf_enable_all
{ btn_wf_disable_all = new Fl_Button(555, 285, 88, 20, _("Disable all"));
btn_wf_disable_all->callback((Fl_Callback*)cb_btn_wf_disable_all);
} // Fl_Button* btn_wf_disable_all
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Waterfall/Buttons & Controls"));
config_pages.push_back(p);
tab_tree->add(_("Waterfall/Buttons & Controls"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Waterfall/Display"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(249, 32, 496, 190, _("Colors and cursors"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ colorbox* o = WF_Palette = new colorbox(259, 68, 380, 24, _("aa"));
WF_Palette->box(FL_DOWN_BOX);
WF_Palette->color(FL_FOREGROUND_COLOR);
WF_Palette->selection_color(FL_BACKGROUND_COLOR);
WF_Palette->labeltype(FL_NORMAL_LABEL);
WF_Palette->labelfont(0);
WF_Palette->labelsize(12);
WF_Palette->labelcolor(FL_FOREGROUND_COLOR);
WF_Palette->callback((Fl_Callback*)cb_WF_Palette);
WF_Palette->align(Fl_Align(FL_ALIGN_TOP_LEFT));
WF_Palette->when(FL_WHEN_RELEASE);
o->label(progdefaults.PaletteName.c_str());
o->labelsize(FL_NORMAL_SIZE);
} // colorbox* WF_Palette
{ btnColor[0] = new Fl_Button(259, 94, 20, 24);
btnColor[0]->tooltip(_("Change color"));
btnColor[0]->callback((Fl_Callback*)cb_btnColor);
} // Fl_Button* btnColor[0]
{ btnColor[1] = new Fl_Button(304, 94, 20, 24);
btnColor[1]->tooltip(_("Change color"));
btnColor[1]->callback((Fl_Callback*)cb_btnColor1);
} // Fl_Button* btnColor[1]
{ btnColor[2] = new Fl_Button(349, 94, 20, 24);
btnColor[2]->tooltip(_("Change color"));
btnColor[2]->callback((Fl_Callback*)cb_btnColor2);
} // Fl_Button* btnColor[2]
{ btnColor[3] = new Fl_Button(394, 94, 20, 24);
btnColor[3]->tooltip(_("Change color"));
btnColor[3]->callback((Fl_Callback*)cb_btnColor3);
} // Fl_Button* btnColor[3]
{ btnColor[4] = new Fl_Button(439, 94, 20, 24);
btnColor[4]->tooltip(_("Change color"));
btnColor[4]->callback((Fl_Callback*)cb_btnColor4);
} // Fl_Button* btnColor[4]
{ btnColor[5] = new Fl_Button(484, 94, 20, 24);
btnColor[5]->tooltip(_("Change color"));
btnColor[5]->callback((Fl_Callback*)cb_btnColor5);
} // Fl_Button* btnColor[5]
{ btnColor[6] = new Fl_Button(529, 94, 20, 24);
btnColor[6]->tooltip(_("Change color"));
btnColor[6]->callback((Fl_Callback*)cb_btnColor6);
} // Fl_Button* btnColor[6]
{ btnColor[7] = new Fl_Button(574, 94, 20, 24);
btnColor[7]->tooltip(_("Change color"));
btnColor[7]->callback((Fl_Callback*)cb_btnColor7);
} // Fl_Button* btnColor[7]
{ btnColor[8] = new Fl_Button(619, 94, 20, 24);
btnColor[8]->tooltip(_("Change color"));
btnColor[8]->callback((Fl_Callback*)cb_btnColor8);
} // Fl_Button* btnColor[8]
{ btnLoadPalette = new Fl_Button(649, 68, 70, 24, _("Load..."));
btnLoadPalette->tooltip(_("Load a new palette"));
btnLoadPalette->callback((Fl_Callback*)cb_btnLoadPalette);
} // Fl_Button* btnLoadPalette
{ btnSavePalette = new Fl_Button(649, 94, 70, 24, _("Save..."));
btnSavePalette->tooltip(_("Save this palette"));
btnSavePalette->callback((Fl_Callback*)cb_btnSavePalette);
} // Fl_Button* btnSavePalette
{ Fl_Group* o = new Fl_Group(258, 122, 113, 96, _("Bandwidth"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnUseCursorLines = new Fl_Check_Button(260, 142, 56, 20, _("ON"));
btnUseCursorLines->tooltip(_("Show cursor with bandwidth lines"));
btnUseCursorLines->down_box(FL_DOWN_BOX);
btnUseCursorLines->callback((Fl_Callback*)cb_btnUseCursorLines);
o->value(progdefaults.UseCursorLines);
} // Fl_Check_Button* btnUseCursorLines
{ Fl_Button* o = btnCursorBWcolor = new Fl_Button(260, 165, 20, 20, _("Color"));
btnCursorBWcolor->tooltip(_("Change color"));
btnCursorBWcolor->color((Fl_Color)3);
btnCursorBWcolor->callback((Fl_Callback*)cb_btnCursorBWcolor);
btnCursorBWcolor->align(Fl_Align(FL_ALIGN_RIGHT));
o->color(fl_rgb_color(progdefaults.cursorLineRGBI.R,progdefaults.cursorLineRGBI.G,progdefaults.cursorLineRGBI.B));
} // Fl_Button* btnCursorBWcolor
{ Fl_Check_Button* o = btnUseWideCursor = new Fl_Check_Button(260, 188, 62, 20, _("Wide"));
btnUseWideCursor->tooltip(_("Show bandwidth tracks on waterfall"));
btnUseWideCursor->down_box(FL_DOWN_BOX);
btnUseWideCursor->callback((Fl_Callback*)cb_btnUseWideCursor);
o->value(progdefaults.UseWideCursor);
} // Fl_Check_Button* btnUseWideCursor
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(382, 122, 113, 96, _("Center line"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnUseCursorCenterLine = new Fl_Check_Button(388, 142, 48, 20, _("ON"));
btnUseCursorCenterLine->tooltip(_("Show cursor with center line"));
btnUseCursorCenterLine->down_box(FL_DOWN_BOX);
btnUseCursorCenterLine->callback((Fl_Callback*)cb_btnUseCursorCenterLine);
o->value(progdefaults.UseCursorCenterLine);
} // Fl_Check_Button* btnUseCursorCenterLine
{ Fl_Button* o = btnCursorCenterLineColor = new Fl_Button(388, 165, 20, 20, _("Color"));
btnCursorCenterLineColor->tooltip(_("Change color"));
btnCursorCenterLineColor->color(FL_BACKGROUND2_COLOR);
btnCursorCenterLineColor->callback((Fl_Callback*)cb_btnCursorCenterLineColor);
btnCursorCenterLineColor->align(Fl_Align(FL_ALIGN_RIGHT));
o->color(fl_rgb_color(progdefaults.cursorCenterRGBI.R,progdefaults.cursorCenterRGBI.G,progdefaults.cursorCenterRGBI.B));
} // Fl_Button* btnCursorCenterLineColor
{ Fl_Check_Button* o = btnUseWideCenter = new Fl_Check_Button(388, 190, 69, 20, _("Wide"));
btnUseWideCenter->tooltip(_("Show bandwidth tracks on waterfall"));
btnUseWideCenter->down_box(FL_DOWN_BOX);
btnUseWideCenter->callback((Fl_Callback*)cb_btnUseWideCenter);
o->value(progdefaults.UseWideCenter);
} // Fl_Check_Button* btnUseWideCenter
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(505, 122, 113, 96, _("Signal tracks"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnUseBWTracks = new Fl_Check_Button(507, 141, 56, 20, _("ON"));
btnUseBWTracks->tooltip(_("Show bandwidth tracks on waterfall"));
btnUseBWTracks->down_box(FL_DOWN_BOX);
btnUseBWTracks->callback((Fl_Callback*)cb_btnUseBWTracks);
o->value(progdefaults.UseBWTracks);
} // Fl_Check_Button* btnUseBWTracks
{ Fl_Button* o = btnBwTracksColor = new Fl_Button(507, 164, 20, 20, _("Color"));
btnBwTracksColor->tooltip(_("Change color"));
btnBwTracksColor->color((Fl_Color)1);
btnBwTracksColor->callback((Fl_Callback*)cb_btnBwTracksColor);
btnBwTracksColor->align(Fl_Align(FL_ALIGN_RIGHT));
o->color(fl_rgb_color(progdefaults.bwTrackRGBI.R,progdefaults.bwTrackRGBI.G,progdefaults.bwTrackRGBI.B));
} // Fl_Button* btnBwTracksColor
{ Fl_Check_Button* o = btnUseWideTracks = new Fl_Check_Button(507, 188, 74, 20, _("Wide"));
btnUseWideTracks->tooltip(_("Show bandwidth tracks on waterfall"));
btnUseWideTracks->down_box(FL_DOWN_BOX);
btnUseWideTracks->callback((Fl_Callback*)cb_btnUseWideTracks);
o->value(progdefaults.UseWideTracks);
} // Fl_Check_Button* btnUseWideTracks
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(625, 122, 113, 96, _("Notch"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Button* o = btnNotchColor = new Fl_Button(627, 164, 20, 20, _("Color"));
btnNotchColor->tooltip(_("Change color"));
btnNotchColor->color((Fl_Color)1);
btnNotchColor->callback((Fl_Callback*)cb_btnNotchColor);
btnNotchColor->align(Fl_Align(FL_ALIGN_RIGHT));
o->color(fl_rgb_color(progdefaults.notchRGBI.R,progdefaults.notchRGBI.G,progdefaults.notchRGBI.B));
} // Fl_Button* btnNotchColor
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(249, 223, 496, 55, _("Frequency scale"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = chkShowAudioScale = new Fl_Check_Button(259, 246, 241, 20, _("Always show audio frequencies"));
chkShowAudioScale->tooltip(_("Audio or RF frequencies on waterfall scale"));
chkShowAudioScale->down_box(FL_DOWN_BOX);
chkShowAudioScale->callback((Fl_Callback*)cb_chkShowAudioScale);
o->value(progdefaults.wf_audioscale);
} // Fl_Check_Button* chkShowAudioScale
{ btnWaterfallFont = new Fl_Button(559, 246, 71, 24, _("Font..."));
btnWaterfallFont->tooltip(_("Select waterfall scale font"));
btnWaterfallFont->callback((Fl_Callback*)cb_btnWaterfallFont);
} // Fl_Button* btnWaterfallFont
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(249, 279, 496, 65, _("Transmit signal"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnViewXmtSignal = new Fl_Check_Button(259, 305, 208, 20, _("Monitor transmitted signal"));
btnViewXmtSignal->tooltip(_("Show transmit signal on waterfall"));
btnViewXmtSignal->down_box(FL_DOWN_BOX);
btnViewXmtSignal->callback((Fl_Callback*)cb_btnViewXmtSignal);
o->value(progdefaults.viewXmtSignal);
} // Fl_Check_Button* btnViewXmtSignal
{ Fl_Counter* o = valTxMonitorLevel = new Fl_Counter(537, 304, 114, 21, _("Signal Level (dB)"));
valTxMonitorLevel->tooltip(_("Set level for good viewing"));
valTxMonitorLevel->minimum(-80);
valTxMonitorLevel->maximum(0);
valTxMonitorLevel->step(1);
valTxMonitorLevel->value(-20);
valTxMonitorLevel->callback((Fl_Callback*)cb_valTxMonitorLevel);
valTxMonitorLevel->align(Fl_Align(FL_ALIGN_TOP));
o->value(20*log10(progdefaults.TxMonitorLevel));
o->lstep(10);
} // Fl_Counter* valTxMonitorLevel
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Waterfall/Display"));
config_pages.push_back(p);
tab_tree->add(_("Waterfall/Display"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Waterfall/FFT Processing"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(251, 25, 490, 135);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Counter2* o = cntLowFreqCutoff = new Fl_Counter2(296, 43, 70, 22, _("Lower limit"));
cntLowFreqCutoff->tooltip(_("Low frequency limit in Hz"));
cntLowFreqCutoff->type(1);
cntLowFreqCutoff->box(FL_UP_BOX);
cntLowFreqCutoff->color(FL_BACKGROUND_COLOR);
cntLowFreqCutoff->selection_color(FL_INACTIVE_COLOR);
cntLowFreqCutoff->labeltype(FL_NORMAL_LABEL);
cntLowFreqCutoff->labelfont(0);
cntLowFreqCutoff->labelsize(14);
cntLowFreqCutoff->labelcolor(FL_FOREGROUND_COLOR);
cntLowFreqCutoff->minimum(0);
cntLowFreqCutoff->maximum(500);
cntLowFreqCutoff->step(50);
cntLowFreqCutoff->value(300);
cntLowFreqCutoff->callback((Fl_Callback*)cb_cntLowFreqCutoff);
cntLowFreqCutoff->align(Fl_Align(FL_ALIGN_RIGHT));
cntLowFreqCutoff->when(FL_WHEN_CHANGED);
o->value(progdefaults.LowFreqCutoff);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntLowFreqCutoff
{ Fl_Check_Button* o = btnWFaveraging = new Fl_Check_Button(296, 79, 120, 20, _("FFT averaging"));
btnWFaveraging->tooltip(_("Use averaging to decrease waterfall noise"));
btnWFaveraging->down_box(FL_DOWN_BOX);
btnWFaveraging->callback((Fl_Callback*)cb_btnWFaveraging);
o->value(progdefaults.WFaveraging);
} // Fl_Check_Button* btnWFaveraging
{ Fl_ListBox* o = listboxFFTPrefilter = new Fl_ListBox(296, 109, 120, 24, _("FFT prefilter window function"));
listboxFFTPrefilter->tooltip(_("Select the type of FFT prefilter"));
listboxFFTPrefilter->box(FL_DOWN_BOX);
listboxFFTPrefilter->color(FL_BACKGROUND2_COLOR);
listboxFFTPrefilter->selection_color(FL_BACKGROUND_COLOR);
listboxFFTPrefilter->labeltype(FL_NORMAL_LABEL);
listboxFFTPrefilter->labelfont(0);
listboxFFTPrefilter->labelsize(14);
listboxFFTPrefilter->labelcolor(FL_FOREGROUND_COLOR);
listboxFFTPrefilter->callback((Fl_Callback*)cb_listboxFFTPrefilter);
listboxFFTPrefilter->align(Fl_Align(FL_ALIGN_RIGHT));
listboxFFTPrefilter->when(FL_WHEN_RELEASE);
listboxFFTPrefilter->add(_("Rectangular")); listboxFFTPrefilter->add("Blackman");
listboxFFTPrefilter->add("Hamming"); listboxFFTPrefilter->add("Hanning");
listboxFFTPrefilter->add(_("Triangular"));
listboxFFTPrefilter->index(progdefaults.wfPreFilter);
o->labelsize(FL_NORMAL_SIZE);
listboxFFTPrefilter->end();
} // Fl_ListBox* listboxFFTPrefilter
{ Fl_Counter2* o = cntrWfwidth = new Fl_Counter2(519, 43, 95, 22, _("Upper limit"));
cntrWfwidth->tooltip(_("High frequency limit in Hz"));
cntrWfwidth->type(1);
cntrWfwidth->box(FL_UP_BOX);
cntrWfwidth->color(FL_BACKGROUND_COLOR);
cntrWfwidth->selection_color(FL_INACTIVE_COLOR);
cntrWfwidth->labeltype(FL_NORMAL_LABEL);
cntrWfwidth->labelfont(0);
cntrWfwidth->labelsize(14);
cntrWfwidth->labelcolor(FL_FOREGROUND_COLOR);
cntrWfwidth->minimum(2000);
cntrWfwidth->maximum(4000);
cntrWfwidth->step(100);
cntrWfwidth->value(3000);
cntrWfwidth->callback((Fl_Callback*)cb_cntrWfwidth);
cntrWfwidth->align(Fl_Align(FL_ALIGN_RIGHT));
cntrWfwidth->when(FL_WHEN_CHANGED);
o->value(progdefaults.HighFreqCutoff);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntrWfwidth
{ Fl_Counter2* o = wf_latency = new Fl_Counter2(519, 78, 95, 22, _("Latency"));
wf_latency->tooltip(_("Signal averaging over time\n0 - least\n4 - greatest"));
wf_latency->type(1);
wf_latency->box(FL_UP_BOX);
wf_latency->color(FL_BACKGROUND_COLOR);
wf_latency->selection_color(FL_INACTIVE_COLOR);
wf_latency->labeltype(FL_NORMAL_LABEL);
wf_latency->labelfont(0);
wf_latency->labelsize(14);
wf_latency->labelcolor(FL_FOREGROUND_COLOR);
wf_latency->minimum(1);
wf_latency->maximum(16);
wf_latency->step(1);
wf_latency->value(8);
wf_latency->callback((Fl_Callback*)cb_wf_latency);
wf_latency->align(Fl_Align(FL_ALIGN_RIGHT));
wf_latency->when(FL_WHEN_CHANGED);
o->value(progdefaults.wf_latency);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* wf_latency
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(251, 166, 490, 73);
o->tooltip(_("Show me more or less waterfall"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Counter* o = cntr_drop_speed = new Fl_Counter(296, 188, 95, 22, _("Slow drop rate"));
cntr_drop_speed->tooltip(_("Normal drop speed / value"));
cntr_drop_speed->type(1);
cntr_drop_speed->minimum(4);
cntr_drop_speed->maximum(32);
cntr_drop_speed->step(2);
cntr_drop_speed->value(4);
cntr_drop_speed->callback((Fl_Callback*)cb_cntr_drop_speed);
cntr_drop_speed->align(Fl_Align(FL_ALIGN_RIGHT_TOP));
o->value(progdefaults.drop_speed);
} // Fl_Counter* cntr_drop_speed
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(251, 246, 490, 73, _("Changes take effect on next program startup"));
o->tooltip(_("Show me more or less waterfall"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Counter2* o = cntrWfheight = new Fl_Counter2(296, 276, 120, 22, _("Waterfall height in pixels"));
cntrWfheight->tooltip(_("CPU usage increases with waterfall height"));
cntrWfheight->box(FL_UP_BOX);
cntrWfheight->color(FL_BACKGROUND_COLOR);
cntrWfheight->selection_color(FL_INACTIVE_COLOR);
cntrWfheight->labeltype(FL_NORMAL_LABEL);
cntrWfheight->labelfont(0);
cntrWfheight->labelsize(14);
cntrWfheight->labelcolor(FL_FOREGROUND_COLOR);
cntrWfheight->minimum(100);
cntrWfheight->maximum(500);
cntrWfheight->step(5);
cntrWfheight->value(120);
cntrWfheight->callback((Fl_Callback*)cb_cntrWfheight);
cntrWfheight->align(Fl_Align(FL_ALIGN_RIGHT));
cntrWfheight->when(FL_WHEN_CHANGED);
o->value(progdefaults.wfheight);
o->labelsize(FL_NORMAL_SIZE);
o->lstep(50);
} // Fl_Counter2* cntrWfheight
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Waterfall/FFT Processing"));
config_pages.push_back(p);
tab_tree->add(_("Waterfall/FFT Processing"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Waterfall/Mouse usage"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(211, 50, 580, 170);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btnWaterfallHistoryDefault = new Fl_Check_Button(266, 65, 340, 20, _("Left or right click always replays audio history"));
btnWaterfallHistoryDefault->tooltip(_("Replay trackline audio"));
btnWaterfallHistoryDefault->down_box(FL_DOWN_BOX);
btnWaterfallHistoryDefault->callback((Fl_Callback*)cb_btnWaterfallHistoryDefault);
o->value(progdefaults.WaterfallHistoryDefault);
} // Fl_Check_Button* btnWaterfallHistoryDefault
{ Fl_Check_Button* o = btnWaterfallQSY = new Fl_Check_Button(266, 95, 380, 20, _("Dragging on the waterfall scale changes frequency"));
btnWaterfallQSY->tooltip(_("Enable drag cursor on waterfall scale"));
btnWaterfallQSY->down_box(FL_DOWN_BOX);
btnWaterfallQSY->callback((Fl_Callback*)cb_btnWaterfallQSY);
o->value(progdefaults.WaterfallQSY);
} // Fl_Check_Button* btnWaterfallQSY
{ Fl_Check_Button* o = btnWaterfallClickInsert = new Fl_Check_Button(266, 137, 225, 20, _("Insert text on single left click"));
btnWaterfallClickInsert->tooltip(_("Insert special text in Rx panel\nwhen waterfall clicked"));
btnWaterfallClickInsert->down_box(FL_DOWN_BOX);
btnWaterfallClickInsert->callback((Fl_Callback*)cb_btnWaterfallClickInsert);
o->value(progdefaults.WaterfallClickInsert);
} // Fl_Check_Button* btnWaterfallClickInsert
{ inpWaterfallClickText = new Fl_Input2(552, 125, 180, 50);
inpWaterfallClickText->tooltip(_("The string <FREQ> is replaced with\nthe current modem and frequency"));
inpWaterfallClickText->box(FL_DOWN_BOX);
inpWaterfallClickText->color(FL_BACKGROUND2_COLOR);
inpWaterfallClickText->selection_color(FL_SELECTION_COLOR);
inpWaterfallClickText->labeltype(FL_NORMAL_LABEL);
inpWaterfallClickText->labelfont(0);
inpWaterfallClickText->labelsize(14);
inpWaterfallClickText->labelcolor(FL_FOREGROUND_COLOR);
inpWaterfallClickText->callback((Fl_Callback*)cb_inpWaterfallClickText);
inpWaterfallClickText->align(Fl_Align(FL_ALIGN_RIGHT));
inpWaterfallClickText->when(FL_WHEN_RELEASE);
} // Fl_Input2* inpWaterfallClickText
{ Fl_ListBox* o = listboxWaterfallWheelAction = new Fl_ListBox(266, 178, 150, 22, _("Wheel action"));
listboxWaterfallWheelAction->tooltip(_("Select how the mouse wheel\nbehaves inside the waterfall"));
listboxWaterfallWheelAction->box(FL_DOWN_BOX);
listboxWaterfallWheelAction->color(FL_BACKGROUND2_COLOR);
listboxWaterfallWheelAction->selection_color(FL_BACKGROUND_COLOR);
listboxWaterfallWheelAction->labeltype(FL_NORMAL_LABEL);
listboxWaterfallWheelAction->labelfont(0);
listboxWaterfallWheelAction->labelsize(14);
listboxWaterfallWheelAction->labelcolor(FL_FOREGROUND_COLOR);
listboxWaterfallWheelAction->callback((Fl_Callback*)cb_listboxWaterfallWheelAction);
listboxWaterfallWheelAction->align(Fl_Align(FL_ALIGN_RIGHT));
listboxWaterfallWheelAction->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
listboxWaterfallWheelAction->end();
} // Fl_ListBox* listboxWaterfallWheelAction
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Waterfall/Mouse usage"));
config_pages.push_back(p);
tab_tree->add(_("Waterfall/Mouse usage"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Waterfall/Spectrum"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(210, 50, 580, 150, _("Spectrum Scope / Waterfall interaction"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btnWFspectrum_center = new Fl_Check_Button(275, 92, 365, 20, _("left click transfers frequency to scope center frequency"));
btnWFspectrum_center->tooltip(_("left click on WF recenters spectrum scope"));
btnWFspectrum_center->down_box(FL_DOWN_BOX);
btnWFspectrum_center->callback((Fl_Callback*)cb_btnWFspectrum_center);
o->value(progdefaults.wf_spectrum_center);
} // Fl_Check_Button* btnWFspectrum_center
{ Fl_Check_Button* o = btnWFspectrum_dbvals = new Fl_Check_Button(275, 123, 221, 20, _("use waterfall range/limit values"));
btnWFspectrum_dbvals->tooltip(_("values left/below waterfall"));
btnWFspectrum_dbvals->down_box(FL_DOWN_BOX);
btnWFspectrum_dbvals->callback((Fl_Callback*)cb_btnWFspectrum_dbvals);
o->value(progdefaults.wf_spectrum_dbvals);
} // Fl_Check_Button* btnWFspectrum_dbvals
{ Fl_Counter* o = cntr_spectrum_freq_scale = new Fl_Counter(275, 155, 75, 20, _("freq scale = N * modem bandwidth"));
cntr_spectrum_freq_scale->type(1);
cntr_spectrum_freq_scale->minimum(1);
cntr_spectrum_freq_scale->maximum(10);
cntr_spectrum_freq_scale->step(1);
cntr_spectrum_freq_scale->value(5);
cntr_spectrum_freq_scale->callback((Fl_Callback*)cb_cntr_spectrum_freq_scale);
cntr_spectrum_freq_scale->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.wf_spectrum_scale_factor);
} // Fl_Counter* cntr_spectrum_freq_scale
{ Fl_Check_Button* o = btn_spectrum_modem_scale = new Fl_Check_Button(585, 155, 55, 20, _("use"));
btn_spectrum_modem_scale->tooltip(_("scale spectrum display linked to modem bandwidth"));
btn_spectrum_modem_scale->down_box(FL_DOWN_BOX);
btn_spectrum_modem_scale->callback((Fl_Callback*)cb_btn_spectrum_modem_scale);
o->value(progdefaults.wf_spectrum_modem_scale);
} // Fl_Check_Button* btn_spectrum_modem_scale
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Waterfall/Spectrum"));
config_pages.push_back(p);
tab_tree->add(_("Waterfall/Spectrum"));
tab_tree->close(_("Waterfall"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Web/Pskmail"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Group* o = new Fl_Group(256, 52, 490, 174, _("Mail Server Attributes"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Counter2* o = cntServerCarrier = new Fl_Counter2(307, 80, 80, 20, _("Carrier frequency (Hz)"));
cntServerCarrier->tooltip(_("Default listen / transmit frequency"));
cntServerCarrier->type(1);
cntServerCarrier->box(FL_UP_BOX);
cntServerCarrier->color(FL_BACKGROUND_COLOR);
cntServerCarrier->selection_color(FL_INACTIVE_COLOR);
cntServerCarrier->labeltype(FL_NORMAL_LABEL);
cntServerCarrier->labelfont(0);
cntServerCarrier->labelsize(14);
cntServerCarrier->labelcolor(FL_FOREGROUND_COLOR);
cntServerCarrier->minimum(500);
cntServerCarrier->maximum(2500);
cntServerCarrier->step(25);
cntServerCarrier->value(1500);
cntServerCarrier->callback((Fl_Callback*)cb_cntServerCarrier);
cntServerCarrier->align(Fl_Align(FL_ALIGN_RIGHT));
cntServerCarrier->when(FL_WHEN_CHANGED);
o->value(progdefaults.ServerCarrier);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntServerCarrier
{ Fl_Counter2* o = cntServerOffset = new Fl_Counter2(307, 117, 80, 20, _("Search range (Hz)"));
cntServerOffset->tooltip(_("Listen for signals within this range"));
cntServerOffset->type(1);
cntServerOffset->box(FL_UP_BOX);
cntServerOffset->color(FL_BACKGROUND_COLOR);
cntServerOffset->selection_color(FL_INACTIVE_COLOR);
cntServerOffset->labeltype(FL_NORMAL_LABEL);
cntServerOffset->labelfont(0);
cntServerOffset->labelsize(14);
cntServerOffset->labelcolor(FL_FOREGROUND_COLOR);
cntServerOffset->minimum(10);
cntServerOffset->maximum(500);
cntServerOffset->step(10);
cntServerOffset->value(100);
cntServerOffset->callback((Fl_Callback*)cb_cntServerOffset);
cntServerOffset->align(Fl_Align(FL_ALIGN_RIGHT));
cntServerOffset->when(FL_WHEN_CHANGED);
o->value(progdefaults.SearchRange);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntServerOffset
{ Fl_Counter2* o = cntServerACQsn = new Fl_Counter2(307, 154, 80, 20, _("Acquisition S/N (dB)"));
cntServerACQsn->tooltip(_("Capture signals over this threshold"));
cntServerACQsn->type(1);
cntServerACQsn->box(FL_UP_BOX);
cntServerACQsn->color(FL_BACKGROUND_COLOR);
cntServerACQsn->selection_color(FL_INACTIVE_COLOR);
cntServerACQsn->labeltype(FL_NORMAL_LABEL);
cntServerACQsn->labelfont(0);
cntServerACQsn->labelsize(14);
cntServerACQsn->labelcolor(FL_FOREGROUND_COLOR);
cntServerACQsn->minimum(3);
cntServerACQsn->maximum(20);
cntServerACQsn->step(1);
cntServerACQsn->value(6);
cntServerACQsn->callback((Fl_Callback*)cb_cntServerACQsn);
cntServerACQsn->align(Fl_Align(FL_ALIGN_RIGHT));
cntServerACQsn->when(FL_WHEN_CHANGED);
o->value(progdefaults.ServerACQsn);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntServerACQsn
{ Fl_Counter2* o = cntServerAFCrange = new Fl_Counter2(307, 191, 80, 20, _("AFC range (Hz)"));
cntServerAFCrange->tooltip(_("Limit AFC movement to this range"));
cntServerAFCrange->type(1);
cntServerAFCrange->box(FL_UP_BOX);
cntServerAFCrange->color(FL_BACKGROUND_COLOR);
cntServerAFCrange->selection_color(FL_INACTIVE_COLOR);
cntServerAFCrange->labeltype(FL_NORMAL_LABEL);
cntServerAFCrange->labelfont(0);
cntServerAFCrange->labelsize(14);
cntServerAFCrange->labelcolor(FL_FOREGROUND_COLOR);
cntServerAFCrange->minimum(10);
cntServerAFCrange->maximum(500);
cntServerAFCrange->step(10);
cntServerAFCrange->value(25);
cntServerAFCrange->callback((Fl_Callback*)cb_cntServerAFCrange);
cntServerAFCrange->align(Fl_Align(FL_ALIGN_RIGHT));
cntServerAFCrange->when(FL_WHEN_CHANGED);
o->value(progdefaults.SearchRange);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntServerAFCrange
{ Fl_Check_Button* o = btnPSKmailSweetSpot = new Fl_Check_Button(562, 80, 142, 20, _("Reset to Carrier"));
btnPSKmailSweetSpot->tooltip(_("When no signal present"));
btnPSKmailSweetSpot->down_box(FL_DOWN_BOX);
btnPSKmailSweetSpot->value(1);
btnPSKmailSweetSpot->callback((Fl_Callback*)cb_btnPSKmailSweetSpot);
o->value(progdefaults.PSKmailSweetSpot);
} // Fl_Check_Button* btnPSKmailSweetSpot
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(256, 228, 490, 72, _("General"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Check_Button* o = btn_arq_s2n_report = new Fl_Check_Button(281, 253, 250, 20, _("Report ARQ frames average S/N"));
btn_arq_s2n_report->down_box(FL_DOWN_BOX);
btn_arq_s2n_report->callback((Fl_Callback*)cb_btn_arq_s2n_report);
o->value(progdefaults.Pskmails2nreport);
} // Fl_Check_Button* btn_arq_s2n_report
o->end();
} // Fl_Group* o
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Web/Pskmail"));
config_pages.push_back(p);
tab_tree->add(_("Web/Pskmail"));
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(200, 0, 600, 350, _("Web/WX"));
o->box(FL_ENGRAVED_BOX);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
o->hide();
{ Fl_Input* o = txt_wx_url = new Fl_Input(295, 63, 430, 25, _("Access URL"));
txt_wx_url->tooltip(_("Enter METAR data internet URL"));
txt_wx_url->callback((Fl_Callback*)cb_txt_wx_url);
txt_wx_url->when(FL_WHEN_CHANGED);
o->value(progdefaults.wx_url.c_str());
} // Fl_Input* txt_wx_url
{ btn_default_wx_url = new Fl_Button(727, 63, 60, 25, _("Default"));
btn_default_wx_url->tooltip(_("Default URL"));
btn_default_wx_url->callback((Fl_Callback*)cb_btn_default_wx_url);
} // Fl_Button* btn_default_wx_url
{ Fl_Input* o = inpWXsta = new Fl_Input(295, 99, 50, 24, _("METAR station ID code"));
inpWXsta->tooltip(_("for example KMDQ for\nHuntsville-Madison Executive Airport, AL"));
inpWXsta->callback((Fl_Callback*)cb_inpWXsta);
inpWXsta->align(Fl_Align(FL_ALIGN_RIGHT));
o->value(progdefaults.wx_sta.c_str());
} // Fl_Input* inpWXsta
{ btn_metar_search = new Fl_Button(528, 99, 130, 24, _("Search on web"));
btn_metar_search->callback((Fl_Callback*)cb_btn_metar_search);
} // Fl_Button* btn_metar_search
{ Fl_Check_Button* o = btn_wx_full = new Fl_Check_Button(303, 138, 70, 15, _("Full report"));
btn_wx_full->tooltip(_("Insert full METAR report"));
btn_wx_full->down_box(FL_DOWN_BOX);
btn_wx_full->callback((Fl_Callback*)cb_btn_wx_full);
o->value(progdefaults.wx_full);
} // Fl_Check_Button* btn_wx_full
{ Fl_Check_Button* o = btn_wx_station_name = new Fl_Check_Button(303, 162, 70, 15, _("METAR station location"));
btn_wx_station_name->tooltip(_("Add geopolitical name of METAR station"));
btn_wx_station_name->down_box(FL_DOWN_BOX);
btn_wx_station_name->callback((Fl_Callback*)cb_btn_wx_station_name);
o->value(progdefaults.wx_station_name);
} // Fl_Check_Button* btn_wx_station_name
{ Fl_Check_Button* o = btn_wx_condx = new Fl_Check_Button(303, 188, 70, 15, _("Conditions"));
btn_wx_condx->tooltip(_("current wx conditions"));
btn_wx_condx->down_box(FL_DOWN_BOX);
btn_wx_condx->callback((Fl_Callback*)cb_btn_wx_condx);
o->value(progdefaults.wx_condx);
} // Fl_Check_Button* btn_wx_condx
{ Fl_Check_Button* o = btn_wx_fahrenheit = new Fl_Check_Button(303, 227, 70, 15, _("Fahrenheit"));
btn_wx_fahrenheit->tooltip(_("report Fahrenheit"));
btn_wx_fahrenheit->down_box(FL_DOWN_BOX);
btn_wx_fahrenheit->callback((Fl_Callback*)cb_btn_wx_fahrenheit);
o->value(progdefaults.wx_fahrenheit);
} // Fl_Check_Button* btn_wx_fahrenheit
{ Fl_Check_Button* o = btn_wx_celsius = new Fl_Check_Button(522, 227, 70, 15, _("Celsius"));
btn_wx_celsius->tooltip(_("report Celsius"));
btn_wx_celsius->down_box(FL_DOWN_BOX);
btn_wx_celsius->callback((Fl_Callback*)cb_btn_wx_celsius);
o->value(progdefaults.wx_celsius);
} // Fl_Check_Button* btn_wx_celsius
{ Fl_Check_Button* o = btn_wx_mph = new Fl_Check_Button(303, 253, 70, 15, _("Miles / Hour"));
btn_wx_mph->tooltip(_("report miles per hour"));
btn_wx_mph->down_box(FL_DOWN_BOX);
btn_wx_mph->callback((Fl_Callback*)cb_btn_wx_mph);
o->value(progdefaults.wx_mph);
} // Fl_Check_Button* btn_wx_mph
{ Fl_Check_Button* o = btn_wx_kph = new Fl_Check_Button(521, 253, 70, 15, _("kilometers / hour"));
btn_wx_kph->tooltip(_("report kilometers per hour"));
btn_wx_kph->down_box(FL_DOWN_BOX);
btn_wx_kph->callback((Fl_Callback*)cb_btn_wx_kph);
o->value(progdefaults.wx_kph);
} // Fl_Check_Button* btn_wx_kph
{ Fl_Check_Button* o = btn_wx_inches = new Fl_Check_Button(303, 280, 70, 15, _("Inches Hg."));
btn_wx_inches->tooltip(_("report inches mercury"));
btn_wx_inches->down_box(FL_DOWN_BOX);
btn_wx_inches->callback((Fl_Callback*)cb_btn_wx_inches);
o->value(progdefaults.wx_inches);
} // Fl_Check_Button* btn_wx_inches
{ Fl_Check_Button* o = btn_wx_mbars = new Fl_Check_Button(522, 280, 70, 15, _("mbars"));
btn_wx_mbars->tooltip(_("report millibars"));
btn_wx_mbars->down_box(FL_DOWN_BOX);
btn_wx_mbars->callback((Fl_Callback*)cb_btn_wx_mbars);
o->value(progdefaults.wx_mbars);
} // Fl_Check_Button* btn_wx_mbars
CONFIG_PAGE *p = new CONFIG_PAGE(o, _("Web/WX"));
config_pages.push_back(p);
tab_tree->add(_("Web/WX"));
tab_tree->close(_("Web"));
o->end();
} // Fl_Group* o
{ btnSaveConfig = new Fl_Button(492, 355, 130, 22, _("Save"));
btnSaveConfig->callback((Fl_Callback*)cb_btnSaveConfig);
} // Fl_Button* btnSaveConfig
{ btnCloseConfig = new Fl_Return_Button(665, 355, 130, 22, _("Close"));
btnCloseConfig->callback((Fl_Callback*)cb_btnCloseConfig);
} // Fl_Return_Button* btnCloseConfig
{ btnResetConfig = new Fl_Button(238, 355, 130, 22, _("Restore defaults"));
btnResetConfig->tooltip(_("WARNING - this will over write ALL settings"));
btnResetConfig->callback((Fl_Callback*)cb_btnResetConfig);
} // Fl_Button* btnResetConfig
o->size_range(750, 380, 0, 380);
o->end();
} // Fl_Double_Window* o
return w;
}
void openConfig() {
if (!dlgConfig) createConfig();
progdefaults.loadDefaults();
}
void closeDialog() {
if (dlgConfig) dlgConfig->hide();
}
void WefaxDestDirSet(Fl_File_Chooser *w, void *userdata) {
/* http://www.fltk.org/documentation.php/doc-1.1/Fl_File_Chooser.html */
if( ( w->value() != NULL ) && ( ! w->shown() ) ) {
btnWefaxSaveDir->value( w->value() );
btnWefaxSaveDir->redraw();
cb_btnWefaxSaveDir( btnWefaxSaveDir, NULL );
}
}
void KmlDestDirSet(Fl_File_Chooser *w, void *userdata) {
/* http://www.fltk.org/documentation.php/doc-1.1/Fl_File_Chooser.html */
if( ( w->value() != NULL ) && ( ! w->shown() ) ) {
btnKmlSaveDir->value( w->value() );
btnKmlSaveDir->redraw();
cb_btnKmlSaveDir( btnKmlSaveDir, NULL );
}
}
| 829,948
|
C++
|
.cxx
| 17,408
| 41.219956
| 186
| 0.656005
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,090
|
tod_clock.cxx
|
w1hkj_fldigi/src/dialogs/tod_clock.cxx
|
// =====================================================================
//
// TOD_clock.cxx
//
// interface to tcpip application fdserver.tcl
// fdserver is a multiple client tcpip server
//
// Copyright (C) 2016
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// =====================================================================
#include <iostream>
#include <cmath>
#include <cstring>
#include <vector>
#include <list>
#include <stdlib.h>
#include <FL/Fl_Text_Display.H>
#include <FL/Fl_Text_Buffer.H>
#include "fl_digi.h"
#include "rigsupport.h"
#include "modem.h"
#include "trx.h"
#include "configuration.h"
#include "main.h"
#include "waterfall.h"
#include "macros.h"
#include "qrunner.h"
#include "debug.h"
#include "status.h"
#include "icons.h"
#include "logsupport.h"
#include "fd_logger.h"
#include "fd_view.h"
#include "confdialog.h"
#include "timeops.h"
#include "nanoIO.h"
LOG_FILE_SOURCE(debug::LOG_FD);
static pthread_t TOD_thread;
static pthread_mutex_t TX_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t time_mutex = PTHREAD_MUTEX_INITIALIZER;
static char ztbuf[20] = "20120602 123000";
static char ltbuf[20] = "20120602 123000";
static struct timeval tx_start_val;
static struct timeval tx_last_val;
static struct timeval now_val;
extern void xmtrcv_cb(Fl_Widget *, void *);
static int tx_timeout = 0;
static int macro_time = -1;
void kill_tx(void *)
{
wf->xmtrcv->value(0);
xmtrcv_cb(wf->xmtrcv, 0);
fl_alert2("TX timeout expired!\nAre you awake?");
}
void service_deadman()
{
guard_lock txlock(&TX_mutex);
if (!tx_timeout) return;
if (--tx_timeout == 0) {
Fl::awake(kill_tx);
}
}
void start_deadman()
{
guard_lock txlock(&TX_mutex);
tx_timeout = 60 * progdefaults.tx_timeout;
}
void stop_deadman()
{
guard_lock txlock(&TX_mutex);
tx_timeout = 0;
}
void start_macro_time()
{
macro_time = 0;
}
int stop_macro_time()
{
return macro_time;
}
const timeval tmval(void)
{
struct timeval t1;
{
guard_lock lk(&time_mutex);
gettimeofday(&t1, NULL);
}
return t1;
}
const double zusec(void)
{
struct timeval t1;
{
guard_lock lk(&time_mutex);
gettimeofday(&t1, NULL);
}
double usecs = t1.tv_sec * 1000000L;
usecs += t1.tv_usec;
return usecs;
}
const unsigned long zmsec(void)
{
struct timeval t1;
{
guard_lock lk(&time_mutex);
gettimeofday(&t1, NULL);
}
unsigned long msecs = t1.tv_sec * 1000000L;
msecs += t1.tv_usec;
msecs /= 1000L;
return msecs;
}
const char* zdate(void)
{
return ztbuf;
}
const char* ztime(void)
{
return ztbuf + 9;
}
const char* ldate(void)
{
return ltbuf;
}
const char *ltime(void)
{
return ltbuf + 9;
}
const char* zshowtime(void) {
static char s[5];
strncpy(s, &ztbuf[9], 4);
s[4] = 0;
return (const char *)s;
}
static char tx_time[20];
static bool TOD_exit = false;
static bool TOD_enabled = false;
static bool tx_timer_active = false;
void show_tx_timer()
{
if (!tx_timer) return;
if (progdefaults.show_tx_timer && tx_timer_active) {
snprintf(tx_time, sizeof(tx_time),"%02d:%02d",
(int)((now_val.tv_sec - tx_start_val.tv_sec)/60),
(int)((now_val.tv_sec - tx_start_val.tv_sec) % 60 ));
tx_timer->color(FL_DARK_RED);
tx_timer->labelcolor(FL_YELLOW);
tx_timer->label(tx_time);
tx_timer->redraw_label();
tx_timer->redraw();
} else {
tx_timer->color(FL_BACKGROUND_COLOR);
tx_timer->labelcolor(FL_BACKGROUND_COLOR);
tx_timer->redraw_label();
tx_timer->redraw();
}
}
void start_tx_timer()
{
tx_last_val = tx_start_val = now_val;
tx_timer_active = true;
REQ(show_tx_timer);
}
void stop_tx_timer()
{
if (!tx_timer) return;
tx_timer_active = false;
}
void update_tx_timer()
{
if (tx_last_val.tv_sec == now_val.tv_sec) return;
tx_last_val = now_val;
show_tx_timer();
service_deadman();
macro_time++;
}
//void ztimer(void *)
static void show_ztimer()
{
if (!inpTimeOff1) return;
update_tx_timer();
sTime_off = zshowtime();
sDate_off = zdate();
inpTimeOff1->value(zshowtime());
inpTimeOff2->value(zshowtime());
inpTimeOff3->value(zshowtime());
inpTimeOff1->redraw();
inpTimeOff2->redraw();
inpTimeOff3->redraw();
}
static void ztimer()
{
struct tm ztm, ltm;
time_t t_temp;
t_temp=(time_t)now_val.tv_sec;
gmtime_r(&t_temp, &ztm);
if (!strftime(ztbuf, sizeof(ztbuf), "%Y%m%d %H%M%S", &ztm))
memset(ztbuf, 0, sizeof(ztbuf));
else
ztbuf[8] = '\0';
localtime_r(&t_temp, <m);
if (!strftime(ltbuf, sizeof(ltbuf), "%Y%m%d %H%M%S", <m))
memset(ltbuf, 0, sizeof(ltbuf));
else
ltbuf[8] = '\0';
REQ(show_ztimer);
}
//======================================================================
// TOD Thread loop
//======================================================================
void *TOD_loop(void *args)
{
SET_THREAD_ID(TOD_TID);
#define LOOP 250
int cnt = 0;
while(1) {
if (TOD_exit) break;
if (++cnt == 4) {
guard_lock tmlock(&time_mutex);
gettimeofday(&now_val, NULL);
ztimer();
cnt = 0;
}
REQ(nanoIO_read_pot);
MilliSleep(LOOP);
}
// exit the TOD thread
SET_THREAD_CANCEL();
return NULL;
}
//======================================================================
//
//======================================================================
void TOD_init(void)
{
TOD_exit = false;
if (pthread_create(&TOD_thread, NULL, TOD_loop, NULL) < 0) {
LOG_ERROR("%s", "pthread_create failed");
return;
}
LOG_INFO("%s", "Time Of Day thread started");
TOD_enabled = true;
}
//======================================================================
//
//======================================================================
void TOD_close(void)
{
if (!TOD_enabled) return;
TOD_exit = true;
pthread_join(TOD_thread, NULL);
TOD_enabled = false;
LOG_INFO("%s", "Time Of Day thread terminated. ");
}
| 6,385
|
C++
|
.cxx
| 269
| 21.921933
| 72
| 0.635644
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,091
|
fl_digi.cxx
|
w1hkj_fldigi/src/dialogs/fl_digi.cxx
|
// ----------------------------------------------------------------------------
//
// fl_digi.cxx
//
// Copyright (C) 2006-2021
// Dave Freese, W1HKJ
// Copyright (C) 2007-2010
// Stelios Bounanos, M0GLD
// Copyright (C) 2020-2021
// John Phelps, KL4YFD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <sys/types.h>
#ifdef __WOE32__
# ifdef __CYGWIN__
# include <w32api/windows.h>
# else
# include <windows.h>
# endif
#endif
#include <cstdlib>
#include <cstdarg>
#include <string>
#include <fstream>
#include <algorithm>
#include <map>
#ifndef __WOE32__
#include <sys/wait.h>
#endif
//++++++++++++++++++
#include <FL/Fl_Scroll.H>
extern Fl_Scroll *wefax_pic_rx_scroll;
#include "gettext.h"
#include "fl_digi.h"
#include <FL/Fl.H>
#include <FL/fl_ask.H>
#include <FL/Fl_Pixmap.H>
#include <FL/Fl_Image.H>
//#include <FL/Fl_Tile.H>
#include <FL/x.H>
#include <FL/Fl_Help_Dialog.H>
#include <FL/Fl_Progress.H>
#include <FL/Fl_Tooltip.H>
#include <FL/Fl_Tabs.H>
#include <FL/Fl_Multiline_Input.H>
#include <FL/Fl_Menu_Bar.H>
#include <FL/Fl_Pack.H>
#include "waterfall.h"
#include "raster.h"
#include "progress.h"
#include "Panel.h"
#include "main.h"
#include "threads.h"
#include "trx.h"
#if USE_HAMLIB
#include "hamlib.h"
#endif
#include "timeops.h"
#include "rigio.h"
#include "nullmodem.h"
#include "psk.h"
#include "cw.h"
#include "mfsk.h"
#include "wefax.h"
#include "wefax-pic.h"
#include "navtex.h"
#include "mt63.h"
#include "view_rtty.h"
#include "olivia.h"
#include "contestia.h"
#include "thor.h"
#include "dominoex.h"
#include "feld.h"
#include "throb.h"
//#include "pkt.h"
#include "fsq.h"
#include "ifkp.h"
#include "wwv.h"
#include "analysis.h"
#include "ssb.h"
#include "fmt.h"
#include "fmt_dialog.h"
#include "fileselect.h"
#include "smeter.h"
#include "pwrmeter.h"
#include "ascii.h"
#include "globals.h"
#include "misc.h"
#include "FTextRXTX.h"
#include "confdialog.h"
#include "configuration.h"
#include "status.h"
#include "macros.h"
#include "macroedit.h"
#include "logger.h"
#include "lookupcall.h"
#include "fd_logger.h"
#include "fd_view.h"
#include "font_browser.h"
#include "icons.h"
#include "pixmaps.h"
#include "rigsupport.h"
#include "logsupport.h"
#include "qrunner.h"
#include "Viewer.h"
#include "soundconf.h"
#include "htmlstrings.h"
# include "xmlrpc.h"
#if BENCHMARK_MODE
# include "benchmark.h"
#endif
#include "debug.h"
#include "re.h"
#include "network.h"
#include "spot.h"
#include "dxcc.h"
#include "locator.h"
#include "notify.h"
#include "strutil.h"
#include "test_signal.h"
#include "logbook.h"
#include "rx_extract.h"
#include "speak.h"
#include "flmisc.h"
#include "arq_io.h"
#include "data_io.h"
#include "kmlserver.h"
#include "psm/psm.h"
#include "n3fjp_logger.h"
#include "dx_cluster.h"
#include "dx_dialog.h"
#include "notifydialog.h"
#include "macroedit.h"
#include "rx_extract.h"
#include "wefax-pic.h"
#include "charsetdistiller.h"
#include "charsetlist.h"
#include "outputencoder.h"
#include "record_loader.h"
#include "record_browse.h"
#include "squelch_status.h"
#include "winkeyer.h"
#include "nanoIO.h"
#include "audio_alert.h"
#include "spectrum_viewer.h"
#include "contest.h"
#include "tabdefs.h"
#define CB_WHEN FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS | FL_WHEN_RELEASE_ALWAYS
#define LOG_TO_FILE_MLABEL _("Log all RX/TX text")
#define RIGCONTROL_MLABEL TAB_RIG_CONTROL
#define OPMODES_MLABEL _("Op &Mode")
#define OPMODES_FEWER _("Show fewer modes")
#define OPMODES_ALL _("Show all modes")
#define OLIVIA_MLABEL "Olivia"
#define CONTESTIA_MLABEL "Contestia"
#define RTTY_MLABEL "RTTY"
#define VIEW_MLABEL _("&View")
#define MFSK_IMAGE_MLABEL _("MFSK Image")
#define THOR_IMAGE_MLABEL _("THOR Raw Image")
#define IFKP_IMAGE_MLABEL _("IFKP Raw Image")
#define WEFAX_TX_IMAGE_MLABEL _("Weather Fax Image TX")
#define CONTEST_MLABEL _("Contest")
#define COUNTRIES_MLABEL _("C&ountries")
#define UI_MLABEL _("&UI")
#define RIGLOG_FULL_MLABEL _("Full")
#define RIGLOG_PARTIAL_MLABEL _("Partial")
#define RIGLOG_NONE_MLABEL _("None")
#define DOCKEDSCOPE_MLABEL _("Docked scope")
#define WF_MLABEL _("Minimal controls")
#define SHOW_CHANNELS _("Show channels")
#define LOG_CONNECT_SERVER _("Connect to server")
// MAXIMUM allowable std::string lengths in log fields
#define MAX_FREQ 14
#define MAX_TIME 4
#define MAX_RST 3
#define MAX_CALL 30
#define MAX_NAME 30
#define MAX_AZ 3
#define MAX_QTH 50
#define MAX_STATE 2
#define MAX_LOC 8
#define MAX_SERNO 10
#define MAX_XCHG_IN 50
#define MAX_COUNTRY 50
#define MAX_COUNTY 100
#define MAX_NOTES 400
#define MAX_SECTION 20
#define MAX_CLASS 10
void set599();
//regular expression parser using by mainViewer (pskbrowser)
fre_t seek_re("CQ", REG_EXTENDED | REG_ICASE | REG_NOSUB);
bool bWF_only = false;
Fl_Double_Window *fl_digi_main = (Fl_Double_Window *)0;
Fl_Double_Window *scopeview = (Fl_Double_Window *)0;
Fl_Double_Window *field_day_viewer = (Fl_Double_Window *)0;
Fl_Double_Window *dxcluster_viewer = (Fl_Double_Window *)0;
Fl_Double_Window *rxaudio_dialog = (Fl_Double_Window *)0;
Fl_Help_Dialog *help_dialog = (Fl_Help_Dialog *)0;
Fl_Button *btnDockMacro[48];
static Fl_Group *mnuFrame;
Fl_Menu_Bar *mnu;
Fl_Box *tx_timer = (Fl_Box *)0;
Fl_Light_Button *btnAutoSpot = (Fl_Light_Button *)0;
Fl_Light_Button *btnTune = (Fl_Light_Button *)0;
Fl_Light_Button *btnRSID = (Fl_Light_Button *)0;
Fl_Light_Button *btnTxRSID = (Fl_Light_Button *)0;
Fl_Button *btnMacroTimer = (Fl_Button *)0;
Fl_Group *center_group = (Fl_Group *)0;
Fl_Group *text_group;
Fl_Group *wefax_group = 0;
Fl_Group *mvgroup = 0;
Panel *text_panel = 0;
//------------------------------------------------------------------------------
// groups and widgets used exclusively for FSQCALL
Fl_Group *fsq_group = 0;
Fl_Group *fsq_upper = 0;
Fl_Group *fsq_lower = 0;
Fl_Group *fsq_upper_left = 0;
Fl_Group *fsq_upper_right = 0;
Fl_Group *fsq_lower_left = 0;
Fl_Group *fsq_lower_right = 0;
Panel *fsq_left = (Panel *)0;
Fl_Box *fsq_minbox = (Fl_Box *)0;
FTextRX *fsq_rx_text = (FTextRX *)0;
FTextTX *fsq_tx_text = (FTextTX *)0;
Fl_Browser *fsq_heard = (Fl_Browser *)0;
Fl_Light_Button *btn_FSQCALL = (Fl_Light_Button *)0;
Fl_Light_Button *btn_SELCAL = (Fl_Light_Button *)0;
Fl_Light_Button *btn_MONITOR = (Fl_Light_Button *)0;
Fl_Button *btn_FSQQTH = (Fl_Button *)0;
Fl_Button *btn_FSQQTC = (Fl_Button *)0;
Fl_Button *btn_FSQCQ = (Fl_Button *)0;
Progress *ind_fsq_speed = (Progress *)0;
Progress *ind_fsq_s2n = (Progress *)0;
//------------------------------------------------------------------------------
// groups and widgets used exclusively for IFKP
Fl_Group *ifkp_group = (Fl_Group *)0;
Fl_Box *ifkp_minbox = (Fl_Box *)0;
Fl_Group *ifkp_left = (Fl_Group *)0;
FTextRX *ifkp_rx_text = (FTextRX *)0;
FTextTX *ifkp_tx_text = (FTextTX *)0;
Fl_Group *ifkp_right = (Fl_Group *)0;
Fl_Browser *ifkp_heard = (Fl_Browser *)0;
Progress *ifkp_s2n_progress = (Progress *)0;
picture *ifkp_avatar = (picture *)0;
//----------------------------------------------------------------------
// FMT group
Fl_Group *fmt_group = (Fl_Group *)0;
//------------------------------------------------------------------------------
// thor avatar
picture *thor_avatar = (picture *)0;
//------------------------------------------------------------------------------
Fl_Group *macroFrame1 = (Fl_Group *)0;
Fl_Group *macroFrame2 = (Fl_Group *)0;
Fl_Group *mf_group1 = (Fl_Group *)0;
Fl_Group *mf_group2 = (Fl_Group *)0;
Fl_Group *tbar = (Fl_Group *)0;
FTextRX *ReceiveText = 0;
FTextTX *TransmitText = 0;
Raster *FHdisp;
Fl_Box *minbox;
int oix;
pskBrowser *mainViewer = (pskBrowser *)0;
Fl_Input2 *txtInpSeek = (Fl_Input2 *)0;
status_box *StatusBar = (status_box *)0;
Fl_Box *Status2 = (Fl_Box *)0;
Fl_Box *Status1 = (Fl_Box *)0;
Fl_Counter2 *cntTxLevel = (Fl_Counter2 *)0;
Fl_Counter2 *cntCW_WPM=(Fl_Counter2 *)0;
Fl_Button *btnCW_Default=(Fl_Button *)0;
Fl_Box *WARNstatus = (Fl_Box *)0;
Fl_Button *MODEstatus = (Fl_Button *)0;
Fl_Button *btnMacro[NUMMACKEYS * NUMKEYROWS];
Fl_Button *btnAltMacros1 = (Fl_Button *)0;
Fl_Button *btnAltMacros2 = (Fl_Button *)0;
Fl_Light_Button *btnAFC = (Fl_Light_Button *)0;
Fl_Light_Button *btnSQL = (Fl_Light_Button *)0;
Fl_Light_Button *btnPSQL = (Fl_Light_Button *)0;
Fl_Box *corner_box = (Fl_Box *)0;
vumeter *VuMeter = (vumeter *)0;
Fl_Box *VuBox = (Fl_Box *)0;
Fl_Group *RigControlFrame = (Fl_Group *)0;
Fl_Group *RigViewerFrame = (Fl_Group *)0;
cFreqControl *qsoFreqDisp = (cFreqControl *)0;
Fl_Group *qso_combos = (Fl_Group *)0;
Fl_ListBox *qso_opMODE = (Fl_ListBox *)0;
Fl_Group *qso_opGROUP = (Fl_Group *)0;
Fl_ListBox *qso_opBW = (Fl_ListBox *)0;
Fl_Button *qso_btnBW1 = (Fl_Button *)0;
Fl_ListBox *qso_opBW1 = (Fl_ListBox *)0;
Fl_Button *qso_btnBW2 = (Fl_Button *)0;
Fl_ListBox *qso_opBW2 = (Fl_ListBox *)0;
Fl_Button *qso_opPICK = (Fl_Button *)0;
Fl_Button *qsoClear;
Fl_Button *qsoSave;
Fl_Input2 *inpFreq = (Fl_Input2 *)0;
Fl_Input2 *inpTimeOff = (Fl_Input2 *)0;
Fl_Input2 *inpTimeOn = (Fl_Input2 *)0;
Fl_Button *btnTimeOn;
Fl_Input2 *inpCall = (Fl_Input2 *)0;
Fl_Input2 *inpName = (Fl_Input2 *)0;
Fl_Input2 *inpRstIn = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut = (Fl_Input2 *)0;
Fl_Input2 *inpQTH = (Fl_Input2 *)0;
Fl_Input2 *inpQth = (Fl_Input2 *)0;
Fl_Input2 *inpLoc = (Fl_Input2 *)0;
Fl_Input2 *inpState = (Fl_Input2 *)0;
Fl_Input2 *inpCounty = (Fl_Input2 *)0;
Fl_ComboBox *cboCountyQSO = (Fl_ComboBox *)0;
Fl_ComboBox *cboCountry = (Fl_ComboBox *)0;
Fl_ComboBox *cboCountryQSO = (Fl_ComboBox *)0;
Fl_ComboBox *cboCountryAICW2 = (Fl_ComboBox *)0;
Fl_ComboBox *cboCountryAIDX = (Fl_ComboBox *)0;
Fl_ComboBox *cboCountryWAE2 = (Fl_ComboBox *)0;
Fl_ComboBox *cboCountryAIDX2 = (Fl_ComboBox *)0;
Fl_ComboBox *cboCountryRTU2 = (Fl_ComboBox *)0;
Fl_Input2 *inpSerNo = (Fl_Input2 *)0;
Fl_Input2 *outSerNo = (Fl_Input2 *)0;
Fl_Input2 *inpXchgIn = (Fl_Input2 *)0;
// Field Day fields
Fl_Input2 *inpClass = (Fl_Input2 *)0;
Fl_Input2 *inpSection = (Fl_Input2 *)0;
// CQWW fields
Fl_Input2 *inp_CQzone = (Fl_Input2 *)0;
Fl_Input2 *inp_CQstate = (Fl_Input2 *)0;
// Kids Day fields
Fl_Input2 *inp_KD_age = (Fl_Input2 *)0;
Fl_Input2 *inpVEprov = (Fl_Input2 *)0;
Fl_Input2 *inpNotes = (Fl_Input2 *)0;
Fl_Input2 *inpAZ = (Fl_Input2 *)0;
Fl_Button *qsoTime;
Fl_Button *btnQRZ;
//Fl_Button *CFtoggle = (Fl_Button *)0;
// Top Frame 1 group controls
Fl_Group *Logging_frame = (Fl_Group *)0;
Fl_Group *Logging_frame_1 = (Fl_Group *)0;
Fl_Tabs *NFtabs = (Fl_Tabs *)0;
Fl_Group *gGEN_QSO_1 = (Fl_Group *)0;
Fl_Group *NotesFrame = (Fl_Group *)0;
Fl_Group *Ccframe = (Fl_Group *)0;
Fl_Group *TopFrame1 = (Fl_Group *)0;
Fl_Input2 *inpFreq1 = (Fl_Input2 *)0;
Fl_Input2 *inpTimeOff1 = (Fl_Input2 *)0;
Fl_Input2 *inpTimeOn1 = (Fl_Input2 *)0;
Fl_Button *btnTimeOn1;
Fl_Input2 *inpCall1 = (Fl_Input2 *)0;
Fl_Input2 *inpName1 = (Fl_Input2 *)0;
Fl_Input2 *inpRstIn1 = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut1 = (Fl_Input2 *)0;
Fl_Input2 *inpState1 = (Fl_Input2 *)0;
Fl_Input2 *inpLoc1 = (Fl_Input2 *)0;
// Generic contest sub frame
Fl_Group *gGEN_CONTEST = (Fl_Group *)0;
Fl_Input2 *inpXchgIn1 = (Fl_Input2 *)0;
Fl_Input2 *outSerNo1 = (Fl_Input2 *)0;
Fl_Input2 *inpSerNo1 = (Fl_Input2 *)0;
// FD contest sub frame
Fl_Group *gFD = (Fl_Group *)0;
Fl_Input2 *inp_FD_class1 = (Fl_Input2 *)0;
Fl_Input2 *inp_FD_section1 = (Fl_Input2 *)0;
// Kids Day fields
Fl_Group *gKD_1 = (Fl_Group *)0;
Fl_Input2 *inp_KD_age1 = (Fl_Input2 *)0;
Fl_Input2 *inp_KD_state1 = (Fl_Input2 *)0;
Fl_Input2 *inp_KD_VEprov1 = (Fl_Input2 *)0;
Fl_Input2 *inp_KD_XchgIn1 = (Fl_Input2 *)0;
// CQWW RTTY contest sub frame
Fl_Group *gCQWW_RTTY = (Fl_Group *)0;
Fl_Input2 *inp_CQzone1 = (Fl_Input2 *)0;
Fl_Input2 *inp_CQstate1 = (Fl_Input2 *)0;
// CQWW DX contest sub frame
Fl_Group *gCQWW_DX = (Fl_Group *)0;
Fl_Input2 *inp_CQDXzone1 = (Fl_Input2 *)0;
// CW Sweepstakes contest sub frame
Fl_Group *gCWSS = (Fl_Group *)0;
Fl_Input2 *outSerNo3 = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_SerialNoR = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Precedence = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Check = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Section = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_SerialNoR1 = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Precedence1 = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Check1 = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Section1 = (Fl_Input2 *)0;
// 1010 contest
Fl_Group *g1010 = (Fl_Group *)0;
Fl_Input2 *inp_1010_nr = (Fl_Input2 *)0;
Fl_Input2 *inp_1010_nr1 = (Fl_Input2 *)0;
Fl_Input2 *inp_1010_XchgIn1 = (Fl_Input2 *)0;
// VHF contest
Fl_Group *gVHF = (Fl_Group *)0;
Fl_Input2 *inp_vhf_RSTin1 = (Fl_Input2 *)0;
Fl_Input2 *inp_vhf_RSTout1 = (Fl_Input2 *)0;
Fl_Input2 *inp_vhf_Loc1 = (Fl_Input2 *)0;
// ARRL Round Up Contest
Fl_Group *gARR = (Fl_Group *)0;
Fl_Input2 *inp_ARR_Name2 = (Fl_Input2 *)0;
Fl_Input2 *inp_ARR_check = (Fl_Input2 *)0;
Fl_Input2 *inp_ARR_check1 = (Fl_Input2 *)0;
Fl_Input2 *inp_ARR_check2 = (Fl_Input2 *)0;
Fl_Input2 *inp_ARR_XchgIn1 = (Fl_Input2 *)0;
Fl_Input2 *inp_ARR_XchgIn2 = (Fl_Input2 *)0;
// ARRL School Roundup - LOG_ASCR
Fl_Group *gASCR = (Fl_Group *)0;
Fl_Input2 *inp_ASCR_class1 = (Fl_Input2 *)0;
Fl_Input2 *inp_ASCR_XchgIn1 = (Fl_Input2 *)0;
// LOG_NAQP - North American QSO Party
Fl_Group *gNAQP = (Fl_Group *)0;
Fl_Input2 *inpSPCnum = (Fl_Input2 *)0; // same name used in N3FJP loggers
Fl_Input2 *inpSPCnum_NAQP1 = (Fl_Input2 *)0;
// LOG_ARRL_RTTY - ARRL RTTY Roundup
Fl_Group *gARRL_RTTY= (Fl_Group *)0;
Fl_Input2 *inpRTU_stpr1 = (Fl_Input2 *)0;
Fl_Input2 *inpRTU_serno1 = (Fl_Input2 *)0;
// LOG_IARI - Italian International DX
Fl_Group *gIARI = (Fl_Group *)0;
Fl_Input2 *inp_IARI_PR1 = (Fl_Input2 *)0;
Fl_Input2 *out_IARI_SerNo1 = (Fl_Input2 *)0;
Fl_Input2 *inp_IARI_SerNo1 = (Fl_Input2 *)0;
Fl_Input2 *inp_IARI_RSTin2 = (Fl_Input2 *)0;
Fl_Input2 *inp_IARI_RSTout2 = (Fl_Input2 *)0;
Fl_Input2 *out_IARI_SerNo2 = (Fl_Input2 *)0;
Fl_Input2 *inp_IARI_SerNo2 = (Fl_Input2 *)0;
Fl_Input2 *inp_IARI_PR2= (Fl_Input2 *)0;
Fl_ComboBox *cboCountryIARI2 = (Fl_ComboBox *)0;
// LOG_NAS - North American Sprint
Fl_Group *gNAS = (Fl_Group *)0;
Fl_Input2 *outSerNo5 = (Fl_Input2 *)0;
Fl_Input2 *inp_ser_NAS1 = (Fl_Input2 *)0;
Fl_Input2 *inpSPCnum_NAS1 = (Fl_Input2 *)0;
// LOG_AIDX - African All Mode
Fl_Group *gAIDX = (Fl_Group *)0;
Fl_Input2 *outSerNo7 = (Fl_Input2 *)0;
Fl_Input2 *inpSerNo3 = (Fl_Input2 *)0;
// LOG_JOTA - Jamboree On The Air
Fl_Group *gJOTA = (Fl_Group *)0;
Fl_Input2 *inp_JOTA_troop = (Fl_Input2 *)0;
Fl_Input2 *inp_JOTA_scout = (Fl_Input2 *)0;
Fl_Input2 *inp_JOTA_scout1 = (Fl_Input2 *)0;
Fl_Input2 *inp_JOTA_troop1 = (Fl_Input2 *)0;
Fl_Input2 *inp_JOTA_spc = (Fl_Input2 *)0;
Fl_Input2 *inp_JOTA_spc1 = (Fl_Input2 *)0;
// LOG_AICW - ARRL International DX (cw)
Fl_Group *gAICW = (Fl_Group *)0;
Fl_Input2 *inpSPCnum_AICW1 = (Fl_Input2 *)0;
// LOG_SQSO
Fl_Group *gSQSO = (Fl_Group *)0;
Fl_Input2 *inpSQSO_state1 = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_state2 = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_county1 = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_county2 = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_serno1 = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_serno2 = (Fl_Input2 *)0;
Fl_Input2 *outSQSO_serno1 = (Fl_Input2 *)0;
Fl_Input2 *outSQSO_serno2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstIn_SQSO2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut_SQSO2 = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_name2 = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_category = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_category1 = (Fl_Input2 *)0;
Fl_Input2 *inpSQSO_category2 = (Fl_Input2 *)0;
// LOG_CQ_WPX
Fl_Group *gCQWPX = (Fl_Group *)0;
Fl_Input2 *inpSerNo_WPX1 = (Fl_Input2 *)0;
Fl_Input2 *inpSerNo_WPX2 = (Fl_Input2 *)0;
Fl_Input2 *outSerNo_WPX1 = (Fl_Input2 *)0;
Fl_Input2 *outSerNo_WPX2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstIn_WPX2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut_WPX2 = (Fl_Input2 *)0;
// LOG_WAE
Fl_Group *gWAE = (Fl_Group *)0;
Fl_Input2 *inpSerNo_WAE1 = (Fl_Input2 *)0;
Fl_Input2 *inpSerNo_WAE2 = (Fl_Input2 *)0;
Fl_Input2 *outSerNo_WAE1 = (Fl_Input2 *)0;
Fl_Input2 *outSerNo_WAE2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstIn_WAE2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut_WAE2 = (Fl_Input2 *)0;
//----------------------------------------------------------------------
// Single Line Rig / Logging Controls
cFreqControl *qsoFreqDisp1 = (cFreqControl *)0;
// Top Frame 2 group controls - no contest
Fl_Group *TopFrame2 = (Fl_Group *)0;
cFreqControl *qsoFreqDisp2 = (cFreqControl *)0;
Fl_Input2 *inpTimeOff2 = (Fl_Input2 *)0;
Fl_Input2 *inpTimeOn2 = (Fl_Input2 *)0;
Fl_Button *btnTimeOn2;
Fl_Input2 *inpCall2 = (Fl_Input2 *)0;
Fl_Input2 *inpName2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstIn2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut2 = (Fl_Input2 *)0;
Fl_Button *qso_opPICK2;
Fl_Button *qsoClear2;
Fl_Button *qsoSave2;
Fl_Button *btnQRZ2;
// Top Frame 3 group controls - contest
Fl_Group *TopFrame3 = (Fl_Group *)0;
Fl_Group *TopFrame3a = (Fl_Group *)0;
Fl_Group *log_generic_frame = (Fl_Group *)0;
Fl_Group *log_fd_frame = (Fl_Group *)0;
Fl_Group *log_kd_frame = (Fl_Group *)0;
Fl_Group *log_1010_frame = (Fl_Group *)0;
Fl_Group *log_arr_frame = (Fl_Group *)0;
Fl_Group *log_vhf_frame = (Fl_Group *)0;
Fl_Group *log_cqww_frame = (Fl_Group *)0;
Fl_Group *log_cqww_rtty_frame = (Fl_Group *)0;
Fl_Group *log_cqss_frame = (Fl_Group *)0;
Fl_Group *log_cqwpx_frame = (Fl_Group *)0;
Fl_Group *log_ascr_frame = (Fl_Group *)0;
Fl_Group *log_naqp_frame = (Fl_Group *)0;
Fl_Group *log_rtty_frame = (Fl_Group *)0;
Fl_Group *log_iari_frame = (Fl_Group *)0;
Fl_Group *log_nas_frame = (Fl_Group *)0;
Fl_Group *log_aidx_frame = (Fl_Group *)0;
Fl_Group *log_jota_frame = (Fl_Group *)0;
Fl_Group *log_aicw_frame = (Fl_Group *)0;
Fl_Group *log_sqso_frame = (Fl_Group *)0;
Fl_Group *log_wae_frame = (Fl_Group *)0;
cFreqControl *qsoFreqDisp3 = (cFreqControl *)0;
Fl_Button *qso_opPICK3;
Fl_Button *qsoClear3;
Fl_Button *qsoSave3;
Fl_Group *TopFrame3b = (Fl_Group *)0;
Fl_Input2 *inpCall3 = (Fl_Input2 *)0;
// Generic contest fields
Fl_Input2 *inpTimeOff3 = (Fl_Input2 *)0;
Fl_Input2 *inpTimeOn3 = (Fl_Input2 *)0;
Fl_Button *btnTimeOn3;
Fl_Input2 *outSerNo2 = (Fl_Input2 *)0;
Fl_Input2 *inpSerNo2 = (Fl_Input2 *)0;
Fl_Input2 *inpXchgIn2 = (Fl_Input2 *)0;
// Field Day fields
Fl_Input2 *inpTimeOff4 = (Fl_Input2 *)0;
Fl_Input2 *inpTimeOn4 = (Fl_Input2 *)0;
Fl_Button *btnTimeOn4;
Fl_Input2 *inp_FD_class2 = (Fl_Input2 *)0;
Fl_Input2 *inp_FD_section2 = (Fl_Input2 *)0;
// Kids Day fields
Fl_Input2 *inp_KD_name2 = (Fl_Input2 *)0;
Fl_Input2 *inp_KD_age2 = (Fl_Input2 *)0;
Fl_Input2 *inp_KD_state2 = (Fl_Input2 *)0;
Fl_Input2 *inp_KD_VEprov2 = (Fl_Input2 *)0;
Fl_Input2 *inp_KD_XchgIn2 = (Fl_Input2 *)0;
// CQWW RTTY fields
Fl_Input2 *inp_CQ_RSTin2 = (Fl_Input2 *)0;
Fl_Input2 *inp_CQ_RSTout2 = (Fl_Input2 *)0;
Fl_Input2 *inp_CQzone2 = (Fl_Input2 *)0;
Fl_Input2 *inp_CQstate2 = (Fl_Input2 *)0;
Fl_ComboBox *cboCountryCQ2 = (Fl_ComboBox *)0;
// CQWW DX fields
Fl_Input2 *inp_CQDX_RSTin2 = (Fl_Input2 *)0;
Fl_Input2 *inp_CQDX_RSTout2 = (Fl_Input2 *)0;
Fl_Input2 *inp_CQDXzone2 = (Fl_Input2 *)0;
Fl_ComboBox *cboCountryCQDX2 = (Fl_ComboBox *)0;
// CW Sweepstakes contest sub frame
Fl_Input2 *outSerNo4 = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_SerialNoR2 = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Precedence2 = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Check2 = (Fl_Input2 *)0;
Fl_Input2 *inp_SS_Section2 = (Fl_Input2 *)0;
// 1010 contest
Fl_Input2 *inp_1010_name2 = (Fl_Input2 *)0;
Fl_Input2 *inp_1010_nr2 = (Fl_Input2 *)0;
Fl_Input2 *inp_1010_XchgIn2 = (Fl_Input2 *)0;
// VHF contest
Fl_Input2 *inp_vhf_RSTin2 = (Fl_Input2 *)0;
Fl_Input2 *inp_vhf_RSTout2 = (Fl_Input2 *)0;
Fl_Input2 *inp_vhf_Loc2 = (Fl_Input2 *)0;
// ARRL School Roundup - LOG_ASCR
Fl_Input2 *inp_ASCR_name2 = (Fl_Input2 *)0;
Fl_Input2 *inp_ASCR_class2 = (Fl_Input2 *)0;
Fl_Input2 *inp_ASCR_XchgIn2 = (Fl_Input2 *)0;
Fl_Input2 *inp_ASCR_RSTin2 = (Fl_Input2 *)0;
Fl_Input2 *inp_ASCR_RSTout2 = (Fl_Input2 *)0;
// LOG_NAQP
Fl_Input2 *inpTimeOff5 = (Fl_Input2 *)0;
Fl_Input2 *inpTimeOn5 = (Fl_Input2 *)0;
Fl_Button *btnTimeOn5;
Fl_Input2 *inpNAQPname2;
Fl_Input2 *inpSPCnum_NAQP2 = (Fl_Input2 *)0;
// LOG_ARRL_RTTY - ARRL RTTY Roundup
Fl_Input2 *inpRTU_stpr2 = (Fl_Input2 *)0;
Fl_Input2 *inpRTU_RSTin2 = (Fl_Input2 *)0;
Fl_Input2 *inpRTU_RSTout2 = (Fl_Input2 *)0;
Fl_Input2 *inpRTU_serno2 = (Fl_Input2 *)0;
// LOG_NAS - NA Sprint
Fl_Input2 *outSerNo6 = (Fl_Input2 *)0;
Fl_Input2 *inp_ser_NAS2 = (Fl_Input2 *)0;
Fl_Input2 *inpSPCnum_NAS2 = (Fl_Input2 *)0;
Fl_Input2 *inp_name_NAS2 = (Fl_Input2 *)0;
// LOG_AIDX - African All Mode
Fl_Input2 *inpRstIn3 = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut3 = (Fl_Input2 *)0;
Fl_Input2 *outSerNo8 = (Fl_Input2 *)0;
Fl_Input2 *inpSerNo4 = (Fl_Input2 *)0;
// LOG_JOTA - Jamboree On The Air
Fl_Input2 *inpRstIn4 = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut4 = (Fl_Input2 *)0;
Fl_Input2 *inp_JOTA_scout2 = (Fl_Input2 *)0;
Fl_Input2 *inp_JOTA_troop2 = (Fl_Input2 *)0;
Fl_Input2 *inp_JOTA_spc2 = (Fl_Input2 *)0;
// LOG_AICW - ARRL International DX (cw)
Fl_Input2 *inpRstIn_AICW2 = (Fl_Input2 *)0;
Fl_Input2 *inpRstOut_AICW2 = (Fl_Input2 *)0;
Fl_Input2 *inpSPCnum_AICW2 = (Fl_Input2 *)0;
// Used when no logging frame visible
Fl_Input2 *inpCall4 = (Fl_Input2 *)0;
Fl_Browser *qso_opBrowser = (Fl_Browser *)0;
Fl_Button *qso_btnAddFreq = (Fl_Button *)0;
Fl_Button *qso_btnSelFreq = (Fl_Button *)0;
Fl_Button *qso_btnDelFreq = (Fl_Button *)0;
Fl_Button *qso_btnClearList = (Fl_Button *)0;
Fl_Button *qso_btnAct = 0;
Fl_Input2 *qso_inpAct = (Fl_Input2 *)0;
Fl_Group *opUsageFrame = (Fl_Group *)0;
Fl_Output *opOutUsage = (Fl_Output *)0;
Fl_Input2 *opUsage = (Fl_Input2 *)0;
Fl_Button *opUsageEnter = (Fl_Button *)0;
Fl_Group *wf_group = (Fl_Group *)0;
Fl_Group *status_group = (Fl_Group *)0;
Fl_Value_Slider2 *mvsquelch = (Fl_Value_Slider2 *)0;
Fl_Button *btnClearMViewer = 0;
static const int pad = 1;
static const int Hentry = 24;
static const int Wbtn = Hentry;
static int x_qsoframe = Wbtn;
int Hmenu = 22;
static const int Hqsoframe = 2*pad + 3 * (Hentry + pad);
int Hstatus = 20;
int Hmacros = 20;
#define TB_HEIGHT 20
#define MACROBAR_MIN 18
#define MACROBAR_MAX 30
static int wf1 = 355;
static const int w_inpTime2 = 40;
static const int w_inpCall2 = 100;
static const int w_inpRstIn2 = 30;
static const int w_inpRstOut2 = 30;
// maximum 1 row height for raster display, FeldHell
static int minhtext = 42*2+6;
static int main_hmin;// = HMIN;
time_t program_start_time = 0;
bool xmlrpc_address_override_flag = false;
bool xmlrpc_port_override_flag = false;
bool arq_address_override_flag = false;
bool arq_port_override_flag = false;
bool kiss_address_override_flag = false;
std::string override_xmlrpc_address = "";
std::string override_xmlrpc_port = "";
std::string override_arq_address = "";
std::string override_arq_port = "";
std::string override_kiss_address = "";
std::string override_kiss_io_port = "";
std::string override_kiss_out_port = "";
int override_kiss_dual_port_enabled = -1; // Ensure this remains negative until assigned
int override_data_io_enabled = DISABLED_IO;
int IMAGE_WIDTH;
int Hwfall;
int Wwfall;
int altMacros = 0;
waterfall *wf = (waterfall *)0;
Digiscope *digiscope = (Digiscope *)0;
Fl_Slider2 *sldrSquelch = (Fl_Slider2 *)0;
Progress *pgrsSquelch = (Progress *)0;
Smeter *smeter = (Smeter *)0;
PWRmeter *pwrmeter = (PWRmeter *)0;
Fl_Group *pwrlevel_grp = (Fl_Group *)0;
Fl_Value_Slider2 *pwr_level = (Fl_Value_Slider2 *)0;
Fl_Button *set_pwr_level = (Fl_Button *)0;
static Fl_Pixmap *addrbookpixmap = 0;
#if !defined(__APPLE__) && !defined(__WOE32__) && USE_X
Pixmap fldigi_icon_pixmap;
#endif
// for character set conversion
int rxtx_charset;
static CharsetDistiller rx_chd;
static CharsetDistiller echo_chd;
static OutputEncoder tx_encoder;
Fl_Menu_Item *getMenuItem(const char *caption, Fl_Menu_Item* submenu = 0);
void UI_select();
bool clean_exit(bool ask);
void cb_init_mode(Fl_Widget *, void *arg);
void cb_oliviaCustom(Fl_Widget *w, void *arg);
void cb_contestiaCustom(Fl_Widget *w, void *arg);
void cb_rtty45(Fl_Widget *w, void *arg);
void cb_rtty50(Fl_Widget *w, void *arg);
void cb_rtty75N(Fl_Widget *w, void *arg);
void cb_rtty75W(Fl_Widget *w, void *arg);
void cb_rtty100(Fl_Widget *w, void *arg);
void cb_rttyCustom(Fl_Widget *w, void *arg);
void cb_fsq2(Fl_Widget *w, void *arg);
void cb_fsq3(Fl_Widget *w, void *arg);
void cb_fsq4p5(Fl_Widget *w, void *arg);
void cb_fsq6(Fl_Widget *w, void *arg);
void cb_fsq1p5(Fl_Widget *w, void *arg);
void cb_ifkp0p5(Fl_Widget *w, void *arg);
void cb_ifkp1p0(Fl_Widget *w, void *arg);
void cb_ifkp2p0(Fl_Widget *w, void *arg);
void cb_ifkp0p5a(Fl_Widget *w, void *arg);
void cb_ifkp1p0a(Fl_Widget *w, void *arg);
void cb_ifkp2p0a(Fl_Widget *w, void *arg);
void set_colors();
//void cb_pkt1200(Fl_Widget *w, void *arg);
//void cb_pkt300(Fl_Widget *w, void *arg);
//void cb_pkt2400(Fl_Widget *w, void *arg);
Fl_Widget *modem_config_tab;
static const Fl_Menu_Item *quick_change;
static const Fl_Menu_Item quick_change_psk[] = {
{ mode_info[MODE_PSK31].name, 0, cb_init_mode, (void *)MODE_PSK31 },
{ mode_info[MODE_PSK63].name, 0, cb_init_mode, (void *)MODE_PSK63 },
{ mode_info[MODE_PSK63F].name, 0, cb_init_mode, (void *)MODE_PSK63F },
{ mode_info[MODE_PSK125].name, 0, cb_init_mode, (void *)MODE_PSK125 },
{ mode_info[MODE_PSK250].name, 0, cb_init_mode, (void *)MODE_PSK250 },
{ mode_info[MODE_PSK500].name, 0, cb_init_mode, (void *)MODE_PSK500 },
{ mode_info[MODE_PSK1000].name, 0, cb_init_mode, (void *)MODE_PSK1000 },
{ 0 }
};
static const Fl_Menu_Item quick_change_qpsk[] = {
{ mode_info[MODE_QPSK31].name, 0, cb_init_mode, (void *)MODE_QPSK31 },
{ mode_info[MODE_QPSK63].name, 0, cb_init_mode, (void *)MODE_QPSK63 },
{ mode_info[MODE_QPSK125].name, 0, cb_init_mode, (void *)MODE_QPSK125 },
{ mode_info[MODE_QPSK250].name, 0, cb_init_mode, (void *)MODE_QPSK250 },
{ mode_info[MODE_QPSK500].name, 0, cb_init_mode, (void *)MODE_QPSK500 },
{ 0 }
};
static const Fl_Menu_Item quick_change_8psk[] = {
{ mode_info[MODE_8PSK125].name, 0, cb_init_mode, (void *)MODE_8PSK125 },
{ mode_info[MODE_8PSK250].name, 0, cb_init_mode, (void *)MODE_8PSK250 },
{ mode_info[MODE_8PSK500].name, 0, cb_init_mode, (void *)MODE_8PSK500 },
{ mode_info[MODE_8PSK1000].name, 0, cb_init_mode, (void *)MODE_8PSK1000 },
{ mode_info[MODE_8PSK125FL].name, 0, cb_init_mode, (void *)MODE_8PSK125FL },
{ mode_info[MODE_8PSK125F].name, 0, cb_init_mode, (void *)MODE_8PSK125F },
{ mode_info[MODE_8PSK250F].name, 0, cb_init_mode, (void *)MODE_8PSK250F },
{ mode_info[MODE_8PSK250FL].name, 0, cb_init_mode, (void *)MODE_8PSK250FL },
{ mode_info[MODE_8PSK500F].name, 0, cb_init_mode, (void *)MODE_8PSK500F },
{ mode_info[MODE_8PSK1000F].name, 0, cb_init_mode, (void *)MODE_8PSK1000F },
{ mode_info[MODE_8PSK1200F].name, 0, cb_init_mode, (void *)MODE_8PSK1200F },
{ 0 }
};
static const Fl_Menu_Item quick_change_ofdm[] = {
{ mode_info[MODE_OFDM_500F].name, 0, cb_init_mode, (void *)MODE_OFDM_500F },
{ mode_info[MODE_OFDM_750F].name, 0, cb_init_mode, (void *)MODE_OFDM_750F },
// { mode_info[MODE_OFDM_2000F].name, 0, cb_init_mode, (void *)MODE_OFDM_2000F },
// { mode_info[MODE_OFDM_2000].name, 0, cb_init_mode, (void *)MODE_OFDM_2000 },
{ mode_info[MODE_OFDM_3500].name, 0, cb_init_mode, (void *)MODE_OFDM_3500 },
{ 0 }
};
static const Fl_Menu_Item quick_change_pskr[] = {
{ mode_info[MODE_PSK125R].name, 0, cb_init_mode, (void *)MODE_PSK125R },
{ mode_info[MODE_PSK250R].name, 0, cb_init_mode, (void *)MODE_PSK250R },
{ mode_info[MODE_PSK500R].name, 0, cb_init_mode, (void *)MODE_PSK500R },
{ mode_info[MODE_PSK1000R].name, 0, cb_init_mode, (void *)MODE_PSK1000R },
{ 0 }
};
static const Fl_Menu_Item quick_change_psk_multiR[] = {
{ mode_info[MODE_4X_PSK63R].name, 0, cb_init_mode, (void *)MODE_4X_PSK63R },
{ mode_info[MODE_5X_PSK63R].name, 0, cb_init_mode, (void *)MODE_5X_PSK63R },
{ mode_info[MODE_10X_PSK63R].name, 0, cb_init_mode, (void *)MODE_10X_PSK63R },
{ mode_info[MODE_20X_PSK63R].name, 0, cb_init_mode, (void *)MODE_20X_PSK63R },
{ mode_info[MODE_32X_PSK63R].name, 0, cb_init_mode, (void *)MODE_32X_PSK63R },
{ mode_info[MODE_4X_PSK125R].name, 0, cb_init_mode, (void *)MODE_4X_PSK125R },
{ mode_info[MODE_5X_PSK125R].name, 0, cb_init_mode, (void *)MODE_5X_PSK125R },
{ mode_info[MODE_10X_PSK125R].name, 0, cb_init_mode, (void *)MODE_10X_PSK125R },
{ mode_info[MODE_12X_PSK125R].name, 0, cb_init_mode, (void *)MODE_12X_PSK125R },
{ mode_info[MODE_16X_PSK125R].name, 0, cb_init_mode, (void *)MODE_16X_PSK125R },
{ mode_info[MODE_2X_PSK250R].name, 0, cb_init_mode, (void *)MODE_2X_PSK250R },
{ mode_info[MODE_3X_PSK250R].name, 0, cb_init_mode, (void *)MODE_3X_PSK250R },
{ mode_info[MODE_5X_PSK250R].name, 0, cb_init_mode, (void *)MODE_5X_PSK250R },
{ mode_info[MODE_6X_PSK250R].name, 0, cb_init_mode, (void *)MODE_6X_PSK250R },
{ mode_info[MODE_7X_PSK250R].name, 0, cb_init_mode, (void *)MODE_7X_PSK250R },
{ mode_info[MODE_2X_PSK500R].name, 0, cb_init_mode, (void *)MODE_2X_PSK500R },
{ mode_info[MODE_3X_PSK500R].name, 0, cb_init_mode, (void *)MODE_3X_PSK500R },
{ mode_info[MODE_4X_PSK500R].name, 0, cb_init_mode, (void *)MODE_4X_PSK500R },
{ mode_info[MODE_2X_PSK800R].name, 0, cb_init_mode, (void *)MODE_2X_PSK800R },
{ mode_info[MODE_2X_PSK1000R].name, 0, cb_init_mode, (void *)MODE_2X_PSK1000R },
{ 0 }
};
static const Fl_Menu_Item quick_change_psk_multi[] = {
{ mode_info[MODE_12X_PSK125].name, 0, cb_init_mode, (void *)MODE_12X_PSK125 },
{ mode_info[MODE_6X_PSK250].name, 0, cb_init_mode, (void *)MODE_6X_PSK250 },
{ mode_info[MODE_2X_PSK500].name, 0, cb_init_mode, (void *)MODE_2X_PSK500 },
{ mode_info[MODE_4X_PSK500].name, 0, cb_init_mode, (void *)MODE_4X_PSK500 },
{ mode_info[MODE_2X_PSK800].name, 0, cb_init_mode, (void *)MODE_2X_PSK800 },
{ mode_info[MODE_2X_PSK1000].name, 0, cb_init_mode, (void *)MODE_2X_PSK1000 },
{ 0 }
};
static const Fl_Menu_Item quick_change_mfsk[] = {
{ mode_info[MODE_MFSK4].name, 0, cb_init_mode, (void *)MODE_MFSK4 },
{ mode_info[MODE_MFSK8].name, 0, cb_init_mode, (void *)MODE_MFSK8 },
{ mode_info[MODE_MFSK16].name, 0, cb_init_mode, (void *)MODE_MFSK16 },
{ mode_info[MODE_MFSK11].name, 0, cb_init_mode, (void *)MODE_MFSK11 },
{ mode_info[MODE_MFSK22].name, 0, cb_init_mode, (void *)MODE_MFSK22 },
{ mode_info[MODE_MFSK31].name, 0, cb_init_mode, (void *)MODE_MFSK31 },
{ mode_info[MODE_MFSK32].name, 0, cb_init_mode, (void *)MODE_MFSK32 },
{ mode_info[MODE_MFSK64].name, 0, cb_init_mode, (void *)MODE_MFSK64 },
{ mode_info[MODE_MFSK128].name, 0, cb_init_mode, (void *)MODE_MFSK128 },
{ mode_info[MODE_MFSK64L].name, 0, cb_init_mode, (void *)MODE_MFSK64L },
{ mode_info[MODE_MFSK128L].name, 0, cb_init_mode, (void *)MODE_MFSK128L },
{ 0 }
};
static const Fl_Menu_Item quick_change_wefax[] = {
{ mode_info[MODE_WEFAX_576].name, 0, cb_init_mode, (void *)MODE_WEFAX_576 },
{ mode_info[MODE_WEFAX_288].name, 0, cb_init_mode, (void *)MODE_WEFAX_288 },
{ 0 }
};
static const Fl_Menu_Item quick_change_navtex[] = {
{ mode_info[MODE_NAVTEX].name, 0, cb_init_mode, (void *)MODE_NAVTEX },
{ mode_info[MODE_SITORB].name, 0, cb_init_mode, (void *)MODE_SITORB },
{ 0 }
};
static const Fl_Menu_Item quick_change_mt63[] = {
{ mode_info[MODE_MT63_500S].name, 0, cb_init_mode, (void *)MODE_MT63_500S },
{ mode_info[MODE_MT63_500L].name, 0, cb_init_mode, (void *)MODE_MT63_500L },
{ mode_info[MODE_MT63_1000S].name, 0, cb_init_mode, (void *)MODE_MT63_1000S },
{ mode_info[MODE_MT63_1000L].name, 0, cb_init_mode, (void *)MODE_MT63_1000L },
{ mode_info[MODE_MT63_2000S].name, 0, cb_init_mode, (void *)MODE_MT63_2000S },
{ mode_info[MODE_MT63_2000L].name, 0, cb_init_mode, (void *)MODE_MT63_2000L },
{ 0 }
};
static const Fl_Menu_Item quick_change_thor[] = {
{ mode_info[MODE_THORMICRO].name, 0, cb_init_mode, (void *)MODE_THORMICRO },
{ mode_info[MODE_THOR4].name, 0, cb_init_mode, (void *)MODE_THOR4 },
{ mode_info[MODE_THOR5].name, 0, cb_init_mode, (void *)MODE_THOR5 },
{ mode_info[MODE_THOR8].name, 0, cb_init_mode, (void *)MODE_THOR8 },
{ mode_info[MODE_THOR11].name, 0, cb_init_mode, (void *)MODE_THOR11 },
{ mode_info[MODE_THOR16].name, 0, cb_init_mode, (void *)MODE_THOR16 },
{ mode_info[MODE_THOR22].name, 0, cb_init_mode, (void *)MODE_THOR22 },
{ mode_info[MODE_THOR25x4].name, 0, cb_init_mode, (void *)MODE_THOR25x4 },
{ mode_info[MODE_THOR50x1].name, 0, cb_init_mode, (void *)MODE_THOR50x1 },
{ mode_info[MODE_THOR50x2].name, 0, cb_init_mode, (void *)MODE_THOR50x2 },
{ mode_info[MODE_THOR100].name, 0, cb_init_mode, (void *)MODE_THOR100 },
{ 0 }
};
static const Fl_Menu_Item quick_change_domino[] = {
{ mode_info[MODE_DOMINOEXMICRO].name, 0, cb_init_mode, (void *)MODE_DOMINOEXMICRO },
{ mode_info[MODE_DOMINOEX4].name, 0, cb_init_mode, (void *)MODE_DOMINOEX4 },
{ mode_info[MODE_DOMINOEX5].name, 0, cb_init_mode, (void *)MODE_DOMINOEX5 },
{ mode_info[MODE_DOMINOEX8].name, 0, cb_init_mode, (void *)MODE_DOMINOEX8 },
{ mode_info[MODE_DOMINOEX11].name, 0, cb_init_mode, (void *)MODE_DOMINOEX11 },
{ mode_info[MODE_DOMINOEX16].name, 0, cb_init_mode, (void *)MODE_DOMINOEX16 },
{ mode_info[MODE_DOMINOEX22].name, 0, cb_init_mode, (void *)MODE_DOMINOEX22 },
{ mode_info[MODE_DOMINOEX44].name, 0, cb_init_mode, (void *)MODE_DOMINOEX44 },
{ mode_info[MODE_DOMINOEX88].name, 0, cb_init_mode, (void *)MODE_DOMINOEX88 },
{ 0 }
};
static const Fl_Menu_Item quick_change_feld[] = {
{ mode_info[MODE_FELDHELL].name, 0, cb_init_mode, (void *)MODE_FELDHELL },
{ mode_info[MODE_SLOWHELL].name, 0, cb_init_mode, (void *)MODE_SLOWHELL },
{ mode_info[MODE_HELLX5].name, 0, cb_init_mode, (void *)MODE_HELLX5 },
{ mode_info[MODE_HELLX9].name, 0, cb_init_mode, (void *)MODE_HELLX9 },
{ mode_info[MODE_FSKH245].name, 0, cb_init_mode, (void *)MODE_FSKH245 },
{ mode_info[MODE_FSKH105].name, 0, cb_init_mode, (void *)MODE_FSKH105 },
{ mode_info[MODE_HELL80].name, 0, cb_init_mode, (void *)MODE_HELL80 },
{ 0 }
};
static const Fl_Menu_Item quick_change_throb[] = {
{ mode_info[MODE_THROB1].name, 0, cb_init_mode, (void *)MODE_THROB1 },
{ mode_info[MODE_THROB2].name, 0, cb_init_mode, (void *)MODE_THROB2 },
{ mode_info[MODE_THROB4].name, 0, cb_init_mode, (void *)MODE_THROB4 },
{ mode_info[MODE_THROBX1].name, 0, cb_init_mode, (void *)MODE_THROBX1 },
{ mode_info[MODE_THROBX2].name, 0, cb_init_mode, (void *)MODE_THROBX2 },
{ mode_info[MODE_THROBX4].name, 0, cb_init_mode, (void *)MODE_THROBX4 },
{ 0 }
};
static const Fl_Menu_Item quick_change_olivia[] = {
{ mode_info[MODE_OLIVIA_4_125].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_125 },
{ mode_info[MODE_OLIVIA_4_250].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_250 },
{ mode_info[MODE_OLIVIA_4_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_500 },
{ mode_info[MODE_OLIVIA_4_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_1000 },
{ mode_info[MODE_OLIVIA_4_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_2000 },
{ mode_info[MODE_OLIVIA_8_125].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_125 },
{ mode_info[MODE_OLIVIA_8_250].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_250 },
{ mode_info[MODE_OLIVIA_8_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_500 },
{ mode_info[MODE_OLIVIA_8_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_1000 },
{ mode_info[MODE_OLIVIA_8_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_2000 },
{ mode_info[MODE_OLIVIA_16_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_500 },
{ mode_info[MODE_OLIVIA_16_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_1000 },
{ mode_info[MODE_OLIVIA_16_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_2000 },
{ mode_info[MODE_OLIVIA_32_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_32_1000 },
{ mode_info[MODE_OLIVIA_32_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_32_2000 },
{ mode_info[MODE_OLIVIA_64_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_500 },
{ mode_info[MODE_OLIVIA_64_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_1000 },
{ mode_info[MODE_OLIVIA_64_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_2000 },
{ _("Custom..."), 0, cb_oliviaCustom, (void *)MODE_OLIVIA },
{ 0 }
};
static const Fl_Menu_Item quick_change_contestia[] = {
{ mode_info[MODE_CONTESTIA_4_125].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_125 },
{ mode_info[MODE_CONTESTIA_4_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_250 },
{ mode_info[MODE_CONTESTIA_4_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_500 },
{ mode_info[MODE_CONTESTIA_4_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_1000 },
{ mode_info[MODE_CONTESTIA_4_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_2000 },
{ mode_info[MODE_CONTESTIA_8_125].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_125 },
{ mode_info[MODE_CONTESTIA_8_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_250 },
{ mode_info[MODE_CONTESTIA_8_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_500 },
{ mode_info[MODE_CONTESTIA_8_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_1000 },
{ mode_info[MODE_CONTESTIA_8_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_2000 },
{ mode_info[MODE_CONTESTIA_16_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_250 },
{ mode_info[MODE_CONTESTIA_16_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_500 },
{ mode_info[MODE_CONTESTIA_16_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_1000 },
{ mode_info[MODE_CONTESTIA_16_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_2000 },
{ mode_info[MODE_CONTESTIA_32_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_32_1000 },
{ mode_info[MODE_CONTESTIA_32_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_32_2000 },
{ mode_info[MODE_CONTESTIA_64_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_500 },
{ mode_info[MODE_CONTESTIA_64_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_1000 },
{ mode_info[MODE_CONTESTIA_64_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_2000 },
{ _("Custom..."), 0, cb_contestiaCustom, (void *)MODE_CONTESTIA },
{ 0 }
};
static const Fl_Menu_Item quick_change_rtty[] = {
{ "RTTY-45", 0, cb_rtty45, (void *)MODE_RTTY },
{ "RTTY-50", 0, cb_rtty50, (void *)MODE_RTTY },
{ "RTTY-75N", 0, cb_rtty75N, (void *)MODE_RTTY },
{ "RTTY-75W", 0, cb_rtty75W, (void *)MODE_RTTY },
{ "RTTY-100", 0, cb_rtty100, (void *)MODE_RTTY },
{ _("Custom..."), 0, cb_rttyCustom, (void *)MODE_RTTY },
{ 0 }
};
static const Fl_Menu_Item quick_change_fsq[] = {
{ "FSQ1.5", 0, cb_fsq1p5, (void *)MODE_FSQ },
{ "FSQ2", 0, cb_fsq2, (void *)MODE_FSQ },
{ "FSQ3", 0, cb_fsq3, (void *)MODE_FSQ },
{ "FSQ4.5", 0, cb_fsq4p5, (void *)MODE_FSQ },
{ "FSQ6", 0, cb_fsq6, (void *)MODE_FSQ },
{ 0 }
};
static const Fl_Menu_Item quick_change_ifkp[] = {
{ "IFKP 0.5", 0, cb_ifkp0p5a, (void *)MODE_IFKP },
{ "IFKP 1.0", 0, cb_ifkp1p0a, (void *)MODE_IFKP },
{ "IFKP 2.0", 0, cb_ifkp2p0a, (void *)MODE_IFKP },
{ 0}
};
//Fl_Menu_Item quick_change_pkt[] = {
// { " 300 baud", 0, cb_pkt300, (void *)MODE_PACKET },
// { "1200 baud", 0, cb_pkt1200, (void *)MODE_PACKET },
// { "2400 baud", 0, cb_pkt2400, (void *)MODE_PACKET },
// { 0 }
//};
inline int minmax(int val, int min, int max)
{
val = val < max ? val : max;
return val > min ? val : min;
}
// Olivia
void set_olivia_default_integ()
{
if (!progdefaults.olivia_reset_fec) return;
int tones = progdefaults.oliviatones;
int bw = progdefaults.oliviabw;
if (tones < 1) tones = 1;
int depth = minmax( (8 * (1 << bw)) / (1 << tones), 4, 4 * (1 << bw));
progdefaults.oliviasinteg = depth;
cntOlivia_sinteg->value(depth);
}
void set_olivia_tab_widgets()
{
i_listbox_olivia_bandwidth->index(progdefaults.oliviabw);
i_listbox_olivia_tones->index(progdefaults.oliviatones);
set_olivia_default_integ();
}
void close_tree_items()
{
std::string tabs[] = {
_("Colors-Fonts"),
_("Contests"),
_("IDs"),
_("Logging"),
_("Modem/CW"),
_("Modem/TTY"),
_("Modem"),
_("Misc"),
_("Rig Control"),
_("Soundcard"),
_("UI"),
_("Waterfall"),
_("Web")
};
for (size_t n = 0; n < sizeof(tabs) / sizeof(*tabs); n++)
tab_tree->close(tabs[n].c_str(),0);
}
void select_tab_tree(const char *tab)
{
close_tree_items();
std::string pname = tab;
size_t p = pname.find("/");
while (p != std::string::npos) {
tab_tree->open(pname.substr(0,p).c_str());
p = pname.find("/", p+1);
}
tab_tree->open(pname.c_str(),0);
tab_tree->select(tab,1);
SelectItem_CB(tab_tree);
}
void open_config(const char *tab)
{
select_tab_tree(tab);
dlgConfig->show();
}
void cb_oliviaCustom(Fl_Widget *w, void *arg)
{
open_config(TAB_OLIVIA);
cb_init_mode(w, arg);
}
// Contestia
void set_contestia_default_integ()
{
if (!progdefaults.contestia_reset_fec) return;
int tones = progdefaults.contestiatones;
int bw = progdefaults.contestiabw;
if (tones < 1) tones = 1;
int depth = minmax( (8 * (1 << bw)) / (1 << tones), 4, 4 * (1 << bw));
progdefaults.contestiasinteg = depth;
cntContestia_sinteg->value(depth);
}
void set_contestia_tab_widgets()
{
i_listbox_contestia_bandwidth->index(progdefaults.contestiabw);
i_listbox_contestia_tones->index(progdefaults.contestiatones);
set_contestia_default_integ();
}
void cb_contestiaCustom(Fl_Widget *w, void *arg)
{
open_config(TAB_CONTESTIA);
cb_init_mode(w, arg);
}
// rtty
void set_rtty_tab_widgets()
{
selShift->index(progdefaults.rtty_shift);
selCustomShift->deactivate();
selBits->index(progdefaults.rtty_bits);
selBaud->index(progdefaults.rtty_baud);
selParity->index(progdefaults.rtty_parity);
selStopBits->index(progdefaults.rtty_stop);
}
void enable_rtty_quickchange()
{
if (active_modem->get_mode() == MODE_RTTY)
quick_change = quick_change_rtty;
}
void disable_rtty_quickchange()
{
if (active_modem->get_mode() == MODE_RTTY)
quick_change = 0;
}
void cb_rtty45(Fl_Widget *w, void *arg)
{
progdefaults.rtty_baud = 1;
progdefaults.rtty_bits = 0;
progdefaults.rtty_shift = 3;
set_rtty_tab_widgets();
cb_init_mode(w, arg);
}
void cb_rtty50(Fl_Widget *w, void *arg)
{
progdefaults.rtty_baud = 2;
progdefaults.rtty_bits = 0;
progdefaults.rtty_shift = 3;
set_rtty_tab_widgets();
cb_init_mode(w, arg);
}
void cb_rtty75N(Fl_Widget *w, void *arg)
{
progdefaults.rtty_baud = 4;
progdefaults.rtty_bits = 0;
progdefaults.rtty_shift = 3;
set_rtty_tab_widgets();
cb_init_mode(w, arg);
}
void cb_rtty75W(Fl_Widget *w, void *arg)
{
progdefaults.rtty_baud = 4;
progdefaults.rtty_bits = 0;
progdefaults.rtty_shift = 9;
set_rtty_tab_widgets();
cb_init_mode(w, arg);
}
void cb_rtty100(Fl_Widget *w, void *arg)
{
progdefaults.rtty_baud = 5;
progdefaults.rtty_bits = 0;
progdefaults.rtty_shift = 3;
set_rtty_tab_widgets();
cb_init_mode(w, arg);
}
void cb_rttyCustom(Fl_Widget *w, void *arg)
{
open_config(TAB_RTTY);
cb_init_mode(w, arg);
}
void set_fsq_tab_widgets()
{
btn_fsqbaud[0]->value(0);
btn_fsqbaud[1]->value(0);
btn_fsqbaud[2]->value(0);
btn_fsqbaud[3]->value(0);
btn_fsqbaud[4]->value(0);
if (progdefaults.fsqbaud == 1.5) btn_fsqbaud[0]->value(1);
else if (progdefaults.fsqbaud == 2.0) btn_fsqbaud[1]->value(1);
else if (progdefaults.fsqbaud == 3.0) btn_fsqbaud[2]->value(1);
else if (progdefaults.fsqbaud == 4.5) btn_fsqbaud[3]->value(1);
else btn_fsqbaud[4]->value(1);
}
void cb_fsq1p5(Fl_Widget *w, void *arg)
{
progdefaults.fsqbaud = 1.5;
set_fsq_tab_widgets();
cb_init_mode(w, arg);
}
void cb_fsq2(Fl_Widget *w, void *arg)
{
progdefaults.fsqbaud = 2.0;
set_fsq_tab_widgets();
cb_init_mode(w, arg);
}
void cb_fsq3(Fl_Widget *w, void *arg)
{
progdefaults.fsqbaud = 3.0;
set_fsq_tab_widgets();
cb_init_mode(w, arg);
}
void cb_fsq4p5(Fl_Widget *w, void *arg)
{
progdefaults.fsqbaud = 4.5;
set_fsq_tab_widgets();
cb_init_mode(w, arg);
}
void cb_fsq6(Fl_Widget *w, void *arg)
{
progdefaults.fsqbaud = 6.0;
set_fsq_tab_widgets();
cb_init_mode(w, arg);
}
void set_ifkp_tab_widgets()
{
btn_ifkpbaud[0]->value(0);
btn_ifkpbaud[1]->value(0);
btn_ifkpbaud[2]->value(0);
if (progdefaults.ifkp_baud == 0) {
btn_ifkpbaud[0]->value(1);
put_MODEstatus("IFKP 0.5");
} else if (progdefaults.ifkp_baud == 1) {
btn_ifkpbaud[1]->value(1);
put_MODEstatus("IFKP 1.0");
}
else {
btn_ifkpbaud[2]->value(1);
put_MODEstatus("IFKP 2.0");
}
}
void cb_ifkp0p5 (Fl_Widget *w, void *arg)
{
progdefaults.ifkp_baud = 0;
set_ifkp_tab_widgets();
cb_init_mode(w, arg);
}
void cb_ifkp0p5a (Fl_Widget *w, void *arg)
{
progdefaults.ifkp_baud = 0;
set_ifkp_tab_widgets();
}
void cb_ifkp1p0 (Fl_Widget *w, void *arg)
{
progdefaults.ifkp_baud = 1;
set_ifkp_tab_widgets();
cb_init_mode(w, arg);
}
void cb_ifkp1p0a (Fl_Widget *w, void *arg)
{
progdefaults.ifkp_baud = 1;
set_ifkp_tab_widgets();
}
void cb_ifkp2p0 (Fl_Widget *w, void *arg)
{
progdefaults.ifkp_baud = 2;
set_ifkp_tab_widgets();
cb_init_mode(w, arg);
}
void cb_ifkp2p0a (Fl_Widget *w, void *arg)
{
progdefaults.ifkp_baud = 2;
set_ifkp_tab_widgets();
}
void set_dominoex_tab_widgets()
{
chkDominoEX_FEC->value(progdefaults.DOMINOEX_FEC);
}
//void cb_pkt1200(Fl_Widget *w, void *arg)
//{
// progdefaults.PKT_BAUD_SELECT = 0;
// selPacket_Baud->value(progdefaults.PKT_BAUD_SELECT);
// cb_init_mode(w, arg);
//}
//void cb_pkt300(Fl_Widget *w, void *arg)
//{
// progdefaults.PKT_BAUD_SELECT = 1;
// selPacket_Baud->value(progdefaults.PKT_BAUD_SELECT);
// cb_init_mode(w, arg);
//}
//void cb_pkt2400(Fl_Widget *w, void *arg)
//{
// progdefaults.PKT_BAUD_SELECT = 2;
// selPacket_Baud->value(progdefaults.PKT_BAUD_SELECT);
// cb_init_mode(w, arg);
//}
void set_mode_controls(trx_mode id)
{
if (id == MODE_CW) {
cntCW_WPM->show();
btnCW_Default->show();
Status1->hide();
if (mvsquelch) {
mvsquelch->value(progStatus.VIEWER_cwsquelch);
mvsquelch->range(0, 40.0);
mvsquelch->redraw();
}
if (sldrViewerSquelch) {
sldrViewerSquelch->value(progStatus.VIEWER_cwsquelch);
sldrViewerSquelch->range(0, 40.0);
sldrViewerSquelch->redraw();
}
} else {
cntCW_WPM->hide();
btnCW_Default->hide();
Status1->show();
}
if (id == MODE_RTTY) {
if (mvsquelch) {
mvsquelch->value(progStatus.VIEWER_rttysquelch);
mvsquelch->range(-6.0, 34.0);
}
if (sldrViewerSquelch) {
sldrViewerSquelch->value(progStatus.VIEWER_rttysquelch);
sldrViewerSquelch->range(-12.0, 6.0);
}
}
if (id >= MODE_PSK_FIRST && id <= MODE_PSK_LAST) {
if (mvsquelch) {
mvsquelch->value(progStatus.VIEWER_psksquelch);
mvsquelch->range(-3.0, 6.0);
}
if (sldrViewerSquelch) {
sldrViewerSquelch->value(progStatus.VIEWER_psksquelch);
sldrViewerSquelch->range(-3.0, 6.0);
}
}
if (!bWF_only) {
if (id >= MODE_WEFAX_FIRST && id <= MODE_WEFAX_LAST) {
text_group->hide();
fsq_group->hide();
ifkp_group->hide();
fmt_group->hide();
wefax_group->show();
center_group->redraw();
} else if (id == MODE_FSQ) {
text_group->hide();
wefax_group->hide();
ifkp_group->hide();
fmt_group->hide();
fsq_group->show();
center_group->redraw();
} else if (id == MODE_IFKP) {
text_group->hide();
wefax_group->hide();
fsq_group->hide();
fmt_group->hide();
ifkp_group->show();
center_group->redraw();
} else if (id == MODE_FMT) {
text_group->hide();
wefax_group->hide();
fsq_group->hide();
ifkp_group->hide();
fmt_group->show();
center_group->redraw();
} else {
text_group->show();
wefax_group->hide();
fsq_group->hide();
ifkp_group->hide();
fmt_group->hide();
if (id >= MODE_HELL_FIRST && id <= MODE_HELL_LAST) {
ReceiveText->hide();
FHdisp->show();
} else {
FHdisp->hide();
ReceiveText->show();
}
center_group->redraw();
}
ifkp_avatar->hide();
thor_avatar->hide();
std::string call = inpCall->value();
if (id == MODE_IFKP) {
ifkp_avatar->resize(fl_digi_main->w() - 59 - pad, NFtabs->y(), 59, 74);
thor_avatar->resize(fl_digi_main->w() - pad - 1, NFtabs->y(), 1, 74);
NFtabs->resize(
NFtabs->x(), NFtabs->y(),
fl_digi_main->w() - NFtabs->x() - ifkp_avatar->w() - 2 * pad, NFtabs->h());
ifkp_avatar->show();
thor_avatar->hide();
if (!call.empty())
ifkp_load_avatar(inpCall->value());
else
ifkp_load_avatar();
} else if ( ((id >= MODE_THOR11) && (id <= MODE_THOR22))) {
thor_avatar->resize(fl_digi_main->w() - 59 - pad, NFtabs->y(), 59, 74);
ifkp_avatar->resize(fl_digi_main->w() - pad - 1, NFtabs->y(), 1, 74);
NFtabs->resize(
NFtabs->x(), NFtabs->y(),
fl_digi_main->w() - NFtabs->x() - thor_avatar->w() - 2 * pad, NFtabs->h());
thor_avatar->show();
ifkp_avatar->hide();
if (!call.empty())
thor_load_avatar(inpCall->value());
else
thor_load_avatar();
}
else {
ifkp_avatar->resize(fl_digi_main->w() - pad - 1, NFtabs->y(), 1, 74);
thor_avatar->resize(fl_digi_main->w() - pad - 1, NFtabs->y(), 1, 74);
NFtabs->resize(
NFtabs->x(), NFtabs->y(),
fl_digi_main->w() - NFtabs->x() - pad - 1, NFtabs->h());
ifkp_avatar->hide();
thor_avatar->hide();
}
ifkp_avatar->redraw();
thor_avatar->redraw();
NFtabs->init_sizes();
NFtabs->redraw();
}
}
void startup_modem(modem* m, int f)
{
trx_start_modem(m, f);
#if BENCHMARK_MODE
return;
#endif
restoreFocus(1);
trx_mode mode = m->get_mode();
set_mode_controls(mode);
if (mode >= MODE_PSK_FIRST && mode <= MODE_PSK_LAST) {
m->set_sigsearch(SIGSEARCH);
}
if (progdefaults.sqlch_by_mode) {
progStatus.sldrSquelchValue = get_mode_squelch(mode);
progStatus.sqlonoff = get_mode_squelch_onoff(mode);
sldrSquelch->value(progStatus.sldrSquelchValue);
btnSQL->value(progStatus.sqlonoff);
}
if (progdefaults.txlevel_by_mode)
progStatus.txlevel = get_mode_txlevel(mode);
cntTxLevel->value(progStatus.txlevel);
if (progdefaults.afc_by_mode)
progStatus.afconoff = get_mode_afc(mode);
if (m->get_cap() & modem::CAP_AFC) {
btnAFC->value(progStatus.afconoff);
btnAFC->activate();
}
else {
btnAFC->value(0);
btnAFC->deactivate();
}
if (progdefaults.reverse_by_mode)
progStatus.reverse = get_mode_reverse(mode);
else
progStatus.reverse = wf->Reverse();
if (m->get_cap() & modem::CAP_REV) {
wf->btnRev->value(progStatus.reverse);
wf->btnRev->activate();
}
else {
wf->btnRev->value(0);
wf->btnRev->deactivate();
}
}
void cb_mnuOpenMacro(Fl_Menu_*, void*) {
if (macros.changed) {
switch (fl_choice2(_("Save changed macros?"), _("Cancel"), _("Save"), _("Don't save"))) {
case 0:
return;
case 1:
macros.saveMacroFile();
// fall through
case 2:
break;
}
}
macros.openMacroFile();
macros.changed = false;
restoreFocus(2);
}
void cb_mnuSaveMacro(Fl_Menu_*, void*) {
macros.saveMacroFile();
restoreFocus(3);
}
void remove_windows()
{
std::string titles[] = {
"scope view", "record loader", "cluster viewer", "dxcc window",
"viewer", "logbook", "lotw review",
"export", "cabrillo",
"config", "notify",
"mfsk rxwin", "mfsk txwin",
"thor rxwin", "thor txwin",
"fsq monitor", "fsq rxwin", "fsq txwin",
"ifkp rxwin", "ifkp txwin",
"macro editor", "test signals", "rx audio",
"wefax tx dialog"
};
Fl_Double_Window *w[] = {
scopeview, dlgRecordLoader,
dxcluster_viewer, dxcc_window,
dlgViewer, dlgLogbook, lotw_review_dialog,
wExport, wCabrillo,
dlgConfig, notify_window,
picRxWin, picTxWin,
thorpicRxWin, thorpicTxWin,
fsqMonitor, fsqpicRxWin, fsqpicTxWin,
ifkppicRxWin, ifkppicTxWin,
MacroEditDialog,
test_signal_window,
rxaudio_dialog, wefax_pic_tx_win };
std::string sdeleting = "\nDeleting dialogs / Stopping debug session";
for (size_t n = 0; n < sizeof(w) / sizeof(*w); n++) {
if (w[n]) {
sdeleting.append("\n ").append(titles[n]);
w[n]->hide();
delete w[n];
w[n] = 0;
}
}
if (font_browser) {
sdeleting.append("\n font browser");
font_browser->hide();
delete font_browser;
font_browser = 0;
}
LOG_INFO("%s", sdeleting.c_str());
MilliSleep(50);
debug::stop();
}
// callback executed from Escape / Window decoration 'X' or OS X cmd-Q
void cb_wMain(Fl_Widget*, void*)
{
if (!clean_exit(true)) return;
remove_windows();
LOG_INFO("Hiding main window");
fl_digi_main->hide();
}
// callback executed from menu item File/Exit
void cb_E(Fl_Menu_*, void*) {
if (!clean_exit(true))
return;
remove_windows();
LOG_INFO("Hiding main window");
// this will make Fl::run return
fl_digi_main->hide();
}
static int squelch_val;
void rsid_squelch_timer(void*)
{
progStatus.sqlonoff = squelch_val;
set_mode_squelch_onoff(active_modem->get_mode(), squelch_val);
if (progStatus.sqlonoff) {
btnSQL->value(1);
}
}
void init_modem_squelch(trx_mode mode, int freq)
{
squelch_val = progStatus.sqlonoff;
progStatus.sqlonoff = 0;
btnSQL->value(0);
if (!progdefaults.rsid_eot_squelch)
Fl::add_timeout(progdefaults.rsid_squelch, rsid_squelch_timer);
init_modem(mode, freq);
}
void rsid_eot_squelch()
{
progStatus.sqlonoff = squelch_val;
set_mode_squelch_onoff(active_modem->get_mode(), squelch_val);
if (progStatus.sqlonoff)
btnSQL->value(1);
Fl::remove_timeout(rsid_squelch_timer);
}
extern bool valid_kiss_modem(std::string modem_name);
void init_modem(trx_mode mode, int freq)
{
ENSURE_THREAD(FLMAIN_TID);
if (bWF_only)
if (mode == MODE_FSQ ||
mode == MODE_IFKP ||
mode == MODE_FELDHELL ||
mode == MODE_SLOWHELL ||
mode == MODE_HELLX5 ||
mode == MODE_HELLX9 ||
mode == MODE_FSKH245 ||
mode == MODE_FSKH105 ||
mode == MODE_HELL80 ||
mode == MODE_WEFAX_576 ||
mode == MODE_WEFAX_288 ||
mode == MODE_NAVTEX ||
mode == MODE_SITORB )
mode = MODE_PSK31;
stopMacroTimer();
if (data_io_enabled == KISS_IO) {
trx_mode current_mode = active_modem->get_mode();
if(!bcast_rsid_kiss_frame(freq, mode, (int) active_modem->get_txfreq(), current_mode,
progdefaults.rsid_notify_only ? RSID_KISS_NOTIFY : RSID_KISS_ACTIVE)) {
LOG_INFO("Invaild Modem for KISS I/O (%s)", mode_info[mode].sname);
int _yes = false;
if(!progdefaults.kiss_io_modem_change_inhibit)
_yes = fl_choice2(_("Switch to ARQ I/O"), _("No"), _("Yes"), NULL);
if(_yes) {
enable_arq();
} else {
std::string modem_name;
modem_name.assign(mode_info[current_mode].sname);
bool valid = valid_kiss_modem(modem_name);
if(!valid)
current_mode = MODE_PSK250;
mode = current_mode;
}
}
}
//LOG_INFO("mode: %d, freq: %d", (int)mode, freq);
#if !BENCHMARK_MODE
quick_change = 0;
// modem_config_tab = tabsModems->child(0);
#endif
switch (mode) {
case MODE_NEXT:
if ((mode = active_modem->get_mode() + 1) == NUM_MODES)
mode = 0;
return init_modem(mode, freq);
case MODE_PREV:
if ((mode = active_modem->get_mode() - 1) < 0)
mode = NUM_MODES - 1;
return init_modem(mode, freq);
case MODE_NULL:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new NULLMODEM, freq);
break;
case MODE_CW:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new cw, freq);
// modem_config_tab = tabCW;
break;
case MODE_THORMICRO: case MODE_THOR4: case MODE_THOR5: case MODE_THOR8:
case MODE_THOR11:case MODE_THOR16: case MODE_THOR22:
case MODE_THOR25x4: case MODE_THOR50x1: case MODE_THOR50x2: case MODE_THOR100:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new thor(mode), freq);
quick_change = quick_change_thor;
// modem_config_tab = tabTHOR;
break;
case MODE_DOMINOEXMICRO: case MODE_DOMINOEX4: case MODE_DOMINOEX5: case MODE_DOMINOEX8:
case MODE_DOMINOEX11: case MODE_DOMINOEX16: case MODE_DOMINOEX22:
case MODE_DOMINOEX44: case MODE_DOMINOEX88:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new dominoex(mode), freq);
quick_change = quick_change_domino;
// modem_config_tab = tabDomEX;
break;
case MODE_FELDHELL:
case MODE_SLOWHELL:
case MODE_HELLX5:
case MODE_HELLX9:
case MODE_FSKH245:
case MODE_FSKH105:
case MODE_HELL80:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new feld(mode), freq);
quick_change = quick_change_feld;
// modem_config_tab = tabFeld;
break;
case MODE_MFSK4:
case MODE_MFSK11:
case MODE_MFSK22:
case MODE_MFSK31:
case MODE_MFSK64:
case MODE_MFSK8:
case MODE_MFSK16:
case MODE_MFSK32:
case MODE_MFSK128:
case MODE_MFSK64L:
case MODE_MFSK128L:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new mfsk(mode), freq);
quick_change = quick_change_mfsk;
break;
case MODE_WEFAX_576:
case MODE_WEFAX_288:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new wefax(mode), freq);
quick_change = quick_change_wefax;
// modem_config_tab = tabWefax;
break;
case MODE_NAVTEX:
case MODE_SITORB:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new navtex(mode), freq);
quick_change = quick_change_navtex;
// modem_config_tab = tabNavtex;
break;
case MODE_MT63_500S: case MODE_MT63_1000S: case MODE_MT63_2000S :
case MODE_MT63_500L: case MODE_MT63_1000L: case MODE_MT63_2000L :
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new mt63(mode), freq);
quick_change = quick_change_mt63;
// modem_config_tab = tabMT63;
break;
case MODE_PSK31: case MODE_PSK63: case MODE_PSK63F:
case MODE_PSK125: case MODE_PSK250: case MODE_PSK500:
case MODE_PSK1000:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new psk(mode), freq);
quick_change = quick_change_psk;
// modem_config_tab = tabPSK;
break;
case MODE_QPSK31: case MODE_QPSK63: case MODE_QPSK125: case MODE_QPSK250: case MODE_QPSK500:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new psk(mode), freq);
quick_change = quick_change_qpsk;
// modem_config_tab = tabPSK;
break;
case MODE_8PSK125:
case MODE_8PSK250:
case MODE_8PSK500:
case MODE_8PSK1000:
case MODE_8PSK125FL:
case MODE_8PSK125F:
case MODE_8PSK250FL:
case MODE_8PSK250F:
case MODE_8PSK500F:
case MODE_8PSK1000F:
case MODE_8PSK1200F:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new psk(mode), freq);
quick_change = quick_change_8psk;
// modem_config_tab = tabPSK;
break;
case MODE_OFDM_500F:
case MODE_OFDM_750F:
case MODE_OFDM_2000F:
case MODE_OFDM_2000:
case MODE_OFDM_3500:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new psk(mode), freq);
quick_change = quick_change_ofdm;
// modem_config_tab = tabPSK;
break;
case MODE_PSK125R: case MODE_PSK250R: case MODE_PSK500R:
case MODE_PSK1000R:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new psk(mode), freq);
quick_change = quick_change_pskr;
// modem_config_tab = tabPSK;
break;
case MODE_12X_PSK125 :
case MODE_6X_PSK250 :
case MODE_2X_PSK500 :
case MODE_4X_PSK500 :
case MODE_2X_PSK800 :
case MODE_2X_PSK1000 :
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new psk(mode), freq);
quick_change = quick_change_psk_multi;
// modem_config_tab = tabPSK;
break;
case MODE_4X_PSK63R :
case MODE_5X_PSK63R :
case MODE_10X_PSK63R :
case MODE_20X_PSK63R :
case MODE_32X_PSK63R :
case MODE_4X_PSK125R :
case MODE_5X_PSK125R :
case MODE_10X_PSK125R :
case MODE_12X_PSK125R :
case MODE_16X_PSK125R :
case MODE_2X_PSK250R :
case MODE_3X_PSK250R :
case MODE_5X_PSK250R :
case MODE_6X_PSK250R :
case MODE_7X_PSK250R :
case MODE_2X_PSK500R :
case MODE_3X_PSK500R :
case MODE_4X_PSK500R :
case MODE_2X_PSK800R :
case MODE_2X_PSK1000R :
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new psk(mode), freq);
quick_change = quick_change_psk_multiR;
// modem_config_tab = tabPSK;
break;
case MODE_OLIVIA:
case MODE_OLIVIA_4_125:
case MODE_OLIVIA_4_250:
case MODE_OLIVIA_4_500:
case MODE_OLIVIA_4_1000:
case MODE_OLIVIA_4_2000:
case MODE_OLIVIA_8_125:
case MODE_OLIVIA_8_250:
case MODE_OLIVIA_8_500:
case MODE_OLIVIA_8_1000:
case MODE_OLIVIA_8_2000:
case MODE_OLIVIA_16_500:
case MODE_OLIVIA_16_1000:
case MODE_OLIVIA_16_2000:
case MODE_OLIVIA_32_1000:
case MODE_OLIVIA_32_2000:
case MODE_OLIVIA_64_500:
case MODE_OLIVIA_64_1000:
case MODE_OLIVIA_64_2000:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new olivia(mode), freq);
// modem_config_tab = tabOlivia;
quick_change = quick_change_olivia;
break;
case MODE_CONTESTIA:
case MODE_CONTESTIA_4_125: case MODE_CONTESTIA_4_250:
case MODE_CONTESTIA_4_500: case MODE_CONTESTIA_4_1000: case MODE_CONTESTIA_4_2000:
case MODE_CONTESTIA_8_125: case MODE_CONTESTIA_8_250:
case MODE_CONTESTIA_8_500: case MODE_CONTESTIA_8_1000: case MODE_CONTESTIA_8_2000:
case MODE_CONTESTIA_16_250: case MODE_CONTESTIA_16_500:
case MODE_CONTESTIA_16_1000: case MODE_CONTESTIA_16_2000:
case MODE_CONTESTIA_32_1000: case MODE_CONTESTIA_32_2000:
case MODE_CONTESTIA_64_500: case MODE_CONTESTIA_64_1000: case MODE_CONTESTIA_64_2000:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new contestia(mode), freq);
// modem_config_tab = tabContestia;
quick_change = quick_change_contestia;
break;
case MODE_FSQ:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new fsq(mode), freq);
// modem_config_tab = tabFSQ;
quick_change = quick_change_fsq;
break;
case MODE_IFKP:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new ifkp(mode), freq);
// modem_config_tab = tabIFKP;
quick_change = quick_change_ifkp;
break;
case MODE_RTTY:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new rtty(mode), freq);
// modem_config_tab = tabRTTY;
if (progStatus.nanoFSK_online || progStatus.Nav_online || progdefaults.useFSK)
quick_change = 0;
else
quick_change = quick_change_rtty;
break;
case MODE_THROB1: case MODE_THROB2: case MODE_THROB4:
case MODE_THROBX1: case MODE_THROBX2: case MODE_THROBX4:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new throb(mode), freq);
quick_change = quick_change_throb;
break;
// case MODE_PACKET:
// startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
// *mode_info[mode].modem = new pkt(mode), freq);
// modem_config_tab = tabNavtex;
// quick_change = quick_change_pkt;
// break;
case MODE_WWV:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new wwv, freq);
break;
case MODE_ANALYSIS:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new anal, freq);
break;
case MODE_FMT:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new fmt, freq);
break;
case MODE_SSB:
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new ssb, freq);
break;
default:
LOG_ERROR("Unknown mode: %d", (int)mode);
mode = MODE_PSK31;
startup_modem(*mode_info[mode].modem ? *mode_info[mode].modem :
*mode_info[mode].modem = new psk(mode), freq);
quick_change = quick_change_psk;
// modem_config_tab = tabPSK;
break;
}
#if BENCHMARK_MODE
return;
#endif
clear_StatusMessages();
progStatus.lastmode = mode;
if (wf->xmtlock->value() == 1 && !mailserver) {
if(!progdefaults.retain_freq_lock) {
wf->xmtlock->value(0);
wf->xmtlock->damage();
active_modem->set_freqlock(false);
}
}
// if (FD_logged_on) FD_mode_check();
}
void init_modem_sync(trx_mode m, int f)
{
ENSURE_THREAD(FLMAIN_TID);
int count = 2000;
if (trx_state != STATE_RX) {
LOG_INFO("Waiting for %s", mode_info[active_modem->get_mode()].name);
abort_tx();
while (trx_state != STATE_RX && count) {
LOG_DEBUG("%0.2f secs remaining", count / 100.0);
Fl::awake();
MilliSleep(10);
count--;
}
if (count == 0) {
LOG_ERROR("%s", "TIMED OUT!!");
return; // abort modem selection
}
}
init_modem(m, f);
count = 500;
if (trx_state != STATE_RX) {
while (trx_state != STATE_RX && count) {
Fl::awake();
MilliSleep(10);
count--;
}
if (count == 0)
LOG_ERROR("%s", "Wait for STATE_RX timed out");
}
REQ_FLUSH(TRX_TID);
}
void cb_init_mode(Fl_Widget *, void *mode)
{
init_modem(reinterpret_cast<trx_mode>(mode));
}
// character set selection menu
void set_charset_listbox(int rxtx_charset)
{
int tiniconv_id = charset_list[rxtx_charset].tiniconv_id;
// order all converters to switch to the new encoding
rx_chd.set_input_encoding(tiniconv_id);
echo_chd.set_input_encoding(tiniconv_id);
tx_encoder.set_output_encoding(tiniconv_id);
if (mainViewer)
mainViewer->set_input_encoding(tiniconv_id);
if (brwsViewer)
brwsViewer->set_input_encoding(tiniconv_id);
// update the button
progdefaults.charset_name = charset_list[rxtx_charset].name;
listbox_charset_status->value(progdefaults.charset_name.c_str());
restoreFocus(4);
}
void cb_listbox_charset(Fl_Widget *w, void *)
{
Fl_ListBox * lbox = (Fl_ListBox *)w;
set_charset_listbox(lbox->index());
}
void populate_charset_listbox(void)
{
for (unsigned int i = 0; i < number_of_charsets; i++)
listbox_charset_status->add( charset_list[i].name );
listbox_charset_status->value(progdefaults.charset_name.c_str());
}
// find the position of the default charset in charset_list[] and trigger the callback
void set_default_charset(void)
{
for (unsigned int i = 0; i < number_of_charsets; i++) {
if (strcmp(charset_list[i].name, progdefaults.charset_name.c_str()) == 0) {
set_charset_listbox(i);
return;
}
}
}
// if w is not NULL, give focus to TransmitText only if the last event was an Enter keypress
void restoreFocus(int n)
{
if (Fl::focus() == NULL) return;
if (!active_modem) {
TransmitText->take_focus();
return;
}
if (active_modem->get_mode() == MODE_FSQ && fsq_tx_text)
fsq_tx_text->take_focus();
else if (active_modem->get_mode() == MODE_IFKP && ifkp_tx_text)
ifkp_tx_text->take_focus();
else if (TransmitText)
TransmitText->take_focus();
}
void macro_cb(Fl_Widget *w, void *v)
{
// if (active_modem->get_mode() == MODE_FSQ)
// return;
int b = (int)(reinterpret_cast<long long> (v));
if (b & 0x80) { // 4 bar docked macros
b &= 0x7F;
} else {
if (progdefaults.mbar_scheme > MACRO_SINGLE_BAR_MAX) {
if (b >= NUMMACKEYS) b += (altMacros - 1) * NUMMACKEYS;
} else {
b += altMacros * NUMMACKEYS;
}
}
int mouse = Fl::event_button();
if (mouse == FL_LEFT_MOUSE && !macros.text[b].empty()) {
if (progStatus.timer) return;
stopMacroTimer();
progStatus.skip_sked_macro = false;
macros.execute(b);
}
else if (mouse == FL_RIGHT_MOUSE)
editMacro(b);
if (Fl::focus() != qsoFreqDisp)
restoreFocus(5);
}
void colorize_48macros(int i)
{
if (progdefaults.useGroupColors == true) {
int k = i / 4;
if (k == 0 || k == 3 || k == 6 || k == 9)
btnDockMacro[i]->color(fl_rgb_color(
progdefaults.btnGroup1.R,
progdefaults.btnGroup1.G,
progdefaults.btnGroup1.B));
else if (k == 1 || k == 4 || k == 7 || k == 10)
btnDockMacro[i]->color(fl_rgb_color(
progdefaults.btnGroup2.R,
progdefaults.btnGroup2.G,
progdefaults.btnGroup2.B));
else
btnDockMacro[i]->color(fl_rgb_color(
progdefaults.btnGroup3.R,
progdefaults.btnGroup3.G,
progdefaults.btnGroup3.B));
btnDockMacro[i]->labelcolor(
fl_rgb_color(
progdefaults.btnFkeyTextColor.R,
progdefaults.btnFkeyTextColor.G,
progdefaults.btnFkeyTextColor.B ));
btnDockMacro[i]->labelcolor(progdefaults.MacroBtnFontcolor);
btnDockMacro[i]->labelfont(progdefaults.MacroBtnFontnbr);
btnDockMacro[i]->labelsize(progdefaults.MacroBtnFontsize);
} else {
btnDockMacro[i]->color(FL_BACKGROUND_COLOR);
btnDockMacro[i]->labelcolor(FL_FOREGROUND_COLOR);
btnDockMacro[i]->labelfont(progdefaults.MacroBtnFontnbr);
btnDockMacro[i]->labelsize(progdefaults.MacroBtnFontsize);
}
}
void colorize_macro(int i)
{
int j = i % NUMMACKEYS;
if (progdefaults.useGroupColors == true) {
if (j < 4) {
btnMacro[i]->color(fl_rgb_color(
progdefaults.btnGroup1.R,
progdefaults.btnGroup1.G,
progdefaults.btnGroup1.B));
} else if (j < 8) {
btnMacro[i]->color(fl_rgb_color(
progdefaults.btnGroup2.R,
progdefaults.btnGroup2.G,
progdefaults.btnGroup2.B));
} else {
btnMacro[i]->color(fl_rgb_color(
progdefaults.btnGroup3.R,
progdefaults.btnGroup3.G,
progdefaults.btnGroup3.B));
}
btnMacro[i]->labelcolor(
fl_rgb_color(
progdefaults.btnFkeyTextColor.R,
progdefaults.btnFkeyTextColor.G,
progdefaults.btnFkeyTextColor.B ));
btnMacro[i]->labelcolor(progdefaults.MacroBtnFontcolor);
btnMacro[i]->labelfont(progdefaults.MacroBtnFontnbr);
btnMacro[i]->labelsize(progdefaults.MacroBtnFontsize);
} else {
btnMacro[i]->color(FL_BACKGROUND_COLOR);
btnMacro[i]->labelcolor(FL_FOREGROUND_COLOR);
btnMacro[i]->labelfont(progdefaults.MacroBtnFontnbr);
btnMacro[i]->labelsize(progdefaults.MacroBtnFontsize);
}
btnMacro[i]->redraw_label();
}
void colorize_macros()
{
for (int i = 0; i < NUMMACKEYS * NUMKEYROWS; i++) colorize_macro(i);
for (int i = 0; i < 48; i++) colorize_48macros(i);
btnAltMacros1->labelsize(progdefaults.MacroBtnFontsize);
btnAltMacros1->redraw_label();
btnAltMacros2->labelsize(progdefaults.MacroBtnFontsize);
btnAltMacros2->redraw_label();
}
void altmacro_cb(Fl_Widget *w, void *v)
{
static char alt_text[2] = "1";
intptr_t arg = reinterpret_cast<intptr_t>(v);
if (arg)
altMacros += arg;
else
altMacros = altMacros + (Fl::event_button() == FL_RIGHT_MOUSE ? -1 : 1);
if (progdefaults.mbar_scheme > MACRO_SINGLE_BAR_MAX) { // alternate set
altMacros = WCLAMP(altMacros, 1, 3);
alt_text[0] = '1' + altMacros;
for (int i = 0; i < NUMMACKEYS; i++) {
btnMacro[i + NUMMACKEYS]->label(macros.name[i + (altMacros * NUMMACKEYS)].c_str());
btnMacro[i + NUMMACKEYS]->redraw_label();
}
btnAltMacros2->label(alt_text);
btnAltMacros2->redraw_label();
} else { // primary set
altMacros = WCLAMP(altMacros, 0, 3);
alt_text[0] = '1' + altMacros;
for (int i = 0; i < NUMMACKEYS; i++) {
btnMacro[i]->label(macros.name[i + (altMacros * NUMMACKEYS)].c_str());
btnMacro[i]->redraw_label();
}
btnAltMacros1->label(alt_text);
btnAltMacros1->redraw_label();
}
restoreFocus(6);
}
void cb_mnuConfigNotify(Fl_Menu_*, void*)
{
notify_show();
}
void cb_mnuTestSignals(Fl_Menu_*, void*)
{
show_testdialog();
}
void cb_mnuConfigModems(Fl_Menu_*, void*) {
switch (active_modem->get_mode()) {
case MODE_CW:
open_config(TAB_CW);
break;
case MODE_THORMICRO: case MODE_THOR4: case MODE_THOR5: case MODE_THOR8:
case MODE_THOR11:case MODE_THOR16: case MODE_THOR22:
case MODE_THOR25x4: case MODE_THOR50x1: case MODE_THOR50x2: case MODE_THOR100:
open_config(TAB_THOR);
break;
case MODE_DOMINOEXMICRO: case MODE_DOMINOEX4: case MODE_DOMINOEX5: case MODE_DOMINOEX8:
case MODE_DOMINOEX11: case MODE_DOMINOEX16: case MODE_DOMINOEX22:
case MODE_DOMINOEX44: case MODE_DOMINOEX88:
open_config(TAB_DOMINOEX);
break;
case MODE_FELDHELL: case MODE_SLOWHELL: case MODE_HELLX5: case MODE_HELLX9:
case MODE_FSKH245: case MODE_FSKH105:case MODE_HELL80:
open_config(TAB_FELDHELL);
break;
case MODE_WEFAX_576: case MODE_WEFAX_288:
open_config(TAB_WEFAX);
break;
case MODE_NAVTEX: case MODE_SITORB:
open_config(TAB_NAVTEX);
break;
case MODE_MT63_500S: case MODE_MT63_1000S: case MODE_MT63_2000S :
case MODE_MT63_500L: case MODE_MT63_1000L: case MODE_MT63_2000L :
quick_change = quick_change_mt63;
open_config(TAB_MT63);
break;
case MODE_OLIVIA:
case MODE_OLIVIA_4_125: case MODE_OLIVIA_4_250: case MODE_OLIVIA_4_500:
case MODE_OLIVIA_4_1000: case MODE_OLIVIA_4_2000:
case MODE_OLIVIA_8_125: case MODE_OLIVIA_8_250: case MODE_OLIVIA_8_500:
case MODE_OLIVIA_8_1000: case MODE_OLIVIA_8_2000:
case MODE_OLIVIA_16_500: case MODE_OLIVIA_16_1000: case MODE_OLIVIA_16_2000:
case MODE_OLIVIA_32_1000: case MODE_OLIVIA_32_2000:
case MODE_OLIVIA_64_500: case MODE_OLIVIA_64_1000: case MODE_OLIVIA_64_2000:
open_config(TAB_OLIVIA);
break;
case MODE_CONTESTIA:
case MODE_CONTESTIA_4_125: case MODE_CONTESTIA_4_250: case MODE_CONTESTIA_4_500:
case MODE_CONTESTIA_4_1000: case MODE_CONTESTIA_4_2000:
case MODE_CONTESTIA_8_125: case MODE_CONTESTIA_8_250: case MODE_CONTESTIA_8_500:
case MODE_CONTESTIA_8_1000: case MODE_CONTESTIA_8_2000:
case MODE_CONTESTIA_16_250: case MODE_CONTESTIA_16_500:
case MODE_CONTESTIA_16_1000: case MODE_CONTESTIA_16_2000:
case MODE_CONTESTIA_32_1000: case MODE_CONTESTIA_32_2000:
case MODE_CONTESTIA_64_500: case MODE_CONTESTIA_64_1000: case MODE_CONTESTIA_64_2000:
open_config(TAB_CONTESTIA);
break;
case MODE_FSQ:
open_config(TAB_FSQ);
break;
case MODE_IFKP:
open_config(TAB_IFKP);
break;
case MODE_RTTY:
open_config(TAB_RTTY);
break;
default:
open_config(TAB_PSK);
break;
}
}
/*
void cb_mnuConfigWinkeyer(Fl_Menu_*, void*) {
open_config(TAB_CW);
}
void cb_mnuConfigWFcontrols(Fl_Menu_ *, void*) {
open_config(TAB_UI_WATERFALL);
}
void cb_n3fjp_logs(Fl_Menu_ *, void*) {
open_config(TAB_UI_N3FJP);
}
void cb_maclogger(Fl_Menu_ *, void*) {
open_config(TAB_UI_MACLOGGER);
}
*/
void cb_mnuConfigLoTW(Fl_Menu_ *, void *) {
open_config(TAB_LOG_LOTW);
}
void cb_logfile(Fl_Widget* w, void*)
{
progStatus.LOGenabled = reinterpret_cast<Fl_Menu_*>(w)->mvalue()->value();
if (progStatus.LOGenabled == true) {
Date tdy;
std::string lfname = HomeDir;
lfname.append("fldigi");
lfname.append(tdy.szDate(2));
lfname.append(".log");
logfile = new cLogfile(lfname);
logfile->log_to_file_start();
} else {
logfile->log_to_file_stop();
delete logfile;
logfile = 0;
}
}
// LOGBOOK server connect
void cb_log_server(Fl_Widget* w, void*)
{
progdefaults.xml_logbook = reinterpret_cast<Fl_Menu_*>(w)->mvalue()->value();
close_logbook();
connect_to_log_server();
}
void cb_fd_viewer(Fl_Widget* w, void*)
{
if (field_day_viewer->visible())
field_day_viewer->hide();
else
field_day_viewer->show();
}
void cb_dxc_viewer(Fl_Widget* w, void*)
{
if (dxcluster_viewer->visible())
dxcluster_viewer->hide();
else
dxcluster_viewer->show();
}
void set_server_label(bool val)
{
Fl_Menu_Item *m = getMenuItem(LOG_CONNECT_SERVER);
if (val) m->set();
else m->clear();
}
static int save_mvx = 0;
void cb_view_hide_channels(Fl_Menu_ *w, void *d)
{
int mvgw = mvgroup->w();
progStatus.show_channels = !(mvgw > mvgroup->x());
if (!progStatus.show_channels) {
save_mvx = mvgw;
progStatus.tile_x = mvgroup->x();
} else {
progStatus.tile_x = save_mvx;
}
if (progdefaults.rxtx_swap) {
progStatus.tile_y = TransmitText->h();
progStatus.tile_y_ratio = 1.0 * TransmitText->h() / text_panel->h();
} else {
progStatus.tile_y = ReceiveText->h();
progStatus.tile_y_ratio = 1.0 * ReceiveText->h() / text_panel->h();
}
UI_select();
return;
}
static bool capval = false;
static bool genval = false;
static bool playval = false;
void cb_mnuCapture(Fl_Widget *w, void *d)
{
if (!RXscard) return;
Fl_Menu_Item *m = getMenuItem(((Fl_Menu_*)w)->mvalue()->label()); //eek
if (playval || genval) {
m->clear();
return;
}
capval = m->value();
if (!m->value()) {
RXscard->stopCapture();
return;
}
std::string fname;
int format;
SND_SUPPORT::get_file_params("capture", fname, format, true);
if (fname.empty()) {
m->clear();
capval = 0;
return;
}
if(!RXscard->startCapture(fname, format)) {
m->clear();
capval = false;
}
}
void cb_mnuGenerate(Fl_Widget *w, void *d)
{
Fl_Menu_Item *m = getMenuItem(((Fl_Menu_*)w)->mvalue()->label());
if (capval || playval) {
m->clear();
return;
}
if (!TXscard) return;
genval = m->value();
if (!genval) {
TXscard->stopGenerate();
return;
}
std::string fname;
int format;
SND_SUPPORT::get_file_params("generate", fname, format, true);
if (fname.empty()) {
m->clear();
genval = 0;
return;
}
if (!TXscard->startGenerate(fname, format)) {
m->clear();
genval = false;
}
}
Fl_Menu_Item *Playback_menu_item = (Fl_Menu_Item *)0;
void reset_mnuPlayback()
{
if (Playback_menu_item == 0) return;
Playback_menu_item->clear();
playval = false;
}
void cb_mnuPlayback(Fl_Widget *w, void *d)
{
if (!RXscard) return;
Fl_Menu_Item *m = getMenuItem(((Fl_Menu_*)w)->mvalue()->label());
Playback_menu_item = m;
if (capval || genval) {
m->clear();
bHighSpeed = false;
return;
}
playval = m->value();
if (!playval) {
bHighSpeed = false;
RXscard->stopPlayback();
return;
}
std::string fname;
int format;
SND_SUPPORT::get_file_params("playback", fname, format, false);
if (fname.empty()) {
m->clear();
playval = 0;
return;
}
progdefaults.loop_playback = fl_choice2(_("Playback continuous loop?"), _("No"), _("Yes"), NULL);
int err = RXscard->startPlayback(fname, format);
if(err) {
fl_alert2(_("Unsupported audio format"));
m->clear();
playval = false;
bHighSpeed = false;
progdefaults.loop_playback = false;
}
else if (btnAutoSpot->value()) {
put_status(_("Spotting disabled"), 3.0);
btnAutoSpot->value(0);
btnAutoSpot->do_callback();
}
}
bool first_tab_select = true;
void cb_mnu_config_dialog(Fl_Menu_*, void*)
{
if (first_tab_select) {
select_tab_tree(TAB_STATION);
first_tab_select = false;
}
dlgConfig->show();
}
void cb_mnuSaveConfig(Fl_Menu_ *, void *) {
progdefaults.saveDefaults();
restoreFocus(7);
}
// This function may be called by the QRZ thread
void cb_mnuVisitURL(Fl_Widget*, void* arg)
{
const char* url = reinterpret_cast<const char *>(arg);
#ifndef __WOE32__
const char* browsers[] = {
# ifdef __APPLE__
getenv("FLDIGI_BROWSER"), // valid for any OS - set by user
"open" // OS X
# else
"fl-xdg-open", // Puppy Linux
"xdg-open", // other Unix-Linux distros
getenv("FLDIGI_BROWSER"), // force use of spec'd browser
getenv("BROWSER"), // most Linux distributions
"sensible-browser",
"firefox",
"mozilla" // must be something out there!
# endif
};
switch (fork()) {
case 0:
# ifndef NDEBUG
unsetenv("MALLOC_CHECK_");
unsetenv("MALLOC_PERTURB_");
# endif
for (size_t i = 0; i < sizeof(browsers)/sizeof(browsers[0]); i++)
if (browsers[i])
execlp(browsers[i], browsers[i], url, (char*)0);
exit(EXIT_FAILURE);
case -1:
fl_alert2(_("Could not run a web browser:\n%s\n\n"
"Open this URL manually:\n%s"),
strerror(errno), url);
}
#else
// gurgle... gurgle... HOWL
// "The return value is cast as an HINSTANCE for backward
// compatibility with 16-bit Windows applications. It is
// not a true HINSTANCE, however. The only thing that can
// be done with the returned HINSTANCE is to cast it to an
// int and compare it with the value 32 or one of the error
// codes below." (Error codes omitted to preserve sanity).
if ((INT_PTR)ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL) <= 32)
fl_alert2(_("Could not open url:\n%s\n"), url);
#endif
}
void open_recv_folder(const char *folder)
{
cb_mnuVisitURL(0, (void*)folder);
}
void cb_mnuVisitPSKRep(Fl_Widget*, void*)
{
cb_mnuVisitURL(0, (void*)std::string("http://pskreporter.info/pskmap?").append(progdefaults.myCall).c_str());
}
void html_help( const std::string &Html)
{
if (!help_dialog)
help_dialog = new Fl_Help_Dialog;
help_dialog->value(Html.c_str());
help_dialog->show();
}
void cb_mnuBeginnersURL(Fl_Widget*, void*)
{
std::string deffname = HelpDir;
deffname.append("beginners.html");
std::ofstream f(deffname.c_str());
if (!f)
return;
f << szBeginner;
f.close();
#ifndef __WOE32__
cb_mnuVisitURL(NULL, (void *)deffname.insert(0, "file://").c_str());
#else
cb_mnuVisitURL(NULL, (void *)deffname.c_str());
#endif
}
void cb_mnuOnLineDOCS(Fl_Widget *, void *)
{
std::string helpfile = HelpDir;
helpfile.append("fldigi-help/index.html");
std::ifstream f(helpfile.c_str());
if (!f) {
cb_mnuVisitURL(0, (void *)PACKAGE_DOCS);
} else {
f.close();
cb_mnuVisitURL(0, (void *)helpfile.c_str());
}
}
inline int version_check(std::string v1, std::string v2) {
long v1a, v1b, v1c;
long v2a, v2b, v2c;
size_t p;
v1a = atol(v1.c_str()); p = v1.find("."); v1.erase(0, p + 1);
v1b = atol(v1.c_str()); p = v1.find("."); v1.erase(0, p + 1);
v1c = atol(v1.c_str()); p = v1.find("."); v1.erase(0, p + 1);
v2a = atol(v2.c_str()); p = v2.find("."); v2.erase(0, p + 1);
v2b = atol(v2.c_str()); p = v2.find("."); v2.erase(0, p + 1);
v2c = atol(v2.c_str()); p = v2.find("."); v2.erase(0, p + 1);
long l1, l2;
l1 = v1a * 10000 + v1b * 100 + v1c;
l2 = v2a * 10000 + v2b * 100 + v2c;
if (l1 < l2) return -1;
if (l1 > l2) return 1;
if (v1 == v2) return 0;
return 1;
}
static notify_dialog *latest_dialog = 0;
void cb_mnuCheckUpdate(Fl_Widget *, void *)
{
const char *url = "http://www.w1hkj.com/files/fldigi/";
std::string version_str;
std::string reply;
put_status(_("Checking for updates..."));
int ret = get_http(url, reply, 20.0);
if (!ret) {
put_status(_("Update site not available"), 10);
return;
}
size_t p = reply.find("_setup.exe");
size_t p2 = reply.rfind("fldigi", p);
p2 += 7;
version_str = reply.substr(p2, p - p2);
int is_ok = version_check(std::string(PACKAGE_VERSION), version_str);
if (!latest_dialog) latest_dialog = new notify_dialog;
if (is_ok == 0) {
latest_dialog->notify(_("You are running the latest version"), 5.0);
REQ(show_notifier, latest_dialog);
} else if (is_ok > 0) {
std::string probable;
probable.assign(_("You are probably running an alpha version "));
probable.append( PACKAGE_VERSION ).append(_("\nPosted version: "));
probable.append(version_str);
latest_dialog->notify(probable.c_str(), 5.0);
REQ(show_notifier, latest_dialog);
} else
fl_message2(_("Version %s is available at Source Forge"),
version_str.c_str());
put_status("");
}
void cb_mnuAboutURL(Fl_Widget*, void*)
{
if (!help_dialog)
help_dialog = new Fl_Help_Dialog;
help_dialog->value(szAbout);
help_dialog->resize(help_dialog->x(), help_dialog->y(), help_dialog->w(), 440);
help_dialog->show();
}
void fldigi_help(const std::string& theHelp)
{
std::string htmlHelp =
"<HTML>"
"<HEAD>"
"<TITLE>" PACKAGE " Help</TITLE>"
"</HEAD>"
"<BODY>"
"<FONT FACE=fixed>"
"<P><TT>";
for (size_t i = 0; i < theHelp.length(); i++) {
if (theHelp[i] == '\n') {
if (theHelp[i+1] == '\n') {
htmlHelp += "</TT></P><P><TT>";
i++;
}
else
htmlHelp += "<BR>";
} else if (theHelp[i] == ' ' && theHelp[i+1] == ' ') {
htmlHelp += " ";
i++;
} else
htmlHelp += theHelp[i];
}
htmlHelp +=
"</TT></P>"
"</BODY>"
"</HTML>";
html_help(htmlHelp);
}
void cb_mnuCmdLineHelp(Fl_Widget*, void*)
{
extern std::string option_help;
fldigi_help(option_help);
restoreFocus(8);
}
void cb_mnuBuildInfo(Fl_Widget*, void*)
{
extern std::string build_text;
fldigi_help(build_text);
restoreFocus(9);
}
void cb_mnuDebug(Fl_Widget*, void*)
{
debug::show();
}
#ifndef NDEBUG
void cb_mnuFun(Fl_Widget*, void*)
{
fl_message2(_("Sunspot creation underway!"));
}
#endif
void cb_mnuAudioInfo(Fl_Widget*, void*)
{
if (progdefaults.btnAudioIOis != SND_IDX_PORT) {
fl_alert2(_("Audio device information is only available for the PortAudio backend"));
return;
}
#if USE_PORTAUDIO
size_t ndev;
std::string devtext[2], headers[2];
SoundPort::devices_info(devtext[0], devtext[1]);
if (devtext[0] != devtext[1]) {
headers[0] = _("Capture device");
headers[1] = _("Playback device");
ndev = 2;
}
else {
headers[0] = _("Capture and playback devices");
ndev = 1;
}
std::string audio_info;
for (size_t i = 0; i < ndev; i++) {
audio_info.append("<center><h4>").append(headers[i]).append("</h4>\n<table border=\"1\">\n");
std::string::size_type j, n = 0;
while ((j = devtext[i].find(": ", n)) != std::string::npos) {
audio_info.append("<tr>")
.append("<td align=\"center\">")
.append(devtext[i].substr(n, j-n))
.append("</td>");
if ((n = devtext[i].find('\n', j)) == std::string::npos) {
devtext[i] += '\n';
n = devtext[i].length() - 1;
}
audio_info.append("<td align=\"center\">")
.append(devtext[i].substr(j+2, n-j-2))
.append("</td>")
.append("</tr>\n");
}
audio_info.append("</table></center><br>\n");
}
fldigi_help(audio_info);
#endif
}
void cb_ShowConfig(Fl_Widget*, void*)
{
cb_mnuVisitURL(0, (void*)HomeDir.c_str());
}
static void cb_ShowDATA(Fl_Widget*, void*)
{
/// Must be already created by createRecordLoader()
dlgRecordLoader->show();
}
bool ask_dir_creation( const std::string & dir )
{
if ( 0 == directory_is_created(dir.c_str())) {
int ans = fl_choice2(_("%s: Do not exist, create?"), _("No"), _("Yes"), 0, dir.c_str() );
if (!ans) return false ;
return true ;
}
return false ;
}
void cb_ShowNBEMS(Fl_Widget*, void*)
{
if ( ask_dir_creation(NBEMS_dir)) {
check_nbems_dirs();
}
cb_mnuVisitURL(0, (void*)NBEMS_dir.c_str());
}
void cb_ShowFLMSG(Fl_Widget*, void*)
{
if ( ask_dir_creation(FLMSG_dir)) {
check_nbems_dirs();
}
cb_mnuVisitURL(0, (void*)FLMSG_dir.c_str());
}
void cb_ShowWEFAX_images(Fl_Widget*, void*)
{
if (progdefaults.wefax_save_dir.empty())
cb_mnuVisitURL(0, (void*)PicsDir.c_str());
else
cb_mnuVisitURL(0, (void*)progdefaults.wefax_save_dir.c_str());
}
void cbTune(Fl_Widget *w, void *) {
Fl_Button *b = (Fl_Button *)w;
if (!(active_modem->get_cap() & modem::CAP_TX)) {
b->value(0);
return;
}
if (b->value() == 1) {
b->labelcolor(FL_RED);
trx_tune();
} else {
b->labelcolor(FL_FOREGROUND_COLOR);
trx_receive();
}
restoreFocus(10);
}
void cb_quick_rsid (Fl_Widget *w, void *)
{
progdefaults.rsidWideSearch = !progdefaults.rsidWideSearch;
if (progdefaults.rsidWideSearch) chkRSidWideSearch->set();
else chkRSidWideSearch->clear();
}
static Fl_Menu_Item quick_change_rsid[] = {
{ "Passband", 0, cb_quick_rsid, 0, FL_MENU_TOGGLE },
{0,0,0,0,0,0,0,0,0}
};
void cbRSID(Fl_Widget *w, void *)
{
if (Fl::focus() != btnRSID) {
progdefaults.rsid = btnRSID->value();
btnRSID->redraw();
return;
}
switch (Fl::event_button()) {
case FL_LEFT_MOUSE:
progdefaults.rsid = btnRSID->value();
progdefaults.changed = true;
break;
case FL_RIGHT_MOUSE:
{
btnRSID->value(progdefaults.rsid);
btnRSID->redraw();
if (progdefaults.rsidWideSearch) quick_change_rsid[0].set();
else quick_change_rsid[0].clear();
const Fl_Menu_Item *m =
quick_change_rsid->popup(
btnRSID->x(),
btnRSID->y() + btnRSID->h());
if (m && m->callback()) m->do_callback(0);
break;
}
default:
break;
}
Fl_Color clr = progdefaults.rsidWideSearch ? progdefaults.RxIDwideColor : progdefaults.RxIDColor;
btnRSID->selection_color(clr);
btnRSID->redraw();
restoreFocus(11);
}
void cbTxRSID(Fl_Widget *w, void*)
{
progdefaults.TransmitRSid = btnTxRSID->value();
if (Fl::focus() != btnTxRSID) {
btnTxRSID->redraw();
return;
}
progdefaults.changed = true;
restoreFocus(12);
}
void cbAutoSpot(Fl_Widget* w, void*)
{
progStatus.spot_recv = static_cast<Fl_Light_Button*>(w)->value();
}
void toggleRSID()
{
progdefaults.rsid = !progdefaults.rsid;
cbRSID(NULL, NULL);
}
static notify_dialog *rx_monitor_alert = 0;
void cb_mnuRxAudioDialog(Fl_Menu_ *w, void *d) {
if (!progdefaults.enable_audio_alerts) {
if (!rx_monitor_alert) rx_monitor_alert = new notify_dialog;
rx_monitor_alert->notify("Audio-Alert / Rx-Monitor device NOT enabled", 10.0);
show_notifier(rx_monitor_alert);
return;
}
if (rxaudio_dialog)
rxaudio_dialog->show();
}
void cb_mnuDigiscope(Fl_Menu_ *w, void *d) {
if (scopeview)
scopeview->show();
}
void cb_mnuViewer(Fl_Menu_ *, void *) {
openViewer();
}
void cb_mnuSpectrum (Fl_Menu_ *, void *) {
open_spectrum_viewer();
}
void cb_mnuShowCountries(Fl_Menu_ *, void *)
{
notify_dxcc_show();
}
void set_macroLabels()
{
if (bWF_only) return;
if (progdefaults.mbar_scheme > MACRO_SINGLE_BAR_MAX) {
altMacros = 1;
for (int i = 0; i < NUMMACKEYS; i++) {
btnMacro[i]->label(macros.name[i].c_str());
btnMacro[i]->redraw_label();
btnMacro[NUMMACKEYS + i]->label(
macros.name[(altMacros * NUMMACKEYS) + i].c_str());
btnMacro[NUMMACKEYS + i]->redraw_label();
}
btnAltMacros1->label("1");
btnAltMacros1->redraw_label();
btnAltMacros2->label("2");
btnAltMacros2->redraw_label();
} else {
altMacros = 0;
btnAltMacros1->label("1");
btnAltMacros1->redraw_label();
for (int i = 0; i < NUMMACKEYS; i++) {
btnMacro[i]->label(macros.name[i].c_str());
btnMacro[i]->redraw_label();
}
}
for (int i = 0; i < 48; i++) {
btnDockMacro[i]->label(macros.name[i].c_str());
btnDockMacro[i]->redraw_label();
}
}
void cb_mnuPicViewer(Fl_Menu_ *, void *) {
if (picRxWin) {
picRx->redraw();
picRxWin->show();
}
}
void cb_mnuThorViewRaw(Fl_Menu_ *, void *) {
thor_load_raw_video();
}
void cb_mnuIfkpViewRaw(Fl_Menu_ *, void *) {
ifkp_load_raw_video();
}
void cb_sldrSquelch(Fl_Slider* o, void*) {
if (progdefaults.show_psm_btn && progStatus.kpsql_enabled) {
progStatus.sldrPwrSquelchValue = o->value();
} else {
progStatus.sldrSquelchValue = o->value();
set_mode_squelch( active_modem->get_mode(), progStatus.sldrSquelchValue );
}
restoreFocus(13);
}
bool oktoclear = true;
void updateOutSerNo()
{
Fl_Input2* outsn[] = {
outSQSO_serno1, outSQSO_serno2,
outSerNo1, outSerNo2, outSerNo3, outSerNo4,
outSerNo5, outSerNo6, outSerNo7, outSerNo8,
out_IARI_SerNo1, out_IARI_SerNo2,
// outSerNo_WAE1, outSerNo_WAE2,
outSerNo_WPX1, outSerNo_WPX2
};
size_t num_fields = sizeof(outsn)/sizeof(*outsn);
for (size_t i = 0; i < num_fields; i++) {
outsn[i]->value("");
outsn[i]->redraw();
}
int nr = contest_count.count;
if (!n3fjp_serno.empty()) {
sscanf(n3fjp_serno.c_str(), "%d", &nr);
}
char szcnt[10] = "";
contest_count.Format(progdefaults.ContestDigits, progdefaults.UseLeadingZeros);
snprintf(szcnt, sizeof(szcnt), contest_count.fmt.c_str(), nr);
for (size_t i = 0; i < num_fields; i++) {
outsn[i]->value(szcnt);
outsn[i]->redraw();
}
}
static std::string old_call;
static std::string new_call;
void set599()
{
if (bWF_only)
return;
Fl_Input2* rstin[] = {
inpRstIn1, inpRstIn2, inpRstIn3, inpRstIn4, inpRstIn_AICW2,
inpRstIn_SQSO2,
inp_IARI_RSTin2,
// inpRstIn_WAE2,
inpRstIn_WPX2};
Fl_Input2* rstout[] = {
inpRstOut1, inpRstOut2, inpRstOut3, inpRstOut4, inpRstIn_AICW2,
inpRstOut_SQSO2,
inp_IARI_RSTout2,
// inpRstOut_WAE2,
inpRstOut_WPX2};
if (!active_modem) return;
std::string defrst = (active_modem->get_mode() == MODE_SSB) ? "59" : "599";
if (progdefaults.RSTin_default) {
size_t num_fields = sizeof(rstin)/sizeof(*rstin);
for (size_t i = 0; i < num_fields; i++)
rstin[i]->value(defrst.c_str());
}
if (progdefaults.RSTdefault) {
size_t num_fields = sizeof(rstout)/sizeof(*rstout);
for (size_t i = 0; i < num_fields; i++)
rstout[i]->value(defrst.c_str());
}
if (progdefaults.logging > 0 && progdefaults.fixed599) {
size_t num_fields = sizeof(rstout)/sizeof(*rstout);
for (size_t i = 0; i < num_fields; i++)
rstout[i]->value(defrst.c_str());
}
}
void init_country_fields()
{
Fl_ComboBox *country_fields[] = {
cboCountryQSO,
cboCountryAICW2,
cboCountryAIDX2,
cboCountryCQ2,
cboCountryCQDX2,
cboCountryIARI2,
cboCountryRTU2//,
// cboCountryWAE2
};
for (size_t i = 0; i < sizeof(country_fields)/sizeof(*country_fields); i++) {
country_fields[i]->add(cbolist.c_str());
}
cboCountyQSO->add(counties().c_str());
}
void set_log_colors()
{
Fl_Input2* qso_fields[] = {
inpCall1, inpCall2, inpCall3, inpCall4,
inpName1, inpName2,
inpTimeOn1, inpTimeOn2, inpTimeOn3, inpTimeOn4, inpTimeOn5,
inpRstIn1, inpRstIn2,
inpRstOut1, inpRstOut2,
inpQth, inpLoc1, inpAZ, inpVEprov,
inpState1,
inpSerNo1, inpSerNo2, inpSerNo3, inpSerNo4,
outSerNo1, outSerNo2, outSerNo3, outSerNo4,
outSerNo5, outSerNo6, outSerNo7, outSerNo8,
inpXchgIn1, inpXchgIn2,
inp_FD_class1, inp_FD_section1, inp_FD_class2, inp_FD_section2,
inp_KD_name2, inp_KD_age1, inp_KD_age2,
inp_KD_state1, inp_KD_state2,
inp_KD_VEprov1, inp_KD_VEprov2,
inp_KD_XchgIn1, inp_KD_XchgIn2,
inp_SS_Check1, inp_SS_Precedence1, inp_SS_Section1, inp_SS_SerialNoR1,
inp_SS_Check2, inp_SS_Precedence2, inp_SS_Section2, inp_SS_SerialNoR2,
inp_CQ_RSTin2, inp_CQDX_RSTin2,
inp_CQ_RSTout2, inp_CQDX_RSTout2,
inp_CQstate1, inp_CQstate2,
inp_CQzone1, inp_CQzone2,
inp_CQDXzone1, inp_CQDXzone2,
inp_1010_XchgIn1, inp_1010_XchgIn2, inp_1010_name2, inp_1010_nr1, inp_1010_nr2,
inp_ARR_Name2, inp_ARR_XchgIn1, inp_ARR_XchgIn2, inp_ARR_check1, inp_ARR_check2,
inp_ASCR_RSTin2, inp_ASCR_RSTout2, inp_ASCR_XchgIn1, inp_ASCR_XchgIn2,
inp_ASCR_class1, inp_ASCR_class2, inp_ASCR_name2,
inp_vhf_Loc1, inp_vhf_Loc2,
inp_vhf_RSTin1, inp_vhf_RSTin2,
inp_vhf_RSTout1, inp_vhf_RSTout2,
inpSPCnum_NAQP1, inpSPCnum_NAQP2,
inpNAQPname2, inp_name_NAS2,
inp_ser_NAS1, inpSPCnum_NAS1,
inp_ser_NAS2, inpSPCnum_NAS2,
inpRTU_stpr1, inpRTU_stpr2,
inpRTU_RSTin2, inpRTU_RSTout2,
inpRTU_serno1, inpRTU_serno2,
inp_IARI_PR1, inp_IARI_PR2,
inp_IARI_RSTin2, inp_IARI_RSTout2,
out_IARI_SerNo1, inp_IARI_SerNo1,
out_IARI_SerNo2, inp_IARI_SerNo2,
inpRstIn3, inpRstOut3,
inpRstIn4, inpRstOut4,
inp_JOTA_scout1, inp_JOTA_scout2,
inp_JOTA_troop1, inp_JOTA_troop2,
inp_JOTA_spc1, inp_JOTA_spc2,
inpRstIn_AICW2, inpRstOut_AICW2,
inpSPCnum_AICW1, inpSPCnum_AICW2,
inpSQSO_state1, inpSQSO_state2,
inpSQSO_county1, inpSQSO_county2,
inpSQSO_serno1, inpSQSO_serno2,
outSQSO_serno1, outSQSO_serno2,
inpRstIn_SQSO2, inpRstOut_SQSO2,
inpSQSO_name2,
inpSQSO_category1, inpSQSO_category2,
inpSerNo_WPX1, inpSerNo_WPX2,
inpRstIn_WPX2, inpRstOut_WPX2,
outSerNo_WPX1, outSerNo_WPX2,
inpSerNo_WAE1, inpSerNo_WAE2,
outSerNo_WAE1, outSerNo_WAE2,
inpRstIn_WAE2, inpRstOut_WAE2,
inpNotes };
if (!bWF_only) {
Fl_ComboBox *country_fields[] = {
cboCountyQSO, cboCountryQSO,
cboCountryAICW2,
cboCountryAIDX2,
cboCountryCQ2,
cboCountryCQDX2,
cboCountryIARI2,
cboCountryRTU2 //,
// cboCountryWAE2
};
for (size_t i = 0; i < sizeof(country_fields)/sizeof(*country_fields); i++) {
country_fields[i]->redraw();
combo_color_font(country_fields[i]);
}
size_t num_fields = sizeof(qso_fields)/sizeof(*qso_fields);
for (size_t i = 0; i < num_fields; i++) {
qso_fields[i]->textsize(progdefaults.LOGGINGtextsize);
qso_fields[i]->textfont(progdefaults.LOGGINGtextfont);
qso_fields[i]->textcolor(progdefaults.LOGGINGtextcolor);
qso_fields[i]->color(progdefaults.LOGGINGcolor);
qso_fields[i]->labelfont(progdefaults.LOGGINGtextfont);
qso_fields[i]->redraw_label();
}
if (!progdefaults.SQSOlogstate) {
inpSQSO_state1->hide();
inpSQSO_state2->hide();
}
if (!progdefaults.SQSOlogcounty) {
inpSQSO_county1->hide();
inpSQSO_county2->hide();
}
if (!progdefaults.SQSOlogserno) {
inpSQSO_serno1->hide();
inpSQSO_serno2->hide();
outSQSO_serno1->hide();
outSQSO_serno2->hide();
}
if (!progdefaults.SQSOlogrst) {
inpRstIn_SQSO2->hide();
inpRstOut_SQSO2->hide();
}
if (!progdefaults.SQSOlogname) {
inpSQSO_name2->hide();
}
if (!progdefaults.SQSOlogcat) {
inpSQSO_category1->hide();
inpSQSO_category2->hide();
}
for (size_t i = 0; i < num_fields; i++) {
qso_fields[i]->redraw();
}
}
}
void clear_time_on()
{
Fl_Input2* log_fields[] = {
inpTimeOn1, inpTimeOn2, inpTimeOn3, inpTimeOn4, inpTimeOn5 };
size_t num_fields = sizeof(log_fields)/sizeof(*log_fields);
for (size_t i = 0; i < num_fields; i++) {
log_fields[i]->value("");
log_fields[i]->textsize(progdefaults.LOGGINGtextsize);
log_fields[i]->textfont(progdefaults.LOGGINGtextfont);
log_fields[i]->textcolor(progdefaults.LOGGINGtextcolor);
log_fields[i]->color(progdefaults.LOGGINGcolor);
log_fields[i]->labelfont(progdefaults.LOGGINGtextfont);
log_fields[i]->show();
log_fields[i]->redraw_label();
log_fields[i]->redraw();
}
}
void clear_log_fields()
{
Fl_Input2* log_fields[] = {
inpName1, inpName2,
// inpTimeOn1, inpTimeOn2, inpTimeOn3, inpTimeOn4, inpTimeOn5,
inpRstIn1, inpRstIn2,
inpRstOut1, inpRstOut2,
inpQth, inpLoc1, inpAZ, inpVEprov,
inpState1,
inpSerNo1, inpSerNo2,
outSerNo1, outSerNo2,
outSerNo3, outSerNo4,
inpXchgIn1, inpXchgIn2,
inp_FD_class1, inp_FD_section1, inp_FD_class2, inp_FD_section2,
inp_KD_name2, inp_KD_age1, inp_KD_age2,
inp_KD_state1, inp_KD_state2,
inp_KD_VEprov1, inp_KD_VEprov2,
inp_KD_XchgIn1, inp_KD_XchgIn2,
inp_SS_Check1, inp_SS_Precedence1, inp_SS_Section1, inp_SS_SerialNoR1,
inp_SS_Check2, inp_SS_Precedence2, inp_SS_Section2, inp_SS_SerialNoR2,
inp_CQ_RSTin2, inp_CQDX_RSTin2,
inp_CQ_RSTout2, inp_CQDX_RSTout2,
inp_CQstate1, inp_CQstate2,
inp_CQzone1, inp_CQzone2,
inp_CQDXzone1, inp_CQDXzone2,
inp_1010_XchgIn1, inp_1010_XchgIn2, inp_1010_name2, inp_1010_nr1, inp_1010_nr2,
inp_ARR_Name2, inp_ARR_XchgIn1, inp_ARR_XchgIn2, inp_ARR_check1, inp_ARR_check2,
inp_ASCR_RSTin2, inp_ASCR_RSTout2, inp_ASCR_XchgIn1, inp_ASCR_XchgIn2,
inp_ASCR_class1, inp_ASCR_class2, inp_ASCR_name2,
inp_vhf_Loc1, inp_vhf_Loc2,
inp_vhf_RSTin1, inp_vhf_RSTin2,
inp_vhf_RSTout1, inp_vhf_RSTout2,
inpSPCnum_NAQP1, inpSPCnum_NAQP2,
inpNAQPname2, inp_name_NAS2,
outSerNo4, inp_ser_NAS1, inpSPCnum_NAS1,
outSerNo5, inp_ser_NAS2, inpSPCnum_NAS2,
inpRTU_stpr1, inpRTU_stpr2,
inpRTU_RSTin2, inpRTU_RSTout2,
inpRTU_serno1, inpRTU_serno2,
inp_IARI_RSTin2, inp_IARI_RSTout2,
out_IARI_SerNo1, inp_IARI_SerNo1,
out_IARI_SerNo2, inp_IARI_SerNo2,
inp_IARI_PR1, inp_IARI_PR2,
inpSerNo3, inpSerNo4,
outSerNo7, outSerNo8,
inpRstIn3, inpRstOut3,
inpRstIn4, inpRstOut4,
inp_JOTA_scout1, inp_JOTA_scout2,
inp_JOTA_troop1, inp_JOTA_troop2,
inp_JOTA_spc1, inp_JOTA_spc2,
inpRstIn_AICW2, inpRstOut_AICW2,
inpSPCnum_AICW1, inpSPCnum_AICW2,
inpSerNo_WPX1, inpSerNo_WPX2,
inpRstIn_WPX2, inpRstOut_WPX2,
inpSerNo_WAE1, inpSerNo_WAE2,
outSerNo_WAE1, outSerNo_WAE2,
inpRstIn_WAE2, inpRstOut_WAE2,
inpSQSO_category1, inpSQSO_category2,
inpSQSO_county1, inpSQSO_county2,
inpSQSO_name2,
inpSQSO_serno1, inpSQSO_serno2,
inpSQSO_state1, inpSQSO_state2,
inpNotes };
size_t num_fields = sizeof(log_fields)/sizeof(*log_fields);
for (size_t i = 0; i < num_fields; i++) {
log_fields[i]->value("");
log_fields[i]->textsize(progdefaults.LOGGINGtextsize);
log_fields[i]->textfont(progdefaults.LOGGINGtextfont);
log_fields[i]->textcolor(progdefaults.LOGGINGtextcolor);
log_fields[i]->color(progdefaults.LOGGINGcolor);
log_fields[i]->labelfont(progdefaults.LOGGINGtextfont);
log_fields[i]->show();
log_fields[i]->redraw_label();
log_fields[i]->redraw();
}
Fl_ComboBox *country_fields[] = {
cboCountyQSO, cboCountryQSO,
cboCountryAICW2,
cboCountryAIDX2,
cboCountryCQ2,
cboCountryCQDX2,
cboCountryIARI2,
cboCountryRTU2 //,
// cboCountryWAE2
};
for (size_t i = 0; i < sizeof(country_fields)/sizeof(*country_fields); i++) {
country_fields[i]->value("");
country_fields[i]->redraw();
combo_color_font(country_fields[i]);
}
if (!progdefaults.SQSOlogstate) {
inpSQSO_state1->hide();
inpSQSO_state2->hide();
}
if (!progdefaults.SQSOlogcounty) {
inpSQSO_county1->hide();
inpSQSO_county2->hide();
}
if (!progdefaults.SQSOlogserno) {
inpSQSO_serno1->hide();
inpSQSO_serno2->hide();
outSQSO_serno1->hide();
outSQSO_serno2->hide();
}
if (!progdefaults.SQSOlogrst) {
inpRstIn_SQSO2->hide();
inpRstOut_SQSO2->hide();
}
if (!progdefaults.SQSOlogname) {
inpSQSO_name2->hide();
}
if (!progdefaults.SQSOlogcat) {
inpSQSO_category1->hide();
inpSQSO_category2->hide();
}
if (progdefaults.logging == LOG_SQSO) {
std::string tmp = QSOparties.qso_parties[progdefaults.SQSOcontest].state;
if (!progdefaults.SQSOinstate && (tmp != "7QP") && (tmp != "6NE"))
inpState->value(tmp.c_str());
}
set599();
updateOutSerNo();
}
void clearQSO()
{
if (bWF_only) return;
Fl_Input2* call_fields[] = { inpCall1, inpCall2, inpCall3, inpCall4 };
size_t num_fields = sizeof(call_fields)/sizeof(*call_fields);
for (size_t i = 0; i < num_fields; i++) {
call_fields[i]->value("");
call_fields[i]->textsize(progdefaults.LOGGINGtextsize);
call_fields[i]->textfont(progdefaults.LOGGINGtextfont);
call_fields[i]->textcolor(progdefaults.LOGGINGtextcolor);
call_fields[i]->color(progdefaults.LOGGINGcolor);
call_fields[i]->labelfont(progdefaults.LOGGINGtextfont);
call_fields[i]->show();
call_fields[i]->redraw_label();
call_fields[i]->redraw();
}
clear_log_fields();
clear_time_on();
if (inpSearchString)
inpSearchString->value ("");
old_call.clear();
new_call.clear();
qso_time.clear();
qso_exchange.clear();
oktoclear = true;
inpCall->take_focus();
if (n3fjp_connected)
n3fjp_clear_record();
set599();
updateOutSerNo();
}
void cb_ResetSerNbr()
{
contest_count.count = progdefaults.ContestStart;
updateOutSerNo();
}
void cb_btnTimeOn(Fl_Widget* w, void*)
{
inpTimeOn->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn1->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn2->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn3->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn4->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn5->value(inpTimeOff->value(), inpTimeOff->size());
sTime_on = sTime_off = ztime();
sDate_on = sDate_off = zdate();
restoreFocus(14);
}
void cb_loc(Fl_Widget* w, void*)
{
Fl_Input2 *inp = (Fl_Input2 *) w;
inpLoc1->value(inp->value());
inp_vhf_Loc1->value(inp->value());
inp_vhf_Loc2->value(inp->value());
std::string s;
s = inp->value();
if (s.length() < 3) return;
double lon[2], lat[2], distance, azimuth;
size_t len = s.length();
if (len > MAX_LOC) {
s.erase(MAX_LOC);
len = MAX_LOC;
}
bool ok = true;
for (size_t i = 0; i < len; i++) {
if (ok)
switch (i) {
case 0 :
case 1 :
case 4 :
case 5 :
ok = isalpha(s[i]);
break;
case 2 :
case 3 :
case 6 :
case 7 :
ok = (s[i] >= '0' && s[i] <= '9');
}
}
if ( !ok) {
inpLoc1->value("");
inp_vhf_Loc1->value("");
inp_vhf_Loc2->value("");
return;
}
if (QRB::locator2longlat(&lon[0], &lat[0], progdefaults.myLocator.c_str()) == QRB::QRB_OK &&
QRB::locator2longlat(&lon[1], &lat[1], s.c_str()) == QRB::QRB_OK &&
QRB::qrb(lon[0], lat[0], lon[1], lat[1], &distance, &azimuth) == QRB::QRB_OK) {
char az[4];
snprintf(az, sizeof(az), "%3.0f", azimuth);
inpAZ->value(az);
} else
inpAZ->value("");
if (Fl::event() == FL_KEYBOARD) {
int k = Fl::event_key();
if (k == FL_Enter || k == FL_KP_Enter)
restoreFocus(15);
}
}
void cb_call(Fl_Widget* w, void*)
{
if (bWF_only) return;
qsodb.isdirty(1);
if (progdefaults.calluppercase) {
int pos = inpCall->position();
char* uc = new char[inpCall->size()];
std::transform(inpCall->value(), inpCall->value() + inpCall->size(), uc,
static_cast<int (*)(int)>(std::toupper));
inpCall->value(uc, inpCall->size());
inpCall->position(pos);
delete [] uc;
}
new_call = inpCall->value();
if (new_call.length() > MAX_CALL) {
new_call.erase(MAX_CALL);
}
if (new_call != old_call) clear_log_fields();
inpCall1->value(new_call.c_str());
inpCall2->value(new_call.c_str());
inpCall3->value(new_call.c_str());
inpCall4->value(new_call.c_str());
sDate_on = sDate_off = zdate();
sTime_on = sTime_off = ztime();
inpTimeOn->value(inpTimeOff->value());
inpTimeOn1->value(inpTimeOff->value());
inpTimeOn2->value(inpTimeOff->value());
inpTimeOn3->value(inpTimeOff->value());
inpTimeOn4->value(inpTimeOff->value());
inpTimeOn5->value(inpTimeOff->value());
if (progStatus.timer && (Fl::event() != FL_HIDE))
stopMacroTimer();
if (Fl::event() == FL_KEYBOARD) {
int k = Fl::event_key();
if (k == FL_Enter || k == FL_KP_Enter) {
restoreFocus(16);
n3fjp_calltab = true;
}
if (k == FL_Tab) {
n3fjp_calltab = true;
}
}
if (old_call == new_call) {
if (n3fjp_calltab && n3fjp_connected)
SearchLastQSO(inpCall->value());
return;
}
if (new_call.empty()) {
if (n3fjp_connected) n3fjp_clear_record();
ifkp_load_avatar();
thor_load_avatar();
updateOutSerNo();
oktoclear = true;
return;
}
old_call = new_call;
oktoclear = false;
SearchLastQSO(inpCall->value());
if (active_modem->get_mode() == MODE_IFKP)
ifkp_load_avatar(inpCall->value());
if (active_modem->get_mode() >= MODE_THOR11 &&
active_modem->get_mode() <= MODE_THOR22)
thor_load_avatar(inpCall->value());
const struct dxcc* e = dxcc_lookup(inpCall->value());
if (e) {
if (progdefaults.autofill_qso_fields || progdefaults.logging != LOG_QSO) {
double lon, lat, distance, azimuth;
if (QRB::locator2longlat(&lon, &lat, progdefaults.myLocator.c_str()) == QRB::QRB_OK &&
QRB::qrb(lon, lat, -e->longitude, e->latitude, &distance, &azimuth) == QRB::QRB_OK) {
char az[4];
snprintf(az, sizeof(az), "%3.0f", azimuth);
inpAZ->value(az, sizeof(az) - 1);
}
}
std::string cntry = e->country;
std::ostringstream zone;
zone << e->cq_zone;
if (cntry.find("United States") != std::string::npos)
cntry = "USA";
cboCountry->value(cntry.c_str());
inp_CQzone->value(zone.str().c_str());
}
if (progdefaults.EnableDupCheck || FD_logged_on) {
DupCheck();
}
updateOutSerNo();
if (w != inpCall)
restoreFocus(17);
}
void cb_country(Fl_Widget *w, void*)
{
Fl_ComboBox * inp = (Fl_ComboBox *) w;
std::string str = inp->value();
Fl_ComboBox *country_fields[] = {
cboCountryQSO,
cboCountryAICW2,
cboCountryAIDX2,
cboCountryCQ2,
cboCountryCQDX2,
cboCountryIARI2,
cboCountryRTU2 //,
// cboCountryWAE2
};
for (size_t i = 0; i < sizeof(country_fields)/sizeof(*country_fields); i++) {
country_fields[i]->value(str.c_str());
country_fields[i]->position(0);
country_fields[i]->redraw();
}
if (progdefaults.EnableDupCheck || FD_logged_on) {
DupCheck();
}
if (Fl::event() == FL_KEYBOARD) {
int k = Fl::event_key();
if (k == FL_Enter || k == FL_KP_Enter)
restoreFocus(18);
}
}
void cb_log(Fl_Widget* w, void*)
{
Fl_Input2 *inp = (Fl_Input2 *) w;
if (inp == inpName1 || inp == inpName2 ||
inp == inp_KD_name2 ||
inp == inp_1010_name2 ||
inp == inp_ARR_Name2 ||
inp == inpNAQPname2 ) {
int p = inp->position();
std::string val = inp->value();
inpName1->value(val.c_str());
inpName2->value(val.c_str());
inp_KD_name2->value(val.c_str());
inp_1010_name2->value(val.c_str());
inp_ARR_Name2->value(val.c_str());
inpNAQPname2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_KD_name2 || inp == inp_1010_name2 ||
inp == inp_ARR_Name2 || inp == inpNAQPname2) {
int p = inp->position();
std::string val = inp->value();
inpName1->value(val.c_str());
inpName2->value(val.c_str());
inp_KD_name2->value(val.c_str());
inp_1010_name2->value(val.c_str());
inp_ARR_Name2->value(val.c_str());
inpNAQPname2->value(val.c_str());
inp->position(p);
}
else if (inp == inpRstIn1 || inp == inpRstIn2 ||
inp == inpRstIn3 || inp == inpRstIn4 || inp == inpRstIn_AICW2 ||
inp == inpRTU_RSTin2 || inp == inp_CQ_RSTin2 ||
inp == inp_vhf_RSTin1 || inp == inp_vhf_RSTin2 ) {
int p = inp->position();
std::string val = inp->value();
inpRstIn1->value(val.c_str());
inpRstIn2->value(val.c_str());
inpRstIn3->value(val.c_str());
inpRstIn4->value(val.c_str());
inpRstIn_AICW2->value(val.c_str());
inpRTU_RSTin2->value(val.c_str());
inp_vhf_RSTin1->value(val.c_str());
inp_vhf_RSTin2->value(val.c_str());
inp_CQ_RSTin2->value(val.c_str());
inp->position(p);
}
else if (inp == inpRstOut1 || inp == inpRstOut2 ||
inp == inp_CQ_RSTout2 ||
inp == inpRTU_RSTout2 ||
inp == inpRstOut3 || inp == inpRstOut4 || inp == inpRstOut_AICW2 ||
inp == inp_vhf_RSTout1 || inp == inp_vhf_RSTout2 ) {
int p = inp->position();
std::string val = inp->value();
inpRstOut1->value(val.c_str());
inpRstOut2->value(val.c_str());
inpRstOut3->value(val.c_str());
inpRstOut4->value(val.c_str());
inpRTU_RSTout2->value(val.c_str());
inpRstOut_AICW2->value(val.c_str());
inp_CQ_RSTout2->value(val.c_str());
inp_vhf_RSTout1->value(val.c_str());
inp_vhf_RSTout2->value(val.c_str());
inp->position(p);
}
else if (inp == inpTimeOn1 || inp == inpTimeOn2 || inp == inpTimeOn3 ||
inp == inpTimeOn4 || inp == inpTimeOn5) {
int p = inp->position();
std::string val = inp->value();
inpTimeOn1->value(val.c_str());
inpTimeOn2->value(val.c_str());
inpTimeOn3->value(val.c_str());
inpTimeOn4->value(val.c_str());
inpTimeOn5->value(val.c_str());
inp->position(p);
}
else if (inp == inpTimeOff1 || inp == inpTimeOff2 || inp == inpTimeOff3 ||
inp == inpTimeOff4 || inp == inpTimeOff5) {
int p = inp->position();
std::string val = inp->value();
inpTimeOff1->value(val.c_str());
inpTimeOff2->value(val.c_str());
inpTimeOff3->value(val.c_str());
inpTimeOff4->value(val.c_str());
inpTimeOff5->value(val.c_str());
inp->position(p);
}
else if (inp == inpXchgIn1 || inp == inpXchgIn2 ) {
int p = inp->position();
std::string val = inp->value();
inpXchgIn1->value(val.c_str());
inpXchgIn2->value(val.c_str());
inp_KD_XchgIn1->value(val.c_str());
inp_KD_XchgIn2->value(val.c_str());
inp_1010_XchgIn1->value(val.c_str());
inp_1010_XchgIn2->value(val.c_str());
inp_ARR_XchgIn1->value(val.c_str());
inp_ARR_XchgIn2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_KD_XchgIn1 || inp == inp_KD_XchgIn2) {
int p = inp->position();
std::string val = inp->value();
inpXchgIn1->value(val.c_str());
inpXchgIn2->value(val.c_str());
inp_KD_XchgIn1->value(val.c_str());
inp_KD_XchgIn2->value(val.c_str());
inp_1010_XchgIn1->value(val.c_str());
inp_1010_XchgIn2->value(val.c_str());
inp_ARR_XchgIn1->value(val.c_str());
inp_ARR_XchgIn2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_1010_XchgIn1 || inp == inp_1010_XchgIn2) {
int p = inp->position();
std::string val = inp->value();
inpXchgIn1->value(val.c_str());
inpXchgIn2->value(val.c_str());
inp_KD_XchgIn1->value(val.c_str());
inp_KD_XchgIn2->value(val.c_str());
inp_1010_XchgIn1->value(val.c_str());
inp_1010_XchgIn2->value(val.c_str());
inp_ARR_XchgIn1->value(val.c_str());
inp_ARR_XchgIn2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_ARR_XchgIn1 || inp == inp_ARR_XchgIn2) {
int p = inp->position();
std::string val = inp->value();
inpXchgIn1->value(val.c_str());
inpXchgIn2->value(val.c_str());
inp_KD_XchgIn1->value(val.c_str());
inp_KD_XchgIn2->value(val.c_str());
inp_1010_XchgIn1->value(val.c_str());
inp_1010_XchgIn2->value(val.c_str());
inp_ARR_XchgIn1->value(val.c_str());
inp_ARR_XchgIn2->value(val.c_str());
inp->position(p);
}
else if (inp == inpSerNo1 || inp == inpSerNo2 ||
inp == inpRTU_serno1 || inp == inpRTU_serno2 ||
inp == inp_SS_SerialNoR1 || inp == inp_SS_SerialNoR2 ) {
int p = inp->position();
std::string val = inp->value();
inpSerNo1->value(val.c_str());
inpSerNo2->value(val.c_str());
inp_SS_SerialNoR1->value(val.c_str());
inp_SS_SerialNoR2->value(val.c_str());
inpRTU_serno1->value(val.c_str());
inpRTU_serno2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_SS_Precedence1 || inp == inp_SS_Precedence2) {
int p = inp->position();
std::string val = inp->value();
inp_SS_Precedence1->value(val.c_str());
inp_SS_Precedence2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_SS_Check1 || inp == inp_SS_Check2) {
int p = inp->position();
std::string val = inp->value();
inp_SS_Check1->value(val.c_str());
inp_SS_Check2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_SS_Section1 || inp == inp_SS_Section2) {
int p = inp->position();
std::string val = inp->value();
inp_SS_Section1->value(val.c_str());
inp_SS_Section2->value(val.c_str());
inp->position(p);
}
else if (inp == inpSPCnum_NAQP1 || inp == inpSPCnum_NAQP2) {
int p = inp->position();
std::string val = inp->value();
inpSPCnum_NAQP1->value(val.c_str());
inpSPCnum_NAQP2->value(val.c_str());
inp->position(p);
}
else if (inp == inpSPCnum_AICW1 || inp == inpSPCnum_AICW2) { // Rx power
int p = inp->position();
std::string val = inp->value();
inpSPCnum_AICW1->value(val.c_str());
inpSPCnum_AICW2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_ARR_check1 || inp == inp_ARR_check2) {
int p = inp->position();
std::string val = inp->value();
inp_ARR_check1->value(val.c_str());
inp_ARR_check2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_1010_nr1 || inp == inp_1010_nr2) {
int p = inp->position();
std::string val = inp->value();
inp_1010_nr1->value(val.c_str());
inp_1010_nr2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_FD_class1 || inp == inp_FD_class2) {
int p = inp->position();
std::string str = ucasestr(inp->value());
inp_FD_class1->value(str.c_str());
inp_FD_class2->value(str.c_str());
inp->position(p);
}
else if (inp == inp_ASCR_class1 || inp == inp_ASCR_class2) {
int p = inp->position();
std::string str = ucasestr(inp->value());
inp_ASCR_class1->value(str.c_str());
inp_ASCR_class2->value(str.c_str());
inp->position(p);
}
else if (inp == inp_FD_section1 || inp == inp_FD_section2) {
int p = inp->position();
std::string str = ucasestr(inp->value());
inp_FD_section1->value(str.c_str());
inp_FD_section2->value(str.c_str());
inp->position(p);
}
else if (inp == inp_KD_age1 || inp == inp_KD_age2) {
int p = inp->position();
std::string val = inp->value();
inp_KD_age1->value(val.c_str());
inp_KD_age2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_KD_state1 || inp == inp_KD_state2) {
int p = inp->position();
std::string str = ucasestr(inp->value());
inp_KD_state1->value(str.c_str());
inp_KD_state2->value(str.c_str());
inp->position(p);
}
else if (inp == inp_KD_VEprov1 || inp == inp_KD_VEprov2) {
int p = inp->position();
std::string str = ucasestr(inp->value());
inp_KD_VEprov1->value(str.c_str());
inp_KD_VEprov2->value(str.c_str());
inp->position(p);
}
else if (inp == inp_ser_NAS1 || inp == inp_ser_NAS2) {
int p = inp->position();
std::string val = inp->value();
inp_ser_NAS1->value(val.c_str());
inp_ser_NAS2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_JOTA_scout1 || inp == inp_JOTA_scout2) {
int p = inp->position();
std::string val = inp->value();
inp_JOTA_scout1->value(val.c_str());
inp_JOTA_scout2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_JOTA_troop1 || inp == inp_JOTA_troop2) {
int p = inp->position();
std::string val = inp->value();
inp_JOTA_troop1->value(val.c_str());
inp_JOTA_troop2->value(val.c_str());
inp->position(p);
}
else if (inp == inp_JOTA_spc1 || inp == inp_JOTA_spc2) {
int p = inp->position();
std::string val = inp->value();
inp_JOTA_spc1->value(val.c_str());
inp_JOTA_spc2->value(val.c_str());
inp->position(p);
}
else if (inp == inpState) {
Cstates st;
if (inpCounty->value()[0])
cboCountyQSO->value(
std::string(st.state_short(inpState->value())).append(" ").
append(st.county(inpState->value(), inpCounty->value())).c_str());
else
cboCountyQSO->clear_entry();
cboCountyQSO->redraw();
}
else if (inp == inpCounty) {
Cstates st;
if (inpState->value()[0])
cboCountyQSO->value(
std::string(st.state_short(inpState->value())).append(" ").
append(st.county(inpState->value(), inpCounty->value())).c_str());
else
cboCountyQSO->clear_entry();
cboCountyQSO->redraw();
}
if (progdefaults.EnableDupCheck || FD_logged_on) {
DupCheck();
}
if (Fl::event() == FL_KEYBOARD) {
int k = Fl::event_key();
if (k == FL_Enter || k == FL_KP_Enter)
restoreFocus(18);
}
}
void cbClearCall(Fl_Widget *b, void *)
{
clearQSO();
}
void qsoClear_cb(Fl_Widget *b, void *)
{
bool CLEARLOG = true;
if (progdefaults.NagMe && !oktoclear)
CLEARLOG = (fl_choice2(_("Clear log fields?"), _("Cancel"), _("OK"), NULL) == 1);
if (CLEARLOG) {
clearQSO();
}
clear_Lookup();
if (active_modem->get_mode() == MODE_IFKP)
ifkp_clear_avatar();
if (active_modem->get_mode() >= MODE_THOR11 &&
active_modem->get_mode() <= MODE_THOR22)
thor_clear_avatar();
qsodb.isdirty(0);
}
extern cQsoDb qsodb;
void qso_save_now()
{
// if (!qsodb.isdirty()) return;
std::string havecall = inpCall->value();
std::string timeon = inpTimeOn->value();
while (!havecall.empty() && havecall[0] <= ' ') havecall.erase(0,1);
while (!havecall.empty() && havecall[havecall.length() - 1] <= ' ') havecall.erase(havecall.length()-1, 1);
if (havecall.empty())
return;
sDate_off = zdate();
sTime_off = ztime();
if (!timeon.empty())
sTime_on = timeon.c_str();
else
sTime_on = sTime_off;
submit_log();
if (progdefaults.ClearOnSave)
clearQSO();
}
void qsoSave_cb(Fl_Widget *b, void *)
{
qso_save_now();
ReceiveText->mark(FTextBase::XMIT);
restoreFocus(20);
}
void cb_QRZ(Fl_Widget *b, void *)
{
if (!*inpCall->value())
return restoreFocus(21);
switch (Fl::event_button()) {
case FL_LEFT_MOUSE:
CALLSIGNquery();
oktoclear = false;
break;
case FL_RIGHT_MOUSE:
if (quick_choice(std::string("Spot \"").append(inpCall->value()).append("\"?").c_str(),
2, _("Confirm"), _("Cancel"), NULL) == 1)
spot_manual(inpCall->value(), inpLoc->value());
break;
default:
break;
}
restoreFocus(22);
}
void status_cb(Fl_Widget *b, void *arg)
{
if (Fl::event_button() == FL_RIGHT_MOUSE) {
trx_mode md = active_modem->get_mode();
if (md == MODE_FMT) open_config(TAB_FMT);
else if (md == MODE_CW) open_config(TAB_CW);
else if (md == MODE_IFKP) open_config(TAB_IFKP);
else if (md == MODE_FSQ) open_config(TAB_FSQ);
else if (md == MODE_RTTY) open_config(TAB_RTTY);
else if (md >= MODE_THOR_FIRST && md <= MODE_THOR_LAST) open_config(TAB_THOR);
else if (md >= MODE_OLIVIA_FIRST && md <= MODE_OLIVIA_LAST) open_config(TAB_OLIVIA);
else if (md >= MODE_PSK_FIRST && md <= MODE_PSK_LAST) open_config(TAB_PSK);
else if (md >= MODE_QPSK_FIRST && md <= MODE_QPSK_LAST) open_config(TAB_PSK);
else if (md >= MODE_8PSK_FIRST && md <= MODE_8PSK_LAST) open_config(TAB_PSK);
else if (md >= MODE_MT63_FIRST && md <= MODE_MT63_LAST) open_config(TAB_MT63);
else if (md >= MODE_NAVTEX_FIRST && md <= MODE_NAVTEX_LAST) open_config(TAB_NAVTEX);
else if (md >= MODE_WEFAX_FIRST && md <= MODE_WEFAX_LAST) open_config(TAB_WEFAX);
else if (md >= MODE_HELL_FIRST && md <= MODE_HELL_LAST) open_config(TAB_FELDHELL);
else if (md >= MODE_DOMINOEX_FIRST && md <= MODE_DOMINOEX_LAST) open_config(TAB_DOMINOEX);
else if (md >= MODE_CONTESTIA_FIRST && md <= MODE_CONTESTIA_LAST) open_config(TAB_CONTESTIA);
}
else {
if (!quick_change)
return;
const Fl_Menu_Item *m = quick_change->popup(Fl::event_x(), Fl::event_y());
if (m && m->callback())
m->do_callback(0);
}
static_cast<Fl_Button*>(b)->clear();
restoreFocus(23);
}
void cbAFC(Fl_Widget *w, void *vi)
{
Fl_Button *b = (Fl_Button *)w;
int v = b->value();
progStatus.afconoff = v;
set_mode_afc(active_modem->get_mode(), progStatus.afconoff);
}
void cbSQL(Fl_Widget *w, void *vi)
{
Fl_Button *b = (Fl_Button *)w;
int v = b->value();
progStatus.sqlonoff = v ? true : false;
set_mode_squelch_onoff(active_modem->get_mode(), progStatus.sqlonoff);
}
extern void set_wf_mode(void);
void cbPwrSQL(Fl_Widget *w, void *vi)
{
Fl_Button *b = (Fl_Button *)w;
int v = b->value();
if(!v) {
sldrSquelch->value(progStatus.sldrSquelchValue);
progStatus.kpsql_enabled = false;
progdefaults.kpsql_enabled = false;
b->clear();
} else {
sldrSquelch->value(progStatus.sldrPwrSquelchValue);
progStatus.kpsql_enabled = true;
progdefaults.kpsql_enabled = true;
set_wf_mode();
b->set();
}
}
void startMacroTimer()
{
ENSURE_THREAD(FLMAIN_TID);
btnMacroTimer->color(fl_rgb_color(240, 240, 0));
btnMacroTimer->clear_output();
Fl::add_timeout(0.0, macro_timer);
}
void stopMacroTimer()
{
ENSURE_THREAD(FLMAIN_TID);
progStatus.timer = 0;
progStatus.repeatMacro = -1;
local_timed_exec = false;
Fl::remove_timeout(macro_timer);
Fl::remove_timeout(macro_timed_execute);
btnMacroTimer->label(0);
btnMacroTimer->color(FL_BACKGROUND_COLOR);
btnMacroTimer->set_output();
}
void macro_timer(void*)
{
char buf[8];
snprintf(buf, sizeof(buf), "%d", progStatus.timer);
btnMacroTimer->copy_label(buf);
if (progStatus.timer-- == 0) {
stopMacroTimer();
if (active_modem->get_mode() == MODE_IFKP) {
ifkp_tx_text->clear();
} else {
TransmitText->clear();
}
macros.execute(progStatus.timerMacro);
}
else
Fl::repeat_timeout(1.0, macro_timer);
}
static long mt_xdt, mt_xtm;
// called by main loop...ok to write to widget
void show_clock(bool yes)
{
if (!yes) {
StatusBar->label("");
StatusBar->redraw();
return;
}
static char s_clk_time[40];
time_t sked_time = time(NULL);
tm sked_tm;
gmtime_r(&sked_time, &sked_tm);
int hrs = sked_tm.tm_hour;
int mins = sked_tm.tm_min;
int secs = sked_tm.tm_sec;
snprintf(s_clk_time, sizeof(s_clk_time), "%02d:%02d:%02d",
hrs, mins, secs);
StatusBar->label(s_clk_time);
StatusBar->redraw();
}
static int timed_ptt = -1;
void macro_timed_execute(void *)
{
long dt, tm;
dt = atol(local_timed_exec ? ldate() : zdate());
tm = atol(local_timed_exec ? ltime() : ztime());
if (dt >= mt_xdt && tm >= mt_xtm) {
show_clock(false);
if (timed_ptt != 1) {
push2talk->set(true);
timed_ptt = 1;
}
macros.timed_execute();
btnMacroTimer->label(0);
btnMacroTimer->color(FL_BACKGROUND_COLOR);
btnMacroTimer->set_output();
mt_xdt = mt_xtm = 0;
} else {
show_clock(true);
if (timed_ptt != 0) {
push2talk->set(false);
timed_ptt = 0;
}
Fl::repeat_timeout(1.0, macro_timed_execute);
}
}
void startTimedExecute(std::string &title)
{
ENSURE_THREAD(FLMAIN_TID);
std::string txt = "Macro '";
txt.append(title).
append("' scheduled on ").
append(exec_date.substr(0,4)).append("/").
append(exec_date.substr(4,2)).append("/").
append(exec_date.substr(6,2)).
append(" at ").
append(exec_time.substr(0,2)).append(":").
append(exec_time.substr(2,2)).append(":").
append(exec_time.substr(4,2)).
append(local_timed_exec ? " Local" : " Zulu").
append("\n");
btnMacroTimer->label("SKED");
btnMacroTimer->color(fl_rgb_color(240, 240, 0));
btnMacroTimer->redraw_label();
ReceiveText->clear();
ReceiveText->addstr(txt, FTextBase::CTRL);
mt_xdt = atol(exec_date.c_str());
mt_xtm = atol(exec_time.c_str());
Fl::add_timeout(0.0, macro_timed_execute);
}
void cbMacroTimerButton(Fl_Widget*, void*)
{
stopMacroTimer();
restoreFocus(24);
}
void cb_mvsquelch(Fl_Widget *w, void *d)
{
progStatus.squelch_value = mvsquelch->value();
if (active_modem->get_mode() == MODE_CW)
progStatus.VIEWER_cwsquelch = progStatus.squelch_value;
else if (active_modem->get_mode() == MODE_RTTY)
progStatus.VIEWER_rttysquelch = progStatus.squelch_value;
else
progStatus.VIEWER_psksquelch = progStatus.squelch_value;
if (sldrViewerSquelch)
sldrViewerSquelch->value(progStatus.squelch_value);
}
void cb_btnClearMViewer(Fl_Widget *w, void *d)
{
if (brwsViewer)
brwsViewer->clear();
mainViewer->clear();
active_modem->clear_viewer();
}
int default_handler(int event)
{
if (bWF_only) {
if (Fl::event_key() == FL_Escape)
return 1;
return 0;
}
if (event != FL_SHORTCUT)
return 0;
if (RigViewerFrame && Fl::event_key() == FL_Escape &&
RigViewerFrame->visible() && Fl::event_inside(RigViewerFrame)) {
CloseQsoView();
return 1;
}
Fl_Widget* w = Fl::focus();
int key = Fl::event_key();
if ((key == FL_F + 4) && Fl::event_alt()) clean_exit(true);
if (fl_digi_main->contains(w)) {
if (key == FL_Escape || (key >= FL_F && key <= FL_F_Last) ||
((key == '1' || key == '2' || key == '3' || key == '4') && Fl::event_alt())) {
TransmitText->take_focus();
TransmitText->handle(FL_KEYBOARD);
return 1;
}
#ifdef __APPLE__
if ((key == '=') && (Fl::event_state() == FL_COMMAND))
#else
if (key == '=' && Fl::event_alt())
#endif
{
progStatus.txlevel += 0.1;
if (progStatus.txlevel > 0) progStatus.txlevel = 0;
cntTxLevel->value(progStatus.txlevel);
set_mode_txlevel(active_modem->get_mode(), progStatus.txlevel);
return 1;
}
#ifdef __APPLE__
if ((key == '-') && (Fl::event_state() == FL_COMMAND))
#else
if (key == '-' && Fl::event_alt())
#endif
{
progStatus.txlevel -= 0.1;
if (progStatus.txlevel < -30) progStatus.txlevel = -30;
cntTxLevel->value(progStatus.txlevel);
set_mode_txlevel(active_modem->get_mode(), progStatus.txlevel);
return 1;
}
}
else if (dlgLogbook->contains(w))
return log_search_handler(event);
else if (Fl::event_key() == FL_Escape)
return 1;
else if ( (fl_digi_main->contains(w) || dlgLogbook->contains(w)) &&
Fl::event_ctrl() )
return w->handle(FL_KEYBOARD);
return 0;
}
int wo_default_handler(int event)
{
if (event != FL_SHORTCUT)
return 0;
if (RigViewerFrame && Fl::event_key() == FL_Escape &&
RigViewerFrame->visible() && Fl::event_inside(RigViewerFrame)) {
CloseQsoView();
return 1;
}
Fl_Widget* w = Fl::focus();
int key = Fl::event_key();
if ((key == FL_F + 4) && Fl::event_alt()) clean_exit(true);
if (fl_digi_main->contains(w)) {
if (key == FL_Escape || (key >= FL_F && key <= FL_F_Last) ||
((key == '1' || key == '2' || key == '3' || key == '4') && Fl::event_alt())) {
return 1;
}
#ifdef __APPLE__
if ((key == '=') && (Fl::event_state() == FL_COMMAND))
#else
if (key == '=' && Fl::event_alt())
#endif
{
progStatus.txlevel += 0.1;
if (progStatus.txlevel > 0) progStatus.txlevel = 0;
cntTxLevel->value(progStatus.txlevel);
set_mode_txlevel(active_modem->get_mode(), progStatus.txlevel);
return 1;
}
#ifdef __APPLE__
if ((key == '-') && (Fl::event_state() == FL_COMMAND))
#else
if (key == '-' && Fl::event_alt())
#endif
{
progStatus.txlevel -= 0.1;
if (progStatus.txlevel < -30) progStatus.txlevel = -30;
cntTxLevel->value(progStatus.txlevel);
return 1;
}
}
else if (Fl::event_ctrl()) return w->handle(FL_KEYBOARD);
return 0;
}
void save_on_exit() {
if (progdefaults.changed && progdefaults.SaveConfig) {
switch (fl_choice2(_("Save changed configuration?"), NULL, _("Yes"), _("No"))) {
case 1:
progdefaults.saveDefaults();
default:
break;
}
}
if (macros.changed && progdefaults.SaveMacros) {
switch (fl_choice2(_("Save changed macros?"), NULL, _("Yes"), _("No"))) {
case 1:
macros.writeMacroFile();
default:
break;
}
}
if (!oktoclear && progdefaults.NagMe) {
switch (fl_choice2(_("Save log entry?"), NULL, _("Yes"), _("No"))) {
case 1:
qsoSave_cb(0, 0);
default:
break;
}
}
return;
}
bool first_use = false;
bool bEXITING = false;
bool clean_exit(bool ask) {
if (ask && first_use) {
switch(fl_choice2(_("Confirm Quit"), NULL, _("Yes"), _("No"))) {
case 2:
return false;
default:
break;
}
progdefaults.saveDefaults();
macros.writeMacroFile();
if (!oktoclear) {
switch (fl_choice2(_("Save log entry?"), NULL, _("Yes"), _("No"))) {
case 1:
qsoSave_cb(0, 0);
default:
break;
}
}
} else {
if (ask &&
progdefaults.confirmExit &&
(!(progdefaults.changed && progdefaults.SaveConfig) ||
!(macros.changed && progdefaults.SaveMacros) ||
!(!oktoclear && progdefaults.NagMe))) {
switch (fl_choice2(_("Confirm quit?"), NULL, _("Yes"), _("No"))) {
case 1:
break;
default:
return false;
}
}
if (ask)
save_on_exit();
}
bEXITING = true;
if (Maillogfile)
Maillogfile->log_to_file_stop();
if (logfile)
logfile->log_to_file_stop();
saveFreqList();
progStatus.saveLastState();
if (scopeview) scopeview->hide();
if (dlgViewer) dlgViewer->hide();
if (dlgLogbook) dlgLogbook->hide();
if (trx_state != STATE_RX) {
LOG_INFO("Disable TUNE");
btnTune->labelcolor(FL_FOREGROUND_COLOR);
Fl::flush();
push2talk->set(0);
set_flrig_ptt(0);
trx_receive();
MilliSleep(200);
}
LOG_INFO("Disable PTT");
delete push2talk;
#if USE_HAMLIB
LOG_INFO("Close hamlib");
hamlib_close();
#endif
LOG_INFO("Close rigCAT");
rigCAT_close();
LOG_INFO("Close ADIF i/o");
ADIF_RW_close();
LOG_INFO("Close T/R processing");
trx_close();
#if USE_HAMLIB
if (xcvr) delete xcvr;
#endif
LOG_INFO("Close logbook");
close_logbook();
MilliSleep(50);
LOG_INFO("Stop flrig i/o");
stop_flrig_thread();
LOG_INFO("Stop N3FJP logging");
n3fjp_close();
LOG_INFO("Stop FMT process");
FMT_thread_close();
LOG_INFO("Close WinKeyer i/o");
WK_exit();
LOG_INFO("Stop TOD clock");
TOD_close();
LOG_INFO("Delete audio_alert");
delete audio_alert;
LOG_INFO("Exit_process");
exit_process();
if (field_day_viewer)
if (field_day_viewer->visible())
field_day_viewer->hide();
if (dxcluster_viewer)
if (dxcluster_viewer->visible())
dxcluster_viewer->hide();
save_counties();
return true;
}
bool first_check = true;
void UI_check_swap()
{
int mv_x = text_panel->x();
int mv_y = text_panel->y();
int mv_w = mvgroup->w() > 1 ? mvgroup->w() : text_panel->w() / 2;
int mv_h = text_panel->h();
int tx_y = 0, tx_h = 0, tx_x = 0, tx_w = 0;
int rx_y = 0, rx_h = 0, rx_x = 0, rx_w = 0;
if (progdefaults.rxtx_swap && (ReceiveText->y() <= TransmitText->y())) {
tx_y = ReceiveText->y();
tx_h = first_check ? progStatus.tile_y : TransmitText->h();
tx_x = mv_x + mv_w;
tx_w = text_panel->w() - mv_w;
rx_y = tx_y + tx_h;
rx_h = mv_h - tx_h;
rx_x = tx_x;
rx_w = tx_w;
text_panel->remove(minbox);
text_panel->remove(TransmitText);
text_panel->remove(FHdisp);
text_panel->remove(ReceiveText);
text_panel->remove(mvgroup);
mvgroup->resize(mv_x, mv_y, mv_w, mv_h);
TransmitText->resize(tx_x, tx_y, tx_w, tx_h);
ReceiveText->resize(rx_x, rx_y, rx_w, rx_h);
FHdisp->resize(rx_x, rx_y, rx_w, rx_h);
minbox->resize(
text_panel->x(),
text_panel->y() + minhtext,
text_panel->w() - 100,
text_panel->h() - 2*minhtext);
text_panel->add(mvgroup);
text_panel->add(TransmitText);
text_panel->add(ReceiveText);
text_panel->add(FHdisp);
text_panel->add(minbox);
text_panel->resizable(minbox);
progStatus.tile_y = TransmitText->h();
progStatus.tile_y_ratio = 1.0 * TransmitText->h() / text_panel->h();
}
else if (!progdefaults.rxtx_swap && ReceiveText->y() > TransmitText->y()) {
rx_y = TransmitText->y();
rx_h = first_check ? progStatus.tile_y : ReceiveText->h();
rx_x = mv_x + mv_w;
rx_w = text_panel->w() - mv_w;
tx_y = rx_y + rx_h;
tx_h = mv_h - rx_h;
tx_x = rx_x;
tx_w = rx_w;
text_panel->remove(minbox);
text_panel->remove(TransmitText);
text_panel->remove(FHdisp);
text_panel->remove(ReceiveText);
text_panel->remove(mvgroup);
mvgroup->resize(mv_x, mv_y, mv_w, mv_h);
TransmitText->resize(tx_x, tx_y, tx_w, tx_h);
ReceiveText->resize(rx_x, rx_y, rx_w, rx_h);
FHdisp->resize(rx_x, rx_y, rx_w, rx_h);
minbox->resize(
text_panel->x(),
text_panel->y() + minhtext,
text_panel->w() - 100,
text_panel->h() - 2*minhtext);
text_panel->add(mvgroup);
text_panel->add(ReceiveText);
text_panel->add(FHdisp);
text_panel->add(TransmitText);
text_panel->add(minbox);
text_panel->resizable(minbox);
progStatus.tile_y = ReceiveText->h();
progStatus.tile_y_ratio = 1.0 * ReceiveText->h() / text_panel->h();
}
// resize fsq UI
int fsq_rx_h = text_panel->h() * progStatus.fsq_ratio;
if (fsq_rx_h < minhtext) fsq_rx_h = minhtext;
int fsq_tx_h = text_panel->h() - fsq_rx_h;
if (fsq_tx_h < minhtext) {
fsq_tx_h = minhtext;
fsq_rx_h = text_panel->h() - fsq_tx_h;
}
fsq_left->remove(fsq_minbox);
fsq_left->remove(fsq_rx_text);
fsq_left->remove(fsq_tx_text);
fsq_rx_text->resize(fsq_left->x(), fsq_left->y(), fsq_left->w(), fsq_rx_h);
fsq_tx_text->resize(fsq_left->x(), fsq_left->y() + fsq_rx_text->h(), fsq_left->w(), fsq_tx_h);
fsq_minbox->resize(
text_panel->x(),
text_panel->y() + minhtext,
text_panel->w() - 100,
text_panel->h() - 2*minhtext);
fsq_left->add(fsq_rx_text);
fsq_left->add(fsq_tx_text);
fsq_left->add(fsq_minbox);
fsq_left->resizable(fsq_minbox);
// resize IFKP UI
int ifkp_rx_h = text_panel->h() * progStatus.ifkp_ratio;
if (ifkp_rx_h < minhtext) ifkp_rx_h = minhtext;
int ifkp_tx_h = text_panel->h() - ifkp_rx_h;
if (ifkp_tx_h < minhtext) {
ifkp_tx_h = minhtext;
ifkp_rx_h = text_panel->h() - ifkp_tx_h;
}
ifkp_left->remove(ifkp_minbox);
ifkp_left->remove(ifkp_rx_text);
ifkp_left->remove(ifkp_tx_text);
ifkp_rx_text->resize(
ifkp_left->x(), ifkp_left->y(),
ifkp_left->w(), ifkp_rx_h);
ifkp_tx_text->resize(
ifkp_left->x(), ifkp_left->y() + ifkp_rx_text->h(),
ifkp_left->w(), ifkp_tx_h);
ifkp_minbox->resize(
text_panel->x(),
text_panel->y() + minhtext,
text_panel->w() - 100,
text_panel->h() - 2*minhtext);
ifkp_left->add(ifkp_rx_text);
ifkp_left->add(ifkp_tx_text);
ifkp_left->add(ifkp_minbox);
ifkp_left->resizable(ifkp_minbox);
first_check = false;
}
static bool restore_minimize = false;
void UI_select_central_frame(int y, int ht)
{
text_panel->resize(0, y, fl_digi_main->w(), ht);
center_group->init_sizes();
}
void resize_macroframe_1(int x, int y, int w, int h)
{
macroFrame1->resize(x, y, w, h);
macroFrame1->init_sizes();
macroFrame1->redraw();
}
void resize_macroframe_2(int x, int y, int w, int h)
{
macroFrame2->resize(x, y, w, h);
macroFrame2->init_sizes();
macroFrame2->redraw();
}
void UI_position_macros(int x, int y1, int w, int HTh)
{
int mh = progdefaults.macro_height;
if (progdefaults.display_48macros) {
macroFrame2->hide();
macroFrame1->hide();
if (!progdefaults.four_bar_position) {
tbar->resize(x, y1, w, 4 * TB_HEIGHT);
tbar->show();
y1 += tbar->h();
HTh -= tbar->h();
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
} else {
int htbar = 4 * TB_HEIGHT;
HTh -= htbar;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
tbar->resize(x, y1, w, htbar);
tbar->show();
y1 += htbar;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
}
fl_digi_main->init_sizes();
return;
}
tbar->hide();
switch (progdefaults.mbar_scheme) { // 0, 1, 2 one bar schema
case 0:
resize_macroframe_2(x,y1,w,mh);
macroFrame2->hide();
btnAltMacros2->deactivate();
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->activate();
y1 += mh;
HTh -= mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
break;
default:
case 1:
resize_macroframe_2(x,y1,w,mh);
macroFrame2->hide();
btnAltMacros2->deactivate();
HTh -= mh;
center_group->resize(x, y1, w, HTh);
// text_panel->resize(x, y1, w, HTh);
// wefax_group->resize(x, y1, w, HTh);
// fsq_group->resize(x, y1, w, HTh);
// ifkp_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->activate();
y1 += mh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
break;
case 2:
resize_macroframe_2(x,y1,w,mh);
macroFrame2->hide();
btnAltMacros2->deactivate();
HTh -= mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
wf_group->position(x, y1);
y1 += wf_group->h();
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->activate();
y1 += mh;
status_group->position(x, y1);
break;
case 3:
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
HTh -= mh;
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
btnAltMacros2->activate();
y1 += mh;
HTh -= mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
break;
case 4:
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
btnAltMacros2->activate();
y1 += mh;
HTh -= mh;
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
HTh -= mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
break;
case 5:
HTh -= 2*mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
btnAltMacros2->activate();
y1 += mh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
break;
case 6:
HTh -= 2*mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
y1 += HTh;
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
btnAltMacros2->activate();
y1 += mh;
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
break;
case 7:
HTh -= 2*mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
wf_group->position(x, y1);
y1 += wf_group->h();
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
y1 += mh;
status_group->position(x, y1);
break;
case 8:
HTh -= 2*mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
y1 += HTh;
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
y1 += mh;
wf_group->position(x, y1);
y1 += wf_group->h();
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
status_group->position(x, y1);
break;
case 9:
HTh -= 2*mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
wf_group->position(x, y1);
y1 += wf_group->h();
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
btnAltMacros2->activate();
y1 += mh;
status_group->position(x, y1);
break;
case 10:
HTh -= 2*mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
wf_group->position(x, y1);
y1 += wf_group->h();
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
btnAltMacros2->activate();
y1 += mh;
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
status_group->position(x, y1);
break;
case 11:
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
btnAltMacros2->activate();
y1 += mh;
HTh -= 2*mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
break;
case 12:
resize_macroframe_1(x, y1, w, mh);
macroFrame1->show();
btnAltMacros1->deactivate();
y1 += mh;
HTh -= 2*mh;
center_group->resize(x, y1, w, HTh);
text_panel->resize(x, y1, w, HTh);
wefax_group->resize(x, y1, w, HTh);
fsq_group->resize(x, y1, w, HTh);
ifkp_group->resize(x, y1, w, HTh);
fmt_group->resize(x, y1, w, HTh);
UI_select_central_frame(y1, HTh);
y1 += HTh;
resize_macroframe_2(x, y1, w, mh);
macroFrame2->show();
btnAltMacros2->activate();
y1 += mh;
wf_group->position(x, y1);
y1 += wf_group->h();
status_group->position(x, y1);
break;
}
fl_digi_main->init_sizes();
return;
}
bool UI_first = true;
void UI_select()
{
if (bWF_only) {
int Y = cntTxLevel->y();
int psm_width = progdefaults.show_psm_btn ? bwSqlOnOff : 0;
int X = rightof(Status2);
int W = fl_digi_main->w() - X - bwTxLevel - Wwarn - bwAfcOnOff -
bwSqlOnOff - psm_width;
StatusBar->resize( X, Y, W, StatusBar->h());
VuMeter->resize( X, Y, W, VuMeter->h());
cntTxLevel->position(rightof(VuMeter), Y);
WARNstatus->position(rightof(cntTxLevel), Y);
btnAFC->position(rightof(WARNstatus), Y);
btnSQL->position(rightof(btnAFC), Y);
btnPSQL->resize(rightof(btnSQL), Y, psm_width, btnPSQL->h());
if (progdefaults.show_psm_btn)
btnPSQL->show();
else
btnPSQL->hide();
cntTxLevel->redraw();
WARNstatus->redraw();
btnAFC->redraw();
btnSQL->redraw();
btnPSQL->redraw();
StatusBar->redraw();
status_group->init_sizes();
status_group->redraw();
fl_digi_main->init_sizes();
fl_digi_main->redraw();
return;
}
int x = 0;
int y1 = Hmenu;
int w = fl_digi_main->w();
int HTh = fl_digi_main->h() - y1;
if (cnt_macro_height) {
cnt_macro_height->minimum(MACROBAR_MIN);
cnt_macro_height->maximum(MACROBAR_MAX);
cnt_macro_height->step(1);
if (progdefaults.macro_height < MACROBAR_MIN) progdefaults.macro_height = MACROBAR_MIN;
if (progdefaults.macro_height > MACROBAR_MAX) progdefaults.macro_height = MACROBAR_MAX;
cnt_macro_height->value(progdefaults.macro_height);
}
HTh -= wf_group->h();
HTh -= status_group->h();
if (progStatus.NO_RIGLOG && !restore_minimize) {
TopFrame1->hide();
TopFrame2->hide();
TopFrame3->hide();
Status2->hide();
inpCall4->show();
inpCall = inpCall4;
UI_position_macros(x, y1, w, HTh);
goto UI_return;
}
if (!progStatus.Rig_Log_UI || restore_minimize) {
TopFrame1->resize( x, y1, w, Hqsoframe );
y1 += (TopFrame1->h());
HTh -= (TopFrame1->h());
UI_position_macros(x, y1, w, HTh);
TopFrame2->hide();
TopFrame3->hide();
TopFrame1->show();
inpFreq = inpFreq1;
inpCall = inpCall1;
inpTimeOn = inpTimeOn1;
inpTimeOff = inpTimeOff1;
inpName = inpName1;
inpRstIn = inpRstIn1;
inpRstOut = inpRstOut1;
inpSerNo = inpSerNo1;
outSerNo = outSerNo1;
inpXchgIn = inpXchgIn1;
inpState = inpState1;
inpLoc = inpLoc1;
inpQTH = inpQth;
inp_JOTA_scout = inp_JOTA_scout1;
inp_JOTA_troop = inp_JOTA_troop1;
cboCountry = cboCountryQSO;
gGEN_QSO_1->hide();
gGEN_CONTEST->hide();
gCQWW_RTTY->hide();
gCQWW_DX->hide();
gFD->hide();
gCWSS->hide();
gKD_1->hide();
gARR->hide();
g1010->hide();
gVHF->hide();
gASCR->hide();
gNAQP->hide();
gARRL_RTTY->hide();
gIARI->hide();
gNAS->hide();
gAIDX->hide();
gJOTA->hide();
gAICW->hide();
gSQSO->hide();
gCQWPX->hide();
gWAE->hide();
switch (progdefaults.logging) {
case LOG_FD:
inpClass = inp_FD_class1;
inpSection = inp_FD_section1;
gFD->show();
break;
case LOG_WFD:
inpClass = inp_FD_class1;
inpSection = inp_FD_section1;
gFD->show();
break;
case LOG_KD:
inp_KD_age = inp_KD_age1;
inpState = inp_KD_state1;
inpVEprov = inp_KD_VEprov1;
inpXchgIn = inp_KD_XchgIn1;
gKD_1->show();
break;
case LOG_ARR:
inpCall = inpCall1;
inpName = inpName;
inp_ARR_check = inp_ARR_check1;
inpXchgIn = inp_ARR_XchgIn1;
gARR->show();
break;
case LOG_1010:
inp_1010_nr = inp_1010_nr1;
inpXchgIn = inp_1010_XchgIn1;
g1010->show();
break;
case LOG_VHF:
inpRstIn = inp_vhf_RSTin1;
inpRstOut = inp_vhf_RSTout1;
inpLoc = inp_vhf_Loc1;
inp_vhf_Loc1->show();
inp_vhf_RSTin1->show();
inp_vhf_RSTout1->show();
gVHF->show();
break;
case LOG_CQ_WPX:
inpSerNo = inpSerNo_WPX1;
outSerNo = outSerNo_WPX1;
inpSerNo_WPX1->show();
outSerNo_WPX1->show();
gCQWPX->show();
break;
case LOG_CQWW_DX:
cboCountry = cboCountryQSO;
inp_CQzone = inp_CQDXzone1;
inp_CQDXzone1->show();
gCQWW_DX->show();
break;
case LOG_CQWW_RTTY:
inpState = inp_CQstate = inp_CQstate1;
cboCountry = cboCountryQSO;
inp_CQzone = inp_CQzone1;
gCQWW_RTTY->show();
break;
case LOG_CWSS:
outSerNo = outSerNo3;
inpSerNo = inp_SS_SerialNoR1;
inp_SS_SerialNoR = inp_SS_SerialNoR1;
inp_SS_Check = inp_SS_Check1;
inp_SS_Precedence = inp_SS_Precedence1;
inp_SS_Section = inp_SS_Section1;
gCWSS->show();
break;
case LOG_ASCR:
inpClass = inp_ASCR_class1;
inpXchgIn = inp_ASCR_XchgIn1;
inp_ASCR_class1->show();
inp_ASCR_XchgIn1->show();
gASCR->show();
break;
case LOG_IARI:
inpXchgIn = inp_IARI_PR1;
cboCountry = cboCountryQSO;
inp_IARI_PR1->show();
gIARI->show();
break;
case LOG_NAQP:
inpSPCnum = inpSPCnum_NAQP1;
inpSPCnum_NAQP1->show();
gNAQP->show();
break;
case LOG_RTTY:
inpState = inpRTU_stpr1;
inpSerNo = inpRTU_serno1;
cboCountry = cboCountryQSO;
gARRL_RTTY->show();
break;
case LOG_NAS:
inpSerNo = inp_ser_NAS1;
inpXchgIn = inpSPCnum_NAS1;
outSerNo5->show();
inp_ser_NAS1->show();
inpSPCnum_NAS1->show();
gNAS->show();
break;
case LOG_AIDX:
outSerNo = outSerNo7;
inpSerNo = inpSerNo3;
cboCountry = cboCountryAIDX = cboCountryQSO;
outSerNo7->show();
inpSerNo3->show();
gAIDX->show();
break;
case LOG_JOTA:
inp_JOTA_scout = inp_JOTA_scout1;
inp_JOTA_troop = inp_JOTA_troop1;
inpXchgIn = inp_JOTA_spc1;
inp_JOTA_scout1->show();
inp_JOTA_spc1->show();
inp_JOTA_troop1->show();
gJOTA->show();
break;
case LOG_AICW:
inpSPCnum = inpSPCnum_AICW1;
cboCountry = cboCountryQSO;//cboCountryAICW1;
inpSPCnum_AICW1->show();
gAICW->show();
break;
case LOG_SQSO:
inpRstIn = inpRstIn1;
inpRstOut = inpRstOut1;
inpCounty = inpSQSO_county1;
inpSQSO_county1->show();
outSerNo = outSQSO_serno1;
outSQSO_serno1->show();
inpSerNo = inpSQSO_serno1;
inpSQSO_serno1->show();
inpState = inpSQSO_state1;
inpSQSO_state1->show();
if (progdefaults.SQSOlogcat) {
inpSQSO_category1->show();
inpSQSO_category = inpSQSO_category1;
} else {
inpSQSO_category1->hide();
}
gSQSO->show();
break;
// case LOG_WAE:
// inpSerNo = inpSerNo_WAE1;
// inpSerNo_WAE1->show();
// outSerNo = outSerNo_WAE1;
// outSerNo_WAE1->show();
// cboCountry = cboCountryWAE1;
// cboCountryWAE1->show();
// gWAE->show();
// break;
case LOG_BART:
case LOG_GENERIC:
gGEN_CONTEST->show();
break;
default: // no contest
gGEN_QSO_1->show();
}
gGEN_QSO_1->redraw();
gGEN_CONTEST->redraw();
gCQWW_RTTY->redraw();
gCQWW_DX->redraw();
gFD->redraw();
gCWSS->redraw();
gKD_1->redraw();
gARR->redraw();
g1010->redraw();
gVHF->redraw();
gIARI->redraw();
gAICW->redraw();
gSQSO->redraw();
gCQWPX->redraw();
gWAE->redraw();
qsoFreqDisp = qsoFreqDisp1;
TopFrame1->init_sizes();
goto UI_return;
}
else {
if (progdefaults.logging == LOG_QSO) { // no contest
TopFrame2->resize( x, y1, w, Hentry + 2 * pad);
y1 += TopFrame2->h();
HTh -= TopFrame2->h();
UI_position_macros(x, y1, w, HTh);
TopFrame1->hide();
TopFrame3->hide();
TopFrame2->show();
inpCall = inpCall2;
inpTimeOn = inpTimeOn2;
inpTimeOff = inpTimeOff2;
inpName = inpName2;
inpSerNo = inpSerNo1;
outSerNo = outSerNo1;
inpRstIn = inpRstIn2;
inpRstOut = inpRstOut2;
inpState = inpState1;
inpLoc = inpLoc1;
inpQTH = inpQth;
qsoFreqDisp = qsoFreqDisp2;
inpCall4->hide();
Status2->show();
goto UI_return;
}
TopFrame3->resize( x, y1, w, Hentry + 2 * pad);
y1 += TopFrame3->h();
HTh -= TopFrame3->h();
UI_position_macros(x, y1, w, HTh);
TopFrame1->hide();
TopFrame2->hide();
TopFrame3->show();
inpCall = inpCall3;
inpTimeOn = inpTimeOn3;
inpTimeOff = inpTimeOff3;
inpSerNo = inpSerNo2;
outSerNo = outSerNo2;
inpXchgIn = inpXchgIn2;
// inpSQSO_category2->hide();
log_generic_frame->hide();
log_fd_frame->hide();
log_kd_frame->hide();
log_1010_frame->hide();
log_arr_frame->hide();
log_vhf_frame->hide();
log_cqww_frame->hide();
log_cqww_rtty_frame->hide();
log_cqss_frame->hide();
log_cqwpx_frame->hide();
log_ascr_frame->hide();
log_naqp_frame->hide();
log_rtty_frame->hide();
log_iari_frame->hide();
log_nas_frame->hide();
log_aidx_frame->hide();
log_jota_frame->hide();
log_aicw_frame->hide();
log_sqso_frame->hide();
log_wae_frame->hide();
switch (progdefaults.logging) {
case LOG_QSO:
log_generic_frame->show();
break;
case LOG_FD:
log_fd_frame->show();
inpClass = inp_FD_class2;
inpSection = inp_FD_section2;
break;
case LOG_WFD:
log_fd_frame->show();
inpClass = inp_FD_class2;
inpSection = inp_FD_section2;
break;
case LOG_KD:
log_kd_frame->show();
inpName = inp_KD_name2;
inp_KD_age = inp_KD_age2;
inpState = inp_KD_state2;
inpVEprov = inp_KD_VEprov2;
inpXchgIn = inp_KD_XchgIn2;
break;
case LOG_ARR:
log_arr_frame->show();
inpCall = inpCall3;
inpName = inp_ARR_Name2;
inp_ARR_check = inp_ARR_check2;
inpXchgIn = inp_ARR_XchgIn2;
break;
case LOG_1010:
log_1010_frame->show();
inpName = inp_1010_name2;
inp_1010_nr = inp_1010_nr1;
inpXchgIn = inp_1010_XchgIn2;
break;
case LOG_VHF:
log_vhf_frame->show();
inpRstIn = inp_vhf_RSTin2;
inpRstOut = inp_vhf_RSTout2;
inpLoc = inp_vhf_Loc2;
break;
case LOG_CQWW_DX:
log_cqww_frame->show();
inpRstIn = inp_CQDX_RSTin2;
inpRstOut = inp_CQDX_RSTout2;
inp_CQzone = inp_CQDXzone2;
cboCountry = cboCountryCQDX2;
break;
case LOG_CQWW_RTTY:
log_cqww_rtty_frame->show();
inpRstIn = inp_CQ_RSTin2;
inpRstOut = inp_CQ_RSTout2;
inpState = inp_CQstate = inp_CQstate2;
inp_CQzone = inp_CQzone2;
cboCountry = cboCountryCQ2;
break;
case LOG_CWSS:
log_cqss_frame->show();
outSerNo = outSerNo4;
inpSerNo = inp_SS_SerialNoR2;
inpTimeOff = inpTimeOff3;
inpTimeOn = inpTimeOn3;
inp_SS_Check = inp_SS_Check2;
inp_SS_Precedence = inp_SS_Precedence2;
inp_SS_Section = inp_SS_Section2;
inp_SS_SerialNoR = inp_SS_SerialNoR2;
break;
case LOG_ASCR:
log_ascr_frame->show();
inpName = inp_ASCR_name2;
inpRstIn = inp_ASCR_RSTin2;
inpRstOut = inp_ASCR_RSTout2;
inpClass = inp_ASCR_class2;
inpXchgIn = inp_ASCR_XchgIn2;
break;
case LOG_IARI:
log_iari_frame->show();
inpRstIn = inp_IARI_RSTin2;
inpRstOut = inp_IARI_RSTout2;
inpSerNo = inp_IARI_SerNo2;
outSerNo = out_IARI_SerNo2;
inpXchgIn = inp_IARI_PR2;
cboCountry = cboCountryIARI2;
break;
case LOG_NAQP:
log_naqp_frame->show();
inpName = inpNAQPname2;
inpSPCnum = inpSPCnum_NAQP2;
break;
case LOG_RTTY:
log_rtty_frame->show();
inpState = inpRTU_stpr2;
inpRstIn = inpRTU_RSTin2;
inpRstOut = inpRTU_RSTout2;
inpSerNo = inpRTU_serno2;
cboCountry = cboCountryRTU2;
break;
case LOG_AIDX:
log_aidx_frame->show();
inpRstIn = inpRstIn3;
inpRstOut = inpRstOut3;
outSerNo = outSerNo8;
inpSerNo = inpSerNo4;
cboCountry = cboCountryAIDX = cboCountryAIDX2;
break;
case LOG_JOTA:
log_jota_frame->show();
inpRstIn = inpRstIn4;
inpRstOut = inpRstOut4;
inp_JOTA_scout = inp_JOTA_scout2;
inp_JOTA_troop = inp_JOTA_troop2;
inpXchgIn = inp_JOTA_spc2;
break;
case LOG_AICW:
log_aicw_frame->show();
inpRstIn = inpRstIn_AICW2;
inpRstOut = inpRstOut_AICW2;
cboCountry = cboCountryAICW2;
inpSPCnum = inpSPCnum_AICW2;
break;
case LOG_SQSO:
inpSQSO_category2->hide();
inpSQSO_name2->hide();
inpSQSO_serno2->hide();
inpRstOut_SQSO2->hide();
inpRstIn_SQSO2->hide();
inpState = inpSQSO_state2;
inpSQSO_state2->show();
inpCounty = inpSQSO_county2;
inpSQSO_county2->show();
if (progdefaults.SQSOlogcat) {
inpSQSO_category2->show();
inpSQSO_category2->redraw();
inpSQSO_category = inpSQSO_category2;
}
if (progdefaults.SQSOlogrst) {
inpRstIn = inpRstIn_SQSO2;
inpRstIn_SQSO2->show();
inpRstOut = inpRstOut_SQSO2;
inpRstOut_SQSO2->show();
}
if (progdefaults.SQSOlogserno) {
inpSerNo = inpSQSO_serno2;
inpSQSO_serno2->show();
outSerNo = outSQSO_serno2;
outSQSO_serno2->show();
}
if (progdefaults.SQSOlogname) {
inpName = inpSQSO_name2;
inpSQSO_name2->show();
}
inpSQSO_category2->redraw();
inpSQSO_name2->redraw();
inpSQSO_serno2->redraw();
inpRstOut_SQSO2->redraw();
inpRstIn_SQSO2->redraw();
inpSQSO_state2->redraw();
inpSQSO_county2->redraw();
log_sqso_frame->show();
break;
case LOG_NAS:
inpSerNo = inp_ser_NAS2;
inpXchgIn = inpSPCnum_NAS2;
inpName = inp_name_NAS2;
log_nas_frame->show();
break;
case LOG_CQ_WPX:
log_cqwpx_frame->show();
inpSerNo = inpSerNo_WPX2;
outSerNo = outSerNo_WPX2;
inpRstIn = inpRstIn_WPX2;
inpRstOut = inpRstOut_WPX2;
break;
// case LOG_WAE:
// log_wae_frame->show();
// inpSerNo = inpSerNo_WAE2;
// outSerNo = outSerNo_WAE2;
// inpRstIn = inpRstIn_WAE2;
// inpRstOut = inpRstOut_WAE2;
// cboCountry = cboCountryWAE2;
// break;
case LOG_BART:
case LOG_GENERIC:
default:
log_generic_frame->show();
inpTimeOn = inpTimeOn3;
inpTimeOff = inpTimeOff3;
inpSerNo = inpSerNo2;
inpXchgIn = inpXchgIn2;
break;
}
qsoFreqDisp = qsoFreqDisp3;
TopFrame3->redraw();
inpCall4->hide();
Status2->show();
goto UI_return;
}
UI_return:
UI_check_swap();
if (UI_first) {
UI_first = false;
}
else {
int orgx = text_panel->orgx();
int orgy = text_panel->orgy();
int nux = text_panel->x() + progStatus.tile_x;
int nuy = text_panel->y() + progStatus.tile_y_ratio * text_panel->h();
text_panel->position(orgx, orgy, nux, nuy);
}
{
int Y = status_group->y();
int psm_width = progdefaults.show_psm_btn ? bwSqlOnOff : 0;
int vuw =
fl_digi_main->w() - Status2->x() - Status2->w() - 2 -
bwTxLevel - // tx level control
Wwarn - // Warn indicator
bwAfcOnOff - // afc button
bwSqlOnOff - // sql button
psm_width - // psm button, bwSqlOnOff / 0
corner_box->w();
StatusBar->resize(
Status2->x() + Status2->w() + 2, Y, vuw, StatusBar->h());
VuMeter->resize(
Status2->x() + Status2->w() + 2, Y, vuw, VuMeter->h());
cntTxLevel->position(rightof(VuMeter), Y);
WARNstatus->position(rightof(cntTxLevel), Y);
btnAFC->position(rightof(WARNstatus), Y);
btnSQL->position(rightof(btnAFC), Y);
btnPSQL->resize(rightof(btnSQL), Y, psm_width, btnPSQL->h());
if (progdefaults.show_psm_btn)
btnPSQL->show();
else
btnPSQL->hide();
status_group->init_sizes();
status_group->redraw();
}
RigControlFrame->init_sizes();
RigControlFrame->redraw();
smeter->redraw();
pwrmeter->redraw();
center_group->redraw();
text_panel->redraw();
wefax_group->redraw();
fsq_group->redraw();
ifkp_group->redraw();
fmt_group->redraw();
macroFrame1->redraw();
macroFrame2->redraw();
viewer_redraw();
fl_digi_main->init_sizes();
update_main_title();
LOGBOOK_colors_font();
fl_digi_main->redraw();
Fl::flush();
}
void cb_mnu_wf_all(Fl_Menu_* w, void *d)
{
wf->UI_select(progStatus.WF_UI = w->mvalue()->value());
}
void cb_mnu_riglog_all(Fl_Menu_* w, void *d)
{
getMenuItem(w->mvalue()->label())->setonly();
progStatus.Rig_Log_UI = false;
progStatus.NO_RIGLOG = false;
UI_select();
}
void cb_mnu_riglog_partial(Fl_Menu_* w, void *d)
{
getMenuItem(w->mvalue()->label())->setonly();
progStatus.Rig_Log_UI = true;
progStatus.NO_RIGLOG = false;
UI_select();
}
void cb_mnu_riglog_none(Fl_Menu_* w, void *d)
{
getMenuItem(w->mvalue()->label())->setonly();
progStatus.NO_RIGLOG = true;
progStatus.Rig_Log_UI = false;
UI_select();
}
void cb_mnuDockedscope(Fl_Menu_ *w, void *d)
{
wf->show_scope(progStatus.DOCKEDSCOPE = w->mvalue()->value());
}
void WF_UI()
{
wf->UI_select(progStatus.WF_UI);
}
void toggle_smeter()
{
if (progStatus.meters && !smeter->visible()) {
pwrmeter->hide();
smeter->show();
qso_combos->hide();
} else if (!progStatus.meters && smeter->visible()) {
pwrmeter->hide();
smeter->hide();
qso_combos->show();
}
RigControlFrame->redraw();
}
void cb_toggle_smeter(Fl_Widget *w, void *v)
{
progStatus.meters = !progStatus.meters;
toggle_smeter();
}
extern void cb_scripts(bool);
void cb_menu_scripts(Fl_Widget*, void*)
{
cb_scripts(false);
}
extern void cb_create_default_script(void);
void cb_menu_make_default_scripts(Fl_Widget*, void*)
{
cb_create_default_script();
}
void cb_48macros(Fl_Widget*, void*)
{
progdefaults.display_48macros = !progdefaults.display_48macros;
UI_select();
}
static void cb_opmode_show(Fl_Widget* w, void*);
static Fl_Menu_Item menu_[] = {
{_("&File"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Folders")), 0, 0, 0, FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Fldigi config..."), folder_open_icon), 0, cb_ShowConfig, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("FLMSG files..."), folder_open_icon), 0, cb_ShowFLMSG, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("NBEMS files..."), folder_open_icon), 0, cb_ShowNBEMS, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("WEFAX images..."), folder_open_icon), 0, cb_ShowWEFAX_images, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Data files..."), folder_open_icon), 0, cb_ShowDATA, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ icons::make_icon_label(_("Macros")), 0, 0, 0, FL_MENU_DIVIDER | FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Open ..."), file_open_icon), 0, (Fl_Callback*)cb_mnuOpenMacro, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Save ..."), save_as_icon), 0, (Fl_Callback*)cb_mnuSaveMacro, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ icons::make_icon_label(_("Config Scripts")), 0, 0, 0, FL_MENU_DIVIDER | FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
{ _("Execute"), 0, (Fl_Callback*)cb_menu_scripts, 0, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ _("Generate"), 0, (Fl_Callback*)cb_menu_make_default_scripts, 0, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ 0,0,0,0,0,0,0,0,0},
{ icons::make_icon_label(_("Text Capture")), 0, 0, 0, FL_MENU_DIVIDER | FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
{ LOG_TO_FILE_MLABEL, 0, cb_logfile, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ icons::make_icon_label(_("Audio")), 0, 0, 0, FL_MENU_DIVIDER | FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
{_("RX capture"), 0, (Fl_Callback*)cb_mnuCapture, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
{_("TX generate"), 0, (Fl_Callback*)cb_mnuGenerate, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
{_("Playback"), 0, (Fl_Callback*)cb_mnuPlayback, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ icons::make_icon_label(_("Exit"), log_out_icon), 'x', (Fl_Callback*)cb_E, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ OPMODES_MLABEL, 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CW].name, 0, cb_init_mode, (void *)MODE_CW, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"Contestia", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_125].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_125].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_16_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_16_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_16_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_16_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_32_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_32_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_32_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_32_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_64_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_64_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_64_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ _("Custom..."), 0, cb_contestiaCustom, (void *)MODE_CONTESTIA, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"DominoEX", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEXMICRO].name, 0, cb_init_mode, (void *)MODE_DOMINOEXMICRO, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX4].name, 0, cb_init_mode, (void *)MODE_DOMINOEX4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX5].name, 0, cb_init_mode, (void *)MODE_DOMINOEX5, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX8].name, 0, cb_init_mode, (void *)MODE_DOMINOEX8, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX11].name, 0, cb_init_mode, (void *)MODE_DOMINOEX11, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX16].name, 0, cb_init_mode, (void *)MODE_DOMINOEX16, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX22].name, 0, cb_init_mode, (void *)MODE_DOMINOEX22, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX44].name, 0, cb_init_mode, (void *)MODE_DOMINOEX44, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX88].name, 0, cb_init_mode, (void *)MODE_DOMINOEX88, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ "FSQ", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ "FSQ-6", 0, cb_fsq6, (void *)MODE_FSQ, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "FSQ-4.5", 0, cb_fsq4p5, (void *)MODE_FSQ, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "FSQ-3", 0, cb_fsq3, (void *)MODE_FSQ, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "FSQ-2", 0, cb_fsq2, (void *)MODE_FSQ, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "FSQ-1.5", 0, cb_fsq1p5, (void *)MODE_FSQ, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"Hell", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_FELDHELL].name, 0, cb_init_mode, (void *)MODE_FELDHELL, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_SLOWHELL].name, 0, cb_init_mode, (void *)MODE_SLOWHELL, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_HELLX5].name, 0, cb_init_mode, (void *)MODE_HELLX5, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_HELLX9].name, 0, cb_init_mode, (void *)MODE_HELLX9, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_FSKH245].name, 0, cb_init_mode, (void *)MODE_FSKH245, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_FSKH105].name, 0, cb_init_mode, (void *)MODE_FSKH105, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_HELL80].name, 0, cb_init_mode, (void *)MODE_HELL80, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ "IFKP", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ "IFKP 0.5", 0, cb_ifkp0p5, (void *)MODE_IFKP, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "IFKP 1.0", 0, cb_ifkp1p0, (void *)MODE_IFKP, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "IFKP 2.0", 0, cb_ifkp2p0, (void *)MODE_IFKP, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"MFSK", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK4].name, 0, cb_init_mode, (void *)MODE_MFSK4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK8].name, 0, cb_init_mode, (void *)MODE_MFSK8, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK11].name, 0, cb_init_mode, (void *)MODE_MFSK11, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK16].name, 0, cb_init_mode, (void *)MODE_MFSK16, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK22].name, 0, cb_init_mode, (void *)MODE_MFSK22, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK31].name, 0, cb_init_mode, (void *)MODE_MFSK31, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK32].name, 0, cb_init_mode, (void *)MODE_MFSK32, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK64].name, 0, cb_init_mode, (void *)MODE_MFSK64, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK128].name, 0, cb_init_mode, (void *)MODE_MFSK128, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK64L].name, 0, cb_init_mode, (void *)MODE_MFSK64L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK128L].name, 0, cb_init_mode, (void *)MODE_MFSK128L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"MT63", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_500S].name, 0, cb_init_mode, (void *)MODE_MT63_500S, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_500L].name, 0, cb_init_mode, (void *)MODE_MT63_500L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_1000S].name, 0, cb_init_mode, (void *)MODE_MT63_1000S, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_1000L].name, 0, cb_init_mode, (void *)MODE_MT63_1000L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_2000S].name, 0, cb_init_mode, (void *)MODE_MT63_2000S, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_2000L].name, 0, cb_init_mode, (void *)MODE_MT63_2000L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"OFDM", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OFDM_500F].name, 0, cb_init_mode, (void *)MODE_OFDM_500F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OFDM_750F].name, 0, cb_init_mode, (void *)MODE_OFDM_750F, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
//{ mode_info[MODE_OFDM_2000F].name, 0, cb_init_mode, (void *)MODE_OFDM_2000F, 0, FL_NORMAL_LABEL, 0, 14, 0},
//{ mode_info[MODE_OFDM_2000].name, 0, cb_init_mode, (void *)MODE_OFDM_2000, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OFDM_3500].name, 0, cb_init_mode, (void *)MODE_OFDM_3500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ OLIVIA_MLABEL, 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_125].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_250].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_125].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_250].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_16_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_16_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_16_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_32_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_32_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_32_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_32_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_64_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_64_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_64_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ _("Custom..."), 0, cb_oliviaCustom, (void *)MODE_OLIVIA, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"PSK", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK31].name, 0, cb_init_mode, (void *)MODE_PSK31, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK63].name, 0, cb_init_mode, (void *)MODE_PSK63, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK63F].name, 0, cb_init_mode, (void *)MODE_PSK63F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK125].name, 0, cb_init_mode, (void *)MODE_PSK125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK250].name, 0, cb_init_mode, (void *)MODE_PSK250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK500].name, 0, cb_init_mode, (void *)MODE_PSK500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK1000].name, 0, cb_init_mode, (void *)MODE_PSK1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"MultiCarrier", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_12X_PSK125].name, 0, cb_init_mode, (void *)MODE_12X_PSK125, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_6X_PSK250].name, 0, cb_init_mode, (void *)MODE_6X_PSK250, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK500].name, 0, cb_init_mode, (void *)MODE_2X_PSK500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_4X_PSK500].name, 0, cb_init_mode, (void *)MODE_4X_PSK500, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK800].name, 0, cb_init_mode, (void *)MODE_2X_PSK800, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK1000].name, 0, cb_init_mode, (void *)MODE_2X_PSK1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{"QPSK", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK31].name, 0, cb_init_mode, (void *)MODE_QPSK31, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK63].name, 0, cb_init_mode, (void *)MODE_QPSK63, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK125].name, 0, cb_init_mode, (void *)MODE_QPSK125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK250].name, 0, cb_init_mode, (void *)MODE_QPSK250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK500].name, 0, cb_init_mode, (void *)MODE_QPSK500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"8PSK", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK125].name, 0, cb_init_mode, (void *)MODE_8PSK125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK250].name, 0, cb_init_mode, (void *)MODE_8PSK250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK500].name, 0, cb_init_mode, (void *)MODE_8PSK500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK1000].name, 0, cb_init_mode, (void *)MODE_8PSK1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK125FL].name, 0, cb_init_mode, (void *)MODE_8PSK125FL, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK125F].name, 0, cb_init_mode, (void *)MODE_8PSK125F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK250FL].name, 0, cb_init_mode, (void *)MODE_8PSK250FL, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK250F].name, 0, cb_init_mode, (void *)MODE_8PSK250F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK500F].name, 0, cb_init_mode, (void *)MODE_8PSK500F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK1000F].name, 0, cb_init_mode, (void *)MODE_8PSK1000F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK1200F].name, 0, cb_init_mode, (void *)MODE_8PSK1200F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"PSKR", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK125R].name, 0, cb_init_mode, (void *)MODE_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK250R].name, 0, cb_init_mode, (void *)MODE_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK500R].name, 0, cb_init_mode, (void *)MODE_PSK500R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK1000R].name, 0, cb_init_mode, (void *)MODE_PSK1000R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"MultiCarrier", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_4X_PSK63R].name, 0, cb_init_mode, (void *)MODE_4X_PSK63R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_5X_PSK63R].name, 0, cb_init_mode, (void *)MODE_5X_PSK63R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_10X_PSK63R].name, 0, cb_init_mode, (void *)MODE_10X_PSK63R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_20X_PSK63R].name, 0, cb_init_mode, (void *)MODE_20X_PSK63R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_32X_PSK63R].name, 0, cb_init_mode, (void *)MODE_32X_PSK63R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_4X_PSK125R].name, 0, cb_init_mode, (void *)MODE_4X_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_5X_PSK125R].name, 0, cb_init_mode, (void *)MODE_5X_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_10X_PSK125R].name, 0, cb_init_mode, (void *)MODE_10X_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_12X_PSK125R].name, 0, cb_init_mode, (void *)MODE_12X_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_16X_PSK125R].name, 0, cb_init_mode, (void *)MODE_16X_PSK125R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK250R].name, 0, cb_init_mode, (void *)MODE_2X_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_3X_PSK250R].name, 0, cb_init_mode, (void *)MODE_3X_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_5X_PSK250R].name, 0, cb_init_mode, (void *)MODE_5X_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_6X_PSK250R].name, 0, cb_init_mode, (void *)MODE_6X_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_7X_PSK250R].name, 0, cb_init_mode, (void *)MODE_7X_PSK250R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK500R].name, 0, cb_init_mode, (void *)MODE_2X_PSK500R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_3X_PSK500R].name, 0, cb_init_mode, (void *)MODE_3X_PSK500R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_4X_PSK500R].name, 0, cb_init_mode, (void *)MODE_4X_PSK500R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK800R].name, 0, cb_init_mode, (void *)MODE_2X_PSK800R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK1000R].name, 0, cb_init_mode, (void *)MODE_2X_PSK1000R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{ RTTY_MLABEL, 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ "RTTY-45", 0, cb_rtty45, (void *)MODE_RTTY, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "RTTY-50", 0, cb_rtty50, (void *)MODE_RTTY, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "RTTY-75N", 0, cb_rtty75N, (void *)MODE_RTTY, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "RTTY-75W", 0, cb_rtty75W, (void *)MODE_RTTY, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ _("Custom..."), 0, cb_rttyCustom, (void *)MODE_RTTY, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"THOR", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THORMICRO].name, 0, cb_init_mode, (void *)MODE_THORMICRO, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR4].name, 0, cb_init_mode, (void *)MODE_THOR4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR5].name, 0, cb_init_mode, (void *)MODE_THOR5, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR8].name, 0, cb_init_mode, (void *)MODE_THOR8, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR11].name, 0, cb_init_mode, (void *)MODE_THOR11, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR16].name, 0, cb_init_mode, (void *)MODE_THOR16, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR22].name, 0, cb_init_mode, (void *)MODE_THOR22, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR25x4].name, 0, cb_init_mode, (void *)MODE_THOR25x4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR50x1].name, 0, cb_init_mode, (void *)MODE_THOR50x1, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR50x2].name, 0, cb_init_mode, (void *)MODE_THOR50x2, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR100].name, 0, cb_init_mode, (void *)MODE_THOR100, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"Throb", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROB1].name, 0, cb_init_mode, (void *)MODE_THROB1, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROB2].name, 0, cb_init_mode, (void *)MODE_THROB2, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROB4].name, 0, cb_init_mode, (void *)MODE_THROB4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROBX1].name, 0, cb_init_mode, (void *)MODE_THROBX1, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROBX2].name, 0, cb_init_mode, (void *)MODE_THROBX2, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROBX4].name, 0, cb_init_mode, (void *)MODE_THROBX4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
//{ "Packet", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
//{ " 300 baud", 0, cb_pkt300, (void *)MODE_PACKET, 0, FL_NORMAL_LABEL, 0, 14, 0},
//{ "1200 baud", 0, cb_pkt1200, (void *)MODE_PACKET, 0, FL_NORMAL_LABEL, 0, 14, 0},
//{ "2400 baud", 0, cb_pkt2400, (void *)MODE_PACKET, 0, FL_NORMAL_LABEL, 0, 14, 0},
//{0,0,0,0,0,0,0,0,0},
{"WEFAX", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_WEFAX_576].name, 0, cb_init_mode, (void *)MODE_WEFAX_576, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_WEFAX_288].name, 0, cb_init_mode, (void *)MODE_WEFAX_288, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"Navtex/SitorB", 0, 0, 0, FL_SUBMENU | FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_NAVTEX].name, 0, cb_init_mode, (void *)MODE_NAVTEX, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_SITORB].name, 0, cb_init_mode, (void *)MODE_SITORB, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ mode_info[MODE_WWV].name, 0, cb_init_mode, (void *)MODE_WWV, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_ANALYSIS].name, 0, cb_init_mode, (void *)MODE_ANALYSIS, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_FMT].name, 0, cb_init_mode, (void *)MODE_FMT, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_NULL].name, 0, cb_init_mode, (void *)MODE_NULL, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_SSB].name, 0, cb_init_mode, (void *)MODE_SSB, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ OPMODES_FEWER, 0, cb_opmode_show, 0, FL_MENU_INVISIBLE, FL_NORMAL_LABEL, FL_HELVETICA_ITALIC, 14, 0 },
{0,0,0,0,0,0,0,0,0},
{_("&Configure"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Config Dialog")), 0, (Fl_Callback*)cb_mnu_config_dialog, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Save Config"), save_icon), 0, (Fl_Callback*)cb_mnuSaveConfig, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Notifications")), 0, (Fl_Callback*)cb_mnuConfigNotify, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Test Signals")), 0, (Fl_Callback*)cb_mnuTestSignals, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ VIEW_MLABEL, 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Rx Audio Dialog")), 'a', (Fl_Callback*)cb_mnuRxAudioDialog, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("View/Hide Channels")), 'c', (Fl_Callback*)cb_view_hide_channels, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Signal browser")), 'b', (Fl_Callback*)cb_mnuViewer, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("View/Hide 48 macros")), 'm', (Fl_Callback*)cb_48macros, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("DX Cluster")), 'd', (Fl_Callback*)cb_dxc_viewer, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Floating scope"), utilities_system_monitor_icon), 'f', (Fl_Callback*)cb_mnuDigiscope, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Spectrum scope"), utilities_system_monitor_icon), 's', (Fl_Callback*)cb_mnuSpectrum, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(MFSK_IMAGE_MLABEL, image_icon), 0, (Fl_Callback*)cb_mnuPicViewer, 0, FL_MENU_INACTIVE, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(THOR_IMAGE_MLABEL, image_icon), 0, (Fl_Callback*)cb_mnuThorViewRaw,0, FL_MENU_INACTIVE, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(IFKP_IMAGE_MLABEL, image_icon), 0, (Fl_Callback*)cb_mnuIfkpViewRaw,0, FL_MENU_INACTIVE | FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(WEFAX_TX_IMAGE_MLABEL, image_icon), 0, (Fl_Callback*)wefax_pic::cb_mnu_pic_viewer_tx,0, FL_MENU_INACTIVE | FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(COUNTRIES_MLABEL), 0, (Fl_Callback*)cb_mnuShowCountries, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Rig/Log Controls")), 0, 0, 0, FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
{ RIGLOG_FULL_MLABEL, 0, (Fl_Callback*)cb_mnu_riglog_all, 0, FL_MENU_RADIO, FL_NORMAL_LABEL, 0, 14, 0},
{ RIGLOG_PARTIAL_MLABEL, 0, (Fl_Callback*)cb_mnu_riglog_partial, 0, FL_MENU_RADIO, FL_NORMAL_LABEL, 0, 14, 0},
{ RIGLOG_NONE_MLABEL, 0, (Fl_Callback*)cb_mnu_riglog_none, 0, FL_MENU_RADIO, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ icons::make_icon_label(_("Waterfall")), 0, 0, 0, FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
{ DOCKEDSCOPE_MLABEL, 0, (Fl_Callback*)cb_mnuDockedscope, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
{ WF_MLABEL, 0, (Fl_Callback*)cb_mnu_wf_all, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{ _("&Logbook"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("View")), 'l', (Fl_Callback*)cb_mnuShowLogbook, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Files")), 0, 0, 0, FL_SUBMENU | FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Open...")), 0, (Fl_Callback*)cb_mnuOpenLogbook, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Save")), 0, (Fl_Callback*)cb_mnuSaveLogbook, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("New")), 0, (Fl_Callback*)cb_mnuNewLogbook, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ icons::make_icon_label(_("ADIF")), 0, 0, 0, FL_SUBMENU | FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Merge...")), 0, (Fl_Callback*)cb_mnuMergeADIF_log, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Export...")), 0, (Fl_Callback*)cb_mnuExportADIF_log, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ icons::make_icon_label(_("LoTW")), 0, (Fl_Callback*)cb_mnuConfigLoTW, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Reports")), 0, 0, 0, FL_SUBMENU | FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Text...")), 0, (Fl_Callback*)cb_mnuExportTEXT_log, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("CSV...")), 0, (Fl_Callback*)cb_mnuExportCSV_log, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Cabrillo...")), 0, (Fl_Callback*)cb_Export_Cabrillo, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ LOG_CONNECT_SERVER, 0, (Fl_Callback*)cb_log_server, 0, FL_MENU_TOGGLE | FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Field Day Logging")), 0, (Fl_Callback*)cb_fd_viewer, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{" ", 0, 0, 0, FL_MENU_INACTIVE, FL_NORMAL_LABEL, 0, 14, 0},
{_("&Help"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
#ifndef NDEBUG
// settle the gmfsk vs fldigi argument once and for all
{ icons::make_icon_label(_("Create sunspots"), weather_clear_icon), 0, cb_mnuFun, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
#endif
{ icons::make_icon_label(_("Beginners' Guide"), start_here_icon), 0, cb_mnuBeginnersURL, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Online documentation..."), help_browser_icon), 0, cb_mnuOnLineDOCS, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Fldigi web site..."), net_icon), 0, cb_mnuVisitURL, (void *)PACKAGE_HOME, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Reception reports..."), pskr_icon), 0, cb_mnuVisitPSKRep, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Command line options"), utilities_terminal_icon), 0, cb_mnuCmdLineHelp, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Audio device info"), audio_card_icon), 0, cb_mnuAudioInfo, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Build info"), executable_icon), 0, cb_mnuBuildInfo, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Event log"), dialog_information_icon), 0, cb_mnuDebug, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Check for updates..."), system_software_update_icon), 0, cb_mnuCheckUpdate, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("&About"), help_about_icon), 'a', cb_mnuAboutURL, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{" ", 0, 0, 0, FL_MENU_INACTIVE, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
};
static int count_visible_items(Fl_Menu_Item* menu)
{
int n = 0;
if (menu->flags & FL_SUBMENU)
menu++;
while (menu->label()) {
if (!(menu->flags & FL_SUBMENU) && menu->visible())
n++;
menu++;
}
return n;
}
static bool modes_hidden;
static void cb_opmode_show(Fl_Widget* w, void*)
{
Fl_Menu_* m = (Fl_Menu_*)w;
const char* label = m->mvalue()->label();
Fl_Menu_Item *item = 0, *first = 0, *last = 0;
item = first = getMenuItem(OPMODES_MLABEL) + 1;
if (!strcmp(label, OPMODES_ALL)) {
last = getMenuItem(OPMODES_ALL);
while (item != last) {
if (item->label())
item->show();
item++;
}
menu_[m->value()].label(OPMODES_FEWER);
modes_hidden = false;
}
else {
last = getMenuItem(OPMODES_FEWER);
while (item != last) {
if (item->label() && item->callback() == cb_init_mode) {
intptr_t mode = (intptr_t)item->user_data();
if (mode < NUM_MODES) {
if (progdefaults.visible_modes.test(mode))
item->show();
else
item->hide();
}
}
item++;
}
item = first;
while (item != last) {
if (item->flags & FL_SUBMENU) {
if (count_visible_items(item))
item->show();
else
item->hide();
}
item++;
}
if (progdefaults.visible_modes.test(MODE_OLIVIA))
getMenuItem("Olivia")->show();
else
getMenuItem("Olivia")->hide();
if (progdefaults.visible_modes.test(MODE_CONTESTIA))
getMenuItem("Contestia")->show();
else
getMenuItem("Contestia")->hide();
if (progdefaults.visible_modes.test(MODE_RTTY))
getMenuItem("RTTY")->show();
else
getMenuItem("RTTY")->hide();
if (progdefaults.visible_modes.test(MODE_IFKP))
getMenuItem("IFKP")->show();
else
getMenuItem("IFKP")->hide();
if (progdefaults.visible_modes.test(MODE_FSQ))
getMenuItem("FSQ")->show();
else
getMenuItem("FSQ")->hide();
menu_[m->value()].label(OPMODES_ALL);
modes_hidden = true;
}
m->redraw();
}
void toggle_visible_modes(Fl_Widget*, void*)
{
Fl_Menu_Item* show_modes = modes_hidden ? getMenuItem(OPMODES_ALL) : getMenuItem(OPMODES_FEWER);
if (!(~progdefaults.visible_modes).none()) { // some modes disabled
show_modes->label(OPMODES_FEWER);
show_modes->show();
(show_modes - 1)->flags |= FL_MENU_DIVIDER;
mnu->value(show_modes);
show_modes->do_callback(mnu, (void*)0);
}
else {
mnu->value(show_modes);
show_modes->do_callback(mnu, (void*)0);
show_modes->hide();
(show_modes - 1)->flags &= ~FL_MENU_DIVIDER;
}
}
Fl_Menu_Item *getMenuItem(const char *caption, Fl_Menu_Item* submenu)
{
if (submenu == 0 || !(submenu->flags & FL_SUBMENU)) {
if ( menu_->size() != sizeof(menu_)/sizeof(*menu_) ) {
LOG_ERROR("FIXME: the menu_ table is corrupt!");
abort();
}
submenu = menu_;
}
int size = submenu->size() - 1;
Fl_Menu_Item *item = 0;
const char* label;
for (int i = 0; i < size; i++) {
label = (submenu[i].labeltype() == _FL_MULTI_LABEL) ?
icons::get_icon_label_text(&submenu[i]) : submenu[i].text;
if (label && !strcmp(label, caption)) {
item = submenu + i;
break;
}
}
if (!item) {
LOG_ERROR("FIXME: could not find menu item \"%s\"", caption);
abort();
}
return item;
}
void activate_wefax_image_item(bool b)
{
/// Maybe do not do anything if the new modem has activated this menu item.
/// This is necessary because of trx_start_modem_loop which deletes
/// the current modem after the new one is created..
if( ( b == false )
&& ( active_modem->get_cap() & modem::CAP_IMG )
&& ( active_modem->get_mode() >= MODE_WEFAX_FIRST )
&& ( active_modem->get_mode() <= MODE_WEFAX_LAST )
)
{
return ;
}
Fl_Menu_Item *wefax_tx_item = getMenuItem(WEFAX_TX_IMAGE_MLABEL);
if (wefax_tx_item)
icons::set_active(wefax_tx_item, b);
}
void activate_menu_item(const char *caption, bool val)
{
Fl_Menu_Item *m = getMenuItem(caption);
icons::set_active(m, val);
}
void activate_mfsk_image_item(bool b)
{
Fl_Menu_Item *mfsk_item = getMenuItem(MFSK_IMAGE_MLABEL);
if (mfsk_item)
icons::set_active(mfsk_item, b);
}
void activate_thor_image_item(bool b)
{
Fl_Menu_Item *menu_item = getMenuItem(THOR_IMAGE_MLABEL);
if (menu_item)
icons::set_active(menu_item, b);
}
void activate_ifkp_image_item(bool b)
{
Fl_Menu_Item *menu_item = getMenuItem(IFKP_IMAGE_MLABEL);
if (menu_item)
icons::set_active(menu_item, b);
}
inline int rightof(Fl_Widget* w)
{
return w->x() + w->w();
}
inline int leftof(Fl_Widget* w)
{
unsigned int a = w->align();
if (a == FL_ALIGN_CENTER || a & FL_ALIGN_INSIDE)
return w->x();
fl_font(FL_HELVETICA, FL_NORMAL_SIZE);
int lw = static_cast<int>(ceil(fl_width(w->label())));
if (a & (FL_ALIGN_TOP | FL_ALIGN_BOTTOM)) {
if (a & FL_ALIGN_LEFT)
return w->x();
else if (a & FL_ALIGN_RIGHT)
return w->x() - (lw > w->w() ? lw - w->w() : 0);
else
return w->x() - (lw > w->w() ? (lw - w->w())/2 : 0);
}
else {
if (a & FL_ALIGN_LEFT)
return w->x() - lw;
else
return w->x();
}
}
inline int above(Fl_Widget* w)
{
unsigned int a = w->align();
if (a == FL_ALIGN_CENTER || a & FL_ALIGN_INSIDE)
return w->y();
return (a & FL_ALIGN_TOP) ? w->y() + FL_NORMAL_SIZE : w->y();
}
inline int below(Fl_Widget* w)
{
unsigned int a = w->align();
if (a == FL_ALIGN_CENTER || a & FL_ALIGN_INSIDE)
return w->y() + w->h();
return (a & FL_ALIGN_BOTTOM) ? w->y() + w->h() + FL_NORMAL_SIZE : w->y() + w->h();
}
std::string argv_window_title;
std::string main_window_title;
std::string xcvr_title;
void update_main_title()
{
std::string buf = argv_window_title;
buf.append(" ver").append(PACKAGE_VERSION);
if (!xcvr_title.empty()) {
buf.append(" / ").append(xcvr_title);
}
buf.append(" - ");
if (bWF_only)
buf.append(_("waterfall-only mode"));
else {
buf.append(progdefaults.myCall.empty() ? _("NO CALLSIGN SET") : progdefaults.myCall.c_str());
if (progdefaults.logging > LOG_QSO && progdefaults.logging < LOG_SQSO)
buf.append(" : ").append(contests[progdefaults.logging].name);
if (progdefaults.logging == LOG_SQSO) {
buf.append(" : ").append(QSOparties.qso_parties[progdefaults.SQSOcontest].contest);
}
if (progdefaults.logging == 0 && n3fjp_connected) {
buf.append(" : N3FJP Amateur Contact Log");
}
}
if (fl_digi_main) {
fl_digi_main->copy_label(buf.c_str());
fl_digi_main->redraw();
}
}
void showOpBrowserView(Fl_Widget *, void *)
{
if (RigViewerFrame->visible())
return CloseQsoView();
Logging_frame->hide();
RigViewerFrame->show();
qso_opPICK->box(FL_DOWN_BOX);
qso_opBrowser->take_focus();
qso_opPICK->tooltip(_("Close List"));
}
void CloseQsoView()
{
RigViewerFrame->hide();
Logging_frame->show();
qso_opPICK->box(FL_UP_BOX);
qso_opPICK->tooltip(_("Open List"));
if (restore_minimize) {
restore_minimize = false;
UI_select();
}
}
void showOpBrowserView2(Fl_Widget *w, void *)
{
restore_minimize = true;
UI_select();
showOpBrowserView(w, NULL);
}
void cb_qso_btnSelFreq(Fl_Widget *, void *)
{
qso_selectFreq();
}
void cb_qso_btnDelFreq(Fl_Widget *, void *)
{
qso_delFreq();
}
void cb_qso_btnAddFreq(Fl_Widget *, void *)
{
qso_addFreq();
}
void cb_qso_btnClearList(Fl_Widget *, void *)
{
if (quick_choice(_("Clear list?"), 2, _("Confirm"), _("Cancel"), NULL) == 1)
clearList();
}
//======================================================================
// PSK reporter interface
// use separate thread to accomodate very slow responses from
// remote server
//======================================================================
#define PSKREP_MENU_MAX 8
static pthread_t PSKREP_thread;
static std::string pskrep_data, pskrep_url, popup_title;
static std::string pskrep_str[PSKREP_MENU_MAX];
static std::string::size_type pskrep_i;
static Fl_Menu_Item pskrep_menu[PSKREP_MENU_MAX + 1];
static bool pskrep_working = false;
void do_pskreporter_popup()
{
int j;
int sel = 0;
int t = Fl_Tooltip::enabled();
const Fl_Menu_Item* p = (Fl_Menu_Item *)0;
put_status("");
Fl_Tooltip::disable();
p = pskrep_menu->popup(
qso_inpAct->x() + qso_inpAct->w(), qso_inpAct->y() + qso_inpAct->h(),
popup_title.c_str(), pskrep_menu + sel);
j = p ? p - pskrep_menu + 1 : 0;
if (j)
qsy(strtoll(pskrep_str[j - 1].erase(pskrep_str[j - 1].find(' ')).c_str(), NULL, 10));
Fl_Tooltip::enable(t);
}
void *do_pskreporter_lookup(void *) // thread action
{
pskrep_working = true;
pskrep_data.clear();
pskrep_url.assign("https://pskreporter.info/cgi-bin/psk-freq.pl");
pskrep_url.append("?mode=").append(mode_info[active_modem->get_mode()].export_mode);
if (qso_inpAct->size())
pskrep_url.append("&?grid=").append(qso_inpAct->value());
else if (progdefaults.myLocator.length() > 2)
pskrep_url.append("&?grid=").append(progdefaults.myLocator, 0, 2);
if (get_http(pskrep_url, pskrep_data, 20.0) != MBEDTLS_EXIT_SUCCESS) {
LOG_ERROR("Error while fetching \"%s\": %s", pskrep_url.c_str(), pskrep_data.c_str());
pskrep_working = false;
return NULL;
}
if (pskrep_data.find("IP has made too many requests") != std::string::npos) {
popup_title.assign(progdefaults.myName).append("\nSlow down the requests\nLAST data");
REQ(do_pskreporter_popup);
pskrep_working = false;
return NULL;
}
pskrep_i = pskrep_data.rfind("\r\n\r\n");
if (pskrep_i == std::string::npos) {
LOG_ERROR("Pskreporter return invalid: %s", pskrep_data.c_str());
pskrep_working = false;
return NULL;
}
pskrep_i += 4;
pskrep_i = pskrep_data.find("\r\n", pskrep_i);
pskrep_i += 2;
re_t re("([[:digit:]]{6,}) [[:digit:]]+ ([[:digit:]]+)[[:space:]]+", REG_EXTENDED);
size_t j = 0;
memset(pskrep_menu, 0, sizeof(pskrep_menu));
std::string title;
while (re.match(pskrep_data.substr(pskrep_i).c_str()) && j < PSKREP_MENU_MAX) {
pskrep_i = pskrep_data.find("\r\n", pskrep_i + 1);
if (pskrep_i == std::string::npos) break;
pskrep_i += 2;
pskrep_str[j].assign(re.submatch(1)).append(" (").append(re.submatch(2)).
append(" ").append(atoi(re.submatch(2).c_str()) == 1 ? _("report") : _("reports")).append(")");
pskrep_menu[j].label(pskrep_str[j].c_str());
pskrep_menu[++j].label(NULL);
}
if ((pskrep_i = pskrep_data.rfind(" grid ")) != std::string::npos) {
popup_title.assign(_("Recent activity for grid ")).
append(pskrep_data.substr(pskrep_i + 5, 3));
} else {
popup_title = " (?) Check network event log!\n";
#ifdef __WIN32__
popup_title.append("fldigi.files\\debug\\network_debug.txt");
#else
popup_title.append("~/.fldigi/debug/network_debug.txt");
#endif
}
REQ(do_pskreporter_popup);
pskrep_working = false;
return NULL;
}
void cb_qso_inpAct(Fl_Widget*, void*)
{
if (pskrep_working) {
return;
}
if (pthread_create(&PSKREP_thread, NULL, do_pskreporter_lookup, NULL) < 0) {
LOG_ERROR("%s", "pthread_create failed");
return;
}
put_status("Fetching PSK Reporter data", 15);
}
//======================================================================
static int i_opUsage;
static std::string s_opEntry;
static std::string s_opUsageEntry;
static std::string s_outEntry;
void cb_opUsageEnter(Fl_Button *, void*)
{
s_opUsageEntry = opUsage->value();
s_opEntry.append(s_opUsageEntry);
qso_opBrowser->text(i_opUsage, s_opEntry.c_str());
qso_updateEntry(i_opUsage, s_opUsageEntry);
opUsageFrame->hide();
qso_opBrowser->show();
}
void qso_opBrowser_amend(int i)
{
size_t pos;
s_opEntry = qso_opBrowser->text(i);
pos = s_opEntry.rfind('|');
s_opUsageEntry = s_opEntry.substr(pos+1);
s_opEntry.erase(pos + 1);
s_outEntry = s_opEntry.substr(0, pos);
while ((pos = s_outEntry.find('|')) != std::string::npos)
s_outEntry.replace(pos, 1, " ");
opOutUsage->value(s_outEntry.c_str());
opUsage->value(s_opUsageEntry.c_str());
i_opUsage = i;
qso_opBrowser->hide();
opUsageFrame->show();
}
void cb_qso_opBrowser(Fl_Browser*, void*)
{
int i = qso_opBrowser->value();
if (!i)
return;
// This makes the multi browser behave more like a hold browser,
// but with the ability to invoke the callback via space/return.
qso_opBrowser->deselect();
qso_opBrowser->select(i);
int ikey = Fl::event_key();
switch (ikey) {
case FL_Enter: case FL_KP_Enter: case FL_Button + FL_LEFT_MOUSE:
if (ikey == FL_Button + FL_LEFT_MOUSE && !Fl::event_clicks())
break;
qso_selectFreq();
CloseQsoView();
break;
case ' ': case FL_Button + FL_RIGHT_MOUSE:
if ((Fl::event_state() & FL_SHIFT) == FL_SHIFT) {
qso_opBrowser_amend(i);
} else
qso_setFreq();
break;
case FL_Button + FL_MIDDLE_MOUSE:
i = qso_opBrowser->value();
qso_delFreq();
qso_addFreq();
qso_opBrowser->select(i);
break;
}
}
void _show_frequency(long long freq)
{
if (!qsoFreqDisp1 || !qsoFreqDisp2 || !qsoFreqDisp3)
return;
qsoFreqDisp1->value(freq);
qsoFreqDisp2->value(freq);
qsoFreqDisp3->value(freq);
// if (FD_logged_on) FD_band_check();
}
void show_frequency(long long freq)
{
REQ(_show_frequency, freq);
}
void show_mode(const std::string sMode)
{
REQ(&Fl_ListBox::put_value, qso_opMODE, sMode.c_str());
}
void show_bw(const std::string sWidth)
{
REQ(&Fl_ListBox::put_value, qso_opBW, sWidth.c_str());
}
void show_bw1(const std::string sVal)
{
REQ(&Fl_ListBox::put_value, qso_opBW1, sVal.c_str());
}
void show_bw2(const std::string sVal)
{
REQ(&Fl_ListBox::put_value, qso_opBW2, sVal.c_str());
}
void show_spot(bool v)
{
//if (bWF_only) return;
static bool oldval = false;
if (v) {
mnu->size(btnAutoSpot->x(), mnu->h());
if (oldval)
progStatus.spot_recv = true;
btnAutoSpot->value(progStatus.spot_recv);
btnAutoSpot->activate();
}
else {
btnAutoSpot->deactivate();
oldval = btnAutoSpot->value();
btnAutoSpot->value(v);
btnAutoSpot->do_callback();
mnu->size(btnRSID->x(), mnu->h());
}
mnu->redraw();
}
void setTabColors()
{
if (dlgConfig->visible()) dlgConfig->redraw();
if (dxcluster_viewer) {
cluster_tabs->selection_color(progdefaults.TabsColor);
if (dxcluster_viewer->visible()) dxcluster_viewer->redraw();
}
}
void showMacroSet() {
set_macroLabels();
}
void showDTMF(const std::string s) {
std::string dtmfstr = "\n<DTMF> ";
dtmfstr.append(s);
ReceiveText->addstr(dtmfstr);
}
void setwfrange() {
wf->opmode();
}
void sync_cw_parameters()
{
active_modem->sync_parameters();
active_modem->update_Status();
}
void cb_cntCW_WPM(Fl_Widget * w, void *v)
{
Fl_Counter2 *cnt = (Fl_Counter2 *) w;
if (progStatus.WK_online && progStatus.WK_use_pot) {
cnt->value(progStatus.WK_speed_wpm);
return;
}
if (progStatus.WK_online && cnt->value() > 55) cnt->value(55);
if (use_nanoIO && cnt->value() > 60) cnt->value(60);
if (use_nanoIO && cnt->value() < 5) cnt->value(5);
progdefaults.CWspeed = (int)cnt->value();
LOG_INFO("%f WPM", progdefaults.CWspeed);
sldrCWxmtWPM->value(progdefaults.CWspeed);
cntr_nanoCW_WPM->value(progdefaults.CWspeed);
progdefaults.changed = true;
sync_cw_parameters();
if (progStatus.WK_online) WK_set_wpm();
flrig_set_wpm();
restoreFocus(25);
}
void cb_btnCW_Default(Fl_Widget *w, void *v)
{
active_modem->toggleWPM();
restoreFocus(26);
}
static void cb_mainViewer_Seek(Fl_Input *, void *)
{
static const Fl_Color seek_color[2] = { FL_FOREGROUND_COLOR,
adjust_color(FL_RED, FL_BACKGROUND2_COLOR) }; // invalid RE
seek_re.recompile(*txtInpSeek->value() ? txtInpSeek->value() : "[invalid");
if (txtInpSeek->textcolor() != seek_color[!seek_re]) {
txtInpSeek->textcolor(seek_color[!seek_re]);
txtInpSeek->redraw();
}
progStatus.browser_search = txtInpSeek->value();
if (viewer_inp_seek)
viewer_inp_seek->value(progStatus.browser_search.c_str());
}
static void cb_cntTxLevel(Fl_Counter2* o, void*) {
progStatus.txlevel = o->value();
set_mode_txlevel(active_modem->get_mode(), progStatus.txlevel);
}
static void cb_mainViewer(Fl_Hold_Browser*, void*) {
int sel = mainViewer->value();
if (sel == 0 || sel > progdefaults.VIEWERchannels)
return;
switch (Fl::event_button()) {
case FL_LEFT_MOUSE:
if (mainViewer->freq(sel) != NULLFREQ) {
if (progdefaults.VIEWERhistory){
ReceiveText->addchr('\n', FTextBase::RECV);
bHistory = true;
} else {
ReceiveText->addchr('\n', FTextBase::ALTR);
ReceiveText->addstr(mainViewer->line(sel), FTextBase::ALTR);
}
active_modem->set_freq(mainViewer->freq(sel));
recenter_spectrum_viewer();
active_modem->set_sigsearch(SIGSEARCH);
if (brwsViewer) brwsViewer->select(sel);
} else
mainViewer->deselect();
break;
case FL_MIDDLE_MOUSE: // copy from modem
// set_freq(sel, active_modem->get_freq());
break;
case FL_RIGHT_MOUSE: // reset
{
int ch = progdefaults.VIEWERascend ? progdefaults.VIEWERchannels - sel : sel - 1;
active_modem->clear_ch(ch);
mainViewer->deselect();
if (brwsViewer) brwsViewer->deselect();
break;
}
default:
break;
}
}
void widget_color_font(Fl_Widget *widget)
{
widget->labelsize(progdefaults.LOGGINGtextsize);
widget->labelfont(progdefaults.LOGGINGtextfont);
widget->labelcolor(progdefaults.LOGGINGtextcolor);
widget->color(progdefaults.LOGGINGcolor);
widget->redraw_label();
widget->redraw();
}
void input_color_font(Fl_Input *input)
{
input->textsize(progdefaults.LOGGINGtextsize);
input->textfont(progdefaults.LOGGINGtextfont);
input->textcolor(progdefaults.LOGGINGtextcolor);
input->color(progdefaults.LOGGINGcolor);
input->redraw();
}
void counter_color_font(Fl_Counter2 * cntr)
{
cntr->textsize(progdefaults.LOGGINGtextsize);
cntr->textfont(progdefaults.LOGGINGtextfont);
cntr->textcolor(progdefaults.LOGGINGtextcolor);
cntr->textbkcolor(progdefaults.LOGGINGcolor);
cntr->redraw();
}
void combo_color_font(Fl_ComboBox *cbo)
{
cbo->color(progdefaults.LOGGINGcolor);
cbo->selection_color(progdefaults.LOGGINGcolor);
cbo->textfont(progdefaults.LOGGINGtextfont);
cbo->textsize(progdefaults.LOGGINGtextsize);
cbo->textcolor(progdefaults.LOGGINGtextcolor);
cbo->redraw();
cbo->redraw_label();
}
void LOGGING_colors_font()
{
Fl_Input* in[] = {
inpFreq1,
inpCall1, inpCall2, inpCall3, inpCall4,
inpName1, inpName2,
inpTimeOn1, inpTimeOn2, inpTimeOn3, inpTimeOn4, inpTimeOn5,
inpTimeOff1, inpTimeOff2, inpTimeOff3, inpTimeOff4, inpTimeOff5,
inpRstIn1, inpRstIn2,
inpRstOut1, inpRstOut2,
inpQth, inpLoc, inpAZ, inpVEprov,
inpState1,
inpLoc1,
inpSerNo1, inpSerNo2,
outSerNo1, outSerNo2,
outSerNo3, outSerNo4,
inp_SS_Check1, inp_SS_Precedence1,
inp_SS_Section1, inp_SS_SerialNoR1,
inp_SS_Check2, inp_SS_Precedence2,
inp_SS_Section2, inp_SS_SerialNoR2,
inpXchgIn1, inpXchgIn2,
inp_FD_class1, inp_FD_class2,
inp_FD_section1, inp_FD_section2,
inp_KD_age1, inp_KD_age2,
inp_KD_state1, inp_KD_state2,
inp_KD_VEprov1, inp_KD_VEprov2,
inp_KD_XchgIn1, inp_KD_XchgIn2,
inp_CQ_RSTin2, inp_CQ_RSTout2, inp_CQzone1, inp_CQzone2,
inp_CQstate1, inp_CQstate2,
inp_CQDX_RSTin2, inp_CQDX_RSTout2,
inp_CQDXzone1, inp_CQDXzone2,
inp_ASCR_RSTin2, inp_ASCR_RSTout2,
inp_ASCR_XchgIn1, inp_ASCR_XchgIn2,
inp_ASCR_class1, inp_ASCR_class2,
inp_ASCR_name2,
inpNAQPname2, inp_name_NAS2,
inpSPCnum_NAQP1, inpSPCnum_NAQP2,
inpRTU_stpr1, inpRTU_stpr2, inpRTU_RSTin2, inpRTU_RSTout2,
inpRTU_serno1, inpRTU_serno2,
outSerNo4, inp_ser_NAS1, inpSPCnum_NAS1,
outSerNo5, inp_ser_NAS2, inpSPCnum_NAS2,
inpSerNo3, inpSerNo4,
outSerNo7, outSerNo8,
inpRstIn3, inpRstOut3,
inp_JOTA_scout1, inp_JOTA_scout2,
inp_JOTA_troop1, inp_JOTA_troop2,
inp_JOTA_spc1, inp_JOTA_spc2,
inpRstIn_AICW2, inpRstOut_AICW2,
inpSPCnum_AICW1, inpSPCnum_AICW2
};
for (size_t i = 0; i < sizeof(in)/sizeof(*in); i++) {
input_color_font(in[i]);
}
input_color_font(inpNotes);
// buttons, boxes
Fl_Widget *wid[] = {
MODEstatus, Status1, Status2, StatusBar, WARNstatus };
for (size_t i = 0; i < sizeof(wid)/sizeof(*wid); i++)
widget_color_font(wid[i]);
// counters
counter_color_font(cntCW_WPM);
counter_color_font(cntTxLevel);
counter_color_font(wf->wfRefLevel);
counter_color_font(wf->wfAmpSpan);
counter_color_font(wf->wfcarrier);
// combo boxes
Fl_ComboBox *cbo_widgets[] = {
qso_opMODE, qso_opBW, qso_opBW1, qso_opBW2,
cboCountyQSO, cboCountryQSO,
cboCountryAICW2,
cboCountryAIDX2,
cboCountryCQ2,
cboCountryCQDX2,
cboCountryIARI2,
cboCountryRTU2 //,
// cboCountryWAE2
};
for (size_t i = 0; i < sizeof(cbo_widgets)/sizeof(*cbo_widgets); i++) {
combo_color_font(cbo_widgets[i]);
}
fl_digi_main->redraw();
}
inline void inp_font_pos(Fl_Input2* inp, int x, int y, int w, int h)
{
inp->textsize(progdefaults.LOGBOOKtextsize);
inp->textfont(progdefaults.LOGBOOKtextfont);
inp->textcolor(progdefaults.LOGBOOKtextcolor);
inp->color(progdefaults.LOGBOOKcolor);
inp->labelfont(progdefaults.LOGBOOKtextfont);
int ls = progdefaults.LOGBOOKtextsize - 1;
ls = ls < 12 ? 12 : (ls > 14 ? 14 : ls);
inp->labelsize(ls);
inp->redraw_label();
inp->resize(x, y, w, h);
inp->redraw();
}
inline void date_font_pos(Fl_DateInput* inp, int x, int y, int w, int h)
{
inp->textsize(progdefaults.LOGBOOKtextsize);
inp->textfont(progdefaults.LOGBOOKtextfont);
inp->textcolor(progdefaults.LOGBOOKtextcolor);
inp->color(progdefaults.LOGBOOKcolor);
inp->labelfont(progdefaults.LOGBOOKtextfont);
int ls = progdefaults.LOGBOOKtextsize - 1;
ls = ls < 10 ? 10 : (ls > 14 ? 14 : ls);
inp->labelsize(ls);
inp->redraw_label();
inp->resize(x, y, w, h);
}
inline void btn_font_pos(Fl_Widget* btn, int x, int y, int w, int h)
{
btn->labelfont(progdefaults.LOGBOOKtextfont);
int ls = progdefaults.LOGBOOKtextsize - 1;
ls = ls < 10 ? 10 : (ls > 14 ? 14 : ls);
btn->labelsize(ls);
btn->redraw_label();
btn->resize(x, y, w, h);
btn->redraw();
}
inline void tab_font_pos(Fl_Widget* tab, int x, int y, int w, int h, int ls)
{
tab->labelfont(progdefaults.LOGBOOKtextfont);
tab->labelsize(ls);
tab->redraw_label();
tab->resize(x, y, w, h);
tab->redraw();
}
inline void chc_font_pos(Fl_Choice* chc, int x, int y, int w, int h)
{
chc->labelfont(progdefaults.LOGBOOKtextfont);
int ls = progdefaults.LOGBOOKtextsize - 1;
ls = ls < 10 ? 10 : (ls > 14 ? 14 : ls);
chc->labelsize(ls);
chc->redraw_label();
chc->resize(x, y, w, h);
chc->redraw();
}
void LOGBOOK_colors_font()
{
if (!dlgLogbook) return;
int ls = progdefaults.LOGBOOKtextsize;
// input / output / date / text fields
fl_font(progdefaults.LOGBOOKtextfont, ls);
int wh = fl_height() + 4;// + 8;
int width_date = fl_width("888888888") + wh;
int width_time = fl_width("23:59:599");
int width_freq = fl_width("WW/WW8WWW/WW.");//fl_width("99.9999999");
int width_rst = fl_width("5999");
int width_pwr = fl_width("0000");
int width_loc = fl_width("XX88XXX");
int width_mode = fl_width("CONTESTIA");
int width_state = fl_width("WWWW");
int width_province = fl_width("WWW.");
int width_country = fl_width("WWWWWWWWWWWWWWWWWWWW");
int dlg_width = 2 +
width_date + 2 +
width_time + 2 +
width_freq + 2 +
width_mode + 2 +
width_pwr + 2 +
width_rst + 2 +
width_loc + 2;
int newheight = 4*(wh + 20) + 3*wh + 2 + wh + 2 + wBrowser->h() + 2; //+ 24;
if (dlg_width > progStatus.logbook_w)
progStatus.logbook_w = dlg_width;
else
dlg_width = progStatus.logbook_w;
if (newheight > progStatus.logbook_h)
progStatus.logbook_h = newheight;
else
newheight = progStatus.logbook_h;
dlgLogbook->resize( dlgLogbook->x(), dlgLogbook->y(), progStatus.logbook_w, progStatus.logbook_h);
// row1
int ypos = 24;
// date on
int xpos = 2;
date_font_pos(inpDate_log, xpos, ypos, width_date, wh);
// timeon
xpos += width_date + 2;
inp_font_pos(inpTimeOn_log, xpos, ypos, width_time, wh);
// call
xpos += width_time + 2;
inp_font_pos(inpCall_log, xpos, ypos, width_freq, wh);
// name
xpos += width_freq + 2;
int wname = dlg_width - xpos - width_rst - width_loc - 6;
inp_font_pos(inpName_log, xpos, ypos, wname, wh);
// rcvd RST
xpos += wname + 2;
inp_font_pos(inpRstR_log, xpos, ypos, width_rst, wh);
// nbr records
xpos += width_rst + 2;
inp_font_pos(txtNbrRecs_log, xpos, ypos, width_loc, wh);
// row2
ypos += wh + 20;
//date off
xpos = 2;
date_font_pos(inpDateOff_log, xpos, ypos, width_date, wh);
//time off
xpos += width_date + 2;
inp_font_pos(inpTimeOff_log, xpos, ypos, width_time, wh);
//frequency
xpos += width_time + 2;
inp_font_pos(inpFreq_log, xpos, ypos, width_freq, wh);
//mode
xpos += width_freq + 2;
int wmode = dlg_width - xpos - width_rst - width_pwr - width_loc - 8;
inp_font_pos(inpMode_log, xpos, ypos, wmode, wh);
//power
xpos += wmode + 2;
inp_font_pos(inpTX_pwr_log, xpos, ypos, width_pwr, wh);
//sent RST
xpos += width_pwr + 2;
inp_font_pos(inpRstS_log, xpos, ypos, width_rst, wh);
// locator
xpos += width_rst + 2;
inp_font_pos(inpLoc_log, xpos, ypos, width_loc, wh);
// row 3
// QTH
ypos += wh + 20;
xpos = 2;
int wqth = dlg_width - 4 - width_state - 2 - width_province - 2 - width_country - 2;
inp_font_pos(inpQth_log, xpos, ypos, wqth, wh);
// state
xpos += wqth + 2;
inp_font_pos(inpState_log, xpos, ypos, width_state, wh);
// province
xpos += width_state + 2;
inp_font_pos(inpVE_Prov_log, xpos, ypos, width_province, wh);
// country
xpos += width_province + 2;
inp_font_pos(inpCountry_log, xpos, ypos, width_country, wh);
ypos += wh + 2;
grpTabsSearch->position(0, ypos);
Tabs->position(2, grpTabsSearch->y() + 2);
inp_font_pos(inpSearchString, Tabs->x() + Tabs->w() + 4, Tabs->y() + 30,
dlgLogbook->w() - Tabs->w() - 8, wh);
int tab_h = wh * 14 / progdefaults.LOGBOOKtextsize;
int tab_grp_h = 4 * wh + 4;
// Tabs->resize(2, ypos, dlg_width - 6 - inpSearchString->w(), tab_grp_h + tab_h);
Tabs->selection_color(progdefaults.TabsColor);
tab_font_pos(tab_log_qsl, 2, ypos + tab_h, Tabs->w(), tab_grp_h, 14);
tab_font_pos(tab_log_contest, 2, ypos + tab_h, Tabs->w(), tab_grp_h, 14);
tab_font_pos(tab_log_other, 2, ypos + tab_h, Tabs->w(), tab_grp_h, 14);
tab_font_pos(tab_log_notes, 2, ypos + tab_h, Tabs->w(), tab_grp_h, 14);
Fl_Input2* qso_fields[] = {
inpTimeOn_log, inpCall_log, inpName_log, inpRstR_log, inpTimeOff_log,
inpFreq_log, inpMode_log, inpTX_pwr_log, inpRstS_log, inpQth_log,
inpState_log, inpVE_Prov_log, inpLoc_log, inpCountry_log, inpQSL_VIA_log,
inpCNTY_log, inpIOTA_log, inpCQZ_log, inpCONT_log, inpITUZ_log,
inpDXCC_log, inpNotes_log, inp_log_sta_call, inp_log_op_call, inp_log_sta_qth,
inp_log_sta_loc, inpSerNoOut_log, inpMyXchg_log, inpSerNoIn_log, inpXchgIn_log,
inpClass_log, inpSection_log, inp_age_log, inp_1010_log, inpBand_log,
inp_check_log, inp_log_cwss_serno, inp_log_cwss_sec, inp_log_cwss_prec, inp_log_cwss_chk,
inp_log_troop_s, inp_log_troop_r, inp_log_scout_s, inp_log_scout_r, inpSearchString,
txtNbrRecs_log
};
Fl_DateInput* dti[] = {
inp_export_start_date, inp_export_stop_date, inpDate_log, inpDateOff_log,
inpQSLrcvddate_log, inpEQSLrcvddate_log, inpLOTWrcvddate_log, inpQSLsentdate_log,
inpEQSLsentdate_log, inpLOTWsentdate_log
};
for (size_t i = 0; i < sizeof(qso_fields) / sizeof(*qso_fields); i++)
inp_font_pos(
qso_fields[i], qso_fields[i]->x(),
qso_fields[i]->y(), qso_fields[i]->w(), wh);
for (size_t i = 0; i < sizeof(dti) / sizeof(*dti); i++)
date_font_pos( dti[i], dti[i]->x(), dti[i]->y(), dti[i]->w(), wh);
inpNotes_log->resize(
tab_log_notes->x() + 2,
tab_log_notes->y() + 4,
tab_log_notes->w() - 4,
tab_log_notes->h() - 6);
ypos += grpTabsSearch->h() + 2;
grpFileButtons->resize(0, ypos, dlgLogbook->w(), grpFileButtons->h());
grpFileButtons->redraw();
txtLogFile->textsize(ls);
txtLogFile->textfont(progdefaults.LOGBOOKtextfont);
txtLogFile->textcolor(progdefaults.LOGBOOKtextcolor);
txtLogFile->color(progdefaults.LOGBOOKcolor);
ypos += grpFileButtons->h() + 2;
wBrowser->font(progdefaults.LOGBOOKtextfont);
wBrowser->fontsize(progdefaults.LOGBOOKtextsize);
wBrowser->color(progdefaults.LOGBOOKcolor);
wBrowser->selection_color(FL_SELECTION_COLOR);
int datewidth = wBrowser->columnWidth(0);
int timewidth = wBrowser->columnWidth(1);
int callwidth = wBrowser->columnWidth(2);
int namewidth = wBrowser->columnWidth(3);
int freqwidth = wBrowser->columnWidth(4);
int modewidth = wBrowser->columnWidth(5);
int totalwidth = datewidth + timewidth + callwidth + namewidth + freqwidth + modewidth;
int nuwidth = dlgLogbook->w() - 2*wBrowser->x();
wBrowser->resize(wBrowser->x(), ypos, nuwidth, dlgLogbook->h() - 2 - ypos);
nuwidth -= wBrowser->vScrollWidth();
datewidth *= (1.0 * nuwidth / totalwidth);
timewidth *= (1.0 * nuwidth / totalwidth);
callwidth *= (1.0 * nuwidth / totalwidth);
freqwidth *= (1.0 * nuwidth / totalwidth);
modewidth *= (1.0 * nuwidth / totalwidth);
namewidth = nuwidth - datewidth - timewidth - callwidth - freqwidth - modewidth;
wBrowser->columnWidth (0, datewidth); // Date column
wBrowser->columnWidth (1, timewidth); // Time column
wBrowser->columnWidth (2, callwidth); // Callsign column
wBrowser->columnWidth (3, namewidth); // Name column
wBrowser->columnWidth (4, freqwidth); // Frequency column
wBrowser->columnWidth (5, modewidth); // Mode column
dlgLogbook->init_sizes();
dlgLogbook->damage();
dlgLogbook->redraw();
}
void set_smeter_colors()
{
Fl_Color clr = fl_rgb_color(
progdefaults.Smeter_bg_color.R,
progdefaults.Smeter_bg_color.G,
progdefaults.Smeter_bg_color.B);
smeter->set_background(clr);
clr = fl_rgb_color(
progdefaults.Smeter_meter_color.R,
progdefaults.Smeter_meter_color.G,
progdefaults.Smeter_meter_color.B);
smeter->set_metercolor(clr);
clr = fl_rgb_color(
progdefaults.Smeter_scale_color.R,
progdefaults.Smeter_scale_color.G,
progdefaults.Smeter_scale_color.B);
smeter->set_scalecolor(clr);
smeter->redraw();
clr = fl_rgb_color(
progdefaults.PWRmeter_bg_color.R,
progdefaults.PWRmeter_bg_color.G,
progdefaults.PWRmeter_bg_color.B);
pwrmeter->set_background(clr);
clr = fl_rgb_color(
progdefaults.PWRmeter_meter_color.R,
progdefaults.PWRmeter_meter_color.G,
progdefaults.PWRmeter_meter_color.B);
pwrmeter->set_metercolor(clr);
clr = fl_rgb_color(
progdefaults.PWRmeter_scale_color.R,
progdefaults.PWRmeter_scale_color.G,
progdefaults.PWRmeter_scale_color.B);
pwrmeter->set_scalecolor(clr);
pwrmeter->select(progdefaults.PWRselect);
pwrmeter->redraw();
}
void FREQ_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_FREQ) s.erase(MAX_FREQ);
w->value(s.c_str());
}
void TIME_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_TIME) s.erase(MAX_TIME);
w->value(s.c_str());
}
void RST_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_RST) s.erase(MAX_RST);
w->value(s.c_str());
}
void CALL_callback(Fl_Input2 *w) {
cb_call(w, NULL);
}
void NAME_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_NAME) s.erase(MAX_NAME);
w->value(s.c_str());
}
void AZ_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_AZ) s.erase(MAX_AZ);
w->value(s.c_str());
}
void QTH_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_QTH) s.erase(MAX_QTH);
w->value(s.c_str());
}
void STATE_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_STATE) s.erase(MAX_STATE);
w->value(s.c_str());
}
void VEPROV_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_STATE) s.erase(MAX_STATE);
w->value(s.c_str());
}
void LOC_callback(Fl_Input2 *w) {
cb_loc(w, NULL);
}
void SERNO_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_SERNO) s.erase(MAX_SERNO);
w->value(s.c_str());
}
void XCHG_IN_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_XCHG_IN) s.erase(MAX_XCHG_IN);
w->value(s.c_str());
}
void COUNTRY_callback(Fl_ComboBox *w) {
std::string s;
s = w->value();
if (s.length() > MAX_COUNTRY) s.erase(MAX_COUNTRY);
if (country_test(s))
w->value(country_match.c_str());
else
w->value(s.c_str());
}
void COUNTY_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_COUNTY) s.erase(MAX_COUNTY);
w->value(s.c_str());
}
void NOTES_callback(Fl_Input2 *w) {
std::string s;
s = w->value();
if (s.length() > MAX_NOTES) s.erase(MAX_NOTES);
w->value(s.c_str());
}
void log_callback(Fl_Widget *w) {
if (w == inpCall) {
n3fjp_calltab = true;
CALL_callback((Fl_Input2 *)w);
DupCheck();
return;
}
if (w == inpName) {
NAME_callback((Fl_Input2 *)w);
return;
}
if (w == cboCountry) {
COUNTRY_callback((Fl_ComboBox *)w);
return;
}
if (w == inpCounty) {
COUNTY_callback((Fl_Input2 *)w);
return;
}
if (w == inpNotes) {
NOTES_callback((Fl_Input2 *)w);
return;
}
if (w == inpLoc) {
LOC_callback((Fl_Input2 *)w);
return;
}
if (w == inpXchgIn) {
XCHG_IN_callback((Fl_Input2 *)w);
return;
}
if (w == inpState) {
STATE_callback((Fl_Input2 *)w);
return;
}
if (w == inpVEprov) {
VEPROV_callback((Fl_Input2 *)w);
return;
}
if (w == inpQTH) {
QTH_callback((Fl_Input2 *)w);
return;
}
if (w == inpAZ) {
AZ_callback((Fl_Input2 *)w);
return;
}
if (w == inpSerNo) {
SERNO_callback((Fl_Input2 *)w);
return;
}
if (w == inpRstIn) {
RST_callback((Fl_Input2 *)w);
return;
}
if (w == inpTimeOff || w == inpTimeOn) {
TIME_callback((Fl_Input2 *)w);
return;
}
// LOG_ERROR("unknown widget %p", w);
}
void cb_CountyQSO(Fl_Widget *)
{
std::string sc = cboCountyQSO->value();
if (sc.empty()) return;
Cstates st;
std::string ST = sc.substr(0,2);
std::string CNTY = st.cnty_short(sc.substr(0,2), sc.substr(3));
if (inpState) inpState->value(ST.c_str());
if (inpState1) inpState1->value(ST.c_str());
if (inp_CQstate1) inp_CQstate1->value(ST.c_str());
if (inp_CQstate2) inp_CQstate2->value(ST.c_str());
if (inpSQSO_state1) inpSQSO_state1->value(ST.c_str());
if (inpSQSO_state2) inpSQSO_state2->value(ST.c_str());
if (inpSQSO_county1) inpSQSO_county1->value(CNTY.c_str());
if (inpSQSO_county2) inpSQSO_county2->value(CNTY.c_str());
}
void cb_meters(Fl_Widget *)
{
if (!rigCAT_active()) return;
pwrlevel_grp->show();
}
void cb_set_pwr_level(void *)
{
rigCAT_set_pwrlevel((int)pwr_level->value());
}
void cb_exit_pwr_level(void*)
{
pwrlevel_grp->hide();
}
#include "fl_digi_main.cxx"
void cb_mnuAltDockedscope(Fl_Menu_ *w, void *d);
static Fl_Menu_Item alt_menu_[] = {
{_("&File"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Exit"), log_out_icon), 'x', (Fl_Callback*)cb_E, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{_("Op &Mode"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CW].name, 0, cb_init_mode, (void *)MODE_CW, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"Contestia", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_125].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_4_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_4_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_125].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_8_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_8_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_16_250].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_16_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_16_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_16_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_16_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_32_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_32_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_32_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_32_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_64_500].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_64_1000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_CONTESTIA_64_2000].name, 0, cb_init_mode, (void *)MODE_CONTESTIA_64_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ _("Custom..."), 0, cb_contestiaCustom, (void *)MODE_CONTESTIA, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"DominoEX", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEXMICRO].name, 0, cb_init_mode, (void *)MODE_DOMINOEXMICRO, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX4].name, 0, cb_init_mode, (void *)MODE_DOMINOEX4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX5].name, 0, cb_init_mode, (void *)MODE_DOMINOEX5, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX8].name, 0, cb_init_mode, (void *)MODE_DOMINOEX8, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX11].name, 0, cb_init_mode, (void *)MODE_DOMINOEX11, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX16].name, 0, cb_init_mode, (void *)MODE_DOMINOEX16, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX22].name, 0, cb_init_mode, (void *)MODE_DOMINOEX22, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX44].name, 0, cb_init_mode, (void *)MODE_DOMINOEX44, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_DOMINOEX88].name, 0, cb_init_mode, (void *)MODE_DOMINOEX88, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"MFSK", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK4].name, 0, cb_init_mode, (void *)MODE_MFSK4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK8].name, 0, cb_init_mode, (void *)MODE_MFSK8, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK11].name, 0, cb_init_mode, (void *)MODE_MFSK11, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK16].name, 0, cb_init_mode, (void *)MODE_MFSK16, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK22].name, 0, cb_init_mode, (void *)MODE_MFSK22, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK31].name, 0, cb_init_mode, (void *)MODE_MFSK31, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK32].name, 0, cb_init_mode, (void *)MODE_MFSK32, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK64].name, 0, cb_init_mode, (void *)MODE_MFSK64, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK128].name, 0, cb_init_mode, (void *)MODE_MFSK128, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK64L].name, 0, cb_init_mode, (void *)MODE_MFSK64L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MFSK128L].name, 0, cb_init_mode, (void *)MODE_MFSK128L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"MT63", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_500S].name, 0, cb_init_mode, (void *)MODE_MT63_500S, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_500L].name, 0, cb_init_mode, (void *)MODE_MT63_500L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_1000S].name, 0, cb_init_mode, (void *)MODE_MT63_1000S, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_1000L].name, 0, cb_init_mode, (void *)MODE_MT63_1000L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_2000S].name, 0, cb_init_mode, (void *)MODE_MT63_2000S, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_MT63_2000L].name, 0, cb_init_mode, (void *)MODE_MT63_2000L, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"OFDM", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OFDM_500F].name, 0, cb_init_mode, (void *)MODE_OFDM_500F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OFDM_750F].name, 0, cb_init_mode, (void *)MODE_OFDM_750F, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
//{ mode_info[MODE_OFDM_2000F].name, 0, cb_init_mode, (void *)MODE_OFDM_2000F, 0, FL_NORMAL_LABEL, 0, 14, 0},
//{ mode_info[MODE_OFDM_2000].name, 0, cb_init_mode, (void *)MODE_OFDM_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OFDM_3500].name, 0, cb_init_mode, (void *)MODE_OFDM_3500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"Olivia", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_125].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_250].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_4_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_4_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_125].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_250].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_8_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_8_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_16_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_16_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_16_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_16_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_32_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_32_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_32_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_32_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_64_500].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_64_1000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_OLIVIA_64_2000].name, 0, cb_init_mode, (void *)MODE_OLIVIA_64_2000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ _("Custom..."), 0, cb_oliviaCustom, (void *)MODE_OLIVIA, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"PSK", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK31].name, 0, cb_init_mode, (void *)MODE_PSK31, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK63].name, 0, cb_init_mode, (void *)MODE_PSK63, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK63F].name, 0, cb_init_mode, (void *)MODE_PSK63F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK125].name, 0, cb_init_mode, (void *)MODE_PSK125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK250].name, 0, cb_init_mode, (void *)MODE_PSK250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK500].name, 0, cb_init_mode, (void *)MODE_PSK500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK1000].name, 0, cb_init_mode, (void *)MODE_PSK1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"MultiCarrier", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_12X_PSK125].name, 0, cb_init_mode, (void *)MODE_12X_PSK125, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_6X_PSK250].name, 0, cb_init_mode, (void *)MODE_6X_PSK250, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK500].name, 0, cb_init_mode, (void *)MODE_2X_PSK500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_4X_PSK500].name, 0, cb_init_mode, (void *)MODE_4X_PSK500, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK800].name, 0, cb_init_mode, (void *)MODE_2X_PSK800, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK1000].name, 0, cb_init_mode, (void *)MODE_2X_PSK1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{"QPSK", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK31].name, 0, cb_init_mode, (void *)MODE_QPSK31, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK63].name, 0, cb_init_mode, (void *)MODE_QPSK63, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK125].name, 0, cb_init_mode, (void *)MODE_QPSK125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK250].name, 0, cb_init_mode, (void *)MODE_QPSK250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_QPSK500].name, 0, cb_init_mode, (void *)MODE_QPSK500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"8PSK", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK125].name, 0, cb_init_mode, (void *)MODE_8PSK125, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK250].name, 0, cb_init_mode, (void *)MODE_8PSK250, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK500].name, 0, cb_init_mode, (void *)MODE_8PSK500, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK1000].name, 0, cb_init_mode, (void *)MODE_8PSK1000, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK125FL].name, 0, cb_init_mode, (void *)MODE_8PSK125FL, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK125F].name, 0, cb_init_mode, (void *)MODE_8PSK125F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK250FL].name, 0, cb_init_mode, (void *)MODE_8PSK250FL, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK250F].name, 0, cb_init_mode, (void *)MODE_8PSK250F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK500F].name, 0, cb_init_mode, (void *)MODE_8PSK500F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK1000F].name, 0, cb_init_mode, (void *)MODE_8PSK1000F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_8PSK1200F].name, 0, cb_init_mode, (void *)MODE_8PSK1200F, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"PSKR", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK125R].name, 0, cb_init_mode, (void *)MODE_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK250R].name, 0, cb_init_mode, (void *)MODE_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK500R].name, 0, cb_init_mode, (void *)MODE_PSK500R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_PSK1000R].name, 0, cb_init_mode, (void *)MODE_PSK1000R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"MultiCarrier", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_4X_PSK63R].name, 0, cb_init_mode, (void *)MODE_4X_PSK63R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_5X_PSK63R].name, 0, cb_init_mode, (void *)MODE_5X_PSK63R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_10X_PSK63R].name, 0, cb_init_mode, (void *)MODE_10X_PSK63R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_20X_PSK63R].name, 0, cb_init_mode, (void *)MODE_20X_PSK63R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_32X_PSK63R].name, 0, cb_init_mode, (void *)MODE_32X_PSK63R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_4X_PSK125R].name, 0, cb_init_mode, (void *)MODE_4X_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_5X_PSK125R].name, 0, cb_init_mode, (void *)MODE_5X_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_10X_PSK125R].name, 0, cb_init_mode, (void *)MODE_10X_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_12X_PSK125R].name, 0, cb_init_mode, (void *)MODE_12X_PSK125R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_16X_PSK125R].name, 0, cb_init_mode, (void *)MODE_16X_PSK125R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK250R].name, 0, cb_init_mode, (void *)MODE_2X_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_3X_PSK250R].name, 0, cb_init_mode, (void *)MODE_3X_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_5X_PSK250R].name, 0, cb_init_mode, (void *)MODE_5X_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_6X_PSK250R].name, 0, cb_init_mode, (void *)MODE_6X_PSK250R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_7X_PSK250R].name, 0, cb_init_mode, (void *)MODE_7X_PSK250R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK500R].name, 0, cb_init_mode, (void *)MODE_2X_PSK500R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_3X_PSK500R].name, 0, cb_init_mode, (void *)MODE_3X_PSK500R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_4X_PSK500R].name, 0, cb_init_mode, (void *)MODE_4X_PSK500R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK800R].name, 0, cb_init_mode, (void *)MODE_2X_PSK800R, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_2X_PSK1000R].name, 0, cb_init_mode, (void *)MODE_2X_PSK1000R, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{ RTTY_MLABEL, 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ "RTTY-45", 0, cb_rtty45, (void *)MODE_RTTY, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "RTTY-50", 0, cb_rtty50, (void *)MODE_RTTY, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "RTTY-75N", 0, cb_rtty75N, (void *)MODE_RTTY, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ "RTTY-75W", 0, cb_rtty75W, (void *)MODE_RTTY, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ _("Custom..."), 0, cb_rttyCustom, (void *)MODE_RTTY, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"THOR", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THORMICRO].name, 0, cb_init_mode, (void *)MODE_THORMICRO, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR4].name, 0, cb_init_mode, (void *)MODE_THOR4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR5].name, 0, cb_init_mode, (void *)MODE_THOR5, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR8].name, 0, cb_init_mode, (void *)MODE_THOR8, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR11].name, 0, cb_init_mode, (void *)MODE_THOR11, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR16].name, 0, cb_init_mode, (void *)MODE_THOR16, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR22].name, 0, cb_init_mode, (void *)MODE_THOR22, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR25x4].name, 0, cb_init_mode, (void *)MODE_THOR25x4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR50x1].name, 0, cb_init_mode, (void *)MODE_THOR50x1, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR50x2].name, 0, cb_init_mode, (void *)MODE_THOR50x2, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THOR100].name, 0, cb_init_mode, (void *)MODE_THOR100, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{"Throb", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROB1].name, 0, cb_init_mode, (void *)MODE_THROB1, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROB2].name, 0, cb_init_mode, (void *)MODE_THROB2, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROB4].name, 0, cb_init_mode, (void *)MODE_THROB4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROBX1].name, 0, cb_init_mode, (void *)MODE_THROBX1, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROBX2].name, 0, cb_init_mode, (void *)MODE_THROBX2, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_THROBX4].name, 0, cb_init_mode, (void *)MODE_THROBX4, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ mode_info[MODE_WWV].name, 0, cb_init_mode, (void *)MODE_WWV, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_NULL].name, 0, cb_init_mode, (void *)MODE_NULL, 0, FL_NORMAL_LABEL, 0, 14, 0},
{ mode_info[MODE_SSB].name, 0, cb_init_mode, (void *)MODE_SSB, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{_("&Configure"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Config Dialog")), 0, (Fl_Callback*)cb_mnu_config_dialog, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Test Signals")), 0, (Fl_Callback*)cb_mnuTestSignals, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Notifications")), 0, (Fl_Callback*)cb_mnuConfigNotify, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Save Config"), save_icon), 0, (Fl_Callback*)cb_mnuSaveConfig, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{ VIEW_MLABEL, 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Rx Audio Dialog")), 'a', (Fl_Callback*)cb_mnuRxAudioDialog, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Signal Browser")), 0, (Fl_Callback*)cb_mnuViewer, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Spectrum scope")), 0, (Fl_Callback*)cb_mnuSpectrum, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Floating scope"), utilities_system_monitor_icon), 'f', (Fl_Callback*)cb_mnuDigiscope, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ DOCKEDSCOPE_MLABEL, 0, (Fl_Callback*)cb_mnuAltDockedscope, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(MFSK_IMAGE_MLABEL, image_icon), 0, (Fl_Callback*)cb_mnuPicViewer, 0, FL_MENU_INACTIVE, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(THOR_IMAGE_MLABEL, image_icon), 0, (Fl_Callback*)cb_mnuThorViewRaw,0, FL_MENU_INACTIVE, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(IFKP_IMAGE_MLABEL, image_icon), 0, (Fl_Callback*)cb_mnuIfkpViewRaw,0, FL_MENU_INACTIVE | FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(WEFAX_TX_IMAGE_MLABEL, image_icon), 0, (Fl_Callback*)wefax_pic::cb_mnu_pic_viewer_tx,0, FL_MENU_INACTIVE | FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{_("&Help"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Online documentation..."), help_browser_icon), 0, cb_mnuOnLineDOCS, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Event log"), dialog_information_icon), 0, cb_mnuDebug, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("Check for updates..."), system_software_update_icon), 0, cb_mnuCheckUpdate, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{ icons::make_icon_label(_("&About"), help_about_icon), 'a', cb_mnuAboutURL, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
};
void cb_mnuAltDockedscope(Fl_Menu_ *w, void *d) {
Fl_Menu_Item *m = getMenuItem(((Fl_Menu_*)w)->mvalue()->label(), alt_menu_);
progStatus.DOCKEDSCOPE = m->value();
wf->show_scope(progStatus.DOCKEDSCOPE);
}
#define defwidget 0, 0, 10, 10, ""
void noop_controls() // create and then hide all controls not being used
{
Fl_Double_Window *dummywindow = new Fl_Double_Window(0,0,100,100,"");
btnMacroTimer = new Fl_Button(defwidget); btnMacroTimer->hide();
ReceiveText = new FTextRX(0,0,100,100); ReceiveText->hide();
TransmitText = new FTextTX(0,0,100,100); TransmitText->hide();
FHdisp = new Raster(0,0,10,100); FHdisp->hide();
for (int i = 0; i < NUMMACKEYS * NUMKEYROWS; i++) {
btnMacro[i] = new Fl_Button(defwidget); btnMacro[i]->hide();
}
for (int i = 0; i < 48; i++) {
btnDockMacro[i] = new Fl_Button(defwidget); btnDockMacro[i]->hide();
}
inpQth = new Fl_Input2(defwidget); inpQth->hide();
inpLoc1 = new Fl_Input2(defwidget); inpLoc1->hide();
inpState1 = new Fl_Input2(defwidget); inpState1->hide();
cboCountryQSO = new Fl_ComboBox(defwidget); cboCountryQSO->end();
cboCountryQSO->hide();
cboCountyQSO = new Fl_ComboBox(defwidget); cboCountyQSO->hide();
cboCountyQSO->hide();
inpSerNo = new Fl_Input2(defwidget); inpSerNo->hide();
outSerNo = new Fl_Input2(defwidget); outSerNo->hide();
inpXchgIn = new Fl_Input2(defwidget); inpXchgIn->hide();
inpVEprov = new Fl_Input2(defwidget); inpVEprov->hide();
inpNotes = new Fl_Input2(defwidget); inpNotes->hide();
inpAZ = new Fl_Input2(defwidget); inpAZ->hide();
qsoTime = new Fl_Button(defwidget); qsoTime->hide();
btnQRZ = new Fl_Button(defwidget); btnQRZ->hide();
qsoClear = new Fl_Button(defwidget); qsoClear->hide();
qsoSave = new Fl_Button(defwidget); qsoSave->hide();
qsoFreqDisp = new cFreqControl(0,0,80,20,""); qsoFreqDisp->hide();
qso_opMODE = new Fl_ListBox(defwidget); qso_opMODE->hide();
qso_opBW = new Fl_ListBox(defwidget); qso_opBW->hide();
qso_opPICK = new Fl_Button(defwidget); qso_opPICK->hide();
qso_opGROUP = new Fl_Group(defwidget); qso_opGROUP->hide();
inpFreq = new Fl_Input2(defwidget); inpFreq->hide();
inpTimeOff = new Fl_Input2(defwidget); inpTimeOff->hide();
inpTimeOn = new Fl_Input2(defwidget); inpTimeOn->hide();
btnTimeOn = new Fl_Button(defwidget); btnTimeOn->hide();
inpCall = new Fl_Input2(defwidget); inpCall->hide();
inpName = new Fl_Input2(defwidget); inpName->hide();
inpRstIn = new Fl_Input2(defwidget); inpRstIn->hide();
inpRstOut = new Fl_Input2(defwidget); inpRstOut->hide();
inpFreq1 = new Fl_Input2(defwidget); inpFreq1->hide();
inpTimeOff1 = new Fl_Input2(defwidget); inpTimeOff1->hide();
inpTimeOn1 = new Fl_Input2(defwidget); inpTimeOn1->hide();
btnTimeOn1 = new Fl_Button(defwidget); btnTimeOn1->hide();
inpCall1 = new Fl_Input2(defwidget); inpCall1->hide();
inpName1 = new Fl_Input2(defwidget); inpName1->hide();
inpRstIn1 = new Fl_Input2(defwidget); inpRstIn1->hide();
inpRstOut1 = new Fl_Input2(defwidget); inpRstOut1->hide();
inpXchgIn1 = new Fl_Input2(defwidget); inpXchgIn1->hide();
outSerNo1 = new Fl_Input2(defwidget); outSerNo1->hide();
inpSerNo1 = new Fl_Input2(defwidget); inpSerNo1->hide();
qsoFreqDisp1 = new cFreqControl(0,0,80,20,""); qsoFreqDisp1->hide();
inp_FD_class1 = new Fl_Input2(defwidget); inp_FD_class1->hide();
inp_FD_class2 = new Fl_Input2(defwidget); inp_FD_class2->hide();
inp_FD_section1 = new Fl_Input2(defwidget); inp_FD_section1->hide();
inp_FD_section2 = new Fl_Input2(defwidget); inp_FD_section2->hide();
inp_KD_name2 = new Fl_Input2(defwidget); inp_KD_name2->hide();
inp_KD_age1 = new Fl_Input2(defwidget); inp_KD_age1->hide();
inp_KD_age2 = new Fl_Input2(defwidget); inp_KD_age2->hide();
inp_KD_state1 = new Fl_Input2(defwidget); inp_KD_state1->hide();
inp_KD_state2 = new Fl_Input2(defwidget); inp_KD_state2->hide();
inp_KD_VEprov1 = new Fl_Input2(defwidget); inp_KD_VEprov1->hide();
inp_KD_VEprov2 = new Fl_Input2(defwidget); inp_KD_VEprov2->hide();
inp_KD_XchgIn1 = new Fl_Input2(defwidget); inp_KD_XchgIn1->hide();
inp_KD_XchgIn2 = new Fl_Input2(defwidget); inp_KD_XchgIn2->hide();
inp_1010_XchgIn1 = new Fl_Input2(defwidget); inp_1010_XchgIn1->hide();
inp_1010_XchgIn2 = new Fl_Input2(defwidget); inp_1010_XchgIn2->hide();
inp_1010_nr1 = new Fl_Input2(defwidget); inp_1010_nr1->hide();
inp_1010_nr2 = new Fl_Input2(defwidget); inp_1010_nr2->hide();
inp_1010_name2 = new Fl_Input2(defwidget); inp_1010_name2->hide();
inp_ARR_Name2 = new Fl_Input2(defwidget); inp_ARR_Name2->hide();
inp_ARR_XchgIn1 = new Fl_Input2(defwidget); inp_ARR_XchgIn1->hide();
inp_ARR_XchgIn2 = new Fl_Input2(defwidget); inp_ARR_XchgIn2->hide();
inp_ARR_check1 = new Fl_Input2(defwidget); inp_ARR_check1->hide();
inp_ARR_check2 = new Fl_Input2(defwidget); inp_ARR_check2->hide();
inp_vhf_Loc1 = new Fl_Input2(defwidget); inp_vhf_Loc1->hide();
inp_vhf_Loc2 = new Fl_Input2(defwidget); inp_vhf_Loc2->hide();
inp_vhf_RSTin1 = new Fl_Input2(defwidget); inp_vhf_RSTin1->hide();
inp_vhf_RSTin2 = new Fl_Input2(defwidget); inp_vhf_RSTin2->hide();
inp_vhf_RSTout1 = new Fl_Input2(defwidget); inp_vhf_RSTout1->hide();
inp_vhf_RSTout2 = new Fl_Input2(defwidget); inp_vhf_RSTout2->hide();
inp_CQ_RSTin2 = new Fl_Input2(defwidget); inp_CQ_RSTin2->hide();
inp_CQ_RSTout2 = new Fl_Input2(defwidget); inp_CQ_RSTout2->hide();
inp_CQstate1 = new Fl_Input2(defwidget); inp_CQstate1->hide();
inp_CQstate2 = new Fl_Input2(defwidget); inp_CQstate2->hide();
inp_CQzone1 = new Fl_Input2(defwidget); inp_CQzone1->hide();
inp_CQzone2 = new Fl_Input2(defwidget); inp_CQzone2->hide();
cboCountryCQ2 = new Fl_ComboBox(defwidget); cboCountryCQ2->end();
cboCountryCQ2->hide();
inp_CQDX_RSTin2 = new Fl_Input2(defwidget); inp_CQDX_RSTin2->hide();
inp_CQDX_RSTout2 = new Fl_Input2(defwidget); inp_CQDX_RSTout2->hide();
cboCountryCQDX2 = new Fl_ComboBox(defwidget); cboCountryCQDX2->end();
cboCountryCQDX2->hide();
inp_CQDXzone1 = new Fl_Input2(defwidget); inp_CQDXzone1->hide();
inp_CQDXzone2 = new Fl_Input2(defwidget); inp_CQDXzone2->hide();
inpTimeOff2 = new Fl_Input2(defwidget); inpTimeOff2->hide();
inpTimeOn2 = new Fl_Input2(defwidget); inpTimeOn2->hide();
btnTimeOn2 = new Fl_Button(defwidget); btnTimeOn2->hide();
inpCall2 = new Fl_Input2(defwidget); inpCall2->hide();
inpName2 = new Fl_Input2(defwidget); inpName2->hide();
inpRstIn2 = new Fl_Input2(defwidget); inpRstIn2->hide();
inpRstOut2 = new Fl_Input2(defwidget); inpRstOut2->hide();
qsoFreqDisp2 = new cFreqControl(0,0,80,20,""); qsoFreqDisp2->hide();
qso_opPICK2 = new Fl_Button(defwidget); qso_opPICK2->hide();
qsoClear2 = new Fl_Button(defwidget); qsoClear2->hide();
qsoSave2 = new Fl_Button(defwidget); qsoSave2->hide();
btnQRZ2 = new Fl_Button(defwidget); btnQRZ2->hide();
inpTimeOff3 = new Fl_Input2(defwidget); inpTimeOff3->hide();
inpTimeOn3 = new Fl_Input2(defwidget); inpTimeOn3->hide();
btnTimeOn3 = new Fl_Button(defwidget); btnTimeOn3->hide();
inpCall3 = new Fl_Input2(defwidget); inpCall3->hide();
outSerNo2 = new Fl_Input2(defwidget); outSerNo2->hide();
inpSerNo2 = new Fl_Input2(defwidget); inpSerNo2->hide();
inpXchgIn2 = new Fl_Input2(defwidget); inpXchgIn2->hide();
qsoFreqDisp3 = new cFreqControl(0,0,80,20,""); qsoFreqDisp3->hide();
inpTimeOff4 = new Fl_Input2(defwidget); inpTimeOff4->hide();
inpTimeOn4 = new Fl_Input2(defwidget); inpTimeOn4->hide();
btnTimeOn4 = new Fl_Button(defwidget); btnTimeOn4->hide();
inpTimeOff5 = new Fl_Input2(defwidget); inpTimeOff5->hide();
inpTimeOn5 = new Fl_Input2(defwidget); inpTimeOn5->hide();
btnTimeOn5 = new Fl_Button(defwidget); btnTimeOn5->hide();
outSerNo3 = new Fl_Input2(defwidget); outSerNo3->hide();
inp_SS_SerialNoR1 = new Fl_Input2(defwidget); inp_SS_SerialNoR1->hide();
inp_SS_Precedence1 = new Fl_Input2(defwidget); inp_SS_Precedence1->hide();
inp_SS_Check1 = new Fl_Input2(defwidget); inp_SS_Check1->hide();
inp_SS_Section1 = new Fl_Input2(defwidget); inp_SS_Section1->hide();
outSerNo4 = new Fl_Input2(defwidget); outSerNo4->hide();
inp_SS_SerialNoR2 = new Fl_Input2(defwidget); inp_SS_SerialNoR2->hide();
inp_SS_Precedence2 = new Fl_Input2(defwidget); inp_SS_Precedence2->hide();
inp_SS_Check2 = new Fl_Input2(defwidget); inp_SS_Check2->hide();
inp_SS_Section2 = new Fl_Input2(defwidget); inp_SS_Section2->hide();
inp_ASCR_class1 = new Fl_Input2(defwidget); inp_ASCR_class1->hide();
inp_ASCR_XchgIn1 = new Fl_Input2(defwidget); inp_ASCR_XchgIn1->hide();
inp_ASCR_name2 = new Fl_Input2(defwidget); inp_ASCR_name2->hide();
inp_ASCR_class2 = new Fl_Input2(defwidget); inp_ASCR_class2->hide();
inp_ASCR_XchgIn2 = new Fl_Input2(defwidget); inp_ASCR_XchgIn2->hide();
inp_ASCR_RSTin2 = new Fl_Input2(defwidget); inp_ASCR_RSTin2->hide();
inp_ASCR_RSTout2 = new Fl_Input2(defwidget); inp_ASCR_RSTout2->hide();
inpNAQPname2 = new Fl_Input2(defwidget); inpNAQPname2->hide();
inpSPCnum_NAQP1 = new Fl_Input2(defwidget); inpSPCnum_NAQP1->hide();
inpSPCnum_NAQP2 = new Fl_Input2(defwidget); inpSPCnum_NAQP2->hide();
inpRTU_stpr1 = new Fl_Input2(defwidget); inpRTU_stpr1->hide();
inpRTU_serno1 = new Fl_Input2(defwidget); inpRTU_serno1->hide();
inpRTU_RSTin2 = new Fl_Input2(defwidget); inpRTU_RSTin2->hide();
inpRTU_RSTout2 = new Fl_Input2(defwidget); inpRTU_RSTout2->hide();
inpRTU_stpr2 = new Fl_Input2(defwidget); inpRTU_stpr2->hide();
inpRTU_serno2 = new Fl_Input2(defwidget); inpRTU_serno2->hide();
cboCountryRTU2 = new Fl_ComboBox(defwidget); cboCountryRTU2->end();
cboCountryRTU2->hide();
inp_IARI_PR1 = new Fl_Input2(defwidget); inp_IARI_PR1->hide();
inp_IARI_RSTin2 = new Fl_Input2(defwidget); inp_IARI_RSTin2->hide();
inp_IARI_RSTout2 = new Fl_Input2(defwidget); inp_IARI_RSTout2->hide();
out_IARI_SerNo1 = new Fl_Input2(defwidget); out_IARI_SerNo1->hide();
inp_IARI_SerNo1 = new Fl_Input2(defwidget); inp_IARI_SerNo1->hide();
out_IARI_SerNo2 = new Fl_Input2(defwidget); out_IARI_SerNo2->hide();
inp_IARI_SerNo2 = new Fl_Input2(defwidget); inp_IARI_SerNo2->hide();
inp_IARI_PR2 = new Fl_Input2(defwidget); inp_IARI_PR2->hide();
cboCountryIARI2 = new Fl_ComboBox(defwidget); cboCountryIARI2->end();
cboCountryIARI2->hide();
outSerNo5 = new Fl_Input2(defwidget); outSerNo4->hide();
inp_ser_NAS1 = new Fl_Input2(defwidget); inp_ser_NAS1->hide();
inpSPCnum_NAS1 = new Fl_Input2(defwidget); inpSPCnum_NAS1->hide();
outSerNo6 = new Fl_Input2(defwidget); outSerNo5->hide();
inp_ser_NAS2 = new Fl_Input2(defwidget); inp_ser_NAS2->hide();
inpSPCnum_NAS2 = new Fl_Input2(defwidget); inpSPCnum_NAS2->hide();
inp_name_NAS2 = new Fl_Input2(defwidget); inp_name_NAS2->hide();
outSerNo7 = new Fl_Input2(defwidget); outSerNo7->hide();
inpSerNo3 = new Fl_Input2(defwidget); inpSerNo3->hide();
cboCountryAIDX2 = new Fl_ComboBox(defwidget); cboCountryAIDX2->end();
cboCountryAIDX2->hide();
inpRstIn3 = new Fl_Input2(defwidget); inpRstIn3->hide();
inpRstOut3 = new Fl_Input2(defwidget); inpRstOut3->hide();
outSerNo8 = new Fl_Input2(defwidget); outSerNo8->hide();
inpSerNo4 = new Fl_Input2(defwidget); inpSerNo4->hide();
inp_JOTA_troop1 = new Fl_Input2(defwidget); inp_JOTA_troop1->hide();
inp_JOTA_troop2 = new Fl_Input2(defwidget); inp_JOTA_troop2->hide();
inp_JOTA_scout1 = new Fl_Input2(defwidget); inp_JOTA_scout1->hide();
inp_JOTA_scout2 = new Fl_Input2(defwidget); inp_JOTA_scout2->hide();
inp_JOTA_spc1 = new Fl_Input2(defwidget); inp_JOTA_spc1->hide();
inp_JOTA_spc2 = new Fl_Input2(defwidget); inp_JOTA_spc2->hide();
inpSPCnum_AICW1 = new Fl_Input2(defwidget); inpSPCnum_AICW1->hide();
inpSPCnum_AICW2 = new Fl_Input2(defwidget); inpSPCnum_AICW2->hide();
inpRstIn_AICW2 = new Fl_Input2(defwidget); inpRstIn_AICW2->hide();
inpRstOut_AICW2 = new Fl_Input2(defwidget); inpRstOut_AICW2->hide();
inpSQSO_state1 = new Fl_Input2(defwidget); inpSQSO_state1->hide();
inpSQSO_state2 = new Fl_Input2(defwidget); inpSQSO_state2->hide();
inpSQSO_county1 = new Fl_Input2(defwidget); inpSQSO_county1->hide();
inpSQSO_county2 = new Fl_Input2(defwidget); inpSQSO_county2->hide();
inpSQSO_serno1 = new Fl_Input2(defwidget); inpSQSO_serno1->hide();
inpSQSO_serno2 = new Fl_Input2(defwidget); inpSQSO_serno2->hide();
outSQSO_serno1 = new Fl_Input2(defwidget); outSQSO_serno1->hide();
outSQSO_serno2 = new Fl_Input2(defwidget); outSQSO_serno2->hide();
inpSQSO_name2 = new Fl_Input2(defwidget); inpSQSO_name2->hide();
inpRstIn_SQSO2 = new Fl_Input2(defwidget); inpRstIn_SQSO2->hide();
inpRstOut_SQSO2 = new Fl_Input2(defwidget); inpRstOut_SQSO2->hide();
inpSQSO_category1 = new Fl_Input2(defwidget); inpSQSO_category1->hide();
inpSQSO_category2 = new Fl_Input2(defwidget); inpSQSO_category2->hide();
inpSerNo_WPX1 = new Fl_Input2(defwidget); inpSerNo_WPX1->hide();
outSerNo_WPX1 = new Fl_Input2(defwidget); outSerNo_WPX1->hide();
inpSerNo_WPX2 = new Fl_Input2(defwidget); inpSerNo_WPX2->hide();
outSerNo_WPX2 = new Fl_Input2(defwidget); outSerNo_WPX2->hide();
inpRstIn_WPX2 = new Fl_Input2(defwidget); inpRstIn_WPX2->hide();
inpRstOut_WPX2 = new Fl_Input2(defwidget); inpRstOut_WPX2->hide();
inpSerNo_WAE1 = new Fl_Input2(defwidget); inpSerNo_WAE1->hide();
inpSerNo_WAE2 = new Fl_Input2(defwidget); inpSerNo_WAE2->hide();
outSerNo_WAE1 = new Fl_Input2(defwidget); outSerNo_WAE1->hide();
outSerNo_WAE2 = new Fl_Input2(defwidget); outSerNo_WAE2->hide();
inpRstIn_WAE2 = new Fl_Input2(defwidget); inpRstIn_WAE2->hide();
inpRstOut_WAE2 = new Fl_Input2(defwidget); inpRstOut_WAE2->hide();
cboCountryWAE2 = new Fl_ComboBox(defwidget); cboCountryWAE2->end();
cboCountryWAE2->hide();
qso_opPICK3 = new Fl_Button(defwidget); qso_opPICK3->hide();
qsoClear3 = new Fl_Button(defwidget); qsoClear3->hide();
qsoSave3 = new Fl_Button(defwidget); qsoSave3->hide();
inpCall4 = new Fl_Input2(defwidget); inpCall4->hide();
qso_opBrowser = new Fl_Browser(defwidget); qso_opBrowser->hide();
qso_btnAddFreq = new Fl_Button(defwidget); qso_btnAddFreq->hide();
qso_btnSelFreq = new Fl_Button(defwidget); qso_btnSelFreq->hide();
qso_btnDelFreq = new Fl_Button(defwidget); qso_btnDelFreq->hide();
qso_btnClearList = new Fl_Button(defwidget); qso_btnClearList->hide();
qso_btnAct = new Fl_Button(defwidget); qso_btnAct->hide();
qso_inpAct = new Fl_Input2(defwidget); qso_inpAct->hide();
pwrmeter = new PWRmeter(defwidget); pwrmeter->hide();
smeter = new Smeter(defwidget); smeter->hide();
pwr_level = new Fl_Value_Slider2(defwidget); pwr_level->hide();
set_pwr_level = new Fl_Button(defwidget); set_pwr_level->hide();
dummywindow->end();
dummywindow->hide();
}
void make_scopeviewer()
{
scopeview = new Fl_Double_Window(0,0,140,140, _("Scope"));
scopeview->xclass(PACKAGE_NAME);
digiscope = new Digiscope (0, 0, 140, 140);
scopeview->resizable(digiscope);
scopeview->size_range(SCOPEWIN_MIN_WIDTH, SCOPEWIN_MIN_HEIGHT);
scopeview->end();
scopeview->hide();
}
static int WF_only_height = 0;
void create_fl_digi_main_WF_only() {
int fnt = fl_font();
int fsize = fl_size();
int freqheight = Hentry + 2 * pad;
int Y = 0;
int W = progStatus.mainW;
fl_font(fnt, freqheight);
fl_font(fnt, fsize);
IMAGE_WIDTH = 4000;
Hwfall = progdefaults.wfheight;
Wwfall = W - 2 * DEFAULT_SW - 2 * pad;
WF_only_height = Hmenu + Hwfall + Hstatus + 4 * pad;
fl_digi_main = new Fl_Double_Window(W, WF_only_height);
mnuFrame = new Fl_Group(0, 0, W, Hmenu);
mnu = new Fl_Menu_Bar(0, 0, W - 275 - pad, Hmenu);
// do some more work on the menu
for (size_t i = 0; i < sizeof(alt_menu_)/sizeof(alt_menu_[0]); i++) {
// FL_NORMAL_SIZE may have changed; update the menu items
if (alt_menu_[i].text) {
alt_menu_[i].labelsize_ = FL_NORMAL_SIZE;
}
// set the icon label for items with the multi label type
if (alt_menu_[i].labeltype() == _FL_MULTI_LABEL)
icons::set_icon_label(&alt_menu_[i]);
}
mnu->menu(alt_menu_);
tx_timer = new Fl_Box(W - 275 - pad, 0, 75 - pad, Hmenu, "");
tx_timer->box(FL_UP_BOX);
tx_timer->color(FL_BACKGROUND_COLOR);
tx_timer->labelcolor(FL_BACKGROUND_COLOR);
btnAutoSpot = new Fl_Light_Button(W - 200 - pad, 0, 50, Hmenu, "Spot");
btnAutoSpot->selection_color(progdefaults.SpotColor);
btnAutoSpot->callback(cbAutoSpot, 0);
btnAutoSpot->deactivate();
btnRSID = new Fl_Light_Button(W - 150 - pad, 0, 50, Hmenu, "RxID");
btnRSID->tooltip("Receive RSID");
btnRSID->value(progdefaults.rsid);
btnRSID->callback(cbRSID, 0);
btnTxRSID = new Fl_Light_Button(W - 100 - pad, 0, 50, Hmenu, "TxID");
btnTxRSID->selection_color(progdefaults.TxIDColor);
btnTxRSID->tooltip("Transmit RSID");
btnTxRSID->callback(cbTxRSID, 0);
btnTune = new Fl_Light_Button(W - 50 - pad, 0, 50, Hmenu, "TUNE");
btnTune->selection_color(progdefaults.TuneColor);
btnTune->callback(cbTune, 0);
mnuFrame->resizable(mnu);
mnuFrame->end();
Y = Hmenu + pad;
wf_group = new Fl_Group(0, Y, W, Hwfall);
wf = new waterfall(0, Y, Wwfall, Hwfall);
wf->end();
pgrsSquelch = new Progress(
rightof(wf), Y + pad,
DEFAULT_SW, Hwfall - 2 * pad,
"");
pgrsSquelch->color(FL_BACKGROUND2_COLOR, FL_DARK_GREEN);
pgrsSquelch->type(Progress::VERTICAL);
pgrsSquelch->tooltip(_("Detected signal level"));
sldrSquelch = new Fl_Slider2(
rightof(pgrsSquelch), Y + pad,
DEFAULT_SW, Hwfall - 2 * pad,
"");
sldrSquelch->minimum(100);
sldrSquelch->maximum(0);
sldrSquelch->step(1);
sldrSquelch->value(progStatus.sldrSquelchValue);
sldrSquelch->callback((Fl_Callback*)cb_sldrSquelch);
sldrSquelch->color(FL_INACTIVE_COLOR);
sldrSquelch->tooltip(_("Squelch level"));
Fl_Group::current()->resizable(wf);
wf_group->end();
Y += (Hwfall + pad);
status_group = new Fl_Group(0, Y, W, Hstatus);
MODEstatus = new Fl_Button(
0, Y,
Wmode, Hstatus, "");
MODEstatus->box(FL_DOWN_BOX);
MODEstatus->color(FL_BACKGROUND2_COLOR);
MODEstatus->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
MODEstatus->callback(status_cb, (void *)0);
MODEstatus->when(FL_WHEN_CHANGED);
MODEstatus->tooltip(_("Left click: change mode\nRight click: configure"));
cntCW_WPM = new Fl_Counter2(
rightof(MODEstatus), Y,
Ws2n - Hstatus, Hstatus, "");
cntCW_WPM->callback(cb_cntCW_WPM);
cntCW_WPM->minimum(progdefaults.CWlowerlimit);
cntCW_WPM->maximum(progdefaults.CWupperlimit);
cntCW_WPM->value(progdefaults.CWspeed);
cntCW_WPM->tooltip(_("CW transmit WPM"));
cntCW_WPM->type(1);
cntCW_WPM->step(1);
cntCW_WPM->hide();
btnCW_Default = new Fl_Button(
rightof(cntCW_WPM), Y,
Hstatus, Hstatus, "*");
btnCW_Default->callback(cb_btnCW_Default);
btnCW_Default->tooltip(_("Default WPM"));
btnCW_Default->hide();
Status1 = new Fl_Box(
rightof(MODEstatus), Y,
Ws2n, Hstatus, "");
Status1->box(FL_DOWN_BOX);
Status1->color(FL_BACKGROUND2_COLOR);
Status1->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
Status2 = new Fl_Box(
rightof(Status1), Y,
Wimd, Hstatus, "");
Status2->box(FL_DOWN_BOX);
Status2->color(FL_BACKGROUND2_COLOR);
Status2->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
StatusBar = new status_box(
rightof(Status2), Y,
W - rightof(Status2)
- bwAfcOnOff - bwSqlOnOff
- Wwarn - bwTxLevel
- bwSqlOnOff
- cbwidth,
Hstatus, "");
StatusBar->box(FL_DOWN_BOX);
StatusBar->color(FL_BACKGROUND2_COLOR);
StatusBar->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
StatusBar->callback((Fl_Callback *)StatusBar_cb);
StatusBar->when(FL_WHEN_RELEASE_ALWAYS);
StatusBar->tooltip(_("Left click to toggle VuMeter"));
StatusBar->show();
VuMeter = new vumeter(StatusBar->x(), StatusBar->y(), StatusBar->w(), StatusBar->h(), "" );
VuMeter->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
VuMeter->when(FL_WHEN_RELEASE_ALWAYS);
VuMeter->tooltip(_("Left click to toggle Status Bar"));
VuMeter->callback((Fl_Callback *)VuMeter_cb);
cntTxLevel = new Fl_Counter2(
rightof(StatusBar), Y,
bwTxLevel, Hstatus, "");
cntTxLevel->minimum(-30);
cntTxLevel->maximum(0);
cntTxLevel->value(-6);
cntTxLevel->callback((Fl_Callback*)cb_cntTxLevel);
cntTxLevel->value(progStatus.txlevel);
cntTxLevel->lstep(1.0);
cntTxLevel->tooltip(_("Tx level attenuator (dB)"));
WARNstatus = new Fl_Box(
rightof(cntTxLevel), Y,
Wwarn, Hstatus, "");
WARNstatus->box(FL_DIAMOND_DOWN_BOX);
WARNstatus->color(FL_BACKGROUND_COLOR);
WARNstatus->labelcolor(FL_RED);
WARNstatus->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
btnAFC = new Fl_Light_Button(
rightof(WARNstatus), Y,
bwAfcOnOff, Hstatus, "AFC");
btnAFC->selection_color(progdefaults.AfcColor);
btnSQL = new Fl_Light_Button(
rightof(btnAFC), Y,
bwSqlOnOff, Hstatus, "SQL");
// btnPSQL will be resized later depending on the state of the
// configuration parameter to show that widget
btnPSQL = new Fl_Light_Button(
rightof(btnSQL), Y,
bwSqlOnOff, Hstatus, "PSM");
btnAFC->callback(cbAFC, 0);
btnAFC->value(1);
btnAFC->tooltip(_("Automatic Frequency Control"));
btnSQL->callback(cbSQL, 0);
btnSQL->selection_color(progdefaults.Sql1Color);
btnSQL->value(1);
btnSQL->tooltip(_("Squelch"));
btnPSQL->selection_color(progdefaults.Sql1Color);
btnPSQL->callback(cbPwrSQL, 0);
btnPSQL->value(progdefaults.kpsql_enabled);
btnPSQL->tooltip(_("Power Signal Monitor"));
Fl_Group::current()->resizable(VuMeter);
status_group->end();
Fl::add_handler(wo_default_handler);
fl_digi_main->end();
fl_digi_main->callback(cb_wMain);
fl_digi_main->resizable(wf);
const struct {
bool var; const char* label;
} toggles[] = {
{ progStatus.DOCKEDSCOPE, DOCKEDSCOPE_MLABEL }
};
Fl_Menu_Item* toggle;
for (size_t i = 0; i < sizeof(toggles)/sizeof(*toggles); i++) {
if (toggles[i].var && (toggle = getMenuItem(toggles[i].label, alt_menu_))) {
toggle->set();
if (toggle->callback()) {
mnu->value(toggle);
toggle->do_callback(reinterpret_cast<Fl_Widget*>(mnu));
}
}
}
make_scopeviewer();
noop_controls();
progdefaults.WF_UIwfcarrier =
progdefaults.WF_UIwfreflevel =
progdefaults.WF_UIwfampspan =
progdefaults.WF_UIwfmode =
progdefaults.WF_UIx1 =
progdefaults.WF_UIwfshift =
progdefaults.WF_UIrev =
progdefaults.WF_UIwfstore =
progdefaults.WF_UIxmtlock =
progdefaults.WF_UIwfdrop =
progdefaults.WF_UIqsy = true;
wf->UI_select(true);
load_counties();
createConfig();
createRecordLoader();
if (rx_only) {
btnTune->deactivate();
wf->xmtrcv->deactivate();
}
UI_select();
}
void create_fl_digi_main(int argc, char** argv)
{
if (bWF_only)
create_fl_digi_main_WF_only();
else
create_fl_digi_main_primary();
#if defined(__WOE32__)
# ifndef IDI_ICON
# define IDI_ICON 101
# endif
fl_digi_main->icon((char*)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON)));
#elif !defined(__APPLE__) && USE_X
make_pixmap(&fldigi_icon_pixmap, fldigi_icon, argc, argv);
fl_digi_main->icon((char *)fldigi_icon_pixmap);
#endif
fl_digi_main->xclass(PACKAGE_NAME);
if (bWF_only) {
fl_digi_main->size_range(WMIN, WF_only_height, 0, WF_only_height);
wf->setQSY(false);
} else
fl_digi_main->size_range(WMIN, main_hmin, 0, 0);
set_colors();
}
void put_freq(double frequency)
{
wf->carrier((int)floor(frequency + 0.5));
}
void put_Bandwidth(int bandwidth)
{
wf->Bandwidth ((int)bandwidth);
}
void callback_set_metric(double metric)
{
pgrsSquelch->value(metric);
if (active_modem->get_mode() == MODE_FSQ)
ind_fsq_s2n->value(metric);
if (active_modem->get_mode() == MODE_IFKP)
ifkp_s2n_progress->value(metric);
if (progdefaults.show_psm_btn && progStatus.kpsql_enabled) {
if ((metric >= progStatus.sldrPwrSquelchValue) || inhibit_tx_seconds)
btnPSQL->selection_color(progdefaults.Sql2Color);
else
btnPSQL->selection_color(progdefaults.Sql1Color);
btnPSQL->redraw_label();
} else if(progStatus.sqlonoff) {
if (metric < progStatus.sldrSquelchValue)
btnSQL->selection_color(progdefaults.Sql1Color);
else
btnSQL->selection_color(progdefaults.Sql2Color);
btnSQL->redraw_label();
}
}
void put_cwRcvWPM(double wpm)
{
int U = progdefaults.CWupperlimit;
int L = progdefaults.CWlowerlimit;
double dWPM = 100.0*(wpm - L)/(U - L);
REQ_DROP(static_cast<void (Fl_Progress::*)(float)>(&Fl_Progress::value), prgsCWrcvWPM, dWPM);
REQ_DROP(static_cast<int (Fl_Value_Output::*)(double)>(&Fl_Value_Output::value), valCWrcvWPM, (int)wpm);
}
void set_scope_mode(Digiscope::scope_mode md)
{
if (digiscope) {
digiscope->mode(md);
REQ(&Fl_Window::size_range, scopeview, SCOPEWIN_MIN_WIDTH, SCOPEWIN_MIN_HEIGHT,
0, 0, 0, 0, (md == Digiscope::PHASE || md == Digiscope::XHAIRS));
}
wf->wfscope->mode(md);
if (md == Digiscope::SCOPE) set_scope_clear_axis();
}
void set_scope(double *data, int len, bool autoscale)
{
if (digiscope)
digiscope->data(data, len, autoscale);
wf->wfscope->data(data, len, autoscale);
}
void set_phase(double phase, double quality, bool highlight)
{
if (digiscope)
digiscope->phase(phase, quality, highlight);
wf->wfscope->phase(phase, quality, highlight);
}
void set_rtty(double flo, double fhi, double amp)
{
if (digiscope)
digiscope->rtty(flo, fhi, amp);
wf->wfscope->rtty(flo, fhi, amp);
}
void set_video(double *data, int len, bool dir)
{
if (digiscope)
digiscope->video(data, len, dir);
wf->wfscope->video(data, len, dir);
}
void set_zdata(cmplx *zarray, int len)
{
if (digiscope)
digiscope->zdata(zarray, len);
wf->wfscope->zdata(zarray, len);
}
void set_scope_xaxis_1(double y1)
{
if (digiscope)
digiscope->xaxis_1(y1);
wf->wfscope->xaxis_1(y1);
}
void set_scope_xaxis_2(double y2)
{
if (digiscope)
digiscope->xaxis_2(y2);
wf->wfscope->xaxis_2(y2);
}
void set_scope_yaxis_1(double x1)
{
if (digiscope)
digiscope->yaxis_1(x1);
wf->wfscope->yaxis_1(x1);
}
void set_scope_yaxis_2(double x2)
{
if (digiscope)
digiscope->yaxis_2(x2);
wf->wfscope->yaxis_2(x2);
}
void set_scope_clear_axis()
{
if (digiscope) {
digiscope->xaxis_1(0);
digiscope->xaxis_2(0);
digiscope->yaxis_1(0);
digiscope->yaxis_2(0);
}
wf->wfscope->xaxis_1(0);
wf->wfscope->xaxis_2(0);
wf->wfscope->yaxis_1(0);
wf->wfscope->yaxis_2(0);
}
// raw buffer functions can ONLY be called by FLMAIN_TID
//======================================================================
#define RAW_BUFF_LEN 4096
static char rxtx_raw_chars[RAW_BUFF_LEN+1] = "";
static char rxtx_raw_buff[RAW_BUFF_LEN+1] = "";
static int rxtx_raw_len = 0;
char *get_rxtx_data()
{
ENSURE_THREAD(FLMAIN_TID);
memset(rxtx_raw_chars, 0, RAW_BUFF_LEN+1);
strcpy(rxtx_raw_chars, rxtx_raw_buff);
memset(rxtx_raw_buff, 0, RAW_BUFF_LEN+1);
rxtx_raw_len = 0;
return rxtx_raw_chars;
}
void add_rxtx_char(int data)
{
ENSURE_THREAD(FLMAIN_TID);
if (rxtx_raw_len == RAW_BUFF_LEN) {
memset(rxtx_raw_buff, 0, RAW_BUFF_LEN+1);
rxtx_raw_len = 0;
}
rxtx_raw_buff[rxtx_raw_len++] = (unsigned char)data;
}
//======================================================================
static char rx_raw_chars[RAW_BUFF_LEN+1] = "";
static char rx_raw_buff[RAW_BUFF_LEN+1] = "";
static int rx_raw_len = 0;
static pthread_mutex_t rx_data_mutex = PTHREAD_MUTEX_INITIALIZER;
char *get_rx_data()
{
// ENSURE_THREAD(FLMAIN_TID);
guard_lock datalock(&rx_data_mutex);
memset(rx_raw_chars, 0, RAW_BUFF_LEN+1);
strcpy(rx_raw_chars, rx_raw_buff);
memset(rx_raw_buff, 0, RAW_BUFF_LEN+1);
rx_raw_len = 0;
return rx_raw_chars;
}
void add_rx_char(int data)
{
// ENSURE_THREAD(FLMAIN_TID);
guard_lock datalock(&rx_data_mutex);
add_rxtx_char(data);
if (rx_raw_len == RAW_BUFF_LEN) {
memset(rx_raw_buff, 0, RAW_BUFF_LEN+1);
rx_raw_len = 0;
}
rx_raw_buff[rx_raw_len++] = (unsigned char)data;
}
//======================================================================
static char tx_raw_chars[RAW_BUFF_LEN+1] = "";
static char tx_raw_buff[RAW_BUFF_LEN+1] = "";
static int tx_raw_len = 0;
char *get_tx_data()
{
ENSURE_THREAD(FLMAIN_TID);
memset(tx_raw_chars, 0, RAW_BUFF_LEN+1);
strcpy(tx_raw_chars, tx_raw_buff);
memset(tx_raw_buff, 0, RAW_BUFF_LEN+1);
tx_raw_len = 0;
return tx_raw_chars;
}
void add_tx_char(int data)
{
ENSURE_THREAD(FLMAIN_TID);
add_rxtx_char(data);
if (tx_raw_len == RAW_BUFF_LEN) {
memset(tx_raw_buff, 0, RAW_BUFF_LEN+1);
tx_raw_len = 0;
}
tx_raw_buff[tx_raw_len++] = (unsigned char)data;
}
//======================================================================
static void TTY_bell()
{
if (progdefaults.audibleBELL)
audio_alert->alert(progdefaults.BELL_RING);
}
static void display_rx_data(const unsigned char data, int style)
{
if (data != '\r') {
if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add(data,style);
else if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add(data,style);
else
ReceiveText->add(data, style);
}
if (bWF_only) return;
speak(data);
if (Maillogfile)
Maillogfile->log_to_file(cLogfile::LOG_RX, std::string(1, (const char)data));
if (progStatus.LOGenabled)
logfile->log_to_file(cLogfile::LOG_RX, std::string(1, (const char)data));
}
static void rx_parser(const unsigned char data, int style)
{
// assign a style to the incoming data
if (extract_wrap || extract_flamp)
style = FTextBase::RECV;
if ((data < ' ') && iscntrl(data))
style = FTextBase::CTRL;
if (wf->tmp_carrier())
style = FTextBase::ALTR;
// Collapse the "\r\n" sequence into "\n".
//
// The 'data' variable possibly contains only a part of a multi-byte
// UTF-8 character. This is not a problem. All data has passed
// through a distiller before we got here, so we can be sure that
// the input is valid UTF-8. All bytes of a multi-byte character
// will therefore have the eight bit set and can not match either
// '\r' or '\n'.
static unsigned int lastdata = 0;
if (data == '\n' && lastdata == '\r');
else if (data == '\r') {
display_rx_data('\n', style);
} else {
display_rx_data(data, style);
}
lastdata = data;
if (!(data < ' ' && iscntrl(data)) && progStatus.spot_recv)
spot_recv(data);
}
static void put_rx_char_flmain(unsigned int data, int style)
{
ENSURE_THREAD(FLMAIN_TID);
// possible destinations for the data
enum dest_type {
DEST_RECV, // ordinary received text
DEST_ALTR // alternate received text
};
static enum dest_type destination = DEST_RECV;
static enum dest_type prev_destination = DEST_RECV;
// Determine the destination of the incoming data. If the destination had
// changed, clear the contents of the distiller.
destination = (wf->tmp_carrier() ? DEST_ALTR : DEST_RECV);
if (destination != prev_destination) {
rx_chd.reset();
rx_chd.clear();
}
// select a byte translation table
trx_mode mode = active_modem->get_mode();
add_rx_char(data & 0xFF);
if (mailclient || mailserver)
rx_chd.rx((unsigned char *)ascii2[data & 0xFF]);
else if (progdefaults.show_all_codes && iscntrl(data & 0xFF))
rx_chd.rx((unsigned char *)ascii3[data & 0xFF]);
else if (mode == MODE_RTTY)
if (data == '\a') {
if (progdefaults.visibleBELL)
rx_chd.rx((unsigned char *)ascii2[7]);
REQ(TTY_bell);
} else
rx_chd.rx((unsigned char *)ascii[data & 0xFF]);
else
rx_chd.rx(data & 0xFF);
// feed the decoded data into the RX parser
if (rx_chd.data_length() > 0) {
const char *ptr = rx_chd.data().data();
const char *end = ptr + rx_chd.data_length();
while (ptr < end)
rx_parser((const unsigned char)*ptr++, style);
rx_chd.clear();
}
}
static std::string rx_process_buf = "";
static std::string tx_process_buf = "";
static pthread_mutex_t rx_proc_mutex = PTHREAD_MUTEX_INITIALIZER;
void put_rx_processed_char(unsigned int data, int style)
{
guard_lock rx_proc_lock(&rx_proc_mutex);
if(style == FTextBase::XMIT) {
tx_process_buf += (char) (data & 0xff);
} else if(style == FTextBase::RECV) {
rx_process_buf += (char) (data & 0xff);
}
}
void disp_rx_processed_char(void)
{
guard_lock rx_proc_lock(&rx_proc_mutex);
unsigned int index = 0;
if(!rx_process_buf.empty()) {
unsigned int count = rx_process_buf.size();
for(index = 0; index < count; index++)
REQ(put_rx_char_flmain, rx_process_buf[index], FTextBase::RECV);
rx_process_buf.clear();
}
if(!tx_process_buf.empty()) {
unsigned int count = tx_process_buf.size();
for(index = 0; index < count; index++)
REQ(put_rx_char_flmain, tx_process_buf[index], FTextBase::XMIT);
tx_process_buf.clear();
}
}
void put_rx_char(unsigned int data, int style)
{
#if BENCHMARK_MODE
if (!benchmark.output.empty()) {
if (unlikely(benchmark.buffer.length() + 16 > benchmark.buffer.capacity()))
benchmark.buffer.reserve(benchmark.buffer.capacity() + BUFSIZ);
benchmark.buffer += (char)data;
}
#else
if (progdefaults.autoextract == true)
rx_extract_add(data);
if (active_modem->get_mode() == MODE_FSQ) {
REQ(put_rx_char_flmain, data, style);
return;
}
switch(data_io_enabled) {
case ARQ_IO:
WriteARQ(data);
break;
case KISS_IO:
WriteKISS(data);
break;
}
if(progdefaults.ax25_decode_enabled && data_io_enabled == KISS_IO)
disp_rx_processed_char();
else
REQ(put_rx_char_flmain, data, style);
#endif
}
static std::string strSecText = "";
static void put_sec_char_flmain(char chr)
{
ENSURE_THREAD(FLMAIN_TID);
fl_font(FL_HELVETICA, FL_NORMAL_SIZE);
char s[2] = "W";
int lc = (int)ceil(fl_width(s));
int w = StatusBar->w();
int lw = (int)ceil(fl_width(StatusBar->label()));
int over = 2 * lc + lw - w;
if (chr >= ' ' && chr <= 'z') {
if ( over > 0 )
strSecText.erase(0, (int)(1.0 * over / lc + 0.5));
strSecText.append(1, chr);
StatusBar->label(strSecText.c_str());
WARNstatus->damage();
}
}
void put_sec_char(char chr)
{
REQ(put_sec_char_flmain, chr);
}
static void clear_status_cb(void* arg)
{
reinterpret_cast<Fl_Box*>(arg)->label("");
}
static void dim_status_cb(void* arg)
{
reinterpret_cast<Fl_Box*>(arg)->deactivate();
}
static void (*const timeout_action[STATUS_NUM])(void*) = { clear_status_cb, dim_status_cb };
struct PSM_STRUCT {
Fl_Widget *w;
double timeout;
status_timeout action;
std::string msg;
};
void put_status_msg(void *d)
{
PSM_STRUCT *psm = (PSM_STRUCT *)d;
psm->w->activate();
psm->w->label(psm->msg.c_str());
if (psm->timeout > 0.0) {
Fl::remove_timeout(timeout_action[psm->action], psm->w);
Fl::add_timeout(psm->timeout, timeout_action[psm->action], psm->w);
}
}
void put_status(const char *msg, double timeout, status_timeout action)
{
static PSM_STRUCT ps;
ps.msg.clear();
ps.msg.assign(msg);
ps.timeout = timeout;
ps.action = action;
ps.w = StatusBar;
Fl::awake(put_status_msg, (void *)&ps);
}
void put_Status2(const char *msg, double timeout, status_timeout action)
{
static PSM_STRUCT ps;
ps.msg.clear();
ps.msg.assign(msg);
ps.timeout = timeout;
ps.action = action;
ps.w = Status2;
info2msg = msg;
Fl::awake(put_status_msg, (void *)&ps);
}
void put_Status1(const char *msg, double timeout, status_timeout action)
{
static PSM_STRUCT ps;
ps.msg.clear();
ps.msg.assign(msg);
ps.timeout = timeout;
ps.action = action;
ps.w = Status1;
info1msg = msg;
if (!active_modem) return;
if (progStatus.NO_RIGLOG && active_modem->get_mode() != MODE_FSQ) return;
Fl::awake(put_status_msg, (void *)&ps);
}
void put_WARNstatus(double v)
{
sig_vumeter->value(v);
sig_vumeter2->value(v);
VuMeter->value(v);
double val = 20 * log10(v == 0 ? 1e-9 : v);
if (val < progdefaults.normal_signal_level)
WARNstatus->color(progdefaults.LowSignal);
else if (val < progdefaults.high_signal_level )
WARNstatus->color(progdefaults.NormSignal);
else if (val < progdefaults.over_signal_level)
WARNstatus->color(progdefaults.HighSignal);
else WARNstatus->color(progdefaults.OverSignal);
WARNstatus->redraw();
}
void set_CWwpm()
{
if (sldrCWxmtWPM)
sldrCWxmtWPM->value(progdefaults.CWspeed);
if (cntCW_WPM)
cntCW_WPM->value(progdefaults.CWspeed);
if (use_nanoIO) set_nanoWPM(progdefaults.CWspeed);
}
void clear_StatusMessages()
{
StatusBar->label("");
Status1->label("");
Status2->label("");
info1msg = "";
info2msg = "";
}
void put_MODEstatus(const char* fmt, ...)
{
static char s[32];
va_list args;
va_start(args, fmt);
vsnprintf(s, sizeof(s), fmt, args);
va_end(args);
REQ(static_cast<void (Fl_Button::*)(const char *)>(&Fl_Button::label), MODEstatus, s);
REQ(static_cast<void (Fl_Button::*)()>(&Fl_Button::redraw_label), MODEstatus);
}
void put_MODEstatus(trx_mode mode)
{
put_MODEstatus("%s", mode_info[mode].sname);
}
void put_rx_data(int *data, int len)
{
FHdisp->data(data, len);
}
bool idling = false;
void get_tx_char_idle(void *)
{
idling = false;
progStatus.repeatIdleTime = 0;
}
int Qwait_time = 0;
int Qidle_time = 0;
static int que_timeout = 0;
bool que_ok = true;
bool tx_queue_done = true;
bool que_waiting = true;
void post_queue_execute(void*)
{
if (!que_timeout) {
LOG_ERROR("%s", "timed out");
return;
}
while (!que_ok && trx_state != STATE_RX) {
que_timeout--;
Fl::repeat_timeout(0.05, post_queue_execute);
Fl::awake();
}
trx_transmit();
}
void queue_execute_after_rx(void*)
{
que_waiting = false;
if (!que_timeout) {
LOG_ERROR("%s", "timed out");
return;
}
while (trx_state == STATE_TX) {
que_timeout--;
Fl::repeat_timeout(0.05, queue_execute_after_rx);
Fl::awake();
return;
}
que_timeout = 100; // 5 seconds
Fl::add_timeout(0.05, post_queue_execute);
que_ok = false;
tx_queue_done = false;
Tx_queue_execute();
}
void do_que_execute(void *)
{
tx_queue_done = false;
que_ok = false;
Tx_queue_execute();
que_waiting = false;
}
char szTestChar[] = "E|I|S|T|M|O|A|V";
//std::string bools = "------";
//char testbools[7];
extern int get_fsq_tx_char();
bool disable_lowercase = false;
int get_tx_char(void)
{
enum { STATE_CHAR, STATE_CTRL };
static int state = STATE_CHAR;
if (idling || csma_idling ) { return GET_TX_CHAR_NODATA; } // Keep this a the top of the list (CSMA TX delay).
if (active_modem->get_mode() == MODE_FSQ) return get_fsq_tx_char();
if (!que_ok) { return GET_TX_CHAR_NODATA; }
if (Qwait_time) { return GET_TX_CHAR_NODATA; }
if (Qidle_time) { return GET_TX_CHAR_NODATA; }
if (macro_idle_on) { return GET_TX_CHAR_NODATA; }
if ((progStatus.repeatMacro > -1) && text2repeat.length()) {
std::string repeat_content;
int utf8size = fl_utf8len1(text2repeat[repeatchar]);
for (int i = 0; i < utf8size; i++)
repeat_content += text2repeat[repeatchar + i];
repeatchar += utf8size;
tx_encoder.push(repeat_content);
if (repeatchar >= text2repeat.length()) {
text2repeat.clear();
macros.repeat(progStatus.repeatMacro);
}
goto transmit;
}
int c;
if (!macrochar.empty()) {
c = macrochar[0];
macrochar.erase(0,1);
start_deadman();
return c;
}
if (xmltest_char_available) {
num_cps_chars++;
start_deadman();
return xmltest_char();
}
if (data_io_enabled == ARQ_IO && arq_text_available) {
start_deadman();
c = arq_get_char();
return c;
} else if (data_io_enabled == KISS_IO && kiss_text_available) {
start_deadman();
c = kiss_get_char();
return c;
}
if (active_modem == cw_modem && progdefaults.QSKadjust) {
start_deadman();
c = szTestChar[2 * progdefaults.TestChar];
return c;
}
if ( (progStatus.repeatMacro > -1) && progStatus.repeatIdleTime > 0 &&
!idling ) {
Fl::add_timeout(progStatus.repeatIdleTime, get_tx_char_idle);
idling = true;
return GET_TX_CHAR_NODATA;
}
if ((c = tx_encoder.pop()) != -1) {
start_deadman();
return(c);
}
if ((progStatus.repeatMacro > -1) && text2repeat.length()) {
std::string repeat_content;
int utf8size = fl_utf8len1(text2repeat[repeatchar]);
for (int i = 0; i < utf8size; i++)
repeat_content += text2repeat[repeatchar + i];
repeatchar += utf8size;
tx_encoder.push(repeat_content);
if (repeatchar >= text2repeat.length()) {
text2repeat.clear();
macros.repeat(progStatus.repeatMacro);
}
goto transmit;
}
disable_lowercase = false;
if (xmltest_char_available) {
num_cps_chars++;
start_deadman();
c = xmltest_char();
disable_lowercase = true;
}
else if (active_modem->get_mode() == MODE_IFKP)
c = ifkp_tx_text->nextChar();
else if ((c = next_buffered_macro_char()) == 0) // preference given to buffered macro chars
c = TransmitText->nextChar();
if (c == GET_TX_CHAR_ETX) {
return c;
}
if (c == '^' && state == STATE_CHAR) {
state = STATE_CTRL;
if (active_modem->get_mode() == MODE_IFKP)
c = ifkp_tx_text->nextChar();
else
if ((c = next_buffered_macro_char()) == 0) // preference given to buffered macro chars
c = TransmitText->nextChar();
}
if (c == -1) {
return(GET_TX_CHAR_NODATA);
}
if (state == STATE_CTRL) {
state = STATE_CHAR;
switch (c) {
case 'a': case 'A':
if (active_modem->get_mode() == MODE_IFKP)
active_modem->m_ifkp_send_avatar();
else if (active_modem->get_mode() >= MODE_THOR_FIRST &&
active_modem->get_mode() <= MODE_THOR_LAST)
active_modem->m_thor_send_avatar();
return(GET_TX_CHAR_NODATA);
case 'i': case 'I':
{
std::string fname;
if (active_modem->get_mode() == MODE_IFKP)
c = ifkp_tx_text->nextChar();
else
if ((c = next_buffered_macro_char()) == 0) // preference given to buffered macro chars
c = TransmitText->nextChar();
if (c == '[') {
if (active_modem->get_mode() == MODE_IFKP)
c = ifkp_tx_text->nextChar();
else
if ((c = next_buffered_macro_char()) == 0) // preference given to buffered macro chars
c = TransmitText->nextChar();
while (c != ']' && c != -1) {
fname += c;
if (active_modem->get_mode() == MODE_IFKP)
c = ifkp_tx_text->nextChar();
else
if ((c = next_buffered_macro_char()) == 0) // preference given to buffered macro chars
c = TransmitText->nextChar();
}
if (c == -1) return (GET_TX_CHAR_NODATA);
if (active_modem->get_mode() == MODE_IFKP) {
ifkp_load_scaled_image(fname);
return (GET_TX_CHAR_NODATA);
}
if (active_modem->get_mode() >= MODE_THOR_FIRST &&
active_modem->get_mode() <= MODE_THOR_LAST) {
thor_load_scaled_image(fname);
return (GET_TX_CHAR_NODATA);
}
active_modem->send_color_image(fname);
}
}
return(GET_TX_CHAR_NODATA);
case 'p': case 'P':
TransmitText->pause();
break;
case 'r':
local_timed_exec = false;
active_modem->set_CW_EOT();
if (active_modem->get_mode() == MODE_IFKP)
REQ(&FTextTX::clear, ifkp_tx_text);
else
REQ(&FTextTX::clear, TransmitText);
REQ(Rx_queue_execute);
return(GET_TX_CHAR_ETX);
break;
case 'R':
local_timed_exec = false;
active_modem->set_CW_EOT();
if (active_modem->get_mode() == MODE_IFKP) {
if (ifkp_tx_text->eot()) {
REQ(&FTextTX::clear, ifkp_tx_text);
REQ(Rx_queue_execute);
return(GET_TX_CHAR_ETX);
} else
return(GET_TX_CHAR_NODATA);
} else {
REQ(&FTextTX::clear, TransmitText);
REQ(Rx_queue_execute);
return(GET_TX_CHAR_ETX);
}
break;
case 'L':
REQ(qso_save_now);
return(GET_TX_CHAR_NODATA);
break;
case 'C':
REQ(clearQSO);
return(GET_TX_CHAR_NODATA);
break;
case '!':
if (queue_must_rx()) {
que_timeout = 400; // 20 seconds
REQ(queue_execute_after_rx, (void *)0);
while(que_waiting) { MilliSleep(10); Fl::awake(); }
return(GET_TX_CHAR_ETX);
} else {
if (active_modem->get_stopflag()) {
return (GET_TX_CHAR_NODATA);
}
REQ(do_que_execute, (void*)0);
MilliSleep(10);
while (do_tune_on) return (GET_TX_CHAR_NODATA);
while (que_waiting) { MilliSleep(10); Fl::awake(); }
return (GET_TX_CHAR_NODATA);
}
break;
default:
char utf8_char[6];
int utf8_len = fl_utf8encode(c, utf8_char);
tx_encoder.push("^" + std::string(utf8_char, utf8_len));
}
}
else if (c == '\n') {
tx_encoder.push("\r\n");
}
else {
char utf8_char[6];
int utf8_len = fl_utf8encode(c, utf8_char);
tx_encoder.push(std::string(utf8_char, utf8_len));
}
transmit:
c = tx_encoder.pop();
if (c == -1) {
LOG_ERROR("TX encoding conversion error: pushed content, but got nothing back");
return(GET_TX_CHAR_NODATA);
}
if (progdefaults.tx_lowercase && !disable_lowercase)
c = fl_tolower(c);
start_deadman();
return(c);
}
void put_echo_char(unsigned int data, int style)
{
// suppress print to rx widget when making timing tests
if (PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST) return;
if(progdefaults.ax25_decode_enabled && data_io_enabled == KISS_IO) {
disp_rx_processed_char();
return;
}
trx_mode mode = active_modem->get_mode();
if (mode == MODE_CW && progdefaults.QSKadjust)
return;
REQ(&add_tx_char, data & 0xFF);
// select a byte translation table
const char **asc = NULL;//ascii;
if (mailclient || mailserver) {
asc = ascii2;
style = FTextBase::CTRL;
} else if ((progdefaults.show_all_codes && iscntrl(data & 0xFF)) ||
PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST)
asc = ascii3;
// receive and convert the data
static unsigned int lastdata = 0;
if (data == '\r' && lastdata == '\r') // reject multiple CRs
return;
if (mode == MODE_RTTY && data == '\a') {
if (progdefaults.visibleBELL)
echo_chd.rx((unsigned char *)ascii2[7]);
REQ(TTY_bell);
} else if (asc == NULL)
echo_chd.rx(data & 0xFF);
else
echo_chd.rx((unsigned char *)asc[data & 0xFF]);
lastdata = data;
if (Maillogfile) {
std::string s = iscntrl(data & 0x7F) ? ascii2[data & 0x7F] : std::string(1, data);
Maillogfile->log_to_file(cLogfile::LOG_TX, s);
}
if (echo_chd.data_length() > 0)
{
if (active_modem->get_mode() == MODE_FSQ)
REQ(&FTextRX::addstr, fsq_rx_text, echo_chd.data(), style);
else if (active_modem->get_mode() == MODE_IFKP)
REQ(&FTextRX::addstr, ifkp_rx_text, echo_chd.data(), style);
else
REQ(&FTextRX::addstr, ReceiveText, echo_chd.data(), style);
if (progStatus.LOGenabled)
logfile->log_to_file(cLogfile::LOG_TX, echo_chd.data());
echo_chd.clear();
}
}
void resetRTTY() {
if (active_modem->get_mode() == MODE_RTTY)
trx_start_modem(active_modem);
}
void resetFSK() {
if (active_modem->get_mode() == MODE_RTTY)
active_modem->resetFSK();
}
void resetOLIVIA() {
trx_mode md = active_modem->get_mode();
if (md >= MODE_OLIVIA && md <= MODE_OLIVIA_64_2000)
trx_start_modem(active_modem);
}
void resetCONTESTIA() {
if (active_modem->get_mode() == MODE_CONTESTIA)
trx_start_modem(active_modem);
}
//void updatePACKET() {
// if (active_modem->get_mode() == MODE_PACKET)
// trx_start_modem(active_modem);
//}
void resetTHOR() {
trx_mode md = active_modem->get_mode();
if (md == MODE_THORMICRO || md == MODE_THOR4 || md == MODE_THOR5 || md == MODE_THOR8 ||
md == MODE_THOR11 ||
md == MODE_THOR16 || md == MODE_THOR22 ||
md == MODE_THOR25x4 || md == MODE_THOR50x1 ||
md == MODE_THOR50x2 || md == MODE_THOR100 )
trx_start_modem(active_modem);
}
void resetDOMEX() {
trx_mode md = active_modem->get_mode();
if (md == MODE_DOMINOEXMICRO || md == MODE_DOMINOEX4 || md == MODE_DOMINOEX5 ||
md == MODE_DOMINOEX8 || md == MODE_DOMINOEX11 ||
md == MODE_DOMINOEX16 || md == MODE_DOMINOEX22 ||
md == MODE_DOMINOEX44 || md == MODE_DOMINOEX88 )
trx_start_modem(active_modem);
}
void resetSoundCard()
{
trx_reset();
}
void setReverse(int rev) {
active_modem->set_reverse(rev);
}
void start_tx()
{
if (!(active_modem->get_cap() & modem::CAP_TX))
return;
trx_transmit();
}
void abort_tx()
{
if (trx_state == STATE_TUNE) {
btnTune->value(0);
btnTune->do_callback();
return;
}
if (trx_state == STATE_TX) {
queue_reset();
trx_start_modem(active_modem);
}
}
void set_rx_tx()
{
abort_tx();
rx_only = false;
btnTune->activate();
wf->xmtrcv->activate();
}
void set_rx_only()
{
abort_tx();
rx_only = true;
btnTune->deactivate();
wf->xmtrcv->deactivate();
}
void qsy(long long rfc, int fmid)
{
if (rfc <= 0LL) {
rfc = wf->rfcarrier();
}
if (fmid > 0) {
if (active_modem->freqlocked())
active_modem->set_freqlock(false);
else
active_modem->set_freq(fmid);
// required for modems that will not change their freq (e.g. mt63)
int adj = active_modem->get_freq() - fmid;
if (adj)
rfc += (wf->USB() ? adj : -adj);
}
if (connected_to_flrig)
REQ(xmlrpc_rig_set_qsy, rfc);
else if (progdefaults.chkUSERIGCATis)
REQ(rigCAT_set_qsy, rfc);
#if USE_HAMLIB
else if (progdefaults.chkUSEHAMLIBis)
REQ(hamlib_set_qsy, rfc);
#endif
else
qso_selectFreq((long int) rfc, fmid);
std::string testmode = qso_opMODE->value();
bool xcvr_useFSK = (testmode.find("RTTY") != std::string::npos);
if (xcvr_useFSK) {
int fmid = progdefaults.xcvr_FSK_MARK + rtty::SHIFT[progdefaults.rtty_shift]/2;
wf->carrier(fmid);
}
}
std::map<std::string, qrg_mode_t> qrg_marks;
qrg_mode_t last_marked_qrg;
void note_qrg(bool no_dup, const char* prefix, const char* suffix, trx_mode mode, long long rfc, int afreq)
{
qrg_mode_t m;
m.rfcarrier = (rfc ? rfc : wf->rfcarrier());
m.carrier = (afreq ? afreq : active_modem->get_freq());
m.mode = (mode < NUM_MODES ? mode : active_modem->get_mode());
if (no_dup && last_marked_qrg == m)
return;
last_marked_qrg = m;
char buf[64];
time_t t = time(NULL);
struct tm tm;
gmtime_r(&t, &tm);
size_t r1;
if ((r1 = strftime(buf, sizeof(buf), "<<%Y-%m-%dT%H:%MZ ", &tm)) == 0)
return;
size_t r2;
if (m.rfcarrier)
r2 = snprintf(buf+r1, sizeof(buf)-r1, "%s @ %lld%c%04d>>",
mode_info[m.mode].name, m.rfcarrier, (wf->USB() ? '+' : '-'), m.carrier);
else
r2 = snprintf(buf+r1, sizeof(buf)-r1, "%s @ %04d>>", mode_info[m.mode].name, m.carrier);
if (r2 >= sizeof(buf)-r1)
return;
qrg_marks[buf] = m;
if (prefix && *prefix)
ReceiveText->addstr(prefix);
ReceiveText->addstr(buf, FTextBase::QSY);
ReceiveText->mark();
if (suffix && *suffix)
ReceiveText->addstr(suffix);
}
// To be called from the main thread.
void * set_xmtrcv_button_true(void)
{
wf->xmtrcv->value(true);
wf->xmtrcv->redraw();
return (void *)0;
}
// To be called from the main thread.
void * set_xmtrcv_button_false(void)
{
wf->xmtrcv->value(false);
wf->xmtrcv->redraw();
return (void *)0;
}
// To be called from the main thread.
void * set_xmtrcv_selection_color_transmitting(void)
{
wf->xmtrcv_selection_color(progdefaults.XmtColor);
return (void *)0;
}
// To be called from the main thread.
void * set_xmtrcv_selection_color_pending(void)
{
wf->xmtrcv_selection_color(FL_YELLOW);
return (void *)0;
}
void xmtrcv_selection_color(Fl_Color clr)
{
wf->xmtrcv_selection_color(clr);
}
void xmtrcv_selection_color()
{
wf->xmtrcv_selection_color(progdefaults.XmtColor);
}
void rev_selection_color()
{
wf->reverse_selection_color(progdefaults.RevColor);
}
void xmtlock_selection_color()
{
wf->xmtlock_selection_color(progdefaults.LkColor);
}
void sql_selection_color()
{
if (!btnSQL) return;
btnSQL->selection_color(progdefaults.Sql1Color);
btnSQL->redraw();
}
void afc_selection_color()
{
if (!btnAFC) return;
btnAFC->selection_color(progdefaults.AfcColor);
btnAFC->redraw();
}
void rxid_selection_color()
{
cbRSID(NULL, NULL);
}
void txid_selection_color()
{
if (!btnTxRSID) return;
btnTxRSID->selection_color(progdefaults.TxIDColor);
btnTxRSID->redraw();
}
void tune_selection_color()
{
if (!btnTune) return;
btnTune->selection_color(progdefaults.TuneColor);
btnTune->redraw();
}
void spot_selection_color()
{
if (!btnAutoSpot) return;
btnAutoSpot->selection_color(progdefaults.SpotColor);
btnAutoSpot->redraw();
}
void set_default_btn_color()
{
Fl_Light_Button *buttons[] = {
btn_FSQCALL, btn_SELCAL, btn_MONITOR, btnPSQL,
btnDupCheckOn, btn_WKCW_connect, btn_WKFSK_connect,
btn_nanoCW_connect, btn_nanoIO_connect,
btn_enable_auditlog, btn_enable_fsq_heard_log,
btn_enable_ifkp_audit_log, btn_enable_ifkp_audit_log,
btn_Nav_connect, btn_Nav_config, btn_fmt_record,
btnConnectTalker,
btn_unk_enable, btn_ref_enable };
size_t nbtns = sizeof(buttons)/sizeof(*buttons);
for (size_t i = 0; i < nbtns; i++) {
if (buttons[i] != NULL) {
buttons[i]->selection_color(progdefaults.default_btn_color);
buttons[i]->redraw();
}
}
trx_mode md = active_modem->get_mode();
if ((md > MODE_WEFAX_FIRST) && (md <= MODE_WEFAX_LAST)) {
wefax_round_rx_noise_removal->selection_color(progdefaults.default_btn_color);
wefax_round_rx_binary->selection_color(progdefaults.default_btn_color);
wefax_round_rx_non_stop->selection_color(progdefaults.default_btn_color);
}
}
void set_colors()
{
spot_selection_color();
tune_selection_color();
txid_selection_color();
rxid_selection_color();
sql_selection_color();
afc_selection_color();
xmtlock_selection_color();
tune_selection_color();
set_default_btn_color();
set_log_colors();
}
// Olivia
void set_olivia_bw(int bw)
{
int i;
if (bw == 125)
i = 0;
else if (bw == 250)
i = 1;
else if (bw == 500)
i = 2;
else if (bw == 1000)
i = 3;
else
i = 4;
bool changed = progdefaults.changed;
i_listbox_olivia_bandwidth->index(i);
i_listbox_olivia_bandwidth->do_callback();
progdefaults.changed = changed;
}
void set_olivia_tones(int tones)
{
unsigned i = -1;
while (tones >>= 1)
i++;
bool changed = progdefaults.changed;
i_listbox_olivia_tones->index(i);//+1);
i_listbox_olivia_tones->do_callback();
progdefaults.changed = changed;
}
//Contestia
void set_contestia_bw(int bw)
{
int i;
if (bw == 125)
i = 0;
else if (bw == 250)
i = 1;
else if (bw == 500)
i = 2;
else if (bw == 1000)
i = 3;
else
i = 4;
bool changed = progdefaults.changed;
i_listbox_contestia_bandwidth->index(i);
i_listbox_contestia_bandwidth->do_callback();
progdefaults.changed = changed;
}
void set_contestia_tones(int tones)
{
unsigned i = -1;
while (tones >>= 1)
i++;
bool changed = progdefaults.changed;
i_listbox_contestia_tones->index(i);
i_listbox_contestia_tones->do_callback();
progdefaults.changed = changed;
}
void set_rtty_shift(int shift)
{
if (shift < selCustomShift->minimum() || shift > selCustomShift->maximum())
return;
// Static const array otherwise will be built at each call.
static const int shifts[] = { 23, 85, 160, 170, 182, 200, 240, 350, 425, 850 };
size_t i;
for (i = 0; i < sizeof(shifts)/sizeof(*shifts); i++)
if (shifts[i] == shift)
break;
selShift->index(i);
selShift->do_callback();
if (i == sizeof(shifts)/sizeof(*shifts)) {
selCustomShift->value(shift);
selCustomShift->do_callback();
}
}
void set_rtty_baud(float baud)
{
// Static const array otherwise will be rebuilt at each call.
static const float bauds[] = {
45.0f, 45.45f, 50.0f, 56.0f, 75.0f,
100.0f, 110.0f, 150.0f, 200.0f, 300.0f
};
for (size_t i = 0; i < sizeof(bauds)/sizeof(*bauds); i++) {
if (bauds[i] == baud) {
selBaud->index(i);
selBaud->do_callback();
break;
}
}
}
void set_rtty_bits(int bits)
{
// Static const array otherwise will be built at each call.
static const int bits_[] = { 5, 7, 8 };
for (size_t i = 0; i < sizeof(bits_)/sizeof(*bits_); i++) {
if (bits_[i] == bits) {
selBits->index(i);
selBits->do_callback();
break;
}
}
}
void set_rtty_bw(float bw)
{
}
int notch_frequency = 0;
void notch_on(int freq)
{
notch_frequency = freq;
if (progdefaults.fldigi_client_to_flrig)
set_flrig_notch();
else
rigCAT_set_notch(notch_frequency);
}
void notch_off()
{
notch_frequency = 0;
if (progdefaults.fldigi_client_to_flrig)
set_flrig_notch();
else
rigCAT_set_notch(notch_frequency);
}
void enable_kiss(void)
{
if(btnEnable_arq->value()) {
btnEnable_arq->value(false);
}
progdefaults.changed = true;
progdefaults.data_io_enabled = KISS_IO;
progStatus.data_io_enabled = KISS_IO;
data_io_enabled = KISS_IO;
btnEnable_kiss->value(true);
enable_disable_kpsql();
}
void enable_arq(void)
{
if(btnEnable_kiss->value()) {
btnEnable_kiss->value(false);
}
progdefaults.changed = true;
progdefaults.data_io_enabled = ARQ_IO;
progStatus.data_io_enabled = ARQ_IO;
data_io_enabled = ARQ_IO;
btnEnable_arq->value(true);
enable_disable_kpsql();
}
void enable_disable_kpsql(void)
{
if (progdefaults.data_io_enabled == KISS_IO) {
check_kiss_modem();
//btnPSQL->activate();
//if(progStatus.kpsql_enabled || progdefaults.kpsql_enabled) {
// btnPSQL->value(true);
// btnPSQL->do_callback();
//}
} else {
sldrSquelch->value(progStatus.sldrSquelchValue);
//btnPSQL->value(false);
//btnPSQL->deactivate();
}
progStatus.data_io_enabled = progdefaults.data_io_enabled;
}
void disable_config_p2p_io_widgets(void)
{
btnEnable_arq->deactivate();
btnEnable_kiss->deactivate();
btnEnable_ax25_decode->deactivate();
//btnEnable_csma->deactivate();
txtKiss_ip_address->deactivate();
txtKiss_ip_io_port_no->deactivate();
txtKiss_ip_out_port_no->deactivate();
btnEnable_dual_port->deactivate();
//btnEnableBusyChannel->deactivate();
//cntKPSQLAttenuation->deactivate();
//cntBusyChannelSeconds->deactivate();
btnDefault_kiss_ip->deactivate();
btn_restart_kiss->deactivate();
btnEnable_7bit_modem_inhibit->deactivate();
btnEnable_auto_connect->deactivate();
btnKissTCPIO->deactivate();
btnKissUDPIO->deactivate();
btnKissTCPListen->deactivate();
btn_connect_kiss_io->deactivate();
txtArq_ip_address->deactivate();
txtArq_ip_port_no->deactivate();
btnDefault_arq_ip->deactivate();
btn_restart_arq->deactivate();
txtXmlrpc_ip_address->deactivate();
txtXmlrpc_ip_port_no->deactivate();
btnDefault_xmlrpc_ip->deactivate();
btn_restart_xml->deactivate();
txt_flrig_ip_address->deactivate();
txt_flrig_ip_port->deactivate();
btnDefault_flrig_ip->deactivate();
btn_reconnect_flrig_server->deactivate();
txt_fllog_ip_address->deactivate();
txt_fllog_ip_port->deactivate();
btnDefault_fllog_ip->deactivate();
btn_reconnect_log_server->deactivate();
}
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void enable_config_p2p_io_widgets(void)
{
btnEnable_arq->activate();
btnEnable_kiss->activate();
btnEnable_ax25_decode->activate();
//btnEnable_csma->activate();
txtKiss_ip_address->activate();
txtKiss_ip_io_port_no->activate();
txtKiss_ip_out_port_no->activate();
btnEnable_dual_port->activate();
//btnEnableBusyChannel->activate();
//cntKPSQLAttenuation->activate();
//cntBusyChannelSeconds->activate();
btnDefault_kiss_ip->activate();
btn_restart_kiss->activate();
btnEnable_7bit_modem_inhibit->activate();
btnEnable_auto_connect->activate();
btnKissTCPIO->activate();
btnKissUDPIO->activate();
btnKissTCPListen->activate();
btn_connect_kiss_io->activate();
txtArq_ip_address->activate();
txtArq_ip_port_no->activate();
btnDefault_arq_ip->activate();
btn_restart_arq->activate();
txtXmlrpc_ip_address->activate();
txtXmlrpc_ip_port_no->activate();
btnDefault_xmlrpc_ip->activate();
btn_restart_xml->activate();
txt_flrig_ip_address->activate();
txt_flrig_ip_port->activate();
btnDefault_flrig_ip->activate();
btn_reconnect_flrig_server->activate();
txt_fllog_ip_address->activate();
txt_fllog_ip_port->activate();
btnDefault_fllog_ip->activate();
btn_reconnect_log_server->activate();
}
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void set_ip_to_default(int which_io)
{
switch(which_io) {
case ARQ_IO:
txtArq_ip_address->value(DEFAULT_ARQ_IP_ADDRESS);
txtArq_ip_port_no->value(DEFAULT_ARQ_IP_PORT);
txtArq_ip_address->do_callback();
txtArq_ip_port_no->do_callback();
break;
case KISS_IO:
txtKiss_ip_address->value(DEFAULT_KISS_IP_ADDRESS);
txtKiss_ip_io_port_no->value(DEFAULT_KISS_IP_IO_PORT);
txtKiss_ip_out_port_no->value(DEFAULT_KISS_IP_OUT_PORT);
btnEnable_dual_port->value(false);
txtKiss_ip_address->do_callback();
txtKiss_ip_io_port_no->do_callback();
txtKiss_ip_out_port_no->do_callback();
btnEnable_dual_port->do_callback();
break;
case XMLRPC_IO:
txtXmlrpc_ip_address->value(DEFAULT_XMLPRC_IP_ADDRESS);
txtXmlrpc_ip_port_no->value(DEFAULT_XMLRPC_IP_PORT);
txtXmlrpc_ip_address->do_callback();
txtXmlrpc_ip_port_no->do_callback();
break;
case FLRIG_IO:
txt_flrig_ip_address->value(DEFAULT_FLRIG_IP_ADDRESS);
txt_flrig_ip_port->value(DEFAULT_FLRIG_IP_PORT);
txt_flrig_ip_address->do_callback();
txt_flrig_ip_port->do_callback();
break;
case FLLOG_IO:
txt_fllog_ip_address->value(DEFAULT_FLLOG_IP_ADDRESS);
txt_fllog_ip_port->value(DEFAULT_FLLOG_IP_PORT);
txt_fllog_ip_address->do_callback();
txt_fllog_ip_port->do_callback();
break;
}
}
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void kiss_io_set_button_state(void *ptr)
{
if(progStatus.kiss_tcp_io) {
btn_connect_kiss_io->activate();
btn_connect_kiss_io->redraw();
btnKissTCPIO->activate();
btnKissTCPIO->value(true);
btnKissTCPListen->activate();
btnKissUDPIO->value(false);
btnKissUDPIO->activate();
btnEnable_dual_port->deactivate();
} else {
btn_connect_kiss_io->activate();
btnKissTCPIO->value(false);
btnKissTCPIO->activate();
btnKissTCPListen->activate();
btnKissUDPIO->value(true);
btnKissUDPIO->activate();
btnEnable_dual_port->activate();
}
char *label = (char *)0;
if(ptr)
label = (char *)ptr;
if(label) {
btn_connect_kiss_io->label(label);
btn_connect_kiss_io->redraw();
}
if(progStatus.ip_lock) {
btn_connect_kiss_io->deactivate();
btnKissTCPIO->deactivate();
btnKissUDPIO->deactivate();
btnKissTCPListen->deactivate();
btnEnable_dual_port->deactivate();
}
}
//-----------------------------------------------------------------------------
// Update CSMA Display Widgets in the IO Configuration Panel
//-----------------------------------------------------------------------------
void update_csma_io_config(int which)
{
char buf[32];
if(which & CSMA_PERSISTANCE) {
cntPersistance->value(progStatus.csma_persistance);
if(progStatus.csma_persistance >= 0) {
float results = ((progStatus.csma_persistance + 1) / 256.0) * 100.0;
memset(buf, 0, sizeof(buf));
snprintf(buf, sizeof(buf) - 1, "%f", results);
OutputPersistancePercent->value(buf);
}
}
if(which & CSMA_SLOT_TIME) {
cntSlotTime->value(progStatus.csma_slot_time);
int results = progStatus.csma_slot_time * 10;
memset(buf, 0, sizeof(buf));
snprintf(buf, sizeof(buf) - 1, "%d", results);
OutputSlotTimeMS->value(buf);
}
if(which & CSMA_TX_DELAY) {
cntTransmitDelay->value(progStatus.csma_transmit_delay);
int results = progStatus.csma_transmit_delay * 10;
memset(buf, 0, sizeof(buf));
snprintf(buf, sizeof(buf) - 1, "%d", results);
OutputTransmitDelayMS->value(buf);
}
}
//-----------------------------------------------------------------------------
// Set PSM configuration panel defaults values.
//-----------------------------------------------------------------------------
void psm_set_defaults(void)
{
progdefaults.csma_persistance = progStatus.csma_persistance = 63;
progdefaults.csma_slot_time = progStatus.csma_slot_time = 10;
progdefaults.csma_transmit_delay = progStatus.csma_transmit_delay = 50;
progdefaults.psm_flush_buffer_timeout = progStatus.psm_flush_buffer_timeout = 15;
progdefaults.psm_minimum_bandwidth_margin = progStatus.psm_minimum_bandwidth_margin = 10;
progdefaults.psm_histogram_offset_threshold = progStatus.psm_histogram_offset_threshold = 3;
progdefaults.psm_hit_time_window = progStatus.psm_hit_time_window = 15;
progdefaults.kpsql_attenuation = progStatus.kpsql_attenuation = 2;
progdefaults.busyChannelSeconds = progStatus.busyChannelSeconds = 3;
cntPersistance->value(progStatus.csma_persistance);
cntSlotTime->value(progStatus.csma_slot_time);
cntTransmitDelay->value(progStatus.csma_transmit_delay);
cntPSMTXBufferFlushTimer->value(progStatus.psm_flush_buffer_timeout);
cntPSMBandwidthMargins->value(progStatus.psm_minimum_bandwidth_margin);
cntPSMThreshold->value(progStatus.psm_histogram_offset_threshold);
cntPSMValidSamplePeriod->value(progStatus.psm_hit_time_window);
cntKPSQLAttenuation->value(progdefaults.kpsql_attenuation);
cntBusyChannelSeconds->value(progStatus.busyChannelSeconds);
update_csma_io_config(CSMA_ALL);
}
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void set_CSV(int start)
{
if (active_modem->get_mode() == MODE_ANALYSIS) {
if (active_modem->get_mode() != MODE_ANALYSIS) return;
if (start == 1)
active_modem->start_csv();
else if (start == 0)
active_modem->stop_csv();
else if (active_modem->write_to_csv == true)
active_modem->stop_csv();
else
active_modem->start_csv();
}
}
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void set_freq_control_lsd()
{
qsoFreqDisp1->set_lsd(progdefaults.sel_lsd);
qsoFreqDisp2->set_lsd(progdefaults.sel_lsd);
qsoFreqDisp3->set_lsd(progdefaults.sel_lsd);
}
//-----------------------------------------------------------------------------
// FSQ mode control interface functions
//-----------------------------------------------------------------------------
std::string fsq_selected_call = "allcall";
static int heard_picked;
void clear_heard_list();
void cb_heard_delete(Fl_Widget *w, void *)
{
int sel = fl_choice2(_("Delete entry?"), _("All"), _("No"), _("Yes"));
if (sel == 2) {
fsq_heard->remove(heard_picked);
fsq_heard->redraw();
}
if (sel == 0) clear_heard_list();
}
void cb_heard_copy(Fl_Widget *w, void *)
{
// copy to clipboard
Fl::copy(fsq_selected_call.c_str(), fsq_selected_call.length(), 1);
}
void cb_heard_copy_to_log(Fl_Widget *w, void *)
{
inpCall->value(fsq_selected_call.c_str());
cb_call(inpCall, (void *)0);
}
void cb_heard_copy_all(Fl_Widget *w, void *)
{
if (fsq_heard->size() < 2) return;
fsq_selected_call.clear();
for (int i = 2; i <= fsq_heard->size(); i++) {
fsq_selected_call.append(fsq_heard->text(i));
size_t p = fsq_selected_call.find(',');
if (p != std::string::npos) fsq_selected_call.erase(p);
fsq_selected_call.append(" ");
}
Fl::copy(fsq_selected_call.c_str(), fsq_selected_call.length(), 1);
}
void cb_heard_query_snr(Fl_Widget *w, void *)
{
std::string s = fsq_selected_call.c_str();
s.append("?");
fsq_xmt(s);
}
void cb_heard_query_heard(Fl_Widget *w, void *)
{
std::string s = fsq_selected_call.c_str();
s.append("$");
fsq_xmt(s);
}
void cb_heard_query_at(Fl_Widget *w, void *)
{
std::string s = fsq_selected_call.c_str();
s.append("@");
fsq_xmt(s);
}
void cb_heard_query_carat(Fl_Widget *w, void *)
{
std::string s = fsq_selected_call.c_str();
s.append("^^");
fsq_xmt(s);
}
void cb_heard_query_amp(Fl_Widget *w, void *)
{
std::string s = fsq_selected_call.c_str();
s.append("&");
fsq_xmt(s);
}
void cb_heard_send_file(Fl_Widget *w, void *)
{
std::string deffilename = TempDir;
deffilename.append("fsq.txt");
const char* p = FSEL::select( "Select send file", "*.txt", deffilename.c_str());
if (!p) return;
if (!*p) return;
std::string fname = fl_filename_name(p);
std::ifstream txfile(p);
if (!txfile) return;
std::stringstream text;
char ch = txfile.get();
while (!txfile.eof()) {
text << ch;
ch = txfile.get();
}
txfile.close();
std::string s = fsq_selected_call.c_str();
s.append("#[");
s.append(fname.c_str());
s.append("]\n");
s.append(text.str().c_str());
fsq_xmt(s);
}
void cb_heard_read_file(Fl_Widget *w, void*)
{
const char *p = fl_input2("File name");
if (p == NULL) return;
std::string fname = p;
if (fname.empty()) return;
std::string s = fsq_selected_call.c_str();
s.append("+[");
s.append(fname.c_str());
s.append("]^r");
fsq_xmt(s);
}
void cb_heard_query_plus(Fl_Widget *w, void *)
{
std::string s = fsq_selected_call.c_str();
s.append("+");
fsq_xmt(s);
}
void cb_heard_send_msg(Fl_Widget *w, void*)
{
const char *p = fl_input2("Send message");
if (p == NULL) return;
std::string msg = p;
if (msg.empty()) return;
std::string s = fsq_selected_call.c_str();
s.append("#[");
s.append(active_modem->fsq_mycall());
s.append("]");
s.append(msg.c_str());
fsq_xmt(s);
}
void cb_heard_send_image(Fl_Widget *w, void *)
{
fsq_showTxViewer('L');
}
static const Fl_Menu_Item *heard_popup;
static const Fl_Menu_Item all_popup[] = {
{ "Copy", 0, cb_heard_copy, 0 },
{ "Copy All", 0, cb_heard_copy_all, 0 , FL_MENU_DIVIDER },
{ "Send File To... (#)", 0, cb_heard_send_file, 0, FL_MENU_DIVIDER },
{ "Send Image To... (%)", 0, cb_heard_send_image, 0 },
{ 0, 0, 0, 0 }
};
static const Fl_Menu_Item directed_popup[] = {
{ "Copy", 0, cb_heard_copy, 0 },
{ "Log call", 0, cb_heard_copy_to_log, 0 },
{ "Copy All", 0, cb_heard_copy_all, 0 },
{ "Delete", 0, cb_heard_delete, 0, FL_MENU_DIVIDER },
{ "Query SNR (?)", 0, cb_heard_query_snr, 0 },
{ "Query Heard ($)", 0, cb_heard_query_heard, 0 },
{ "Query Location (@@)", 0, cb_heard_query_at, 0 },
{ "Query Station Msg (&&)", 0, cb_heard_query_amp, 0 },
{ "Query program version (^)", 0, cb_heard_query_carat, 0, FL_MENU_DIVIDER },
{ "Send Message To... (#)", 0, cb_heard_send_msg, 0 },
{ "Read Messages From (+)", 0, cb_heard_query_plus, 0, FL_MENU_DIVIDER },
{ "Send File To... (#)", 0, cb_heard_send_file, 0 },
{ "Read File From... (+)", 0, cb_heard_read_file, 0, FL_MENU_DIVIDER },
{ "Send Image To... (%)", 0, cb_heard_send_image, 0 },
{ 0, 0, 0, 0 }
};
std::string heard_list()
{
std::string heard;
if (fsq_heard->size() < 2) return heard;
for (int i = 2; i <= fsq_heard->size(); i++)
heard.append(fsq_heard->text(i)).append("\n");
heard.erase(heard.length() - 1); // remove last LF
size_t p = heard.find(",");
while (p != std::string::npos) {
heard.insert(p+1," ");
p = heard.find(",", p+2);
}
return heard;
}
void clear_heard_list()
{
if (active_modem->get_mode() == MODE_FSQ) {
fsq_heard->clear();
fsq_heard->add("allcall");
fsq_heard->redraw();
} else {
ifkp_heard->clear();
ifkp_heard->redraw();
}
}
int tm2int(std::string s)
{
int t = (s[2]-'0')*10 + s[3] - '0';
t += 60*((s[0] - '0')*10 + s[1] - '0');
return t * 60;
}
void age_heard_list()
{
std::string entry;
std::string now = ztime(); now.erase(4);
int tnow = tm2int(now);
std::string tm;
int aging_secs;
switch (progdefaults.fsq_heard_aging) {
case 1: aging_secs = 60; break; // 1 minute
case 2: aging_secs = 300; break; // 5 minutes
case 3: aging_secs = 600; break; // 10 minutes
case 4: aging_secs = 1200; break; // 20 minutes
case 5: aging_secs = 1800; break; // 30 minutes
case 6: aging_secs = 3600; break; // 60 minutes
case 7: aging_secs = 5400; break; // 90 minutes
case 8: aging_secs = 7200; break; // 120 minutes
case 0:
default: return; // no aging
}
if (active_modem->get_mode() == MODE_FSQ) {
if (fsq_heard->size() < 2) return;
for (int i = fsq_heard->size(); i > 1; i--) {
entry = fsq_heard->text(i);
size_t pos = entry.find(",");
tm = entry.substr(pos+1,5);
tm.erase(2,1);
int tdiff = tnow - tm2int(tm);
if (tdiff < 0) tdiff += 24*60*60;
if (tdiff >= aging_secs)
fsq_heard->remove(i);
}
fsq_heard->redraw();
} else {
if (ifkp_heard->size() == 0) return;
for (int i = ifkp_heard->size(); i > 0; i--) {
entry = ifkp_heard->text(i);
size_t pos = entry.find(",");
tm = entry.substr(pos+1,5);
tm.erase(2,1);
int tdiff = tnow - tm2int(tm);
if (tdiff < 0) tdiff += 24*60*60;
if (tdiff >= aging_secs)
ifkp_heard->remove(i);
}
ifkp_heard->redraw();
}
}
void add_to_heard_list(std::string szcall, std::string szdb)
{
int found = 0;
size_t pos_comma;
std::string testcall;
std::string line;
std::string time = inpTimeOff->value();
std::string str = szcall;
str.append(",");
str += time[0]; str += time[1]; str += ':'; str += time[2]; str += time[3];
str.append(",").append(szdb);
if (active_modem->get_mode() == MODE_FSQ) {
if (fsq_heard->size() < 2) {
fsq_heard->add(str.c_str());
} else {
for (int i = 2; i <= fsq_heard->size(); i++) {
line = fsq_heard->text(i);
pos_comma = line.find(",");
if (pos_comma != std::string::npos) {
testcall = line.substr(0, pos_comma);
if (testcall == szcall) {
found = i;
break;
}
}
}
if (found)
fsq_heard->remove(found);
fsq_heard->insert(2, str.c_str());
}
fsq_heard->redraw();
} else {
if (ifkp_heard->size() == 0) {
ifkp_heard->add(str.c_str());
} else {
for (int i = 1; i <= ifkp_heard->size(); i++) {
line = ifkp_heard->text(i);
pos_comma = line.find(",");
if (pos_comma != std::string::npos) {
testcall = line.substr(0, pos_comma);
if (testcall == szcall) {
found = i;
break;
}
}
}
if (found)
ifkp_heard->remove(found);
ifkp_heard->insert(1, str.c_str());
}
ifkp_heard->redraw();
}
if (progStatus.spot_recv)
spot_log(
szcall.c_str(),
inpLoc->value());
}
bool in_heard(std::string call)
{
std::string line;
for (int i = 1; i <= fsq_heard->size(); i++) {
line = fsq_heard->text(i);
if (line.find(call) == 0) return true;
}
return false;
}
void fsq_repeat_last_heard()
{
fsq_tx_text->add(fsq_selected_call.c_str());
}
void cb_fsq_heard(Fl_Browser*, void*)
{
heard_picked = fsq_heard->value();
if (!heard_picked)
return;
int k = Fl::event_key();
fsq_selected_call = fsq_heard->text(heard_picked);
size_t p = fsq_selected_call.find(',');
if (p != std::string::npos) fsq_selected_call.erase(p);
switch (k) {
case FL_Button + FL_LEFT_MOUSE:
if (Fl::event_clicks()) {
if (!fsq_tx_text->eot()) fsq_tx_text->add(" ");
fsq_tx_text->add(fsq_selected_call.c_str());
}
break;
case FL_Button + FL_RIGHT_MOUSE:
if (heard_picked == 1)
heard_popup = all_popup;
else
heard_popup = directed_popup;
const Fl_Menu_Item *m = heard_popup->popup(Fl::event_x(), Fl::event_y());
if (m && m->callback())
m->do_callback(0);
break;
}
restoreFocus();
}
void cb_ifkp_heard(Fl_Browser*, void*)
{
heard_picked = ifkp_heard->value();
if (!heard_picked)
return;
int k = Fl::event_key();
std::string selected_call = ifkp_heard->text(heard_picked);
size_t p = selected_call.find(',');
if (p != std::string::npos) selected_call.erase(p);
switch (k) {
case FL_Button + FL_LEFT_MOUSE:
if (Fl::event_clicks()) {
ifkp_tx_text->add(" ");
ifkp_tx_text->add(selected_call.c_str());
}
break;
case FL_Button + FL_RIGHT_MOUSE:
ifkp_heard->remove(heard_picked);
break;
}
restoreFocus();
}
static void do_fsq_rx_text(std::string text, int style)
{
for (size_t n = 0; n < text.length(); n++)
rx_parser( text[n], style );
}
void display_fsq_rx_text(std::string text, int style)
{
REQ(do_fsq_rx_text, text, style);
}
void display_fsq_mon_text(std::string text, int style)
{
REQ(&FTextRX::addstr, fsq_monitor, text, style);
}
void cbFSQQTC(Fl_Widget *w, void *d)
{
fsq_tx_text->add(progdefaults.fsqQTCtext.c_str());
restoreFocus();
}
void cbFSQCQ(Fl_Widget *w, void *d)
{
fsq_xmt("cqcqcq");
restoreFocus();
}
void cbFSQQTH(Fl_Widget *w, void *d)
{
fsq_tx_text->add(progdefaults.myQth.c_str());
restoreFocus();
}
void cbMONITOR(Fl_Widget *w, void *d)
{
Fl_Light_Button *btn = (Fl_Light_Button *)w;
if (btn->value() == 1)
open_fsqMonitor();
else {
progStatus.fsqMONITORxpos = fsqMonitor->x();
progStatus.fsqMONITORypos = fsqMonitor->y();
progStatus.fsqMONITORwidth = fsqMonitor->w();
progStatus.fsqMONITORheight = fsqMonitor->h();
fsqMonitor->hide();
}
}
void close_fsqMonitor()
{
if (!fsqMonitor) return;
btn_MONITOR->value(0);
progStatus.fsqMONITORxpos = fsqMonitor->x();
progStatus.fsqMONITORypos = fsqMonitor->y();
progStatus.fsqMONITORwidth = fsqMonitor->w();
progStatus.fsqMONITORheight = fsqMonitor->h();
fsqMonitor->hide();
}
void cbSELCAL(Fl_Widget *w, void *d)
{
Fl_Light_Button *btn = (Fl_Light_Button *)w;
int val = btn->value();
if (val) {
btn->label("ACTIVE");
} else {
btn->label("ASLEEP");
}
btn->redraw_label();
restoreFocus();
}
void enableSELCAL()
{
btn_SELCAL->value(1);
cbSELCAL(btn_SELCAL, (void *)0);
}
void cbFSQCALL(Fl_Widget *w, void *d)
{
Fl_Light_Button *btn = (Fl_Light_Button *)w;
int mouse = Fl::event_button();
int val = btn->value();
if (mouse == FL_LEFT_MOUSE) {
progdefaults.fsq_directed = val;
progdefaults.changed = true;
if (val == 0) {
btn_SELCAL->value(0);
btn_SELCAL->deactivate();
btn->label("FSQ-OFF");
btn->redraw_label();
} else {
btn_SELCAL->activate();
btn_SELCAL->value(1);
cbSELCAL(btn_SELCAL, 0);
btn->label("FSQ-ON");
btn->redraw_label();
}
}
restoreFocus();
}
//======================================================================
//FeldHell resizable Rx character height
//======================================================================
extern pthread_mutex_t feld_mutex;
void FHdisp_char_height()
{
guard_lock raster_lock(&feld_mutex);
int rh = progdefaults.HellRcvHeight = (int)valHellRcvHeight->value();
rh = FHdisp->change_rowheight(rh);
if (rh != progdefaults.HellRcvHeight) {
progdefaults.HellRcvHeight = rh;
valHellRcvHeight->value(rh);
valHellRcvHeight->redraw();
fl_alert2("Selection too large for current Rx height\nIncrease Rx height");
} else
progdefaults.changed = true;
trx_mode mode = active_modem->get_mode();
if ( (mode >= MODE_HELL_FIRST) &&
(mode <= MODE_HELL_LAST) )
active_modem->rx_init();
// adjust upper/lower bounds of Rx/Tx panel
minhtext = 2 * progdefaults.HellRcvHeight + 4;//6;
minbox->resize(
text_panel->x(),
text_panel->y() + minhtext,
text_panel->w() - 100,
text_panel->h() - 2*minhtext);
minbox->redraw();
// UI_select();
}
void VuMeter_cb(vumeter *vu, void *d)
{
VuMeter->hide();
StatusBar->show();
progStatus.vumeter_shown = 0;
}
void StatusBar_cb(Fl_Box *bx, void *d)
{
StatusBar->hide();
VuMeter->show();
progStatus.vumeter_shown = 1;
}
| 323,091
|
C++
|
.cxx
| 9,306
| 32.23372
| 176
| 0.665863
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,092
|
Viewer.cxx
|
w1hkj_fldigi/src/dialogs/Viewer.cxx
|
// ----------------------------------------------------------------------------
//
// Viewer.cxx -- PSK browser
//
// Copyright (C) 2008-2009
// David Freese, W1HKJ
// Copyright (C) 2008-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <FL/Enumerations.H>
#include "config.h"
#include "Viewer.h"
#include "trx.h"
#include "main.h"
#include "configuration.h"
#include "confdialog.h"
#include "status.h"
#include "waterfall.h"
#include "fl_digi.h"
#include "re.h"
#include "gettext.h"
#include "flmisc.h"
#include "spot.h"
#include "icons.h"
#include "psk_browser.h"
#include "view_rtty.h"
#include "spectrum_viewer.h"
extern pskBrowser *mainViewer;
//
// External viewer dialog
//
Fl_Double_Window *dlgViewer = 0;
static Fl_Button *btnCloseViewer;
static Fl_Button *btnClearViewer;
Fl_Input2 *viewer_inp_seek;
Fl_Value_Slider2 *sldrViewerSquelch;
pskBrowser *brwsViewer;
static long long rfc;
static bool usb;
void initViewer()
{
usb = wf->USB();
rfc = wf->rfcarrier();
if (mainViewer) {
mainViewer->usb = usb;
mainViewer->rfc = rfc;
mainViewer->setfont(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
mainViewer->HighLight_1((Fl_Color)progdefaults.bwsrHiLight1);
mainViewer->HighLight_2((Fl_Color)progdefaults.bwsrHiLight2);
mainViewer->SelectColor((Fl_Color)progdefaults.bwsrSelect);
mainViewer->Background1((Fl_Color)progdefaults.bwsrBackgnd1);
mainViewer->Background2((Fl_Color)progdefaults.bwsrBackgnd2);
mainViewer->makecolors();
mainViewer->clear();
if (active_modem->get_mode() == MODE_RTTY) {
mvsquelch->range(-12.0, 6.0);
mvsquelch->value(progStatus.VIEWER_rttysquelch);
} else if (active_modem->get_mode() == MODE_CW) {
mvsquelch->range(0.0, 40.0);
mvsquelch->value(progStatus.VIEWER_cwsquelch);
} else {
mvsquelch->range(-3.0, 6.0);
mvsquelch->value(progStatus.VIEWER_psksquelch);
}
mvsquelch->redraw();
}
if (brwsViewer) {
brwsViewer->usb = usb;
brwsViewer->rfc = rfc;
brwsViewer->setfont(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
brwsViewer->HighLight_1((Fl_Color)progdefaults.bwsrHiLight1);
brwsViewer->HighLight_2((Fl_Color)progdefaults.bwsrHiLight2);
brwsViewer->SelectColor((Fl_Color)progdefaults.bwsrSelect);
brwsViewer->Background1((Fl_Color)progdefaults.bwsrBackgnd1);
brwsViewer->Background2((Fl_Color)progdefaults.bwsrBackgnd2);
brwsViewer->makecolors();
brwsViewer->clear();
dlgViewer->size(dlgViewer->w(), dlgViewer->h() - brwsViewer->h() +
pskBrowser::cheight * progdefaults.VIEWERchannels + 4);
if (active_modem->get_mode() == MODE_RTTY) {
sldrViewerSquelch->range(-12.0, 6.0);
sldrViewerSquelch->value(progStatus.VIEWER_rttysquelch);
} else if (active_modem->get_mode() == MODE_CW) {
sldrViewerSquelch->range(0.0, 40.0);
sldrViewerSquelch->value(progStatus.VIEWER_cwsquelch);
} else {
sldrViewerSquelch->range(-3.0, 6.0);
sldrViewerSquelch->value(progStatus.VIEWER_psksquelch);
}
sldrViewerSquelch->redraw();
}
active_modem->clear_viewer();
}
void viewaddchr(int ch, int freq, char c, int md)
{
if (mainViewer) {
if (mainViewer->rfc != wf->rfcarrier() || mainViewer->usb != wf->USB()) {
mainViewer->rfc = wf->rfcarrier();
mainViewer->usb = wf->USB();
mainViewer->redraw();
}
mainViewer->addchr(ch, freq, c, md, true);
}
if (dlgViewer) {
if (brwsViewer->rfc != wf->rfcarrier() || brwsViewer->usb != wf->USB()) {
brwsViewer->rfc = wf->rfcarrier();
brwsViewer->usb = wf->USB();
brwsViewer->redraw();
}
brwsViewer->addchr(ch, freq, c, md);
}
if (progStatus.spot_recv && freq != NULLFREQ)
spot_recv(c, ch, freq, md);
}
void viewclearchannel(int ch) // 0 < ch < channels - 1
{
if (mainViewer)
mainViewer->clearch(ch, NULLFREQ);
if (dlgViewer)
brwsViewer->clearch(ch, NULLFREQ);
}
void viewerswap(int i, int j)
{
if (mainViewer)
mainViewer->swap(i,j);
if (dlgViewer)
brwsViewer->swap(i,j);
}
void viewer_redraw()
{
usb = wf->USB();
rfc = wf->rfcarrier();
if (mainViewer) {
mainViewer->usb = usb;
mainViewer->rfc = rfc;
mainViewer->HighLight_1((Fl_Color)progdefaults.bwsrHiLight1);
mainViewer->HighLight_2((Fl_Color)progdefaults.bwsrHiLight2);
mainViewer->SelectColor((Fl_Color)progdefaults.bwsrSelect);
mainViewer->Background1((Fl_Color)progdefaults.bwsrBackgnd1);
mainViewer->Background2((Fl_Color)progdefaults.bwsrBackgnd2);
mainViewer->makecolors();
mainViewer->resize(mainViewer->x(), mainViewer->y(), mainViewer->w(), mainViewer->h());
}
if (dlgViewer) {
brwsViewer->usb = usb;
brwsViewer->rfc = rfc;
brwsViewer->resize(
brwsViewer->x(), brwsViewer->y(), brwsViewer->w(), brwsViewer->h());
brwsViewer->HighLight_1((Fl_Color)progdefaults.bwsrHiLight1);
brwsViewer->HighLight_2((Fl_Color)progdefaults.bwsrHiLight2);
brwsViewer->SelectColor((Fl_Color)progdefaults.bwsrSelect);
brwsViewer->Background1((Fl_Color)progdefaults.bwsrBackgnd1);
brwsViewer->Background2((Fl_Color)progdefaults.bwsrBackgnd2);
brwsViewer->makecolors();
dlgViewer->redraw();
}
}
static void cb_btnCloseViewer(Fl_Button*, void*) {
progStatus.VIEWERxpos = dlgViewer->x();
progStatus.VIEWERypos = dlgViewer->y();
progStatus.VIEWERwidth = dlgViewer->w();
progStatus.VIEWERheight = dlgViewer->h();
dlgViewer->hide();
}
static void cb_btnClearViewer(Fl_Button*, void*) {
brwsViewer->clear();
if (mainViewer)
mainViewer->clear();
active_modem->clear_viewer();
}
static void cb_brwsViewer(Fl_Hold_Browser*, void*) {
int sel = brwsViewer->value();
if (sel == 0 || sel > progdefaults.VIEWERchannels)
return;
switch (Fl::event_button()) {
case FL_LEFT_MOUSE:
if (brwsViewer->freq(sel) != NULLFREQ) {
if (progdefaults.VIEWERhistory) {
ReceiveText->addchr('\n', FTextBase::RECV);
bHistory = true;
} else {
ReceiveText->addchr('\n', FTextBase::ALTR);
ReceiveText->addstr(brwsViewer->line(sel).c_str(), FTextBase::ALTR);
}
active_modem->set_freq(brwsViewer->freq(sel));
recenter_spectrum_viewer();
active_modem->set_sigsearch(SIGSEARCH);
if (mainViewer)
mainViewer->select(sel);
} else
brwsViewer->deselect();
break;
case FL_MIDDLE_MOUSE: // copy from modem
// set_freq(sel, active_modem->get_freq());
break;
case FL_RIGHT_MOUSE: // reset
{
int ch = progdefaults.VIEWERascend ? progdefaults.VIEWERchannels - sel : sel - 1;
active_modem->clear_ch(ch);
brwsViewer->deselect();
if (mainViewer) mainViewer->deselect();
}
default:
break;
}
}
static void cb_Squelch(Fl_Slider *, void *)
{
if (active_modem->get_mode() == MODE_RTTY)
progStatus.VIEWER_rttysquelch = sldrViewerSquelch->value();
else if (active_modem->get_mode() == MODE_CW)
progStatus.VIEWER_cwsquelch = sldrViewerSquelch->value();
else
progStatus.VIEWER_psksquelch = sldrViewerSquelch->value();
if (mainViewer)
mvsquelch->value(sldrViewerSquelch->value());
}
static void cb_Seek(Fl_Input *, void *)
{
static Fl_Color seek_color[2] = { FL_FOREGROUND_COLOR,
adjust_color(FL_RED, FL_BACKGROUND2_COLOR) }; // invalid RE
seek_re.recompile(*viewer_inp_seek->value() ? viewer_inp_seek->value() : "[invalid");
if (viewer_inp_seek->textcolor() != seek_color[!seek_re]) {
viewer_inp_seek->textcolor(seek_color[!seek_re]);
viewer_inp_seek->redraw();
}
progStatus.browser_search = viewer_inp_seek->value();
if (mainViewer) txtInpSeek->value(progStatus.browser_search.c_str());
}
Fl_Double_Window* createViewer(void)
{
fl_font(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
pskBrowser::cwidth = (int)fl_width("W");
pskBrowser::cheight = fl_height();
int pad = BWSR_BORDER / 2;
int viewerwidth = progStatus.VIEWERwidth - 2*BWSR_BORDER;
int viewerheight = progStatus.VIEWERheight - 2 * BWSR_BORDER - pad - 20;
Fl_Double_Window* w = new Fl_Double_Window(progStatus.VIEWERxpos, progStatus.VIEWERypos,
viewerwidth + 2 * BWSR_BORDER,
viewerheight + 2 * BWSR_BORDER + pad + 20 + 20,
_("Signal Browser"));
Fl_Group* gseek = new Fl_Group(BWSR_BORDER, BWSR_BORDER, viewerwidth, 20);
// search field
const char* label = _("Find: ");
fl_font(FL_HELVETICA, FL_NORMAL_SIZE);
viewer_inp_seek = new Fl_Input2(static_cast<int>(BWSR_BORDER + fl_width(label) + fl_width("X")), BWSR_BORDER, 200, gseek->h(), label);
viewer_inp_seek->labelfont(FL_HELVETICA);
viewer_inp_seek->callback((Fl_Callback*)cb_Seek);
viewer_inp_seek->when(FL_WHEN_CHANGED);
viewer_inp_seek->textfont(FL_HELVETICA);
viewer_inp_seek->value(progStatus.browser_search.c_str());
viewer_inp_seek->do_callback();
gseek->resizable(0);
gseek->end();
brwsViewer = new pskBrowser(BWSR_BORDER, viewer_inp_seek->y() + viewer_inp_seek->h(), viewerwidth, viewerheight);
brwsViewer->callback((Fl_Callback*)cb_brwsViewer);
brwsViewer->setfont(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
brwsViewer->seek_re = &seek_re;
Fl_Group *g = new Fl_Group(BWSR_BORDER, brwsViewer->y() + brwsViewer->h() + pad, viewerwidth, 20);
// close button
btnCloseViewer = new Fl_Button(g->w() + BWSR_BORDER - 75, g->y(), 75, g->h(),
icons::make_icon_label(_("Close"), close_icon));
btnCloseViewer->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
icons::set_icon_label(btnCloseViewer);
btnCloseViewer->callback((Fl_Callback*)cb_btnCloseViewer);
// clear button
btnClearViewer = new Fl_Button(btnCloseViewer->x() - btnCloseViewer->w() - pad,
btnCloseViewer->y(), btnCloseViewer->w(), btnCloseViewer->h(),
icons::make_icon_label(_("Clear"), edit_clear_icon));
btnClearViewer->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
icons::set_icon_label(btnClearViewer);
btnClearViewer->callback((Fl_Callback*)cb_btnClearViewer);
btnClearViewer->tooltip(_("Left click to clear text\nRight click to reset frequencies"));
// squelch
sldrViewerSquelch = new Fl_Value_Slider2(BWSR_BORDER, g->y(),
btnClearViewer->x() - BWSR_BORDER - pad, g->h());
sldrViewerSquelch->align(FL_ALIGN_RIGHT);
sldrViewerSquelch->tooltip(_("Set Viewer Squelch"));
sldrViewerSquelch->type(FL_HOR_NICE_SLIDER);
sldrViewerSquelch->range(-12.0, 6.0);
sldrViewerSquelch->step(0.1);
sldrViewerSquelch->value(progStatus.VIEWER_psksquelch);
sldrViewerSquelch->callback((Fl_Callback*)cb_Squelch);
sldrViewerSquelch->color( fl_rgb_color(
progdefaults.bwsrSliderColor.R,
progdefaults.bwsrSliderColor.G,
progdefaults.bwsrSliderColor.B));
sldrViewerSquelch->selection_color( fl_rgb_color(
progdefaults.bwsrSldrSelColor.R,
progdefaults.bwsrSldrSelColor.G,
progdefaults.bwsrSldrSelColor.B));
g->resizable(sldrViewerSquelch);
g->end();
w->end();
w->callback((Fl_Callback*)cb_btnCloseViewer);
w->resizable(brwsViewer);
w->size_range(
(30 * pskBrowser::cwidth) + pskBrowser::sbarwidth + 2 * BWSR_BORDER,
5 * pskBrowser::cheight + 20 + 2 * BWSR_BORDER + pad);
w->xclass(PACKAGE_NAME);
w->hide();
return w;
}
void openViewer()
{
if (!dlgViewer) {
dlgViewer = createViewer();
}
initViewer();
dlgViewer->show();
dlgViewer->redraw();
}
void viewer_paste_freq(int freq)
{
for (int i = 0; i < progdefaults.VIEWERchannels; i++) {
int ftest = active_modem->viewer_get_freq(i);
if (ftest == NULLFREQ) continue;
if (fabs(ftest - freq) <= 50) {
if (progdefaults.VIEWERascend)
i = (progdefaults.VIEWERchannels - i);
else i++;
if (mainViewer)
mainViewer->select(i);
if (brwsViewer)
brwsViewer->select(i);
return;
}
}
}
| 12,094
|
C++
|
.cxx
| 344
| 32.630814
| 135
| 0.714432
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,093
|
fl_digi_main.cxx
|
w1hkj_fldigi/src/dialogs/fl_digi_main.cxx
|
void create_fl_digi_main_primary() {
// bx used as a temporary spacer
Fl_Box *bx;
int Wmacrobtn;
int xpos;
int ypos;
int wBLANK;
int fnt = progdefaults.FreqControlFontnbr;
int freqheight = Hentry;
fl_font(fnt, freqheight);
int freqwidth = (int)fl_width("9") * 10;
fl_font(progdefaults.LOGGINGtextfont, progdefaults.LOGGINGtextsize);
int Y = 0;
#ifdef __APPLE__
fl_mac_set_about(cb_mnuAboutURL, 0);
#endif
IMAGE_WIDTH = 4000;
Hwfall = progdefaults.wfheight;
Wwfall = progStatus.mainW - 2 * DEFAULT_SW;
int fixed_height =
Hmenu +
Hqsoframe +
Hwfall +
Hstatus;
int hmacros = TB_HEIGHT * 4;
fixed_height += hmacros;
//----------------------------------------------------------------------
// needed to prevent user from manually modifying fldigi_def.xml
// with values to would cause the UI to seg fault
if (progdefaults.HellRcvHeight < 14) progdefaults.HellRcvHeight = 14;
if (progdefaults.HellRcvHeight > 42) progdefaults.HellRcvHeight = 42;
if (progdefaults.HellRcvWidth < 1) progdefaults.HellRcvWidth = 1;
if (progdefaults.HellRcvWidth > 4) progdefaults.HellRcvWidth = 4;
//----------------------------------------------------------------------
minhtext = 2 * progdefaults.HellRcvHeight + 4;//6;
int Htext = 3 * minhtext;
if (Htext < 120) Htext = 120;
main_hmin = Htext + fixed_height;
// developer usage
//cout << "=============================================================" << endl;
//cout << "min main_height ..... " << main_hmin << endl;
//cout << " = Hmenu ............ " << Hmenu << endl;
//cout << " + Hqsoframe ........ " << Hqsoframe << endl;
//cout << " + Hwfall ........... " << Hwfall << endl;
//cout << " + Hstatus ......... " << Hstatus << endl;
//cout << " + Hmacros .......... " << hmacros << endl;
//cout << " + text height ...... " << Htext << endl;
//cout << "=============================================================" << endl;
if (progStatus.mainH < main_hmin) {
progStatus.mainH = main_hmin;
}
if (progStatus.tile_y > Htext) progStatus.tile_y = Htext / 2;
int W = progStatus.mainW;
int H = main_hmin;
int xtmp = 0;
fl_digi_main = new Fl_Double_Window(
progStatus.mainX, progStatus.mainY, W, H);
int lfont = fl_digi_main->labelfont();
int lsize = FL_NORMAL_SIZE;
fl_font(lfont, lsize);
{ // mnuFrame
mnuFrame = new Fl_Group(0,0, W, Hmenu);
mnu = new Fl_Menu_Bar(0, 0, W - 325, Hmenu);
// do some more work on the menu
for (size_t i = 0; i < sizeof(menu_)/sizeof(menu_[0]); i++) {
// FL_NORMAL_SIZE may have changed; update the menu items
if (menu_[i].text) {
menu_[i].labelsize_ = lsize;
}
// set the icon label for items with the multi label type
if (menu_[i].labeltype() == _FL_MULTI_LABEL)
icons::set_icon_label(&menu_[i]);
}
mnu->menu(menu_);
toggle_visible_modes(NULL, NULL);
tx_timer = new Fl_Box(W - 325, 0, 75, Hmenu, "");
tx_timer->box(FL_UP_BOX);
tx_timer->color(FL_BACKGROUND_COLOR);
tx_timer->labelcolor(FL_BACKGROUND_COLOR);
tx_timer->labelsize(FL_NORMAL_SIZE - 1);
tx_timer->labelfont(lfont);
btnAutoSpot = new Fl_Light_Button(W - 250, 0, 50, Hmenu, "Spot");
btnAutoSpot->selection_color(progdefaults.SpotColor);
btnAutoSpot->callback(cbAutoSpot, 0);
btnAutoSpot->deactivate();
btnAutoSpot->labelsize(FL_NORMAL_SIZE - 1);
btnAutoSpot->labelfont(lfont);
btnRSID = new Fl_Light_Button(W - 200, 0, 50, Hmenu, "RxID");
btnRSID->tooltip("Receive RSID");
btnRSID->selection_color(
progdefaults.rsidWideSearch ? progdefaults.RxIDwideColor : progdefaults.RxIDColor);
btnRSID->value(progdefaults.rsid);
btnRSID->callback(cbRSID, 0);
btnRSID->labelsize(FL_NORMAL_SIZE - 1);
btnRSID->labelfont(lfont);
btnTxRSID = new Fl_Light_Button(W - 150, 0, 50, Hmenu, "TxID");
btnTxRSID->selection_color(progdefaults.TxIDColor);
btnTxRSID->tooltip("Transmit RSID");
btnTxRSID->callback(cbTxRSID, 0);
btnTxRSID->labelsize(FL_NORMAL_SIZE - 1);
btnTxRSID->labelfont(lfont);
btnTune = new Fl_Light_Button(W - 100, 0, 50, Hmenu, "TUNE");
btnTune->selection_color(progdefaults.TuneColor);
btnTune->callback(cbTune, 0);
btnTune->labelsize(FL_NORMAL_SIZE - 1);
btnTune->labelfont(lfont);
btnMacroTimer = new Fl_Button(W - 50, 0, 50, Hmenu);
btnMacroTimer->labelcolor(FL_DARK_RED);
btnMacroTimer->callback(cbMacroTimerButton);
btnMacroTimer->set_output();
btnMacroTimer->labelsize(FL_NORMAL_SIZE - 1);
btnMacroTimer->labelfont(lfont);
mnuFrame->resizable(mnu);
mnuFrame->end();
}
int alt_btn_width = 2 * DEFAULT_SW;
{ // Constants
// reset the message dialog font
fl_message_font(FL_HELVETICA, FL_NORMAL_SIZE);
// reset the tooltip font
Fl_Tooltip::font(FL_HELVETICA);
Fl_Tooltip::size(FL_NORMAL_SIZE);
Fl_Tooltip::hoverdelay(0.5);
Fl_Tooltip::delay(2.0);
Fl_Tooltip::enable(progdefaults.tooltips);
Y += mnuFrame->h();
}
TopFrame1 = new Fl_Group(
0, Y,
fl_digi_main->w(), Hqsoframe);
{ // TopFrame1
int fnt1 = progdefaults.FreqControlFontnbr;
int freqheight1 = 2 * Hentry + pad - 2;
fl_font(fnt1, freqheight1);
int freqwidth1 = (int)fl_width("9") * 10;
int mode_cbo_w = (freqwidth1 - 2 * Wbtn - 3 * pad) / 2;
int bw_cbo_w = freqwidth1 - 2 * Wbtn - 3 * pad - mode_cbo_w;
int smeter_w = mode_cbo_w + bw_cbo_w + pad;
int rig_control_frame_width = freqwidth1 + 3 * pad;
fl_font(progdefaults.LOGGINGtextfont, progdefaults.LOGGINGtextsize);
RigControlFrame = new Fl_Group(
0, TopFrame1->y(),
rig_control_frame_width, Hqsoframe);
{ // RigControlFrame 1
RigControlFrame->box(FL_FLAT_BOX);
qsoFreqDisp1 = new cFreqControl(
pad, RigControlFrame->y() + pad,
freqwidth1, freqheight1, "10");
qsoFreqDisp1->box(FL_DOWN_BOX);
qsoFreqDisp1->color(FL_BACKGROUND_COLOR);
qsoFreqDisp1->selection_color(FL_BACKGROUND_COLOR);
qsoFreqDisp1->labeltype(FL_NORMAL_LABEL);
qsoFreqDisp1->font(progdefaults.FreqControlFontnbr);
qsoFreqDisp1->labelsize(12);
qsoFreqDisp1->labelcolor(FL_FOREGROUND_COLOR);
qsoFreqDisp1->align(FL_ALIGN_CENTER);
qsoFreqDisp1->when(FL_WHEN_RELEASE);
qsoFreqDisp1->callback(qso_movFreq);
qsoFreqDisp1->SetONOFFCOLOR(
fl_rgb_color( progdefaults.FDforeground.R,
progdefaults.FDforeground.G,
progdefaults.FDforeground.B),
fl_rgb_color( progdefaults.FDbackground.R,
progdefaults.FDbackground.G,
progdefaults.FDbackground.B));
qsoFreqDisp1->value(0);
qsoFreqDisp1->end();
pwrmeter = new PWRmeter(
qsoFreqDisp1->x(), qsoFreqDisp1->y() + qsoFreqDisp1->h() + pad,
smeter_w, Hentry);
pwrmeter->select(progdefaults.PWRselect);
pwrmeter->tooltip(_("Click to set power level"));
pwrmeter->callback( (Fl_Callback *) cb_meters);
pwrmeter->hide();
smeter = new Smeter(
qsoFreqDisp1->x(), qsoFreqDisp1->y() + qsoFreqDisp1->h() + pad,
smeter_w, Hentry);
set_smeter_colors();
smeter->tooltip(_("Click to set power level"));
smeter->callback( (Fl_Callback *) cb_meters);
smeter->hide();
pwrlevel_grp = new Fl_Group(
smeter->x(), smeter->y(),
smeter->w(), smeter->h());
pwr_level = new Fl_Value_Slider2(
pwrlevel_grp->x(), pwrlevel_grp->y(),
pwrlevel_grp->w() - 50, pwrlevel_grp->h());
pwr_level->type(FL_HOR_NICE_SLIDER);
pwr_level->range(0, 100.0);
pwr_level->step(1);
pwr_level->callback( (Fl_Callback *) cb_set_pwr_level );
pwr_level->color( fl_rgb_color(
progdefaults.bwsrSliderColor.R,
progdefaults.bwsrSliderColor.G,
progdefaults.bwsrSliderColor.B));
pwr_level->selection_color( fl_rgb_color(
progdefaults.bwsrSldrSelColor.R,
progdefaults.bwsrSldrSelColor.G,
progdefaults.bwsrSldrSelColor.B));
pwr_level->tooltip(_("Adjust Power Level"));
set_pwr_level = new Fl_Button(
pwr_level->x() + pwr_level->w(), pwr_level->y(),
50, pwr_level->h(),
_("Done"));
set_pwr_level->tooltip(_("Return to Smeter / Pmeter"));
set_pwr_level->callback( (Fl_Callback *) cb_exit_pwr_level );
pwrlevel_grp->end();
pwrlevel_grp->hide();
qso_combos = new Fl_Group(
qsoFreqDisp1->x(), qsoFreqDisp1->y() + qsoFreqDisp1->h() + pad,
smeter_w, Hentry);
qso_combos->box(FL_FLAT_BOX);
qso_opMODE = new Fl_ListBox(
smeter->x(), smeter->y(), mode_cbo_w, Hentry);
qso_opMODE->box(FL_DOWN_BOX);
qso_opMODE->color(FL_BACKGROUND2_COLOR);
qso_opMODE->selection_color(FL_BACKGROUND_COLOR);
qso_opMODE->labeltype(FL_NORMAL_LABEL);
qso_opMODE->labelfont(0);
qso_opMODE->labelsize(FL_NORMAL_SIZE);
qso_opMODE->labelcolor(FL_FOREGROUND_COLOR);
qso_opMODE->callback((Fl_Callback*)cb_qso_opMODE);
qso_opMODE->align(FL_ALIGN_TOP);
qso_opMODE->when(FL_WHEN_RELEASE);
qso_opMODE->readonly(true);
qso_opMODE->end();
qso_opBW = new Fl_ListBox(
qso_opMODE->x() + mode_cbo_w + pad,
smeter->y(),
bw_cbo_w, Hentry);
qso_opBW->box(FL_DOWN_BOX);
qso_opBW->color(FL_BACKGROUND2_COLOR);
qso_opBW->selection_color(FL_BACKGROUND_COLOR);
qso_opBW->labeltype(FL_NORMAL_LABEL);
qso_opBW->labelfont(0);
qso_opBW->labelsize(FL_NORMAL_SIZE);
qso_opBW->labelcolor(FL_FOREGROUND_COLOR);
qso_opBW->callback((Fl_Callback*)cb_qso_opBW);
qso_opBW->align(FL_ALIGN_TOP);
qso_opBW->when(FL_WHEN_RELEASE);
qso_opBW->readonly(true);
qso_opBW->end();
qso_opGROUP = new Fl_Group(
qso_opMODE->x() + mode_cbo_w + pad,
smeter->y(),
bw_cbo_w, Hentry);
qso_opGROUP->box(FL_FLAT_BOX);
qso_btnBW1 = new Fl_Button(
qso_opGROUP->x(), qso_opGROUP->y(),
qso_opGROUP->h() * 3 / 4, qso_opGROUP->h());
qso_btnBW1->callback((Fl_Callback*)cb_qso_btnBW1);
qso_opBW1 = new Fl_ListBox(
qso_btnBW1->x()+qso_btnBW1->w(), qso_btnBW1->y(),
qso_opGROUP->w() - qso_btnBW1->w(), qso_btnBW1->h());
qso_opBW1->box(FL_DOWN_BOX);
qso_opBW1->color(FL_BACKGROUND2_COLOR);
qso_opBW1->selection_color(FL_BACKGROUND_COLOR);
qso_opBW1->labeltype(FL_NORMAL_LABEL);
qso_opBW1->labelfont(0);
qso_opBW1->labelsize(FL_NORMAL_SIZE);
qso_opBW1->labelcolor(FL_FOREGROUND_COLOR);
qso_opBW1->callback((Fl_Callback*)cb_qso_opBW1);
qso_opBW1->align(FL_ALIGN_TOP);
qso_opBW1->when(FL_WHEN_RELEASE);
qso_opBW1->end();
qso_btnBW1->hide();
qso_opBW1->hide();
qso_btnBW2 = new Fl_Button(
qso_opGROUP->x(), qso_opGROUP->y(),
qso_opGROUP->h() * 3 / 4, qso_opGROUP->h());
qso_btnBW2->callback((Fl_Callback*)cb_qso_btnBW2);
qso_opBW2 = new Fl_ListBox(
qso_btnBW2->x()+qso_btnBW2->w(), qso_btnBW2->y(),
qso_opGROUP->w() - qso_btnBW2->w(), qso_btnBW2->h());
qso_opBW2->box(FL_DOWN_BOX);
qso_opBW2->color(FL_BACKGROUND2_COLOR);
qso_opBW2->selection_color(FL_BACKGROUND_COLOR);
qso_opBW2->labeltype(FL_NORMAL_LABEL);
qso_opBW2->labelfont(0);
qso_opBW2->labelsize(FL_NORMAL_SIZE);
qso_opBW2->labelcolor(FL_FOREGROUND_COLOR);
qso_opBW2->callback((Fl_Callback*)cb_qso_opBW2);
qso_opBW2->align(FL_ALIGN_TOP);
qso_opBW2->when(FL_WHEN_RELEASE);
qso_opBW2->end();
qso_opGROUP->end();
qso_opGROUP->hide();
qso_combos->end();
Fl_Button *smeter_toggle = new Fl_Button(
qso_opBW->x() + qso_opBW->w() + pad, smeter->y(), Wbtn, Hentry);
smeter_toggle->callback(cb_toggle_smeter, 0);
smeter_toggle->tooltip(_("Toggle smeter / combo controls"));
smeter_toggle->image(new Fl_Pixmap(tango_view_refresh));
qso_opPICK = new Fl_Button(
smeter_toggle->x() + Wbtn + pad, smeter->y(), Wbtn, Hentry);
addrbookpixmap = new Fl_Pixmap(address_book_icon);
qso_opPICK->image(addrbookpixmap);
qso_opPICK->callback(showOpBrowserView, 0);
qso_opPICK->tooltip(_("Open List"));
RigControlFrame->resizable(NULL);
RigControlFrame->end();
}
Fl_Group *rightframes = new Fl_Group(
rightof(RigControlFrame) + pad, RigControlFrame->y(),
W - rightof(RigControlFrame) - pad, Hqsoframe);
rightframes->box(FL_FLAT_BOX);
{ // rightframes
RigViewerFrame = new Fl_Group(
rightframes->x(), rightframes->y(),
rightframes->w(), rightframes->h());
{ // RigViewerFrame
qso_btnSelFreq = new Fl_Button(
RigViewerFrame->x(), RigViewerFrame->y() + pad,
Wbtn, Hentry);
qso_btnSelFreq->image(new Fl_Pixmap(left_arrow_icon));
qso_btnSelFreq->tooltip(_("Select"));
qso_btnSelFreq->callback((Fl_Callback*)cb_qso_btnSelFreq);
qso_btnAddFreq = new Fl_Button(
rightof(qso_btnSelFreq) + pad, RigViewerFrame->y() + pad,
Wbtn, Hentry);
qso_btnAddFreq->image(new Fl_Pixmap(plus_icon));
qso_btnAddFreq->tooltip(_("Add current frequency"));
qso_btnAddFreq->callback((Fl_Callback*)cb_qso_btnAddFreq);
qso_btnClearList = new Fl_Button(
RigViewerFrame->x(), RigViewerFrame->y() + Hentry + 2 * pad,
Wbtn, Hentry);
qso_btnClearList->image(new Fl_Pixmap(trash_icon));
qso_btnClearList->tooltip(_("Clear list"));
qso_btnClearList->callback((Fl_Callback*)cb_qso_btnClearList);
qso_btnDelFreq = new Fl_Button(
rightof(qso_btnClearList) + pad, RigViewerFrame->y() + Hentry + 2 * pad,
Wbtn, Hentry);
qso_btnDelFreq->image(new Fl_Pixmap(minus_icon));
qso_btnDelFreq->tooltip(_("Delete from list"));
qso_btnDelFreq->callback((Fl_Callback*)cb_qso_btnDelFreq);
qso_btnAct = new Fl_Button(
RigViewerFrame->x(), RigViewerFrame->y() + 2*(Hentry + pad) + pad,
Wbtn, Hentry);
qso_btnAct->image(new Fl_Pixmap(chat_icon));
qso_btnAct->callback(cb_qso_inpAct);
qso_btnAct->tooltip("Show active frequencies");
qso_inpAct = new Fl_Input2(
rightof(qso_btnAct) + pad, RigViewerFrame->y() + 2*(Hentry + pad) + pad,
Wbtn, Hentry);
qso_inpAct->when(FL_WHEN_ENTER_KEY);
qso_inpAct->callback(cb_qso_inpAct);
qso_inpAct->tooltip("Grid prefix for activity list");
// fwidths set in rigsupport.cxx
qso_opBrowser = new Fl_Browser(
rightof(qso_btnDelFreq) + pad, RigViewerFrame->y() + pad,
rightframes->w() - 2*Wbtn - pad, Hqsoframe - 2 * pad );
qso_opBrowser->column_widths(fwidths);
qso_opBrowser->column_char('|');
qso_opBrowser->tooltip(_("Select operating parameters"));
qso_opBrowser->callback((Fl_Callback*)cb_qso_opBrowser);
qso_opBrowser->type(FL_MULTI_BROWSER);
qso_opBrowser->box(FL_DOWN_BOX);
qso_opBrowser->labelfont(4);
qso_opBrowser->labelsize(12);
#ifdef __APPLE__
qso_opBrowser->textfont(FL_SCREEN_BOLD);
qso_opBrowser->textsize(13);
#else
qso_opBrowser->textfont(FL_HELVETICA);
qso_opBrowser->textsize(13);
#endif
opUsageFrame = new Fl_Group(
qso_opBrowser->x(),
qso_opBrowser->y(),
qso_opBrowser->w(), Hentry);
opUsageFrame->box(FL_DOWN_BOX);
opOutUsage = new Fl_Output(
opUsageFrame->x() + pad, opUsageFrame->y() + opUsageFrame->h() / 2 - Hentry / 2,
opUsageFrame->w() * 4 / 10, Hentry);
opOutUsage->color(FL_BACKGROUND_COLOR);
opUsage = new Fl_Input2(
opOutUsage->x() + opOutUsage->w() + pad,
opOutUsage->y(),
opUsageFrame->w() - opOutUsage->w() - 50 - 3 * pad,
Hentry);
opUsageEnter = new Fl_Button(
opUsage->x() + opUsage->w() , opUsage->y(),
50, Hentry, "Enter");
opUsageEnter->callback((Fl_Callback*)cb_opUsageEnter);
opUsageFrame->end();
opUsageFrame->hide();
RigViewerFrame->resizable(qso_opBrowser);
RigViewerFrame->end();
RigViewerFrame->hide();
}
int y2 = TopFrame1->y() + Hentry + 2 * pad;
int y3 = TopFrame1->y() + 2 * (Hentry + pad) + pad;
x_qsoframe = RigViewerFrame->x();
Logging_frame = new Fl_Group(
rightframes->x(), rightframes->y(),
rightframes->w(), rightframes->h());
{ // Logging frame
{ // buttons
btnQRZ = new Fl_Button(
x_qsoframe, qsoFreqDisp1->y(), Wbtn, Hentry);
btnQRZ->image(new Fl_Pixmap(net_icon));
btnQRZ->callback(cb_QRZ, 0);
btnQRZ->tooltip(_("QRZ"));
qsoClear = new Fl_Button(
x_qsoframe, btnQRZ->y() + pad + Wbtn, Wbtn, Hentry);
qsoClear->image(new Fl_Pixmap(edit_clear_icon));
qsoClear->callback(qsoClear_cb, 0);
qsoClear->tooltip(_("Clear"));
qsoSave = new Fl_Button(
x_qsoframe, qsoClear->y() + pad + Wbtn, Wbtn, Hentry);
qsoSave->image(new Fl_Pixmap(save_icon));
qsoSave->callback(qsoSave_cb, 0);
qsoSave->tooltip(_("Save"));
}
fl_font(progdefaults.LOGGINGtextfont, progdefaults.LOGGINGtextsize);
wf1 = fl_width("xFreq") + 90 +
Hentry +
40 +
fl_width("xOff") + 40 +
fl_width("xIn") + 35 +
fl_width("xOut") + 35;
Logging_frame_1 = new Fl_Group(
rightof(btnQRZ) + pad,
TopFrame1->y(), wf1, Hqsoframe);
{ // Logging frame 1
{ // Line 1
inpFreq1 = new Fl_Input2(
Logging_frame_1->x() + fl_width("xFreq"),
TopFrame1->y() + pad, 90, Hentry, _("Freq"));
inpFreq1->type(FL_NORMAL_OUTPUT);
inpFreq1->tooltip(_("frequency kHz"));
inpFreq1->align(FL_ALIGN_LEFT);
btnTimeOn = new Fl_Button(
rightof(inpFreq1), TopFrame1->y() + pad,
Hentry, Hentry, _("On"));
btnTimeOn->tooltip(_("Press to update QSO start time"));
btnTimeOn->callback(cb_btnTimeOn);
inpTimeOn1 = new Fl_Input2(
rightof(btnTimeOn), TopFrame1->y() + pad,
40, Hentry, "");
inpTimeOn1->tooltip(_("QSO start time"));
inpTimeOn1->align(FL_ALIGN_LEFT);
inpTimeOn1->type(FL_INT_INPUT);
inpTimeOff1 = new Fl_Input2(
rightof(inpTimeOn1) + fl_width("xOff"), TopFrame1->y() + pad,
40, Hentry, _("Off"));
inpTimeOff1->tooltip(_("QSO end time"));
inpRstIn1 = new Fl_Input2(
rightof(inpTimeOff1) + fl_width("xIn"), TopFrame1->y() + pad,
35, Hentry, _("In"));
inpRstIn1->tooltip("RST in");
inpRstIn1->align(FL_ALIGN_LEFT);
inpRstOut1 = new Fl_Input2(
rightof(inpRstIn1) + fl_width("xOut"), TopFrame1->y() + pad,
35, Hentry, _("Out"));
inpRstOut1->tooltip("RST out");
inpRstOut1->align(FL_ALIGN_LEFT);
inpCall1 = new Fl_Input2(
inpFreq1->x(), y2,
rightof(inpTimeOn1) - inpFreq1->x(),
Hentry, _("Call"));
inpCall1->tooltip(_("call sign"));
inpCall1->align(FL_ALIGN_LEFT);
inpName1 = new Fl_Input2(
inpTimeOff1->x(), y2,
rightof(inpRstIn1) - inpTimeOff1->x(),Hentry, _("Op"));
inpName1->tooltip(_("Operator name"));
inpName1->align(FL_ALIGN_LEFT);
inpAZ = new Fl_Input2(
inpRstOut1->x(), y2, 35, Hentry, "Az");
inpAZ->tooltip(_("Azimuth"));
inpAZ->align(FL_ALIGN_LEFT);
}
gGEN_QSO_1 = new Fl_Group (x_qsoframe, y3, wf1, Hentry + pad);
{ // QSO frame 1
inpQth = new Fl_Input2(
inpCall1->x(), y3, inpCall1->w(), Hentry, "Qth");
inpQth->tooltip(_("QTH City"));
inpQth->align(FL_ALIGN_LEFT);
inpQTH = inpQth;
inpState1 = new Fl_Input2(
rightof(inpQth) + 20, y3, 30, Hentry, "St");
inpState1->tooltip(_("US State"));
inpState1->align(FL_ALIGN_LEFT);
inpState = inpState1;
inpVEprov = new Fl_Input2(
rightof(inpState1) + 20, y3, 30, Hentry, "Pr");
inpVEprov->tooltip(_("Can. Province"));
inpVEprov->align(FL_ALIGN_LEFT);
inpLoc1 = new Fl_Input2(
rightof(inpVEprov) + 15, y3,
rightof(inpAZ) - (rightof(inpVEprov) + 15), Hentry, "L");
inpLoc1->tooltip(_("Maidenhead Locator"));
inpLoc1->align(FL_ALIGN_LEFT);
gGEN_QSO_1->end();
}
gGEN_CONTEST = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // Contest - LOG_GENERIC
outSerNo1 = new Fl_Input2(
inpFreq1->x(), y3,
40, Hentry,
"S#");
outSerNo1->align(FL_ALIGN_LEFT);
outSerNo1->tooltip(_("Sent serial number (read only)"));
outSerNo1->type(FL_NORMAL_OUTPUT);
inpSerNo1 = new Fl_Input2(
rightof(outSerNo1) + fl_width("xR#"), y3,
40, Hentry,
"R#");
inpSerNo1->align(FL_ALIGN_LEFT);
inpSerNo1->tooltip(_("Received serial number"));
xtmp = rightof(inpSerNo1) + fl_width("xXch");
inpXchgIn1 = new Fl_Input2(
xtmp, y3,
Logging_frame_1->x() + Logging_frame_1->w() - xtmp, Hentry,
"Xch");
inpXchgIn1->align(FL_ALIGN_LEFT);
inpXchgIn1->tooltip(_("Contest exchange in"));
gGEN_CONTEST->end();
gGEN_CONTEST->hide();
}
gFD = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // Field Day - LOG_FD
inp_FD_class1 = new Fl_Input2(
Logging_frame_1->x() + fl_width("xClass"), y3, 40, Hentry,
"Class");
inp_FD_class1->align(FL_ALIGN_LEFT);
inp_FD_class1->tooltip(_("Received FD class"));
inp_FD_class1->type(FL_NORMAL_INPUT);
inp_FD_section1 = new Fl_Input2(
rightof(inp_FD_class1) + fl_width("xSection"), y3, 40, Hentry,
"Section");
inp_FD_section1->align(FL_ALIGN_LEFT);
inp_FD_section1->tooltip(_("Received FD section"));
inp_FD_section1->type(FL_NORMAL_INPUT);
gFD->end();
gFD->hide();
}
gKD_1 = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // ARRL Kids Day - LOG_KD
inp_KD_age1 = new Fl_Input2(
inpCall1->x(), y3, 40, Hentry,
"Age");
inp_KD_age1->align(FL_ALIGN_LEFT);
inp_KD_age1->tooltip(_("Guest operators age"));
inp_KD_age1->type(FL_NORMAL_INPUT);
inp_KD_state1 = new Fl_Input2(
rightof(inp_KD_age1) + fl_width("xSt"), y3, 40, Hentry,
"St");
inp_KD_state1->align(FL_ALIGN_LEFT);
inp_KD_state1->tooltip(_("Station state"));
inp_KD_state1->type(FL_NORMAL_INPUT);
inp_KD_VEprov1 = new Fl_Input2(
rightof(inp_KD_state1) + fl_width("xPr"), y3, 40, Hentry,
"Pr");
inp_KD_VEprov1->align(FL_ALIGN_LEFT);
inp_KD_VEprov1->tooltip(_("Station province"));
inp_KD_VEprov1->type(FL_NORMAL_INPUT);
inp_KD_XchgIn1 = new Fl_Input2(
rightof(inp_KD_VEprov1) + fl_width("xXchg"), y3,
gKD_1->x() + gKD_1->w() - (rightof(inp_KD_VEprov1) + fl_width("xXchg")), Hentry,
"Xch");
inp_KD_XchgIn1->align(FL_ALIGN_LEFT);
inp_KD_XchgIn1->tooltip(_("Additional Exchange"));
inp_KD_XchgIn1->type(FL_NORMAL_INPUT);
gKD_1->end();
gKD_1->hide();
}
gARR = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_ARR rookie roundup
inp_ARR_check1 = new Fl_Input2(
inpCall1->x(), y3, 40, Hentry,
"Chk");
inp_ARR_check1->align(FL_ALIGN_LEFT);
inp_ARR_check1->tooltip(_("Check / birth-year"));
inp_ARR_check1->type(FL_NORMAL_INPUT);
inp_ARR_XchgIn1 = new Fl_Input2(
rightof(inp_ARR_check1) + fl_width("xXchg"), y3,
gARR->x() + gARR->w() - (rightof(inp_ARR_check1) + fl_width("xXchg")), Hentry,
"Xchg");
inp_ARR_XchgIn1->align(FL_ALIGN_LEFT);
inp_ARR_XchgIn1->tooltip(_("Round Up Exchange - State, Province, Country"));
inp_ARR_XchgIn1->type(FL_NORMAL_INPUT);
gARR->end();
gARR->hide();
}
g1010 = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_1010
inp_1010_nr1 = new Fl_Input2(
g1010->x() + fl_width("x1010#"), y3, 60, Hentry,
"1010#");
inp_1010_nr1->align(FL_ALIGN_LEFT);
inp_1010_nr1->tooltip(_("1010 number"));
inp_1010_nr1->type(FL_NORMAL_INPUT);
inp_1010_XchgIn1 = new Fl_Input2(
rightof(inp_1010_nr1) + fl_width("xXchg"), y3,
g1010->x() + g1010->w() - (rightof(inp_1010_nr1) + fl_width("xXchg")), Hentry,
"Xchg");
inp_1010_XchgIn1->align(FL_ALIGN_LEFT);
inp_1010_XchgIn1->tooltip(_("1010 exchange"));
inp_1010_XchgIn1->type(FL_NORMAL_INPUT);
g1010->end();
g1010->hide();
}
gVHF = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_VHF
inp_vhf_RSTin1 = new Fl_Input2(
gVHF->x() + fl_width("xRSTin"), y3, 60, Hentry,
"RSTin");
inp_vhf_RSTin1->align(FL_ALIGN_LEFT);
inp_vhf_RSTin1->tooltip(_("Received RST"));
inp_vhf_RSTin1->type(FL_NORMAL_INPUT);
inp_vhf_RSTout1 = new Fl_Input2(
rightof(inp_vhf_RSTin1) + fl_width("xout"), y3, 60, Hentry,
"out");
inp_vhf_RSTout1->align(FL_ALIGN_LEFT);
inp_vhf_RSTout1->tooltip(_("Sent RST"));
inp_vhf_RSTout1->type(FL_NORMAL_INPUT);
inp_vhf_Loc1 = new Fl_Input2(
rightof(inp_vhf_RSTout1) + fl_width("xGrid"), y3, 80, Hentry,
"Grid");
inp_vhf_Loc1->align(FL_ALIGN_LEFT);
inp_vhf_Loc1->tooltip(_("Grid Locator"));
inp_vhf_Loc1->type(FL_NORMAL_INPUT);
gVHF->end();
gVHF->hide();
}
gCQWW_RTTY = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // CQWW RTTY - LOG_CQWW_RTTY
inp_CQzone1 = new Fl_Input2(
gCQWW_RTTY->x() + fl_width("xCQz"), y3, 40, Hentry,
"CQz");
inp_CQzone1->align(FL_ALIGN_LEFT);
inp_CQzone1->tooltip(_("Received CQ zone"));
inp_CQzone1->type(FL_NORMAL_INPUT);
inp_CQstate1 = new Fl_Input2(
rightof(inp_CQzone1) + fl_width("xCQs"), y3, 40, Hentry,
"CQs");
inp_CQstate1->align(FL_ALIGN_LEFT);
inp_CQstate1->tooltip(_("Received State/Prov"));
inp_CQstate1->type(FL_NORMAL_INPUT);
gCQWW_RTTY->end();
gCQWW_RTTY->hide();
}
gCQWW_DX = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // CQWW DX -- LOG_CQWWDX0
inp_CQDXzone1 = new Fl_Input2(
gCQWW_DX->x() + fl_width("xCQz"), y3, 40, Hentry,
"CQz");
inp_CQDXzone1->align(FL_ALIGN_LEFT);
inp_CQDXzone1->tooltip(_("Received CQ zone"));
inp_CQDXzone1->type(FL_NORMAL_INPUT);
gCQWW_DX->end();
gCQWW_DX->hide();
}
gCQWPX = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_CQWPX
outSerNo_WPX1 = new Fl_Input2(
inpCall1->x(), y3, 40, Hentry,
"S #");
outSerNo_WPX1->align(FL_ALIGN_LEFT);
outSerNo_WPX1->tooltip(_("Sent serno"));
outSerNo_WPX1->type(FL_NORMAL_OUTPUT);
inpSerNo_WPX1 = new Fl_Input2(
rightof(outSerNo_WPX1) + fl_width("xR#"), y3, 40, Hentry,
"R#");
inpSerNo_WPX1->align(FL_ALIGN_LEFT);
inpSerNo_WPX1->tooltip(_("Received serno"));
inpSerNo_WPX1->type(FL_NORMAL_INPUT);
gCQWPX->end();
gCQWPX->hide();
}
gCWSS = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // CW Sweepstakes - LOG_CWSS
outSerNo3 = new Fl_Input2(
inpCall1->x(), y3, 40, Hentry,
"S#");
outSerNo3->align(FL_ALIGN_LEFT);
outSerNo3->tooltip(_("Sent serno"));
outSerNo3->type(FL_NORMAL_OUTPUT);
inp_SS_SerialNoR1 = new Fl_Input2(
rightof(outSerNo3) + fl_width("xR#"), y3, 40, Hentry,
"R#");
inp_SS_SerialNoR1->align(FL_ALIGN_LEFT);
inp_SS_SerialNoR1->tooltip(_("Received serno"));
inp_SS_SerialNoR1->type(FL_NORMAL_INPUT);
inp_SS_Precedence1 = new Fl_Input2(
rightof(inp_SS_SerialNoR1) + fl_width("xPre"), y3, 40, Hentry,
"Pre");
inp_SS_Precedence1->align(FL_ALIGN_LEFT);
inp_SS_Precedence1->tooltip(_("SS Precedence"));
inp_SS_Precedence1->type(FL_NORMAL_INPUT);
inp_SS_Check1 = new Fl_Input2(
rightof(inp_SS_Precedence1) + fl_width("xChk"), y3, 40, Hentry,
"Chk");
inp_SS_Check1->align(FL_ALIGN_LEFT);
inp_SS_Check1->tooltip(_("SS Check"));
inp_SS_Check1->type(FL_NORMAL_INPUT);
inp_SS_Section1 = new Fl_Input2(
rightof(inp_SS_Check1) + fl_width("xSec"), y3, 40, Hentry,
"Sec");
inp_SS_Section1->align(FL_ALIGN_LEFT);
inp_SS_Section1->tooltip(_("SS section"));
inp_SS_Section1->type(FL_NORMAL_INPUT);
gCWSS->end();
gCWSS->hide();
}
gASCR = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // School Roundup - LOG_ASCR
inp_ASCR_class1 = new Fl_Input2(
Logging_frame_1->x() + fl_width("xClass"), y3, 30, Hentry,
"Class");
inp_ASCR_class1->align(FL_ALIGN_LEFT);
inp_ASCR_class1->tooltip(_("ASCR class, I/C/S"));
inp_ASCR_class1->type(FL_NORMAL_INPUT);
inp_ASCR_class1->hide();
xtmp = rightof(inp_ASCR_class1) + fl_width("xSPC");
inp_ASCR_XchgIn1 = new Fl_Input2(
xtmp, y3,
Logging_frame_1->x() + Logging_frame_1->w() - xtmp - pad, Hentry,
"SPC");
inp_ASCR_XchgIn1->align(FL_ALIGN_LEFT);
inp_ASCR_XchgIn1->tooltip(_("State/Province/Country received"));
inp_ASCR_XchgIn1->type(FL_NORMAL_INPUT);
inp_ASCR_XchgIn1->hide();
gASCR->end();
gASCR->hide();
}
gIARI = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // IARI - Italian International DX LOG_IARI
inp_IARI_PR1 = new Fl_Input2(
inpCall1->x(), y3, 40, Hentry,
"Pr");
inp_IARI_PR1->align(FL_ALIGN_LEFT);
inp_IARI_PR1->tooltip(_("Received Province / Ser #"));
inp_IARI_PR1->type(FL_NORMAL_INPUT);
out_IARI_SerNo1 = new Fl_Input2(
rightof(inp_IARI_PR1) + fl_width("xS#"), y3, 40, Hentry,
"S#");
out_IARI_SerNo1->align(FL_ALIGN_LEFT);
out_IARI_SerNo1->tooltip(_("Sent serno"));
out_IARI_SerNo1->type(FL_NORMAL_OUTPUT);
inp_IARI_SerNo1 = new Fl_Input2(
rightof(out_IARI_SerNo1) + fl_width("xR#"), y3, 40, Hentry,
"R#");
inp_IARI_SerNo1->align(FL_ALIGN_LEFT);
inp_IARI_SerNo1->tooltip(_("Received serno"));
inp_IARI_SerNo1->type(FL_NORMAL_INPUT);
gIARI->end();
gIARI->hide();
}
gNAQP = new Fl_Group(
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // North American Qso Party - LOG_NAQP
inpSPCnum_NAQP1 = new Fl_Input2(
Logging_frame_1->x() + fl_width("xNAQP xchg"), y3, 100, Hentry,
"NAQP xchg");
inpSPCnum_NAQP1->align(FL_ALIGN_LEFT);
inpSPCnum_NAQP1->tooltip(_("Received State/Province/Country"));
inpSPCnum_NAQP1->type(FL_NORMAL_INPUT);
inpSPCnum_NAQP1->hide();
gNAQP->end();
gNAQP->hide();
}
gARRL_RTTY = new Fl_Group(
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_RTTY ARRL RTTY Roundup
inpRTU_stpr1 = new Fl_Input2(
inpCall1->x(), y3, fl_width("xWWW"), Hentry,
"S/P");
inpRTU_stpr1->align(FL_ALIGN_LEFT);
inpRTU_stpr1->tooltip(_("State/Province/#"));
inpRTU_stpr1->type(FL_NORMAL_INPUT);
xtmp = rightof(inpRTU_stpr1) + fl_width("xSer");
inpRTU_serno1 = new Fl_Input2(
xtmp, y3, fl_width("x9999"), Hentry, "Ser");
inpRTU_serno1->align(FL_ALIGN_LEFT);
inpRTU_serno1->tooltip(_("Serial number received"));
inpRTU_serno1->type(FL_NORMAL_INPUT);
gARRL_RTTY->end();
gARRL_RTTY->hide();
}
gNAS = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // NA Sprint - LOG_NAS
outSerNo5 = new Fl_Input2(
Logging_frame_1->x() + fl_width("xS#"), y3, 40, Hentry,
"S#");
outSerNo5->align(FL_ALIGN_LEFT);
outSerNo5->tooltip(_("Sent serial number"));
outSerNo5->type(FL_NORMAL_OUTPUT);
outSerNo5->hide();
xtmp = rightof(outSerNo5) + fl_width("xR#");
inp_ser_NAS1 = new Fl_Input2(
xtmp, y3, 40, Hentry,
"R #");
inp_ser_NAS1->align(FL_ALIGN_LEFT);
inp_ser_NAS1->tooltip(_("Received serial number"));
inp_ser_NAS1->type(FL_NORMAL_INPUT);
inp_ser_NAS1->hide();
xtmp = rightof(inp_ser_NAS1) + fl_width("xS/P/C");
inpSPCnum_NAS1 = new Fl_Input2(
xtmp, y3,
Logging_frame_1->x() + Logging_frame_1->w() - xtmp - pad, Hentry,
"S/P/C");
inpSPCnum_NAS1->align(FL_ALIGN_LEFT);
inpSPCnum_NAS1->tooltip(_("State/Province/Country received"));
inpSPCnum_NAS1->type(FL_NORMAL_INPUT);
inpSPCnum_NAS1->hide();
gASCR->end();
gASCR->hide();
}
gAIDX = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_AAM
outSerNo7 = new Fl_Input2(
Logging_frame_1->x() + fl_width("xS#"), y3, 40, Hentry,
"S#");
outSerNo7->align(FL_ALIGN_LEFT);
outSerNo7->tooltip(_("Sent serial number"));
outSerNo7->type(FL_NORMAL_OUTPUT);
outSerNo7->hide();
xtmp = rightof(outSerNo7) + fl_width("xR#");
inpSerNo3 = new Fl_Input2(
xtmp, y3, 40, Hentry,
"R#");
inpSerNo3->align(FL_ALIGN_LEFT);
inpSerNo3->tooltip(_("Received serial number"));
inpSerNo3->type(FL_NORMAL_INPUT);
inpSerNo3->hide();
gAIDX->end();
gAIDX->hide();
}
gJOTA = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_JOTA - Jamboree On The Air
xtmp = Logging_frame_1->x() + fl_width("xTroop");
inp_JOTA_troop1 = new Fl_Input2(
xtmp, y3, 60, Hentry,
"Troop");
inp_JOTA_troop1->align(FL_ALIGN_LEFT);
inp_JOTA_troop1->tooltip(_("Troop received"));
inp_JOTA_troop1->type(FL_NORMAL_INPUT);
inp_JOTA_troop1->hide();
xtmp = rightof(inp_JOTA_troop1) + fl_width("xScout");
inp_JOTA_scout1 = new Fl_Input2(
xtmp, y3, 80, Hentry,
"Scout");
inp_JOTA_scout1->align(FL_ALIGN_LEFT);
inp_JOTA_scout1->tooltip(_("Scout name received"));
inp_JOTA_scout1->type(FL_NORMAL_INPUT);
inp_JOTA_scout1->hide();
xtmp = rightof(inp_JOTA_scout1) + fl_width("xS/P/C");
inp_JOTA_spc1 = new Fl_Input2(
xtmp, y3,
Logging_frame_1->x() + Logging_frame_1->w() - xtmp - pad, Hentry,
"S/P/C");
inp_JOTA_spc1->align(FL_ALIGN_LEFT);
inp_JOTA_spc1->tooltip(_("State/Province/Country received"));
inp_JOTA_spc1->type(FL_NORMAL_INPUT);
inp_JOTA_spc1->hide();
gJOTA->end();
gJOTA->hide();
}
gAICW = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_AICW - ARRL International DX - CW
xtmp = Logging_frame_1->x() + fl_width("xPwr-R");
inpSPCnum_AICW1 = new Fl_Input2(
xtmp, y3, 60, Hentry,
"Pwr-R");
inpSPCnum_AICW1->align(FL_ALIGN_LEFT);
inpSPCnum_AICW1->tooltip(_("Power received"));
inpSPCnum_AICW1->type(FL_NORMAL_INPUT);
inpSPCnum_AICW1->hide();
gAICW->end();
gAICW->hide();
}
gSQSO = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_SQSO - all state QSO party controls
xtmp = inpCall1->x();
inpSQSO_state1 = new Fl_Input2(
xtmp, y3, fl_width("xWW"), Hentry,
"St");
inpSQSO_state1->align(FL_ALIGN_LEFT);
inpSQSO_state1->tooltip(_("State received"));
inpSQSO_state1->type(FL_NORMAL_INPUT);
inpSQSO_state1->hide();
xtmp = rightof(inpSQSO_state1) + fl_width("xCnty");
inpSQSO_county1 = new Fl_Input2(
xtmp, y3, fl_width("WWWWW"), Hentry,
"Cnty");
inpSQSO_county1->align(FL_ALIGN_LEFT);
inpSQSO_county1->tooltip(_("County received"));
inpSQSO_county1->type(FL_NORMAL_INPUT);
inpSQSO_county1->hide();
inpCounty = inpSQSO_county1;
xtmp = rightof(inpSQSO_county1) + fl_width("xS#");
outSQSO_serno1 = new Fl_Input2(
xtmp, y3, fl_width("9999"), Hentry,
"S#");
outSQSO_serno1->align(FL_ALIGN_LEFT);
outSQSO_serno1->tooltip(_("Sent serial number"));
outSQSO_serno1->type(FL_NORMAL_INPUT);
outSQSO_serno1->hide();
xtmp = rightof(outSQSO_serno1) + fl_width("xR#");
inpSQSO_serno1 = new Fl_Input2(
xtmp, y3, fl_width("9999"), Hentry,
"R#");
inpSQSO_serno1->align(FL_ALIGN_LEFT);
inpSQSO_serno1->tooltip(_("Received serial number"));
inpSQSO_serno1->type(FL_NORMAL_INPUT);
inpSQSO_serno1->hide();
xtmp = rightof(inpSQSO_serno1) + fl_width("x Cat");
inpSQSO_category1 = new Fl_Input2(
xtmp, y3, gSQSO->x() + gSQSO->w() - xtmp - pad, Hentry,
"Cat");
inpSQSO_category1->tooltip(_("Category: CLB, MOB, QRP, STD"));
inpSQSO_category1->type(FL_NORMAL_INPUT);
inpSQSO_category1->hide();
inpSQSO_category = inpSQSO_category1;
gSQSO->end();
gSQSO->hide();
}
gWAE = new Fl_Group (
Logging_frame_1->x(), y3, wf1, Hentry + pad);
{ // LOG_WAE
outSerNo_WAE1 = new Fl_Input2(
inpCall1->x(), y3, 40, Hentry,
"S #");
outSerNo_WAE1->align(FL_ALIGN_LEFT);
outSerNo_WAE1->tooltip(_("Sent serno"));
outSerNo_WAE1->type(FL_NORMAL_OUTPUT);
inpSerNo_WAE1 = new Fl_Input2(
rightof(outSerNo_WAE1) + fl_width("xR#"), y3, 40, Hentry,
"R#");
inpSerNo_WAE1->align(FL_ALIGN_LEFT);
inpSerNo_WAE1->tooltip(_("Received serno"));
inpSerNo_WAE1->type(FL_NORMAL_INPUT);
// xtmp = rightof(inpSerNo_WAE1) + fl_width("xCntry");
// cboCountryWAE1 = new Fl_ComboBox(
// xtmp, y3,
// Logging_frame_1->x() + Logging_frame_1->w() - xtmp - pad, Hentry,
// "Cntry");
// cboCountryWAE1->align(FL_ALIGN_LEFT);
// cboCountryWAE1->tooltip(_("Country"));
// cboCountryWAE1->end();
gWAE->end();
gWAE->hide();
}
Logging_frame_1->resizable(NULL);
Logging_frame_1->end();
}
{ // NFtabs groups // Logging frame 2
int nfx = rightof(Logging_frame_1) + pad;
int nfy = Logging_frame_1->y();
int nfw = W - nfx - pad - 59 - pad;
int nfh = Logging_frame_1->h();
NFtabs = new Fl_Tabs(nfx, nfy, nfw, nfh, "");
int cax = nfx + pad;
int caw = nfw - 2*pad;
int cay = nfy + Hentry;
int cah = nfh - Hentry;
Ccframe = new Fl_Group(cax, cay, caw, cah, "Cnty/Cntry");
cboCountyQSO = new Fl_ComboBox(
cax + pad, inpCall1->y(), caw - 2*pad, Hentry, "");
cboCountyQSO->tooltip(_("County"));
cboCountyQSO->callback(cb_CountyQSO);
cboCountyQSO->readonly();
cboCountyQSO->end();
cboCountryQSO = new Fl_ComboBox(
cax + pad, inpQth->y(), caw - 2*pad, Hentry, "");
cboCountryQSO->tooltip(_("Country"));
cboCountryQSO->readonly();
cboCountryQSO->end();
Ccframe->end();
NotesFrame = new Fl_Group(cax, cay, caw, cah,"Notes");
inpNotes = new Fl_Input2(
cax + pad, cay + pad, caw-2*pad, cah-2*pad, "");
inpNotes->type(FL_MULTILINE_INPUT);
inpNotes->tooltip(_("Notes"));
NotesFrame->end();
NFtabs->end();
}
// NFtabs end
ifkp_avatar = new picture(
W - 59 - pad, NFtabs->y(), 59, 74);
ifkp_avatar->box(FL_FLAT_BOX);
ifkp_avatar->noslant();
ifkp_avatar->callback(cb_ifkp_send_avatar);
ifkp_avatar->tooltip(_("Left click - save avatar\nRight click - send my avatar"));
ifkp_load_avatar();
ifkp_avatar->hide();
thor_avatar = new picture(
W - 59 - pad, NFtabs->y(), 59, 74);
thor_avatar->box(FL_FLAT_BOX);
thor_avatar->noslant();
thor_avatar->callback(cb_thor_send_avatar);
thor_avatar->tooltip(_("Left click - save avatar\nRight click - send my avatar"));
thor_load_avatar();
thor_avatar->hide();
Logging_frame->end();
Logging_frame->resizable(NFtabs);
// Logging_frame->resizable(Logging_frame_2);
}
rightframes->end();
}
TopFrame1->resizable(rightframes);
TopFrame1->end();
}
TopFrame2 = new Fl_Group(0, TopFrame1->y(), W, Hentry + 2 * pad);
{ // TopFrame2
int y = TopFrame1->y() + pad;
int h = Hentry;
qsoFreqDisp2 = new cFreqControl(
pad, y,
freqwidth, freqheight, "10");
qsoFreqDisp2->box(FL_DOWN_BOX);
qsoFreqDisp2->color(FL_BACKGROUND_COLOR);
qsoFreqDisp2->selection_color(FL_BACKGROUND_COLOR);
qsoFreqDisp2->labeltype(FL_NORMAL_LABEL);
qsoFreqDisp2->align(FL_ALIGN_CENTER);
qsoFreqDisp2->when(FL_WHEN_RELEASE);
qsoFreqDisp2->callback(qso_movFreq);
qsoFreqDisp2->font(progdefaults.FreqControlFontnbr);
qsoFreqDisp2->SetONOFFCOLOR(
fl_rgb_color( progdefaults.FDforeground.R,
progdefaults.FDforeground.G,
progdefaults.FDforeground.B),
fl_rgb_color( progdefaults.FDbackground.R,
progdefaults.FDbackground.G,
progdefaults.FDbackground.B));
qsoFreqDisp2->value(0);
qso_opPICK2 = new Fl_Button(
rightof(qsoFreqDisp2), y,
Wbtn, Hentry);
qso_opPICK2->align(FL_ALIGN_INSIDE);
qso_opPICK2->image(addrbookpixmap);
qso_opPICK2->callback(showOpBrowserView2, 0);
qso_opPICK2->tooltip(_("Open List"));
btnQRZ2 = new Fl_Button(
pad + rightof(qso_opPICK2), y,
Wbtn, Hentry);
btnQRZ2->align(FL_ALIGN_INSIDE);
btnQRZ2->image(new Fl_Pixmap(net_icon));
btnQRZ2->callback(cb_QRZ, 0);
btnQRZ2->tooltip(_("QRZ"));
qsoClear2 = new Fl_Button(
pad + rightof(btnQRZ2), y,
Wbtn, Hentry);
qsoClear2->align(FL_ALIGN_INSIDE);
qsoClear2->image(new Fl_Pixmap(edit_clear_icon));
qsoClear2->callback(qsoClear_cb, 0);
qsoClear2->tooltip(_("Clear"));
qsoSave2 = new Fl_Button(
pad + rightof(qsoClear2), y,
Wbtn, Hentry);
qsoSave2->align(FL_ALIGN_INSIDE);
qsoSave2->image(new Fl_Pixmap(save_icon));
qsoSave2->callback(qsoSave_cb, 0);
qsoSave2->tooltip(_("Save"));
const char *label2 = _("On");
btnTimeOn2 = new Fl_Button(
pad + rightof(qsoSave2), y,
static_cast<int>(fl_width(label2)), h, label2);
btnTimeOn2->tooltip(_("Press to update"));
btnTimeOn2->callback(cb_btnTimeOn);
inpTimeOn2 = new Fl_Input2(
pad + btnTimeOn2->x() + btnTimeOn2->w(), y,
w_inpTime2, h, "");
inpTimeOn2->tooltip(_("Time On"));
inpTimeOn2->type(FL_INT_INPUT);
const char *label3 = _("Off");
Fl_Box *bx3 = new Fl_Box(pad + rightof(inpTimeOn2), y,
static_cast<int>(fl_width(label3)), h, label3);
inpTimeOff2 = new Fl_Input2(
pad + bx3->x() + bx3->w(), y,
w_inpTime2, h, "");
inpTimeOff2->tooltip(_("Time Off"));
inpTimeOff2->type(FL_NORMAL_OUTPUT);
const char *label4 = _("Call");
Fl_Box *bx4 = new Fl_Box(pad + rightof(inpTimeOff2), y,
static_cast<int>(fl_width(label4)), h, label4);
inpCall2 = new Fl_Input2(
pad + bx4->x() + bx4->w(), y,
w_inpCall2, h, "");
inpCall2->tooltip(_("Other call"));
const char *label6 = _("In");
Fl_Box *bx6 = new Fl_Box(pad + rightof(inpCall2), y,
static_cast<int>(fl_width(label6)), h, label6);
inpRstIn2 = new Fl_Input2(
pad + bx6->x() + bx6->w(), y,
w_inpRstIn2, h, "");
inpRstIn2->tooltip(_("Received RST"));
const char *label7 = _("Out");
Fl_Box *bx7 = new Fl_Box(pad + rightof(inpRstIn2), y,
static_cast<int>(fl_width(label7)), h, label7);
inpRstOut2 = new Fl_Input2(
pad + bx7->x() + bx7->w(), y,
w_inpRstOut2, h, "");
inpRstOut2->tooltip(_("Sent RST"));
const char *label5 = _("Nm");
Fl_Box *bx5 = new Fl_Box(pad + rightof(inpRstOut2), y,
static_cast<int>(fl_width(label5)), h, label5);
int xn = pad + bx5->x() + bx5->w();
inpName2 = new Fl_Input2(
xn, y,
W - xn - pad, h, "");
inpName2->tooltip(_("Other name"));
TopFrame2->resizable(inpName2);
TopFrame2->end();
TopFrame2->hide();
}
TopFrame3 = new Fl_Group(0, TopFrame1->y(), W, Hentry + 2 * pad);
{ // TopFrame3
int y = TopFrame3->y() + pad;
int h = Hentry;
fl_font(progdefaults.LOGGINGtextfont, progdefaults.LOGGINGtextsize);
const char *xData = "x8888";
const char *xCall = "xWW8WWW";
const char *xRST = "x599";
int wData = static_cast<int>(fl_width(xData));
int wCall = static_cast<int>(fl_width(xCall));
int wRST = static_cast<int>(fl_width(xRST));
int w3a = pad + freqwidth +
3*(pad + Wbtn) +
fl_width("xCall") + wCall;
// Top Frame 3a
// freqdisp, oppick, qsoclear, qsosave, call
TopFrame3a = new Fl_Group(
0, TopFrame1->y(),
w3a, Hentry,"");
qsoFreqDisp3 = new cFreqControl(
pad, y,
freqwidth, freqheight, "10");
qsoFreqDisp3->box(FL_DOWN_BOX);
qsoFreqDisp3->color(FL_BACKGROUND_COLOR);
qsoFreqDisp3->selection_color(FL_BACKGROUND_COLOR);
qsoFreqDisp3->labeltype(FL_NORMAL_LABEL);
qsoFreqDisp3->align(FL_ALIGN_CENTER);
qsoFreqDisp3->when(FL_WHEN_RELEASE);
qsoFreqDisp3->callback(qso_movFreq);
qsoFreqDisp3->font(progdefaults.FreqControlFontnbr);
qsoFreqDisp3->SetONOFFCOLOR(
fl_rgb_color( progdefaults.FDforeground.R,
progdefaults.FDforeground.G,
progdefaults.FDforeground.B),
fl_rgb_color( progdefaults.FDbackground.R,
progdefaults.FDbackground.G,
progdefaults.FDbackground.B));
qsoFreqDisp3->value(0);
qso_opPICK3 = new Fl_Button(
pad + rightof(qsoFreqDisp3), y,
Wbtn, Hentry);
qso_opPICK3->align(FL_ALIGN_INSIDE);
qso_opPICK3->image(addrbookpixmap);
qso_opPICK3->callback(showOpBrowserView2, 0);
qso_opPICK3->tooltip(_("Open List"));
qsoClear3 = new Fl_Button(
pad + rightof(qso_opPICK3), y,
Wbtn, Hentry);
qsoClear3->align(FL_ALIGN_INSIDE);
qsoClear3->image(new Fl_Pixmap(edit_clear_icon));
qsoClear3->callback(qsoClear_cb, 0);
qsoClear3->tooltip(_("Clear"));
qsoSave3 = new Fl_Button(
pad + rightof(qsoClear3), y,
Wbtn, Hentry);
qsoSave3->align(FL_ALIGN_INSIDE);
qsoSave3->image(new Fl_Pixmap(save_icon));
qsoSave3->callback(qsoSave_cb, 0);
qsoSave3->tooltip(_("Save"));
inpCall3 = new Fl_Input2(
rightof(qsoSave3) + fl_width("Call"), y,
wCall, h, "Call");
inpCall3->align(FL_ALIGN_LEFT);
inpCall3->tooltip(_("Other call"));
TopFrame3a->end();
TopFrame3b = new Fl_Group(
rightof(TopFrame3a), TopFrame1->y(),
W - rightof(TopFrame3a), Hentry,"");
// LOG_GENERIC - partial
log_generic_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
btnTimeOn3 = new Fl_Button(
rightof(inpCall3) + pad, y,
h, h, "On");
btnTimeOn3->tooltip(_("Press to update"));
btnTimeOn3->callback(cb_btnTimeOn);
inpTimeOn3 = new Fl_Input2(
rightof(btnTimeOn3) + pad, y,
wData, h, "");
inpTimeOn3->tooltip(_("Time On"));
inpTimeOn3->type(FL_INT_INPUT);
inpTimeOff3 = new Fl_Input2(
rightof(inpTimeOn3) + fl_width("xOff"), y,
wData, h, "Off");
inpTimeOff3->tooltip(_("Time Off"));
inpTimeOff3->type(FL_NORMAL_OUTPUT);
inpSerNo2 = new Fl_Input2(
rightof(inpTimeOff3) + fl_width("xR#"), y,
wData, h, "R#");
inpSerNo2->align(FL_ALIGN_LEFT);
inpSerNo2->tooltip(_("Received serial number"));
outSerNo2 = new Fl_Input2(
rightof(inpSerNo2) + fl_width("xS#"), y,
wData, h, "S#");
outSerNo2->align(FL_ALIGN_LEFT);
outSerNo2->tooltip(_("Sent serial number (read only)"));
inpXchgIn2 = new Fl_Input2(
rightof(outSerNo2) + fl_width("xXch"), y,
fl_digi_main->w() - (rightof(outSerNo2) + fl_width("xXchg"))- pad, h, "Xch");
inpXchgIn2->align(FL_ALIGN_LEFT);
inpXchgIn2->tooltip(_("Contest exchange in"));
Fl_Box lgf_box(rightof(inpXchgIn2), y, pad, h,"");
lgf_box.box(FL_FLAT_BOX);
log_generic_frame->end();
log_generic_frame->hide();
log_generic_frame->resizable(lgf_box);
// end LOG_GENERIC - partial
// LOG_FD - partial
log_fd_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
btnTimeOn4 = new Fl_Button(
rightof(inpCall3) + pad, y,
h, h, "On");
btnTimeOn4->tooltip(_("Press to update"));
btnTimeOn4->callback(cb_btnTimeOn);
inpTimeOn4 = new Fl_Input2(
rightof(btnTimeOn4) + pad, y,
wData, h, "");
inpTimeOn4->tooltip(_("Time On"));
inpTimeOn4->type(FL_INT_INPUT);
inpTimeOff4 = new Fl_Input2(
rightof(inpTimeOn4) + fl_width("xOff"), y,
wData, h, "Off");
inpTimeOff4->tooltip(_("Time Off"));
inpTimeOff4->type(FL_NORMAL_OUTPUT);
inp_FD_class2 = new Fl_Input2(
rightof(inpTimeOff4) + fl_width("xClass"), y, wData, h, " Class");
inp_FD_class2->align(FL_ALIGN_LEFT);
inp_FD_class2->tooltip(_("Received FD class"));
inp_FD_class2->type(FL_NORMAL_INPUT);
inp_FD_section2 = new Fl_Input2(
rightof(inp_FD_class2) + fl_width("xSect") - pad, y, wData, h, "Sect");
inp_FD_section2->align(FL_ALIGN_LEFT);
inp_FD_section2->tooltip(_("Received FD section"));
inp_FD_section2->type(FL_NORMAL_INPUT);
Fl_Box lfd_box(rightof(inp_FD_section2), y, pad, h,"");
lfd_box.box(FL_FLAT_BOX);
log_fd_frame->end();
log_fd_frame->hide();
log_fd_frame->resizable(lfd_box);
// end LOG_FD - partial
// LOG_KD - partial
log_kd_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inp_KD_name2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xNam"), y, 70, h, "Nam");
inp_KD_name2->align(FL_ALIGN_LEFT);
inp_KD_name2->tooltip("Guest operator");
inp_KD_name2->type(FL_NORMAL_INPUT);
inp_KD_age2 = new Fl_Input2(
rightof(inp_KD_name2) + fl_width("xAge"), y, wData, h,
"Age");
inp_KD_age2->align(FL_ALIGN_LEFT);
inp_KD_age2->tooltip(_("Guest operators age"));
inp_KD_age2->type(FL_NORMAL_INPUT);
inp_KD_state2 = new Fl_Input2(
rightof(inp_KD_age2) + fl_width("xSt"), y, 40, h,
"St");
inp_KD_state2->align(FL_ALIGN_LEFT);
inp_KD_state2->tooltip(_("Station state"));
inp_KD_state2->type(FL_NORMAL_INPUT);
inp_KD_VEprov2 = new Fl_Input2(
rightof(inp_KD_state2) + fl_width("xPr"), y, 40, h,
"Pr");
inp_KD_VEprov2->align(FL_ALIGN_LEFT);
inp_KD_VEprov2->tooltip(_("Station province"));
inp_KD_VEprov2->type(FL_NORMAL_INPUT);
inp_KD_XchgIn2 = new Fl_Input2(
rightof(inp_KD_VEprov2) + fl_width("xXch"), y,
fl_digi_main->w() - (rightof(inp_KD_state2) + fl_width("xXch")) - pad, h,
"Xch");
inp_KD_XchgIn2->align(FL_ALIGN_LEFT);
inp_KD_XchgIn2->tooltip(_("Special Kids Day Special Exchange"));
inp_KD_XchgIn2->type(FL_NORMAL_INPUT);
Fl_Box lkd_box(rightof(inp_KD_XchgIn2), y, pad, h,"");
lkd_box.box(FL_FLAT_BOX);
log_kd_frame->end();
log_kd_frame->hide();
log_kd_frame->resizable(lkd_box);
// end LOG_KD -partial
// LOG_1010 - partial
log_1010_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inp_1010_name2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xOp"), y, 80, h, "Op");
inp_1010_name2->align(FL_ALIGN_LEFT);
inp_1010_name2->tooltip("Operator's name");
inp_1010_name2->type(FL_NORMAL_INPUT);
inp_1010_nr2 = new Fl_Input2(
rightof(inp_1010_name2) + fl_width("x1010"), y, wData, h,
"1010");
inp_1010_nr2->align(FL_ALIGN_LEFT);
inp_1010_nr2->tooltip(_("1010 number"));
inp_1010_nr2->type(FL_NORMAL_INPUT);
inp_1010_XchgIn2 = new Fl_Input2(
rightof(inp_1010_nr2) + fl_width("xXch"), y,
fl_digi_main->w() - (rightof(inp_1010_nr2) + fl_width("xXch")) - pad, h,
"Xch");
inp_1010_XchgIn2->align(FL_ALIGN_LEFT);
inp_1010_XchgIn2->tooltip(_("1010 Exchange"));
inp_1010_XchgIn2->type(FL_NORMAL_INPUT);
Fl_Box l1010_box(rightof(inp_1010_XchgIn2), y, pad, h,"");
l1010_box.box(FL_FLAT_BOX);
log_1010_frame->end();
log_1010_frame->hide();
log_1010_frame->resizable(l1010_box);
// end LOG_1010 -partial
// LOG_ARR - partial
log_arr_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inp_ARR_Name2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xNam"), y, 80, h,
"Nam");
inp_ARR_Name2->align(FL_ALIGN_LEFT);
inp_ARR_Name2->tooltip("Operator's name");
inp_ARR_Name2->type(FL_NORMAL_INPUT);
inp_ARR_check2 = new Fl_Input2(
rightof(inp_ARR_Name2) + fl_width("xChk"), y, 40, h,
"Chk");
inp_ARR_check2->align(FL_ALIGN_LEFT);
inp_ARR_check2->tooltip(_("Check / birth-year"));
inp_ARR_check2->type(FL_NORMAL_INPUT);
inp_ARR_XchgIn2 = new Fl_Input2(
rightof(inp_ARR_check2) + fl_width("xXch"), y,
fl_digi_main->w() - (rightof(inp_ARR_check2) + fl_width("xXch")) - pad, Hentry,
"Xch");
inp_ARR_XchgIn2->align(FL_ALIGN_LEFT);
inp_ARR_XchgIn2->tooltip(_("Round Up Exchange"));
inp_ARR_XchgIn2->type(FL_NORMAL_INPUT);
Fl_Box larr_box(rightof(inp_ARR_XchgIn2), y, pad, h,"");
larr_box.box(FL_FLAT_BOX);
log_arr_frame->end();
log_arr_frame->hide();
log_arr_frame->resizable(larr_box);
// end LOG_ARR - partial
// LOG_VHF - partial
log_vhf_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inp_vhf_RSTin2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xIn"), y, wRST, h,
"In");
inp_vhf_RSTin2->align(FL_ALIGN_LEFT);
inp_vhf_RSTin2->tooltip(_("Received RST"));
inp_vhf_RSTin2->type(FL_NORMAL_INPUT);
inp_vhf_RSTout2 = new Fl_Input2(
rightof(inp_vhf_RSTin2) + fl_width("xOut"), y, wRST, h,
"Out");
inp_vhf_RSTout2->align(FL_ALIGN_LEFT);
inp_vhf_RSTout2->tooltip(_("Sent RST"));
inp_vhf_RSTout2->type(FL_NORMAL_INPUT);
inp_vhf_Loc2 = new Fl_Input2(
rightof(inp_vhf_RSTout2) + fl_width("xGr")- pad, y, 80, h,
"Gr");
inp_vhf_Loc2->align(FL_ALIGN_LEFT);
inp_vhf_Loc2->tooltip(_("Grid Locator"));
inp_vhf_Loc2->type(FL_NORMAL_INPUT);
Fl_Box lvhf_box(rightof(inp_vhf_Loc2), y, pad, h,"");
lvhf_box.box(FL_FLAT_BOX);
log_vhf_frame->end();
log_vhf_frame->hide();
log_vhf_frame->resizable(lvhf_box);
// end LOG_VHF - partial
// LOG_CQWW_DX - partial
log_cqww_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inp_CQDX_RSTin2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xIn"), y, wRST, h, "In");
inp_CQDX_RSTin2->align(FL_ALIGN_LEFT);
inp_CQDX_RSTin2->tooltip(_("Received RST"));
inp_CQDX_RSTin2->type(FL_NORMAL_INPUT);
inp_CQDX_RSTout2 = new Fl_Input2(
rightof(inp_CQDX_RSTin2) + fl_width("xOut"), y, wRST, h, "Out");
inp_CQDX_RSTout2->align(FL_ALIGN_LEFT);
inp_CQDX_RSTout2->tooltip(_("Sent RST"));
inp_CQDX_RSTout2->type(FL_NORMAL_INPUT);
inp_CQDXzone2 = new Fl_Input2(
rightof(inp_CQDX_RSTout2) + fl_width("xCQz"), y, 40, h, "CQz");
inp_CQDXzone2->align(FL_ALIGN_LEFT);
inp_CQDXzone2->tooltip(_("Received CQ zone"));
inp_CQDXzone2->type(FL_NORMAL_INPUT);
xtmp = rightof(inp_CQDXzone2) + fl_width("xCQc");
cboCountryCQDX2 = new Fl_ComboBox(
xtmp, y,
fl_digi_main->w() - xtmp - pad, Hentry, "CQc");
cboCountryCQDX2->align(FL_ALIGN_LEFT);
cboCountryCQDX2->tooltip(_("Received CQ country"));
cboCountryCQDX2->end();
Fl_Box lcqdx_box(rightof(cboCountryCQDX2), y, pad, h,"");
lcqdx_box.box(FL_FLAT_BOX);
log_cqww_frame->end();
log_cqww_frame->hide();
log_cqww_frame->resizable(lcqdx_box);
// end LOG_CQWW_DX - partial
// LOG_CQWW_RTTY - partial
log_cqww_rtty_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inp_CQ_RSTin2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xIn"), y, wRST, h, "In");
inp_CQ_RSTin2->align(FL_ALIGN_LEFT);
inp_CQ_RSTin2->tooltip(_("Received RST"));
inp_CQ_RSTin2->type(FL_NORMAL_INPUT);
inp_CQ_RSTout2 = new Fl_Input2(
rightof(inp_CQ_RSTin2) + fl_width("xOut"), y, wRST, h, "Out");
inp_CQ_RSTout2->align(FL_ALIGN_LEFT);
inp_CQ_RSTout2->tooltip(_("Sent RST"));
inp_CQ_RSTout2->type(FL_NORMAL_INPUT);
inp_CQzone2 = new Fl_Input2(
rightof(inp_CQ_RSTout2) + fl_width("xCQz"), y, 40, h, "CQz");
inp_CQzone2->align(FL_ALIGN_LEFT);
inp_CQzone2->tooltip(_("Received CQ zone"));
inp_CQzone2->type(FL_NORMAL_INPUT);
inp_CQstate2 = new Fl_Input2(
rightof(inp_CQzone2) + fl_width("xCQst"), y, 40, h, "CQst");
inp_CQstate2->align(FL_ALIGN_LEFT);
inp_CQstate2->tooltip(_("Received CQ State/Prov"));
inp_CQstate2->type(FL_NORMAL_INPUT);
cboCountryCQ2 = new Fl_ComboBox(
rightof(inp_CQstate2) + fl_width("xCQc"), y,
fl_digi_main->w() - (rightof(inp_CQstate2) + fl_width("xCQc")) - pad, Hentry, "CQc");
cboCountryCQ2->align(FL_ALIGN_LEFT);
cboCountryCQ2->tooltip(_("Received CQ country"));
cboCountryCQ2->end();
Fl_Box lcq_box(rightof(cboCountryCQ2), y, pad, h,"");
lcq_box.box(FL_FLAT_BOX);
log_cqww_rtty_frame->end();
log_cqww_rtty_frame->hide();
log_cqww_rtty_frame->resizable(lcq_box);
// end LOG_CQWW_RTTY - partial
// LOG CWSS - partial
log_cqss_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
outSerNo4 = new Fl_Input2(
rightof(inpCall3) + fl_width("xS#"), y, 40, h,
"S#");
outSerNo4->align(FL_ALIGN_LEFT);
outSerNo4->tooltip(_("Sent serno"));
outSerNo4->type(FL_NORMAL_OUTPUT);
inp_SS_SerialNoR2 = new Fl_Input2(
rightof(outSerNo4) + fl_width("xR#"), y, 40, Hentry,
"R#");
inp_SS_SerialNoR2->align(FL_ALIGN_LEFT);
inp_SS_SerialNoR2->tooltip(_("Received serno"));
inp_SS_SerialNoR2->type(FL_NORMAL_INPUT);
inp_SS_Precedence2 = new Fl_Input2(
rightof(inp_SS_SerialNoR2) + fl_width("xPre"), y, 40, Hentry,
"Pre");
inp_SS_Precedence2->align(FL_ALIGN_LEFT);
inp_SS_Precedence2->tooltip(_("SS Precedence"));
inp_SS_Precedence2->type(FL_NORMAL_INPUT);
inp_SS_Check2 = new Fl_Input2(
rightof(inp_SS_Precedence2) + fl_width("xChk"), y, 40, Hentry,
"Chk");
inp_SS_Check2->align(FL_ALIGN_LEFT);
inp_SS_Check2->tooltip(_("SS Check"));
inp_SS_Check2->type(FL_NORMAL_INPUT);
inp_SS_Section2 = new Fl_Input2(
rightof(inp_SS_Check2) + fl_width("xSec"), y, 40, Hentry,
"Sec");
inp_SS_Section2->align(FL_ALIGN_LEFT);
inp_SS_Section2->tooltip(_("SS section"));
inp_SS_Section2->type(FL_NORMAL_INPUT);
Fl_Box lss_box(rightof(inp_SS_Section2), y, pad, h,"");
lss_box.box(FL_FLAT_BOX);
log_cqss_frame->end();
log_cqss_frame->hide();
log_cqss_frame->resizable(lss_box);
// end LOG CWSS - partial
// LOG_CQWPX - partial
log_cqwpx_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inpRstIn_WPX2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xIn"), y, wRST, h, "In");
inpRstIn_WPX2->align(FL_ALIGN_LEFT);
inpRstIn_WPX2->tooltip(_("Received RST"));
inpRstIn_WPX2->type(FL_NORMAL_INPUT);
inpRstOut_WPX2 = new Fl_Input2(
rightof(inpRstIn_WPX2) + fl_width("xOut"), y, wRST, h, "Out");
inpRstOut_WPX2->align(FL_ALIGN_LEFT);
inpRstOut_WPX2->tooltip(_("Sent RST"));
inpRstOut_WPX2->type(FL_NORMAL_INPUT);
outSerNo_WPX2 = new Fl_Input2(
rightof(inpRstOut_WPX2) + fl_width("xS#"), y, 40, h, "S#");
outSerNo_WPX2->align(FL_ALIGN_LEFT);
outSerNo_WPX2->tooltip(_("Sent serial number"));
outSerNo_WPX2->type(FL_NORMAL_INPUT);
inpSerNo_WPX2 = new Fl_Input2(
rightof(outSerNo_WPX2) + fl_width("xR#") - pad, y, 40, h, "R#");
inpSerNo_WPX2->align(FL_ALIGN_LEFT);
inpSerNo_WPX2->tooltip(_("Received serial number"));
inpSerNo_WPX2->type(FL_NORMAL_INPUT);
Fl_Box lwpx_box(rightof(inpSerNo_WPX2), y, pad, h,"");
lwpx_box.box(FL_FLAT_BOX);
log_cqwpx_frame->end();
log_cqwpx_frame->hide();
log_cqwpx_frame->resizable(lwpx_box);
// end LOG_CQWPX - partial
// LOG_ASCR - partial
log_ascr_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inp_ASCR_name2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xNam"), y, 80, h,
"Nam");
inp_ASCR_name2->align(FL_ALIGN_LEFT);
inp_ASCR_name2->tooltip(_("Rcvd name"));
inp_ASCR_name2->type(FL_NORMAL_INPUT);
inp_ASCR_RSTin2 = new Fl_Input2(
rightof(inp_ASCR_name2) + fl_width("xIn"), y, wRST, Hentry,
"In");
inp_ASCR_RSTin2->align(FL_ALIGN_LEFT);
inp_ASCR_RSTin2->tooltip(_("Received RST"));
inp_ASCR_RSTin2->type(FL_NORMAL_INPUT);
inp_ASCR_RSTout2 = new Fl_Input2(
rightof(inp_ASCR_RSTin2) + fl_width("xOut"), y, wRST, Hentry,
"Out");
inp_ASCR_RSTout2->align(FL_ALIGN_LEFT);
inp_ASCR_RSTout2->tooltip(_("Sent RST"));
inp_ASCR_RSTout2->type(FL_NORMAL_INPUT);
inp_ASCR_class2 = new Fl_Input2(
rightof(inp_ASCR_RSTout2) + fl_width("xClass"), y, 30, Hentry,
"Class");
inp_ASCR_class2->align(FL_ALIGN_LEFT);
inp_ASCR_class2->tooltip(_("ASCR class"));
inp_ASCR_class2->type(FL_NORMAL_INPUT);
xtmp = rightof(inp_ASCR_class2) + fl_width("xSPC");
inp_ASCR_XchgIn2 = new Fl_Input2(
xtmp, y, TopFrame3->x() + TopFrame3->w() - xtmp - pad, Hentry,
"SPC");
inp_ASCR_XchgIn2->align(FL_ALIGN_LEFT);
inp_ASCR_XchgIn2->tooltip(_("State/Province/Country received"));
inp_ASCR_XchgIn2->type(FL_NORMAL_INPUT);
Fl_Box lascr_box(rightof(inp_ASCR_XchgIn2), y, pad, h,"");
lascr_box.box(FL_FLAT_BOX);
log_ascr_frame->end();
log_ascr_frame->hide();
log_ascr_frame->resizable(lascr_box);
// end LOG_ASCR - partial
// LOG_NAQP - partial
log_naqp_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
btnTimeOn5 = new Fl_Button(
rightof(inpCall3) + pad, y,
h, h, "On");
btnTimeOn5->tooltip(_("Press to update"));
btnTimeOn5->callback(cb_btnTimeOn);
inpTimeOn5 = new Fl_Input2(
rightof(btnTimeOn3) + pad, y,
wData, h, "");
inpTimeOn5->tooltip(_("Time On"));
inpTimeOn5->type(FL_INT_INPUT);
inpTimeOff5 = new Fl_Input2(
rightof(inpTimeOn5) + fl_width("xOff"), y,
wData, h, "Off");
inpTimeOff5->tooltip(_("Time Off"));
inpTimeOff5->type(FL_NORMAL_OUTPUT);
inpNAQPname2 = new Fl_Input2(
rightof(inpTimeOff5) + fl_width("xNam"), y, 100, h, "Nam");
inpNAQPname2->align(FL_ALIGN_LEFT);
inpNAQPname2->tooltip(_("Received operator name"));
inpNAQPname2->type(FL_NORMAL_INPUT);
inpSPCnum_NAQP2 = new Fl_Input2(
rightof(inpNAQPname2) + fl_width("xXch"), y,
80, h, "Xch");
inpSPCnum_NAQP2->align(FL_ALIGN_LEFT);
inpSPCnum_NAQP2->tooltip(_("Received State/Province/Country"));
inpSPCnum_NAQP2->type(FL_NORMAL_INPUT);
Fl_Box lnaqp_box(rightof(inpSPCnum_NAQP2), y, pad, h,"");
lnaqp_box.box(FL_FLAT_BOX);
log_naqp_frame->end();
log_naqp_frame->hide();
log_naqp_frame->resizable(lnaqp_box);
// LOG_NAQP - partial
// LOG_RTTY - partial
log_rtty_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inpRTU_stpr2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xS/P"), y, fl_width("xWW"), Hentry,
"S/P");
inpRTU_stpr2->align(FL_ALIGN_LEFT);
inpRTU_stpr2->tooltip(_("State/Province"));
inpRTU_stpr2->type(FL_NORMAL_INPUT);
inpRTU_serno2 = new Fl_Input2(
rightof(inpRTU_stpr2) + fl_width("xSer"), y, fl_width("x9999"), Hentry,
"Ser");
inpRTU_serno2->align(FL_ALIGN_LEFT);
inpRTU_serno2->tooltip(_("Serial number received"));
inpRTU_serno2->type(FL_NORMAL_INPUT);
inpRTU_RSTin2 = new Fl_Input2(
rightof(inpRTU_serno2) + fl_width("xR"), y, wRST, Hentry,
"R");
inpRTU_RSTin2->align(FL_ALIGN_LEFT);
inpRTU_RSTin2->tooltip("Received RST");
inpRTU_RSTin2->type(FL_NORMAL_INPUT);
inpRTU_RSTout2 = new Fl_Input2(
rightof(inpRTU_RSTin2) + fl_width("xS"), y, wRST, Hentry,
"S");
inpRTU_RSTout2->align(FL_ALIGN_LEFT);
inpRTU_RSTout2->tooltip("Sent RST");
inpRTU_RSTout2->type(FL_NORMAL_INPUT);
xtmp = rightof(inpRTU_RSTout2) + fl_width("xCntry");
cboCountryRTU2 = new Fl_ComboBox(
xtmp, y,
TopFrame3->x() + TopFrame3->w() - xtmp - pad, Hentry,
"Cntry");
cboCountryRTU2->align(FL_ALIGN_LEFT);
cboCountryRTU2->tooltip(_("Country"));
cboCountryRTU2->end();
log_rtty_frame->end();
log_rtty_frame->hide();
log_rtty_frame->resizable(cboCountryRTU2);
// end LOG_RTTY - partial
// LOG_IARI - partial
log_iari_frame = new Fl_Group(
rightof(TopFrame3a), TopFrame1->y(),
W - rightof(TopFrame3a), Hentry,"");
inp_IARI_RSTin2 = new Fl_Input2(
rightof(inpCall3) + fl_width("In"), y, wRST, h, "In");
inp_IARI_RSTin2->align(FL_ALIGN_LEFT);
inp_IARI_RSTin2->tooltip(_("Received RST"));
inp_IARI_RSTin2->type(FL_NORMAL_INPUT);
inp_IARI_RSTout2 = new Fl_Input2(
rightof(inp_IARI_RSTin2) + fl_width("Out"), y, wRST, h, "Out");
inp_IARI_RSTout2->align(FL_ALIGN_LEFT);
inp_IARI_RSTout2->tooltip(_("Sent RST"));
inp_IARI_RSTout2->type(FL_NORMAL_INPUT);
inp_IARI_PR2 = new Fl_Input2(
rightof(inp_IARI_RSTout2) + fl_width("xPr"), y, fl_width("WW"), Hentry,
"Pr");
inp_IARI_PR2->align(FL_ALIGN_LEFT);
inp_IARI_PR2->tooltip(_("Received IARI Province"));
inp_IARI_PR2->type(FL_NORMAL_INPUT);
out_IARI_SerNo2 = new Fl_Input2(
rightof(inp_IARI_PR2) + fl_width("S#"), y, wRST, Hentry,
"S#");
out_IARI_SerNo2->align(FL_ALIGN_LEFT);
out_IARI_SerNo2->tooltip(_("Sent serno"));
out_IARI_SerNo2->type(FL_NORMAL_OUTPUT);
inp_IARI_SerNo2 = new Fl_Input2(
rightof(out_IARI_SerNo2) + fl_width("R#"), y, wRST, Hentry,
"R#");
inp_IARI_SerNo2->align(FL_ALIGN_LEFT);
inp_IARI_SerNo2->tooltip(_("Received serno"));
inp_IARI_SerNo2->type(FL_NORMAL_INPUT);
xtmp = rightof(inp_IARI_SerNo2) + fl_width("Cntry");
cboCountryIARI2 = new Fl_ComboBox(
xtmp, y,
fl_digi_main->w() - xtmp - pad, Hentry, "Cntry");
cboCountryIARI2->align(FL_ALIGN_LEFT);
cboCountryIARI2->tooltip(_("Received IARI country"));
cboCountryIARI2->end();
Fl_Box liari_box(rightof(cboCountryIARI2), y, pad, h,"");
liari_box.box(FL_FLAT_BOX);
log_iari_frame->end();
log_iari_frame->hide();
log_iari_frame->resizable(liari_box);
// end LOG_IARI - partial
// LOG_NAS - partial
log_nas_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
outSerNo6 = new Fl_Input2(
rightof(inpCall3) + fl_width("xS#"), y, 40, h, "S#");
outSerNo6->align(FL_ALIGN_LEFT);
outSerNo6->tooltip(_("Sent serial number"));
outSerNo6->type(FL_NORMAL_OUTPUT);
inp_ser_NAS2 = new Fl_Input2(
rightof(outSerNo6) + fl_width("xR#"), y, 40, Hentry, "R#");
inp_ser_NAS2->align(FL_ALIGN_LEFT);
inp_ser_NAS2->tooltip(_("Received serno"));
inp_ser_NAS2->type(FL_NORMAL_INPUT);
xtmp = rightof(inp_ser_NAS2) + fl_width("xS/P/C");
inpSPCnum_NAS2 = new Fl_Input2(
xtmp, y, 80, Hentry,
"S/P/C");
inpSPCnum_NAS2->align(FL_ALIGN_LEFT);
inpSPCnum_NAS2->tooltip(_("Received State/Province/Country"));
inpSPCnum_NAS2->type(FL_NORMAL_INPUT);
xtmp = rightof(inpSPCnum_NAS2) + fl_width("xNm");
inp_name_NAS2 = new Fl_Input2(
xtmp, y,
TopFrame3->x() + TopFrame3->w() - xtmp - pad, Hentry,
"Nm");
inp_name_NAS2->align(FL_ALIGN_LEFT);
inp_name_NAS2->tooltip(_("Name"));
inp_name_NAS2->type(FL_NORMAL_INPUT);
Fl_Box lnas_box(rightof(inp_name_NAS2), y, pad, h,"");
lnas_box.box(FL_FLAT_BOX);
log_nas_frame->end();
log_nas_frame->hide();
log_nas_frame->resizable(lnas_box);
// end LOG_NAS - partial
// LOG_AIDX - partial
log_aidx_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
outSerNo8 = new Fl_Input2(
rightof(inpCall3) + fl_width("xS#"), y, 40, Hentry, "S#");
outSerNo8->align(FL_ALIGN_LEFT);
outSerNo8->tooltip(_("Sent serial number"));
outSerNo8->type(FL_NORMAL_OUTPUT);
inpSerNo4 = new Fl_Input2(
rightof(outSerNo8) + fl_width("xR#"), y, 40, Hentry, "R#");
inpSerNo4->align(FL_ALIGN_LEFT);
inpSerNo4->tooltip(_("Received serial number"));
inpSerNo4->type(FL_NORMAL_INPUT);
xtmp = rightof(inpSerNo4) + fl_width("xIn");
inpRstIn3 = new Fl_Input2(
xtmp, y, wRST, Hentry,
"In");
inpRstIn3->align(FL_ALIGN_LEFT);
inpRstIn3->tooltip(_("Received RST"));
inpRstIn3->type(FL_NORMAL_INPUT);
xtmp = rightof(inpRstIn3) + fl_width("xOut");
inpRstOut3 = new Fl_Input2(
xtmp, y, wRST, Hentry,
"Out");
inpRstOut3->align(FL_ALIGN_LEFT);
inpRstOut3->tooltip(_("Sent RST"));
inpRstOut3->type(FL_NORMAL_INPUT);
xtmp = rightof(inpRstOut3) + fl_width("xCntry");
cboCountryAIDX2 = new Fl_ComboBox(
xtmp, y,
TopFrame3->x() + TopFrame3->w() - xtmp - pad, Hentry,
"Cntry");
cboCountryAIDX2->align(FL_ALIGN_LEFT);
cboCountryAIDX2->tooltip(_("Received Country"));
cboCountryAIDX2->end();
Fl_Box laam_box(rightof(cboCountryAIDX2), y, pad, h,"");
laam_box.box(FL_FLAT_BOX);
log_aidx_frame->end();
log_aidx_frame->hide();
log_aidx_frame->resizable(laam_box);
// end LOG_AIDX - partial
// LOG_JOTA - partial
log_jota_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
xtmp = rightof(inpCall3) + fl_width("xIn");
inpRstIn4 = new Fl_Input2(
xtmp, y, wRST, Hentry,
"In");
inpRstIn4->align(FL_ALIGN_LEFT);
inpRstIn4->tooltip(_("Received RST"));
inpRstIn4->type(FL_NORMAL_INPUT);
xtmp = rightof(inpRstIn4) + fl_width("xOut");
inpRstOut4 = new Fl_Input2(
xtmp, y, wRST, Hentry,
"Out");
inpRstOut4->align(FL_ALIGN_LEFT);
inpRstOut4->tooltip(_("Sent RST"));
inpRstOut4->type(FL_NORMAL_INPUT);
xtmp = rightof(inpRstOut4) + fl_width("xSc");
inp_JOTA_troop2 = new Fl_Input2(
xtmp, y, 50, Hentry,
"Tp");
inp_JOTA_troop2->align(FL_ALIGN_LEFT);
inp_JOTA_troop2->tooltip(_("Received troop number"));
inp_JOTA_troop2->type(FL_NORMAL_INPUT);
xtmp = rightof(inp_JOTA_troop2) + fl_width("xTNm");
inp_JOTA_scout2 = new Fl_Input2(
xtmp, y, 80, Hentry,
"Nm");
inp_JOTA_scout2->align(FL_ALIGN_LEFT);
inp_JOTA_scout2->tooltip(_("Received scout name"));
inp_JOTA_scout2->type(FL_NORMAL_INPUT);
xtmp = rightof(inp_JOTA_scout2) + fl_width("xSPC");
inp_JOTA_spc2 = new Fl_Input2(
xtmp, y,
TopFrame3->x() + TopFrame3->w() - xtmp - pad, Hentry,
"SPC");
inp_JOTA_spc2->align(FL_ALIGN_LEFT);
inp_JOTA_spc2->tooltip(_("State/Province,Country received"));
inp_JOTA_spc2->type(FL_NORMAL_INPUT);
Fl_Box ljota_box(rightof(inp_JOTA_spc2), y, pad, h,"");
ljota_box.box(FL_FLAT_BOX);
log_jota_frame->end();
log_jota_frame->hide();
log_jota_frame->resizable(ljota_box);
// LOG_JOTA - partial
// LOG_AICW - partial
log_aicw_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
xtmp = rightof(inpCall3) + fl_width("xIn");
inpRstIn_AICW2 = new Fl_Input2(
xtmp, y, wRST, Hentry,
"In");
inpRstIn_AICW2->align(FL_ALIGN_LEFT);
inpRstIn_AICW2->tooltip(_("Received RST"));
inpRstIn_AICW2->type(FL_NORMAL_INPUT);
xtmp = rightof(inpRstIn_AICW2) + fl_width("xOut");
inpRstOut_AICW2 = new Fl_Input2(
xtmp, y, wRST, Hentry,
"Out");
inpRstOut_AICW2->align(FL_ALIGN_LEFT);
inpRstOut_AICW2->tooltip(_("Sent RST"));
inpRstOut_AICW2->type(FL_NORMAL_INPUT);
xtmp = rightof(inpRstOut_AICW2) + fl_width("xPwr-R");
inpSPCnum_AICW2 = new Fl_Input2(
xtmp, y, 50, Hentry,
"Pwr-R");
inpSPCnum_AICW2->align(FL_ALIGN_LEFT);
inpSPCnum_AICW2->tooltip(_("Received power"));
inpSPCnum_AICW2->type(FL_NORMAL_INPUT);
xtmp = rightof(inpSPCnum_AICW2) + fl_width("xCntry");
cboCountryAICW2 = new Fl_ComboBox(
xtmp, y,
TopFrame3->x() + TopFrame3->w() - xtmp - pad, Hentry,
"Cntry");
cboCountryAICW2->align(FL_ALIGN_LEFT);
cboCountryAICW2->tooltip(_("Country received"));
cboCountryAICW2->end();
Fl_Box laicw_box(rightof(cboCountryAICW2), y, pad, h,"");
laicw_box.box(FL_FLAT_BOX);
log_aicw_frame->end();
log_aicw_frame->hide();
log_aicw_frame->resizable(laicw_box);
// LOG_AICW - partial
// LOG_SQSO - partial
log_sqso_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
xtmp = rightof(inpCall3) + fl_width("St");
inpSQSO_state2 = new Fl_Input2(
xtmp, y, 35, Hentry,
"St");
inpSQSO_state2->align(FL_ALIGN_LEFT);
inpSQSO_state2->tooltip(_("State"));
inpSQSO_state2->type(FL_NORMAL_INPUT);
xtmp = rightof(inpSQSO_state2) + fl_width("Co");
inpSQSO_county2 = new Fl_Input2(
xtmp, y, 50, Hentry,
"Cy");
inpSQSO_county2->align(FL_ALIGN_LEFT);
inpSQSO_county2->tooltip(_("County"));
inpSQSO_county2->type(FL_NORMAL_INPUT);
xtmp = rightof(inpSQSO_county2) + fl_width("Ca");
inpSQSO_category2 = new Fl_Input2(
xtmp, y , 40, Hentry, "Cat");
inpSQSO_category2->align(FL_ALIGN_LEFT);
inpSQSO_category2->tooltip(_("Category: CLB, MOB, QRP, STD"));
inpSQSO_category2->type(FL_NORMAL_INPUT);
inpSQSO_category2->hide();
xtmp = rightof(inpSQSO_county2) + fl_width("In");
inpRstIn_SQSO2 = new Fl_Input2(
xtmp, y, wRST, Hentry,
"In");
inpRstIn_SQSO2->align(FL_ALIGN_LEFT);
inpRstIn_SQSO2->tooltip(_("Received RST"));
inpRstIn_SQSO2->type(FL_NORMAL_INPUT);
inpRstIn_SQSO2->hide();
xtmp = rightof(inpRstIn_SQSO2) + fl_width("Out");
inpRstOut_SQSO2 = new Fl_Input2(
xtmp, y, wRST, Hentry,
"Out");
inpRstOut_SQSO2->align(FL_ALIGN_LEFT);
inpRstOut_SQSO2->tooltip(_("Sent RST"));
inpRstOut_SQSO2->type(FL_NORMAL_INPUT);
inpRstOut_SQSO2->hide();
xtmp = rightof(inpRstOut_SQSO2) + fl_width("S#");
outSQSO_serno2 = new Fl_Input2(
xtmp, y, 30, Hentry,
"S#");
outSQSO_serno2->align(FL_ALIGN_LEFT);
outSQSO_serno2->tooltip(_("Sent serial number"));
outSQSO_serno2->type(FL_NORMAL_INPUT);
outSQSO_serno2->hide();
xtmp = rightof(outSQSO_serno2) + fl_width("R#");
inpSQSO_serno2 = new Fl_Input2(
xtmp, y, 30, Hentry,
"R#");
inpSQSO_serno2->align(FL_ALIGN_LEFT);
inpSQSO_serno2->tooltip(_("Received serial number"));
inpSQSO_serno2->type(FL_NORMAL_INPUT);
inpSQSO_serno2->hide();
xtmp = rightof(inpSQSO_serno2) + fl_width("Nm");
inpSQSO_name2 = new Fl_Input2(
xtmp, y,
TopFrame3b->x() + TopFrame3b->w() - xtmp - pad, Hentry,
"Nm");
inpSQSO_name2->align(FL_ALIGN_LEFT);
inpSQSO_name2->tooltip(_("Rx name"));
inpSQSO_name2->type(FL_NORMAL_INPUT);
inpSQSO_name2->hide();
Fl_Box lsqso_box(rightof(inpSQSO_name2), y, pad, h,"");
lsqso_box.box(FL_FLAT_BOX);
log_sqso_frame->end();
log_sqso_frame->hide();
log_sqso_frame->resizable(lsqso_box);
// end LOG_SQSO - partial
// LOG_WAE - partial
log_wae_frame = new Fl_Group(
TopFrame3b->x(), TopFrame3b->y(),
TopFrame3b->w(), Hentry,"");
inpRstIn_WAE2 = new Fl_Input2(
rightof(inpCall3) + fl_width("xIn"), y, wRST, h, "In");
inpRstIn_WAE2->align(FL_ALIGN_LEFT);
inpRstIn_WAE2->tooltip(_("Received RST"));
inpRstIn_WAE2->type(FL_NORMAL_INPUT);
inpRstOut_WAE2 = new Fl_Input2(
rightof(inpRstIn_WAE2) + fl_width("xOut"), y, wRST, h, "Out");
inpRstOut_WAE2->align(FL_ALIGN_LEFT);
inpRstOut_WAE2->tooltip(_("Sent RST"));
inpRstOut_WAE2->type(FL_NORMAL_INPUT);
outSerNo_WAE2 = new Fl_Input2(
rightof(inpRstOut_WAE2) + fl_width("xS#"), y, 40, h, "S#");
outSerNo_WAE2->align(FL_ALIGN_LEFT);
outSerNo_WAE2->tooltip(_("Sent serial number"));
outSerNo_WAE2->type(FL_NORMAL_INPUT);
inpSerNo_WAE2 = new Fl_Input2(
rightof(outSerNo_WAE2) + fl_width("xR#"), y, 40, h, "R#");
inpSerNo_WAE2->align(FL_ALIGN_LEFT);
inpSerNo_WAE2->tooltip(_("Received serial number"));
inpSerNo_WAE2->type(FL_NORMAL_INPUT);
xtmp = rightof(inpSerNo_WAE2) + fl_width("xCntry");
cboCountryWAE2 = new Fl_ComboBox(
xtmp, y,
TopFrame3->x() + TopFrame3->w() - xtmp - pad, Hentry,
"Cntry");
cboCountryWAE2->align(FL_ALIGN_LEFT);
cboCountryWAE2->tooltip(_("Country worked"));
cboCountryWAE2->end();
Fl_Box lwae_box(rightof(cboCountryWAE2), y, pad, h,"");
lwae_box.box(FL_FLAT_BOX);
log_wae_frame->end();
log_wae_frame->hide();
log_wae_frame->resizable(lwae_box);
// LOG_WAE - partial
TopFrame3b->end();
TopFrame3->end();
TopFrame3->resizable(TopFrame3b);
TopFrame3->hide();
}
{ // default controls
inpFreq = inpFreq1;
inpCall = inpCall1;
inpTimeOn = inpTimeOn1;
inpTimeOff = inpTimeOff1;
inpName = inpName1;
inpRstIn = inpRstIn1;
inpRstOut = inpRstOut1;
qsoFreqDisp = qsoFreqDisp1;
inpSerNo = inpSerNo1;
outSerNo = outSerNo1;
inpXchgIn = inpXchgIn1;
inpClass = inp_FD_class1;
inpSection = inp_FD_section1;
inp_CQzone = inp_CQzone1;
inp_CQstate = inp_CQstate1;
cboCountry = cboCountryQSO;//cboCountryCQ1;
inpLoc = inpLoc1;
inp_SS_Check = inp_SS_Check1;
inp_SS_Precedence = inp_SS_Precedence1;
inp_SS_Section = inp_SS_Section1;
inp_SS_SerialNoR = inp_SS_SerialNoR1;
inp_KD_age = inp_KD_age1;
inp_1010_nr = inp_1010_nr1;
inp_ARR_check = inp_ARR_check1;
inpSPCnum = inpSPCnum_NAQP1;
inp_JOTA_troop = inp_JOTA_troop1;
inp_JOTA_scout = inp_JOTA_scout1;
inp_JOTA_spc = inp_JOTA_spc1;
qsoFreqDisp1->set_lsd(progdefaults.sel_lsd);
qsoFreqDisp2->set_lsd(progdefaults.sel_lsd);
qsoFreqDisp3->set_lsd(progdefaults.sel_lsd);
}
{ // Top Macro group
Y = TopFrame1->y() + Hqsoframe + pad;
//------------------- 4 bar macros
tbar = new Fl_Group(0, Y, fl_digi_main->w(), TB_HEIGHT * 4);
{
int xpos = tbar->x();
int ypos = Y;
int Wbtn = tbar->w() / 12;
int remainder = tbar->w() - Wbtn * 12;
tbar->box(FL_FLAT_BOX);
for (int i = 0; i < 48; i++) {
btnDockMacro[i] = new Fl_Button(
xpos, ypos,
(remainder > 0) ? Wbtn + 1 : Wbtn, TB_HEIGHT, "");
remainder--;
btnDockMacro[i]->box(FL_THIN_UP_BOX);
btnDockMacro[i]->tooltip(_("Left Click - execute\nRight Click - edit"));
btnDockMacro[i]->callback(macro_cb, reinterpret_cast<void *>(i | 0x80));
xpos += btnDockMacro[i]->w();
if (i == 11 || i == 23 || i == 35) {
xpos = tbar->x();
remainder = tbar->w() - Wbtn * 12;
ypos += TB_HEIGHT;
}
}
tbar->end();
tbar->hide();
}
//--------------------------------
macroFrame2 = new Fl_Group(0, Y, W, MACROBAR_MAX);
macroFrame2->box(FL_FLAT_BOX);
mf_group2 = new Fl_Group(0, Y, W - alt_btn_width, macroFrame2->h());
Wmacrobtn = (mf_group2->w()) / NUMMACKEYS;
wBLANK = (mf_group2->w() - NUMMACKEYS * Wmacrobtn) / 2;
xpos = 0;
ypos = mf_group2->y();
for (int i = 0; i < NUMMACKEYS; i++) {
if (i == 4 || i == 8) {
bx = new Fl_Box(xpos, ypos, wBLANK, macroFrame2->h());
bx->box(FL_FLAT_BOX);
xpos += wBLANK;
}
btnMacro[NUMMACKEYS + i] = new Fl_Button(xpos, ypos, Wmacrobtn, macroFrame2->h(),
macros.name[NUMMACKEYS + i].c_str());
btnMacro[NUMMACKEYS + i]->callback(macro_cb, reinterpret_cast<void *>(NUMMACKEYS + i));
btnMacro[NUMMACKEYS + i]->tooltip(
_("Left Click - execute\nShift-Fkey - execute\nRight Click - edit"));
xpos += Wmacrobtn;
}
mf_group2->end();
btnAltMacros2 = new Fl_Button(
W - alt_btn_width, ypos,
alt_btn_width, MACROBAR_MAX, "2");
btnAltMacros2->callback(altmacro_cb, 0);
btnAltMacros2->tooltip(_("Shift-key macro set"));
macroFrame2->resizable(mf_group2);
macroFrame2->end();
Y += Hmacros;
}
{ // Center group Rx/Tx/Raster displays
center_group = new Fl_Group(0, Y, W, Htext);
center_group->box(FL_FLAT_BOX);
text_group = new Fl_Group(0, Y, center_group->w(), center_group->h());
text_group->box(FL_FLAT_BOX);
text_panel = new Panel(0, Y, center_group->w(), center_group->h());
text_panel->box(FL_FLAT_BOX);
mvgroup = new Fl_Group(
text_panel->x(), text_panel->y(),
text_panel->w()/2, Htext, "");
mainViewer = new pskBrowser(mvgroup->x(), mvgroup->y(), mvgroup->w(), mvgroup->h()-42, "");
mainViewer->box(FL_DOWN_BOX);
mainViewer->has_scrollbar(Fl_Browser_::VERTICAL);
mainViewer->callback((Fl_Callback*)cb_mainViewer);
mainViewer->setfont(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
mainViewer->tooltip(_("Left click - select\nRight click - clear line"));
// mainViewer uses same regular expression evaluator as Viewer
mainViewer->seek_re = &seek_re;
Fl_Group* gseek = new Fl_Group(mvgroup->x(), mvgroup->y() + mvgroup->h() - 42, mvgroup->w(), 20);
// search field
gseek->box(FL_FLAT_BOX);
int seek_x = mvgroup->x();
int seek_y = mvgroup->y() + Htext - 42;
int seek_w = mvgroup->w();
txtInpSeek = new Fl_Input2( seek_x, seek_y, seek_w, gseek->h(), "");
txtInpSeek->callback((Fl_Callback*)cb_mainViewer_Seek);
txtInpSeek->when(FL_WHEN_CHANGED);
txtInpSeek->textfont(FL_HELVETICA);
txtInpSeek->value(progStatus.browser_search.c_str());
txtInpSeek->do_callback();
txtInpSeek->tooltip(_("seek - regular expression"));
gseek->resizable(txtInpSeek);
gseek->end();
Fl_Group *g = new Fl_Group(
mvgroup->x(), mvgroup->y() + mvgroup->h() - 22,
mvgroup->w(), 22);
g->box(FL_DOWN_BOX);
// squelch
mvsquelch = new Fl_Value_Slider2(g->x(), g->y(), g->w() - 75, g->h());
mvsquelch->type(FL_HOR_NICE_SLIDER);
mvsquelch->range(-3.0, 6.0);
mvsquelch->value(progStatus.VIEWER_psksquelch);
mvsquelch->step(0.1);
mvsquelch->color( fl_rgb_color(
progdefaults.bwsrSliderColor.R,
progdefaults.bwsrSliderColor.G,
progdefaults.bwsrSliderColor.B));
mvsquelch->selection_color( fl_rgb_color(
progdefaults.bwsrSldrSelColor.R,
progdefaults.bwsrSldrSelColor.G,
progdefaults.bwsrSldrSelColor.B));
mvsquelch->callback( (Fl_Callback *)cb_mvsquelch);
mvsquelch->tooltip(_("Set Viewer Squelch"));
// clear button
btnClearMViewer = new Fl_Button(
mvsquelch->x() + mvsquelch->w(), g->y(),
75, g->h(),
icons::make_icon_label(_("Clear"), edit_clear_icon));
btnClearMViewer->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
icons::set_icon_label(btnClearMViewer);
btnClearMViewer->callback((Fl_Callback*)cb_btnClearMViewer);
g->resizable(mvsquelch);
g->end();
mvgroup->resizable(mainViewer);
mvgroup->end();
save_mvx = mvgroup->w();
int rh = progStatus.tile_y_ratio * text_panel->h();
if (progdefaults.rxtx_swap) rh = text_panel->h() - rh;
ReceiveText = new FTextRX(
text_panel->x() + mvgroup->w(), text_panel->y(),
text_panel->w() - mvgroup->w(), rh, "" );
ReceiveText->color(
fl_rgb_color(
progdefaults.RxColor.R,
progdefaults.RxColor.G,
progdefaults.RxColor.B),
progdefaults.RxTxSelectcolor);
ReceiveText->setFont(progdefaults.RxFontnbr);
ReceiveText->setFontSize(progdefaults.RxFontsize);
ReceiveText->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
ReceiveText->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
ReceiveText->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
ReceiveText->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
ReceiveText->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
FHdisp = new Raster(
text_panel->x() + mvgroup->w(), text_panel->y(),
text_panel->w() - mvgroup->w(), rh,
progdefaults.HellRcvHeight);
FHdisp->align(FL_ALIGN_CLIP);
FHdisp->reverse(progdefaults.HellBlackboard);
FHdisp->clear();
FHdisp->hide();
TransmitText = new FTextTX(
text_panel->x() + mvgroup->w(), text_panel->y() + ReceiveText->h(),
text_panel->w() - mvgroup->w(), text_panel->h() - ReceiveText->h() );
TransmitText->color(
fl_rgb_color(
progdefaults.TxColor.R,
progdefaults.TxColor.G,
progdefaults.TxColor.B),
progdefaults.RxTxSelectcolor);
TransmitText->setFont(progdefaults.TxFontnbr);
TransmitText->setFontSize(progdefaults.TxFontsize);
TransmitText->setFontColor(progdefaults.TxFontcolor, FTextBase::RECV);
TransmitText->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
TransmitText->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
TransmitText->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
TransmitText->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
TransmitText->align(FL_ALIGN_CLIP);
minbox = new Fl_Box(
text_panel->x(),
text_panel->y() + minhtext,
text_panel->w() - 100,
text_panel->h() - 2*minhtext);
minbox->hide();
text_panel->resizable(minbox);
text_panel->end();
text_group->end();
text_group->resizable(text_panel);
// wefax_group = new Fl_Group(0, Y, W, Htext);
// wefax_group->box(FL_FLAT_BOX);
// wefax_group = wefax_pic::create_wefax_rx_viewer(wefax_group->x(), wefax_group->y(), wefax_group->w(), wefax_group->h());
wefax_group = create_wefax_rx_viewer(0, Y, W, Htext);
wefax_group->end();
// wefax_pic::create_both( true );
// wefax_group->end();
// wefax_pic:: wefax_pic::create_wefax_tx_viewer(0, 0, 800, 400 );
fsq_group = new Fl_Group(0, Y, W, Htext);
fsq_group->box(FL_FLAT_BOX);
// left, resizable rx/tx widgets
fsq_left = new Panel(
0, Y,
W - 180, Htext);
fsq_left->box(FL_FLAT_BOX);
// add rx & monitor
fsq_rx_text = new FTextRX(
0, Y,
fsq_left->w(), fsq_left->h() / 2);
fsq_rx_text->color(
fl_rgb_color(
progdefaults.RxColor.R,
progdefaults.RxColor.G,
progdefaults.RxColor.B),
progdefaults.RxTxSelectcolor);
fsq_rx_text->setFont(progdefaults.RxFontnbr);
fsq_rx_text->setFontSize(progdefaults.RxFontsize);
fsq_rx_text->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
fsq_rx_text->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
fsq_rx_text->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
fsq_rx_text->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
fsq_rx_text->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
fsq_rx_text->setFontColor(progdefaults.fsq_xmt_color, FTextBase::FSQ_TX);
fsq_rx_text->setFontColor(progdefaults.fsq_directed_color, FTextBase::FSQ_DIR);
fsq_rx_text->setFontColor(progdefaults.fsq_undirected_color, FTextBase::FSQ_UND);
fsq_tx_text = new FTextTX(
0, Y + fsq_rx_text->h(),
fsq_left->w(), fsq_left->h() - fsq_rx_text->h());
fsq_tx_text->color(
fl_rgb_color(
progdefaults.TxColor.R,
progdefaults.TxColor.G,
progdefaults.TxColor.B),
progdefaults.RxTxSelectcolor);
fsq_tx_text->setFont(progdefaults.TxFontnbr);
fsq_tx_text->setFontSize(progdefaults.TxFontsize);
fsq_tx_text->setFontColor(progdefaults.TxFontcolor, FTextBase::RECV);
fsq_tx_text->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
fsq_tx_text->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
fsq_tx_text->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
fsq_tx_text->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
fsq_tx_text->align(FL_ALIGN_CLIP);
fsq_minbox = new Fl_Box(
0, Y + minhtext,
fsq_tx_text->w(),
fsq_left->h() - 2 * minhtext);
fsq_minbox->hide();
fsq_left->resizable(fsq_minbox);
fsq_left->end();
// right, heard list, special fsq controls, s/n indicator
Fl_Group *fsq_right = new Fl_Group(
fsq_left->w(), Y, 180, fsq_left->h());
fsq_right->box(FL_FLAT_BOX);
int bh = 20;
int qh = bh + bh + 1 + 8 + image_s2n.h();
static int heard_widths[] =
{ 40*fsq_right->w()/100,
30*fsq_right->w()/100,
0 };
fsq_heard = new Fl_Browser(
fsq_right->x(), fsq_right->y(),
fsq_right->w(), fsq_right->h() - qh);//minhtext);
fsq_heard->column_widths(heard_widths);
fsq_heard->column_char(',');
fsq_heard->tooltip(_("Select FSQ station"));
fsq_heard->callback((Fl_Callback*)cb_fsq_heard);
fsq_heard->type(FL_MULTI_BROWSER);
fsq_heard->box(FL_DOWN_BOX);
fsq_heard->add("allcall");
fsq_heard->labelfont(progdefaults.RxFontnbr);
fsq_heard->labelsize(11);
#ifdef __APPLE__
fsq_heard->textfont(FL_SCREEN_BOLD);
fsq_heard->textsize(13);
#else
fsq_heard->textfont(FL_HELVETICA);
fsq_heard->textsize(13);
#endif
int qw = fsq_right->w();
int bw2 = qw / 2;
int bw4 = qw / 4;
fsq_lower_right = new Fl_Group(
fsq_right->x(), fsq_heard->y() + fsq_heard->h(),
qw, qh);
fsq_lower_right->box(FL_FLAT_BOX);
fsq_lower_right->color(FL_WHITE);
int _yp = fsq_lower_right->y();
int _xp = fsq_lower_right->x();
btn_FSQCALL = new Fl_Light_Button(
_xp, _yp, bw2, bh, "FSQ-ON");
btn_FSQCALL->value(progdefaults.fsq_directed);
btn_FSQCALL->selection_color(FL_DARK_GREEN);
btn_FSQCALL->callback(cbFSQCALL, 0);
btn_FSQCALL->tooltip("Left click - on/off");
_xp += bw2;
btn_SELCAL = new Fl_Light_Button(
_xp, _yp, bw2, bh, "ACTIVE");
btn_SELCAL->selection_color(FL_DARK_RED);
btn_SELCAL->value(1);
btn_SELCAL->callback(cbSELCAL, 0);
btn_SELCAL->tooltip("Sleep / Active");
_xp = fsq_lower_right->x();
_yp += bh;
btn_MONITOR = new Fl_Light_Button(
_xp, _yp, bw4, bh, "MON");
btn_MONITOR->selection_color(FL_DARK_GREEN);
btn_MONITOR->value(progdefaults.fsq_show_monitor = false);
btn_MONITOR->callback(cbMONITOR, 0);
btn_MONITOR->tooltip("Monitor Open/Close");
_xp += bw4;
btn_FSQQTH = new Fl_Button(
_xp, _yp, bw4, bh, "QTH");
btn_FSQQTH->callback(cbFSQQTH, 0);
btn_FSQQTH->tooltip("QTH->tx panel");
_xp += bw4;
btn_FSQQTC = new Fl_Button(
_xp, _yp, bw4, bh, "QTC");
btn_FSQQTC->callback(cbFSQQTC, 0);
btn_FSQQTC->tooltip("QTC->tx panel");
_xp += bw4;
btn_FSQCQ = new Fl_Button(
_xp, _yp, bw4, bh, "CQ");
btn_FSQCQ->callback(cbFSQCQ, 0);
btn_FSQCQ->tooltip("Xmt cqcqcq");
_xp = fsq_lower_right->x();
_yp += (bh + 1);
ind_fsq_s2n = new Progress(
_xp + 10, _yp, qw - 20, 8, "");
ind_fsq_s2n->color(FL_WHITE, FL_DARK_GREEN);
ind_fsq_s2n->type(Progress::HORIZONTAL);
ind_fsq_s2n->value(40);
_yp += 8;
int th = fsq_tx_text->y() + fsq_tx_text->h();
th = (th - _yp);
// Clear remainder of area if needed.
if(th > image_s2n.h()) {
Fl_Box *_nA = new Fl_Box(_xp, _yp, qw, th, "");
_nA->box(FL_FLAT_BOX);
_nA->color(FL_WHITE);
}
// Add S/N rule
Fl_Box *s2n = new Fl_Box(
_xp + 10, _yp, qw - 20, image_s2n.h(), "");
s2n->box(FL_FLAT_BOX);
s2n->color(FL_WHITE);
s2n->align(FL_ALIGN_INSIDE | FL_ALIGN_TOP | FL_ALIGN_CENTER | FL_ALIGN_CLIP);
s2n->image(image_s2n);
fsq_lower_right->end();
fsq_right->resizable(fsq_heard);
fsq_right->end();
fsq_group->resizable(fsq_left);
fsq_group->end();
ifkp_group = new Fl_Group(0, Y, W, Htext);
ifkp_group->box(FL_FLAT_BOX);
// upper, receive ifkp widgets
ifkp_left = new Panel(
0, Y,
W - (image_s2n.w()+4), Htext);
// add rx & tx
ifkp_rx_text = new FTextRX(
0, Y,
ifkp_left->w(), ifkp_group->h() / 2);
ifkp_rx_text->color(
fl_rgb_color(
progdefaults.RxColor.R,
progdefaults.RxColor.G,
progdefaults.RxColor.B),
progdefaults.RxTxSelectcolor);
ifkp_rx_text->setFont(progdefaults.RxFontnbr);
ifkp_rx_text->setFontSize(progdefaults.RxFontsize);
ifkp_rx_text->setFontColor(progdefaults.RxFontcolor, FTextBase::RECV);
ifkp_rx_text->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
ifkp_rx_text->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
ifkp_rx_text->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
ifkp_rx_text->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
ifkp_tx_text = new FTextTX(
0, Y + ifkp_rx_text->h(),
ifkp_rx_text->w(), ifkp_group->h() - ifkp_rx_text->h());
ifkp_tx_text->color(
fl_rgb_color(
progdefaults.TxColor.R,
progdefaults.TxColor.G,
progdefaults.TxColor.B),
progdefaults.RxTxSelectcolor);
ifkp_tx_text->setFont(progdefaults.TxFontnbr);
ifkp_tx_text->setFontSize(progdefaults.TxFontsize);
ifkp_tx_text->setFontColor(progdefaults.TxFontcolor, FTextBase::RECV);
ifkp_tx_text->setFontColor(progdefaults.XMITcolor, FTextBase::XMIT);
ifkp_tx_text->setFontColor(progdefaults.CTRLcolor, FTextBase::CTRL);
ifkp_tx_text->setFontColor(progdefaults.SKIPcolor, FTextBase::SKIP);
ifkp_tx_text->setFontColor(progdefaults.ALTRcolor, FTextBase::ALTR);
ifkp_tx_text->align(FL_ALIGN_CLIP);
ifkp_minbox = new Fl_Box(
0, Y + minhtext,
ifkp_tx_text->w(),
ifkp_left->h() - 2 * minhtext);
ifkp_minbox->hide();
ifkp_left->resizable(ifkp_minbox);
ifkp_left->end();
ifkp_right = new Fl_Group(
ifkp_left->w(), Y,
image_s2n.w()+4, ifkp_group->h());
ifkp_right->box(FL_FLAT_BOX);
static int ifkp_heard_widths[] =
{ 40*ifkp_right->w()/100,
30*ifkp_right->w()/100,
0 };
ifkp_heard = new Fl_Browser(
ifkp_right->x(), ifkp_right->y(),
image_s2n.w()+4, ifkp_right->h() - (14 + image_s2n.h()));
ifkp_heard->column_widths(ifkp_heard_widths);
ifkp_heard->type(FL_MULTI_BROWSER);
ifkp_heard->callback((Fl_Callback*)cb_ifkp_heard);
ifkp_heard->column_char(',');
ifkp_heard->tooltip(_("Stations Heard"));
ifkp_heard->box(FL_DOWN_BOX);
ifkp_heard->labelfont(progdefaults.RxFontnbr);
ifkp_heard->labelsize(11);
#ifdef __APPLE__
ifkp_heard->textfont(FL_SCREEN_BOLD);
ifkp_heard->textsize(13);
#else
ifkp_heard->textfont(FL_HELVETICA);
ifkp_heard->textsize(13);
#endif
Fl_Group *ifkp_sn_box = new Fl_Group(
ifkp_heard->x(), ifkp_heard->y() + ifkp_heard->h(),
ifkp_heard->w(), 14 + image_s2n.h(), "");
ifkp_sn_box->box(FL_DOWN_BOX);
ifkp_sn_box->color(FL_WHITE);
ifkp_s2n_progress = new Progress(
ifkp_sn_box->x() + 2, ifkp_sn_box->y() + 2,
image_s2n.w(), 10, "");
ifkp_s2n_progress->color(FL_WHITE, FL_DARK_GREEN);
ifkp_s2n_progress->type(Progress::HORIZONTAL);
ifkp_s2n_progress->value(40);
Fl_Box *ifkp_s2n = new Fl_Box(
ifkp_s2n_progress->x(), ifkp_s2n_progress->y() + ifkp_s2n_progress->h(),
image_s2n.w(), image_s2n.h(), "");
ifkp_s2n->box(FL_FLAT_BOX);
ifkp_s2n->color(FL_WHITE);
ifkp_s2n->align(FL_ALIGN_INSIDE | FL_ALIGN_TOP | FL_ALIGN_CENTER | FL_ALIGN_CLIP);
ifkp_s2n->image(image_s2n);
ifkp_sn_box->end();
ifkp_right->end();
ifkp_right->resizable(ifkp_heard);
ifkp_right->end();
// lower, transmit ifkp widgets
ifkp_group->resizable(ifkp_left);
ifkp_group->end();
fmt_group = fmt_panel(0, Y, W, Htext);
fmt_group->end();
center_group->end();
text_group->show();
wefax_group->hide();
fsq_group->hide();
ifkp_group->hide();
fmt_group->hide();
}
{ // Bottom Macro group
Y += center_group->h();
Fl::add_handler(default_handler);
macroFrame1 = new Fl_Group(0, Y, W, MACROBAR_MAX);
macroFrame1->box(FL_FLAT_BOX);
mf_group1 = new Fl_Group(0, Y, W - alt_btn_width, macroFrame1->h());
Wmacrobtn = (mf_group1->w()) / NUMMACKEYS;
wBLANK = (mf_group1->w() - NUMMACKEYS * Wmacrobtn) / 2;
xpos = 0;
ypos = mf_group1->y();
for (int i = 0; i < NUMMACKEYS; i++) {
if (i == 4 || i == 8) {
bx = new Fl_Box(xpos, ypos, wBLANK, macroFrame1->h());
bx->box(FL_FLAT_BOX);
xpos += wBLANK;
}
btnMacro[i] = new Fl_Button(xpos, ypos, Wmacrobtn, macroFrame1->h(),
macros.name[i].c_str());
btnMacro[i]->callback(macro_cb, reinterpret_cast<void *>(i));
btnMacro[i]->tooltip(_("Left Click - execute\nFkey - execute\nRight Click - edit"));
xpos += Wmacrobtn;
}
mf_group1->end();
btnAltMacros1 = new Fl_Button(
W - alt_btn_width, ypos,
alt_btn_width, macroFrame1->h(), "1");
btnAltMacros1->callback(altmacro_cb, 0);
btnAltMacros1->labelsize(progdefaults.MacroBtnFontsize);
btnAltMacros1->tooltip(_("Primary macro set"));
macroFrame1->resizable(mf_group1);
macroFrame1->end();
Y += Hmacros;
}
{ // Waterfall group
wf_group = new Fl_Pack(0, Y, W, Hwfall);
wf_group->type(1);
wf = new waterfall(0, Y, Wwfall, Hwfall);
wf->end();
pgrsSquelch = new Progress(
rightof(wf), Y,
DEFAULT_SW, Hwfall,
"");
pgrsSquelch->color(FL_BACKGROUND2_COLOR, FL_DARK_GREEN);
pgrsSquelch->type(Progress::VERTICAL);
pgrsSquelch->tooltip(_("Detected signal level"));
sldrSquelch = new Fl_Slider2(
rightof(pgrsSquelch), Y,
DEFAULT_SW, Hwfall,
"");
sldrSquelch->minimum(100);
sldrSquelch->maximum(0);
sldrSquelch->step(1);
sldrSquelch->value(progStatus.sldrSquelchValue);
sldrSquelch->callback((Fl_Callback*)cb_sldrSquelch);
sldrSquelch->color(FL_INACTIVE_COLOR);
sldrSquelch->tooltip(_("Squelch level"));
// Fl_Group::current()->resizable(wf);
wf_group->end();
wf_group->resizable(wf);
}
{ // Status bar group
Y += Hwfall;
status_group = new Fl_Group(0, Y, W, Hstatus);
MODEstatus = new Fl_Button(0, Y, Wmode, Hstatus, "");
MODEstatus->box(FL_DOWN_BOX);
MODEstatus->color(FL_BACKGROUND2_COLOR);
MODEstatus->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
MODEstatus->callback(status_cb, (void *)0);
MODEstatus->when(FL_WHEN_CHANGED);
MODEstatus->tooltip(_("Left click: change mode\nRight click: configure"));
cntCW_WPM = new Fl_Counter2(
rightof(MODEstatus), Y,
Ws2n - Hstatus, Hstatus, "");
cntCW_WPM->callback(cb_cntCW_WPM);
cntCW_WPM->minimum(progdefaults.CWlowerlimit);
cntCW_WPM->maximum(progdefaults.CWupperlimit);
cntCW_WPM->value(progdefaults.CWspeed);
cntCW_WPM->type(1);
cntCW_WPM->step(1);
cntCW_WPM->tooltip(_("CW transmit WPM"));
cntCW_WPM->hide();
btnCW_Default = new Fl_Button(
rightof(cntCW_WPM), Y,
Hstatus, Hstatus, "*");
btnCW_Default->callback(cb_btnCW_Default);
btnCW_Default->tooltip(_("Default WPM"));
btnCW_Default->hide();
Status1 = new Fl_Box(
rightof(MODEstatus), Y,
Ws2n, Hstatus, "STATUS1");
Status1->box(FL_DOWN_BOX);
Status1->color(FL_BACKGROUND2_COLOR);
Status1->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
Status2 = new Fl_Box(
rightof(Status1), Y,
Wimd, Hstatus, "STATUS2");
Status2->box(FL_DOWN_BOX);
Status2->color(FL_BACKGROUND2_COLOR);
Status2->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
inpCall4 = new Fl_Input2(
rightof(Status1), Y,
Wimd, Hstatus, "");
inpCall4->align(FL_ALIGN_LEFT);
inpCall4->tooltip(_("Other call"));
inpCall4->hide();
// see corner_box below
// corner_box used to leave room for OS X corner drag handle
#ifdef __APPLE__
#define cbwidth DEFAULT_SW
#else
#define cbwidth 0
#endif
StatusBar = new status_box(
rightof(Status2), Y,
W - rightof(Status2)
- bwAfcOnOff - bwSqlOnOff
- Wwarn - bwTxLevel
- bwSqlOnOff
- cbwidth,
Hstatus, "");
StatusBar->box(FL_DOWN_BOX);
StatusBar->color(FL_BACKGROUND2_COLOR);
StatusBar->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
StatusBar->callback((Fl_Callback *)StatusBar_cb);
StatusBar->when(FL_WHEN_RELEASE_ALWAYS);
StatusBar->tooltip(_("Left click to toggle VuMeter"));
VuMeter = new vumeter(StatusBar->x(), StatusBar->y(), StatusBar->w() - 2, StatusBar->h(), "");
VuMeter->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
VuMeter->when(FL_WHEN_RELEASE);
VuMeter->callback((Fl_Callback *)VuMeter_cb);
VuMeter->when(FL_WHEN_RELEASE_ALWAYS);
VuMeter->tooltip(_("Left click to toggle Status Bar"));
if (progStatus.vumeter_shown) {
VuMeter->show();
StatusBar->hide();
} else {
VuMeter->hide();
StatusBar->show();
}
Fl_Box vuspacer(rightof(VuMeter),Y,2,Hstatus,"");
vuspacer.box(FL_FLAT_BOX);
cntTxLevel = new Fl_Counter2(
rightof(&vuspacer), Y,
bwTxLevel, Hstatus, "");
cntTxLevel->minimum(-30);
cntTxLevel->maximum(0);
cntTxLevel->value(-6);
cntTxLevel->callback((Fl_Callback*)cb_cntTxLevel);
cntTxLevel->value(progStatus.txlevel);
cntTxLevel->lstep(1.0);
cntTxLevel->tooltip(_("Tx level attenuator (dB)"));
WARNstatus = new Fl_Box(
rightof(cntTxLevel) + pad, Y,
Wwarn, Hstatus, "");
WARNstatus->box(FL_DIAMOND_DOWN_BOX);
WARNstatus->color(FL_BACKGROUND_COLOR);
WARNstatus->labelcolor(FL_RED);
WARNstatus->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
btnAFC = new Fl_Light_Button(
rightof(WARNstatus) + pad, Y,
bwAfcOnOff, Hstatus, "AFC");
btnSQL = new Fl_Light_Button(
rightof(btnAFC), Y,
bwSqlOnOff, Hstatus, "SQL");
// btnPSQL will be resized later depending on the state of the
// configuration parameter to show that widget
btnPSQL = new Fl_Light_Button(
rightof(btnSQL), Y,
bwSqlOnOff, Hstatus, "PSM");
btnSQL->selection_color(progdefaults.Sql1Color);
btnAFC->callback(cbAFC, 0);
btnAFC->value(1);
btnAFC->tooltip(_("Automatic Frequency Control"));
btnSQL->callback(cbSQL, 0);
btnSQL->value(1);
btnSQL->tooltip(_("Squelch"));
btnPSQL->selection_color(progdefaults.Sql1Color);
btnPSQL->value(progdefaults.kpsql_enabled);
btnPSQL->callback(cbPwrSQL, 0);
btnPSQL->tooltip(_("Power Signal Monitor"));
corner_box = new Fl_Box(
fl_digi_main->w() - cbwidth, Y,
cbwidth, Hstatus, "");
corner_box->box(FL_FLAT_BOX);
status_group->end();
status_group->resizable(VuMeter);
Y += status_group->h();
}
{ // adjust callbacks
showMacroSet();
Fl_Widget* logfields[] = {
inpCall1, inpCall2, inpCall3, inpCall4,
inpLoc1, inp_vhf_Loc1, inp_vhf_Loc2,
inpName1, inpName1,
inpTimeOn1, inpTimeOn2, inpTimeOn3, inpTimeOff1, inpTimeOff2, inpTimeOff3,
inpRstIn1, inpRstIn2, inpRstIn3, inpRstIn4, inpRstIn_AICW2,
inpRstOut1, inpRstOut2, inpRstOut3, inpRstOut4, inpRstOut_AICW2,
inpQth, inpVEprov,
inpAZ, inpNotes,
inpState1,
inpSerNo1, inpSerNo2, outSerNo1, outSerNo2, outSerNo3,
inp_SS_Check1, inp_SS_Precedence1, inp_SS_Section1, inp_SS_SerialNoR1,
outSerNo4, inp_SS_Check2, inp_SS_Precedence2, inp_SS_Section2, inp_SS_SerialNoR2,
inpXchgIn1, inpXchgIn2,
inp_FD_class1, inp_FD_class2, inp_FD_section1, inp_FD_section2,
inp_KD_age1, inp_KD_age2,
inp_KD_state1, inp_KD_state2,
inp_KD_VEprov1, inp_KD_VEprov2,
inp_KD_XchgIn1, inp_KD_XchgIn2,
inp_vhf_RSTin1, inp_vhf_RSTin2, inp_vhf_RSTout1, inp_vhf_RSTout2,
inp_1010_XchgIn1, inp_1010_XchgIn2, inp_1010_name2, inp_1010_nr1, inp_1010_nr2,
inp_ARR_Name2, inp_ARR_XchgIn1, inp_ARR_XchgIn2, inp_ARR_check1, inp_ARR_check2,
inp_ASCR_RSTin2, inp_ASCR_RSTout2, inp_ASCR_XchgIn1, inp_ASCR_XchgIn2,
inp_ASCR_class1, inp_ASCR_class2, inp_ASCR_name2,
inpSPCnum_NAQP1, inpSPCnum_NAQP2,
inpRTU_stpr1, inpRTU_stpr2,
inpRTU_serno1, inpRTU_serno2,
cboCountryRTU2,
inpRTU_RSTin2,
inp_IARI_PR1, inp_IARI_PR2,
inp_IARI_RSTin2, inp_IARI_RSTout2,
out_IARI_SerNo1, inp_IARI_SerNo1,
out_IARI_SerNo2, inp_IARI_SerNo2,
inp_IARI_PR2, cboCountryIARI2,
inp_JOTA_scout1, inp_JOTA_scout2,
inp_JOTA_spc1, inp_JOTA_spc2,
inp_JOTA_troop1, inp_JOTA_troop2,
inp_CQzone1,
inpSPCnum_AICW1, inpSPCnum_AICW2,
inpSQSO_state1, inpSQSO_state2,
inpSQSO_county1, inpSQSO_county2,
inpSQSO_serno1, inpSQSO_serno2,
outSQSO_serno1, outSQSO_serno2,
inpSQSO_name2,
inpSQSO_category1, inpSQSO_category2
};
for (size_t i = 0; i < sizeof(logfields)/sizeof(*logfields); i++) {
logfields[i]->callback(cb_log);
logfields[i]->when(FL_WHEN_CHANGED);//RELEASE || FL_WHEN_ENTER_KEY );//CHANGED);
}
Fl_ComboBox *country_fields[] = {
cboCountryQSO,
cboCountryAICW2,
cboCountryAIDX2,
cboCountryCQ2,
cboCountryCQDX2,
cboCountryIARI2,
cboCountryRTU2// ,
// cboCountryWAE2
};
for (size_t i = 0; i < sizeof(country_fields)/sizeof(*country_fields); i++) {
country_fields[i]->callback(cb_country);
country_fields[i]->when(FL_WHEN_CHANGED);
}
// exceptions
inpCall1->callback(cb_call);
inpCall1->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS);
inpCall2->callback(cb_call);
inpCall2->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS);
inpCall3->callback(cb_call);
inpCall3->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS);
inpCall4->callback(cb_call);
inpCall4->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS);
inpNotes->when(FL_WHEN_RELEASE);
}
fl_digi_main->end();
fl_digi_main->callback(cb_wMain);
fl_digi_main->resizable(center_group);
{ // scope view dialog
scopeview = new Fl_Double_Window(0,0,140,140, _("Scope"));
scopeview->xclass(PACKAGE_NAME);
digiscope = new Digiscope (0, 0, 140, 140);
scopeview->resizable(digiscope);
scopeview->size_range(SCOPEWIN_MIN_WIDTH, SCOPEWIN_MIN_HEIGHT);
scopeview->end();
scopeview->hide();
}
{ // field day viewer dialog
field_day_viewer = make_fd_view();
field_day_viewer->hide();
}
{ // adjust menu toggle items
if (!progdefaults.menuicons)
icons::toggle_icon_labels();
// Set the state of checked toggle menu items. Never changes.
const struct {
bool var; const char* label;
} toggles[] = {
{ progStatus.LOGenabled, LOG_TO_FILE_MLABEL },
{ progStatus.WF_UI, WF_MLABEL },
{ progStatus.Rig_Log_UI, RIGLOG_PARTIAL_MLABEL },
{ !progStatus.Rig_Log_UI, RIGLOG_FULL_MLABEL },
{ progStatus.NO_RIGLOG, RIGLOG_NONE_MLABEL },
{ progStatus.DOCKEDSCOPE, DOCKEDSCOPE_MLABEL }
};
Fl_Menu_Item* toggle;
for (size_t i = 0; i < sizeof(toggles)/sizeof(*toggles); i++) {
if (toggles[i].var && (toggle = getMenuItem(toggles[i].label))) {
toggle->set();
if (toggle->callback()) {
mnu->value(toggle);
toggle->do_callback(reinterpret_cast<Fl_Widget*>(mnu));
}
}
}
}
if (!dxcc_is_open())
getMenuItem(COUNTRIES_MLABEL)->hide();
toggle_smeter();
adjust_for_contest(0);
UI_select();
wf->UI_select(progStatus.WF_UI);
LOGGING_colors_font();
init_country_fields();
clearQSO();
fsqMonitor = create_fsqMonitor();
createConfig();
createRecordLoader();
switch (progdefaults.mbar_scheme) {
case 0: btn_scheme_0->setonly(); break;
case 1: btn_scheme_1->setonly(); break;
case 2: btn_scheme_2->setonly(); break;
case 3: btn_scheme_3->setonly(); break;
case 4: btn_scheme_4->setonly(); break;
case 5: btn_scheme_5->setonly(); break;
case 6: btn_scheme_6->setonly(); break;
case 7: btn_scheme_7->setonly(); break;
case 8: btn_scheme_8->setonly(); break;
case 9: btn_scheme_9->setonly(); break;
case 10: btn_scheme_10->setonly(); break;
case 11: btn_scheme_11->setonly(); break;
case 12: btn_scheme_12->setonly(); break;
}
colorize_macros();
if (rx_only) {
btnTune->deactivate();
wf->xmtrcv->deactivate();
}
set_mode_controls(active_modem->get_mode());
create_wefax_tx_viewer(0, 0, 800, 400 );
}
| 105,827
|
C++
|
.cxx
| 2,792
| 32.924785
| 124
| 0.640328
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,094
|
htmlstrings.cxx
|
w1hkj_fldigi/src/dialogs/htmlstrings.cxx
|
// ----------------------------------------------------------------------------
//
// htmlstrings.cxx
//
// Copyright (C) 2008
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include "dialogs/guide.cxx"
const char* szAbout =
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n\
<html>\n\
<head>\n\
<title>About</title>\n\
</head>\n\
<BODY BGCOLOR=FFFFCO TEXT=101010>\n\
<font size=\"0\" face=\"Verdana, Arial, Helvetica\">\n\
<CENTER>\n\
<H3><I>Fldigi " PACKAGE_VERSION "</I></H3>\n\
<br>\n\
Fast and Light DIGItal modem program\n\
</CENTER>\n\
<P>\n\
Copyright \251 2008-2014\n\
<P>\n\
Distributed under the GNU General Public License version 3 or later.<br>\n\
This is free software: you are free to change and redistribute it.<br>\n\
There is NO WARRANTY, to the extent permitted by law.\n\
<H4>Programmers:</H4>\n\
<pre>\
Dave Freese W1HKJ\n\
Stelios Bounanos M0GLD\n\
Rem\355 Chateauneu F4ECW\n\
John Douyere VK2ETA\n\
Stefan Fendt DL1SMF\n\
Leigh Klotz WA5ZNU\n\
John Phelps KL4YFD\n\
Andrej Lajovic S57LN\n\
Rik van Riel AB1KW\n\
Robert Stiles KK5VD\n\
</pre>\
<H4>Beginners' Guide:</H4>\n\
<pre>\
Murray Greenman ZL1BPU<br>\n\
</pre>\
<H4>Localization:</H4>\n\
<pre>\
Espa\361ol Spanish Pavel Milanes Costa CO7WT\n\
Christian W. Correa HK4QWC\n\
Deutsch German Marc Richter DF2MR\n\
Fran\347ais French Bernard Seront F4GAR\n\
Italiano Italian Emanuale Repetto IZ1UKX\n\
Język Polish Roman Bagiński SP4JEU\n\
Nederlands Dutch Peter van der Post PA1POS\n\
Pусский Russian Alexandr Kalugin RX9CDR\n\
Ελληνικά Greek Haris Andrianos SV1GRB\n\
</pre>\
</body>\n\
</html>\n\
";
| 2,546
|
C++
|
.cxx
| 75
| 32.32
| 79
| 0.642187
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,095
|
testsigs.cxx
|
w1hkj_fldigi/src/dialogs/testsigs.cxx
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#include "gettext.h"
#include "testsigs.h"
#include "configuration.h"
Fl_Counter2 *noiseDB=(Fl_Counter2 *)0;
static void cb_noiseDB(Fl_Counter2* o, void*) {
progdefaults.s2n = o->value();
}
Fl_Check_Button *btnNoiseOn=(Fl_Check_Button *)0;
static void cb_btnNoiseOn(Fl_Check_Button* o, void*) {
progdefaults.noise = o->value();
}
Fl_Counter *ctrl_freq_offset=(Fl_Counter *)0;
Fl_Check_Button *btnOffsetOn=(Fl_Check_Button *)0;
Fl_Counter2 *xmtimd=(Fl_Counter2 *)0;
Fl_Check_Button *btn_imd_on=(Fl_Check_Button *)0;
Fl_Double_Window* make_testdialog() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(480, 100, _("Test Signals"));
w = o; if (w) {/* empty */}
{ Fl_Counter2* o = noiseDB = new Fl_Counter2(10, 41, 127, 21, _("Noise level (db)"));
noiseDB->box(FL_UP_BOX);
noiseDB->color(FL_BACKGROUND_COLOR);
noiseDB->selection_color(FL_INACTIVE_COLOR);
noiseDB->labeltype(FL_NORMAL_LABEL);
noiseDB->labelfont(0);
noiseDB->labelsize(14);
noiseDB->labelcolor(FL_FOREGROUND_COLOR);
noiseDB->minimum(-30);
noiseDB->maximum(60);
noiseDB->value(20);
noiseDB->callback((Fl_Callback*)cb_noiseDB);
noiseDB->align(Fl_Align(FL_ALIGN_TOP));
noiseDB->when(FL_WHEN_CHANGED);
o->value(progdefaults.s2n);
o->lstep(1);
} // Fl_Counter2* noiseDB
{ Fl_Check_Button* o = btnNoiseOn = new Fl_Check_Button(39, 73, 68, 12, _("Noise on"));
btnNoiseOn->down_box(FL_DOWN_BOX);
btnNoiseOn->callback((Fl_Callback*)cb_btnNoiseOn);
o->value(progdefaults.noise);
} // Fl_Check_Button* btnNoiseOn
{ Fl_Counter* o = ctrl_freq_offset = new Fl_Counter(174, 41, 127, 21, _("freq-offset"));
ctrl_freq_offset->tooltip(_("ONLY FOR TESTING !"));
ctrl_freq_offset->minimum(-250);
ctrl_freq_offset->maximum(250);
ctrl_freq_offset->align(Fl_Align(FL_ALIGN_TOP));
o->lstep(10);
} // Fl_Counter* ctrl_freq_offset
{ btnOffsetOn = new Fl_Check_Button(203, 73, 68, 12, _("Offset on"));
btnOffsetOn->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* btnOffsetOn
{ Fl_Counter2* o = xmtimd = new Fl_Counter2(339, 41, 127, 21, _("PSK IMD\nlevel (db)"));
xmtimd->box(FL_UP_BOX);
xmtimd->color(FL_BACKGROUND_COLOR);
xmtimd->selection_color(FL_INACTIVE_COLOR);
xmtimd->labeltype(FL_NORMAL_LABEL);
xmtimd->labelfont(0);
xmtimd->labelsize(14);
xmtimd->labelcolor(FL_FOREGROUND_COLOR);
xmtimd->minimum(-40);
xmtimd->maximum(-15);
xmtimd->value(-30);
xmtimd->align(Fl_Align(FL_ALIGN_TOP));
xmtimd->when(FL_WHEN_CHANGED);
o->lstep(1.0);
} // Fl_Counter2* xmtimd
{ btn_imd_on = new Fl_Check_Button(368, 73, 68, 12, _("IMD on"));
btn_imd_on->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* btn_imd_on
{ Fl_Box* o = new Fl_Box(2, 2, 368, 20, _("!! DO NOT USE ON LIVE TRANSMITER !!"));
o->labelcolor((Fl_Color)80);
} // Fl_Box* o
o->end();
} // Fl_Double_Window* o
return w;
}
| 3,116
|
C++
|
.cxx
| 77
| 35.311688
| 92
| 0.637504
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,096
|
notifydialog.cxx
|
w1hkj_fldigi/src/dialogs/notifydialog.cxx
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#include "gettext.h"
#include "notifydialog.h"
#include <config.h>
#include "notify.h"
Fl_Group *grpNotifyEvent=(Fl_Group *)0;
Fl_Choice *mnuNotifyEvent=(Fl_Choice *)0;
Fl_Light_Button *btnNotifyEnabled=(Fl_Light_Button *)0;
Fl_Input2 *inpNotifyRE=(Fl_Input2 *)0;
Fl_Group *grpNotifyFilter=(Fl_Group *)0;
Fl_Round_Button *chkNotifyFilterCall=(Fl_Round_Button *)0;
static void cb_chkNotifyFilterCall(Fl_Round_Button* o, void*) {
if (!o->value()) {
o->value(1);
return;
}
inpNotifyFilterCall->show();
btnNotifyFilterDXCC->hide();
chkNotifyFilterDXCC->value(0);
}
Fl_Input2 *inpNotifyFilterCall=(Fl_Input2 *)0;
Fl_Round_Button *chkNotifyFilterDXCC=(Fl_Round_Button *)0;
static void cb_chkNotifyFilterDXCC(Fl_Round_Button* o, void*) {
if (!o->value()) {
o->value(1);
return;
}
inpNotifyFilterCall->hide();
btnNotifyFilterDXCC->show();
chkNotifyFilterCall->value(0);
}
Fl_Button *btnNotifyFilterDXCC=(Fl_Button *)0;
Fl_Check_Button *chkNotifyFilterNWB=(Fl_Check_Button *)0;
Fl_Check_Button *chkNotifyFilterLOTW=(Fl_Check_Button *)0;
Fl_Check_Button *chkNotifyFilterEQSL=(Fl_Check_Button *)0;
Fl_Group *grpNotifyDup=(Fl_Group *)0;
Fl_Check_Button *chkNotifyDupIgnore=(Fl_Check_Button *)0;
Fl_Choice *mnuNotifyDupWhich=(Fl_Choice *)0;
Fl_Spinner2 *cntNotifyDupTime=(Fl_Spinner2 *)0;
Fl_Check_Button *chkNotifyDupBand=(Fl_Check_Button *)0;
Fl_Check_Button *chkNotifyDupMode=(Fl_Check_Button *)0;
Fl_Group *grpNotifyAction=(Fl_Group *)0;
Fl_Spinner2 *cntNotifyActionLimit=(Fl_Spinner2 *)0;
Fl_Input2 *inpNotifyActionDialog=(Fl_Input2 *)0;
Fl_Button *btnNotifyActionDialogDefault=(Fl_Button *)0;
Fl_Spinner2 *cntNotifyActionDialogTimeout=(Fl_Spinner2 *)0;
Fl_Input2 *inpNotifyActionRXMarker=(Fl_Input2 *)0;
Fl_Button *btnNotifyActionMarkerDefault=(Fl_Button *)0;
Fl_Input2 *inpNotifyActionMacro=(Fl_Input2 *)0;
Fl_Button *btnNotifyActionMacro=(Fl_Button *)0;
Fl_Input2 *inpNotifyActionProgram=(Fl_Input2 *)0;
Fl_Button *btnNotifyActionProgram=(Fl_Button *)0;
Fl_Button *btnNotifyAdd=(Fl_Button *)0;
Fl_Button *btnNotifyRemove=(Fl_Button *)0;
Fl_Button *btnNotifyUpdate=(Fl_Button *)0;
Fl_Button *btnNotifyTest=(Fl_Button *)0;
Fl_Button *btnNotifyClose=(Fl_Button *)0;
static void cb_btnNotifyClose(Fl_Button* o, void*) {
o->window()->hide();
}
Table *tblNotifyList=(Table *)0;
Fl_Double_Window* make_notify_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(500, 550, _("Notifications"));
w = o; if (w) {/* empty */}
{ grpNotifyEvent = new Fl_Group(2, 2, 219, 126, _("Event"));
grpNotifyEvent->box(FL_ENGRAVED_FRAME);
grpNotifyEvent->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ mnuNotifyEvent = new Fl_Choice(10, 29, 205, 22);
mnuNotifyEvent->down_box(FL_BORDER_BOX);
} // Fl_Choice* mnuNotifyEvent
{ btnNotifyEnabled = new Fl_Light_Button(131, 94, 80, 23, _("Enabled"));
} // Fl_Light_Button* btnNotifyEnabled
{ Fl_Input2* o = inpNotifyRE = new Fl_Input2(36, 61, 175, 23, _("RE:"));
inpNotifyRE->box(FL_DOWN_BOX);
inpNotifyRE->color(FL_BACKGROUND2_COLOR);
inpNotifyRE->selection_color(FL_SELECTION_COLOR);
inpNotifyRE->labeltype(FL_NORMAL_LABEL);
inpNotifyRE->labelfont(0);
inpNotifyRE->labelsize(14);
inpNotifyRE->labelcolor(FL_FOREGROUND_COLOR);
inpNotifyRE->align(Fl_Align(FL_ALIGN_LEFT));
inpNotifyRE->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpNotifyRE
grpNotifyEvent->end();
} // Fl_Group* grpNotifyEvent
{ grpNotifyFilter = new Fl_Group(2, 130, 219, 176, _("Filter"));
grpNotifyFilter->box(FL_ENGRAVED_FRAME);
grpNotifyFilter->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ chkNotifyFilterCall = new Fl_Round_Button(12, 157, 80, 20, _("Callsign"));
chkNotifyFilterCall->down_box(FL_ROUND_DOWN_BOX);
chkNotifyFilterCall->callback((Fl_Callback*)cb_chkNotifyFilterCall);
} // Fl_Round_Button* chkNotifyFilterCall
{ inpNotifyFilterCall = new Fl_Input2(131, 157, 80, 20);
inpNotifyFilterCall->box(FL_DOWN_BOX);
inpNotifyFilterCall->color(FL_BACKGROUND2_COLOR);
inpNotifyFilterCall->selection_color(FL_SELECTION_COLOR);
inpNotifyFilterCall->labeltype(FL_NORMAL_LABEL);
inpNotifyFilterCall->labelfont(0);
inpNotifyFilterCall->labelsize(14);
inpNotifyFilterCall->labelcolor(FL_FOREGROUND_COLOR);
inpNotifyFilterCall->align(Fl_Align(FL_ALIGN_CENTER));
inpNotifyFilterCall->when(FL_WHEN_RELEASE);
} // Fl_Input2* inpNotifyFilterCall
{ chkNotifyFilterDXCC = new Fl_Round_Button(12, 186, 110, 20, _("DXCC entity"));
chkNotifyFilterDXCC->down_box(FL_ROUND_DOWN_BOX);
chkNotifyFilterDXCC->callback((Fl_Callback*)cb_chkNotifyFilterDXCC);
} // Fl_Round_Button* chkNotifyFilterDXCC
{ btnNotifyFilterDXCC = new Fl_Button(183, 183, 28, 23);
btnNotifyFilterDXCC->tooltip(_("Show DXCC entities"));
} // Fl_Button* btnNotifyFilterDXCC
{ chkNotifyFilterNWB = new Fl_Check_Button(12, 216, 155, 20, _("Not worked before"));
chkNotifyFilterNWB->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* chkNotifyFilterNWB
{ chkNotifyFilterLOTW = new Fl_Check_Button(12, 246, 100, 20, _("LotW user"));
chkNotifyFilterLOTW->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* chkNotifyFilterLOTW
{ chkNotifyFilterEQSL = new Fl_Check_Button(12, 276, 100, 20, _("eQSL user"));
chkNotifyFilterEQSL->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* chkNotifyFilterEQSL
grpNotifyFilter->end();
} // Fl_Group* grpNotifyFilter
{ grpNotifyDup = new Fl_Group(2, 308, 219, 149, _("Duplicates"));
grpNotifyDup->box(FL_ENGRAVED_FRAME);
grpNotifyDup->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ chkNotifyDupIgnore = new Fl_Check_Button(12, 337, 145, 20, _("Ignore duplicates"));
chkNotifyDupIgnore->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* chkNotifyDupIgnore
{ mnuNotifyDupWhich = new Fl_Choice(33, 367, 120, 20, _("in:"));
mnuNotifyDupWhich->down_box(FL_BORDER_BOX);
} // Fl_Choice* mnuNotifyDupWhich
{ Fl_Spinner2* o = cntNotifyDupTime = new Fl_Spinner2(93, 397, 60, 20, _("Time (s):"));
cntNotifyDupTime->box(FL_NO_BOX);
cntNotifyDupTime->color(FL_BACKGROUND_COLOR);
cntNotifyDupTime->selection_color(FL_BACKGROUND_COLOR);
cntNotifyDupTime->labeltype(FL_NORMAL_LABEL);
cntNotifyDupTime->labelfont(0);
cntNotifyDupTime->labelsize(14);
cntNotifyDupTime->labelcolor(FL_FOREGROUND_COLOR);
cntNotifyDupTime->minimum(0);
cntNotifyDupTime->maximum(97200);
cntNotifyDupTime->value(600);
cntNotifyDupTime->align(Fl_Align(FL_ALIGN_LEFT));
cntNotifyDupTime->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntNotifyDupTime
{ chkNotifyDupBand = new Fl_Check_Button(12, 427, 65, 20, _("Band"));
chkNotifyDupBand->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* chkNotifyDupBand
{ chkNotifyDupMode = new Fl_Check_Button(94, 427, 60, 20, _("Mode"));
chkNotifyDupMode->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* chkNotifyDupMode
grpNotifyDup->end();
} // Fl_Group* grpNotifyDup
{ grpNotifyAction = new Fl_Group(222, 2, 276, 394, _("Action"));
grpNotifyAction->box(FL_ENGRAVED_FRAME);
grpNotifyAction->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ Fl_Spinner2* o = cntNotifyActionLimit = new Fl_Spinner2(232, 40, 52, 20, _("Trigger limit (s):"));
cntNotifyActionLimit->tooltip(_("Minimum time between events"));
cntNotifyActionLimit->box(FL_NO_BOX);
cntNotifyActionLimit->color(FL_BACKGROUND_COLOR);
cntNotifyActionLimit->selection_color(FL_BACKGROUND_COLOR);
cntNotifyActionLimit->labeltype(FL_NORMAL_LABEL);
cntNotifyActionLimit->labelfont(0);
cntNotifyActionLimit->labelsize(14);
cntNotifyActionLimit->labelcolor(FL_FOREGROUND_COLOR);
cntNotifyActionLimit->minimum(0);
cntNotifyActionLimit->maximum(3600);
cntNotifyActionLimit->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntNotifyActionLimit->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntNotifyActionLimit
{ Fl_Input2* o = inpNotifyActionDialog = new Fl_Input2(232, 82, 218, 60, _("Show alert window:"));
inpNotifyActionDialog->type(4);
inpNotifyActionDialog->box(FL_DOWN_BOX);
inpNotifyActionDialog->color(FL_BACKGROUND2_COLOR);
inpNotifyActionDialog->selection_color(FL_SELECTION_COLOR);
inpNotifyActionDialog->labeltype(FL_NORMAL_LABEL);
inpNotifyActionDialog->labelfont(0);
inpNotifyActionDialog->labelsize(14);
inpNotifyActionDialog->labelcolor(FL_FOREGROUND_COLOR);
inpNotifyActionDialog->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inpNotifyActionDialog->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpNotifyActionDialog
{ btnNotifyActionDialogDefault = new Fl_Button(460, 100, 28, 23);
btnNotifyActionDialogDefault->tooltip(_("Insert default text"));
} // Fl_Button* btnNotifyActionDialogDefault
{ Fl_Spinner2* o = cntNotifyActionDialogTimeout = new Fl_Spinner2(232, 164, 52, 20, _("Hide window after (s):"));
cntNotifyActionDialogTimeout->box(FL_NO_BOX);
cntNotifyActionDialogTimeout->color(FL_BACKGROUND_COLOR);
cntNotifyActionDialogTimeout->selection_color(FL_BACKGROUND_COLOR);
cntNotifyActionDialogTimeout->labeltype(FL_NORMAL_LABEL);
cntNotifyActionDialogTimeout->labelfont(0);
cntNotifyActionDialogTimeout->labelsize(14);
cntNotifyActionDialogTimeout->labelcolor(FL_FOREGROUND_COLOR);
cntNotifyActionDialogTimeout->minimum(0);
cntNotifyActionDialogTimeout->maximum(3600);
cntNotifyActionDialogTimeout->value(5);
cntNotifyActionDialogTimeout->align(Fl_Align(FL_ALIGN_TOP_LEFT));
cntNotifyActionDialogTimeout->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Spinner2* cntNotifyActionDialogTimeout
{ Fl_Input2* o = inpNotifyActionRXMarker = new Fl_Input2(232, 205, 218, 60, _("Append to RX text:"));
inpNotifyActionRXMarker->type(4);
inpNotifyActionRXMarker->box(FL_DOWN_BOX);
inpNotifyActionRXMarker->color(FL_BACKGROUND2_COLOR);
inpNotifyActionRXMarker->selection_color(FL_SELECTION_COLOR);
inpNotifyActionRXMarker->labeltype(FL_NORMAL_LABEL);
inpNotifyActionRXMarker->labelfont(0);
inpNotifyActionRXMarker->labelsize(14);
inpNotifyActionRXMarker->labelcolor(FL_FOREGROUND_COLOR);
inpNotifyActionRXMarker->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inpNotifyActionRXMarker->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpNotifyActionRXMarker
{ btnNotifyActionMarkerDefault = new Fl_Button(460, 223, 28, 23);
btnNotifyActionMarkerDefault->tooltip(_("Insert default text"));
} // Fl_Button* btnNotifyActionMarkerDefault
{ Fl_Input2* o = inpNotifyActionMacro = new Fl_Input2(232, 287, 218, 60, _("Append to TX text:"));
inpNotifyActionMacro->type(4);
inpNotifyActionMacro->box(FL_DOWN_BOX);
inpNotifyActionMacro->color(FL_BACKGROUND2_COLOR);
inpNotifyActionMacro->selection_color(FL_SELECTION_COLOR);
inpNotifyActionMacro->labeltype(FL_NORMAL_LABEL);
inpNotifyActionMacro->labelfont(0);
inpNotifyActionMacro->labelsize(14);
inpNotifyActionMacro->labelcolor(FL_FOREGROUND_COLOR);
inpNotifyActionMacro->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inpNotifyActionMacro->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpNotifyActionMacro
{ btnNotifyActionMacro = new Fl_Button(460, 305, 28, 23);
btnNotifyActionMacro->tooltip(_("Show macro editor"));
} // Fl_Button* btnNotifyActionMacro
{ Fl_Input2* o = inpNotifyActionProgram = new Fl_Input2(232, 368, 218, 23, _("Run program:"));
inpNotifyActionProgram->box(FL_DOWN_BOX);
inpNotifyActionProgram->color(FL_BACKGROUND2_COLOR);
inpNotifyActionProgram->selection_color(FL_SELECTION_COLOR);
inpNotifyActionProgram->labeltype(FL_NORMAL_LABEL);
inpNotifyActionProgram->labelfont(0);
inpNotifyActionProgram->labelsize(14);
inpNotifyActionProgram->labelcolor(FL_FOREGROUND_COLOR);
inpNotifyActionProgram->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inpNotifyActionProgram->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpNotifyActionProgram
{ btnNotifyActionProgram = new Fl_Button(460, 368, 28, 23);
} // Fl_Button* btnNotifyActionProgram
grpNotifyAction->end();
} // Fl_Group* grpNotifyAction
{ btnNotifyAdd = new Fl_Button(223, 402, 90, 23);
} // Fl_Button* btnNotifyAdd
{ btnNotifyRemove = new Fl_Button(316, 402, 90, 23);
} // Fl_Button* btnNotifyRemove
{ btnNotifyUpdate = new Fl_Button(223, 431, 90, 23);
} // Fl_Button* btnNotifyUpdate
{ btnNotifyTest = new Fl_Button(316, 431, 90, 23);
} // Fl_Button* btnNotifyTest
{ btnNotifyClose = new Fl_Button(408, 431, 90, 23);
btnNotifyClose->callback((Fl_Callback*)cb_btnNotifyClose);
} // Fl_Button* btnNotifyClose
{ tblNotifyList = new Table(2, 460, 496, 88);
tblNotifyList->box(FL_UP_FRAME);
tblNotifyList->color(FL_BACKGROUND_COLOR);
tblNotifyList->selection_color(FL_SELECTION_COLOR);
tblNotifyList->labeltype(FL_NORMAL_LABEL);
tblNotifyList->labelfont(0);
tblNotifyList->labelsize(14);
tblNotifyList->labelcolor(FL_FOREGROUND_COLOR);
tblNotifyList->align(Fl_Align(FL_ALIGN_CENTER));
tblNotifyList->when(FL_WHEN_RELEASE);
Fl_Group::current()->resizable(tblNotifyList);
} // Table* tblNotifyList
o->size_range(500, 550);
o->end();
} // Fl_Double_Window* o
return w;
}
Table *tblNotifyFilterDXCC=(Table *)0;
Fl_Input2 *inpNotifyDXCCSearchCountry=(Fl_Input2 *)0;
Fl_Input2 *inpNotifyDXCCSearchCallsign=(Fl_Input2 *)0;
Fl_Button *btnNotifyDXCCSelect=(Fl_Button *)0;
Fl_Button *btnNotifyDXCCDeselect=(Fl_Button *)0;
Fl_Button *btnNotifyDXCCClose=(Fl_Button *)0;
static void cb_btnNotifyDXCCClose(Fl_Button* o, void*) {
o->window()->hide();
}
Fl_Double_Window* make_dxcc_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(435, 450, _("DXCC entities"));
w = o; if (w) {/* empty */}
{ tblNotifyFilterDXCC = new Table(2, 2, 432, 370);
tblNotifyFilterDXCC->box(FL_UP_FRAME);
tblNotifyFilterDXCC->color(FL_BACKGROUND2_COLOR);
tblNotifyFilterDXCC->selection_color(FL_SELECTION_COLOR);
tblNotifyFilterDXCC->labeltype(FL_NORMAL_LABEL);
tblNotifyFilterDXCC->labelfont(0);
tblNotifyFilterDXCC->labelsize(14);
tblNotifyFilterDXCC->labelcolor(FL_FOREGROUND_COLOR);
tblNotifyFilterDXCC->align(Fl_Align(FL_ALIGN_CENTER));
tblNotifyFilterDXCC->when(FL_WHEN_RELEASE);
Fl_Group::current()->resizable(tblNotifyFilterDXCC);
} // Table* tblNotifyFilterDXCC
{ Fl_Input2* o = inpNotifyDXCCSearchCountry = new Fl_Input2(104, 382, 120, 23, _("Find country:"));
inpNotifyDXCCSearchCountry->tooltip(_("Press return to continue the search"));
inpNotifyDXCCSearchCountry->box(FL_DOWN_BOX);
inpNotifyDXCCSearchCountry->color(FL_BACKGROUND2_COLOR);
inpNotifyDXCCSearchCountry->selection_color(FL_SELECTION_COLOR);
inpNotifyDXCCSearchCountry->labeltype(FL_NORMAL_LABEL);
inpNotifyDXCCSearchCountry->labelfont(0);
inpNotifyDXCCSearchCountry->labelsize(14);
inpNotifyDXCCSearchCountry->labelcolor(FL_FOREGROUND_COLOR);
inpNotifyDXCCSearchCountry->align(Fl_Align(FL_ALIGN_LEFT));
inpNotifyDXCCSearchCountry->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpNotifyDXCCSearchCountry
{ Fl_Input2* o = inpNotifyDXCCSearchCallsign = new Fl_Input2(104, 415, 120, 23, _("Find prefix:"));
inpNotifyDXCCSearchCallsign->box(FL_DOWN_BOX);
inpNotifyDXCCSearchCallsign->color(FL_BACKGROUND2_COLOR);
inpNotifyDXCCSearchCallsign->selection_color(FL_SELECTION_COLOR);
inpNotifyDXCCSearchCallsign->labeltype(FL_NORMAL_LABEL);
inpNotifyDXCCSearchCallsign->labelfont(0);
inpNotifyDXCCSearchCallsign->labelsize(14);
inpNotifyDXCCSearchCallsign->labelcolor(FL_FOREGROUND_COLOR);
inpNotifyDXCCSearchCallsign->align(Fl_Align(FL_ALIGN_LEFT));
inpNotifyDXCCSearchCallsign->when(FL_WHEN_RELEASE);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inpNotifyDXCCSearchCallsign
{ btnNotifyDXCCSelect = new Fl_Button(234, 382, 90, 23);
} // Fl_Button* btnNotifyDXCCSelect
{ btnNotifyDXCCDeselect = new Fl_Button(234, 415, 90, 23);
} // Fl_Button* btnNotifyDXCCDeselect
{ btnNotifyDXCCClose = new Fl_Button(334, 415, 90, 23);
btnNotifyDXCCClose->callback((Fl_Callback*)cb_btnNotifyDXCCClose);
} // Fl_Button* btnNotifyDXCCClose
o->size_range(300, 400);
o->end();
} // Fl_Double_Window* o
return w;
}
| 17,450
|
C++
|
.cxx
| 342
| 44.74269
| 119
| 0.703517
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,100
|
blank.cxx
|
w1hkj_fldigi/src/blank/blank.cxx
|
// ----------------------------------------------------------------------------
// blank.cxx -- BLANK modem
//
// Copyright (C) 2006
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted from code contained in gMFSK source code
// distribution.
// gMFSK Copyright (C) 2001, 2002, 2003
// Tomi Manninen (oh2bns@sral.fi)
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <stdlib.h>
#include <iostream>
#include "BLANK.h"
#include "ascii.h"
char BLANKmsg[80];
void BLANK::tx_init()
{
}
void BLANK::rx_init()
{
put_MODEstatus(mode);
}
void BLANK::init()
{
modem::init();
rx_init();
digiscope->mode(Digiscope::SCOPE);
}
BLANK::~BLANK()
{
delete bandpass;
delete hilbert;
delete lowpass;
delete sliding;
delete [] scope_data;
delete [] out_buf;
delete [] in_buf;
}
BLANK::BLANK(trx_mode BLANK_mode) : modem()
{
double cf, flo, fhi;
mode = BLANK_mode;
symlen = SYMLEN;
bandwidth = BLANK_BW;
samplerate = BLANKSampleRate;
flo = LP_F1 / corrRxSampleRate();
lowpass = new C_FIR_filter();
lowpass->init_lowpass (LP_FIRLEN, LP_DEC, flo );
flo = BP_F1 / corrRxSampleRate();
fhi = BP_F2 / corrRxSampleRate();
bandpass = new C_FIR_filter();
bandpass->init_bandpass (BP_FIRLEN, BP_DEC, flo, fhi );
hilbert = new C_FIR_filter();
hilbert->init_hilbert(37, 1);
sliding = new sfft (SL_LEN, SL_F1, SL_F2); // all integer values
scope_data = new double [SCOPE_DATA_LEN];
out_buf = new double [SYMLEN];
in_buf = new double [BUFLEN];
// init();
}
//=====================================================================
// receive processing
//=====================================================================
void BLANK::recvchar(int c)
{
if (c == -1)
return;
put_rx_char(c);
}
void BLANK::decodesymbol(unsigned char symbol)
{
}
complex BLANK::mixer(complex in, double f)
{
complex z;
// f may have to be modified
z = in * complex( cos(phaseacc), sin(phaseacc) );
phaseacc -= TWOPI * f / corrRxSampleRate();
if (phaseacc < 0) phaseacc += TWOPI;
return z;
}
void BLANK::update_syncscope()
{
int j;
memset(scopedata, 0, 2 * SCOPE_DATA_LEN);
if (!squelchon || metric >= squelch)
for (int i = 0; i < 2 * symlen; i++) {
// j = (i + pipeptr) % (2 * symlen);
// scopedata[i] = (pipe[j].vector[prev1symbol]).mag();
}
set_scope(scope_data, SCOPE_DATA_LEN);
}
void BLANK::afc()
{
complex z;
double x;
if (metric < squelch)
return;
// adjust "frequency" iaw with afc processing
}
int BLANK::rx_process(const double *buf, int len)
{
complex z;
int i;
while (len-- > 0) {
// create analytic signal...
z.re = z.im = *buf++;
hbfilt->run ( z, z );
// shift in frequency to the base freq of 1000 hz
z = mixer(z, frequency);
// bandpass filter around the shifted center frequency
// with required bandwidth
bandpass->run ( z, z );
// binsfft->run(z) copies frequencies of interest
complex dummy ;
sliding->run (z, &dummy, 0 );
// etc
decodesymbol();
update_syncscope();
afc();
}
return 0;
}
//=====================================================================
// transmit processing
//=====================================================================
void BLANK::sendchar(unsigned char c)
{
// need to generate the outbuf
ModulateXmtr(outbuf, symlen);
put_echo_char(c);
}
void sendidle() {
}
int BLANK::tx_process()
{
int xmtbyte;
switch (txstate) {
case TX_STATE_PREAMBLE:
for (int i = 0; i < 32; i++)
sendbit(0);
txstate = TX_STATE_START;
break;
case TX_STATE_START:
sendchar('\r');
sendchar(2); // STX
sendchar('\r');
txstate = TX_STATE_DATA;
break;
case TX_STATE_DATA:
xmtbyte = get_tx_char();
if (xmtbyte == GET_TX_CHAR_NODATA)
sendidle();
else if ( xmtbyte == GET_TX_CHAR_ETX || stopflag)
txstate = TX_STATE_FLUSH;
else
sendchar(xmtbyte);
break;
case TX_STATE_FLUSH:
sendchar('\r');
sendchar(4); // EOT
sendchar('\r');
flushtx();
stopflag = false;
// tell trx process that xmt is done
return -1;
default:
break;
}
return 0;
}
| 4,699
|
C++
|
.cxx
| 186
| 23.306452
| 81
| 0.622008
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,103
|
thor-pic.cxx
|
w1hkj_fldigi/src/thor/thor-pic.cxx
|
// ----------------------------------------------------------------------------
// thorpic.cxx -- thor image support functions
//
// Copyright (C) 2015
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted from code contained in gthor source code
// distribution.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <FL/Fl_Counter.H>
#include <FL/Fl_Choice.H>
#include "gettext.h"
#include "fileselect.h"
#include "qrunner.h"
#include "timeops.h"
void thor_createTxViewer();
void thor_showRxViewer(char);
Fl_Double_Window *thorpicRxWin = (Fl_Double_Window *)0;
picture *thorpicRx = (picture *)0;
Fl_Button *btnthorRxReset = (Fl_Button *)0;
Fl_Button *btnthorRxSave = (Fl_Button *)0;
Fl_Button *btnthorRxClose = (Fl_Button *)0;
Fl_Counter *thorcnt_phase = (Fl_Counter *)0;
Fl_Counter *thorcnt_slant = (Fl_Counter *)0;
Fl_Double_Window *thorpicTxWin = (Fl_Double_Window *)0;
picture *thorpicTx = (picture *)0;
Fl_Button *btnthorpicTransmit = (Fl_Button *)0;
Fl_Button *btnthorpicTxSendAbort = (Fl_Button *)0;
Fl_Button *btnthorpicTxLoad = (Fl_Button *)0;
Fl_Button *btnthorpicTxClose = (Fl_Button *)0;
Fl_Choice *selthorpicSize = (Fl_Choice *)0;
Fl_Check_Button *btnthorTxGrey = (Fl_Check_Button *)0;
void thor_showRxViewer(char c);
void thor_createRxViewer();
Fl_Shared_Image *thorTxImg = (Fl_Shared_Image *)0;
unsigned char *thorxmtimg = (unsigned char *)0;
unsigned char *thorxmtpicbuff = (unsigned char *)0;
#define RAWSIZE 640*(480 + 8)*3*thor::IMAGEspp
#define RAWSTART 640*4*3*thor::IMAGEspp
unsigned char *thor_rawvideo = 0;//[RAWSIZE + 1];
int thor_numpixels;
int thor_pixelptr;
int thor_rawcol;
int thor_rawrow;
int thor_rawrgb;
char thor_image_type = 'S';
char thor_txclr_tooltip[24];
char thor_txgry_tooltip[24];
static int translate = 0;
static bool enabled = false;
std::string thor::imageheader;
std::string thor::avatarheader;
int thor::IMAGEspp = THOR_IMAGESPP;
static std::string thor_fname;
void thor_correct_video()
{
int W = thorpicRx->w();
int H = thorpicRx->h();
int slant = thorcnt_slant->value();
int vidsize = W * H;
int index, rowptr, colptr;
float ratio = (((float)vidsize - (float)slant)/(float)vidsize);
unsigned char vid[W * H * 3];
for (int row = 0; row < H; row++) {
rowptr = W * 3 * row * thor::IMAGEspp;
for (int col = 0; col < W; col++) {
colptr = thor::IMAGEspp*col;
for (int rgb = 0; rgb < 3; rgb++) {
index = ratio*(rowptr + colptr + thor::IMAGEspp*W*rgb);
index += RAWSTART - thor::IMAGEspp*thor_pixelptr;
if (index < 2) index = 2;
if (index > RAWSIZE - 2) index = RAWSIZE - 2;
vid[rgb + 3 * (col + row * W)] = thor_rawvideo[index];
}
}
}
thorpicRx->video(vid, W*H*3);
}
void thor_updateRxPic(unsigned char data, int pos)
{
if (!thorpicRxWin->shown()) thorpicRx->show();
thorpicRx->pixel(data, pos);
int W = thorpicRx->w();
if (thor_image_type == 'F' || thor_image_type == 'p' || thor_image_type == 'm' ||
thor_image_type == 'l' || thor_image_type == 's' || thor_image_type == 'v') {
int n = RAWSTART + thor::IMAGEspp*(thor_rawcol + W * (thor_rawrgb + 3 * thor_rawrow));
if (n < RAWSIZE)
for (int i = 0; i < thor::IMAGEspp; i++) thor_rawvideo[n + i] = data;
thor_rawrgb++;
if (thor_rawrgb == 3) {
thor_rawrgb = 0;
thor_rawcol++;
if (thor_rawcol == W) {
thor_rawcol = 0;
thor_rawrow++;
}
}
} else
for (int i = 0; i < thor::IMAGEspp; i++)
thor_rawvideo[RAWSTART + thor::IMAGEspp*thor_numpixels + i] = data;
thor_numpixels++;
if (thor_numpixels >= (RAWSIZE - RAWSTART - thor::IMAGEspp))
thor_numpixels = RAWSIZE - RAWSTART - thor::IMAGEspp;
}
void cb_btnthorRxReset(Fl_Widget *, void *)
{
// progStatus.thor_rx_abort = true;
}
void thor_save_raw_video()
{
time_t time_sec = time(0);
struct tm ztime;
(void)gmtime_r(&time_sec, &ztime);
char sztime[20];
strftime(sztime, sizeof(sztime), "%Y%m%d%H%M%Sz", &ztime);
thor_fname.assign(PicsDir).append("THOR").append(sztime);
FILE *raw = fl_fopen(std::string(thor_fname).append(".raw").c_str(), "wb");
fwrite(&thor_image_type, 1, 1, raw);
fwrite(thor_rawvideo, 1, RAWSIZE, raw);
fclose(raw);
}
void thor_load_raw_video()
{
// abort & close any Rx video processing
int image_type = 0;
std::string image_types = "TtSsLlFVvPpMm";
if (!thorpicRxWin)
thor_createRxViewer();
else
thorpicRxWin->hide();
const char *p = FSEL::select(
_("Load raw image file"), "Image\t*.raw\n", PicsDir.c_str());
if (!p || !*p) return;
thor_fname.assign(p);
size_t p_raw = thor_fname.find(".raw");
if (p_raw != std::string::npos) thor_fname.erase(p_raw);
FILE *raw = fl_fopen(p, "rb");
int numread = fread(&image_type, 1, 1, raw);
if (numread != 1) {
fclose(raw);
return;
}
if (image_types.find(thor_image_type) != std::string::npos) {
thor_showRxViewer(image_type);
numread = fread(thor_rawvideo, 1, RAWSIZE, raw);
if (numread == RAWSIZE) {
thorcnt_phase->activate();
thorcnt_slant->activate();
btnthorRxSave->activate();
thor_correct_video();
thorpicRxWin->redraw();
}
}
fclose(raw);
}
void cb_btnthorRxSave(Fl_Widget *, void *)
{
thorpicRx->save_png(std::string(thor_fname).append(".png").c_str());
}
void cb_btnthorRxClose(Fl_Widget *, void *)
{
thorpicRxWin->hide();
}
void cb_thor_cnt_phase(Fl_Widget *, void *data)
{
thor_pixelptr = thorcnt_phase->value();
if (thor_pixelptr >= RAWSTART/thor::IMAGEspp) {
thor_pixelptr = RAWSTART/thor::IMAGEspp - 1;
thorcnt_phase->value(thor_pixelptr);
}
if (thor_pixelptr < -RAWSTART/thor::IMAGEspp) {
thor_pixelptr = -RAWSTART/thor::IMAGEspp;
thorcnt_phase->value(thor_pixelptr);
}
thor_correct_video();
}
void cb_thor_cnt_slant(Fl_Widget *, void *)
{
thor_correct_video();
}
void thor_disableshift()
{
if (!thorpicRxWin) return;
thorcnt_phase->deactivate();
thorcnt_slant->deactivate();
btnthorRxSave->deactivate();
thorpicRxWin->redraw();
}
void thor_enableshift()
{
if (!thorpicRxWin) return;
thorcnt_phase->activate();
thorcnt_slant->activate();
btnthorRxSave->activate();
thor_save_raw_video();
thorpicRxWin->redraw();
}
void thor_createRxViewer()
{
thorpicRxWin = new Fl_Double_Window(324, 274, _("thor Rx Image"));
thorpicRxWin->xclass(PACKAGE_NAME);
thorpicRxWin->begin();
thorpicRx = new picture(2, 2, 320, 240);
thorpicRx->noslant();
Fl_Group *buttons = new Fl_Group(0, thorpicRxWin->h() - 26, thorpicRxWin->w(), 26, "");
buttons->box(FL_FLAT_BOX);
btnthorRxReset = new Fl_Button(2, thorpicRxWin->h() - 26, 40, 24, "Reset");
btnthorRxReset->callback(cb_btnthorRxReset, 0);
thorcnt_phase = new Fl_Counter(46, thorpicRxWin->h() - 24, 80, 20, "");
thorcnt_phase->step(1);
thorcnt_phase->lstep(10);
thorcnt_phase->minimum(-RAWSTART + 1);
thorcnt_phase->maximum(RAWSTART - 1);
thorcnt_phase->value(0);
thorcnt_phase->callback(cb_thor_cnt_phase, 0);
thorcnt_phase->tooltip(_("Phase correction"));
thorcnt_slant = new Fl_Counter(140, thorpicRxWin->h() - 24, 80, 20, "");
thorcnt_slant->step(1);
thorcnt_slant->lstep(10);
thorcnt_slant->minimum(-200);
thorcnt_slant->maximum(200);
thorcnt_slant->value(0);
thorcnt_slant->callback(cb_thor_cnt_slant, 0);
thorcnt_slant->tooltip(_("Slant correction"));
btnthorRxSave = new Fl_Button(226, thorpicRxWin->h() - 26, 45, 24, _("Save"));
btnthorRxSave->callback(cb_btnthorRxSave, 0);
btnthorRxClose = new Fl_Button(273, thorpicRxWin->h() - 26, 45, 24, _("Close"));
btnthorRxClose->callback(cb_btnthorRxClose, 0);
buttons->end();
thorpicRxWin->end();
thorpicRxWin->resizable(thorpicRx);
thor_numpixels = 0;
}
void thor_showRxViewer(char itype)
{
int W = 320;
int H = 240;
switch (itype) {
case 'L' : case 'l' : W = 320; H = 240; break;
case 'S' : case 's' : W = 160; H = 120; break;
case 'V' : case 'F' : W = 640; H = 480; break;
case 'P' : case 'p' : W = 240; H = 300; break;
case 'M' : case 'm' : W = 120; H = 150; break;
case 'T' : W = 59; H = 74; break;
}
if (!thorpicRxWin) thor_createRxViewer();
int winW, winH;
int thorpicX, thorpicY;
winW = W < 320 ? 324 : W + 4;
winH = H < 240 ? 274 : H + 34;
thorpicX = (winW - W) / 2;
thorpicY = (winH - 30 - H) / 2;
thorpicRxWin->size(winW, winH);
thorpicRx->resize(thorpicX, thorpicY, W, H);
thorpicRxWin->init_sizes();
thorpicRx->clear();
thorpicRxWin->show();
thor_disableshift();
if (thor_rawvideo == 0) thor_rawvideo = new unsigned char [RAWSIZE + 1];
memset(thor_rawvideo, 0, RAWSIZE);
thor_numpixels = 0;
thor_pixelptr = 0;
thor_rawrow = thor_rawrgb = thor_rawcol = 0;
thor_image_type = itype;
}
void thor_clear_rximage()
{
thorpicRx->clear();
thor_disableshift();
translate = 0;
enabled = false;
thor_numpixels = 0;
thor_pixelptr = 0;
thorcnt_phase->value(0);
thorcnt_slant->value(0);
thor_rawrow = thor_rawrgb = thor_rawcol = 0;
}
//------------------------------------------------------------------------------
// image transmit functions
//------------------------------------------------------------------------------
void thor_load_scaled_image(std::string fname, bool gray)
{
if (!thorpicTxWin) thor_createTxViewer();
int D = 0;
unsigned char *img_data;
int W = 160;
int H = 120;
int winW = 644;
int winH = 512;
int thorpicX = 0;
int thorpicY = 0;
std::string picmode = "pic% \n";
if (thorTxImg) {
thorTxImg->release();
thorTxImg = 0;
}
thorTxImg = Fl_Shared_Image::get(fname.c_str());
if (!thorTxImg)
return;
int iW = thorTxImg->w();
int iH = thorTxImg->h();
int aspect = 0;
if (iW > iH ) {
if (iW >= 640) {
W = 640; H = 480;
winW = 644; winH = 484;
aspect = 5;
picmode[4] = 'V';
if (gray) {
picmode[4] = 'F';
}
}
else if (iW >= 320) {
W = 320; H = 240;
winW = 324; winH = 244;
aspect = 4;
picmode[4] = 'L';
if (gray) {
picmode[4] = 'l';
}
}
else {
W = 160; H = 120;
winW = 164; winH = 124;
aspect = 3;
picmode[4] = 'S';
if (gray) {
picmode[4] = 's';
}
}
} else {
if (iH >= 300) {
W = 240; H = 300;
winW = 244; winH = 304;
aspect = 2;
picmode[4] = 'P';
if (gray) {
picmode[4] = 'p';
}
}
else if (iH >= 150) {
W = 120; H = 150;
winW = 124; winH = 154;
aspect = 1;
picmode[4] = 'M';
if (gray) {
picmode[4] = 'm';
}
}
else {
W = 59; H = 74;
winW = 67; winH = 82;
aspect = 0;
picmode[4] = 'T';
if (gray) {
aspect = 0;
picmode[4] = 't';
}
}
}
{
Fl_Image *temp;
selthorpicSize->value(aspect);
temp = thorTxImg->copy(W, H);
thorTxImg->release();
thorTxImg = (Fl_Shared_Image *)temp;
}
if (thorTxImg->count() > 1) {
thorTxImg->release();
thorTxImg = 0;
return;
}
thorpicTx->hide();
thorpicTx->clear();
img_data = (unsigned char *)thorTxImg->data()[0];
D = thorTxImg->d();
if (thorxmtimg) delete [] thorxmtimg;
thorxmtimg = new unsigned char [W * H * 3];
if (D == 3)
memcpy(thorxmtimg, img_data, W*H*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < W*H; i++) {
j = i*3; k = i*4;
thorxmtimg[j] = img_data[k];
thorxmtimg[j+1] = img_data[k+1];
thorxmtimg[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < W*H; i++) {
j = i * 3;
thorxmtimg[j] = thorxmtimg[j+1] = thorxmtimg[j+2] = img_data[i];
}
} else
return;
char* label = strdup(fname.c_str());
thorpicTxWin->copy_label(basename(label));
free(label);
// load the thorpicture widget with the rgb image
thorpicTxWin->size(winW, winH);
thorpicX = (winW - W) / 2;
thorpicY = (winH - H) / 2;
thorpicTx->resize(thorpicX, thorpicY, W, H);
selthorpicSize->hide();
btnthorpicTransmit->hide();
btnthorpicTxLoad->hide();
btnthorpicTxClose->hide();
btnthorpicTxSendAbort->hide();
thorpicTx->video(thorxmtimg, W * H * 3);
thorpicTx->show();
thorpicTxWin->show();
active_modem->thor_send_image(picmode, gray);
return;
}
int thor_load_image(const char *n) {
int D = 0;
unsigned char *img_data;
int W = 640;
int H = 480;
switch (selthorpicSize->value()) {
case 0 : W = 59; H = 74; break;
case 1 : W = 120; H = 150; break;
case 2 : W = 240; H = 300; break;
case 3 : W = 160; H = 120; break;
case 4 : W = 320; H = 240; break;
case 5 : W = 640; H = 480; break;
}
if (thorTxImg) {
thorTxImg->release();
thorTxImg = 0;
}
thorTxImg = Fl_Shared_Image::get(n, W, H);
if (!thorTxImg)
return 0;
if (thorTxImg->count() > 1) {
thorTxImg->release();
thorTxImg = 0;
return 0;
}
thorpicTx->hide();
thorpicTx->clear();
img_data = (unsigned char *)thorTxImg->data()[0];
D = thorTxImg->d();
if (thorxmtimg) delete [] thorxmtimg;
thorxmtimg = new unsigned char [W * H * 3];
if (D == 3)
memcpy(thorxmtimg, img_data, W*H*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < W*H; i++) {
j = i*3; k = i*4;
thorxmtimg[j] = img_data[k];
thorxmtimg[j+1] = img_data[k+1];
thorxmtimg[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < W*H; i++) {
j = i * 3;
thorxmtimg[j] = thorxmtimg[j+1] = thorxmtimg[j+2] = img_data[i];
}
} else
return 0;
char* label = strdup(n);
thorpicTxWin->copy_label(basename(label));
free(label);
// load the thorpicture widget with the rgb image
thorpicTx->show();
thorpicTxWin->redraw();
thorpicTx->video(thorxmtimg, W * H * 3);
btnthorpicTransmit->activate();
return 1;
}
void thor_updateTxPic(unsigned char data, int pos)
{
if (!thorpicTxWin->shown()) thorpicTx->show();
thorpicTx->pixel(data, pos);
}
void cb_thorpicTxLoad(Fl_Widget *, void *)
{
const char *fn =
FSEL::select(_("Load image file"), "Image\t*.{png,,gif,jpg,jpeg}\n", PicsDir.c_str());
if (!fn) return;
if (!*fn) return;
thor_load_image(fn);
}
void thor_clear_tximage()
{
thorpicTx->clear();
}
void cb_thorpicTxClose( Fl_Widget *w, void *)
{
thorpicTxWin->hide();
}
int thorpic_TxGetPixel(int pos, int color)
{
return thorxmtimg[3*pos + color]; // color = {RED, GREEN, BLUE}
}
void cb_thorpicTransmit( Fl_Widget *w, void *)
{
std::string header = "pic% ";
bool grey = btnthorTxGrey->value();
char ch = ' ';
switch (selthorpicSize->value()) {
case 0 : thor_showTxViewer(ch = (grey ? 't' : 'T')); break; // 59 x 74
case 1 : thor_showTxViewer(ch = (grey ? 'm' : 'M')); break; // 120 x 150
case 2 : thor_showTxViewer(ch = (grey ? 'p' : 'P')); break; // 240 x 300
case 3 : thor_showTxViewer(ch = (grey ? 's' : 'S')); break; // 160 x 120
case 4 : thor_showTxViewer(ch = (grey ? 'l' : 'L')); break; // 320 x 240
case 5 : thor_showTxViewer(ch = (grey ? 'F' : 'V')); break; // 640 x 480
}
header[4] = ch;
active_modem->thor_send_image(header, grey);
}
void cb_thorpicTxSendAbort( Fl_Widget *w, void *)
{
}
void cb_selthorpicSize( Fl_Widget *w, void *)
{
switch (selthorpicSize->value()) {
case 0 : thor_showTxViewer('T'); break; // 59 x 74
case 1 : thor_showTxViewer('M'); break; // 120 x 150
case 2 : thor_showTxViewer('P'); break; // 240 x 300
case 3 : thor_showTxViewer('S'); break; // 160 x 120
case 4 : thor_showTxViewer('L'); break; // 320 x 240
case 5 : thor_showTxViewer('V'); break; // 640 x 480
}
}
void thor_createTxViewer()
{
thorpicTxWin = new Fl_Double_Window(324, 270, _("thor Send image"));
thorpicTxWin->xclass(PACKAGE_NAME);
thorpicTxWin->begin();
thorpicTx = new picture (2, 2, 320, 240);
thorpicTx->noslant();
thorpicTx->hide();
selthorpicSize = new Fl_Choice(5, 244, 90, 24);
selthorpicSize->add("59 x 74");
selthorpicSize->add("120x150");
selthorpicSize->add("240x300");
selthorpicSize->add("160x120");
selthorpicSize->add("320x240");
selthorpicSize->add("640x480");
selthorpicSize->value(1);
selthorpicSize->callback(cb_selthorpicSize, 0);
btnthorTxGrey = new Fl_Check_Button(99, 247, 18, 18);
btnthorTxGrey->value(0);
btnthorTxGrey->tooltip(_("Check for grey image"));
btnthorpicTxLoad = new Fl_Button(133, 244, 60, 24, _("Load"));
btnthorpicTxLoad->callback(cb_thorpicTxLoad, 0);
btnthorpicTransmit = new Fl_Button(thorpicTxWin->w() - 130, 244, 60, 24, "Xmt");
btnthorpicTransmit->callback(cb_thorpicTransmit, 0);
btnthorpicTxSendAbort = new Fl_Button(thorpicTxWin->w() - 130, 244, 60, 24, "Abort Xmt");
btnthorpicTxSendAbort->callback(cb_thorpicTxSendAbort, 0);
btnthorpicTxClose = new Fl_Button(thorpicTxWin->w() - 65, 244, 60, 24, _("Close"));
btnthorpicTxClose->callback(cb_thorpicTxClose, 0);
btnthorpicTxSendAbort->hide();
btnthorpicTransmit->deactivate();
thorpicTxWin->end();
}
void thor_showTxViewer(char c)
{
if (!thorpicTxWin) thor_createTxViewer();
int winW = 644, winH = 512, W = 480, H = 320;
int thorpicX, thorpicY;
thorpicTx->clear();
switch (c) {
case 'T' : case 't' :
W = 59; H = 74; winW = 324; winH = 184;
selthorpicSize->value(0);
break;
case 'S' : case 's' :
W = 160; H = 120; winW = 324; winH = 154;
selthorpicSize->value(3);
break;
case 'L' : case 'l' :
W = 320; H = 240; winW = 324; winH = 274;
selthorpicSize->value(4);
break;
case 'F' : case 'V' :
W = 640; H = 480; winW = 644; winH = 514;
selthorpicSize->value(5);
break;
case 'P' : case 'p' :
W = 240; H = 300; winW = 324; winH = 334;
selthorpicSize->value(2);
break;
case 'M' : case 'm' :
W = 120; H = 150; winW = 324; winH = 184;
selthorpicSize->value(1);
break;
}
thorpicTxWin->size(winW, winH);
thorpicX = (winW - W) / 2;
thorpicY = (winH - 26 - H) / 2;
thorpicTx->resize(thorpicX, thorpicY, W, H);
selthorpicSize->resize(5, winH - 26, 90, 24);
btnthorTxGrey->resize(selthorpicSize->x() + selthorpicSize->w() + 4, winH - 23, 18, 18);
btnthorpicTxLoad->resize(btnthorTxGrey->x() + btnthorTxGrey->w() + 4, winH - 26, 60, 24);
btnthorpicTransmit->resize(winW - 130, winH - 26, 60, 24);
btnthorpicTxSendAbort->resize(winW - 130, winH - 26, 60, 24);
btnthorpicTxClose->resize(winW -65, winH - 26, 60, 24);
selthorpicSize->show();
btnthorpicTransmit->show();
btnthorpicTxLoad->show();
btnthorpicTxClose->show();
btnthorpicTxSendAbort->hide();
thorpicTxWin->show();
}
void thor_deleteTxViewer()
{
if (thorpicTxWin) thorpicTxWin->hide();
if (thorpicTx) {
delete thorpicTx;
thorpicTx = 0;
}
delete [] thorxmtimg;
thorxmtimg = 0;
delete [] thorxmtpicbuff;
thorxmtpicbuff = 0;
if (thorpicTxWin) delete thorpicTxWin;
thorpicTxWin = 0;
}
void thor_deleteRxViewer()
{
if (thorpicRxWin) thorpicRxWin->hide();
if (thorpicRx) {
delete thorpicRx;
thorpicRx = 0;
}
if (thorpicRxWin) {
delete thorpicRxWin;
thorpicRxWin = 0;
}
}
int thor_print_time_left(float time_sec, char *str, size_t len,
const char *prefix, const char *suffix)
{
int time_min = (int)(time_sec / 60);
time_sec -= time_min * 60;
if (time_min)
return snprintf(str, len, "%s %02dm %2.1fs%s",
prefix, time_min, time_sec, suffix);
else
return snprintf(str, len, "%s %2.1fs%s", prefix, time_sec, suffix);
}
// -----------------------------------------------------------------------------
// avatar send/recv
// -----------------------------------------------------------------------------
static Fl_Shared_Image *shared_avatar_img = (Fl_Shared_Image *)0;
static unsigned char *avatar_img = (unsigned char *)0;
static Fl_Shared_Image *my_avatar_img = (Fl_Shared_Image *)0;
static int avatar_phase_correction = 0;
static unsigned char avatar[59 * 74 * 3];
void thor_clear_avatar()
{
thor_avatar->clear();
avatar_phase_correction = 0;
thor_numpixels = 0;
thor_rawrow = thor_rawrgb = thor_rawcol = 0;
thor_avatar->video(tux_img, 59 * 74 * 3);
}
// W always 59, H always 74
int thor_load_avatar(std::string image_fname, int W, int H)
{
W = 59; H = 74;
if (image_fname.empty()) {
thor_clear_avatar();
return 1;
}
int D = 0;
unsigned char *img_data;
if (shared_avatar_img) {
shared_avatar_img->release();
shared_avatar_img = 0;
}
for (size_t n = 0; n < image_fname.length(); n++)
image_fname[n] = tolower(image_fname[n]);
std::string fname = AvatarDir;
fname.append(image_fname).append(".png");
FILE *temp = fl_fopen(fname.c_str(), "rb");
if (temp) {
fseek(temp, 0L, SEEK_SET);
fclose(temp);
} else {
thor_avatar->video(tux_img, W * H * 3);
return 1;
}
shared_avatar_img = Fl_Shared_Image::get(fname.c_str(), W, H);
// force image to be retrieved from hard drive vice shared image memory
shared_avatar_img->reload();
if (!shared_avatar_img) {
thor_avatar->video(tux_img, W * H * 3);
return 1;
}
if (shared_avatar_img->count() > 1) {
shared_avatar_img->release();
shared_avatar_img = 0;
thor_avatar->video(tux_img, W * H * 3);
return 0;
}
img_data = (unsigned char *)shared_avatar_img->data()[0];
D = shared_avatar_img->d();
if (avatar_img) delete [] avatar_img;
avatar_img = new unsigned char [W * H * 3];
if (D == 3)
memcpy(avatar_img, img_data, W*H*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < W*H; i++) {
j = i*3; k = i*4;
avatar_img[j] = img_data[k];
avatar_img[j+1] = img_data[k+1];
avatar_img[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < W*H; i++) {
j = i * 3;
avatar_img[j] = avatar_img[j+1] = avatar_img[j+2] = img_data[i];
}
} else {
thor_avatar->video(tux_img, W * H * 3);
return 0;
}
thor_avatar->video(avatar_img, W * H * 3);
shared_avatar_img->release();
shared_avatar_img = 0;
return 1;
}
void thor_correct_avatar()
{
int W = 59;
int H = 74;
int index, rowptr, colptr;
unsigned char vid[W * H * 3];
if (avatar_phase_correction >= RAWSTART/thor::IMAGEspp) {
avatar_phase_correction = RAWSTART/thor::IMAGEspp - 1;
}
if (avatar_phase_correction < -RAWSTART/thor::IMAGEspp) {
avatar_phase_correction = -RAWSTART/thor::IMAGEspp;
}
for (int row = 0; row < H; row++) {
rowptr = W * 3 * row * thor::IMAGEspp;
for (int col = 0; col < W; col++) {
colptr = thor::IMAGEspp*col;
for (int rgb = 0; rgb < 3; rgb++) {
index = rowptr + colptr + W*rgb*thor::IMAGEspp;
index += RAWSTART - thor::IMAGEspp * avatar_phase_correction;
if (index < 2) index = 2;
if (index > RAWSIZE - 2) index = RAWSIZE - 2;
vid[rgb + 3 * (col + row * W)] = thor_rawvideo[index];
}
}
}
thor_avatar->video(vid, W*H*3);
}
void thor_update_avatar(unsigned char data, int pos)
{
if (thor_rawvideo == 0) {
thor_rawvideo = new unsigned char [RAWSIZE + 1];
memset(thor_rawvideo, 0, RAWSIZE);
}
thor_avatar->pixel(data, pos);
for (int i = 0; i < thor::IMAGEspp; i++)
thor_rawvideo[RAWSTART + thor::IMAGEspp*thor_numpixels + i] = data;
thor_numpixels++;
if (thor_numpixels >= (RAWSIZE - RAWSTART - thor::IMAGEspp))
thor_numpixels = RAWSIZE - RAWSTART - thor::IMAGEspp;
}
int thor_get_avatar_pixel(int pos, int color)
{
// color = {RED, GREEN, BLUE}
return (int)avatar[3*pos + color];
}
// ADD CALLBACK HANDLING OF PHASE CORRECTIONS
void cb_thor_send_avatar( Fl_Widget *w, void *)
{
if (Fl::event_button() == FL_RIGHT_MOUSE) {
if (Fl::get_key (FL_Shift_L) || Fl::get_key(FL_Shift_R)) {
if (thor_numpixels == 0) return;
avatar_phase_correction += 5;
thor_correct_avatar();
return;
}
if (Fl::get_key (FL_Control_L) || Fl::get_key(FL_Control_R)) {
if (thor_numpixels == 0) return;
avatar_phase_correction++;
thor_correct_avatar();
return;
}
std::string mycall = progdefaults.myCall;
for (size_t n = 0; n < mycall.length(); n++)
mycall[n] = tolower(mycall[n]);
std::string fname = AvatarDir;
fname.append(mycall).append(".png");
my_avatar_img = Fl_Shared_Image::get(fname.c_str(), 59, 74);
if (!my_avatar_img) return;
unsigned char *img_data = (unsigned char *)my_avatar_img->data()[0];
memset(avatar, 0, sizeof(avatar));
int D = my_avatar_img->d();
if (D == 3)
memcpy(avatar, img_data, 59*74*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < 59*74; i++) {
j = i*3; k = i*4;
avatar[j] = img_data[k];
avatar[j+1] = img_data[k+1];
avatar[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < 59*74; i++) {
j = i * 3;
avatar[j] = avatar[j+1] = avatar[j+2] = img_data[i];
}
} else
return;
thor::avatarheader = "\npic%A";
active_modem->thor_send_avatar();
return;
}
if (Fl::event_button() == FL_LEFT_MOUSE) {
if (Fl::get_key (FL_Shift_L) || Fl::get_key(FL_Shift_R)) {
if (thor_numpixels == 0) return;
avatar_phase_correction -= 5;
thor_correct_avatar();
return;
}
if (Fl::get_key (FL_Control_L) || Fl::get_key(FL_Control_R)) {
if (thor_numpixels == 0) return;
avatar_phase_correction--;
thor_correct_avatar();
return;
}
std::string mycall = inpCall->value();
if (mycall.empty()) return;
for (size_t n = 0; n < mycall.length(); n++)
mycall[n] = tolower(mycall[n]);
std::string fname = AvatarDir;
fname.append(mycall).append(".png");
thor_avatar->save_png(fname.c_str());
}
}
| 25,394
|
C++
|
.cxx
| 859
| 27.009313
| 90
| 0.638394
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,105
|
tux.cxx
|
w1hkj_fldigi/src/ifkp/tux.cxx
|
// tux avatar
unsigned char tux_img[59*74*3] = {
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 36, 36, 36, 74, 74, 76, 44, 44, 44, 2, 2,
4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 36, 36, 36, 124, 124, 124, 86, 86, 84, 28,
28, 27, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 44, 44, 44, 92, 92, 92, 60, 60, 60,
36, 36, 36, 10, 6, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 20, 20, 19, 10, 6, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 12, 12, 12,
10, 6, 4, 44, 44, 44, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 52, 52,
52, 20, 20, 19, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 20, 20,
19, 131, 131, 132, 2, 2, 4, 52, 52, 52, 2, 2, 4, 2, 2, 4,
12, 12, 12, 2, 2, 4, 86, 86, 84, 141, 141, 140, 156, 156, 156, 68,
68, 68, 12, 12, 12, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 148,
148, 148, 204, 204, 204, 156, 156, 156, 20, 20, 19, 2, 2, 4, 2, 2,
4, 2, 2, 4, 100, 100, 100, 172, 172, 172, 196, 196, 196, 204, 204, 204,
181, 180, 179, 28, 28, 27, 12, 12, 12, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 10, 6, 4,
244, 244, 244, 254, 254, 252, 254, 254, 252, 228, 228, 228, 2, 2, 4, 2,
2, 4, 2, 2, 4, 221, 221, 220, 254, 254, 252, 228, 228, 228, 212, 212,
212, 244, 244, 244, 164, 164, 164, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 60, 60,
60, 124, 124, 124, 60, 60, 60, 148, 148, 148, 254, 254, 252, 12, 12, 12,
12, 12, 12, 2, 2, 4, 244, 244, 244, 244, 244, 244, 2, 2, 4, 148,
148, 148, 212, 212, 212, 254, 254, 252, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 86,
86, 84, 2, 2, 4, 2, 2, 4, 44, 44, 44, 254, 254, 252, 12, 12,
12, 12, 12, 12, 12, 12, 12, 236, 236, 236, 36, 36, 36, 2, 2, 4,
12, 12, 12, 12, 12, 12, 254, 254, 252, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4,
52, 52, 52, 12, 12, 12, 2, 2, 4, 2, 2, 4, 164, 164, 164, 182,
140, 8, 172, 140, 4, 142, 106, 7, 156, 156, 156, 60, 60, 60, 2, 2,
4, 2, 2, 4, 2, 2, 4, 254, 254, 252, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2,
4, 2, 2, 4, 254, 254, 252, 2, 2, 4, 173, 120, 10, 173, 120, 10,
235, 188, 11, 225, 180, 10, 142, 106, 7, 225, 180, 10, 225, 180, 10, 2,
2, 4, 2, 2, 4, 254, 254, 252, 254, 254, 252, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2,
2, 4, 2, 2, 4, 228, 228, 228, 173, 120, 10, 218, 163, 9, 236, 180,
11, 235, 188, 11, 235, 196, 12, 235, 205, 40, 244, 213, 67, 241, 212, 42,
243, 196, 11, 215, 172, 9, 196, 196, 196, 156, 156, 156, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
2, 2, 4, 2, 2, 4, 165, 114, 10, 201, 142, 7, 229, 172, 9, 236,
180, 11, 235, 196, 12, 237, 204, 14, 242, 218, 44, 246, 218, 74, 246, 218,
20, 246, 213, 13, 246, 218, 20, 243, 205, 12, 235, 179, 22, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 2, 2, 4, 73, 48, 6, 192, 133, 7, 216, 156, 8, 236, 180, 11,
235, 188, 11, 235, 196, 12, 235, 205, 40, 246, 218, 74, 246, 218, 20, 246,
218, 20, 246, 213, 13, 246, 213, 13, 150, 114, 11, 229, 172, 9, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 2, 2, 4, 106, 75, 6, 201, 142, 7, 223, 165, 9, 242, 182,
12, 235, 188, 11, 237, 204, 14, 244, 213, 67, 246, 218, 20, 246, 213, 13,
246, 213, 13, 208, 164, 13, 206, 142, 8, 218, 163, 9, 216, 156, 8, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 2, 2, 4, 2, 2, 4, 116, 73, 4, 215, 172, 9, 245,
189, 12, 235, 196, 12, 235, 205, 40, 241, 211, 17, 246, 213, 13, 237, 204,
14, 106, 75, 6, 207, 148, 7, 216, 156, 8, 216, 156, 8, 199, 138, 8,
2, 2, 4, 2, 2, 4, 124, 124, 124, 28, 28, 27, 2, 2, 4, 2,
2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 164, 164, 164, 136, 95, 7,
142, 106, 7, 189, 157, 4, 189, 157, 4, 154, 119, 11, 164, 109, 5, 192,
133, 7, 206, 142, 8, 207, 148, 7, 192, 133, 7, 190, 189, 188, 190, 189,
188, 2, 2, 4, 2, 2, 4, 36, 36, 36, 131, 131, 132, 52, 52, 52,
2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 190, 189, 188, 190, 189,
188, 155, 102, 5, 193, 139, 10, 223, 165, 9, 215, 150, 13, 206, 142, 8,
192, 133, 7, 192, 133, 7, 184, 173, 150, 190, 189, 188, 196, 196, 196, 196,
196, 196, 28, 28, 27, 2, 2, 4, 2, 2, 4, 124, 124, 124, 74, 74,
76, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 190, 189, 188, 190,
189, 188, 190, 189, 188, 144, 96, 7, 164, 109, 5, 164, 109, 5, 155, 102,
5, 171, 114, 5, 190, 189, 188, 181, 180, 179, 196, 196, 196, 244, 244, 244,
244, 244, 244, 212, 212, 212, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4, 236, 236, 236,
204, 204, 204, 190, 189, 188, 190, 189, 188, 181, 180, 179, 184, 173, 150, 190,
189, 188, 190, 189, 188, 190, 189, 188, 204, 204, 204, 244, 244, 244, 254, 254,
252, 254, 254, 252, 254, 254, 252, 28, 28, 27, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 12, 12, 12, 2, 2, 4, 108, 108, 107, 254, 254,
252, 236, 236, 236, 190, 189, 188, 190, 189, 188, 190, 189, 188, 190, 189, 188,
190, 189, 188, 190, 189, 188, 212, 212, 212, 244, 244, 244, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 2, 2, 4, 12, 12, 12, 20, 20, 19, 254, 254, 252, 254,
254, 252, 254, 254, 252, 204, 204, 204, 190, 189, 188, 190, 189, 188, 190, 189,
188, 212, 212, 212, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 10, 6, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 2, 2, 4, 2, 2, 4, 2, 2, 4, 244, 244, 244, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 236, 236, 236, 228, 228, 228, 244,
244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 236, 236, 236,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 2, 2, 4, 2, 2, 4, 2, 2, 4, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244,
244, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244,
244, 244, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 164, 164, 164, 244, 244, 244,
254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252, 236,
236, 236, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 236, 236, 236, 221, 221, 220,
228, 228, 228, 52, 52, 52, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 12, 12, 12, 156, 156, 156, 196, 196,
196, 228, 228, 228, 244, 244, 244, 244, 244, 244, 244, 244, 244, 228, 228, 228,
228, 228, 228, 236, 236, 236, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244,
244, 244, 212, 212, 212, 204, 204, 204, 196, 196, 196, 196, 196, 196, 190, 189,
188, 196, 196, 196, 244, 244, 244, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 20, 20, 19, 172, 172, 172, 228,
228, 228, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 236, 236,
236, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 236, 236, 236, 221, 221, 220, 204, 204, 204, 196,
196, 196, 190, 189, 188, 204, 204, 204, 100, 100, 100, 2, 2, 4, 60, 60,
60, 36, 36, 36, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2,
4, 2, 2, 4, 12, 12, 12, 2, 2, 4, 164, 164, 164, 228, 228, 228,
254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244,
244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
244, 244, 244, 212, 212, 212, 190, 189, 188, 244, 244, 244, 2, 2, 4, 2,
2, 4, 2, 2, 4, 52, 52, 52, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2,
2, 4, 80, 80, 80, 2, 2, 4, 2, 2, 4, 244, 244, 244, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 236, 236, 236, 196, 196, 196, 254, 254, 252,
2, 2, 4, 2, 2, 4, 2, 2, 4, 68, 68, 68, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4,
2, 2, 4, 12, 12, 12, 2, 2, 4, 181, 180, 179, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 221, 221, 220, 212, 212,
212, 2, 2, 4, 12, 12, 12, 44, 44, 44, 12, 12, 12, 10, 6, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2,
4, 80, 80, 80, 2, 2, 4, 2, 2, 4, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 44, 44, 44, 20, 20, 19, 80, 80, 80, 28, 28, 27, 80, 80,
80, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2,
2, 4, 10, 6, 4, 2, 2, 4, 204, 204, 204, 254, 254, 252, 244, 244,
244, 254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252,
254, 254, 252, 244, 244, 244, 20, 20, 19, 28, 28, 27, 12, 12, 12, 12,
12, 12, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4,
12, 12, 12, 2, 2, 4, 2, 2, 4, 254, 254, 252, 254, 254, 252, 244,
244, 244, 254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254,
252, 228, 228, 228, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244,
244, 244, 244, 244, 244, 244, 244, 244, 254, 254, 252, 244, 244, 244, 254, 254,
252, 254, 254, 252, 254, 254, 252, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 36, 36, 36, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2,
4, 100, 100, 100, 2, 2, 4, 28, 28, 27, 254, 254, 252, 254, 254, 252,
244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 228, 228, 228, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244,
244, 244, 254, 254, 252, 254, 254, 252, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 80, 80, 80, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2,
2, 4, 10, 6, 4, 2, 2, 4, 228, 228, 228, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 221, 221, 220, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244,
254, 254, 252, 244, 244, 244, 254, 254, 252, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 80, 80, 80, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4,
10, 6, 4, 2, 2, 4, 2, 2, 4, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 221, 221, 220, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254,
254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 10, 6, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 44, 44, 44, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2,
4, 20, 20, 19, 2, 2, 4, 20, 20, 19, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 221, 221, 220, 244, 244, 244, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252, 36, 36, 36, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2,
2, 4, 28, 28, 27, 2, 2, 4, 28, 28, 27, 244, 244, 244, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244,
254, 254, 252, 254, 254, 252, 221, 221, 220, 254, 254, 252, 244, 244, 244, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 60, 60, 60, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2, 4,
2, 2, 4, 60, 60, 60, 2, 2, 4, 60, 60, 60, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 244, 244, 244, 254, 254, 252, 228, 228, 228, 244, 244, 244, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 68, 68, 68,
2, 2, 4, 2, 2, 4, 68, 68, 68, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2, 2,
4, 2, 2, 4, 20, 20, 19, 36, 36, 36, 100, 100, 100, 254, 254, 252,
254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244,
244, 244, 254, 254, 252, 254, 254, 252, 228, 228, 228, 254, 254, 252, 254, 254,
252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 60, 60,
60, 2, 2, 4, 2, 2, 4, 20, 20, 19, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 12, 12, 12, 92, 92, 92, 244, 244,
244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 228, 228, 228, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254,
252, 254, 254, 252, 244, 244, 244, 244, 244, 244, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 244, 244, 244, 2,
2, 4, 12, 12, 12, 60, 60, 60, 10, 6, 4, 36, 36, 36, 44, 44,
44, 12, 12, 12, 2, 2, 4, 2, 2, 4, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
207, 148, 7, 245, 189, 12, 223, 165, 9, 2, 2, 4, 80, 80, 80, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 228, 228, 228, 254, 254, 252,
244, 244, 244, 254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 124, 124, 124, 2, 2, 4, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 193, 139,
10, 242, 182, 12, 245, 189, 12, 245, 189, 12, 229, 172, 9, 2, 2, 4,
68, 68, 68, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 228, 228, 228, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 223, 172, 66, 236, 180, 11, 235, 179,
22, 126, 98, 12, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 60, 60, 60, 28, 28, 27, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 215,
150, 13, 235, 179, 22, 245, 189, 12, 245, 189, 12, 245, 189, 12, 165, 114,
10, 2, 2, 4, 108, 108, 107, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 228, 228, 228, 254,
254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 229, 172, 9, 243, 196, 11, 246,
213, 13, 148, 108, 9, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 20, 20, 19, 20, 20, 19, 164, 119, 10, 226, 188, 12,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 199, 138, 8,
223, 165, 9, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 145, 102, 10, 2, 2, 4, 20, 20, 19, 244, 244, 244, 254, 254,
252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 236, 236, 236,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 223, 165, 9, 245, 189, 12,
226, 188, 12, 92, 67, 9, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 20, 20, 19, 235, 196, 12, 243, 205,
12, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 182,
126, 10, 216, 156, 8, 218, 163, 9, 209, 155, 9, 207, 148, 7, 229, 172,
9, 236, 180, 11, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 237, 204, 14, 2, 2, 4, 2, 2, 4, 10, 6, 4, 228,
228, 228, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244,
244, 244, 254, 254, 252, 244, 244, 244, 221, 221, 220, 223, 165, 9, 242, 182,
12, 229, 172, 9, 173, 120, 10, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 223, 165, 9, 235, 188, 11, 245,
189, 12, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
215, 150, 13, 235, 179, 22, 236, 180, 11, 229, 172, 9, 236, 180, 11, 242,
182, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 243, 196, 11, 170, 126, 10, 2, 2, 4, 2, 2, 4,
2, 2, 4, 236, 236, 236, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244,
244, 254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 204, 204, 204, 196, 196, 196, 216, 156, 8, 236,
180, 11, 223, 165, 9, 185, 131, 9, 73, 48, 6, 2, 2, 4, 2, 2,
4, 2, 2, 4, 41, 28, 4, 185, 131, 9, 229, 172, 9, 235, 188, 11,
245, 189, 12, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 181, 126,
47, 218, 163, 9, 236, 180, 11, 242, 182, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 226, 188, 12, 2, 2, 4, 2, 2,
4, 2, 2, 4, 12, 12, 12, 181, 180, 179, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 196, 196, 196, 196, 196, 196, 215, 150, 13,
229, 172, 9, 229, 172, 9, 207, 148, 7, 185, 131, 9, 179, 121, 7, 173,
120, 10, 179, 121, 7, 192, 133, 7, 216, 156, 8, 242, 182, 12, 245, 189,
12, 245, 189, 12, 215, 172, 9, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 218, 163, 9, 242, 182, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 243, 196, 11, 194, 147, 11, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 244, 244, 244, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244,
244, 244, 254, 254, 252, 254, 254, 252, 204, 204, 204, 196, 196, 196, 201, 142,
7, 229, 172, 9, 236, 180, 11, 218, 163, 9, 207, 148, 7, 207, 148, 7,
207, 148, 7, 207, 148, 7, 223, 165, 9, 236, 180, 11, 245, 189, 12, 245,
189, 12, 245, 189, 12, 242, 182, 12, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 216, 156, 8, 235, 179, 22, 245, 189, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 243, 205, 12,
20, 20, 19, 2, 2, 4, 2, 2, 4, 2, 2, 4, 12, 12, 12, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244,
254, 254, 252, 254, 254, 252, 254, 254, 252, 221, 221, 220, 196, 196, 196, 185,
131, 9, 223, 165, 9, 242, 182, 12, 236, 180, 11, 223, 165, 9, 223, 165,
9, 223, 165, 9, 229, 172, 9, 236, 180, 11, 245, 189, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 242, 182, 12, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 207, 148, 24, 236, 180, 11, 242, 182, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 216, 156, 8, 2, 2, 4, 2, 2, 4, 2, 2, 4, 12, 12, 12,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 228, 228, 228, 190, 189, 188,
185, 131, 9, 223, 165, 9, 242, 182, 12, 245, 189, 12, 236, 180, 11, 236,
180, 11, 236, 180, 11, 242, 182, 12, 245, 189, 12, 242, 182, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 242, 182, 12, 235, 188, 11,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 206, 142, 8, 235, 179, 22, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 243, 205, 12, 164, 119, 10, 2, 2, 4, 2, 2, 4, 244, 244,
244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 190, 189, 188, 2, 2,
4, 185, 131, 9, 223, 165, 9, 235, 188, 11, 242, 182, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 242, 182, 12, 229, 172, 9, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 206, 142, 8, 229, 172, 9, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 235, 188, 11, 235, 196, 12, 236, 236, 236, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 236, 236, 236, 2, 2, 4, 10,
6, 4, 185, 131, 9, 223, 165, 9, 242, 182, 12, 242, 182, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 242, 182, 12, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 206, 142, 8, 235, 179, 22, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 235, 196, 12, 207, 148, 24, 254, 254, 252,
254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 254, 254, 252, 254, 254, 252, 244, 244, 244, 254, 254, 252, 244, 244,
244, 254, 254, 252, 254, 254, 252, 12, 12, 12, 2, 2, 4, 2, 2, 4,
31, 22, 4, 182, 126, 10, 223, 165, 9, 242, 182, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 229, 172, 9, 223, 165, 9, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 179, 121, 7, 207, 148, 7, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 242, 182, 12, 242, 182, 12, 225, 180, 10, 218, 163, 9, 106, 75,
6, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252,
254, 254, 252, 244, 244, 244, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254,
254, 252, 212, 212, 212, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 49, 35, 5, 182, 126, 10, 229, 172, 9, 242, 182, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 235, 179, 22, 215, 150, 13, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 199, 138, 8, 223, 165, 9, 242, 182, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 236, 180, 11, 223, 165, 9, 164,
109, 5, 12, 12, 12, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254,
252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 254, 254, 252, 228, 228, 228,
12, 12, 12, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 64, 44, 7, 182, 126, 10, 223, 165, 9, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 242, 182, 12, 242, 182, 12, 223,
165, 9, 206, 142, 8, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 199, 138, 8, 223, 165, 9, 242, 182, 12,
242, 182, 12, 242, 182, 12, 245, 189, 12, 242, 182, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 242, 182, 12, 218, 163, 9,
179, 121, 7, 41, 28, 4, 2, 2, 4, 2, 2, 4, 20, 20, 19, 52,
52, 52, 20, 20, 19, 12, 12, 12, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 85, 59, 6, 185, 131, 9, 223, 165, 9, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189,
12, 245, 189, 12, 242, 182, 12, 242, 182, 12, 223, 165, 9, 199, 138, 8,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 192, 133, 7, 192, 133, 7, 215, 150,
13, 216, 156, 8, 223, 165, 9, 229, 172, 9, 229, 172, 9, 235, 179, 22,
242, 182, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 245,
189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 236, 180, 11, 209, 155,
9, 164, 109, 5, 91, 58, 5, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 91, 58, 5, 182, 126, 10, 216, 156, 8, 242, 182, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 245, 189, 12, 242, 182, 12, 235,
179, 22, 223, 165, 9, 216, 156, 8, 192, 133, 7, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 144, 96, 7, 164,
109, 5, 179, 121, 7, 182, 126, 10, 192, 133, 7, 201, 142, 7, 206, 142,
8, 216, 156, 8, 223, 165, 9, 229, 172, 9, 235, 179, 22, 242, 182, 12,
245, 189, 12, 245, 189, 12, 245, 189, 12, 235, 179, 22, 223, 165, 9, 182,
126, 10, 151, 97, 5, 91, 58, 5, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 83, 54, 6, 171, 114, 5, 199, 138, 8, 223, 165,
9, 242, 182, 12, 242, 182, 12, 242, 182, 12, 242, 182, 12, 229, 172, 9,
216, 156, 8, 199, 138, 8, 171, 114, 5, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 135, 88, 5, 151, 97, 5, 157, 106, 7, 164,
109, 5, 179, 121, 7, 179, 121, 7, 192, 133, 7, 207, 148, 7, 216, 156,
8, 223, 165, 9, 236, 180, 11, 236, 180, 11, 223, 165, 9, 201, 142, 7,
164, 109, 5, 131, 82, 4, 73, 48, 6, 2, 2, 4, 2, 2, 4, 2,
2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2,
4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4,
2, 2, 4, 2, 2, 4, 73, 48, 6, 155, 102, 5, 182, 126, 10, 215,
150, 13, 229, 172, 9, 236, 180, 11, 229, 172, 9, 216, 156, 8, 207, 148,
7, 179, 121, 7, 144, 96, 7, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 108, 69, 5, 125, 83, 5, 144, 96, 7, 155, 102, 5, 179,
121, 7, 182, 126, 10, 193, 139, 10, 199, 138, 8, 182, 126, 10, 155, 102,
5, 131, 82, 4, 96, 62, 5, 20, 13, 4, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 64, 44, 7, 143, 90, 4, 171, 114, 5,
182, 126, 10, 192, 133, 7, 201, 142, 7, 199, 138, 8, 179, 121, 7, 171,
114, 5, 116, 73, 4, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
101, 67, 7, 125, 83, 5, 131, 82, 4, 131, 82, 4, 131, 82, 4, 116,
73, 4, 91, 58, 5, 57, 38, 32, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 83, 54, 6, 131, 82,
4, 157, 106, 7, 164, 109, 5, 164, 109, 5, 164, 109, 5, 135, 88, 5,
83, 54, 6, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 73, 48, 6, 96, 62, 5, 91, 58, 5,
73, 48, 6, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 64,
44, 7, 96, 62, 5, 108, 69, 5, 101, 67, 7, 96, 62, 5, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
156, 156, 156, 156, 156, 156, 156, 156, 156, 156
};
| 79,458
|
C++
|
.cxx
| 822
| 93.268856
| 96
| 0.434895
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,106
|
ifkp_varicode.cxx
|
w1hkj_fldigi/src/ifkp/ifkp_varicode.cxx
|
int ifkp_varicode[][2] = {
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
{27,31}, { 0, 0}, {28,30}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
{28, 0}, {11,30}, {12,30}, {13,30}, {14,30}, {15,30}, {16,30}, {17,30},//' '!-'
{18,30}, {19,30}, {20,30}, {21,30}, {27,29}, {22,30}, {27, 0}, {23,30},
{10,30}, { 1,30}, { 2,30}, { 3,30}, { 4,30}, { 5,30}, { 6,30}, { 7,30},// 0 - 7
{ 8,30}, { 9,30}, {24,30}, {25,30}, {26,30}, { 0,31}, {27,30}, {28,29},// 8, 9
{ 0,29}, { 1,29}, { 2,29}, { 3,29}, { 4,29}, { 5,29}, { 6,29}, { 7,29},
{ 8,29}, { 9,29}, {10,29}, {11,29}, {12,29}, {13,29}, {14,29}, {15,29},
{16,29}, {17,29}, {18,29}, {19,29}, {20,29}, {21,29}, {22,29}, {23,29}, // ... :
{24,29}, {25,29}, {26,29}, { 1,31}, { 2,31}, { 3,31}, { 4,31}, { 5,31},
{ 9,31}, { 1, 0}, { 2, 0}, { 3, 0}, { 4, 0}, { 5, 0}, { 6, 0}, { 7, 0},// @ - g
{ 8, 0}, { 9, 0}, {10, 0}, {11, 0}, {12, 0}, {13, 0}, {14, 0}, {15, 0},// h - o
{16, 0}, {17, 0}, {18, 0}, {19, 0}, {20, 0}, {21, 0}, {22, 0}, {23, 0},// p - w
{24, 0}, {25, 0}, {26, 0}, { 6,31}, { 7,31}, { 8,31}, { 0,30}, {28,31},// x - 127
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//135
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//143
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//151
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//159
{ 0, 0}, { 0, 0}, { 0, 0}, {14,31}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//167
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//175
{12,31}, {10,31}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//183
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//191
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//199
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//207
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, {13,31},//215
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//223
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//231
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},//239
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, {11,31},//247
{12,31}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0} //255
};
/*
* The same in a format more suitable for decoding.
* The index is the varicode symbol, being 1-2 nibbles. The value is the
* ASCII character.
* NB. Do NOT use CR as a line feed, as you will get an extra space and the
* new line will be indented. Use LF = ascii 10 instead.
*/
// decode [ prev * 32 + curr] ; 0 < prev < 29; curr == 29, 30, 31
int ifkp_varidecode[] = {
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
00, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122, 46, 32, 64,126, 61, // 0 - 31
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 49, 91, // 32 - 63
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, 50, 92, // 2
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 51, 93, // 3
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 52, 94, // 4
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, 53, 95, // 5
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, 54,123, // 6
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, 55,124, // 7
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 56,125, // 8
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 73, 57, 96, // 9
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, 48,177, // 10
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 33,247, // 11
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 76, 34,176, // 12
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, 35,215, // 13
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, 36,163, // 14
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 79, 37, -1, // 15
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 38, -1, // 16
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, 39, -1, // 17
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 82, 40, -1, // 18
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, 41, -1, // 19
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 84, 42, -1, // 20
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 85, 43, -1, // 21
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 45, -1, // 22
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 87, 47, -1, // 23
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, 58, -1, // 24
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, 59, -1, // 25
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 90, 60, -1, // 26
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, 62, 8, // 27
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, 10,127, // 28
};
const char *ifkp_ascii[256] = {
"<NUL>", "<SOH>", "<STX>", "<ETX>", "<EOT>", "<ENQ>", "<ACK>", "<BEL>",
"<BS>", "<TAB>", "<LF>", "<VT>", "<FF>", "<CR>", "<SO>", "<SI>",
"<DLE>", "<DC1>", "<DC2>", "<DC3>", "<DC4>", "<NAK>", "<SYN>", "<ETB>",
"<CAN>", "<EM>", "<SUB>", "<ESC>", "<FS>", "<GS>", "<RS>", "<US>",
" ", "!", "\"", "#", "$", "%", "&", "\'",
"(", ")", "*", "+", ",", "-", ".", "/",
"0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", ":", ";", "<", "=", ">", "?",
"@", "A", "B", "C", "D", "E", "F", "G",
"H", "I", "J", "K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T", "U", "V", "W",
"X", "Y", "Z", "[", "\\", "]", "^", "_",
"`", "a", "b", "c", "d", "e", "f", "g",
"h", "i", "j", "k", "l", "m", "n", "o",
"p", "q", "r", "s", "t", "u", "v", "w",
"x", "y", "z", "{", "|", "}", "~", "<DEL>",
"<128>", "<129>", "<130>", "<131>", "<132>", "<133>", "<134>", "<135>",
"<136>", "<137>", "<138>", "<139>", "<140>", "<141>", "<142>", "<143>",
"<144>", "<145>", "<146>", "<147>", "<148>", "<149>", "<150>", "<151>",
"<152>", "<153>", "<154>", "<155>", "<156>", "<157>", "<158>", "<159>",
"<160>", "<161>", "<162>", "£", "<164>", "<165>", "<166>", "<167>",
"<168>", "<169>", "<170>", "<171>", "<172>", "<173>", "<174>", "<175>",
"°", "±", "<178>", "<179>", "<180>", "<181>", "<182>", "<183>",
"<184>", "<185>", "<186>", "<187>", "<188>", "<189>", "<190>", "<191>",
"<192>", "<193>", "<194>", "<195>", "<196>", "<197>", "<198>", "<199>",
"<200>", "<201>", "<202>", "<203>", "<204>", "<205>", "<206>", "<207>",
"<208>", "<209>", "<210>", "<211>", "<212>", "<213>", "<214>", "×",
"<216>", "<217>", "<218>", "<219>", "<220>", "<221>", "<222>", "<223>",
"<224>", "<225>", "<226>", "<227>", "<228>", "<229>", "<230>", "<231>",
"<232>", "<233>", "<234>", "<235>", "<236>", "<237>", "<238>", "<239>",
"<240>", "<241>", "<242>", "<243>", "<244>", "<245>", "<246>", "÷",
"<248>", "<249>", "<250>", "<251>", "<252>", "<253>", "<254>", "<255>"
};
| 9,352
|
C++
|
.cxx
| 108
| 83.787037
| 142
| 0.29122
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,107
|
ifkp.cxx
|
w1hkj_fldigi/src/ifkp/ifkp.cxx
|
// ----------------------------------------------------------------------------
// ifkp.cxx -- ifkp modem
//
// Copyright (C) 2015
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <libgen.h>
#include <FL/filename.H>
#include "progress.h"
#include "ifkp.h"
#include "complex.h"
#include "fl_digi.h"
#include "ascii.h"
#include "misc.h"
#include "fileselect.h"
#include "threads.h"
#include "debug.h"
#include "configuration.h"
#include "qrunner.h"
#include "fl_digi.h"
#include "status.h"
#include "main.h"
#include "icons.h"
#include "confdialog.h"
#include "test_signal.h"
#include "ifkp_varicode.cxx"
#define IFKP_SR 16000
#include "ifkp-pic.cxx"
static fre_t call("([[:alnum:]]?[[:alpha:]/]+[[:digit:]]+[[:alnum:]/]+)", REG_EXTENDED);
static std::string teststr = "";
static std::string allowed = " 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/";
static char sz[21];
static bool enable_audit_log = false;
static bool enable_heard_log = false;
int ifkp::IMAGEspp = IMAGESPP;
static std::string valid_callsign(char ch)
{
if (allowed.find(ch) == std::string::npos) ch = ' ';
teststr += tolower(ch);
if (teststr.length() > 20) teststr.erase(0,1);
// wait for ' de '
size_t p1;
if ((p1 = teststr.find(" de ")) != std::string::npos) { // test for callsign
p1 += 4;
if (p1 >= teststr.length()) return "";
while (p1 < teststr.length() && teststr[p1] == ' ') p1++;
if (p1 == teststr.length()) return "";
size_t p2 = teststr.rfind(' ');
if ((p2 > p1) && (p2 - p1 < 21)) { // found a word, test for callsign
memset(sz, 0, 21);
strcpy(sz, teststr.substr(p1, p2-p1).c_str());
teststr.erase(0, p2);
if (call.match(sz)) {
return sz;
}
return "";
}
}
return "";
}
// nibbles table used for fast conversion from tone difference to symbol
void ifkp::init_nibbles()
{
int nibble = 0;
for (int i = 0; i < 199; i++) {
nibble = floor(0.5 + (i - 99.0)/IFKP_SPACING);
// allow for wrap-around (33 tones for 32 tone differences)
if (nibble < 0) nibble += 33;
if (nibble > 32) nibble -= 33;
// adjust for +1 symbol at the transmitter
nibble--;
nibbles[i] = nibble;
}
}
ifkp::ifkp(trx_mode md) : modem()
{
samplerate = IFKP_SR;
symlen = IFKP_SYMLEN;
cap |= CAP_IMG;
if (progdefaults.StartAtSweetSpot) {
frequency = progdefaults.PSKsweetspot;
} else
frequency = wf->Carrier();
REQ(put_freq, frequency);
mode = md;
fft = new g_fft<double>(IFKP_FFTSIZE);
snfilt = new Cmovavg(64);
movavg_size = 4;
for (int i = 0; i < IFKP_NUMBINS; i++) binfilt[i] = new Cmovavg(movavg_size);
txphase = 0;
basetone = 197;
float lo = frequency - 0.75 * bandwidth;
float hi = frequency + 0.75 * bandwidth;
rxfilter = new C_FIR_filter();
rxfilter->init_bandpass(129, 1, lo/samplerate, hi/samplerate);
picfilter = new C_FIR_filter();
picfilter->init_lowpass(129, 1, 2.0 * bandwidth / samplerate);
phase = 0;
phidiff = 2.0 * M_PI * frequency / samplerate;
IMAGEspp = IMAGESPP;
pixfilter = new Cmovavg(IMAGEspp / 2);
ampfilter = new Cmovavg(IMAGEspp);
syncfilter = new Cmovavg(IMAGEspp / 2);
bkptr = 0;
peak_counter = 0;
peak = last_peak = 0;
max = 0;
curr_nibble = prev_nibble = 0;
s2n = 0;
memset(rx_stream, 0, sizeof(rx_stream));
rx_text.clear();
for (int i = 0; i < IFKP_BLOCK_SIZE; i++)
a_blackman[i] = blackman(1.0 * i / IFKP_BLOCK_SIZE);
state = TEXT;
init_nibbles();
TX_IMAGE = TX_AVATAR = false;
restart();
toggle_logs();
activate_ifkp_image_item(true);
}
ifkp::~ifkp()
{
delete fft;
delete snfilt;
delete rxfilter;
delete picfilter;
for (int i = 0; i < IFKP_NUMBINS; i++)
delete binfilt[i];
ifkp_deleteTxViewer();
ifkp_deleteRxViewer();
heard_log.close();
audit_log.close();
activate_ifkp_image_item(false);
}
void ifkp::tx_init()
{
tone = prevtone = 0;
txphase = 0;
send_bot = true;
mycall = progdefaults.myCall;
if (progdefaults.ifkp_lowercase)
for (size_t n = 0; n < mycall.length(); n++) mycall[n] = tolower(mycall[n]);
videoText();
}
void ifkp::rx_init()
{
bkptr = 0;
peak_counter = 0;
peak = last_peak = 0;
max = 0;
curr_nibble = prev_nibble = 0;
s2n = 0;
memset(rx_stream, 0, sizeof(rx_stream));
prevz = cmplx(0,0);
image_counter = 0;
state = TEXT;
rx_text.clear();
for (int i = 0; i < IFKP_NUMBINS; i++) {
tones[i] = 0.0;
binfilt[i]->reset();
}
pixel = 0;
pic_str = " ";
}
void ifkp::rx_reset()
{
prevz = cmplx(0,0);
image_counter = 0;
pixel = 0;
pic_str = " ";
snfilt->reset();
state = TEXT;
}
void ifkp::init()
{
peak_hits = 4;
mycall = progdefaults.myCall;
if (progdefaults.ifkp_lowercase)
for (size_t n = 0; n < mycall.length(); n++) mycall[n] = tolower(mycall[n]);
movavg_size = 3;
for (int i = 0; i < IFKP_NUMBINS; i++) binfilt[i]->setLength(movavg_size);
rx_init();
}
void ifkp::set_freq(double f)
{
if (progdefaults.ifkp_freqlock)
frequency = 1500;
else
frequency = f;
if (frequency < 100 + 0.5 * bandwidth) frequency = 100 + 0.5 * bandwidth;
if (frequency > 3900 - 0.5 * bandwidth) frequency = 3900 - 0.5 * bandwidth;
tx_frequency = frequency;
REQ(put_freq, frequency);
set_bandwidth(33 * IFKP_SPACING * samplerate / symlen);
basetone = ceil((frequency - bandwidth / 2.0) * symlen / samplerate);
float lo = frequency - 0.75 * bandwidth;
float hi = frequency + 0.75 * bandwidth;
rxfilter->init_bandpass(129, 1, lo/samplerate, hi/samplerate);
picfilter->init_lowpass(129, 1, 2.0 * bandwidth / samplerate);
phase = 0;
phidiff = 2.0 * M_PI * frequency / samplerate;
std::ostringstream it;
it << "\nSamplerate..... " << samplerate;
it << "\nBandwidth...... " << bandwidth;
it << "\nlower cutoff... " << lo;
it << "\nupper cutoff... " << hi;
it << "\ncenter ........ " << frequency;
it << "\nSymbol length.. " << symlen << "\nBlock size..... " << IFKP_SHIFT_SIZE;
it << "\nMinimum Hits... " << peak_hits << "\nBasetone....... " << basetone << "\n";
LOG_VERBOSE("%s", it.str().c_str());
}
void ifkp::show_mode()
{
if (progdefaults.ifkp_baud == 0)
put_MODEstatus("IFKP 0.5");
else if (progdefaults.ifkp_baud == 1)
put_MODEstatus("IFKP 1.0");
else
put_MODEstatus("IFKP 2.0");
return;
}
void ifkp::toggle_logs()
{
if (enable_audit_log != progdefaults.ifkp_enable_audit_log){
enable_audit_log = progdefaults.ifkp_enable_audit_log;
if (audit_log.is_open()) audit_log.close();
}
if (enable_heard_log != progdefaults.ifkp_enable_heard_log) {
enable_heard_log = progdefaults.ifkp_enable_heard_log;
if (heard_log.is_open()) heard_log.close();
}
if (enable_heard_log) {
heard_log_fname = progdefaults.ifkp_heard_log;
std::string sheard = TempDir;
sheard.append(heard_log_fname);
heard_log.open(sheard.c_str(), std::ios::app);
heard_log << "==================================================\n";
heard_log << "Heard log: " << zdate() << ", " << ztime() << "\n";
heard_log << "==================================================\n";
heard_log.flush();
}
if (enable_audit_log) {
audit_log_fname = progdefaults.ifkp_audit_log;
std::string saudit = TempDir;
saudit.append(audit_log_fname);
audit_log.close();
audit_log.open(saudit.c_str(), std::ios::app);
audit_log << "==================================================\n";
audit_log << "Audit log: " << zdate() << ", " << ztime() << "\n";
audit_log << "==================================================\n";
audit_log.flush();
}
}
void ifkp::restart()
{
set_freq(wf->Carrier());
peak_hits = 4;
mycall = progdefaults.myCall;
if (progdefaults.ifkp_lowercase)
for (size_t n = 0; n < mycall.length(); n++) mycall[n] = tolower(mycall[n]);
movavg_size = progdefaults.ifkp_baud == 2 ? 3 : 4;
for (int i = 0; i < IFKP_NUMBINS; i++) binfilt[i]->setLength(movavg_size);
show_mode();
}
// valid printable character
bool ifkp::valid_char(int ch)
{
if ( ! (ch == 10 || ch == 163 || ch == 176 ||
ch == 177 || ch == 215 || ch == 247 ||
(ch > 31 && ch < 128)))
return false;
return true;
}
//=====================================================================
// receive processing
//=====================================================================
void ifkp::parse_pic(int ch)
{
b_ava = false;
image_mode = 0;
pic_str.erase(0,1);
pic_str += ch;
if (pic_str.find("pic%") == 0) {
switch (pic_str[4]) {
case 'A': picW = 59; picH = 74; b_ava = true; break;
case 'T': picW = 59; picH = 74; break;
case 't': picW = 59; picH = 74; image_mode = 1; break;
case 'S': picW = 160; picH = 120; break;
case 's': picW = 160; picH = 120; image_mode = 1; break;
case 'L': picW = 320; picH = 240; break;
case 'l': picW = 320; picH = 240; image_mode = 1; break;
case 'V': picW = 640; picH = 480; break;
case 'v': picW = 640; picH = 480; image_mode = 1; break;
case 'F': picW = 640; picH = 480; image_mode = 1; break;
case 'P': picW = 240; picH = 300; break;
case 'p': picW = 240; picH = 300; image_mode = 1; break;
case 'M': picW = 120; picH = 150; break;
case 'm': picW = 120; picH = 150; image_mode = 1; break;
default:
syncfilter->reset();
pixfilter->reset();
ampfilter->reset();
return;
}
} else
return;
if (!b_ava)
REQ( ifkp_showRxViewer, pic_str[4]);
else
REQ( ifkp_clear_avatar );
image_counter = -symlen / 2;
col = row = rgb = 0;
syncfilter->reset();
pixfilter->reset();
// ampfilter->reset();
state = IMAGE_START;
}
void ifkp::process_symbol(int sym)
{
int nibble = 0;
int curr_ch = -1 ;
symbol = sym;
nibble = symbol - prev_symbol;
if (nibble < -99 || nibble > 99) {
prev_symbol = symbol;
return;
}
nibble = nibbles[nibble + 99];
if (nibble >= 0) { // process nibble
curr_nibble = nibble;
// single-nibble characters
if ((prev_nibble < 29) & (curr_nibble < 29)) {
curr_ch = ifkp_varidecode[prev_nibble];
// double-nibble characters
} else if ( (prev_nibble < 29) &&
(curr_nibble > 28) &&
(curr_nibble < 32)) {
curr_ch = ifkp_varidecode[prev_nibble * 32 + curr_nibble];
}
if (curr_ch > 0) {
if (ch_sqlch_open || metric >= progStatus.sldrSquelchValue) {
// if (metric >= progStatus.sldrSquelchValue) {
put_rx_char(curr_ch, FTextBase::RECV);
if (enable_audit_log) {
audit_log << ifkp_ascii[curr_ch];
if (curr_ch == '\n') audit_log << '\n';
}
parse_pic(curr_ch);
if (state != IMAGE_START) {
station_calling = valid_callsign(curr_ch);
if (!station_calling.empty()) {
snprintf(szestimate, sizeof(szestimate), "%.0f db", s2n );
REQ(add_to_heard_list, station_calling.c_str(), szestimate);
if (enable_heard_log) {
std::string sheard = zdate();
sheard.append(":").append(ztime());
sheard.append(",").append(station_calling);
sheard.append(",").append(szestimate).append("\n");
heard_log << sheard;
heard_log.flush();
}
}
}
}
}
prev_nibble = curr_nibble;
}
prev_symbol = symbol;
}
void ifkp::process_tones()
{
max = 0;
peak = 0;
max = 0;
peak = IFKP_NUMBINS / 2;
int firstbin = frequency * IFKP_SYMLEN / samplerate - IFKP_NUMBINS / 2;
double sigval = 0;
double mins[3];
double min = 3.0e8;
double temp;
mins[0] = mins[1] = mins[2] = 1.0e8;
for (int i = 0; i < IFKP_NUMBINS; ++i) {
val = norm(fft_data[i + firstbin]);
// looking for maximum signal
tones[i] = binfilt[i]->run(val);
if (tones[i] > max) {
max = tones[i];
peak = i;
}
// looking for minimum signal in a 3 bin sequence
mins[2] = tones[i];
temp = mins[0] + mins[1] + mins[2];
mins[0] = mins[1];
mins[1] = mins[2];
if (temp < min) min = temp;
}
sigval = tones[peak-1] + tones[peak] + tones[peak+1];
if (min == 0) min = 1e-10;
s2n = 10 * log10( snfilt->run(sigval/min)) - 36.0;
//scale to -25 to +45 db range
// -25 -> 0 linear
// 0 - > 45 compressed by 2
if (s2n <= 0) metric = 2 * (25 + s2n);
if (s2n > 0) metric = 50 * ( 1 + s2n / 45);
metric = clamp(metric, 0, 100);
display_metric(metric);
if (peak == prev_peak) {
peak_counter++;
} else {
peak_counter = 0;
}
if ((peak_counter >= peak_hits) &&
(peak != last_peak) &&
(metric >= progStatus.sldrSquelchValue ||
progStatus.sqlonoff == false)) {
process_symbol(peak);
peak_counter = 0;
last_peak = peak;
}
prev_peak = peak;
}
void ifkp::recvpic(double smpl)
{
phidiff = 2.0 * M_PI * frequency / samplerate;
phase -= phidiff;
if (phase < 0) phase += 2.0 * M_PI;
cmplx z = smpl * cmplx( cos(phase), sin(phase ) );
picfilter->run( z, currz);
pixel = (samplerate / TWOPI) * pixfilter->run(arg(conj(prevz) * currz));
sync = (samplerate / TWOPI) * syncfilter->run(arg(conj(prevz) * currz));
prevz = currz;
image_counter++;
if (image_counter < 0) return;
if (state == IMAGE_START) {
if (sync < -0.59 * bandwidth) {
state = IMAGE_SYNC;
}
return;
}
if (state == IMAGE_SYNC) {
if (sync > -0.51 * bandwidth) {
state = IMAGE;
}
return;
}
if ((image_counter % IMAGEspp) == 0) {
byte = pixel * 256.0 / bandwidth + 128;
byte = (int)CLAMP( byte, 0.0, 255.0);
if (image_mode == 1) { // bw transmission
pixelnbr = 3 * (col + row * picW);
if (b_ava) {
REQ(ifkp_update_avatar, byte, pixelnbr);
REQ(ifkp_update_avatar, byte, pixelnbr + 1);
REQ(ifkp_update_avatar, byte, pixelnbr + 2);
} else {
REQ(ifkp_updateRxPic, byte, pixelnbr);
REQ(ifkp_updateRxPic, byte, pixelnbr + 1);
REQ(ifkp_updateRxPic, byte, pixelnbr + 2);
}
if (++ col == picW) {
col = 0;
row++;
if (row >= picH) {
rx_reset();
REQ(ifkp_enableshift);
}
}
} else { // color transmission
pixelnbr = rgb + 3 * (col + row * picW);
if (b_ava)
REQ(ifkp_update_avatar, byte, pixelnbr);
else
REQ(ifkp_updateRxPic, byte, pixelnbr);
if (++col == picW) {
col = 0;
if (++rgb == 3) {
rgb = 0;
++row;
}
}
if (row >= picH) {
rx_reset();
REQ(ifkp_enableshift);
}
}
}
}
int ifkp::rx_process(const double *buf, int len)
{
double val;
cmplx zin, z;
if (enable_audit_log != progdefaults.ifkp_enable_audit_log ||
enable_heard_log != progdefaults.ifkp_enable_heard_log)
toggle_logs();
if (bkptr < 0) bkptr = 0;
if (bkptr >= IFKP_SHIFT_SIZE) bkptr = 0;
if (progStatus.ifkp_rx_abort) {
state = TEXT;
progStatus.ifkp_rx_abort = false;
REQ(ifkp_clear_rximage);
}
while (len) {
if (state == TEXT) {
rxfilter->Irun(*buf, val);
rx_stream[IFKP_BLOCK_SIZE + bkptr] = val;
bkptr++;
if (bkptr == IFKP_SHIFT_SIZE) {
bkptr = 0;
memmove(rx_stream, // to
&rx_stream[IFKP_SHIFT_SIZE], // from
IFKP_BLOCK_SIZE*sizeof(*rx_stream)); // # bytes
for (int n = 0; n < 2*IFKP_FFTSIZE; n++)
fft_data[n] = cmplx(0,0);
for (int i = 0; i < IFKP_BLOCK_SIZE; i++) {
double d = rx_stream[i] * a_blackman[i];
fft_data[i] = cmplx(d,d);
}
fft->ComplexFFT(fft_data);
process_tones();
}
} else
recvpic(*buf);
len--;
buf++;
}
return 0;
}
//=====================================================================
// transmit processing
//=====================================================================
void ifkp::transmit(double *buf, int len)
{
// if (xmtfilt && progdefaults.ifkp_xmtfilter)
// for (int i = 0; i < len; i++) xmtfilt->Irun(buf[i], buf[i]);
ModulateXmtr(buf, len);
}
void ifkp::send_tone(int tone)
{
double phaseincr;
double frequency;
frequency = (basetone + tone * IFKP_SPACING) * samplerate / symlen;
if (test_signal_window && test_signal_window->visible() && btnOffsetOn->value())
frequency += ctrl_freq_offset->value();
phaseincr = 2.0 * M_PI * frequency / samplerate;
prevtone = tone;
int send_symlen = symlen * (
progdefaults.ifkp_baud == 2 ? 0.5 :
progdefaults.ifkp_baud == 0 ? 2.0 : 1.0);
for (int i = 0; i < send_symlen; i++) {
outbuf[i] = cos(txphase);
txphase -= phaseincr;
if (txphase < 0) txphase += TWOPI;
}
transmit(outbuf, send_symlen);
}
void ifkp::send_symbol(int sym)
{
tone = (prevtone + sym + IFKP_OFFSET) % 33;
send_tone(tone);
}
void ifkp::send_idle()
{
send_symbol(0);
}
void ifkp::send_char(int ch)
{
if (ch <= 0) return send_idle();
int sym1 = ifkp_varicode[ch][0];
int sym2 = ifkp_varicode[ch][1];
send_symbol(sym1);
if (sym2 > 28)
send_symbol(sym2);
put_echo_char(ch);
}
void ifkp::send_avatar()
{
int W = 59, H = 74; // grey scale transfer (FAX)
float freq, phaseincr;
float radians = 2.0 * M_PI / samplerate;
freq = frequency - 0.6 * bandwidth;
#define PHASE_CORR (3 * symlen / 2)
phaseincr = radians * freq;
for (int n = 0; n < PHASE_CORR; n++) {
outbuf[n] = cos(txphase);
txphase -= phaseincr;
if (txphase < 0) txphase += TWOPI;
}
transmit(outbuf, PHASE_CORR);
for (int row = 0; row < H; row++) {
for (int color = 0; color < 3; color++) {
memset(outbuf, 0, IMAGEspp * sizeof(*outbuf));
for (int col = 0; col < W; col++) {
if (stopflag) return;
tx_pixelnbr = col + row * W;
tx_pixel = ifkp_get_avatar_pixel(tx_pixelnbr, color);
freq = frequency + (tx_pixel - 128) * bandwidth / 256.0;
phaseincr = radians * freq;
for (int n = 0; n < IMAGEspp; n++) {
outbuf[n] = cos(txphase);
txphase -= phaseincr;
if (txphase < 0) txphase += TWOPI;
}
transmit(outbuf, IMAGEspp);
}
Fl::awake();
}
}
}
static bool send_color = true;
void ifkp::send_image()
{
int W = 640, H = 480; // grey scale transfer (FAX)
float freq, phaseincr;
float radians = 2.0 * M_PI / samplerate;
if (!ifkppicTxWin || !ifkppicTxWin->visible()) {
return;
}
switch (selifkppicSize->value()) {
case 0 : W = 59; H = 74; break;
case 1 : W = 120; H = 150; break;
case 2 : W = 240; H = 300; break;
case 3 : W = 160; H = 120; break;
case 4 : W = 320; H = 240; break;
case 5 : W = 640; H = 480; break;
}
REQ(ifkp_clear_tximage);
stop_deadman();
for (size_t n = 0; n < imageheader.length(); n++)
send_char(imageheader[n]);
send_char(0); // needed to flush the header at the Rx decoder
freq = frequency - 0.6 * bandwidth; // black-black
phaseincr = radians * freq;
for (int j = 0; j < 7; j++) {
for (int i = 0; i < symlen/2; i++) {
outbuf[i] = cos(txphase);
txphase -= phaseincr;
if (txphase < 0) txphase += TWOPI;
}
transmit(outbuf, symlen/2);
}
if (send_color == false) { // grey scale image
for (int row = 0; row < H; row++) {
memset(outbuf, 0, IMAGEspp * sizeof(*outbuf));
for (int col = 0; col < W; col++) {
if (stopflag)
goto end_image;
tx_pixelnbr = col + row * W;
tx_pixel = 0.3 * ifkppic_TxGetPixel(tx_pixelnbr, 0) + // red
0.6 * ifkppic_TxGetPixel(tx_pixelnbr, 1) + // green
0.1 * ifkppic_TxGetPixel(tx_pixelnbr, 2); // blue
REQ(ifkp_updateTxPic, tx_pixel, tx_pixelnbr*3 + 0);
REQ(ifkp_updateTxPic, tx_pixel, tx_pixelnbr*3 + 1);
REQ(ifkp_updateTxPic, tx_pixel, tx_pixelnbr*3 + 2);
freq = frequency + (tx_pixel - 128) * bandwidth / 256.0;
phaseincr = radians * freq;
for (int n = 0; n < IMAGEspp; n++) {
outbuf[n] = cos(txphase);
txphase -= phaseincr;
if (txphase < 0) txphase += TWOPI;
}
transmit(outbuf, IMAGEspp);
Fl::awake();
}
}
} else {
for (int row = 0; row < H; row++) {
for (int color = 0; color < 3; color++) {
memset(outbuf, 0, IMAGEspp * sizeof(*outbuf));
for (int col = 0; col < W; col++) {
if (stopflag)
goto end_image;
tx_pixelnbr = col + row * W;
tx_pixel = ifkppic_TxGetPixel(tx_pixelnbr, color);
REQ(ifkp_updateTxPic, tx_pixel, tx_pixelnbr*3 + color);
freq = frequency + (tx_pixel - 128) * bandwidth / 256.0;
phaseincr = radians * freq;
for (int n = 0; n < IMAGEspp; n++) {
outbuf[n] = cos(txphase);
txphase -= phaseincr;
if (txphase < 0) txphase += TWOPI;
}
transmit(outbuf, IMAGEspp);
}
Fl::awake();
if (stopflag) goto end_image;
}
}
}
end_image:
start_deadman();
}
std::string img_str;
void ifkp::ifkp_send_image(std::string image_str, bool gray) {
send_color = !gray;
imageheader = image_str;
TX_IMAGE = true;
start_tx();
}
void ifkp::ifkp_send_avatar() {
img_str = "\npic%A";
TX_AVATAR = true;
start_tx();
}
void ifkp::m_ifkp_send_avatar()
{
std::string mycall = progdefaults.myCall;
for (size_t n = 0; n < mycall.length(); n++)
mycall[n] = tolower(mycall[n]);
std::string fname = AvatarDir;
fname.append(mycall).append(".png");
my_avatar_img = Fl_Shared_Image::get(fname.c_str(), 59, 74);
if (!my_avatar_img) return;
unsigned char *img_data = (unsigned char *)my_avatar_img->data()[0];
memset(avatar, 0, sizeof(avatar));
int D = my_avatar_img->d();
if (D == 3)
memcpy(avatar, img_data, 59*74*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < 59*74; i++) {
j = i*3; k = i*4;
avatar[j] = img_data[k];
avatar[j+1] = img_data[k+1];
avatar[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < 59*74; i++) {
j = i * 3;
avatar[j] = avatar[j+1] = avatar[j+2] = img_data[i];
}
} else
return;
ifkp_send_avatar();
}
int ifkp::tx_process()
{
modem::tx_process();
if (send_bot) {
send_bot = false;
send_char(0);
send_char(0);
}
int c = get_tx_char();
// if (c == GET_TX_CHAR_ETX || enable_image) {
if (TX_IMAGE || TX_AVATAR) {
if (img_str.length()) {
for (size_t n = 0; n < img_str.length(); n++)
send_char(img_str[n]);
}
img_str.clear();
if (TX_IMAGE) {
send_image();
ifkppicTxWin->hide();
}
if (TX_AVATAR)
send_avatar();
send_char(0);
TX_IMAGE = false;
TX_AVATAR = false;
ifkppicTxWin->hide();
return 0;
}
if ( stopflag || c == GET_TX_CHAR_ETX) { // aborts transmission
send_char(0);
// TX_IMAGE = false;
// TX_AVATAR = false;
stopflag = false;
return -1;
}
send_char(c);
return 0;
}
| 22,616
|
C++
|
.cxx
| 796
| 25.552764
| 96
| 0.607092
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,108
|
ifkp-pic.cxx
|
w1hkj_fldigi/src/ifkp/ifkp-pic.cxx
|
// ----------------------------------------------------------------------------
// ifkppic.cxx -- ifkp image support functions
//
// Copyright (C) 2015
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted from code contained in gifkp source code
// distribution.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <FL/Fl_Counter.H>
#include <FL/Fl_Choice.H>
#include <iostream>
#include "gettext.h"
#include "fileselect.h"
#include "timeops.h"
Fl_Double_Window *ifkppicRxWin = (Fl_Double_Window *)0;
picture *ifkppicRx = (picture *)0;
Fl_Button *btnifkpRxReset = (Fl_Button *)0;
Fl_Button *btnifkpRxSave = (Fl_Button *)0;
Fl_Button *btnifkpRxClose = (Fl_Button *)0;
Fl_Counter *ifkpcnt_phase = (Fl_Counter *)0;
Fl_Counter *ifkpcnt_slant = (Fl_Counter *)0;
Fl_Double_Window *ifkppicTxWin = (Fl_Double_Window *)0;
picture *ifkppicTx = (picture *)0;
Fl_Button *btnifkppicTransmit = (Fl_Button *)0;
Fl_Button *btnifkppicTxSendAbort = (Fl_Button *)0;
Fl_Button *btnifkppicTxLoad = (Fl_Button *)0;
Fl_Button *btnifkppicTxClose = (Fl_Button *)0;
Fl_Choice *selifkppicSize = (Fl_Choice *)0;
Fl_Check_Button *btnifkppicTxGrey = (Fl_Check_Button *)0;
void ifkp_showRxViewer(char c);
void ifkp_createRxViewer();
Fl_Shared_Image *ifkpTxImg = (Fl_Shared_Image *)0;
unsigned char *ifkpxmtimg = (unsigned char *)0;
unsigned char *ifkpxmtpicbuff = (unsigned char *)0;
#define RAWSIZE 640*(480 + 8)*3*ifkp::IMAGEspp
#define RAWSTART 640*4*3*ifkp::IMAGEspp
unsigned char *ifkp_rawvideo = 0;//[RAWSIZE + 1];
int ifkp_numpixels;
int ifkp_pixelptr;
int ifkp_rawcol;
int ifkp_rawrow;
int ifkp_rawrgb;
char ifkp_image_type = 'S';
char ifkp_txclr_tooltip[24];
char ifkp_txgry_tooltip[24];
static int translate = 0;
static bool enabled = false;
static std::string ifkp_fname;
std::string ifkp::imageheader;
std::string ifkp::avatarheader;
void ifkp_correct_video()
{
int W = ifkppicRx->w();
int H = ifkppicRx->h();
int slant = ifkpcnt_slant->value();
int vidsize = W * H;
int index, rowptr, colptr;
float ratio = (((float)vidsize - (float)slant)/(float)vidsize);
unsigned char vid[W * H * 3];
for (int row = 0; row < H; row++) {
rowptr = W * 3 * row * ifkp::IMAGEspp;
for (int col = 0; col < W; col++) {
colptr = ifkp::IMAGEspp*col;
for (int rgb = 0; rgb < 3; rgb++) {
index = ratio*(rowptr + colptr + ifkp::IMAGEspp*W*rgb);
index += RAWSTART - ifkp::IMAGEspp*ifkp_pixelptr;
if (index < 2) index = 2;
if (index > RAWSIZE - 2) index = RAWSIZE - 2;
vid[rgb + 3 * (col + row * W)] = ifkp_rawvideo[index];
}
}
}
ifkppicRx->video(vid, W*H*3);
}
void ifkp_updateRxPic(unsigned char data, int pos)
{
if (!ifkppicRxWin->shown()) ifkppicRx->show();
ifkppicRx->pixel(data, pos);
int W = ifkppicRx->w();
if (ifkp_image_type == 'F' || ifkp_image_type == 'p' || ifkp_image_type == 'm' ||
ifkp_image_type == 'l' || ifkp_image_type == 's' || ifkp_image_type == 'v') {
int n = RAWSTART + ifkp::IMAGEspp*(ifkp_rawcol + W * (ifkp_rawrgb + 3 * ifkp_rawrow));
if (n < RAWSIZE)
for (int i = 0; i < ifkp::IMAGEspp; i++) ifkp_rawvideo[n + i] = data;
ifkp_rawrgb++;
if (ifkp_rawrgb == 3) {
ifkp_rawrgb = 0;
ifkp_rawcol++;
if (ifkp_rawcol == W) {
ifkp_rawcol = 0;
ifkp_rawrow++;
}
}
} else
for (int i = 0; i < ifkp::IMAGEspp; i++)
ifkp_rawvideo[RAWSTART + ifkp::IMAGEspp*ifkp_numpixels + i] = data;
ifkp_numpixels++;
if (ifkp_numpixels >= (RAWSIZE - RAWSTART - ifkp::IMAGEspp))
ifkp_numpixels = RAWSIZE - RAWSTART - ifkp::IMAGEspp;
}
void cb_btnifkpRxReset(Fl_Widget *, void *)
{
progStatus.ifkp_rx_abort = true;
}
void cb_btnifkpRxSave(Fl_Widget *, void *)
{
ifkppicRx->save_png(std::string(ifkp_fname).append(".png").c_str());
}
void cb_btnifkpRxClose(Fl_Widget *, void *)
{
ifkppicRxWin->hide();
progStatus.ifkp_rx_abort = true;
}
void ifkp_save_raw_video()
{
time_t time_sec = time(0);
struct tm ztime;
(void)gmtime_r(&time_sec, &ztime);
char sztime[20];
strftime(sztime, sizeof(sztime), "%Y%m%d%H%M%Sz", &ztime);
ifkp_fname.assign(PicsDir).append("IFKP").append(sztime);
FILE *raw = fl_fopen(std::string(ifkp_fname).append(".raw").c_str(), "wb");
fwrite(&ifkp_image_type, 1, 1, raw);
fwrite(ifkp_rawvideo, 1, RAWSIZE, raw);
fclose(raw);
}
void ifkp_load_raw_video()
{
// abort & close any Rx video processing
int image_type = 0;
std::string image_types = "TtSsLlFVvPpMm";
if (!ifkppicRxWin)
ifkp_createRxViewer();
else
ifkppicRxWin->hide();
const char *p = FSEL::select(
_("Load raw image file"), "Image\t*.raw\n", PicsDir.c_str());
if (!p || !*p) return;
ifkp_fname.assign(p);
size_t p_raw = ifkp_fname.find(".raw");
if (p_raw != std::string::npos) ifkp_fname.erase(p_raw);
FILE *raw = fl_fopen(p, "rb");
int numread = fread(&image_type, 1, 1, raw);
if (numread != 1) {
fclose(raw);
return;
}
if (image_types.find(ifkp_image_type) != std::string::npos) {
ifkp_showRxViewer(image_type);
numread = fread(ifkp_rawvideo, 1, RAWSIZE, raw);
if (numread == RAWSIZE) {
ifkpcnt_phase->activate();
ifkpcnt_slant->activate();
btnifkpRxSave->activate();
ifkp_correct_video();
ifkppicRxWin->redraw();
}
}
fclose(raw);
}
void cb_ifkp_cnt_phase(Fl_Widget *, void *data)
{
ifkp_pixelptr = ifkpcnt_phase->value();
if (ifkp_pixelptr >= RAWSTART/ifkp::IMAGEspp) {
ifkp_pixelptr = RAWSTART/ifkp::IMAGEspp - 1;
ifkpcnt_phase->value(ifkp_pixelptr);
}
if (ifkp_pixelptr < -RAWSTART/ifkp::IMAGEspp) {
ifkp_pixelptr = -RAWSTART/ifkp::IMAGEspp;
ifkpcnt_phase->value(ifkp_pixelptr);
}
ifkp_correct_video();
}
void cb_ifkp_cnt_slant(Fl_Widget *, void *)
{
ifkp_correct_video();
}
void ifkp_disableshift()
{
if (!ifkppicRxWin) return;
ifkpcnt_phase->deactivate();
ifkpcnt_slant->deactivate();
btnifkpRxSave->deactivate();
ifkppicRxWin->redraw();
}
void ifkp_enableshift()
{
if (!ifkppicRxWin) return;
ifkpcnt_phase->activate();
ifkpcnt_slant->activate();
btnifkpRxSave->activate();
ifkp_save_raw_video();
ifkppicRxWin->redraw();
}
void ifkp_createRxViewer()
{
ifkppicRxWin = new Fl_Double_Window(324, 274, _("IFKP Rx Image"));
ifkppicRxWin->xclass(PACKAGE_NAME);
ifkppicRxWin->begin();
ifkppicRx = new picture(2, 2, 320, 240);
ifkppicRx->noslant();
Fl_Group *buttons = new Fl_Group(0, ifkppicRxWin->h() - 26, ifkppicRxWin->w(), 26, "");
buttons->box(FL_FLAT_BOX);
btnifkpRxReset = new Fl_Button(2, ifkppicRxWin->h() - 26, 40, 24, "Reset");
btnifkpRxReset->callback(cb_btnifkpRxReset, 0);
ifkpcnt_phase = new Fl_Counter(46, ifkppicRxWin->h() - 24, 80, 20, "");
ifkpcnt_phase->step(1);
ifkpcnt_phase->lstep(10);
ifkpcnt_phase->minimum(-RAWSTART + 1);
ifkpcnt_phase->maximum(RAWSTART - 1);
ifkpcnt_phase->value(0);
ifkpcnt_phase->callback(cb_ifkp_cnt_phase, 0);
ifkpcnt_phase->tooltip(_("Phase correction"));
ifkpcnt_slant = new Fl_Counter(140, ifkppicRxWin->h() - 24, 80, 20, "");
ifkpcnt_slant->step(1);
ifkpcnt_slant->lstep(10);
ifkpcnt_slant->minimum(-200);
ifkpcnt_slant->maximum(200);
ifkpcnt_slant->value(0);
ifkpcnt_slant->callback(cb_ifkp_cnt_slant, 0);
ifkpcnt_slant->tooltip(_("Slant correction"));
btnifkpRxSave = new Fl_Button(226, ifkppicRxWin->h() - 26, 45, 24, _("Save"));
btnifkpRxSave->callback(cb_btnifkpRxSave, 0);
btnifkpRxClose = new Fl_Button(273, ifkppicRxWin->h() - 26, 45, 24, _("Close"));
btnifkpRxClose->callback(cb_btnifkpRxClose, 0);
buttons->end();
ifkppicRxWin->end();
ifkppicRxWin->resizable(ifkppicRx);
ifkp_numpixels = 0;
}
void ifkp_showRxViewer(char itype)
{
int W = 320;
int H = 240;
switch (itype) {
case 'L' : case 'l' : W = 320; H = 240; break;
case 'S' : case 's' : W = 160; H = 120; break;
case 'V' : case 'F' : W = 640; H = 480; break;
case 'P' : case 'p' : W = 240; H = 300; break;
case 'M' : case 'm' : W = 120; H = 150; break;
case 'T' : W = 59; H = 74; break;
}
if (!ifkppicRxWin) ifkp_createRxViewer();
int winW, winH;
int ifkppicX, ifkppicY;
winW = W < 320 ? 324 : W + 4;
winH = H < 240 ? 274 : H + 34;
ifkppicX = (winW - W) / 2;
ifkppicY = (winH - 30 - H) / 2;
ifkppicRxWin->size(winW, winH);
ifkppicRx->resize(ifkppicX, ifkppicY, W, H);
ifkppicRxWin->init_sizes();
ifkppicRx->clear();
ifkppicRxWin->show();
ifkp_disableshift();
if (ifkp_rawvideo == 0) ifkp_rawvideo = new unsigned char [RAWSIZE + 1];
memset(ifkp_rawvideo, 0, RAWSIZE);
ifkp_numpixels = 0;
ifkp_pixelptr = 0;
ifkp_rawrow = ifkp_rawrgb = ifkp_rawcol = 0;
ifkp_image_type = itype;
}
void ifkp_clear_rximage()
{
ifkppicRx->clear();
ifkp_disableshift();
translate = 0;
enabled = false;
ifkp_numpixels = 0;
ifkp_pixelptr = 0;
ifkpcnt_phase->value(0);
ifkpcnt_slant->value(0);
ifkp_rawrow = ifkp_rawrgb = ifkp_rawcol = 0;
}
//------------------------------------------------------------------------------
// image transmit functions
//------------------------------------------------------------------------------
int ifkp_load_image(const char *n) {
int D = 0;
unsigned char *img_data;
int W = 640;
int H = 480;
switch (selifkppicSize->value()) {
case 0 : W = 59; H = 74; break;
case 1 : W = 120; H = 150; break;
case 2 : W = 240; H = 300; break;
case 3 : W = 160; H = 120; break;
case 4 : W = 320; H = 240; break;
case 5 : W = 640; H = 480; break;
}
if (ifkpTxImg) {
ifkpTxImg->release();
ifkpTxImg = 0;
}
ifkpTxImg = Fl_Shared_Image::get(n, W, H);
if (!ifkpTxImg)
return 0;
if (ifkpTxImg->count() > 1) {
ifkpTxImg->release();
ifkpTxImg = 0;
return 0;
}
ifkppicTx->hide();
ifkppicTx->clear();
img_data = (unsigned char *)ifkpTxImg->data()[0];
D = ifkpTxImg->d();
if (ifkpxmtimg) delete [] ifkpxmtimg;
ifkpxmtimg = new unsigned char [W * H * 3];
if (D == 3)
memcpy(ifkpxmtimg, img_data, W*H*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < W*H; i++) {
j = i*3; k = i*4;
ifkpxmtimg[j] = img_data[k];
ifkpxmtimg[j+1] = img_data[k+1];
ifkpxmtimg[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < W*H; i++) {
j = i * 3;
ifkpxmtimg[j] = ifkpxmtimg[j+1] = ifkpxmtimg[j+2] = img_data[i];
}
} else
return 0;
// ifkp_showTxViewer(W, H);
char* label = strdup(n);
ifkppicTxWin->copy_label(basename(label));
free(label);
// load the ifkppicture widget with the rgb image
ifkppicTx->show();
ifkppicTxWin->redraw();
ifkppicTx->video(ifkpxmtimg, W * H * 3);
btnifkppicTransmit->activate();
return 1;
}
void ifkp_updateTxPic(unsigned char data, int pos)
{
if (!ifkppicTxWin->shown()) ifkppicTx->show();
ifkppicTx->pixel(data, pos);
}
void cb_ifkppicTxLoad(Fl_Widget *, void *)
{
const char *fn =
FSEL::select(_("Load image file"), "Image\t*.{png,,gif,jpg,jpeg}\n", PicsDir.c_str());
if (!fn) return;
if (!*fn) return;
ifkp_load_image(fn);
}
void ifkp_clear_tximage()
{
ifkppicTx->clear();
}
void cb_ifkppicTxClose( Fl_Widget *w, void *)
{
ifkppicTxWin->hide();
}
int ifkppic_TxGetPixel(int pos, int color)
{
return ifkpxmtimg[3*pos + color]; // color = {RED, GREEN, BLUE}
}
void cb_ifkppicTransmit( Fl_Widget *w, void *)
{
bool grey = btnifkppicTxGrey->value();
char ch = ' ';
std::string picmode = " pic%";
switch (selifkppicSize->value()) {
case 0 : ifkp_showTxViewer(ch = (grey ? 't' : 'T')); break; // 59 x 74
case 1 : ifkp_showTxViewer(ch = (grey ? 'm' : 'M')); break; // 120 x 150
case 2 : ifkp_showTxViewer(ch = (grey ? 'p' : 'P')); break; // 240 x 300
case 3 : ifkp_showTxViewer(ch = (grey ? 's' : 'S')); break; // 160 x 120
case 4 : ifkp_showTxViewer(ch = (grey ? 'l' : 'L')); break; // 320 x 240
case 5 : ifkp_showTxViewer(ch = (grey ? 'F' : 'V')); break; // 640 x 480
}
picmode += ch;
active_modem->ifkp_send_image(picmode, grey);
}
void cb_ifkppicTxSendAbort( Fl_Widget *w, void *)
{
}
void cb_selifkppicSize( Fl_Widget *w, void *)
{
switch (selifkppicSize->value()) {
case 0 : ifkp_showTxViewer('T'); break;
case 1 : ifkp_showTxViewer('M'); break;
case 2 : ifkp_showTxViewer('P'); break;
case 3 : ifkp_showTxViewer('S'); break;
case 4 : ifkp_showTxViewer('L'); break;
case 5 : ifkp_showTxViewer('V'); break;
}
}
void ifkp_createTxViewer()
{
ifkppicTxWin = new Fl_Double_Window(324, 270, _("IFKP Send image"));
ifkppicTxWin->xclass(PACKAGE_NAME);
ifkppicTxWin->begin();
ifkppicTx = new picture (2, 2, 320, 240);
ifkppicTx->noslant();
ifkppicTx->hide();
selifkppicSize = new Fl_Choice(5, 244, 90, 24);
selifkppicSize->add("59 x 74");
selifkppicSize->add("120x150");
selifkppicSize->add("240x300");
selifkppicSize->add("160x120");
selifkppicSize->add("320x240");
selifkppicSize->add("640x480");
selifkppicSize->value(1);
selifkppicSize->callback(cb_selifkppicSize, 0);
btnifkppicTxGrey = new Fl_Check_Button(99, 247, 18, 18);
btnifkppicTxGrey->tooltip(_("Send grey scale image"));
btnifkppicTxGrey->value(0);
btnifkppicTxLoad = new Fl_Button(120, 244, 60, 24, _("Load"));
btnifkppicTxLoad->callback(cb_ifkppicTxLoad, 0);
btnifkppicTransmit = new Fl_Button(ifkppicTxWin->w() - 130, 244, 60, 24, "Xmt");
btnifkppicTransmit->callback(cb_ifkppicTransmit, 0);
btnifkppicTxSendAbort = new Fl_Button(ifkppicTxWin->w() - 130, 244, 60, 24, "Abort Xmt");
btnifkppicTxSendAbort->callback(cb_ifkppicTxSendAbort, 0);
btnifkppicTxClose = new Fl_Button(ifkppicTxWin->w() - 65, 244, 60, 24, _("Close"));
btnifkppicTxClose->callback(cb_ifkppicTxClose, 0);
btnifkppicTxSendAbort->hide();
btnifkppicTransmit->deactivate();
ifkppicTxWin->end();
}
void ifkp_load_scaled_image(std::string fname, bool gray)
{
if (!ifkppicTxWin) ifkp_createTxViewer();
int D = 0;
unsigned char *img_data;
int W = 160;
int H = 120;
int winW = 644;
int winH = 512;
int ifkppicX = 0;
int ifkppicY = 0;
std::string picmode = "pic% \n";
if (ifkpTxImg) {
ifkpTxImg->release();
ifkpTxImg = 0;
}
ifkpTxImg = Fl_Shared_Image::get(fname.c_str());
if (!ifkpTxImg)
return;
int iW = ifkpTxImg->w();
int iH = ifkpTxImg->h();
int aspect = 0;
if (iW > iH ) {
if (iW >= 640) {
W = 640; H = 480;
winW = 644; winH = 484;
aspect = 5;
picmode[4] = 'V';
if (gray) picmode[4] = 'F';
}
else if (iW >= 320) {
W = 320; H = 240;
winW = 324; winH = 244;
aspect = 4;
picmode[4] = 'L';
if (gray) picmode[4] = 'l';
}
else {
W = 160; H = 120;
winW = 164; winH = 124;
aspect = 3;
picmode[4] = 'S';
if (gray) picmode[4] = 's';
}
} else {
if (iH >= 300) {
W = 240; H = 300;
winW = 244; winH = 304;
aspect = 2;
picmode[4] = 'P';
if (gray) picmode[4] = 'p';
}
else if (iH >= 150) {
W = 120; H = 150;
winW = 124; winH = 154;
aspect = 1;
picmode[4] = 'M';
if (gray) picmode[4] = 'm';
}
else {
W = 59; H = 74;
winW = 67; winH = 82;
aspect = 0;
picmode[4] = 'T';
if (gray) picmode[4] = 't';
}
}
{
Fl_Image *temp;
selifkppicSize->value(aspect);
temp = ifkpTxImg->copy(W, H);
ifkpTxImg->release();
ifkpTxImg = (Fl_Shared_Image *)temp;
}
if (ifkpTxImg->count() > 1) {
ifkpTxImg->release();
ifkpTxImg = 0;
return;
}
ifkppicTx->hide();
ifkppicTx->clear();
img_data = (unsigned char *)ifkpTxImg->data()[0];
D = ifkpTxImg->d();
if (ifkpxmtimg) delete [] ifkpxmtimg;
ifkpxmtimg = new unsigned char [W * H * 3];
if (D == 3)
memcpy(ifkpxmtimg, img_data, W*H*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < W*H; i++) {
j = i*3; k = i*4;
ifkpxmtimg[j] = img_data[k];
ifkpxmtimg[j+1] = img_data[k+1];
ifkpxmtimg[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < W*H; i++) {
j = i * 3;
ifkpxmtimg[j] = ifkpxmtimg[j+1] = ifkpxmtimg[j+2] = img_data[i];
}
} else
return;
char* label = strdup(fname.c_str());
ifkppicTxWin->copy_label(basename(label));
free(label);
// load the ifkppicture widget with the rgb image
ifkppicTxWin->size(winW, winH);
ifkppicX = (winW - W) / 2;
ifkppicY = (winH - H) / 2;
ifkppicTx->resize(ifkppicX, ifkppicY, W, H);
selifkppicSize->hide();
btnifkppicTransmit->hide();
btnifkppicTxLoad->hide();
btnifkppicTxClose->hide();
btnifkppicTxSendAbort->hide();
ifkppicTx->video(ifkpxmtimg, W * H * 3);
ifkppicTx->show();
ifkppicTxWin->show();
active_modem->ifkp_send_image(picmode, gray);
return;
}
void ifkp_showTxViewer(char c)
{
if (!ifkppicTxWin) ifkp_createTxViewer();
int winW = 644, winH = 512, W = 480, H = 320;
int ifkppicX, ifkppicY;
ifkppicTx->clear();
switch (c) {
case 'T' : case 't' :
W = 59; H = 74; winW = 324; winH = 184;
selifkppicSize->value(0);
break;
case 'S' : case 's' :
W = 160; H = 120; winW = 324; winH = 154;
selifkppicSize->value(3);
break;
case 'L' : case 'l' :
W = 320; H = 240; winW = 324; winH = 274;
selifkppicSize->value(4);
break;
case 'F' : case 'V' :
W = 640; H = 480; winW = 644; winH = 514;
selifkppicSize->value(5);
break;
case 'P' : case 'p' :
W = 240; H = 300; winW = 324; winH = 334;
selifkppicSize->value(2);
break;
case 'M' : case 'm' :
W = 120; H = 150; winW = 324; winH = 184;
selifkppicSize->value(1);
break;
}
ifkppicTxWin->size(winW, winH);
ifkppicX = (winW - W) / 2;
ifkppicY = (winH - 26 - H) / 2;
ifkppicTx->resize(ifkppicX, ifkppicY, W, H);
selifkppicSize->resize(5, winH - 26, 90, 24);
btnifkppicTxGrey->resize(selifkppicSize->x() + selifkppicSize->w() + 4, winH - 23, 18, 18);
btnifkppicTxLoad->resize(btnifkppicTxGrey->x() + btnifkppicTxGrey->w() + 4, winH - 26, 60, 24);
btnifkppicTransmit->resize(winW - 130, winH - 26, 60, 24);
btnifkppicTxSendAbort->resize(winW - 130, winH - 26, 60, 24);
btnifkppicTxClose->resize(winW -65, winH - 26, 60, 24);
selifkppicSize->show();
btnifkppicTransmit->show();
btnifkppicTxLoad->show();
btnifkppicTxClose->show();
btnifkppicTxSendAbort->hide();
ifkppicTxWin->show();
}
void ifkp_deleteTxViewer()
{
if (ifkppicTxWin) ifkppicTxWin->hide();
if (ifkppicTx) {
delete ifkppicTx;
ifkppicTx = 0;
}
delete [] ifkpxmtimg;
ifkpxmtimg = 0;
delete [] ifkpxmtpicbuff;
ifkpxmtpicbuff = 0;
if (ifkppicTxWin) delete ifkppicTxWin;
ifkppicTxWin = 0;
}
void ifkp_deleteRxViewer()
{
if (ifkppicRxWin) ifkppicRxWin->hide();
if (ifkppicRx) {
delete ifkppicRx;
ifkppicRx = 0;
}
if (ifkppicRxWin) {
delete ifkppicRxWin;
ifkppicRxWin = 0;
}
}
int ifkp_print_time_left(float time_sec, char *str, size_t len,
const char *prefix, const char *suffix)
{
int time_min = (int)(time_sec / 60);
time_sec -= time_min * 60;
if (time_min)
return snprintf(str, len, "%s %02dm %2.1fs%s",
prefix, time_min, time_sec, suffix);
else
return snprintf(str, len, "%s %2.1fs%s", prefix, time_sec, suffix);
}
// -----------------------------------------------------------------------------
// avatar send/recv
// -----------------------------------------------------------------------------
static Fl_Shared_Image *shared_avatar_img = (Fl_Shared_Image *)0;
static unsigned char *avatar_img = (unsigned char *)0;
static Fl_Shared_Image *my_avatar_img = (Fl_Shared_Image *)0;
static int avatar_phase_correction = 0;
static unsigned char avatar[59 * 74 * 3];
void ifkp_clear_avatar()
{
ifkp_avatar->clear();
avatar_phase_correction = 0;
ifkp_numpixels = 0;
ifkp_rawrow = ifkp_rawrgb = ifkp_rawcol = 0;
ifkp_avatar->video(tux_img, sizeof(tux_img));
}
// W always 59, H always 74
int ifkp_load_avatar(std::string image_fname, int W, int H)
{
W = 59; H = 74;
if (image_fname.empty()) {
ifkp_clear_avatar();
return 1;
}
int D = 0;
unsigned char *img_data;
if (shared_avatar_img) {
shared_avatar_img->release();
shared_avatar_img = 0;
}
for (size_t n = 0; n < image_fname.length(); n++)
image_fname[n] = tolower(image_fname[n]);
std::string fname = AvatarDir;
fname.append(image_fname).append(".png");
FILE *temp = fl_fopen(fname.c_str(), "rb");
if (temp) {
fseek(temp, 0L, SEEK_SET);
fclose(temp);
} else {
ifkp_avatar->video(tux_img, 59 * 74 * 3);
return 1;
}
shared_avatar_img = Fl_Shared_Image::get(fname.c_str(), W, H);
// force image to be retrieved from hard drive vice shared image memory
shared_avatar_img->reload();
if (!shared_avatar_img) {
ifkp_avatar->video(tux_img, 59 * 74 * 3);
return 1;
}
if (shared_avatar_img->count() > 1) {
shared_avatar_img->release();
shared_avatar_img = 0;
ifkp_avatar->video(tux_img, 59 * 74 * 3);
return 0;
}
img_data = (unsigned char *)shared_avatar_img->data()[0];
D = shared_avatar_img->d();
if (avatar_img) delete [] avatar_img;
avatar_img = new unsigned char [W * H * 3];
if (D == 3)
memcpy(avatar_img, img_data, W*H*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < W*H; i++) {
j = i*3; k = i*4;
avatar_img[j] = img_data[k];
avatar_img[j+1] = img_data[k+1];
avatar_img[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < W*H; i++) {
j = i * 3;
avatar_img[j] = avatar_img[j+1] = avatar_img[j+2] = img_data[i];
}
} else {
ifkp_avatar->video(tux_img, W * H * 3);
return 0;
}
ifkp_avatar->video(avatar_img, W * H * 3);
shared_avatar_img->release();
shared_avatar_img = 0;
return 1;
}
void correct_avatar()
{
int W = 59;
int H = 74;
int index, rowptr, colptr;
unsigned char vid[W * H * 3];
if (avatar_phase_correction >= RAWSTART/ifkp::IMAGEspp) {
avatar_phase_correction = RAWSTART/ifkp::IMAGEspp - 1;
}
if (avatar_phase_correction < -RAWSTART/ifkp::IMAGEspp) {
avatar_phase_correction = -RAWSTART/ifkp::IMAGEspp;
}
for (int row = 0; row < H; row++) {
rowptr = W * 3 * row * ifkp::IMAGEspp;
for (int col = 0; col < W; col++) {
colptr = ifkp::IMAGEspp*col;
for (int rgb = 0; rgb < 3; rgb++) {
index = rowptr + colptr + W*rgb*ifkp::IMAGEspp;
index += RAWSTART - ifkp::IMAGEspp * avatar_phase_correction;
if (index < 2) index = 2;
if (index > RAWSIZE - 2) index = RAWSIZE - 2;
vid[rgb + 3 * (col + row * W)] = ifkp_rawvideo[index];
}
}
}
ifkp_avatar->video(vid, W*H*3);
}
void ifkp_update_avatar(unsigned char data, int pos)
{
if (ifkp_rawvideo == 0) {
ifkp_rawvideo = new unsigned char [RAWSIZE + 1];
memset(ifkp_rawvideo, 0, RAWSIZE);
}
ifkp_avatar->pixel(data, pos);
for (int i = 0; i < ifkp::IMAGEspp; i++)
ifkp_rawvideo[RAWSTART + ifkp::IMAGEspp*ifkp_numpixels + i] = data;
ifkp_numpixels++;
if (ifkp_numpixels >= (RAWSIZE - RAWSTART - ifkp::IMAGEspp))
ifkp_numpixels = RAWSIZE - RAWSTART - ifkp::IMAGEspp;
}
int ifkp_get_avatar_pixel(int pos, int color)
{
// color = {RED, GREEN, BLUE}
return (int)avatar[3*pos + color];
}
// ADD CALLBACK HANDLING OF PHASE CORRECTIONS
void cb_ifkp_send_avatar( Fl_Widget *w, void *)
{
if (Fl::event_button() == FL_RIGHT_MOUSE) {
if (Fl::get_key (FL_Shift_L) || Fl::get_key(FL_Shift_R)) {
if (ifkp_numpixels == 0) return;
avatar_phase_correction += 5;
correct_avatar();
return;
}
if (Fl::get_key (FL_Control_L) || Fl::get_key(FL_Control_R)) {
if (ifkp_numpixels == 0) return;
avatar_phase_correction++;
correct_avatar();
return;
}
std::string mycall = progdefaults.myCall;
for (size_t n = 0; n < mycall.length(); n++)
mycall[n] = tolower(mycall[n]);
std::string fname = AvatarDir;
fname.append(mycall).append(".png");
my_avatar_img = Fl_Shared_Image::get(fname.c_str(), 59, 74);
if (!my_avatar_img) {
return;
}
unsigned char *img_data = (unsigned char *)my_avatar_img->data()[0];
memset(avatar, 0, sizeof(avatar));
int D = my_avatar_img->d();
if (D == 3)
memcpy(avatar, img_data, 59*74*3);
else if (D == 4) {
int i, j, k;
for (i = 0; i < 59*74; i++) {
j = i*3; k = i*4;
avatar[j] = img_data[k];
avatar[j+1] = img_data[k+1];
avatar[j+2] = img_data[k+2];
}
} else if (D == 1) {
int i, j;
for (i = 0; i < 59*74; i++) {
j = i * 3;
avatar[j] = avatar[j+1] = avatar[j+2] = img_data[i];
}
} else
return;
if (!ifkppicTxWin) ifkp_createTxViewer();
active_modem->ifkp_send_avatar();
return;
}
if (Fl::event_button() == FL_LEFT_MOUSE) {
if (Fl::get_key (FL_Shift_L) || Fl::get_key(FL_Shift_R)) {
if (ifkp_numpixels == 0) return;
avatar_phase_correction -= 5;
correct_avatar();
return;
}
if (Fl::get_key (FL_Control_L) || Fl::get_key(FL_Control_R)) {
if (ifkp_numpixels == 0) return;
avatar_phase_correction--;
correct_avatar();
return;
}
std::string mycall = inpCall->value();
if (mycall.empty()) return;
for (size_t n = 0; n < mycall.length(); n++)
mycall[n] = tolower(mycall[n]);
std::string fname = AvatarDir;
fname.append(mycall).append(".png");
ifkp_avatar->save_png(fname.c_str());
}
}
| 25,221
|
C++
|
.cxx
| 847
| 27.25974
| 96
| 0.640555
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,109
|
vumeter.cxx
|
w1hkj_fldigi/src/widgets/vumeter.cxx
|
//
// vumeter.cxx
//
// vumeter bar widget routines.
//
// A part of the fldigi.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library 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/>.
// ----------------------------------------------------------------------------
#include <iostream>
#include <config.h>
#include <cmath>
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include "vumeter.h"
#define min(a,b) ((a) <= (b) ? (a) : (b) )
#define max(a,b) ((a) >= (b) ? (a) : (b) )
//
// vumeter is a vumeter bar widget based off Fl_Widget that shows a
// standard vumeter bar in horizontal format
const char * vumeter::meter_face = "|.-120.-110.-100..-90..-80..-70..-60..-50..-40..-30..-20..-10...|";
void vumeter::draw()
{
int bx, by, bw;//, bh; // Box areas...
int tx, tw, th; // Temporary X + width
int meter_width, meter_height;
// Get the box borders...
bx = Fl::box_dx(box());
by = Fl::box_dy(box());
bw = Fl::box_dw(box());
// bh = Fl::box_dh(box());
// Defne the inner box
tx = x() + bx;
tw = w() - bw;
th = h() - 2 * by - 2;//bh;
// Determine optimal meter face height
int fsize = 1;
fl_font(FL_COURIER, fsize);
meter_height = fl_height();
while (meter_height < th) {
fsize++;
fsize++;
fl_font(FL_COURIER, fsize);
meter_height = fl_height();
}
fsize--;
fl_font(FL_COURIER, fsize);
meter_height = fl_height();
// Find visible scale
const char *meter = meter_face;
minimum_ = -130;
maximum_ = 0;
meter_width = fl_width(meter);
while (meter_width > tw && *meter != 0) {
meter++;
meter_width = fl_width(meter);
minimum_ += 2;
}
int mwidth = round(meter_width * (value_ - minimum_) / (maximum_ - minimum_));
int PeakPos = round (meter_width * (peakv_ - minimum_) / (maximum_ - minimum_));
mwidth = max ( min ( mwidth, meter_width), 0 );
PeakPos = max ( min ( PeakPos, meter_width), 0 );
// Draw the box and label...
fl_push_clip(x(), y(), w(), h());
draw_box(box(), x(), y(), w(), h(), bgnd_);
draw_box(FL_FLAT_BOX, tx, y() + by, tw, th, bgnd_);
if (mwidth > 0) {
draw_box(FL_FLAT_BOX,
tx + (w() - meter_width) / 2, y() + by + (th - meter_height) / 2 + 1,
mwidth,
meter_height,
fgnd_);
draw_box(FL_FLAT_BOX,
tx + (w() - meter_width) / 2 + PeakPos, y() + by + (th - meter_height) / 2 + 1,
2,
meter_height,
peak_color);
}
label(meter);
labelfont(FL_COURIER);
labelsize(fsize);
labelcolor(scale_color);
draw_label();
fl_pop_clip();
}
vumeter::vumeter(int X, int Y, int W, int H, const char *label)
: Fl_Widget(X, Y, W, H, "")
{
align(FL_ALIGN_INSIDE);
box(FL_DOWN_BOX);
bgnd_ = FL_BACKGROUND2_COLOR;
fgnd_ = FL_GREEN;
peak_color = FL_RED;
scale_color = FL_BLACK;
minimum_ = -100.0;
maximum_ = 0.0;
value_ = -50;
avg_ = 10;
aging_ = 10;
clear();
cbFunc = 0;
}
void vumeter::value(double v) {
double vdb = 20 * log10(v == 0 ? 1e-9 : v);
// if (vdb < minimum_) vdb = minimum_;
// if (vdb > maximum_) vdb = maximum_;
peakv_ = -100;
for (int i = 1; i < aging_; i++) {
peak_[i-1] = peak_[i];
if (peakv_ < peak_[i])
peakv_ = peak_[i];
}
peak_[aging_ - 1] = vdb;
if (peakv_ < peak_[aging_ - 1])
peakv_ = peak_[aging_ - 1];
value_ -= vals_[0];
for (int i = 1; i < avg_; i++)
vals_[i-1] = vals_[i];
value_ += (vals_[avg_- 1] = vdb / avg_);
redraw();
}
double vumeter::value()
{
return (value_);
}
void vumeter::aging (int n)
{
if (n <= 10 && n > 0) aging_ = n;
else aging_ = 5;
for (int i = 0; i < aging_; i++) peak_[i] = peakv_;
}
void vumeter::avg (int n)
{
if (n <= 10 && n > 0) avg_ = n;
else avg_ = 5;
for (int i = 0; i < avg_; i++) vals_[i] = value_ / avg_;
}
void vumeter::clear ()
{
for (int i = 0; i < 10; i++) {
vals_[i] = peak_[i] = 0;
}
peakv_ = value_ = 0;
}
//
// End of vumeter.cxx
//
| 4,297
|
C++
|
.cxx
| 158
| 25.234177
| 103
| 0.597765
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,110
|
plot_xy.cxx
|
w1hkj_fldigi/src/widgets/plot_xy.cxx
|
// ---------------------------------------------------------------------
// plot_xy.cxx
//
// Copyright (C) 2019
// David Freese, W1HKJ
//
// This is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ---------------------------------------------------------------------
#include <iostream>
#include <cmath>
#include <cstring>
#include "plot_xy.h"
plot_xy::plot_xy (int X, int Y, int W, int H, const char *lbl) :
Fl_Widget (X, Y, W, H, lbl)
{
_bk_color = FL_BACKGROUND2_COLOR;
_axis_color = FL_BLACK;
_color_1 = FL_DARK_RED;
_color_2 = FL_GREEN;
_legend_color = FL_BLACK;
color(_bk_color);
_len_1 = PLOT_XY_MAX_LEN;
_len_2 = PLOT_XY_MAX_LEN;
buf_1 = new PLOT_XY[PLOT_XY_MAX_LEN];
buf_2 = new PLOT_XY[PLOT_XY_MAX_LEN];
xmin = 0; xmax = 10.0; x_graticule = 2.0;
ymin = 0; ymax = 10.0; y_graticule = 2.0;
x_legend = y_legend = true;
sx_legend.clear();
sy_legend.clear();
_show_1 = true;
_show_2 = true;
_thick_lines = false;
}
plot_xy::~plot_xy()
{
delete [] buf_1;
delete [] buf_2;
}
void plot_xy::data_1(PLOT_XY *data, int len)
{
if (data == 0 || len == 0) {
for (int n = 0; n < PLOT_XY_MAX_LEN; n++) {
buf_1[n].x = 0;
buf_1[n].y = ymax * 2;
}
_len_1 = 0;
} else {
_len_1 = (len > PLOT_XY_MAX_LEN ) ? PLOT_XY_MAX_LEN : len;
for (int n = 0; n < _len_1; n++)
buf_1[PLOT_XY_MAX_LEN - _len_1 + n] = data[n];
}
}
void plot_xy::data_2(PLOT_XY *data, int len)
{
if (data == 0 || len == 0) {
for (int n = 0; n < PLOT_XY_MAX_LEN; n++) {
buf_2[n].x = 0;
buf_2[n].y = ymax * 2;
}
_len_2 = 0;
} else {
_len_2 = (len > PLOT_XY_MAX_LEN ) ? PLOT_XY_MAX_LEN : len;
for (int n = 0; n < _len_2; n++)
buf_2[PLOT_XY_MAX_LEN - _len_2 + n] = data[n];
}
}
void plot_xy::draw()
{
draw_box();
int X, Y, W, H;
X = x() + 2;
Y = y() + 2;
W = w() - 4;
H = h() - 4;
fl_clip(X, Y, W, H);
fl_color(_bk_color);
fl_rectf(X, Y, W, H);
fl_push_matrix();
if (y_legend) {
X += 45;
W -= 50;
} else {
X += 5;
W -= 10;
}
if (x_legend) {
Y += 10;
H -= 30;
} else {
Y += 5;
H -= 10;
}
fl_translate( X, (Y + H));
fl_scale (1.0 * W / (xmax - xmin), -1.0 * H / (ymax - ymin));
// horizontal & vertical grids
fl_line_style(FL_SOLID, 0, NULL);
fl_color(_axis_color);
// vertical graticules
for (int n = 0; n <= x_graticule; n++) {
fl_begin_line();
fl_vertex((xmax - xmin)*n/x_graticule, 0);
fl_vertex((xmax - xmin)*n/x_graticule, (ymax - ymin));
fl_end_line();
}
// horizontal graticules
for (int n = 0; n <= y_graticule; n++) {
fl_begin_line();
fl_vertex(0, (ymax - ymin)*n/y_graticule);
fl_vertex((xmax-xmin), (ymax - ymin)*n/y_graticule);
fl_end_line();
}
// data
float xp, yp, xp1, yp1;
xp = 0; yp = 0;
xp1 = 1.0; yp1 = 1.0;
int xs = 0;
// line 1
if (_show_1) {
xs = PLOT_XY_MAX_LEN - _len_1;
fl_color(_color_1);
yp = buf_1[xs].y;
xp = buf_1[xs].x;
for (int i = 1; i < _len_1; i++) {
yp1 = buf_1[xs + i].y;
xp1 = buf_1[xs + i].x;
if (yp == 0 && yp1 == 0 && !_plot_over_axis) {
fl_color (_axis_color);
fl_line_style(FL_SOLID, 0, NULL);
} else {
fl_color (_color_1);
if (_thick_lines)
fl_line_style(FL_SOLID, 2, NULL);
}
if (yp > ymin && yp < ymax && yp1 > ymin && yp1 < ymax) {
fl_begin_line();
if (xreverse) {
fl_vertex(xmax - xp, yp - ymin);
fl_vertex(xmax - xp1, yp - ymin);
} else {
fl_vertex(xp - xmin, yp - ymin);
fl_vertex(xp1 - xmin, yp1 - ymin);
}
fl_end_line();
}
xp = xp1; yp = yp1;
}
}
// line 2
if (_show_2) {
xs = PLOT_XY_MAX_LEN - _len_2;
fl_color(_color_2);
yp = buf_2[xs].y;
xp = buf_2[xs].x;
for (int i = 1; i < _len_2; i++) {
yp1 = buf_2[xs + i].y;
xp1 = buf_2[xs + i].x;
if (yp == 0 && yp1 == 0 && !_plot_over_axis) {
fl_color (_axis_color);
fl_line_style(FL_SOLID, 0, NULL);
} else {
fl_color (_color_2);
if (_thick_lines)
fl_line_style(FL_SOLID, 2, NULL);
}
if (yp > ymin && yp < ymax && yp1 > ymin && yp1 < ymax) {
fl_begin_line();
if (xreverse) {
fl_vertex(xmax - xp, yp - ymin);
fl_vertex(xmax - xp1, yp - ymin);
} else {
fl_vertex(xp - xmin, yp - ymin);
fl_vertex(xp1 - xmin, yp1 - ymin);
}
fl_end_line();
}
xp = xp1; yp = yp1;
}
}
fl_pop_matrix();
fl_line_style(FL_SOLID, 0, NULL);
// legends
fl_color(_legend_color);
fl_font(FL_COURIER, 12);
int lbl_w = fl_width("XX") + 2;
int lbl_h = fl_height();
if (x_legend && !sx_legend.empty()) {
std::string tmp = sx_legend;
std::string lgnd;
float xd = 0, yd = Y + H + 20 - lbl_h/2;
size_t p = tmp.find("|");
for (int n = 0; n <= x_graticule; n++) {
if (tmp.empty()) break;
lgnd = tmp.substr(0,p);
lbl_w = fl_width(lgnd.c_str());
if (xreverse)
xd = X + W - n * W / x_graticule - lbl_w / 2;
else
xd = X + n * W / x_graticule - lbl_w / 2;
if (lgnd != " ")
fl_draw(lgnd.c_str(), xd, yd);
tmp.erase(0, p+1);
p = tmp.find("|");
}
}
if (y_legend && !sy_legend.empty()) {
std::string tmp = sy_legend;
size_t p = tmp.find("|");
std::string lgnd;
float xd, yd;
for (int n = 0; n <= y_graticule; n++) {
if (tmp.empty()) break;
lgnd = tmp.substr(0,p);
lbl_w = fl_width(lgnd.c_str());
xd = X - lbl_w - 4; yd = Y + H * (1 - n / y_graticule) + lbl_h / 3;
if (lgnd != " ")
fl_draw(lgnd.c_str(), xd, yd);
tmp.erase(0, p+1);
p = tmp.find("|");
}
}
fl_pop_clip();
}
int plot_xy::handle(int event)
{
if (!Fl::event_inside(this))
return 0;
return 1;
}
void plot_xy::resize(int x, int y, int w, int h)
{
Fl_Widget::resize(x, y, w, h);
}
| 6,188
|
C++
|
.cxx
| 244
| 22.471311
| 72
| 0.548502
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,111
|
FTextView.cxx
|
w1hkj_fldigi/src/widgets/FTextView.cxx
|
// ----------------------------------------------------------------------------
// FTextView.cxx
//
// Copyright (C) 2007-2009
// Stelios Bounanos, M0GLD
//
// Copyright (C) 2008-2009
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <sys/stat.h>
#include <map>
#include <fstream>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <FL/Fl_Tooltip.H>
#include "flmisc.h"
#include "fileselect.h"
#include "font_browser.h"
#include "ascii.h"
#include "icons.h"
#include "gettext.h"
#include "macros.h"
#include "FTextView.h"
#include "debug.h"
/// FTextBase constructor.
/// Word wrapping is enabled by default at column 80, but see \c reset_wrap_col.
/// @param x
/// @param y
/// @param w
/// @param h
/// @param l
FTextBase::FTextBase(int x, int y, int w, int h, const char *l)
: Fl_Text_Editor_mod(x, y, w, h, l),
wrap(true), wrap_col(80), max_lines(0), scroll_hint(false)
{
oldw = oldh = olds = -1;
oldf = (Fl_Font)-1;
textfont(FL_HELVETICA);
textsize(FL_NORMAL_SIZE);
textcolor(FL_FOREGROUND_COLOR);
tbuf = new Fl_Text_Buffer_mod;
sbuf = new Fl_Text_Buffer_mod;
buffer(tbuf);
highlight_data(sbuf, styles, NATTR, FTEXT_DEF, 0, 0);
cursor_style(Fl_Text_Editor_mod::NORMAL_CURSOR);
// reset_styles MUST before the call to wrap_mode or mStyleTable will have
// garbage values!
reset_styles(SET_FONT | SET_SIZE | SET_COLOR);
wrap_mode(wrap, wrap_col);
restore_wrap = wrap;
}
void FTextBase::clear()
{
tbuf->text("");
sbuf->text("");
set_word_wrap(restore_wrap);
}
int FTextBase::handle(int event)
{
if (event == FL_MOUSEWHEEL && !Fl::event_inside(this))
return 1;
// Fl_Text_Editor::handle() calls window()->cursor(FL_CURSOR_DONE) when
// it receives an FL_KEYBOARD event, which crashes some buggy X drivers
// (e.g. Intel on the Asus Eee PC). Call handle_key directly to work
// around this problem.
if (event == FL_KEYBOARD)
return Fl_Text_Editor_mod::handle_key();
else
return Fl_Text_Editor_mod::handle(event);
}
/// @see FTextRX::add
///
/// @param s
/// @param attr
///
void FTextBase::add(const char *s, int attr)
{
// handle the text attribute first
int n = strlen(s);
char a[n + 1];
memset(a, FTEXT_DEF + attr, n);
a[n] = '\0';
sbuf->replace(insert_position(), insert_position() + n, a);
insert(s);
}
/// @see FTextBase::add
///
/// @param s
/// @param attr
///
#if FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR >= 3
void FTextBase::add(unsigned int c, int attr)
#else
void FTextBase::add(unsigned char c, int attr)
#endif
{
char s[] = { (char)(FTEXT_DEF + attr), '\0' };
sbuf->replace(insert_position(), insert_position() + 1, s);
s[0] = c & 0xFF;
insert(s);
}
void FTextBase::set_word_wrap(bool b, bool b2)
{
wrap_mode((wrap = b), wrap_col);
if (b2) restore_wrap = wrap;
show_insert_position();
}
void FTextBase::setFont(Fl_Font f, int attr)
{
set_style(attr, f, textsize(), textcolor(), SET_FONT);
}
void FTextBase::setFontSize(int s, int attr)
{
set_style(attr, textfont(), s, textcolor(), SET_SIZE);
}
void FTextBase::setFontColor(Fl_Color c, int attr)
{
set_style(attr, textfont(), textsize(), c, SET_COLOR);
}
/// Resizes the text widget.
/// The real work is done by \c Fl_Text_Editor_mod::resize or, if \c HSCROLLBAR_KLUDGE
/// is defined, a version of that code modified so that no horizontal
/// scrollbars are displayed when word wrapping.
///
/// @param X
/// @param Y
/// @param W
/// @param H
///
void FTextBase::resize(int X, int Y, int W, int H)
{
bool need_wrap_reset = false;
bool need_margin_reset = false;
if (unlikely(text_area.w != oldw)) {
oldw = text_area.w;
need_wrap_reset = true;
}
if (unlikely(text_area.h != oldh)) {
oldh = text_area.h;
need_margin_reset = true;
}
if (unlikely(textfont() != oldf || textsize() != olds)) {
oldf = textfont();
olds = textsize();
need_wrap_reset = need_margin_reset = true;
}
if (need_wrap_reset)
reset_wrap_col();
TOP_MARGIN = DEFAULT_TOP_MARGIN;
int r = H - Fl::box_dh(box()) - TOP_MARGIN - BOTTOM_MARGIN;
if (mHScrollBar->visible())
r -= scrollbar_width();
int msize = mMaxsize ? mMaxsize : textsize();
if (!msize) msize = 1;
//printf("H %d, textsize %d, lines %d, extra %d\n", r, msize, r / msize, r % msize);
if (r %= msize)
TOP_MARGIN += r;
if (scroll_hint) {
mTopLineNumHint = mNBufferLines;
mHorizOffsetHint = 0;
// display_insert_position_hint = 1;
scroll_hint = false;
}
bool hscroll_visible = mHScrollBar->visible();
Fl_Text_Editor_mod::resize(X, Y, W, H);
if (hscroll_visible != mHScrollBar->visible())
oldh = 0; // reset margins next time
}
/// Checks the new widget height.
/// This is registered with Fl_Tile_check and then called with horizontal
/// and vertical size increments every time the Fl_Tile boundary is moved.
///
/// @param arg The callback argument; should be a pointer to a FTextBase object
/// @param xd The horizontal increment (ignored)
/// @param yd The vertical increment
///
/// @return True if the widget is visible, and the new text area height would be
/// a multiple of the font height.
///
bool FTextBase::wheight_mult_tsize(void *arg, int, int yd)
{
FTextBase *v = reinterpret_cast<FTextBase *>(arg);
if (!v->visible())
return true;
return v->mMaxsize > 0 && (v->text_area.h + yd) % v->mMaxsize == 0;
}
/// Changes text style attributes
///
/// @param attr The attribute name to change, or \c NATTR to change all styles.
/// @param f The new font
/// @param s The new font size
/// @param c The new font color
/// @param set One or more (OR'd together) SET operations; @see set_style_op_e
///
void FTextBase::set_style(int attr, Fl_Font f, int s, Fl_Color c, int set)
{
int start, end;
if (attr == NATTR) { // update all styles
start = 0;
end = NATTR;
if (set & SET_FONT)
Fl_Text_Display_mod::textfont(f);
if (set & SET_SIZE)
textsize(s);
if (set & SET_COLOR)
textcolor(c);
}
else {
start = attr;
end = start + 1;
}
for (int i = start; i < end; i++) {
styles[i].attr = 0;
if (set & SET_FONT)
styles[i].font = f;
if (set & SET_SIZE)
styles[i].size = s;
if (set & SET_COLOR)
styles[i].color = c;
if (i == SKIP) // clickable styles always same as SKIP for now
for (int j = CLICK_START; j < NATTR; j++)
memcpy(&styles[j], &styles[i], sizeof(styles[j]));
}
if (set & SET_COLOR)
mCursor_color = styles[0].color;
resize(x(), y(), w(), h()); // to redraw and recalculate the wrap column
}
/// Reads a file and inserts its contents.
/// change all occurrences of ^ to ^^ to prevent get_tx_char from
/// treating the carat as a control sequence, ie: ^r ^R ^t ^T ^L ^C
/// get_tx_char passes ^^ as a single ^
///
/// @return 0 on success, -1 on error
int FTextBase::readFile(const char* fn)
{
set_word_wrap(restore_wrap);
if ( !(fn || (fn = FSEL::select(_("Insert text"), "Text\t*.txt"))) )
return -1;
int ret = 0, pos = insert_position();
#ifdef __WOE32__
FILE* tfile = fl_fopen(fn, "rt");
#else
FILE* tfile = fl_fopen(fn, "r");
#endif
if (!tfile)
return -1;
char buf[BUFSIZ+1];
std::string newbuf;
size_t p;
memset(buf, 0, BUFSIZ+1);
p = 0;
while (fgets(buf, sizeof(buf), tfile)) {
newbuf.append(buf);
memset(buf, 0, BUFSIZ+1);
}
if (ferror(tfile))
return (-1);
fclose(tfile);
while ((p = newbuf.find("^",p)) != std::string::npos) {
newbuf.insert(p, "^");
p += 2;
}
p = 0;
while ((p = newbuf.find("@^^", p)) != std::string::npos) {
newbuf.erase(p,2);
}
if (pos == tbuf->length()) { // optimise for append
tbuf->append(newbuf.c_str());
pos = tbuf->length();
}
else {
tbuf->insert(pos, newbuf.c_str());
pos += newbuf.length();
}
insert_position(pos);
show_insert_position();
return ret;
}
/// Writes all buffer text out to a file.
///
///
void FTextBase::saveFile(void)
{
const char *fn = FSEL::saveas(_("Save text as"), "Text\t*.txt");
if (fn) {
#ifdef __WOE32__
std::ofstream tfile(fn);
if (!tfile)
return;
char *p1, *p2, *text = tbuf->text();
for (p1 = p2 = text; *p1; p1 = p2) {
while (*p2 != '\0' && *p2 != '\r')
p2++;
if (*p2 == '\n') {
*p2 = '\0';
tfile << p1 << "\r\n";
p2++;
}
else
tfile << p1;
}
free(text);
#else
tbuf->outputfile(fn, 0, tbuf->length());
#endif
}
}
/// Returns a character string containing the selected (n) word(s), if any,
/// or the word at (\a x, \a y) relative to the widget's \c x() and \c y().
/// If \a ontext is true, this function will return text only if the
/// mouse cursor position is inside the text range.
///
/// @param x
/// @param y
///
/// @return The selection, or the word text at (x,y). <b>Must be freed by the caller</b>.
///
char* FTextBase::get_word(int x, int y, const char* nwchars, int n, bool ontext)
{
int p = xy_to_position(x + this->x(), y + this->y(), Fl_Text_Display_mod::CURSOR_POS);
int start, end;
if (tbuf->selected()) {
if (ontext && (p < start || p >= end) && tbuf->selection_position(&start, &end))
return 0;
else
return tbuf->selection_text();
}
std::string nonword = nwchars;
nonword.append(" \t\n");
if (!tbuf->findchars_backward(p, nonword.c_str(), &start))
start = 0;
else
start++;
if (!tbuf->findchars_forward(p, nonword.c_str(), &end, n))
return 0;
// end = tbuf->length();
if (start >= end) return 0;
if (ontext && (p < start || p >= end))
return 0;
else
return tbuf->text_range(start, end);
}
/// Initialised the menu pointed to by \c context_menu. The menu items' user_data
/// field is used to store the initialisation flag.
void FTextBase::init_context_menu(void)
{
for (int i = 0; i < context_menu->size() - 1; i++) {
if (context_menu[i].user_data() == 0 &&
context_menu[i].labeltype() == _FL_MULTI_LABEL) {
icons::set_icon_label(&context_menu[i]);
context_menu[i].user_data(this);
}
}
}
/// Displays the menu pointed to by \c context_menu and calls the menu function;
/// @see call_cb.
///
void FTextBase::show_context_menu(void)
{
const Fl_Menu_Item *m;
int xpos = Fl::event_x();
int ypos = Fl::event_y();
popx = xpos - x();
popy = ypos - y();
window()->cursor(FL_CURSOR_DEFAULT);
m = context_menu->popup(xpos, ypos, 0, 0, 0);
if (m)
menu_cb(m - context_menu);
}
/// Recalculates the wrap margin when the font is changed or the widget resized.
/// Line wrapping works with proportional fonts but may be very slow.
///
int FTextBase::reset_wrap_col(void)
{
if (!wrap || text_area.w == 0)
return wrap_col;
int old_wrap_col = wrap_col;
if (Font_Browser::fixed_width(textfont())) {
fl_font(textfont(), textsize());
wrap_col = (int)floorf(text_area.w / fl_width('X'));
}
else // use slower (but accurate) wrapping for variable width fonts
wrap_col = 0;
// wrap_mode triggers a resize; don't call it if wrap_col hasn't changed
if (old_wrap_col != wrap_col)
wrap_mode(wrap, wrap_col);
return old_wrap_col;
}
void FTextBase::reset_styles(int set)
{
set_style(NATTR, FL_HELVETICA, FL_NORMAL_SIZE, FL_FOREGROUND_COLOR, set);
set_style(XMIT, FL_HELVETICA, FL_NORMAL_SIZE, FL_RED, set);
set_style(CTRL, FL_HELVETICA, FL_NORMAL_SIZE, FL_DARK_GREEN, set);
set_style(SKIP, FL_HELVETICA, FL_NORMAL_SIZE, FL_BLUE, set);
set_style(ALTR, FL_HELVETICA, FL_NORMAL_SIZE, FL_DARK_MAGENTA, set);
set_style(FSQ_TX, FL_HELVETICA, FL_NORMAL_SIZE, FL_RED, set);
set_style(FSQ_DIR, FL_HELVETICA, FL_NORMAL_SIZE, FL_BLUE, set);
set_style(FSQ_UND, FL_HELVETICA, FL_NORMAL_SIZE, FL_DARK_GREEN, set);
}
// ----------------------------------------------------------------------------
Fl_Menu_Item FTextView::menu[] = {
{ icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Select All"), edit_select_all_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Save as..."), save_as_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ _("Word wrap"), 0, 0, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL },
{ 0 }
};
/// FTextView constructor.
/// We remove \c Fl_Text_Display_mod::buffer_modified_cb from the list of callbacks
/// because we want to scroll depending on the visibility of the last line; @see
/// changed_cb.
/// @param x
/// @param y
/// @param w
/// @param h
/// @param l
FTextView::FTextView(int x, int y, int w, int h, const char *l)
: FTextBase(x, y, w, h, l), quick_entry(false)
{
tbuf->remove_modify_callback(buffer_modified_cb, this);
tbuf->add_modify_callback(changed_cb, this);
tbuf->canUndo(0);
// disable some keybindings that are not allowed in FTextView buffers
change_keybindings();
context_menu = menu;
init_context_menu();
}
/// Handles fltk events for this widget.
/// We only care about mouse presses (to display the popup menu and prevent
/// pasting) and keyboard events (to make sure no text can be inserted).
/// Everything else is passed to the base class handle().
///
/// @param event
///
/// @return
///
int FTextView::handle(int event)
{
switch (event) {
case FL_PUSH:
if (!Fl::event_inside(this))
break;
if (Fl::event_button() == FL_RIGHT_MOUSE) {
handle_context_menu();
return 1;
}
if (Fl::event_button() == FL_MIDDLE_MOUSE)
return 1; // ignore mouse2 text pastes inside the received text
break;
case FL_DRAG:
if (Fl::event_button() != FL_LEFT_MOUSE)
return 1;
break;
// catch some text-modifying events that are not handled by kf_* functions
case FL_KEYBOARD:
int k;
if (Fl::compose(k))
return 1;
k = Fl::event_key();
if (k == FL_BackSpace)
return 1;
else if (k == FL_Tab)
return Fl_Widget::handle(event);
}
return FTextBase::handle(event);
}
void FTextView::handle_context_menu(void)
{
icons::set_active(&menu[VIEW_MENU_COPY], tbuf->selected());
icons::set_active(&menu[VIEW_MENU_CLEAR], tbuf->length());
icons::set_active(&menu[VIEW_MENU_SELECT_ALL], tbuf->length());
icons::set_active(&menu[VIEW_MENU_SAVE], tbuf->length());
if (wrap)
menu[VIEW_MENU_WRAP].set();
else
menu[VIEW_MENU_WRAP].clear();
show_context_menu();
}
/// The context menu handler
///
/// @param val
///
void FTextView::menu_cb(size_t item)
{
switch (item) {
case VIEW_MENU_COPY:
kf_copy(Fl::event_key(), this);
break;
case VIEW_MENU_CLEAR:
clear();
break;
case VIEW_MENU_SELECT_ALL:
tbuf->select(0, tbuf->length());
break;
case VIEW_MENU_SAVE:
saveFile();
break;
case VIEW_MENU_WRAP:
set_word_wrap(!wrap, true);
break;
}
}
/// Scrolls down if the buffer has been modified and the last line is
/// visible. See Fl_Text_Buffer::add_modify_callback() for parameter details.
///
/// @param pos
/// @param nins
/// @param ndel
/// @param nsty
/// @param dtext
/// @param arg
///
inline
void FTextView::changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg)
{
FTextView *v = reinterpret_cast<FTextView *>(arg);
if (v->mTopLineNum + v->mNVisibleLines - 1 == v->mNBufferLines)
v->scroll_hint = true;
v->buffer_modified_cb(pos, nins, ndel, nsty, dtext, v);
}
/// Removes Fl_Text_Edit keybindings that would modify text and put it out of
/// sync with the style buffer. At some point we may decide that we want
/// FTextView to be editable (e.g., to insert comments about a QSO), in which
/// case we'll keep the keybindings and add some code to changed_cb to update
/// the style buffer.
///
void FTextView::change_keybindings(void)
{
Fl_Text_Editor_mod::Key_Func fdelete[] = { Fl_Text_Editor_mod::kf_default,
Fl_Text_Editor_mod::kf_enter,
Fl_Text_Editor_mod::kf_delete,
Fl_Text_Editor_mod::kf_cut,
Fl_Text_Editor_mod::kf_paste };
int n = sizeof(fdelete) / sizeof(fdelete[0]);
// walk the keybindings linked list and delete items containing elements
// of fdelete
loop:
for (Fl_Text_Editor_mod::Key_Binding *k = key_bindings; k; k = k->next) {
for (int i = 0; i < n; i++) {
if (k->function == fdelete[i]) {
remove_key_binding(k->key, k->state);
goto loop;
}
}
}
}
// ----------------------------------------------------------------------------
Fl_Menu_Item FTextEdit::menu[] = {
{ icons::make_icon_label(_("Cut"), edit_cut_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Paste"), edit_paste_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Insert file..."), file_open_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ _("Word wrap"), 0, 0, 0, FL_MENU_TOGGLE | FL_MENU_DIVIDER, FL_NORMAL_LABEL } ,
{ 0 }
};
FTextEdit::FTextEdit(int x, int y, int w, int h, const char *l)
: FTextBase(x, y, w, h, l)
{
tbuf->remove_modify_callback(buffer_modified_cb, this);
tbuf->add_modify_callback(changed_cb, this);
ascii_cnt = 0;
ascii_chr = 0;
context_menu = menu;
init_context_menu();
dnd_paste = false;
}
/// Handles fltk events for this widget.
/// We pass keyboard events to handle_key() and handle mouse3 presses to show
/// the popup menu. We also disallow mouse2 events in the transmitted text area.
/// Everything else is passed to the base class handle().
///
/// @param event
///
/// @return
///
int FTextEdit::handle(int event)
{
if ( !(Fl::event_inside(this) || (event == FL_KEYBOARD && Fl::focus() == this)) )
return FTextBase::handle(event);
switch (event) {
case FL_KEYBOARD:
return handle_key(Fl::event_key()) ? 1 : FTextBase::handle(event);
case FL_DND_RELEASE:
dnd_paste = true;
// fall through
case FL_DND_ENTER: case FL_DND_LEAVE:
return 1;
case FL_DND_DRAG:
return handle_dnd_drag(xy_to_position(Fl::event_x(), Fl::event_y(), CHARACTER_POS));
case FL_PASTE:
{
int r = dnd_paste ? handle_dnd_drop() : FTextBase::handle(event);
dnd_paste = false;
return r;
}
case FL_PUSH:
{
int eb = Fl::event_button();
if (eb == FL_RIGHT_MOUSE) {
handle_context_menu();
return 1;
}
}
default:
break;
}
return FTextBase::handle(event);
}
/// Handles keyboard events to override Fl_Text_Editor_mod's handling of some
/// keystrokes.
///
/// @param key
///
/// @return
///
int FTextEdit::handle_key(int key)
{
// read ctl-ddd, where d is a digit, as ascii characters (in base 10)
// and insert verbatim; e.g. ctl-001 inserts a <soh>
if (Fl::event_state() & FL_CTRL && (isdigit(key) || isdigit(key - FL_KP)))
return handle_key_ascii(key);
ascii_cnt = 0; // restart the numeric keypad entries.
ascii_chr = 0;
return 0;
}
/// Composes ascii characters and adds them to the FTextEdit buffer.
/// Control characters are inserted with the CTRL style. Values larger than 127
/// (0x7f) are ignored. We cannot really add NULs for the time being.
///
/// @param key A digit character
///
/// @return 1
///
int FTextEdit::handle_key_ascii(int key)
{
if (key >= FL_KP)
key -= FL_KP;
key -= '0';
ascii_cnt++;
for (int i = 0; i < 3 - ascii_cnt; i++)
key *= 10;
ascii_chr += key;
if (ascii_cnt == 3) {
if (ascii_chr < 0x100) {
char buff[fl_utf8bytes(ascii_chr) + 1];
int utf8cnt = fl_utf8encode(ascii_chr, buff);
for ( int i = 0; i < utf8cnt; i++)
add(buff[i], (iscntrl(ascii_chr) ? CTRL : RECV));
}
ascii_cnt = ascii_chr = 0;
}
return 1;
}
/// Handles FL_DND_DRAG events by scrolling and moving the cursor
///
/// @return 1
int FTextEdit::handle_dnd_drag(int pos)
{
// Scroll if the pointer is being dragged inside the scrollbars,
// otherwise obtain keyboard focus and set the insert position.
if (mVScrollBar->visible() && Fl::event_inside(mVScrollBar))
mVScrollBar->handle(FL_DRAG);
else if (mHScrollBar->visible() && Fl::event_inside(mHScrollBar))
mHScrollBar->handle(FL_DRAG);
else {
if (Fl::focus() != this)
take_focus();
insert_position(pos);
}
return 1;
}
/// Handles FL_PASTE events by inserting text
///
/// @return 1 or FTextBase::handle(FL_PASTE)
int FTextEdit::handle_dnd_drop(void)
{
// paste verbatim if the shift key was held down during dnd
if (Fl::event_shift())
return FTextBase::handle(FL_PASTE);
std::string text;
std::string::size_type p, len;
text = Fl::event_text();
const char sep[] = "\n";
#if defined(__APPLE__) || defined(__WOE32__)
text += sep;
#endif
len = text.length();
while ((p = text.find(sep)) != std::string::npos) {
text[p] = '\0';
#if !defined(__APPLE__) && !defined(__WOE32__)
if (text.find("file://") == 0) {
text.erase(0, 7);
p -= 7;
len -= 7;
}
#endif
#ifndef BUILD_FLARQ
if ((text.find(".jpg") != std::string::npos) ||
(text.find(".JPG") != std::string::npos) ||
(text.find(".jpeg") != std::string::npos) ||
(text.find(".JPEG") != std::string::npos) ||
(text.find(".png") != std::string::npos) ||
(text.find(".PNG") != std::string::npos) ||
(text.find(".bmp") != std::string::npos) ||
(text.find(".BMP") != std::string::npos) ) {
LOG_INFO("DnD image %s", text.c_str());
if ((p = text.find("file://")) != std::string::npos)
text.erase(0, p + strlen("file://"));
if ((p = text.find('\r')) != std::string::npos)
text.erase(p);
if ((p = text.find('\n')) != std::string::npos)
text.erase(p);
if (text[text.length()-1] == 0) text.erase(text.length() -1);
TxQueINSERTIMAGE(text);
return 1;
}
#endif
// paste everything verbatim if we cannot read the first file
LOG_INFO("DnD file %s", text.c_str());
if (readFile(text.c_str()) == -1 && len == text.length())
return FTextBase::handle(FL_PASTE);
text.erase(0, p + sizeof(sep) - 1);
}
return 1;
}
/// Handles mouse-3 clicks by displaying the context menu
///
/// @param val
///
void FTextEdit::handle_context_menu(void)
{
bool selected = tbuf->selected();
std::cout << "FTextEdit::tbuf " << (selected ? "selected" : "not selected") << std::endl;
icons::set_active(&menu[EDIT_MENU_CUT], selected);
icons::set_active(&menu[EDIT_MENU_COPY], selected);
icons::set_active(&menu[EDIT_MENU_CLEAR], tbuf->length());
if (wrap)
menu[EDIT_MENU_WRAP].set();
else
menu[EDIT_MENU_WRAP].clear();
show_context_menu();
}
/// The context menu handler
///
/// @param val
///
void FTextEdit::menu_cb(size_t item)
{
switch (item) {
case EDIT_MENU_CLEAR:
clear();
break;
case EDIT_MENU_CUT:
kf_cut(0, this);
break;
case EDIT_MENU_COPY:
kf_copy(0, this);
break;
case EDIT_MENU_PASTE:
kf_paste(0, this);
break;
case EDIT_MENU_READ:
readFile();
break;
case EDIT_MENU_WRAP:
set_word_wrap(!wrap, true);
break;
default:
if (FTextEdit::menu[item].flags == 0) { // not an FL_SUB_MENU
add(FTextEdit::menu[item].text[0]);
add(FTextEdit::menu[item].text[1]);
}
}
}
/// This function is called by Fl_Text_Buffer when the buffer is modified, and
/// also by nextChar when a character has been passed up the transmit path. In
/// the first case either nins or ndel will be nonzero, and we change a
/// corresponding amount of text in the style buffer.
///
/// In the latter case, nins, ndel, pos and nsty are all zero and we update the
/// style buffer to mark the last character in the buffer with the XMIT
/// attribute.
///
/// @param pos
/// @param nins
/// @param ndel
/// @param nsty
/// @param dtext
/// @param arg
///
void FTextEdit::changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg)
{
FTextEdit *e = reinterpret_cast<FTextEdit *>(arg);
if (nins == 0 && ndel == 0) {
if (nsty == -1) { // called by nextChar to update transmitted text style
char s[] = { FTEXT_DEF + XMIT, '\0' };
e->sbuf->replace(pos - 1, pos, s);
e->redisplay_range(pos - 1, pos);
}
else if (nsty > 0) // restyled, e.g. selected, text
return e->buffer_modified_cb(pos, nins, ndel, nsty, dtext, e);
// No changes, e.g., a paste with an empty clipboard.
return;
}
else if (nins > 0 && e->sbuf->length() < e->tbuf->length()) {
// New text not inserted by our add() methods, i.e., via a file
// read, mouse-2 paste or, most likely, direct keyboard entry.
int n = e->tbuf->length() - e->sbuf->length();
if (n == 1) {
char s[] = { FTEXT_DEF, '\0' };
e->sbuf->append(s);
}
else {
char *s = new char [n + 1];
memset(s, FTEXT_DEF, n);
s[n] = '\0';
e->sbuf->append(s);
delete [] s;
}
}
else if (ndel > 0)
e->sbuf->remove(pos, pos + ndel);
e->sbuf->select(pos, pos + nins - ndel);
e->buffer_modified_cb(pos, nins, ndel, nsty, dtext, e);
// We may need to scroll if the text was inserted by the
// add() methods, e.g. by a macro
if (e->mTopLineNum + e->mNVisibleLines - 1 <= e->mNBufferLines)
e->show_insert_position();
}
| 25,493
|
C++
|
.cxx
| 854
| 27.614754
| 110
| 0.650185
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,112
|
smeter.cxx
|
w1hkj_fldigi/src/widgets/smeter.cxx
|
//
// smeter.cxx
//
// Smeter bar widget routines.
//
// A part of the fldigi.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library 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/>.
// ----------------------------------------------------------------------------
#include <iostream>
#include <config.h>
#include <cmath>
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include "smeter.h"
//
// smeter is a smeter bar widget based off Fl_Widget that shows a
// standard smeter bar in horizontal format
void Smeter::draw()
{
if (maximum_ > minimum_)
sval = round(meter_width * (value_ - minimum_) / (maximum_ - minimum_));
else
sval = 0;
// Draw the box and label...
draw_box();
draw_box(box(), tx, ty, tw, th, bgnd_);
if (sval > 0)
draw_box(FL_FLAT_BOX,
tx + sx, ty + 2,
sval,
th - 4,
fgnd_);
labelcolor(scale_color);
draw_label();
}
const char * Smeter::meter_face = "| : : S3 : : S6 : : S9 :: 20 :: 40 :: |";
Smeter::Smeter(int X, int Y, int W, int H, const char* l)
: Fl_Widget(X, Y, W, H, "")
{
align(FL_ALIGN_INSIDE);
box(FL_DOWN_BOX);
bgnd_ = FL_BACKGROUND2_COLOR;
fgnd_ = FL_GREEN;
scale_color = FL_BLACK;
minimum_ = 0.0;
maximum_ = 100.0;
value_ = 0;
// Get the box borders...
bx = Fl::box_dx(box());
by = Fl::box_dy(box());
bw = Fl::box_dw(box());
bh = Fl::box_dh(box());
tx = X + bx;
tw = W - bw;
ty = Y + by;
th = H - bh;
static int fsize = 6;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(meter_face);
while ((meter_width < tw) && (fl_height() < th)) {
fsize++;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(meter_face);
}
fsize--;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(meter_face);
meter_height = fl_height();
label(meter_face);
labelfont(FL_HELVETICA);
labelsize(fsize);
labelcolor(scale_color);
meter_width -= fl_width("|");
sx = (tw - meter_width) / 2;
}
void Smeter::resize(int X, int Y, int W, int H) {
Fl_Widget::resize(X,Y,W,H);
bx = Fl::box_dx(box());
by = Fl::box_dy(box());
bw = Fl::box_dw(box());
bh = Fl::box_dh(box());
tx = X + bx;
tw = W - bw;
ty = Y + by;
th = H - bh;
static int fsize = 6;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(meter_face);
while ((meter_width < tw) && (fl_height() < th)) {
fsize++;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(meter_face);
}
fsize--;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(meter_face);
meter_height = fl_height();
label(meter_face);
labelfont(FL_HELVETICA);
labelsize(fsize);
labelcolor(scale_color);
meter_width -= fl_width("|");
sx = (tw - meter_width) / 2;
}
int Smeter::handle(int event)
{
if (Fl::event_inside( this )) {
if (event == FL_RELEASE) {
do_callback();
return 1;
}
}
return 0;
}
//
// End of Smeter.cxx
//
| 3,348
|
C++
|
.cxx
| 129
| 23.945736
| 87
| 0.636534
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,116
|
pwrmeter.cxx
|
w1hkj_fldigi/src/widgets/pwrmeter.cxx
|
//
// pwrmeter.cxx
//
// PWRmeter bar widget routines.
//
// A part of the fldigi.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library 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/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <cmath>
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include "pwrmeter.h"
//
// pwrmeter is a pwrmeter bar widget based off Fl_Widget that shows a
// standard pwrmeter bar in horizontal format
void PWRmeter::draw()
{
if (select_ == 4) select_auto();
sval = round(meter_width * (value_) / (maximum_));
if (sval > meter_width) sval = meter_width;
if (sval < 0) sval = 0;
// Draw the box and label...
draw_box();
draw_box(box(), tx, ty, tw, th, bgnd_);
if (sval > 0)
draw_box(FL_FLAT_BOX,
tx + sx, ty + 2,
sval,
th - 4,
fgnd_);
labelcolor(scale_color);
draw_label();
}
void PWRmeter::select_25W()
{
maximum_ = 25;
label(W25_face);
fl_font(FL_HELVETICA, labelsize());
meter_width = fl_width(W25_face);
sx = (tw - meter_width) / 2 + fl_width("|") / 2;
meter_width -= fl_width("|");
}
void PWRmeter::select_50W()
{
maximum_ = 50;
label(W50_face);
fl_font(FL_HELVETICA, labelsize());
meter_width = fl_width(W50_face);
sx = (tw - meter_width) / 2 + fl_width("|") / 2;
meter_width -= fl_width("|");
}
void PWRmeter::select_100W()
{
maximum_ = 100;
label(W100_face);
fl_font(FL_HELVETICA, labelsize());
meter_width = fl_width(W100_face);
sx = (tw - meter_width) / 2 + fl_width("|") / 2;
meter_width -= fl_width("|");
}
void PWRmeter::select_200W()
{
maximum_ = 200;
label(W200_face);
fl_font(FL_HELVETICA, labelsize());
meter_width = fl_width(W200_face);
sx = (tw - meter_width) / 2 + fl_width("|") / 2;
meter_width -= fl_width("|");
}
void PWRmeter::select_auto()
{
if (value_ <= 25.0) {
select_25W();
} else if (value_ <= 50.0) {
select_50W();
} else if (value_ <= 100) {
select_100W();
} else {
select_200W();
}
redraw();
}
void PWRmeter::select( int sel ) {
switch (sel) {
case P25:
select_25W();
select_ = 0;
break;
case P50:
select_50W();
select_ = 1;
break;
case P100:
select_100W();
select_ = 2;
break;
case P200:
select_200W();
select_ = 3;
break;
case AUTO:
default:
select_auto();
select_ = 4;
}
redraw();
}
const char * PWRmeter::W25_face = "| : : : : | : : : : | : : : : | : : : : | : : : 25|";
const char * PWRmeter::W50_face = "| : | : | : | : | : 50|";
const char * PWRmeter::W100_face = "| | | | | | | | | | 100|";
const char * PWRmeter::W200_face = "| : | : | : | : 200|";
PWRmeter::PWRmeter(int X, int Y, int W, int H, const char* l)
: Fl_Widget(X, Y, W, H, "")
{
align(FL_ALIGN_INSIDE);
box(FL_DOWN_BOX);
bgnd_ = FL_BACKGROUND2_COLOR;
fgnd_ = FL_GREEN;
scale_color = FL_BLACK;
maximum_ = 100.0;
value_ = 0.0;
select_ = 2; // 100 W scale
// Get the box borders...
bx = Fl::box_dx(box());
by = Fl::box_dy(box());
bw = Fl::box_dw(box());
bh = Fl::box_dh(box());
tx = X + bx;
tw = W - bw;
ty = Y + by;
th = H - bh;
static int fsize = 6;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(W100_face);
while ((meter_width < tw) && (fl_height() < th)) {
fsize++;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(W100_face);
}
fsize--;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(W100_face);
meter_height = fl_height();
label(W100_face);
labelfont(FL_HELVETICA);
labelsize(fsize);
labelcolor(scale_color);
sx = (tw - meter_width) / 2 + fl_width("|") / 2;
meter_width -= fl_width("|");
}
void PWRmeter::resize(int X, int Y, int W, int H) {
Fl_Widget::resize(X,Y,W,H);
bx = Fl::box_dx(box());
by = Fl::box_dy(box());
bw = Fl::box_dw(box());
bh = Fl::box_dh(box());
tx = X + bx;
tw = W - bw;
ty = Y + by;
th = H - bh;
const char *face;
switch (select_) {
case P25:
face = W25_face;
break;
case P50:
face = W50_face;
break;
case P100:
face = W100_face;
break;
case P200:
face = W200_face;
break;
case AUTO:
default:
face = W25_face;
}
static int fsize = 6;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(face);
while ((meter_width < tw) && (fl_height() < th)) {
fsize++;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(face);
}
fsize--;
fl_font(FL_HELVETICA, fsize);
meter_width = fl_width(face);
meter_height = fl_height();
label(face);
labelfont(FL_HELVETICA);
labelsize(fsize);
labelcolor(scale_color);
sx = (tw - meter_width) / 2 + fl_width("|") / 2;
meter_width -= fl_width("|");
}
int PWRmeter::handle(int event)
{
if (Fl::event_inside( this )) {
if (event == FL_RELEASE) {
do_callback();
return 1;
}
}
return 0;
}
//
// End of PWRmeter.cxx
//
| 5,399
|
C++
|
.cxx
| 223
| 21.96861
| 90
| 0.606261
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,117
|
psk_browser.cxx
|
w1hkj_fldigi/src/widgets/psk_browser.cxx
|
// ----------------------------------------------------------------------------
//
// PSK browser widget
//
// Copyright (C) 2008-2010
// David Freese, W1HKJ
// Copyright (C) 2008-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <FL/Enumerations.H>
#include "config.h"
#include "psk_browser.h"
#include "configuration.h"
#include "confdialog.h"
#include "status.h"
#include "waterfall.h"
#include "fl_digi.h"
#include "gettext.h"
#include "flmisc.h"
#include "flinput2.h"
#include "flslider2.h"
#include "spot.h"
#include "icons.h"
#include "Viewer.h"
#include "audio_alert.h"
#include <string>
std::string pskBrowser::hilite_color_1;
std::string pskBrowser::hilite_color_2;
std::string pskBrowser::white;
std::string pskBrowser::bkgnd[2];
int pskBrowser::cwidth = 5;
int pskBrowser::cheight = 12;
int pskBrowser::sbarwidth = 16;
pskBrowser::pskBrowser(int x, int y, int w, int h, const char *l)
:Fl_Hold_Browser(x,y,w,h,l)
{
fnt = FL_HELVETICA;
siz = 12;
rfc = 0LL;
usb = true;
seek_re = NULL;
cols[0] = 80; cols[1] = 0;
evalcwidth();
HiLite_1 = FL_RED;
HiLite_2 = FL_GREEN;
BkSelect = FL_BLUE;
Backgnd1 = (Fl_Color)55;
Backgnd2 = (Fl_Color)53;
makecolors();
cdistiller = reinterpret_cast<CharsetDistiller*>(operator new(MAXCHANNELS*sizeof(CharsetDistiller)));
std::string bline;
for (int i = 0; i < MAXCHANNELS; i++) {
alerted[i].regex_alert = alerted[i].mycall_alert = false;
bwsrline[i] = " ";
bwsrfreq[i] = NULLFREQ;
bline = freqformat(i);
if ( i < progdefaults.VIEWERchannels) add(bline.c_str());
new(&cdistiller[i]) CharsetDistiller;
}
}
pskBrowser::~pskBrowser()
{
for (int i = MAXCHANNELS-1; i >= 0; i--)
cdistiller[i].~CharsetDistiller();
operator delete(cdistiller);
}
void pskBrowser::evalcwidth()
{
fl_font(fnt, siz);
textfont(fnt);
textsize(siz);
cwidth = (int)fl_width("8");
if (cwidth <= 0) cwidth = 5;
cheight = fl_height();
labelwidth[VIEWER_LABEL_OFF] = 1;
labelwidth[VIEWER_LABEL_AF] = 5*cwidth;
labelwidth[VIEWER_LABEL_RF] = 10*cwidth;
labelwidth[VIEWER_LABEL_CH] = 3*cwidth;
columns(labelwidth[progdefaults.VIEWERlabeltype]);
}
std::string pskBrowser::freqformat(int i) // 0 < i < channels
{
szLine[0] = 0;
int freq = bwsrfreq[i];
switch (progdefaults.VIEWERlabeltype) {
case VIEWER_LABEL_AF:
if (freq != NULLFREQ)
snprintf(szLine, sizeof(szLine), "%4d", freq);
else
snprintf(szLine, sizeof(szLine), " ");
break;
case VIEWER_LABEL_RF:
if (freq != NULLFREQ)
snprintf(szLine, sizeof(szLine), "%8.2f", (rfc + (usb ? freq : -freq)) / 1000.0f);
else
snprintf(szLine, sizeof(szLine), " ");
break;
case VIEWER_LABEL_CH:
snprintf(szLine, sizeof(szLine), "%2d", i + 1);
break;
default:
snprintf(szLine, sizeof(szLine), " ");
break;
}
fline = white;
fline.append("@r").append(szLine).append("\t").append(bkgnd[i%2]);
return fline;
}
void pskBrowser::swap(int i, int j)
{
std::string tempstr = bwsrline[j];
bwsrline[j] = bwsrline[i];
bwsrline[i] = tempstr;
int f = bwsrfreq[j];
bwsrfreq[j] = bwsrfreq[i];
bwsrfreq[i] = f;
tempstr = freqformat(i);
tempstr.append(bwsrline[i]);
text(i+1, tempstr.c_str());
tempstr = freqformat(j);
tempstr.append(bwsrline[j]);
text(j+1, tempstr.c_str());
redraw();
}
static size_t case_find(std::string &haystack, std::string &needle)
{
std::string Uhaystack = haystack;
std::string Uneedle = needle;
for (size_t i = 0; i < Uhaystack.length(); i++ ) Uhaystack[i] = toupper(Uhaystack[i]);
for (size_t i = 0; i < Uneedle.length(); i++ ) Uneedle[i] = toupper(Uneedle[i]);
return Uhaystack.find(Uneedle);
}
void pskBrowser::resize(int x, int y, int w, int h)
{
if (w) {
Fl_Hold_Browser::resize(x,y,w,h);
evalcwidth();
std::string bline;
Fl_Hold_Browser::clear();
for (int i = 0, j = 0; i < progdefaults.VIEWERchannels; i++) {
if (progdefaults.VIEWERascend) j = progdefaults.VIEWERchannels - 1 - i;
else j = i;
bwsrline[j].clear();
bline = freqformat(j);
if (seek_re && seek_re->match(bwsrline[j].c_str(), REG_NOTBOL | REG_NOTEOL))
bline.append(hilite_color_1);
else if ( !progdefaults.myCall.empty() &&
case_find (bwsrline[j], progdefaults.myCall ) != std::string::npos)
bline.append(hilite_color_2);
Fl_Hold_Browser::add(bline.c_str());
}
}
}
void pskBrowser::makecolors()
{
char tempstr[20];
snprintf(tempstr, sizeof(tempstr), "@C%u", HiLite_1);
hilite_color_1 = tempstr;
snprintf(tempstr, sizeof(tempstr), "@C%u", HiLite_2);
hilite_color_2 = tempstr;
snprintf(tempstr, sizeof(tempstr), "@C%u", FL_FOREGROUND_COLOR); // foreground
white = tempstr;
selection_color(BkSelect);
snprintf(tempstr, sizeof(tempstr), "@B%u", Backgnd1); // background for odd rows
bkgnd[0] = tempstr;
snprintf(tempstr, sizeof(tempstr), "@B%u", Backgnd2); // background for even rows
bkgnd[1] = tempstr;
}
void pskBrowser::addchr(int ch, int freq, unsigned char c, int md, bool signal_alert)
{
if (ch < 0 || ch >= MAXCHANNELS)
return;
if (c == '\n') c = ' ';
if (c < ' ') return;
bwsrfreq[ch] = freq;
if (bwsrline[ch].length() == 1 && bwsrline[ch][0] == ' ') {
bwsrline[ch].clear();
}
cdistiller[ch].rx(c);
if (cdistiller[ch].data_length() > 0) {
bwsrline[ch] += cdistiller[ch].data();
cdistiller[ch].clear();
}
fl_font(fnt, siz);
int bX, bY, bW, bH;
bbox(bX, bY, bW, bH);
size_t available = bW - cols[0];
// size_t available = (w() - cols[0] - (sbarwidth + 2*BWSR_BORDER));
size_t linewidth = fl_width(bwsrline[ch].c_str());
if (linewidth > available) {
if (progdefaults.VIEWERmarquee) {
bwsrline[ch].erase(0, fl_utf8len1(bwsrline[ch][0]));
} else {
bwsrline[ch].clear();
}
}
nuline = freqformat(ch);
if (!bwsrline[ch].empty()) {
if (seek_re && seek_re->match(bwsrline[ch].c_str(), REG_NOTBOL | REG_NOTEOL)) {
if ((trx_state == STATE_RX) &&
(alerted[ch].regex_alert == false) &&
signal_alert &&
progdefaults.ENABLE_BWSR_REGEX_MATCH) {
if (audio_alert) audio_alert->alert(progdefaults.BWSR_REGEX_MATCH);
alerted[ch].regex_alert = true;
}
nuline.append(hilite_color_1);
} else {
alerted[ch].regex_alert = false;
}
} else {
alerted[ch].regex_alert = false;
}
if (!progdefaults.myCall.empty() &&
case_find (bwsrline[ch], progdefaults.myCall ) != std::string::npos) {
nuline.append(hilite_color_2);
if ((trx_state == STATE_RX) &&
(alerted[ch].mycall_alert == false) &&
signal_alert &&
progdefaults.ENABLE_BWSR_MYCALL_MATCH) {
if (audio_alert) audio_alert->alert(progdefaults.BWSR_MYCALL_MATCH);
alerted[ch].mycall_alert = true;
}
} else
alerted[ch].mycall_alert = false;
nuline.append("@.").append(bwsrline[ch]);
if (progdefaults.VIEWERascend)
text(progdefaults.VIEWERchannels - ch, nuline.c_str());
else
text(ch + 1, nuline.c_str());
redraw();
}
void pskBrowser::set_freq(int i, int freq) // 0 < i < channels
{
std::string new_line = "";
bwsrfreq[i] = freq;
new_line.append(freqformat(i)).append(bwsrline[i]);
if (progdefaults.VIEWERascend)
replace(progdefaults.VIEWERchannels - i, new_line.c_str());
else
replace(i + 1, new_line.c_str());
}
void pskBrowser::clear()
{
long freq;
Fl_Hold_Browser::clear();
for (int i = 0, j = 0; i < progdefaults.VIEWERchannels; i++) {
if (progdefaults.VIEWERascend) j = progdefaults.VIEWERchannels - 1 - i;
else j = i;
freq = NULLFREQ;
bwsrline[j] = " ";
bwsrfreq[j] = freq;
fline = freqformat(j);
add((fline.append(bwsrline[j])).c_str());
}
deselect();
redraw();
}
void pskBrowser::clearch(int n, int freq) // 0 < n < channels
{
bwsrline[n] = " ";
set_freq(n, freq);
redraw();
}
int pskBrowser::freq(int i) { // 1 < i < progdefaults.VIEWERchannels
if (progdefaults.VIEWERascend)
return (
i < 1 ? 0 :
i > progdefaults.VIEWERchannels ? 0 : bwsrfreq[progdefaults.VIEWERchannels - i]);
else
return (i < 1 ? 0 : i > MAXCHANNELS ? 0 : bwsrfreq[i - 1]);
}
void pskBrowser::set_input_encoding(int encoding_id)
{
for (int i = 0; i < MAXCHANNELS; i++)
cdistiller[i].set_input_encoding(encoding_id);
}
| 8,802
|
C++
|
.cxx
| 292
| 27.726027
| 102
| 0.667534
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,118
|
Fl_Tile_Check.cxx
|
w1hkj_fldigi/src/widgets/Fl_Tile_Check.cxx
|
// ----------------------------------------------------------------------------
// Fl_Tile_Check.cxx
//
// Copyright (C) 2007-2011
// Stelios Bounanos, M0GLD
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Enumerations.H>
#include <FL/Fl_Window.H>
#include "Fl_Tile_Check.h"
// Drag the edges that were initially at oldx,oldy to newx,newy:
// pass -1 as oldx or oldy to disable drag in that direction:
void Tile_::position(int oix, int oiy, int newx, int newy) {
Fl_Widget* const* a = array();
short* p = (short *)sizes();
//int gX = x(), gW = w();
//printf("gX %d, gW %d\n", gX, gW);
//printf("oix %d, oiy %d, newx %d, newy %d\n", oix, oiy, newx, newy);
p += 8; // skip group & resizable's saved size
for (int i=children(); i--; p += 4) {
Fl_Widget* o = *a++;
if (o == resizable()) continue;
int X = o->x();
int Y = o->y();
int W = o->w();
int H = o->h();
int R = X + W;
int B = Y + H;
//printf("Child %d : %p : x %d, y %d, w %d, h %d",
// i, o, X, Y, W, H);
// if (o == resizable()) {
//printf(" ... resizable\n");
// continue;
//} else
//printf("\n");
if (oix > -1) {
int t = p[0];
if ((t == oix) || (t>oix && X<newx) || (t<oix && X>newx)) X = newx;
t = p[1];
if ((t == oix) || (t>oix && R<newx) || (t<oix && R>newx)) R = newx;
}
if (oiy > -1) {
int t = p[2];
if ((t == oiy) || (t>oiy && Y<newy) || (t<oiy && Y>newy)) Y = newy;
t = p[3];
if ((t == oiy) || (t>oiy && B<newy) || (t<oiy && B>newy)) B = newy;
}
o->damage_resize(X, Y, R-X, B-Y);
}
}
void Tile_::newx( int oix, int newx )
{
// Fl_Widget* const* a = array();
short* p = (short *)sizes();
int gX = x(), gW = w();
printf("gX %d, gW %d; newx %d\n", gX, gW, newx);
if (newx > p[5]) {
printf("p[5] = %d\n", p[5]);
newx = p[5] - 1;
}
position(oix, -1, newx, -1);
}
// move the lower-right corner (sort of):
void Tile_::resize(int X,int Y,int W,int H) {
// remember how much to move the child widgets:
short* p = (short *)sizes();
int dx = X-x();
int dy = Y-y();
int dw = W-w();
int dh = H-h();
// int OGR = p[1];
// int OGB = p[3];
// int OW = w();
// int OH = h();
// resize this (skip the Fl_Group resize):
Fl_Widget::resize(X,Y,W,H);
// find bottom-right of resizable:
int OR = p[5];
int NR = X + W - (p[1]-OR);
int OB = p[7];
int NB = Y + H - (p[3]-OB);
// move everything to be on correct side of new resizable:
Fl_Widget*const* a = array();
p += 8;
for (int i=children(); i--;) {
Fl_Widget* o = *a++;
int xx = o->x()+dx;
int R = xx+o->w();
// left
if (p[0] >= OR) xx += dw; else if (xx > NR) xx = NR;
// right
if (p[1] >= OR) R += dw; else if (R > NR) R = NR;
int yy = o->y()+dy;
int B = yy+o->h();
// top
if (p[2] >= OB) yy += dh; else if (yy > NB) yy = NB;
// bottom
if (p[3] >= OB) B += dh; else if (B > NB) B = NB;
o->resize(xx,yy,R-xx,B-yy);
p += 4; // next child sizes array
// do *not* call o->redraw() here! If you do, and the tile is inside a
// scroll, it'll set the damage areas wrong for all children!
}
}
static void set_cursor(Tile_ *t, Fl_Cursor c) {
static Fl_Cursor cursor;
if (cursor == c || !t->window()) return;
cursor = c;
t->window()->cursor(c);
}
static Fl_Cursor cursors[4] = {
FL_CURSOR_DEFAULT,
FL_CURSOR_WE,
FL_CURSOR_NS,
FL_CURSOR_MOVE};
int Tile_::handle(int event) {
static int sdrag;
static int sdx, sdy;
static int sx, sy;
#define DRAGH 1
#define DRAGV 2
#define GRABAREA 4
int mx = Fl::event_x();
int my = Fl::event_y();
switch (event) {
case FL_MOVE:
case FL_ENTER:
case FL_PUSH: {
int mindx = 100;
int mindy = 100;
int oldx = 0;
int oldy = 0;
Fl_Widget*const* a = array();
short* q = (short *)sizes();
short* p = q+8;
for (int i=children(); i--; p += 4) {
Fl_Widget* o = *a++;
if (o == resizable()) continue;
if (p[1]<q[1] && o->y()<=my+GRABAREA && o->y()+o->h()>=my-GRABAREA) {
int t = mx - (o->x()+o->w());
if (abs(t) < mindx) {
sdx = t;
mindx = abs(t);
oldx = p[1];
}
}
if (p[3]<q[3] && o->x()<=mx+GRABAREA && o->x()+o->w()>=mx-GRABAREA) {
int t = my - (o->y()+o->h());
if (abs(t) < mindy) {
sdy = t;
mindy = abs(t);
oldy = p[3];
}
}
}
sdrag = 0; sx = sy = -1;
if (mindx <= GRABAREA) {sdrag = DRAGH; sx = oldx;}
if (mindy <= GRABAREA) {sdrag |= DRAGV; sy = oldy;}
set_cursor(this, cursors[sdrag]);
if (sdrag) return 1;
return Fl_Group::handle(event);
}
case FL_LEAVE:
set_cursor(this, FL_CURSOR_DEFAULT);
break;
case FL_DRAG:
// This is necessary if CONSOLIDATE_MOTION in Fl_x.cxx is turned off:
// if (damage()) return 1; // don't fall behind
case FL_RELEASE: {
if (!sdrag) return 0; // should not happen
Fl_Widget* r = resizable(); if (!r) r = this;
int newx;
if (sdrag&DRAGH) {
newx = Fl::event_x()-sdx;
if (newx < r->x()) newx = r->x();
else if (newx >= r->x()+r->w()) newx = r->x()+r->w();
} else
newx = sx;
int newy;
if (sdrag&DRAGV) {
newy = Fl::event_y()-sdy;
if (newy < r->y()) newy = r->y();
else if (newy >= r->y()+r->h()) newy = r->y()+r->h();
} else
newy = sy;
position(sx,sy,newx,newy);
if (event == FL_DRAG) set_changed();
do_callback();
return 1;}
}
return Fl_Group::handle(event);
}
Fl_Tile_Check::Fl_Tile_Check(int x, int y, int w, int h, const char* l)
: Tile_(x, y, w, h, l)
{
remove_checks();
}
int Fl_Tile_Check::handle(int event)
{
switch (event) {
case FL_DRAG:
return 1;
case FL_RELEASE:
if (!do_checks(Fl::event_x() - xstart, Fl::event_y() - ystart))
return 1;
// fall through to reset [xy]start
case FL_PUSH:
xstart = Fl::event_x();
ystart = Fl::event_y();
}
return Tile_::handle(event);
}
void Fl_Tile_Check::add_resize_check(resize_check_func f, void *a)
{
for (size_t i = 0; i < sizeof(resize_checks) / sizeof(resize_checks[0]); i++) {
if (resize_checks[i] == 0) {
resize_checks[i] = f;
resize_args[i] = a;
break;
}
}
}
void Fl_Tile_Check::remove_resize_check(resize_check_func f, void *a)
{
for (size_t i = 0; i < sizeof(resize_checks) / sizeof(resize_checks[0]); i++)
if (resize_checks[i] == f && resize_args[i] == a)
resize_checks[i] = 0;
}
void Fl_Tile_Check::remove_checks(void)
{
for (size_t i = 0; i < sizeof(resize_checks) / sizeof(resize_checks[0]); i++) {
resize_checks[i] = 0;
resize_args[i] = 0;
}
}
bool Fl_Tile_Check::do_checks(int xd, int yd)
{
for (size_t i = 0; i < sizeof(resize_checks) / sizeof(resize_checks[0]); i++)
if (resize_checks[i] && !resize_checks[i](resize_args[i], xd, yd))
return false;
return true;
}
| 7,318
|
C++
|
.cxx
| 261
| 25.743295
| 80
| 0.574637
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,119
|
F_Edit.cxx
|
w1hkj_fldigi/src/widgets/F_Edit.cxx
|
// ----------------------------------------------------------------------------
// FTextView.cxx
//
// Copyright (C) 2007-2009
// Stelios Bounanos, M0GLD
//
// Copyright (C) 2008-2009
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <sys/stat.h>
#include <map>
#include <fstream>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <FL/Fl_Tooltip.H>
#include "flmisc.h"
#include "fileselect.h"
#include "font_browser.h"
#include "ascii.h"
#include "icons.h"
#include "gettext.h"
#include "macros.h"
#include "F_Edit.h"
#include "debug.h"
int * F_Edit::p_editpos;
Fl_Menu_Item F_Edit::menu[] = {
{ 0 }, // EDIT_MENU_CUT
{ 0 }, // EDIT_MENU_COPY
{ 0 }, // EDIT_MENU_PASTE
{ 0 }, // EDIT_MENU_CLEAR
{ 0 }, // EDIT_MENU_READ
{ 0 }, // EDIT_MENU_WRAP
{ _("Spec Char"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "¢ - cent", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "£ - pound", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "µ - micro", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "° - degree", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "¿ - iques", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "× - times", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "÷ - divide", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ _("A"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "À - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "à - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Á - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "á - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Â - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "â - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ã - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ã - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ä - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ä - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Å - ring", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "å - ring", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Æ - aelig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "æ - aelig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("E"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "È - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "è - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "É - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "é - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ê - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ê - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ë - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ë - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("I"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ì - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ì - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Í - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "í - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Î - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "î - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ï - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ï - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("N"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ñ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ñ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("O"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ò - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ò - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ó - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ó - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ô - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ô - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Õ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "õ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ö - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ö - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ø - slash", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ø - slash", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("U"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ù - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ù - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ú - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ú - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Û - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "û - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ü - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ü - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("Y"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ý - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ý - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ÿ - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("Other"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "ß - szlig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ç - cedil", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ç - cedil", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ð - eth", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ð - eth", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Þ - thorn", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{ 0 }
};
F_Edit::F_Edit(int x, int y, int w, int h, const char *l)
: FTextEdit(x, y, w, h, l), editpos(0), bkspaces(0)
{
change_keybindings();
memcpy(menu + EDIT_MENU_CUT, FTextEdit::menu, (FTextEdit::menu->size() - 1) * sizeof(*FTextEdit::menu));
context_menu = menu;
init_context_menu();
p_editpos = &editpos;
}
/// Handles fltk events for this widget.
/// We pass keyboard events to handle_key() and handle mouse3 presses to show
/// the popup menu. We also disallow mouse2 events in the transmitted text area.
/// Everything else is passed to the base class handle().
///
/// @param event
///
/// @return
///
int F_Edit::handle(int event)
{
// if ( !(Fl::event_inside(this) || (event == FL_KEYBOARD && Fl::focus() == this)) )
// return FTextEdit::handle(event);
// if (event == FL_KEYBOARD)
// return handle_key(Fl::event_key()) ? 1 : FTextEdit::handle(event);
return FTextEdit::handle(event);
}
/// Clears the buffer.
/// Also resets the transmit position, stored backspaces and tx pause flag.
///
void F_Edit::clear(void)
{
FTextEdit::clear();
editpos = 0;
bkspaces = 0;
}
void F_Edit::add_text(std::string s)
{
for (size_t n = 0; n < s.length(); n++) {
if (s[n] == '\b') {
int ipos = insert_position();
if (tbuf->length()) {
if (ipos > 0) {
bkspaces++;
int nn;
tbuf->get_char_at(editpos, nn);
editpos -= nn;
}
tbuf->remove(tbuf->length() - 1, tbuf->length());
sbuf->remove(sbuf->length() - 1, sbuf->length());
redraw();
}
} else {
add(s[n] & 0xFF, RECV);
}
}
}
void F_Edit::setFont(Fl_Font f, int attr)
{
FTextBase::setFont(f, attr);
}
/// Handles keyboard events to override Fl_Text_Editor_mod's handling of some
/// keystrokes.
///
/// @param key
///
/// @return
///
int F_Edit::handle_key(int key)
{
switch (key) {
case FL_Tab:
if (editpos != insert_position())
insert_position(editpos);
else
insert_position(tbuf->length());
return 1;
case FL_BackSpace: {
int ipos = insert_position();
if (editpos > 0 && editpos == ipos) {
bkspaces++;
editpos = tbuf->prev_char(ipos);
}
return 0;
}
default:
break;
}
// read ctl-ddd, where d is a digit, as ascii characters (in base 10)
// and insert verbatim; e.g. ctl-001 inserts a <soh>
if (Fl::event_state() & FL_CTRL && (key >= FL_KP) && (key <= FL_KP + '9'))
return handle_key_ascii(key);
// restart the numeric keypad entries.
ascii_cnt = 0;
ascii_chr = 0;
return 0;
}
int F_Edit::handle_dnd_drag(int pos)
{
return 1;
return FTextEdit::handle_dnd_drag(pos);
}
/// Handles mouse-3 clicks by displaying the context menu
///
/// @param val
///
void F_Edit::handle_context_menu(void)
{
bool selected = tbuf->selected();
std::cout << "F_Edit::tbuf " << (selected ? "selected" : "not selected") << std::endl;
icons::set_active(&menu[EDIT_MENU_CLEAR], tbuf->length());
icons::set_active(&menu[EDIT_MENU_CUT], selected);
icons::set_active(&menu[EDIT_MENU_COPY], selected);
icons::set_active(&menu[EDIT_MENU_PASTE], true);
icons::set_active(&menu[EDIT_MENU_READ], true);
if (wrap)
menu[EDIT_MENU_WRAP].set();
else
menu[EDIT_MENU_WRAP].clear();
show_context_menu();
}
/// The context menu handler
///
/// @param val
///
void F_Edit::menu_cb(size_t item)
{
switch (item) {
case EDIT_MENU_CLEAR:
clear();
break;
case EDIT_MENU_CUT:
kf_cut(0, this);
break;
case EDIT_MENU_COPY:
kf_copy(0, this);
break;
case EDIT_MENU_PASTE:
kf_paste(0, this);
break;
case EDIT_MENU_READ: {
restore_wrap = wrap;
set_word_wrap(false);
readFile();
break;
}
case EDIT_MENU_WRAP:
set_word_wrap(!wrap, true);
break;
default:
if (F_Edit::menu[item].flags == 0) { // not an FL_SUB_MENU
add(F_Edit::menu[item].text[0]);
add(F_Edit::menu[item].text[1]);
}
}
}
/// Overrides some useful Fl_Text_Edit keybindings that we want to keep working,
/// provided that they don't try to change chunks of transmitted text.
///
void F_Edit::change_keybindings(void)
{
struct {
Fl_Text_Editor_mod::Key_Func function, override;
} fbind[] = {
{ Fl_Text_Editor_mod::kf_default, F_Edit::kf_default },
{ Fl_Text_Editor_mod::kf_enter, F_Edit::kf_enter },
{ Fl_Text_Editor_mod::kf_delete, F_Edit::kf_delete },
{ Fl_Text_Editor_mod::kf_cut, F_Edit::kf_cut },
{ Fl_Text_Editor_mod::kf_paste, F_Edit::kf_paste }
};
int n = sizeof(fbind) / sizeof(fbind[0]);
// walk the keybindings linked list and replace items containing
// functions for which we have an override in fbind
for (Fl_Text_Editor_mod::Key_Binding *k = key_bindings; k; k = k->next) {
for (int i = 0; i < n; i++)
if (fbind[i].function == k->function)
k->function = fbind[i].override;
}
}
// The kf_* functions below call the corresponding Fl_Text_Editor_mod routines, but
// may make adjustments so that no transmitted text is modified.
int F_Edit::kf_default(int c, Fl_Text_Editor_mod* e)
{
return e->insert_position() < *p_editpos ? 1 : Fl_Text_Editor_mod::kf_default(c, e);
}
int F_Edit::kf_enter(int c, Fl_Text_Editor_mod* e)
{
return e->insert_position() < *p_editpos ? 1 : Fl_Text_Editor_mod::kf_enter(c, e);
}
int F_Edit::kf_delete(int c, Fl_Text_Editor_mod* e)
{
// single character
if (!e->buffer()->selected()) {
if (e->insert_position() >= *p_editpos &&
e->insert_position() != e->buffer()->length())
return Fl_Text_Editor_mod::kf_delete(c, e);
else
return 1;
}
// region: delete as much as we can
int start, end;
e->buffer()->selection_position(&start, &end);
if (*p_editpos >= end)
return 1;
if (*p_editpos > start)
e->buffer()->select(*p_editpos, end);
return Fl_Text_Editor_mod::kf_delete(c, e);
}
int F_Edit::kf_cut(int c, Fl_Text_Editor_mod* e)
{
if (e->buffer()->selected()) {
int start, end;
e->buffer()->selection_position(&start, &end);
if (*p_editpos >= end)
return 1;
if (*p_editpos > start)
e->buffer()->select(*p_editpos, end);
}
return Fl_Text_Editor_mod::kf_cut(c, e);
}
int F_Edit::kf_paste(int c, Fl_Text_Editor_mod* e)
{
return e->insert_position() < *p_editpos ? 1 : Fl_Text_Editor_mod::kf_paste(c, e);
}
| 11,949
|
C++
|
.cxx
| 366
| 29.715847
| 105
| 0.585882
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,120
|
flinput2.cxx
|
w1hkj_fldigi/src/widgets/flinput2.cxx
|
// ----------------------------------------------------------------------------
// flinput2.cxx
//
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <cctype>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Widget.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Tooltip.H>
#include "icons.h"
#include "flinput2.h"
#include "gettext.h"
#include "debug.h"
enum { OP_UNDO, OP_CUT, OP_COPY, OP_PASTE, OP_DELETE, OP_CLEAR, OP_SELECT_ALL };
static Fl_Menu_Item cmenu[] = {
{ icons::make_icon_label(_("Undo"), edit_undo_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Cut"), edit_cut_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Paste"), edit_paste_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Delete"), trash_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Select All"), edit_select_all_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ _("Spec Char"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "¢ - cent", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "£ - pound", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "µ - micro", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "° - degree", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "¿ - iques", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "× - times", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "÷ - divide", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ _("A"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "À - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "à - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Á - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "á - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Â - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "â - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ã - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ã - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ä - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ä - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Å - ring", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "å - ring", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Æ - aelig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "æ - aelig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("E"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "È - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "è - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "É - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "é - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ê - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ê - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ë - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ë - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("I"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ì - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ì - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Í - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "í - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Î - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "î - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ï - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ï - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("N"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ñ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ñ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("O"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ò - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ò - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ó - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ó - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ô - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ô - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Õ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "õ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ö - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ö - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ø - slash", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ø - slash", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("U"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ù - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ù - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ú - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ú - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Û - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "û - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ü - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ü - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("Y"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ý - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ý - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ÿ - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("Other"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "ß - szlig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ç - cedil", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ç - cedil", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ð - eth", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ð - eth", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Þ - thorn", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0}
};
static bool cmenu_init = false;
Fl_Input2::Fl_Input2(int x, int y, int w, int h, const char* l)
: Fl_Input(x, y, w, h, l)
{
if (!cmenu_init) {
for (size_t i = 0; i < sizeof(cmenu)/sizeof(*cmenu) - 1; i++)
if (cmenu[i].labeltype() == _FL_MULTI_LABEL)
icons::set_icon_label(&cmenu[i]);
cmenu_init = true;
}
ascii_cnt = 0; // restart the numeric keypad entries.
ascii_chr = 0;
utf8text = NULL;
}
//----------------------------------------------------------------------
/// Composes ascii characters and adds them to the Fl_Input2 buffer.
/// Control characters are inserted with the CTRL style. Values larger than 127
/// (0x7f) are ignored. We cannot really add NULs for the time being.
///
/// @param key A digit character
///
/// @return 1
///
int Fl_Input2::handle_key_ascii(int key)
{
if (key >= FL_KP) key -= FL_KP;
key -= '0';
ascii_cnt++;
ascii_chr *= 10;
ascii_chr += key;
if (ascii_cnt == 3) {
if (ascii_chr < 0x100) {
utf8text = new char[fl_utf8bytes(ascii_chr) + 1];
utf8cnt = fl_utf8encode(ascii_chr, utf8text);
return 1;
}
ascii_cnt = ascii_chr = 0;
}
return 0;
}
//----------------------------------------------------------------------
int Fl_Input2::handle(int event)
{
switch (event) {
case FL_KEYBOARD: {
int b = Fl::event_key();
if (b == FL_Enter || b == FL_KP_Enter) {
do_callback();
return Fl_Input::handle(event);
}
if (b == FL_Tab) {
do_callback();
return Fl_Input::handle(event);
}
if ((Fl::event_state() & FL_CTRL) && (isdigit(b) || isdigit(b - FL_KP))) {
if (handle_key_ascii(b)) {
if (utf8text) {
insert(utf8text, utf8cnt);
delete utf8text;
}
ascii_cnt = 0;
ascii_chr = 0;
}
return 1;
}
ascii_cnt = 0;
ascii_chr = 0;
int p = position();
// stop the move-to-next-field madness, we have Tab for that!
if (unlikely((b == FL_Left && p == 0) || (b == FL_Right && p == size()) ||
(b == FL_Up && line_start(p) == 0) ||
(b == FL_Down && line_end(p) == size())))
return 1;
else if (unlikely(Fl::event_state() & (FL_ALT | FL_META))) {
switch (b) {
case 'c':
{ // capitalise
if (readonly() || p == size())
return 1;
while (p < size() && isspace(*(value() + p)))
p++;
if (p == size())
return 1;
char c = toupper(*(value() + p));
replace(p, p + 1, &c, 1);
position(word_end(p));
}
return 1;
case 'u': case 'l':
{ // upper/lower case
if (readonly() || p == size())
return 1;
while (p < size() && isspace(*(value() + p)))
p++;
int n = word_end(p) - p;
if (n == 0)
return 1;
char* s = new char[n];
memcpy(s, value() + p, n);
if (b == 'u')
for (int i = 0; i < n; i++)
s[i] = toupper(s[i]);
else
for (int i = 0; i < n; i++)
s[i] = tolower(s[i]);
replace(p, p + n, s, n);
position(p + n);
delete [] s;
return 1;
}
default:
break;
}
}
return Fl_Input::handle(event);
}
case FL_MOUSEWHEEL: {
if (!((type() & (FL_MULTILINE_INPUT | FL_MULTILINE_OUTPUT)) && Fl::event_inside(this)))
return Fl_Input::handle(event);
int d;
if (!((d = Fl::event_dy()) || (d = Fl::event_dx())))
return Fl_Input::handle(event);
if (Fl::focus() != this)
take_focus();
up_down_position(d + (d > 0 ? line_end(position()) : line_start(position())));
return 1;
}
case FL_PUSH:
if (Fl::event_button() == FL_RIGHT_MOUSE)
break;
// fall through
default:
return Fl_Input::handle(event);
}
bool sel = position() != mark(), ro = readonly();
icons::set_active(&cmenu[OP_UNDO], !ro);
icons::set_active(&cmenu[OP_CUT], !ro && sel);
icons::set_active(&cmenu[OP_COPY], sel);
icons::set_active(&cmenu[OP_PASTE], !ro);
icons::set_active(&cmenu[OP_DELETE], !ro && sel);
icons::set_active(&cmenu[OP_CLEAR], !ro && size());
icons::set_active(&cmenu[OP_SELECT_ALL], size());
take_focus();
window()->cursor(FL_CURSOR_DEFAULT);
int t = Fl_Tooltip::enabled();
Fl_Tooltip::disable();
const Fl_Menu_Item* m = cmenu->popup(Fl::event_x(), Fl::event_y());
Fl_Tooltip::enable(t);
if (!m)
return 1;
switch (m - cmenu) {
case OP_UNDO:
undo();
break;
case OP_CUT:
cut();
copy_cuts();
break;
case OP_COPY:
copy(1);
break;
case OP_PASTE:
Fl::paste(*this, 1);
break;
case OP_DELETE:
cut();
break;
case OP_CLEAR:
cut(0, size());
break;
case OP_SELECT_ALL:
position(0, size());
break;
default:
insert(m->text, 1);
}
return 1;
}
| 10,645
|
C++
|
.cxx
| 308
| 30.746753
| 100
| 0.534543
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,121
|
flmisc.cxx
|
w1hkj_fldigi/src/widgets/flmisc.cxx
|
// ----------------------------------------------------------------------------
// flmisc.cxx
//
// Copyright (C) 2008-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <string>
#include <cstdlib>
#include <cstring>
#include <cstdarg>
#include <iostream>
#include <FL/Fl.H>
#include <FL/Enumerations.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Tooltip.H>
#include <FL/Fl_Pixmap.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Dial.H>
#include <FL/Fl_Dial.H>
#include <FL/Fl_Return_Button.H>
#include <FL/fl_draw.H>
#include <FL/x.H>
#include "flmisc.h"
#include "pixmaps.h"
unsigned quick_choice_menu(const char* title, unsigned sel, const Fl_Menu_Item* menu)
{
unsigned n = menu->size();
sel = CLAMP(sel - 1, 0, n - 1);
int t = Fl_Tooltip::enabled();
Fl_Tooltip::disable();
const Fl_Menu_Item* p = menu->popup(Fl::event_x(), Fl::event_y(), title, menu + sel);
Fl_Tooltip::enable(t);
return p ? p - menu + 1 : 0;
}
unsigned quick_choice(const char* title, unsigned sel, ...)
{
const char* item;
const Fl_Menu_Item* menu = NULL;
Fl_Menu_Item* p = NULL;
va_list ap;
va_start(ap, sel);
for (size_t n = 0; (item = va_arg(ap, const char*)); n++) {
if ((p = (Fl_Menu_Item*)realloc(p, (n+2) * sizeof(Fl_Menu_Item))) == NULL) {
free((Fl_Menu_Item*)menu);
va_end(ap);
return 0;
}
memset(p + n, 0, 2 * sizeof(Fl_Menu_Item));
p[n].label(item);
p[n+1].label(NULL);
menu = p;
}
va_end(ap);
sel = quick_choice_menu(title, sel, menu);
free(p);
return sel;
}
// Adjust and return fg color to ensure good contrast with bg
Fl_Color adjust_color(Fl_Color fg, Fl_Color bg)
{
Fl_Color adj;
unsigned max = 24;
while ((adj = fl_contrast(fg, bg)) != fg && max--)
fg = (adj == FL_WHITE) ? fl_color_average(fg, FL_WHITE, .9)
: fl_color_average(fg, FL_BLACK, .9);
return fg;
}
// invert colour (bg1r, bg1g, bg1b); return def if new colour does not make
// good contrast with bg2
void adjust_color_inv(unsigned char& bg1r, unsigned char& bg1g, unsigned char& bg1b,
Fl_Color bg2, Fl_Color def)
{
bg1r = 255 - bg1r; bg1g = 255 - bg1g; bg1b = 255 - bg1b;
Fl_Color adj = fl_rgb_color(bg1r, bg1g, bg1b);
if (fl_contrast(adj, bg2) != adj)
Fl::get_color((def >= 1 ? def : adj), bg1r, bg1g, bg1b);
}
#if !defined(__APPLE__) && !defined(__WOE32__) && USE_X
# include <FL/Fl_Window.H>
# include <FL/Fl_Pixmap.H>
# include <FL/fl_draw.H>
void make_pixmap(Pixmap *xpm, const char **data, int argc, char** argv)
{
// We need a displayed window to provide a GC for X_CreatePixmap
Fl_Window w(0, 0, PACKAGE_NAME);
w.xclass(PACKAGE_NAME);
w.border(0);
w.show(argc, argv);
Fl_Pixmap icon(data);
int maxd = MAX(icon.w(), icon.h());
w.make_current();
*xpm = fl_create_offscreen(maxd, maxd);
w.hide();
fl_begin_offscreen(*xpm);
// Fl_Color(FL_BACKGROUND_COLOR);
// fl_rectf(0, 0, maxd, maxd);
icon.draw(maxd - icon.w(), maxd - icon.h());
fl_end_offscreen();
}
#endif
dialog_positions notify_dialog::positions[11] = {
{0, 50, 50}, //0
{0, 150, 200}, //1
{0, 200, 350}, //2
{0, 150, 50}, //3
{0, 150, 200}, //4
{0, 200, 350}, //5
{0, 250, 50}, //6
{0, 350, 200}, //7
{0, 450, 350}, //8
{0, 350, 50}, //9
{0, 400, 300} //10 centered on screen, all dialogs past 10
};
notify_dialog::notify_dialog(int X, int Y)
: Fl_Window(X, Y, 410, 103, ""), icon(10, 10, 50, 50), message(70, 25, 330, 35),
dial(277, 70, 23, 23), button(309, 70, 90, 23, "Close"), resize_box(399, 26, 1, 1)
{
set_non_modal();
for (dialog_number = 0; dialog_number < 10; dialog_number++)
if (positions[dialog_number].used == 0) break;
positions[dialog_number].used = 1;
position (positions[dialog_number].X, positions[dialog_number].Y);
icon.image(new Fl_Pixmap(dialog_information_48_icon));
message.type (FL_MULTILINE_OUTPUT);
message.box (FL_FLAT_BOX);
message.color (FL_BACKGROUND_COLOR);
button.callback (button_cb);
newx = button.x();
dial.box(FL_FLAT_BOX);
dial.type(FL_FILL_DIAL);
dial.selection_color(adjust_color(fl_lighter(FL_BACKGROUND_COLOR), FL_BACKGROUND_COLOR));
dial.angle1(180);
dial.angle2(-180);
dial.minimum(0.0);
user_button = (Fl_Button *)0;
xclass(PACKAGE_TARNAME);
resizable(resize_box);
end();
hide();
}
notify_dialog::~notify_dialog()
{
Fl::remove_timeout(dial_timer, &dial);
this->hide();
delete icon.image();
delete user_button;
positions[dialog_number].used = 0;
}
int notify_dialog::handle(int event)
{
if (event == FL_PUSH) {
dial.hide();
return Fl_Window::handle(event);
}
return Fl_Window::handle(event);
}
void notify_dialog::button_cb(Fl_Widget* w, void*)
{
w->window()->hide();
}
void notify_dialog::dial_timer(void* arg)
{
Fl_Dial* dial = reinterpret_cast<Fl_Dial*>(arg);
double v = dial->value();
if (!dial->visible())
return;
if (v == dial->minimum())
return dial->window()->hide();
dial->value(dial->clamp(v - 0.05));
return Fl::repeat_timeout(0.05, dial_timer, arg);
}
Fl_Button* notify_dialog::make_button(int W, int H)
{
Fl_Group* cur = Fl_Group::current();
Fl_Group::current(this);
if (user_button) return user_button;
int pad = 10;
int X = newx - pad - W;
if (X - pad - dial.w() > 0) {
user_button = new Fl_Button(newx = X, button.y(), W, H);
dial.position(user_button->x() - dial.w() - pad, dial.y());
}
Fl_Group::current(cur);
return user_button;
}
void notify_dialog::notify(const char* msg, double timeout)
{
message.value(msg);
_timeout = timeout;
const char* p;
if ((p = strchr(msg, '\n'))) { // use first line as label
std::string l(msg, p - msg);
copy_label(l.c_str());
}
else
label("Notification");
fl_font(message.textfont(), message.textsize());
int H = 0;
for (const char* p = msg; (p = strchr(p, '\n')); p++)
H++;
int nuh = 103 + std::max(H-1, 0) * fl_height();
resize(x(), y(), w(), nuh);
}
void show_notifier(notify_dialog *me)
{
if (me->_timeout > 0.0) {
me->dial.maximum(me->_timeout);
me->dial.value(me->_timeout);
me->dial.show();
Fl::add_timeout(0.0, notify_dialog::dial_timer, &me->dial);
}
else
me->dial.hide();
me->button.take_focus();
me->show();
}
// =============================================================================
#ifdef BUILD_FLDIGI
#include "icons.h"
#include "gettext.h"
Mode_Browser::Mode_Browser(void)
: Fl_Double_Window(170, 460), changed_cb(NULL), changed_args(NULL)
{
int bw = 80, bh = 20, pad = 2;
modes = new Fl_Check_Browser(pad, pad, w() - pad, h() - 2 * (bh + 2 * pad));
for (int i = 0; i < NUM_MODES; i++)
modes->add(mode_info[i].name);
modes->callback(modes_cb, this);
modes->when(FL_WHEN_CHANGED);
all_button = new Fl_Button(modes->x(), modes->y() + modes->h() + pad,
bw, bh, _("Select All"));
all_button->callback(button_cb, this);
none_button = new Fl_Button(all_button->x(), all_button->y() + all_button->h() + pad,
all_button->w(), all_button->h(), _("Clear All"));
none_button->callback(button_cb, this);
close_button = new Fl_Button(w() - none_button->w() - pad, none_button->y(),
none_button->w(), none_button->h(),
icons::make_icon_label(_("Close"), close_icon));
icons::set_icon_label(close_button);
close_button->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
close_button->callback(button_cb, this);
end();
resizable(modes);
xclass(PACKAGE_TARNAME);
}
Mode_Browser::~Mode_Browser(void)
{
icons::free_icon_label(close_button);
delete close_button;
delete all_button;
delete none_button;
delete modes;
}
void Mode_Browser::show_(mode_set_t* b)
{
store = b;
modes->check_none();
for (size_t i = 0; i < b->size(); i++)
modes->checked(i + 1, store->test(i));
modes->position(0);
Fl_Double_Window::show();
}
void Mode_Browser::callback(Fl_Callback* cb, void* args)
{
changed_cb = cb;
changed_args = args;
}
void Mode_Browser::modes_cb(Fl_Widget* w, void* arg)
{
Mode_Browser* m = static_cast<Mode_Browser*>(arg);
int sel = m->modes->value();
m->store->set(sel - 1, m->modes->checked(sel));
if (m->changed_cb)
m->changed_cb(m, m->changed_args);
}
void Mode_Browser::button_cb(Fl_Widget* w, void* arg)
{
Mode_Browser* m = static_cast<Mode_Browser*>(arg);
if (w == m->close_button)
m->hide();
else {
if (w == m->all_button) {
m->store->set();
m->modes->check_all();
}
else {
m->store->reset();
m->modes->check_none();
}
if (m->changed_cb)
m->changed_cb(m, m->changed_args);
}
}
#endif // BUILD_FLDIGI
| 9,162
|
C++
|
.cxx
| 312
| 27.282051
| 90
| 0.642492
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,124
|
progress.cxx
|
w1hkj_fldigi/src/widgets/progress.cxx
|
//
// progress.cxx
//
// Progress bar widget routines.
//
// Based on Fl_Progress widget, Copyright 2000-2005 by Michael Sweet.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library 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/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include "progress.h"
//
// progress is a progress bar widget based off Fl_Widget that shows a
// standard progress bar in either horizontal or vertical format
//
// if direction == VERTICAL the indicator goes from lower to upper
// if direction == HORIZONTAL the indicator goes from left to right
void Progress::draw()
{
int progress; // Size of progress bar...
int bx, by, bw, bh; // Box areas...
int tx, tw; // Temporary X + width
int th;
// Get the box borders...
bx = Fl::box_dx(box());
by = Fl::box_dy(box());
bw = Fl::box_dw(box());
bh = Fl::box_dh(box());
tx = x() + bx;
tw = w() - bw;
th = h() - bh;
// Draw the progress bar...
if (maximum_ > minimum_)
progress = (int)((direction == HORIZONTAL ? tw : th) * (value_ - minimum_) / (maximum_ - minimum_) + 0.5f);
else
progress = 0;
// Draw the box and label...
if (progress > 0) {
Fl_Color c = labelcolor();
labelcolor(fl_contrast(labelcolor(), color2()));
if (direction == HORIZONTAL) {
fl_clip(x(), y(), progress, h());
draw_box(box(), x(), y(), w(), h(), active_r() ? color2() : fl_inactive(color2()));
draw_label(tx, y() + by, tw, h() - bh);
fl_pop_clip();
labelcolor(c);
fl_clip(x() + progress, y(), tw - progress, h());
draw_box(box(), x(), y(), w(), h(), active_r() ? color() : fl_inactive(color()));
draw_label(tx, y() + by, tw, h() - bh);
fl_pop_clip();
} else {
fl_clip(x(), y(), w(), h() - progress);
draw_box(box(), x(), y(), w(), h(), active_r() ? color() : fl_inactive(color()));
// draw_label(tx, y() + by, tw, h() - bh);
fl_pop_clip();
labelcolor(c);
fl_clip(x(), y() + h() - progress, w(), progress );
draw_box(box(), x(), y(), w(), h(), active_r() ? color2() : fl_inactive(color2()));
// draw_label(tx, y() + by, tw, h() - bh);
fl_pop_clip();
}
} else {
draw_box(box(), x(), y(), w(), h(), color());
if (direction == HORIZONTAL)
draw_label(tx, y() + by, tw, h() - bh);
}
}
Progress::Progress(int X, int Y, int W, int H, const char* l)
: Fl_Widget(X, Y, W, H, l)
{
align(FL_ALIGN_INSIDE);
box(FL_DOWN_BOX);
color(FL_BACKGROUND2_COLOR, FL_YELLOW);
minimum(0.0f);
maximum(100.0f);
value(0.0f);
direction = HORIZONTAL;
}
//
// End of "$Id: Progress.cxx 4288 2005-04-16 00:13:17Z mike $".
//
| 3,229
|
C++
|
.cxx
| 94
| 32.010638
| 109
| 0.61104
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| true
| false
|
751,125
|
FTextRXTX.cxx
|
w1hkj_fldigi/src/widgets/FTextRXTX.cxx
|
// ----------------------------------------------------------------------------
// FTextRXTX.cxx
//
// Copyright (C) 2007-2010
// Stelios Bounanos, M0GLD
//
// Copyright (C) 2008-2010
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <sys/stat.h>
#include <map>
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <FL/Fl_Tooltip.H>
#include "FTextView.h"
#include "main.h"
#include "trx.h"
#include "macros.h"
#include "main.h"
#include "fl_digi.h"
#include "cw.h"
#include "fileselect.h"
#include "font_browser.h"
#include "ascii.h"
#include "configuration.h"
#include "qrunner.h"
#include "mfsk.h"
#include "icons.h"
#include "globals.h"
#include "re.h"
#include "strutil.h"
#include "dxcc.h"
#include "locator.h"
#include "logsupport.h"
#include "status.h"
#include "gettext.h"
#include "arq_io.h"
#include "fl_digi.h"
#include "strutil.h"
#include "debug.h"
#include "contest.h"
#include "counties.h"
// Fl_Scrollbar wrapper to draw marks on the slider background.
// Currently only implemented for a vertical scrollbar.
class MVScrollbar : public Fl_Scrollbar
{
struct mark_t {
double pos;
Fl_Color color;
mark_t(double pos_, Fl_Color color_) : pos(pos_), color(color_) { }
};
public:
MVScrollbar(int X, int Y, int W, int H, const char* l = 0)
: Fl_Scrollbar(X, Y, W, H, l), draw_marks(false) { }
void draw(void);
void mark(Fl_Color c) { marks.push_back(mark_t(maximum() - 1.0, c)); redraw(); }
bool has_marks(void) { return !marks.empty(); }
void show_marks(bool b) { draw_marks = b; redraw(); }
void clear(void) { marks.clear(); redraw(); }
private:
std::vector<mark_t> marks;
bool draw_marks;
};
/*
RX_MENU_QRZ_THIS, RX_MENU_CALL, RX_MENU_NAME, RX_MENU_QTH,
RX_MENU_STATE, RX_MENU_COUNTY, RX_MENU_PROVINCE,
RX_MENU_COUNTRY, RX_MENU_LOC,
RX_MENU_RST_IN, RX_MENU_RST_OUT,
RX_MENU_XCHG, RX_MENU_SERIAL,
RX_MENU_CLASS, RX_MENU_SECTION,
RX_MENU_SS_SER, RX_MENU_SS_PRE, RX_MENU_SS_CHK, RX_MENU_SS_SEC,
RX_MENU_CQZONE, RX_MENU_CQSTATE,
RX_MENU_1010_NR,
RX_MENU_AGE,
RX_MENU_CHECK,
RX_MENU_NAQP,
RX_MENU_SCOUT,
RX_MENU_TROOP,
RX_MENU_POWER,
RX_MENU_QSOP_STATE,
RX_MENU_QSOP_COUNTY,
RX_MENU_QSOP_SERNO,
RX_MENU_QSOP_NAME,
RX_MENU_QSOP_XCHG,
RX_MENU_QSOP_CAT,
RX_MENU_DIV,
RX_MENU_COPY,
RX_MENU_CLEAR,
RX_MENU_SELECT_ALL,
RX_MENU_SAVE,
RX_MENU_WRAP,
RX_MENU_ALL_ENTRY,
RX_MENU_SCROLL_HINTS,
RX_MENU_NUM_ITEMS
*/
Fl_Menu_Item FTextRX::menu[] = {
{ icons::make_icon_label(_("Look up call"), net_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Call"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Name"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("QTH"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("State"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("County"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Province"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Country"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Locator"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("RST(r)"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("RST(s)"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Exchange In"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Rx Serial #"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Class"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Section"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("SS ser #"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("SS prec"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("SS check"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("SS section"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("CQ zone"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("CQ STATE"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("1010 Nr"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Kid's Age"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Round Up Chk"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("NAQP xchg"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("JOTA scout"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("JOTA troop"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("POWER(r)"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("QSOp state"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("QSOp county"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("QSOp serno"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("QSOp name"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("QSOp xchg"), enter_key_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("QSOp category"), enter_key_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Insert marker"), insert_link_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ 0 }, // VIEW_MENU_COPY
{ 0 }, // VIEW_MENU_CLEAR
{ 0 }, // VIEW_MENU_SELECT_ALL
{ 0 }, // VIEW_MENU_SAVE
{ 0 }, // VIEW_MENU_WRAP
{ _("All entries"), 0, 0, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL },
{ _("Scroll hints"), 0, 0, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL },
{ 0 }
};
/// FTextRX constructor.
/// We remove \c Fl_Text_Display_mod::buffer_modified_cb from the list of callbacks
/// because we want to scroll depending on the visibility of the last line; @see
/// changed_cb.
/// @param x
/// @param y
/// @param w
/// @param h
/// @param l
FTextRX::FTextRX(int x, int y, int w, int h, const char *l)
: FTextView(x, y, w, h, l)
{
memcpy(menu + RX_MENU_COPY, FTextView::menu, (FTextView::menu->size() - 1) * sizeof(*FTextView::menu));
context_menu = menu;
init_context_menu();
menu[RX_MENU_ALL_ENTRY].clear();
menu[RX_MENU_SCROLL_HINTS].clear();
menu[RX_MENU_WRAP].hide();
// Replace the scrollbar widget
MVScrollbar* mvsb = new MVScrollbar(mVScrollBar->x(), mVScrollBar->y(),
mVScrollBar->w(), mVScrollBar->h(), NULL);
mvsb->show_marks(false);
mvsb->callback(mVScrollBar->callback(), mVScrollBar->user_data());
remove(mVScrollBar);
delete mVScrollBar;
Fl_Group::add(mVScrollBar = mvsb);
mFastDisplay = 1;
num_words = 1;
}
FTextRX::~FTextRX()
{
}
/// Handles fltk events for this widget.
/// We only care about mouse presses (to display the popup menu and prevent
/// pasting) and keyboard events (to make sure no text can be inserted).
/// Everything else is passed to the base class handle().
///
/// @param event
///
/// @return
///
int FTextRX::handle(int event)
{
static Fl_Cursor cursor;
switch (event) {
case FL_DRAG:
if (Fl::event_button() != FL_LEFT_MOUSE)
return 1;
break;
case FL_PUSH:
if (!Fl::event_inside(this))
break;
switch (Fl::event_button()) {
case FL_LEFT_MOUSE:
if (progdefaults.rxtext_clicks_qso_data) {
if (handle_clickable(Fl::event_x() - x(), Fl::event_y() - y()))
return 1;
if (handle_qso_data(Fl::event_x() - x(), Fl::event_y() - y()))
return 1;
}
goto out;
case FL_MIDDLE_MOUSE:
if (cursor != FL_CURSOR_HAND) {
if (handle_qso_data(Fl::event_x() - x(), Fl::event_y() - y())) {
return 1;
}
}
goto out;
case FL_RIGHT_MOUSE:
handle_context_menu();
return 1;
default:
goto out;
}
break;
case FL_RELEASE:
break;
case FL_MOVE: {
int p = xy_to_position(Fl::event_x(), Fl::event_y(), Fl_Text_Display_mod::CURSOR_POS);
if ((unsigned char)sbuf->byte_at(p) >= CLICK_START + FTEXT_DEF) {
if (cursor != FL_CURSOR_HAND)
window()->cursor(cursor = FL_CURSOR_HAND);
return 1;
}
else
cursor = FL_CURSOR_INSERT;
break;
}
// catch some text-modifying events that are not handled by kf_* functions
case FL_KEYBOARD:
break;
case FL_PASTE:
return 0;
case FL_ENTER:
if (!progdefaults.rxtext_tooltips || Fl_Tooltip::delay() == 0.0f)
break;
tooltips.enabled = Fl_Tooltip::enabled();
tooltips.delay = Fl_Tooltip::delay();
Fl_Tooltip::enable(1);
Fl_Tooltip::delay(0.0f);
Fl::add_timeout(tooltips.delay / 2.0, dxcc_tooltip, this);
break;
case FL_LEAVE:
window()->cursor(FL_CURSOR_DEFAULT);
if (!progdefaults.rxtext_tooltips || Fl_Tooltip::delay() != 0.0f)
break;
Fl_Tooltip::enable(tooltips.enabled);
Fl_Tooltip::delay(tooltips.delay);
Fl::remove_timeout(dxcc_tooltip, this);
break;
}
out:
return FTextView::handle(event);
}
/// Adds a char to the buffer
///
/// @param c The character
/// @param attr The attribute (@see enum text_attr_e); RECV if omitted.
///
void FTextRX::add(unsigned int c, int attr)
{
if (c == '\r')
return;
char s[] = { '\0', '\0', char( FTEXT_DEF + attr ), '\0' };
const char *cp = &s[0];
// The user may have moved the cursor by selecting text or
// scrolling. Place it at the end of the buffer.
if (mCursorPos != tbuf->length())
insert_position(tbuf->length());
switch (c) {
case '\b':
// we don't call kf_backspace because it kills selected text
if (s_text.length()) {
int character_start = tbuf->utf8_align(tbuf->length() - 1);
int character_length = fl_utf8len1(tbuf->byte_at(character_start));
tbuf->remove(character_start, tbuf->length());
sbuf->remove(character_start, sbuf->length());
s_text.resize(s_text.length() - character_length);
s_style.resize(s_style.length() - character_length);
}
break;
case '\n':
// maintain the scrollback limit, if we have one
if (max_lines > 0 && tbuf->count_lines(0, tbuf->length()) >= max_lines) {
int le = tbuf->line_end(0) + 1; // plus 1 for the newline
tbuf->remove(0, le);
sbuf->remove(0, le);
}
s_text.clear();
s_style.clear();
insert("\n");
sbuf->append(s + 2);
break;
default:
if ((c < ' ' || c == 127) && attr != CTRL) // look it up
cp = ascii[(unsigned char)c];
else // insert verbatim
s[0] = c;
for (int i = 0; cp[i]; ++i) {
s_text += cp[i];
s_style += s[2];
}
fl_font( textfont(), textsize() );
int lwidth = (int)fl_width( s_text.c_str(), s_text.length());
bool wrapped = false;
if ( lwidth >= (text_area.w - mVScrollBar->w() - LEFT_MARGIN - RIGHT_MARGIN)) {
if (c != ' ') {
size_t p = s_text.rfind(' ');
if (p != std::string::npos) {
s_text.erase(0, p+1);
s_style.erase(0, p+1);
if (s_text.length() < 10) { // wrap and delete trailing space
tbuf->remove(tbuf->length() - s_text.length(), tbuf->length());
sbuf->remove(sbuf->length() - s_style.length(), sbuf->length());
insert("\n"); // always insert new line
sbuf->append(s + 2);
insert(s_text.c_str());
sbuf->append(s_style.c_str());
wrapped = true;
}
}
}
if (!wrapped) { // add a new line if not wrapped
insert("\n");
sbuf->append(s + 2);
s_text.clear();
s_style.clear();
if (c != ' ') { // add character if not a space (no leading spaces)
for (int i = 0; cp[i]; ++i) {
sbuf->append(s + 2);
s_style.append(s + 2);
}
s_text.append(cp);
insert(cp);
}
}
} else {
for (int i = 0; cp[i]; ++i)
sbuf->append(s + 2);
insert(cp);
}
break;
}
// test for bottom of text visibility
if (// !mFastDisplay &&
(mVScrollBar->value() >= mNBufferLines - mNVisibleLines + mVScrollBar->linesize() - 1))
show_insert_position();
}
void FTextRX::set_all_entry(bool b)
{
if (b)
menu[RX_MENU_ALL_ENTRY].set();
else
menu[RX_MENU_ALL_ENTRY].clear();
}
void FTextRX::set_scroll_hints(bool b)
{
if (b)
menu[RX_MENU_SCROLL_HINTS].set();
else
menu[RX_MENU_SCROLL_HINTS].clear();
static_cast<MVScrollbar*>(mVScrollBar)->show_marks(b);
}
void FTextRX::mark(FTextBase::TEXT_ATTR attr)
{
if (attr == NATTR)
attr = CLICK_START;
static_cast<MVScrollbar*>(mVScrollBar)->mark(styles[attr].color);
}
void FTextRX::clear(void)
{
FTextBase::clear();
s_text.clear();
s_style.clear();
static_cast<MVScrollbar*>(mVScrollBar)->clear();
}
void FTextRX::setFont(Fl_Font f, int attr)
{
FTextBase::setFont(f, attr);
}
int FTextRX::handle_clickable(int x, int y)
{
int pos;
unsigned int style;
pos = xy_to_position(x + this->x(), y + this->y(), CURSOR_POS);
// return unless clickable style
if ((style = (unsigned char)sbuf->byte_at(pos)) < CLICK_START + FTEXT_DEF)
return 0;
int start, end;
for (start = pos-1; start >= 0; start--)
if ((unsigned char)sbuf->byte_at(start) != style)
break;
start++;
int len = sbuf->length();
for (end = pos+1; end < len; end++)
if ((unsigned char)sbuf->byte_at(end) != style)
break;
switch (style - FTEXT_DEF) {
case QSY:
handle_qsy(start, end);
return 1;
break;
// ...
default:
break;
}
return 0;
}
void FTextRX::handle_qsy(int start, int end)
{
char* text = tbuf->text_range(start, end);
extern std::map<std::string, qrg_mode_t> qrg_marks;
std::map<std::string, qrg_mode_t>::const_iterator i;
if ((i = qrg_marks.find(text)) != qrg_marks.end()) {
const qrg_mode_t& m = i->second;
if (active_modem->get_mode() != m.mode)
init_modem_sync(m.mode);
qsy(m.rfcarrier, m.carrier);
}
free(text);
}
static fre_t rst("^[1-5][123456789nN]{2}$", REG_EXTENDED | REG_NOSUB);
static fre_t loc("[a-r]{2}[[:digit:]]{2}([a-x]{2})?", REG_EXTENDED | REG_ICASE);
static fre_t call("([[:alnum:]]?[[:alpha:]/]+[[:digit:]]+[[:alnum:]/]+)", REG_EXTENDED);
void set_cbo_county(std::string str)
{
inpCounty->value(str.c_str());
inpSQSO_county1->value(str.c_str());
inpSQSO_county2->value(str.c_str());
Cstates st;
if (inpState->value()[0])
cboCountyQSO->value(
std::string(st.state_short(inpState->value())).append(" ").
append(st.county(inpState->value(), inpCounty->value())).c_str());
else
cboCountyQSO->clear_entry();
cboCountyQSO->redraw();
}
void set_QSO_call(const char *s)
{
if (progdefaults.clear_fields)
clearQSO();
std::string call = ucasestr(s);
inpCall1->value(call.c_str());
inpCall2->value(call.c_str());
inpCall3->value(call.c_str());
inpCall4->value(call.c_str());
if (progStatus.timer && (Fl::event() != FL_HIDE))
stopMacroTimer();
sDate_on = sDate_off = zdate();
sTime_on = sTime_off = ztime();
inpTimeOn->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn1->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn2->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn3->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn4->value(inpTimeOff->value(), inpTimeOff->size());
inpTimeOn5->value(inpTimeOff->value(), inpTimeOff->size());
updateOutSerNo();
}
void set_cbo_Country(std::string c)
{
cboCountryQSO->value(c.c_str());
cboCountryAICW2->value(c.c_str());
cboCountryAIDX2->value(c.c_str());
cboCountryCQDX2->value(c.c_str());
cboCountryCQ2->value(c.c_str());
cboCountryIARI2->value(c.c_str());
cboCountryRTU2->value(c.c_str());
// cboCountryWAE2->value(c.c_str());
if (progdefaults.logging == LOG_JOTA)
inp_JOTA_spc->value(c.c_str());
if (progdefaults.logging == LOG_ARR)
inpXchgIn->value(c.c_str());
}
void set_zone(std::string z)
{
inp_CQDXzone1->value(z.c_str());
inp_CQDXzone2->value(z.c_str());
inp_CQzone1->value(z.c_str());
inp_CQzone2->value(z.c_str());
}
void set_name(std::string nm)
{
inpName->value(nm.c_str());
inpName1->value(nm.c_str());
inpName2->value(nm.c_str());
inp_1010_name2->value(nm.c_str());
inp_ARR_Name2->value(nm.c_str());
inpNAQPname2->value(nm.c_str());
inp_ASCR_name2->value(nm.c_str());
}
void set_rst_in(std::string rst)
{
for (size_t n = 0; n < rst.length(); n++)
if (rst[n] == 'N' || rst[n] == 'n') rst[n] = '9';
inpRstIn->value(rst.c_str());
inpRTU_RSTin2->value(rst.c_str());
inpRstIn1->value(rst.c_str());
inpRstIn2->value(rst.c_str());
inpRstIn3->value(rst.c_str());
inpRstIn4->value(rst.c_str());
inpRstIn_AICW2->value(rst.c_str());
inpRstIn_SQSO2->value(rst.c_str());
inpRstIn_WPX2->value(rst.c_str());
inp_IARI_RSTin2->value(rst.c_str());
// inpRstIn_WAE2->value(rst.c_str());
}
void set_rst_out(std::string rst)
{
for (size_t n = 0; n < rst.length(); n++)
if (rst[n] == 'N' || rst[n] == 'n') rst[n] = '9';
inpRstOut->value(rst.c_str());
inpRstOut1->value(rst.c_str());
inpRstOut2->value(rst.c_str());
inpRstOut3->value(rst.c_str());
inpRstOut4->value(rst.c_str());
inpRstOut_AICW2->value(rst.c_str());
inpRstOut_SQSO2->value(rst.c_str());
inpRstOut_WPX2->value(rst.c_str());
inp_IARI_RSTout2->value(rst.c_str());
// inpRstOut_WAE2->value(rst.c_str());
}
void set_rst(std::string rst)
{
if (inpRstIn->value()[0] == 0)
set_rst_in(rst);
else
set_rst_out(rst);
}
void set_state(std::string s)
{
s = ucasestr(s);
inpState->value(s.c_str());
inpState1->value(s.c_str());
inp_CQstate1->value(s.c_str());
inp_CQstate2->value(s.c_str());
inp_KD_state1->value(s.c_str());
inp_KD_state2->value(s.c_str());
inpSQSO_state1->value(s.c_str());
inpSQSO_state2->value(s.c_str());
}
void set_province(std::string pr)
{
pr = ucasestr(pr);
inpVEprov->value(pr.c_str());
inp_KD_VEprov1->value(pr.c_str());
inp_KD_VEprov2->value(pr.c_str());
}
void set_serno_in(std::string s)
{
inpSerNo->value(s.c_str());
inpSerNo1->value(s.c_str());
inpSerNo2->value(s.c_str());
inpSerNo3->value(s.c_str());
inpSerNo4->value(s.c_str());
inpSerNo_WPX1->value(s.c_str());
inpSerNo_WPX2->value(s.c_str());
inpRTU_serno1->value(s.c_str());
inpRTU_serno2->value(s.c_str());
inpSQSO_serno1->value(s.c_str());
inpSQSO_serno2->value(s.c_str());
inp_IARI_SerNo1->value(s.c_str());
inp_IARI_SerNo2->value(s.c_str());
// inpSerNo_WAE1->value(s.c_str());
// inpSerNo_WAE2->value(s.c_str());
}
void parseSQSO(std::string str)
{
if (std::string(QSOparties.qso_parties[progdefaults.SQSOcontest].state) == "7QP" &&
str.length() == 5 && !inpState->value()[0]) {
set_state(str.substr(0,2).c_str());
set_cbo_county(str);
return;
}
if (std::string(QSOparties.qso_parties[progdefaults.SQSOcontest].state) == "6NE" &&
str.length() == 5 && !inpState->value()[0]) {
set_state(str.substr(str.length() - 2, 2).c_str());
set_cbo_county(str);
return;
}
if (progdefaults.SQSOinstate) {
if (state_test(str)) {
set_state(str);
return;
}
}
std::string st = inpState->value();
std::string inState = QSOparties.qso_parties[progdefaults.SQSOcontest].state;
if (st == "6NE" || st == "7QP") {
st.clear();
} else if (st.empty())
st = inState;
bool chkC = check_field(str, cCNTY, st);
bool chkP = check_field(str, cDIST, st);
bool chkCin = check_field(str, cCNTY, inState);
bool chkPin = check_field(str, cDIST, inState);
if ( QSOparties.qso_parties[progdefaults.SQSOcontest].st &&
!st.empty() &&
progdefaults.SQSOlogcounty &&
(chkC || chkP) ) {
if (progdefaults.SQSOinstate && !inpState->value()[0])
set_state(st);
set_cbo_county(states.cnty_short(st, str));
return;
}
if ((chkCin || chkPin) && inpCounty->value()[0] == 0) {
set_state(st.c_str());
set_cbo_county(states.cnty_short(st, str));
return;
}
if (progdefaults.SQSOlogstate &&
check_field(str, cSTATE) && !inpState->value()[0]) {
set_state(str);
return;
}
if (progdefaults.SQSOlogstate &&
check_field(str, cVE_PROV) && !inpState->value()[0]) {
set_state(str);
return;
}
if (section_test(str) && !inpState->value()[0]) {
set_state(str);
return;
}
if (check_field(str, cCOUNTRY)) {
cboCountry->value(country_match.c_str());
return;
}
if (progdefaults.SQSOlogserno && check_field(str, cNUMERIC) && !inpSerNo->value()[0]) {
set_serno_in(str);
return;
}
{
bool bCAT = (QSOparties.qso_parties[progdefaults.SQSOcontest].cat[0]);
std::string category = ucasestr(str);
if (bCAT &&
(category == "CLB" || category == "MOB" || category == "QRP" || category == "STD")) {
inpSQSO_category->value(category.c_str());
return;
}
}
if (!inpName->value()[0] && !isdigit(str[0])
&& !chkC && !chkP && !chkCin && !chkPin) {
set_name(str);
return;
}
if (check_field(str, cRST) ) {
set_rst(str);
}
}
// capture 1, 2, or 3 sequential words from RX text
// 1 - left click on word
// 2 - shift-left click on first word
// 3 - ctrl-left click on first word
// 4 - shift-ctrl-left click on first word
int FTextRX::handle_qso_data(int start, int end)
{
if (start < 0 || end < 0) return 0;
num_words = 1;
if (Fl::event_state() & FL_SHIFT) {
num_words = 2;
}
if (Fl::event_state() & FL_CTRL) {
num_words = 3;
if (Fl::event_state() & FL_SHIFT) {
num_words = 4;
}
}
char *sz = get_word(start, end, progdefaults.nonwordchars.c_str(), num_words);
if (!sz)
return 0;
std::string sz_str = sz;
free(sz);
if (sz_str.empty())
return 0;
while (sz_str[sz_str.length() -1] <= ' ') sz_str.erase(sz_str.length() - 1);
// remove leading substrings such as 'loc:' 'qth:' 'op:' etc
size_t sp = std::string::npos;
if ((sp = sz_str.find(":")) != std::string::npos)
sz_str.erase(0, sp+1);
if (sz_str.empty())
return 0;
char* s = (char *)sz_str.c_str();
char* p = (char *)sz_str.c_str();
if (progdefaults.logging != LOG_QSO) {
if (loc.match(s)) { // force maidenhead match to exchange
// or it will overwrite the call
inpXchgIn->position(inpXchgIn->size());
if (inpXchgIn->size()) inpXchgIn->insert(" ", 1);
if (progdefaults.logging == LOG_VHF) {
inpLoc->value(s);
DupCheck();
} else {
inpXchgIn->insert(s);
log_callback(inpXchgIn);
DupCheck();
}
} else if (call.match(s)) { // point p to substring
const regmatch_t& offsets = call.suboff()[1];
p = s + offsets.rm_so;
*(s + offsets.rm_eo) = '\0';
set_QSO_call(p);
Fl::copy(p, strlen(p), 1); // copy to clipboard
if (std::string(QSOparties.qso_parties[progdefaults.SQSOcontest].state) == "6NE") {
set_state("");
}
const dxcc *e = dxcc_lookup(p);
if (e) {
std::ostringstream zone;
zone << e->cq_zone;
set_zone(zone.str());
std::string cntry = e->country;
if (cntry.find("United States") != std::string::npos)
cntry = "USA";
set_cbo_Country(cntry);
}
DupCheck();
} else {
std::string str = ucasestr(s);
if (cut_numeric_test(str)) str = cut_to_numeric(str);
switch (progdefaults.logging) {
case LOG_FD:
if (check_field(str, cFD_SECTION) && !inpSection->value()[0]) {
inpSection->value(str.c_str());
break;
}
if (check_field(str, cFD_CLASS) && !inpClass->value()[0]) {
inpClass->value(str.c_str());
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
break;
case LOG_WFD:
if (check_field(str, cFD_SECTION) && !inpSection->value()[0]) {
inpSection->value(str.c_str());
break;
}
if (check_field(str, cWFD_CLASS) && !inpClass->value()[0]) {
inpClass->value(str.c_str());
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
break;
case LOG_CQWW_DX:
if (check_field(str, cCOUNTRY)) {
set_cbo_Country(country_match);
break;
}
if (check_field(str, cNUMERIC) && !inp_CQzone->value()[0]) {
set_zone(str);
break;
}
if (check_field(str, cRST)) {
if (!inpRstIn->value()[0])
set_rst_in(str);
else if (!inpRstOut->value()[0])
set_rst_out(str);
}
break;
case LOG_CQWW_RTTY :
if ( (check_field(str, cSTATE) || check_field(str, cVE_PROV)) &&
!inp_CQstate->value()[0] ) {
inp_CQstate->value(str.c_str());
break;
}
if (check_field(str, cCOUNTRY)) {
set_cbo_Country(country_match);
break;
}
if (check_field(str, cNUMERIC) && !inp_CQzone->value()[0]) {
set_zone(str);
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
break;
case LOG_KD:
if (!check_field(str, cNUMERIC) && inpName->value()[0] == 0) {
set_name(s);
break;
}
if (!check_field(str, cRST) &&
check_field(str, cNUMERIC) &&
inp_KD_age->value()[0] == 0) {
inp_KD_age->value(str.c_str());
break;
}
if (check_field(str, cSTATE) && !inpState->value()[0]) {
set_state(str);
break;
}
if (check_field(str, cVE_PROV) && !inpVEprov->value()[0]) {
set_province(str);
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
if (!inpXchgIn->value()[0]) {
inpXchgIn->position(inpXchgIn->size());
if (inpXchgIn->size())
inpXchgIn->insert(" ", 1);
inpXchgIn->insert(str.c_str());
}
break;
case LOG_ASCR:
if (check_field(str, cASCR_CLASS) && !inpClass->value()[0]) {
inpClass->value(str.c_str());
break;
}
if (check_field(str, cSTATE) && !inpXchgIn->value()[0]) {
inpXchgIn->value(str.c_str());
break;
}
if (check_field(str, cVE_PROV) && !inpXchgIn->value()[0]) {
inpXchgIn->value(str.c_str());
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
if (!inpName->value()[0]) {
set_name(s);
break;
}
inpXchgIn->value(s);
break;
case LOG_ARR: // rookie roundup
if (check_field(str, cRST)) {
set_rst(str);
break;
}
if (check_field(s, cROOKIE) && !inp_ARR_check->value()[0]) {
if (strlen(s) > 2)
inp_ARR_check->value(s + 2);
else
inp_ARR_check->value(s);
break;
}
if (!inpName->value()[0]) {
set_name(s);
break;
}
if (check_field(str, cCHECK) && !inpXchgIn->value()[0]) {
inpXchgIn->value(str.c_str());
break;
}
if (!inpXchgIn->value()[0]) {
inpXchgIn->value(s);
break;
}
break;
case LOG_AICW:
if (check_field(str, cCOUNTRY)) {
set_cbo_Country(country_match);
break;
}
if (check_field(str, cNUMERIC) && !inpSPCnum->value()[0]) {
inpSPCnum->value(str.c_str());
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
break;
case LOG_1010:
if (check_field(str, c1010) && !inp_1010_nr->value()[0]) {
inp_1010_nr->value(str.c_str());
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
if (check_field(str, cSTATE) && !inpXchgIn->value()[0]) {
inpXchgIn->value(str.c_str());
break;
}
if (check_field(str, cVE_PROV) && !inpXchgIn->value()[0]) {
inpXchgIn->value(str.c_str());
break;
}
if (!inpName->value()[0]) {
set_name(s);
break;
}
inpXchgIn->value(s);
break;
case LOG_NAQP:
if (!inpName->value()[0]) {
set_name(s);
break;
} else if (!inpSPCnum->value()[0]) {
inpSPCnum_NAQP1->value(s);
inpSPCnum_NAQP2->value(s);
inpXchgIn1->value(s);
inpXchgIn2->value(s);
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
break;
case LOG_CWSS:
if (check_field(str, cSS_SEC) && !inp_SS_Section->value()[0]) {
inp_SS_Section->value(str.c_str());
break;
}
if (cut_numeric_test(str) && !inpSerNo->value()[0]) {
set_serno_in(str);
break;
}
if (check_field(str, cSS_PREC) && !inp_SS_Precedence->value()[0]) {
inp_SS_Precedence->value(s);
break;
}
if (check_field(str, cSS_CHK) && !inp_SS_Check->value()[0]) {
inp_SS_Check->value(str.c_str());
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
break;
case LOG_CQ_WPX:
if (cut_numeric_test(str) && !inpSerNo->value()[0]) {
set_serno_in(str);
break;
}
if (check_field(str, cCOUNTRY)) {
set_cbo_Country(country_match);
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
break;
case LOG_RTTY: // ARRL RTTY Round Up
if (check_field(str, cSTATE) || check_field(str, cVE_PROV)) {
set_state(str);
break;
}
if (check_field(str, cCOUNTRY)) {
set_cbo_Country(country_match);
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
if (cut_numeric_test(str) && !inpSerNo->value()[0]) {
set_serno_in(str);
break;
}
break;
case LOG_IARI:
if (check_field(str, cITALIAN)) {
inp_IARI_PR1->value(ucasestr(str).c_str());
inp_IARI_PR2->value(ucasestr(str).c_str());
break;
}
if (check_field(str, cCOUNTRY)) {
set_cbo_Country(country_match);
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
if (cut_numeric_test(str) && !inpSerNo->value()[0]) {
set_serno_in(str);
break;
}
break;
case LOG_NAS:
if (cut_numeric_test(str) && !inpSerNo->value()[0]) {
set_serno_in(str);
break;
}
if (check_field(str, cSTATE) && !inpXchgIn->value()[0]) {
inpXchgIn->value(str.c_str());
break;
}
if (check_field(str, cVE_PROV) && !inpXchgIn->value()[0]) {
inpXchgIn->value(str.c_str());
break;
}
if (check_field(str, cCOUNTRY) && !inpXchgIn->value()[0]) {
set_cbo_Country(str);
inpXchgIn->value(str.c_str());
break;
}
if (inpName->value()[0] == 0 && !inpName->value()[0]) {
set_name(str);
break;
}
if (check_field(s, cRST)) {
set_rst(s);
break;
}
break;
case LOG_AIDX:
if (check_field(str, cNUMERIC) && !inpSerNo->value()[0]) {
set_serno_in(str);
break;
}
if (check_field(str, cCOUNTRY) && !inpXchgIn->value()[0]) {
set_cbo_Country(str);
inpXchgIn->value(str.c_str());
break;
}
if (check_field(str, cRST)) {
set_rst(str);
break;
}
break;
case LOG_JOTA:
if (check_field(str, cRST)) {
set_rst(str);
break;
}
if (cut_numeric_test(str) && !inp_JOTA_troop->value()[0]) {
inp_JOTA_troop->value(str.c_str());
break;
}
if (check_field(str, cSTATE)) {
set_state(str);
break;
}
if (check_field(str, cVE_PROV)) {
set_province(str);
break;
}
if (check_field(str, cCOUNTRY)) {
set_cbo_Country(str);
inpXchgIn->value(str.c_str());
break;
}
inp_JOTA_scout->value(str.c_str());
break;
// case LOG_WAE:
// if (!inpSerNo->value()[0] && check_field(str, cNUMERIC)) {
// set_serno_in(str);
// break;
// }
// if (check_field(str, cCOUNTRY)) {
// cboCountryCQ1->value(country_match.c_str());
// cboCountryCQ2->value(country_match.c_str());
// cboCountry->value(country_match.c_str());
// }
// if (check_field(s, cRST)) {
// set_rst(s);
// break;
// }
// break;
case LOG_VHF:
if (check_field(str, cRST))
set_rst(str);
break;
case LOG_SQSO:
parseSQSO(str);
break;
case LOG_BART:
// CALL, NAME, SERIAL, EXCHANGE
if (!cut_numeric_test(s) && !inpName->value()[0]) {
set_name(p);
break;
} else if (cut_numeric_test(str) && !inpSerNo->value()[0]) {
set_serno_in(str);
break;
}
case LOG_GENERIC:
default:
// EXCHANGE
inpXchgIn->position(inpXchgIn->size());
if (inpXchgIn->size()) inpXchgIn->insert(" ", 1);
if (cut_numeric_test(str))
inpXchgIn->insert(str.c_str());
else
inpXchgIn->insert(s);
log_callback(inpXchgIn);
}
}
DupCheck();
restoreFocus(91);
return 1;
} else {
if (loc.match(s) && inpCall->value()[0]) {
inpLoc->value(p);
log_callback(inpLoc);
restoreFocus();
DupCheck();
return 1;
} else if (call.match(s)) { // point p to substring
const regmatch_t& offsets = call.suboff()[1];
p = s + offsets.rm_so;
*(s + offsets.rm_eo) = '\0';
Fl::copy(p, strlen(p), 1); // copy to clipboard
set_QSO_call(p);
log_callback(inpCall);
restoreFocus();
return 1;
} else if (rst.match(s)) {
set_rst(s);
restoreFocus();
return 1;
} else if (!inpName->value()[0]) {
set_name(p);
restoreFocus();
return 1;
} else if (!inpQTH->value()[0]) {
inpQTH->value(p);
log_callback(inpQTH);
restoreFocus();
return 1;
} else if (!inpState->value()[0]) {
set_state(p);
log_callback(inpState);
restoreFocus();
DupCheck();
return 1;
}
}
return 0;
}
void FTextRX::handle_context_menu(void)
{
bool contest_ui = (progdefaults.logging != LOG_QSO);
num_words = 1;
if (Fl::event_state() & FL_SHIFT) {
num_words = 2;
}
if (Fl::event_state() & FL_CTRL) {
num_words = 3;
if (Fl::event_state() & FL_SHIFT) {
num_words = 4;
}
}
unsigned shown[RX_MENU_NUM_ITEMS];
for (int i = 0; i < RX_MENU_NUM_ITEMS; shown[i++] = 0); // all hidden
#define show_item(x_) (shown[x_] = 1)
#define hide_item(x_) (shown[x_] = 0)
#define test_item(x_) (shown[x_] == 1)
show_item(RX_MENU_CALL);
if (contest_ui) {
switch (progdefaults.logging) {
case LOG_FD:
case LOG_WFD:
show_item(RX_MENU_CLASS);
show_item(RX_MENU_SECTION);
break;
case LOG_CQ_WPX:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_CQZONE);
show_item(RX_MENU_COUNTRY);
show_item(RX_MENU_SERIAL);
break;
case LOG_CQWW_DX:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_CQZONE);
show_item(RX_MENU_COUNTRY);
break;
case LOG_CQWW_RTTY:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_CQZONE);
show_item(RX_MENU_CQSTATE);
show_item(RX_MENU_COUNTRY);
break;
case LOG_ASCR:
show_item(RX_MENU_NAME);
show_item(RX_MENU_CLASS);
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_XCHG);
break;
case LOG_VHF:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_LOC);
break;
case LOG_CWSS:
show_item(RX_MENU_SS_SER);
show_item(RX_MENU_SS_PRE);
show_item(RX_MENU_SS_CHK);
show_item(RX_MENU_SS_SEC);
show_item(RX_MENU_RST_IN);
break;
case LOG_1010:
show_item(RX_MENU_NAME);
show_item(RX_MENU_1010_NR);
show_item(RX_MENU_XCHG);
break;
case LOG_ARR:
show_item(RX_MENU_NAME);
show_item(RX_MENU_CHECK);
show_item(RX_MENU_XCHG);
break;
case LOG_AICW:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_POWER);
show_item(RX_MENU_COUNTRY);
break;
case LOG_KD:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_NAME);
show_item(RX_MENU_AGE);
show_item(RX_MENU_STATE);
show_item(RX_MENU_PROVINCE);
show_item(RX_MENU_XCHG);
break;
case LOG_NAS:
show_item(RX_MENU_NAME);
show_item(RX_MENU_SERIAL);
show_item(RX_MENU_STATE);
show_item(RX_MENU_PROVINCE);
show_item(RX_MENU_COUNTRY);
break;
case LOG_AIDX:
show_item(RX_MENU_SERIAL);
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_COUNTRY);
break;
case LOG_NAQP:
show_item(RX_MENU_NAME);
show_item(RX_MENU_NAQP);
break;
case LOG_RTTY:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_STATE);
show_item(RX_MENU_COUNTRY);
show_item(RX_MENU_SERIAL);
break;
case LOG_IARI:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_COUNTRY);
show_item(RX_MENU_PROVINCE);
show_item(RX_MENU_SERIAL);
break;
case LOG_JOTA:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_SCOUT);
show_item(RX_MENU_TROOP);
show_item(RX_MENU_STATE);
show_item(RX_MENU_PROVINCE);
show_item(RX_MENU_COUNTRY);
break;
case LOG_SQSO:
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
show_item(RX_MENU_QSOP_STATE);
show_item(RX_MENU_QSOP_COUNTY);
show_item(RX_MENU_QSOP_SERNO);
show_item(RX_MENU_QSOP_NAME);
show_item(RX_MENU_QSOP_CAT);
break;
// case LOG_WAE:
// show_item(RX_MENU_RST_IN);
// show_item(RX_MENU_RST_OUT);
// show_item(RX_MENU_SERIAL);
// show_item(RX_MENU_COUNTRY);
// break;
case LOG_BART:
show_item(RX_MENU_NAME);
show_item(RX_MENU_SERIAL);
show_item(RX_MENU_XCHG);
show_item(RX_MENU_RST_IN);
break;
case LOG_GENERIC:
default:
show_item(RX_MENU_SERIAL);
show_item(RX_MENU_XCHG);
show_item(RX_MENU_RST_IN);
break;
}
}
else {
show_item(RX_MENU_NAME);
show_item(RX_MENU_QTH);
show_item(RX_MENU_RST_IN);
show_item(RX_MENU_RST_OUT);
// "Look up call" shown only in non-contest mode
if (progdefaults.QRZWEB != QRZWEBNONE || progdefaults.QRZXML != QRZXMLNONE)
show_item(RX_MENU_QRZ_THIS);
menu[RX_MENU_CALL].flags |= FL_MENU_DIVIDER;
}
if (menu[RX_MENU_ALL_ENTRY].value()) {
for (size_t i = RX_MENU_NAME; i <= RX_MENU_RST_OUT; i++)
show_item(i);
menu[RX_MENU_CALL].flags &= ~FL_MENU_DIVIDER;
}
if (static_cast<MVScrollbar*>(mVScrollBar)->has_marks())
menu[RX_MENU_SCROLL_HINTS].show();
else
menu[RX_MENU_SCROLL_HINTS].hide();
for (size_t i = RX_MENU_QRZ_THIS; i < RX_MENU_DIV; i++) {
if (test_item(i))
menu[i].show();
else
menu[i].hide();
}
#undef show_item
#undef hide_item
#undef test_item
// availability of editing items depend on buffer state
icons::set_active(&menu[RX_MENU_COPY], tbuf->selected());
icons::set_active(&menu[RX_MENU_CLEAR], tbuf->length());
icons::set_active(&menu[RX_MENU_SELECT_ALL], tbuf->length());
icons::set_active(&menu[RX_MENU_SAVE], tbuf->length());
if (wrap)
menu[RX_MENU_WRAP].set();
else
menu[RX_MENU_WRAP].clear();
show_context_menu();
}
/// The context menu handler
///
/// @param val
///
void FTextRX::menu_cb(size_t item)
{
Fl_Input2* input = 0;
std::string s;
char* str = get_word(popx, popy, "", 1, false);
if (str) {
s = str;
free(str);
}
// remove leading substrings such as 'loc:' 'qth:' 'op:' etc
size_t sp = std::string::npos;
if ((sp = s.find(":")) != std::string::npos)
s.erase(0, sp+1);
if (!s.empty())
while (s[s.length() -1] <= ' ') s.erase(s.length() - 1);
if (s.empty()) {
switch (item) {
case RX_MENU_CLEAR:
clear();
break;
case RX_MENU_SELECT_ALL:
tbuf->select(0, tbuf->length());
break;
case RX_MENU_SAVE:
saveFile();
break;
case RX_MENU_ALL_ENTRY:
menu[item].flags ^= FL_MENU_VALUE;
if (menu[item].value())
handle_context_menu();
break;
case RX_MENU_WRAP:
set_word_wrap(!wrap, true);
break;
case RX_MENU_DIV:
note_qrg(false, "\n", "\n");
break;
case RX_MENU_SCROLL_HINTS:
menu[item].flags ^= FL_MENU_VALUE;
static_cast<MVScrollbar*>(mVScrollBar)->show_marks(menu[item].value());
break;
default: ;
}
return;
}
switch (item) {
case RX_MENU_QRZ_THIS:
menu_cb(RX_MENU_CALL);
extern void CALLSIGNquery();
CALLSIGNquery();
break;
case RX_MENU_CALL:
input = inpCall;
break;
case RX_MENU_NAME:
input = inpName;
break;
case RX_MENU_QTH:
input = inpQTH;
break;
case RX_MENU_STATE:
if (progdefaults.logging == LOG_NAS)
input = inpXchgIn;
else if (progdefaults.logging == LOG_JOTA)
input = inp_JOTA_spc;
else
input = inpState;
break;
case RX_MENU_LOC:
input = inpLoc;
break;
case RX_MENU_RST_IN:
input = inpRstIn;
break;
case RX_MENU_RST_OUT:
input = inpRstOut;
break;
case RX_MENU_SERIAL:
if (progdefaults.logging == LOG_IARI)
input = inpXchgIn;
else
input = inpSerNo;
break;
case RX_MENU_XCHG:
input = inpXchgIn;
break;
case RX_MENU_POWER:
input = inpSPCnum;
break;
case RX_MENU_CLASS:
input = inpClass;
break;
case RX_MENU_SECTION:
input = inpSection;
break;
case RX_MENU_SS_SER:
input = inp_SS_SerialNoR;
break;
case RX_MENU_SS_PRE:
input = inp_SS_Precedence;
break;
case RX_MENU_SS_CHK:
input = inp_SS_Check;
break;
case RX_MENU_SS_SEC:
input = inp_SS_Section;
break;
case RX_MENU_CQZONE:
input = inp_CQzone;
break;
case RX_MENU_CQSTATE:
input = inp_CQstate;
break;
case RX_MENU_1010_NR:
input = inp_1010_nr;
break;
case RX_MENU_AGE:
input = inp_KD_age;
break;
case RX_MENU_CHECK:
input = inp_ARR_check;
break;
case RX_MENU_NAQP:
input = inpSPCnum;
break;
case RX_MENU_SCOUT:
input = inp_JOTA_scout;
break;
case RX_MENU_TROOP:
input = inp_JOTA_troop;
break;
case RX_MENU_QSOP_STATE:
input = inpState;
break;
case RX_MENU_QSOP_COUNTY:
input = inpCounty;
break;
case RX_MENU_QSOP_SERNO:
input = inpSerNo;
break;
case RX_MENU_QSOP_NAME:
input = inpName;
break;
case RX_MENU_QSOP_XCHG:
input = inpXchgIn;
break;
case RX_MENU_QSOP_CAT:
input = inpXchgIn;
break;
case RX_MENU_DIV:
note_qrg(false, "\n", "\n");
break;
case RX_MENU_COPY:
kf_copy(Fl::event_key(), this);
break;
case RX_MENU_CLEAR:
clear();
break;
case RX_MENU_SELECT_ALL:
tbuf->select(0, tbuf->length());
break;
case RX_MENU_SAVE:
saveFile();
break;
case RX_MENU_ALL_ENTRY:
menu[item].flags ^= FL_MENU_VALUE;
if (menu[item].value())
handle_context_menu();
break;
case RX_MENU_WRAP:
set_word_wrap(!wrap, true);
break;
case RX_MENU_SCROLL_HINTS:
menu[item].flags ^= FL_MENU_VALUE;
static_cast<MVScrollbar*>(mVScrollBar)->show_marks(menu[item].value());
break;
case RX_MENU_COUNTRY:
if (progdefaults.logging == LOG_NAS)
inpXchgIn->value(s.c_str());
else if (progdefaults.logging == LOG_JOTA)
inp_JOTA_spc->value(s.c_str());
else
cboCountry->value(s.c_str());
return;
case RX_MENU_PROVINCE:
if (progdefaults.logging == LOG_NAS)
inpXchgIn->value(s.c_str());
else if (progdefaults.logging == LOG_JOTA)
inp_JOTA_spc->value(s.c_str());
else if (progdefaults.logging == LOG_IARI)
inpXchgIn->value(s.c_str());
else
set_province(s);
return;
case RX_MENU_COUNTY:
set_cbo_county(s.c_str());
return;
default:
return;
}
restoreFocus(92);
if (!input)
return;
if (item == RX_MENU_XCHG) { // append
input->position(input->size());
if (input->size())
input->insert(" ", 1);
input->insert(s.c_str());
}
else if (item == RX_MENU_SECTION) {
if (check_field(ucasestr(s).c_str(), cFD_SECTION))
input->value(ucasestr(s).c_str());
} else if (item == RX_MENU_CLASS) {
if (check_field(ucasestr(s).c_str(), cFD_CLASS))
input->value(ucasestr(s).c_str());
} else if (item == RX_MENU_RST_IN) {
if (check_field(s, cRST)) {
set_rst_in(s);
}
} else if (item == RX_MENU_RST_OUT) {
if (check_field(s, cRST))
set_rst_out(s);
} else {
if (input == inpCounty)
set_cbo_county(s.c_str());
else {
input->value(s.c_str());
log_callback(input);
}
}
}
const char* FTextRX::dxcc_lookup_call(int x, int y)
{
char* s = get_word(x - this->x(), y - this->y(), progdefaults.nonwordchars.c_str());
char* mem = s;
if (!(s && *s && call.match(s))) {
free(s);
return 0;
}
double lon1, lat1, lon2 = 360.0, lat2 = 360.0, distance, azimuth;
static std::string tip;
std::ostringstream stip;
const dxcc* e = 0;
cQsoRec* qso = 0;
unsigned char qsl;
// prevent locator-only lookup if Ctrl is held
if (!(Fl::event_state() & FL_CTRL) && loc.match(s)) {
const std::vector<regmatch_t>& v = loc.suboff();
s += v[0].rm_so;
*(s + v[0].rm_eo) = '\0';
if (QRB::locator2longlat(&lon2, &lat2, s) != QRB::QRB_OK)
goto ret;
e = 0; qsl = 0; qso = 0;
}
else {
e = dxcc_lookup(s);
qsl = qsl_lookup(s);
qso = SearchLog(s);
}
if (qso && QRB::locator2longlat(&lon2, &lat2, qso->getField(GRIDSQUARE)) != QRB::QRB_OK)
lon2 = lat2 = 360.0;
if (e) {
// use dxcc data if we didn't have a good locator string in the log file
if (lon2 == 360.0)
lon2 = -e->longitude;
if (lat2 == 360.0)
lat2 = e->latitude;
stip << e->country << " (" << e->continent
<< " GMT" << std::fixed << std::showpos << std::setprecision(1) << -e->gmt_offset << std::noshowpos
<< ") CQ-" << e->cq_zone << " ITU-" << e->itu_zone << '\n';
}
if (QRB::locator2longlat(&lon1, &lat1, progdefaults.myLocator.c_str()) == QRB::QRB_OK &&
QRB::qrb(lon1, lat1, lon2, lat2, &distance, &azimuth) == QRB::QRB_OK) {
if (progdefaults.us_units) {
stip << "QTE " << std::fixed << std::setprecision(0) << azimuth << '\260' << " ("
<< QRB::azimuth_long_path(azimuth) << '\260' << ") QRB "
<< distance * 0.62168188 << "mi"<< " (" <<
QRB::distance_long_path(distance) * 0.62168188 <<
"mi)\n";
}
else {
stip << "QTE " << std::fixed << std::setprecision(0) << azimuth << '\260' << " ("
<< QRB::azimuth_long_path(azimuth) << '\260' << ") QRB "
<< distance << "km(" <<
QRB::distance_long_path(distance) << "km)\n";
}
}
if (qso) {
if (qso->getField(NAME)[0]) {
stip << "* " << qso->getField(NAME);
if (qso->getField(QTH)[0]) stip << _(" in ") << qso->getField(QTH);
stip << "\n";
}
if (qso->getField(QSO_DATE)[0]) stip << "* " << _("Last QSO") << ": " << qso->getField(QSO_DATE);
if (qso->getField(BAND)[0]) stip << ", " << qso->getField(BAND);
if (qso->getField(ADIF_MODE)[0]) stip << ", " << qso->getField(ADIF_MODE);
stip << "\n";
}
if (qsl) {
stip << "* QSL: ";
for (unsigned char i = 0; i < QSL_END; i++)
if (qsl & (1 << i))
stip << qsl_names[i] << ' ';
stip << '\n';
}
ret:
free(mem);
tip = stip.str();
return tip.empty() ? 0 : tip.c_str();
}
void FTextRX::dxcc_tooltip(void* obj)
{
struct point {
int x, y;
bool operator==(const point& p) { return x == p.x && y == p.y; }
bool operator!=(const point& p) { return !(*this == p); }
};
static point p[3] = { {0, 0}, {0, 0}, {0, 0} };
memmove(p, p+1, 2 * sizeof(point));
p[2].x = Fl::event_x(); p[2].y = Fl::event_y();
static const char* tip = 0;
FTextRX* v = reinterpret_cast<FTextRX*>(obj);
// look up word under cursor if we have been called twice with the cursor
// at the same position, and if the cursor was previously somewhere else
if (p[2] == p[1] && p[2] != p[0] && ((tip = v->dxcc_lookup_call(p[2].x, p[2].y))))
Fl_Tooltip::enter_area(v, p[2].x, p[2].y, 100, 100, tip);
else if (p[2] != p[1])
Fl_Tooltip::exit(v);
Fl::repeat_timeout(tip ? Fl_Tooltip::hoverdelay() : v->tooltips.delay / 2.0, dxcc_tooltip, obj);
}
// ----------------------------------------------------------------------------
Fl_Menu_Item FTextTX::menu[] = {
{ icons::make_icon_label(_("Transmit"), tx_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Receive"), rx_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Abort"), process_stop_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
{ icons::make_icon_label(_("Send image..."), image_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
{ 0 }, // EDIT_MENU_CUT
{ 0 }, // EDIT_MENU_COPY
{ 0 }, // EDIT_MENU_PASTE
{ 0 }, // EDIT_MENU_CLEAR
{ 0 }, // EDIT_MENU_READ
{ 0 }, // EDIT_MENU_WRAP
{ _("Spec Char"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "¢ - cent", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "£ - pound", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "µ - micro", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "° - degree", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "¿ - iques", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "× - times", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "÷ - divide", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ _("A"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "À - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "à - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Á - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "á - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Â - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "â - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ã - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ã - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ä - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ä - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Å - ring", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "å - ring", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Æ - aelig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "æ - aelig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("E"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "È - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "è - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "É - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "é - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ê - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ê - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ë - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ë - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("I"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ì - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ì - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Í - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "í - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Î - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "î - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ï - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ï - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("N"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ñ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ñ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("O"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ò - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ò - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ó - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ó - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ô - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ô - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Õ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "õ - tilde", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ö - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ö - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ø - slash", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ø - slash", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("U"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ù - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ù - grave", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ú - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ú - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Û - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "û - circ", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ü - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ü - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("Y"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "Ý - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ý - acute", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ÿ - umlaut", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{ _("Other"), 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL },
{ "ß - szlig", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ç - cedil", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ç - cedil", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Ð - eth", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "ð - eth", 0, 0, 0, 0, FL_NORMAL_LABEL },
{ "Þ - thorn", 0, 0, 0, 0, FL_NORMAL_LABEL },
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{ 0 }
};
// needed by our static kf functions, which may restrict editing depending on
// the transmit cursor position
int *FTextTX::ptxpos;
FTextTX::FTextTX(int x, int y, int w, int h, const char *l)
: FTextEdit(x, y, w, h, l),
PauseBreak(false), txpos(0), bkspaces(0)
{
ptxpos = &txpos;
change_keybindings();
memcpy(menu + TX_MENU_CUT, FTextEdit::menu, (FTextEdit::menu->size() - 1) * sizeof(*FTextEdit::menu));
context_menu = menu;
init_context_menu();
utf8_txpos = txpos = 0;
}
/// Handles fltk events for this widget.
/// We pass keyboard events to handle_key() and handle mouse3 presses to show
/// the popup menu. We also disallow mouse2 events in the transmitted text area.
/// Everything else is passed to the base class handle().
///
/// @param event
///
/// @return
///
int FTextTX::handle(int event)
{
if ( !(Fl::event_inside(this) || (event == FL_KEYBOARD && Fl::focus() == this)) )
return FTextEdit::handle(event);
switch (event) {
case FL_KEYBOARD:
if (active_modem->get_mode() == MODE_FSQ) {
if (Fl::event_key() == FL_Enter || Fl::event_key() == FL_KP_Enter) {
fsq_transmit(0);
return 1;
}
}
return handle_key(Fl::event_key()) ? 1 : FTextEdit::handle(event);
case FL_PUSH:
if (Fl::event_button() == FL_MIDDLE_MOUSE &&
xy_to_position(Fl::event_x(), Fl::event_y(), CHARACTER_POS) < txpos)
return 1; // ignore mouse2 text pastes inside the transmitted text
}
return FTextEdit::handle(event);
}
/// Clears the buffer.
/// Also resets the transmit position, stored backspaces and tx pause flag.
///
void FTextTX::clear(void)
{
FTextEdit::clear();
txpos = 0;
utf8_txpos = 0;
bkspaces = 0;
PauseBreak = false;
}
/// Clears the sent text.
/// Also resets the transmit position, stored backspaces and tx pause flag.
///
void FTextTX::clear_sent(void)
{
tbuf->remove(0, utf8_txpos);
sbuf->remove(0, utf8_txpos);
txpos = 0;
utf8_txpos = 0;
bkspaces = 0;
PauseBreak = false;
set_word_wrap(restore_wrap);
}
/// Returns boolean <eot> end of text
///
/// true if empty buffer
/// false if characters remain
///
bool FTextTX::eot(void)
{
return (insert_position() == txpos);
}
/// Returns the next character to be transmitted.
///
/// @return The next character, or ETX if the transmission has been paused, or
/// NUL if no text should be transmitted.
///
int FTextTX::nextChar(void)
{
int c;
if (bkspaces) {
--bkspaces;
c = '\b';
}
else if (PauseBreak) {
PauseBreak = false;
c = GET_TX_CHAR_ETX;//0x03;
} else if (insert_position() <= utf8_txpos) { // empty buffer or cursor inside transmitted text
c = -1;
} else {
if ((c = tbuf->char_at(utf8_txpos)) > 0) {
int n = fl_utf8bytes(c);
REQ(FTextTX::changed_cb, utf8_txpos, 0, 0, -1, static_cast<const char *>(0), this);
REQ(FTextTX::changed_cb, utf8_txpos+1, 0, 0, -1, static_cast<const char *>(0), this);
++txpos;
utf8_txpos += n;
} else
c = -1;
}
return c;
}
// called by xmlrpc thread
// called by macro execution
void FTextTX::add_text(std::string s)
{
for (size_t n = 0; n < s.length(); n++) {
if (s[n] == '\b') {
int ipos = insert_position();
if (tbuf->length()) {
if (ipos > 0 && txpos == ipos) {
bkspaces++;
txpos--;
int nn;
tbuf->get_char_at(utf8_txpos, nn);
utf8_txpos -= nn;
}
tbuf->remove(tbuf->length() - 1, tbuf->length());
sbuf->remove(sbuf->length() - 1, sbuf->length());
redraw();
}
} else {
//LOG_DEBUG("%04x ", s[n] & 0x00FF);
add(s[n] & 0xFF, RECV);
}
}
}
void FTextTX::setFont(Fl_Font f, int attr)
{
FTextBase::setFont(f, attr);
}
/// Handles keyboard shorcuts
///
/// @param key
// pressed key
///
/// @return
// 1 if shortcut is handled, otherwise 0.
///
int FTextTX::handle_key_shortcuts(int key)
{
std::string etag = "";
switch (key) {
case 'c': // add <CALL> for SC-c
case 'm': // add <MYCALL> for SC-m
case 'n': // add <NAME> for SC-n
case 'r': // add <RST>rcvd for SC-r
case 's': // add <RST>sent for SC-s
case 'l': // add <MYLOC> for SC-l
case 'h': // add <MYQTH> for SC-h
case 'a': // add <ANTENNA> for SC-a
case 'g': // add <BEL> 0x07
if ((Fl::event_state() & FL_CTRL) && (Fl::event_state() & FL_SHIFT))
// if ((Fl::event_state() & (FL_CTRL | FL_SHIFT))) // investigate why this doesn't work...
{
switch (key)
{
case 'c':
etag = inpCall->value();
break;
case 'm':
etag = progdefaults.myCall;
break;
case 'n':
etag = inpName->value();
break;
case 'r':
{
std::string s;
etag = (s = inpRstIn->value()).length() ? s : std::string("599");
}
break;
case 's':
{
std::string s;
etag = (s = inpRstOut->value()).length() ? s : std::string("599");
}
break;
case 'l':
etag = progdefaults.myLocator;
break;
case 'h':
etag = progdefaults.myQth;
break;
case 'a':
etag = progdefaults.myAntenna;
break;
case 'g':
etag = "\007";
break;
default:
break;
}
// Add text + space if length is > 0
if (etag.length()) {
add_text(etag);
if (etag != "\007")
add_text(" ");
return 1;
}
}
break;
default:
break;
}
return 0;
}
/// Handles keyboard events to override Fl_Text_Editor_mod's handling of some
/// keystrokes.
///
/// @param key
///
/// @return
///
int FTextTX::handle_key(int key)
{
if (handle_key_shortcuts(key))
return 1;
switch (key) {
case FL_Escape: // set stop flag and clear
{
static time_t t[2] = { 0, 0 };
static unsigned char i = 0;
if (t[i] == time(&t[!i])) { // two presses in a second: abort transmission
if (trx_state == STATE_TX)
menu_cb(TX_MENU_ABORT);
t[i = !i] = 0;
return 1;
}
i = !i;
}
if (trx_state == STATE_TX && active_modem->get_stopflag() == false) {
kf_select_all(0, this);
kf_copy(0, this);
clear();
if (arq_text_available)
AbortARQ();
active_modem->set_stopflag(true);
}
if (trx_state == STATE_TUNE)
abort_tx();
stopMacroTimer();
return 1;
case 't': // transmit for C-t
if (trx_state == STATE_RX && Fl::event_state() & FL_CTRL) {
menu_cb(TX_MENU_TX);
return 1;
}
break;
case 'r':// receive for C-r
if (Fl::event_state() & FL_CTRL) {
menu_cb(TX_MENU_RX);
return 1;
}
else if (!(Fl::event_state() & (FL_META | FL_ALT)))
break;
// fall through to (un)pause for M-r or A-r
case FL_Pause:
if (trx_state != STATE_TX) {
start_tx();
}
else
PauseBreak = true;
return 1;
case (FL_KP + '+'):
if (active_modem == cw_modem)
active_modem->incWPM();
return 1;
case (FL_KP + '-'):
if (active_modem == cw_modem)
active_modem->decWPM();
return 1;
case (FL_KP + '*'):
if (active_modem == cw_modem)
active_modem->toggleWPM();
return 1;
case FL_Tab:
if (active_modem == fsq_modem) return 1;
// In non-CW modes: Tab and Ctrl-tab both pause until user moves the
// cursor to let some more text through. Another (ctrl-)tab goes back to
// the end of the buffer and resumes sending.
// In CW mode: Tab pauses, skips rest of buffer, applies the
// SKIP style, then resumes sending when new text is entered.
// Ctrl-tab does the same thing as for all other modes.
if (utf8_txpos != insert_position())
insert_position(utf8_txpos);
else
insert_position(tbuf->length());
if (!(Fl::event_state() & FL_CTRL) && active_modem == cw_modem) {
int n = tbuf->length() - utf8_txpos;
char s[n + 1];
memset(s, FTEXT_DEF + SKIP, n);
s[n] = 0;
sbuf->replace(utf8_txpos, sbuf->length(), s);
insert_position(tbuf->length());
redisplay_range(utf8_txpos, insert_position());
utf8_txpos = insert_position();
}
return 1;
// Move cursor, or search up/down with the Meta/Alt modifiers
case FL_Left:
if (Fl::event_state() & (FL_META | FL_ALT)) {
if (active_modem == fsq_modem) return 1;
active_modem->searchDown();
return 1;
}
return 0;
case FL_Right:
if (Fl::event_state() & (FL_META | FL_ALT)) {
if (active_modem == fsq_modem) return 1;
active_modem->searchUp();
return 1;
}
return 0;
// queue a BS and decr. the txpos, unless the cursor is in the tx text
case FL_BackSpace:
{
int ipos = insert_position();
if (utf8_txpos > 0 && utf8_txpos == ipos) {
bkspaces++;
utf8_txpos = tbuf->prev_char(ipos);
txpos--;
}
return 0;
}
// alt - 1 / 2 changes macro sets
case '1':
case '2':
case '3':
case '4':
if (Fl::event_state() & FL_ALT) {
if (active_modem == fsq_modem) return 1;
static char lbl[2] = "1";
altMacros = key - '1';
if (progdefaults.mbar_scheme > MACRO_SINGLE_BAR_MAX) {
if (!altMacros) altMacros = 1;
for (int i = 0; i < NUMMACKEYS; i++) {
btnMacro[NUMMACKEYS + i]->label(
macros.name[(altMacros * NUMMACKEYS) + i].c_str());
btnMacro[NUMMACKEYS + i]->redraw_label();
}
lbl[0] = key;
btnAltMacros2->label(lbl);
btnAltMacros2->redraw_label();
} else {
for (int i = 0; i < NUMMACKEYS; i++) {
btnMacro[i]->label(
macros.name[(altMacros * NUMMACKEYS) + i].c_str());
btnMacro[i]->redraw_label();
}
lbl[0] = key;
btnAltMacros1->label(lbl);
btnAltMacros1->redraw_label();
}
return 1;
}
break;
default:
break;
}
if (insert_position() < txpos)
return 1;
// insert a macro
if (key >= FL_F && key <= FL_F_Last) {
return handle_key_macro(key);
}
// read ctl-ddd, where d is a digit, as ascii characters (in base 10)
// and insert verbatim; e.g. ctl-001 inserts a <soh>
if (Fl::event_state() & FL_CTRL && (key >= FL_KP) && (key <= FL_KP + '9'))
return handle_key_ascii(key);
// restart the numeric keypad entries.
ascii_cnt = 0;
ascii_chr = 0;
return 0;
}
/// Inserts the macro for function key \c key.
///
/// @param key An integer in the range [FL_F, FL_F_Last]
///
/// @return 1
///
int FTextTX::handle_key_macro(int key)
{
key -= FL_F + 1;
if (active_modem == fsq_modem) {
if (key == 0) fsq_repeat_last_heard();
if (key == 1) fsq_repeat_last_command();
return 1;
}
if (key > 11)
return 0;
if (progdefaults.mbar_scheme > MACRO_SINGLE_BAR_MAX) {
if (Fl::event_state(FL_SHIFT))
key += altMacros * NUMMACKEYS;
} else {
key += altMacros * NUMMACKEYS;
}
if (!(macros.text[key]).empty())
macros.execute(key);
return 1;
}
int FTextTX::handle_dnd_drag(int pos)
{
if (pos >= txpos) {
return FTextEdit::handle_dnd_drag(pos);
}
else // refuse drop inside transmitted text
return 0;
}
/// Handles mouse-3 clicks by displaying the context menu
///
/// @param val
///
void FTextTX::handle_context_menu(void)
{
// adjust Abort/Transmit/Receive menu items
switch (trx_state) {
case STATE_TX:
menu[TX_MENU_TX].hide();
menu[TX_MENU_RX].show();
menu[TX_MENU_ABORT].show();
break;
case STATE_TUNE:
menu[TX_MENU_TX].hide();
menu[TX_MENU_RX].show();
menu[TX_MENU_ABORT].hide();
break;
default:
menu[TX_MENU_TX].show();
menu[TX_MENU_RX].hide();
menu[TX_MENU_ABORT].hide();
break;
}
bool modify_text_ok = insert_position() >= txpos;
bool selected = tbuf->selected();
icons::set_active(&menu[TX_MENU_MFSK16_IMG], active_modem->get_cap() & modem::CAP_IMG);
icons::set_active(&menu[TX_MENU_CLEAR], tbuf->length());
icons::set_active(&menu[TX_MENU_CUT], selected && modify_text_ok);
icons::set_active(&menu[TX_MENU_COPY], selected);
icons::set_active(&menu[TX_MENU_PASTE], modify_text_ok);
icons::set_active(&menu[TX_MENU_READ], modify_text_ok);
if (wrap)
menu[TX_MENU_WRAP].set();
else
menu[TX_MENU_WRAP].clear();
show_context_menu();
}
/// The context menu handler
///
/// @param val
///
void FTextTX::menu_cb(size_t item)
{
switch (item) {
case TX_MENU_TX:
active_modem->set_stopflag(false);
start_tx();
break;
case TX_MENU_ABORT:
char panic[200];
snprintf(panic, sizeof(panic), "*** Don't panic *** %s", progdefaults.myName.c_str());
put_status(panic, 5.0);
abort_tx();
break;
case TX_MENU_RX:
if (trx_state == STATE_TX) {
insert_position(tbuf->length());
add("^r", CTRL);
}
else
abort_tx();
break;
case TX_MENU_MFSK16_IMG:
{
trx_mode md = active_modem->get_mode();
if (md == MODE_IFKP)
ifkp_showTxViewer();
else if (md >= MODE_THOR_FIRST && md <= MODE_THOR_LAST)
thor_showTxViewer();
else
showTxViewer(0, 0);
break;
}
case TX_MENU_CLEAR:
clear();
break;
case TX_MENU_CUT:
kf_cut(0, this);
break;
case TX_MENU_COPY:
kf_copy(0, this);
break;
case TX_MENU_PASTE:
kf_paste(0, this);
break;
case TX_MENU_READ: {
restore_wrap = wrap;
set_word_wrap(false);
readFile();
break;
}
case TX_MENU_WRAP:
set_word_wrap(!wrap, true);
break;
default:
if (FTextTX::menu[item].flags == 0) { // not an FL_SUB_MENU
add(FTextTX::menu[item].text[0]);
add(FTextTX::menu[item].text[1]);
}
}
}
/// Overrides some useful Fl_Text_Edit keybindings that we want to keep working,
/// provided that they don't try to change chunks of transmitted text.
///
void FTextTX::change_keybindings(void)
{
struct {
Fl_Text_Editor_mod::Key_Func function, override;
} fbind[] = {
{ Fl_Text_Editor_mod::kf_default, FTextTX::kf_default },
{ Fl_Text_Editor_mod::kf_enter, FTextTX::kf_enter },
{ Fl_Text_Editor_mod::kf_delete, FTextTX::kf_delete },
{ Fl_Text_Editor_mod::kf_cut, FTextTX::kf_cut },
{ Fl_Text_Editor_mod::kf_paste, FTextTX::kf_paste }
};
int n = sizeof(fbind) / sizeof(fbind[0]);
// walk the keybindings linked list and replace items containing
// functions for which we have an override in fbind
for (Fl_Text_Editor_mod::Key_Binding *k = key_bindings; k; k = k->next) {
for (int i = 0; i < n; i++)
if (fbind[i].function == k->function)
k->function = fbind[i].override;
}
}
// The kf_* functions below call the corresponding Fl_Text_Editor_mod routines, but
// may make adjustments so that no transmitted text is modified.
int FTextTX::kf_default(int c, Fl_Text_Editor_mod* e)
{
return e->insert_position() < *ptxpos ? 1 : Fl_Text_Editor_mod::kf_default(c, e);
}
int FTextTX::kf_enter(int c, Fl_Text_Editor_mod* e)
{
return e->insert_position() < *ptxpos ? 1 : Fl_Text_Editor_mod::kf_enter(c, e);
}
int FTextTX::kf_delete(int c, Fl_Text_Editor_mod* e)
{
// single character
if (!e->buffer()->selected()) {
if (e->insert_position() >= *ptxpos &&
e->insert_position() != e->buffer()->length())
return Fl_Text_Editor_mod::kf_delete(c, e);
else
return 1;
}
// region: delete as much as we can
int start, end;
e->buffer()->selection_position(&start, &end);
if (*ptxpos >= end)
return 1;
if (*ptxpos > start)
e->buffer()->select(*ptxpos, end);
return Fl_Text_Editor_mod::kf_delete(c, e);
}
int FTextTX::kf_cut(int c, Fl_Text_Editor_mod* e)
{
if (e->buffer()->selected()) {
int start, end;
e->buffer()->selection_position(&start, &end);
if (*ptxpos >= end)
return 1;
if (*ptxpos > start)
e->buffer()->select(*ptxpos, end);
}
return Fl_Text_Editor_mod::kf_cut(c, e);
}
int FTextTX::kf_paste(int c, Fl_Text_Editor_mod* e)
{
return e->insert_position() < *ptxpos ? 1 : Fl_Text_Editor_mod::kf_paste(c, e);
}
// ----------------------------------------------------------------------------
void MVScrollbar::draw(void)
{
Fl_Scrollbar::draw();
if (marks.empty() || !draw_marks)
return;
assert((type() & FL_HOR_SLIDER) == 0);
// Calculate the slider knob position and height. For a vertical scrollbar,
// the scroll buttons' height is the scrollbar width and the minimum knob
// height is half that.
int H = h() - Fl::box_dh(box()) - 2 * w(); // internal height (minus buttons)
int slider_h = (int)(slider_size() * H + 0.5);
int min_h = (w() - Fl::box_dw(box())) / 2 + 1;
if (slider_h < min_h)
slider_h = min_h;
double val = (Fl_Slider::value() - minimum()) / (maximum() - minimum());
int slider_y = (int)(val * (H - slider_h) + 0.5) + w(); // relative to y()
// This would draw a green rectangle around the slider knob:
// fl_color(FL_GREEN);
// fl_rect(x(), y() + slider_y, w() - Fl::box_dw(box()), slider_h);
int x1 = x() + Fl::box_dx(box()), x2 = x1 + w() - Fl::box_dw(box()) - 1, ypos;
// Convert stored scrollbar values to vertical positions and draw
// lines inside the widget if they don't overlap with the knob area.
for (std::vector<mark_t>::const_iterator i = marks.begin(); i != marks.end(); ++i) {
ypos = static_cast<int>(w() + H * i->pos / maximum());
// Don't draw over slider knob
if ((ypos > slider_y && ypos < slider_y + slider_h) ||
(ypos < slider_y + slider_h && ypos > slider_y))
continue;
ypos += y();
fl_color(i->color);
fl_line(x1, ypos, x2, ypos);
}
}
| 69,013
|
C++
|
.cxx
| 2,410
| 25.26639
| 109
| 0.612019
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,126
|
picture.cxx
|
w1hkj_fldigi/src/widgets/picture.cxx
|
// ----------------------------------------------------------------------------
// picture.cxx rgb picture viewer
//
// Copyright (C) 2006-2008
// Dave Freese, W1HKJ
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
// Copyright (C) 2010
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <zlib.h>
#include <config.h>
#ifdef __MINGW32__
# include "compat.h"
#endif
#include <string>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <FL/Fl.H>
#include <FL/fl_draw.H>
//#include <zlib.h>
#include <png.h>
#include "fl_digi.h"
#include "trx.h"
#include "picture.h"
#include "debug.h"
#include "timeops.h"
picture::picture (int X, int Y, int W, int H, int bg_col) :
Fl_Widget (X, Y, W, H)
{
width = W;
height = H;
bufsize = W * H * depth;
numcol = 0;
slantdir = 0;
vidbuf = new unsigned char[bufsize];
background = bg_col ;
memset( vidbuf, background, bufsize );
zoom = 0 ;
binary = false ;
binary_threshold = 128 ;
slantcorr = true;
cbFunc = NULL;
}
picture::~picture()
{
if (vidbuf) delete [] vidbuf;
}
void picture::video(unsigned char const *data, int len )
{
if (len > bufsize) return;
memcpy( vidbuf, data, len );
redraw();
}
unsigned char picture::pixel(int pos)
{
if (pos < 0 || pos >= bufsize) return 0;
return vidbuf[pos];
}
void picture::clear()
{
memset(vidbuf, background, bufsize);
redraw();
}
void picture::resize_zoom(int x, int y, int w, int h)
{
if( zoom < 0 ) {
int stride = -zoom + 1 ;
Fl_Widget::resize(x,y,w/stride,h/stride);
} else if( zoom > 0 ) {
int stride = zoom + 1 ;
Fl_Widget::resize(x,y,w*stride,h*stride);
} else {
Fl_Widget::resize(x,y,w,h);
}
redraw();
}
void picture::resize(int x, int y, int w, int h)
{
if (w != width || h != height) {
width = w;
height = h;
delete [] vidbuf;
bufsize = depth * w * h;
vidbuf = new unsigned char[bufsize];
memset( vidbuf, background, bufsize );
}
resize_zoom(x,y,w,h);
}
/// No data destruction. Used when the received image grows more than expected.
/// Beware that this is not protected by a mutex.
void picture::resize_height(int new_height, bool clear_img)
{
int new_bufsize = width * new_height * depth;
/// If the allocation fails, std::bad_alloc is thrown.
unsigned char * new_vidbuf = new unsigned char[new_bufsize];
if( clear_img )
{
/// Sets to zero the complete image.
memset( new_vidbuf, background, new_bufsize );
}
else
{
if( new_height <= height )
{
memcpy( new_vidbuf, vidbuf, new_bufsize );
}
else
{
memcpy( new_vidbuf, vidbuf, bufsize );
memset( new_vidbuf + bufsize, background, new_bufsize - bufsize );
}
}
delete [] vidbuf ;
vidbuf = new_vidbuf ;
bufsize = new_bufsize ;
height = new_height;
resize_zoom( x(), y(), width, height );
redraw();
}
void picture::stretch(double the_ratio)
{
/// We do not change the width but the height
int new_height = height * the_ratio + 0.5 ;
int new_bufsize = width * new_height * depth;
/// If the allocation fails, std::bad_alloc is thrown.
unsigned char * new_vidbuf = new unsigned char[new_bufsize];
/// No interpolation, it takes the nearest pixel.
for( int ix_out = 0 ; ix_out < new_bufsize ; ix_out += depth ) {
int ix_in = 0.5 + ( double )ix_out * the_ratio ;
switch( ix_in % depth ) {
case 1 : --ix_in ; break ;
case 2 : ++ix_in ; break ;
default: ;
}
if( ix_in >= bufsize ) {
/// Grey value as a filler to indicate the end. For debugging.
memset( new_vidbuf + ix_out, 128, new_bufsize - ix_out );
break ;
}
for( int i = 0; i < depth ; ++i )
{
new_vidbuf[ ix_out + i ] = vidbuf[ ix_in + i ];
}
};
delete [] vidbuf ;
vidbuf = new_vidbuf ;
bufsize = new_bufsize ;
height = new_height;
resize_zoom( x(), y(), width, height );
redraw();
}
/// Change the horizontal center of the image by shifting the pixels.
// Beware that it is not protected by a mutex
void picture::shift_horizontal_center(int horizontal_shift)
{
/// This is a number of pixels.
int shift = horizontal_shift * depth;
if( shift < -bufsize ) {
shift = -bufsize ;
}
if( horizontal_shift > 0 ) {
/// Here we lose a couple of pixels at the end of the buffer
/// if there is not a line enough. It should not be a lot.
int tmp, n;
memmove( vidbuf + shift, vidbuf, bufsize - shift );
memcpy(vidbuf, vidbuf + width*depth, shift);
for (int row = 0; row < height; row ++) {
for (int col = 0; col < shift; col++) {
n = (row * width + col) * depth;
tmp = vidbuf[n];
vidbuf[n] = vidbuf[n+2];
vidbuf[n+2] = tmp;
}
}
// memset( vidbuf, background, horizontal_shift );
} else {
// shift *= -1;
/// Here, it is not necessary to reduce the buffer's size.
// memmove( vidbuf, vidbuf + shift, bufsize - shift );
// memcpy( vidbuf + bufsize - shift - 1,
// vidbuf + bufsize - width * depth - 1, shift);
// memset( vidbuf + bufsize + horizontal_shift, background, -horizontal_shift );
}
redraw();
}
/// Shift the center by 1 rgb value
// not protected by a mutex
void picture::shift_center(int dir)
{
if( dir > 0 ) {
memmove( vidbuf + 1, vidbuf, bufsize - 1 );
vidbuf[0] = 0;
} else {
memmove( vidbuf, vidbuf + 1, bufsize - 1 );
vidbuf[bufsize-1] = 0;
}
redraw();
}
/// rotate rgb pixel ordering in the image to the right of
/// and including grp pixels from the left
// not protected by a mutex
void picture::rotate()
{
unsigned char tmp;
int n;
for (int row = 0; row < height; row++) {
for (int col = 0; col < width; col++) {
n = (row * width + col) * depth;
tmp = vidbuf[n];
vidbuf[n] = vidbuf[n+1];
vidbuf[n+1] = vidbuf[n+2];
vidbuf[n+2] = tmp;
}
}
redraw();
}
void picture::set_zoom( int the_zoom )
{
zoom = the_zoom ;
/// The size of the displayed bitmap is changed.
resize_zoom( x(), y(), width, height );
}
// in data user data passed to function
// in x_screen,y_screen,wid_screen position and width of scan line in image
// out buf buffer for generated image data.
// Must copy wid_screen pixels from scanline y_screen, starting at pixel x_screen to this buffer.
void picture::draw_cb( void *data, int x_screen, int y_screen, int wid_screen, uchar * __restrict__ buf)
{
const picture * __restrict__ ptr_pic = ( const picture * ) data ;
const int img_width = ptr_pic->width ;
const unsigned char * __restrict__ in_ptr = ptr_pic->vidbuf ;
/// One pixel out of (zoom+1)
if( ptr_pic->zoom < 0 ) {
const int stride = -ptr_pic->zoom + 1 ;
const int in_offset = ( img_width * y_screen + x_screen ) * stride ;
int dpth_in_offset = depth * in_offset ;
if(ptr_pic->binary) {
for( int ix_w = 0, max_w = wid_screen * depth; ix_w < max_w ; ix_w += depth ) {
buf[ ix_w ] = ptr_pic->pix2bin(in_ptr[ dpth_in_offset ]);
buf[ ix_w + 1 ] = ptr_pic->pix2bin(in_ptr[ dpth_in_offset + 1 ]);
buf[ ix_w + 2 ] = ptr_pic->pix2bin(in_ptr[ dpth_in_offset + 2 ]);
dpth_in_offset += depth * stride ;
}
}
else {
for( int ix_w = 0, max_w = wid_screen * depth; ix_w < max_w ; ix_w += depth ) {
buf[ ix_w ] = in_ptr[ dpth_in_offset ];
buf[ ix_w + 1 ] = in_ptr[ dpth_in_offset + 1 ];
buf[ ix_w + 2 ] = in_ptr[ dpth_in_offset + 2 ];
dpth_in_offset += depth * stride ;
}
}
return ;
}
/// Reads each input pixel (-zoom+1) times.
if( ptr_pic->zoom > 0 ) {
const int stride = ptr_pic->zoom + 1 ;
const int in_offset = img_width * ( y_screen / stride ) + x_screen / stride ;
#ifndef NDEBUG
if( y_screen / stride >= ptr_pic->h() )
{
LOG_ERROR(
"Overflow2 y_screen=%d h=%d y_screen*stride=%d height=%d stride=%d\n",
y_screen,
ptr_pic->h(),
(y_screen/stride),
ptr_pic->height,
stride );
return ;
}
#endif
if(ptr_pic->binary) {
for( int ix_w = 0, max_w = wid_screen * depth, dpth_in_offset = depth * in_offset ; ix_w < max_w ; )
{
unsigned char in_dpth_in_offset_0 = ptr_pic->pix2bin(in_ptr[ dpth_in_offset ]);
unsigned char in_dpth_in_offset_1 = ptr_pic->pix2bin(in_ptr[ dpth_in_offset + 1 ]);
unsigned char in_dpth_in_offset_2 = ptr_pic->pix2bin(in_ptr[ dpth_in_offset + 2 ]);
// Stride is less than 4 or 5.
for( int j= 0; j < stride; j++, ix_w += depth )
{
buf[ ix_w ] = in_dpth_in_offset_0;
buf[ ix_w + 1 ] = in_dpth_in_offset_1;
buf[ ix_w + 2 ] = in_dpth_in_offset_2;
}
dpth_in_offset += depth ;
}
} else {
for( int ix_w = 0, max_w = wid_screen * depth, dpth_in_offset = depth * in_offset ; ix_w < max_w ; )
{
unsigned char in_dpth_in_offset_0 = in_ptr[ dpth_in_offset ];
unsigned char in_dpth_in_offset_1 = in_ptr[ dpth_in_offset + 1 ];
unsigned char in_dpth_in_offset_2 = in_ptr[ dpth_in_offset + 2 ];
// Stride is less than 4 or 5.
for( int j= 0; j < stride; j++, ix_w += depth )
{
buf[ ix_w ] = in_dpth_in_offset_0;
buf[ ix_w + 1 ] = in_dpth_in_offset_1;
buf[ ix_w + 2 ] = in_dpth_in_offset_2;
}
dpth_in_offset += depth ;
}
}
return ;
}
// zoom == 0, stride=1
const int in_offset = img_width * y_screen + x_screen ;
if(ptr_pic->binary) {
int dpth_in_offset = depth * in_offset ;
for( int ix_w = 0, max_w = wid_screen * depth; ix_w < max_w ; ix_w += depth ) {
buf[ ix_w ] = ptr_pic->pix2bin(in_ptr[ dpth_in_offset ]);
buf[ ix_w + 1 ] = ptr_pic->pix2bin(in_ptr[ dpth_in_offset + 1 ]);
buf[ ix_w + 2 ] = ptr_pic->pix2bin(in_ptr[ dpth_in_offset + 2 ]);
dpth_in_offset += depth ;
}
} else {
abort(); // This should never be called, see optimization in picture::draw().
}
} // picture::draw_cb
void picture::draw()
{
if( ( zoom == 0 ) && ( binary == false ) ) {
/// No scaling, this is faster.
fl_draw_image( vidbuf, x(), y(), w(), h() );
} else {
fl_draw_image( draw_cb, this, x(), y(), w(), h() );
}
}
void picture::slant_undo()
{
int row, col;
unsigned char temp[width * depth];
if (height == 0 || width == 0 || slantdir == 0) return;
if (slantdir == -1) { // undo from left
for (row = 0; row < height; row++) {
col = numcol * row / (height - 1);
if (col > 0) {
memmove( temp,
&vidbuf[(row * width + width - col) * depth],
(width - col) * depth );
memmove( &vidbuf[(row * width + col)*depth],
&vidbuf[row * width *depth],
(width - col) * depth );
memmove( &vidbuf[row * width * depth],
temp,
col * depth );
}
}
} else if (slantdir == 1) { // undo from right
for (row = 0; row < height; row++) {
col = numcol * row / (height - 1);
if (col > 0) {
memmove( temp,
&vidbuf[row * width * depth],
col * depth );
memmove( &vidbuf[row * width * depth],
&vidbuf[(row * width + col) * depth],
(width - col) * depth );
memmove( &vidbuf[(row * width + width - col) * depth],
temp,
col *depth );
}
}
}
slantdir = 0;
redraw();
}
void picture::slant_corr(int x, int y)
{
int row, col;
unsigned char temp[width * depth];
if (height == 0 || width == 0) return;
if (x > width / 2) { // unwrap from right
numcol = (width - x) * height / y;
if (numcol > width / 2) numcol = width / 2;
for (row = 0; row < height; row++) {
col = numcol * row / (height - 1);
if (col > 0) {
memmove( temp,
&vidbuf[(row * width + width - col) * depth],
(width - col) * depth );
memmove( &vidbuf[(row * width + col)*depth],
&vidbuf[row * width *depth],
(width - col) * depth );
memmove( &vidbuf[row * width * depth],
temp,
col * depth );
}
}
slantdir = 1;
} else { // unwrap from left
numcol = x * height / y;
if (numcol > width / 2) numcol = width / 2;
for (row = 0; row < height; row++) {
col = numcol * row / (height - 1);
if (col > 0) {
memmove( temp,
&vidbuf[row * width * depth],
col * depth );
memmove( &vidbuf[row * width * depth],
&vidbuf[(row * width + col) * depth],
(width - col) * depth );
memmove( &vidbuf[(row * width + width - col) * depth],
temp,
col *depth );
}
}
slantdir = -1;
}
redraw();
}
void picture::slant(int dir)
{
}
int picture::handle(int event)
{
if (Fl::event_inside( this )) {
if (event == FL_RELEASE) {
if (!slantcorr) {
do_callback();
return 1;
}
int xpos = Fl::event_x() - x();
int ypos = Fl::event_y() - y();
int evb = Fl::event_button();
if (evb == 1)
slant_corr(xpos, ypos);
else if (evb == 3)
slant_undo();
LOG_DEBUG("#2 %d, %d", xpos, ypos);
return 1;
}
return 1;
}
return 0;
}
static FILE* open_file(const char* name, const char* suffix)
{
FILE* fp;
size_t flen = strlen(name);
if (name[flen - 1] == '/') {
// if the name ends in a slash we will generate
// a timestamped name in the following format:
const char t[] = "pic_YYYY-MM-DD_HHMMSSz";
size_t newlen = flen + sizeof(t);
if (suffix)
newlen += 5;
char* newfn = new char[newlen];
memcpy(newfn, name, flen);
time_t time_sec = time(0);
struct tm ztime;
(void)gmtime_r(&time_sec, &ztime);
size_t sz;
if ((sz = strftime(newfn + flen, newlen - flen, "pic_%Y-%m-%d_%H%M%Sz", &ztime)) > 0) {
strncpy(newfn + flen + sz, suffix, newlen - flen - sz);
newfn[newlen - 1] = '\0';
mkdir(name, 0777);
fp = fl_fopen(newfn, "wb");
}
else
fp = NULL;
delete [] newfn;
}
else {
fp = fl_fopen(name, "rb");
if (fp) {
fclose(fp);
const int n = 5; // rename existing image files to keep up to 5 old versions
std::ostringstream oldfn, newfn;
std::streampos p;
oldfn << name << '.';
newfn << name << '.';
p = oldfn.tellp();
for (int i = n - 1; i > 0; i--) {
oldfn.seekp(p);
newfn.seekp(p);
oldfn << i;
newfn << i + 1;
remove(newfn.str().c_str());
rename(oldfn.str().c_str(), newfn.str().c_str());
}
remove(oldfn.str().c_str());
rename(name, oldfn.str().c_str());
}
fp = fl_fopen(name, "wb");
}
return fp;
}
static inline unsigned char avg_pix( const unsigned char * vidbuf )
{
return ( vidbuf[ 0 ] + vidbuf[ 1 ] + vidbuf[ 2 ] ) / picture::depth ;
}
int picture::save_png(const char* filename, bool monochrome, const char *extra_comments)
{
FILE* fp;
if ((fp = open_file(filename, ".png")) == NULL)
return -1;
// set up the png structures
png_structp png;
png_infop info;
if ((png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL)) == NULL) {
fclose(fp);
return -1;
}
/* png_set_compression_level() shall set the compression level to "level".
* The valid values for "level" range from [0,9], corresponding directly
* to compression levels for zlib. The value 0 implies no compression
* and 9 implies maximal compression. Note: Tests have shown that zlib
* compression levels 3-6 usually perform as well as level 9 for PNG images,
* and do considerably fewer calculations. */
png_set_compression_level(png, Z_BEST_COMPRESSION);
if ((info = png_create_info_struct(png)) == NULL) {
png_destroy_write_struct(&png, NULL);
fclose(fp);
return -1;
}
if (setjmp(png_jmpbuf(png))) {
png_destroy_write_struct(&png, &info);
fclose(fp);
return -1;
}
// use an stdio stream
png_init_io(png, fp);
// set png header
int color_type = monochrome ? PNG_COLOR_TYPE_GRAY : PNG_COLOR_TYPE_RGB ;
/// Color images must take eight bits per pixel.
const int bit_depth = ( monochrome && binary ) ? 1 : 8 ;
png_set_IHDR(png, info, width, height, bit_depth,
color_type, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
// write text comments
struct tm tm;
time_t t = time(NULL);
gmtime_r(&t, &tm);
char z[20 + 1];
strftime(z, sizeof(z), "%Y-%m-%dT%H:%M:%SZ", &tm);
z[sizeof(z) - 1] = '\0';
std::ostringstream comment;
comment << "Program: " PACKAGE_STRING << '\n'
<< "Received: " << z << '\n'
<< "Modem: " << mode_info[active_modem->get_mode()].name << '\n'
<< "Frequency: " << inpFreq->value() << '\n';
if( extra_comments ) {
comment << extra_comments ;
}
if (inpCall->size())
comment << "Log call: " << inpCall->value() << '\n';
// set text
png_text text;
text.key = strdup("Comment");
text.text = strdup(comment.str().c_str());
text.compression = PNG_TEXT_COMPRESSION_NONE;
png_set_text(png, info, &text, 1);
// write header
png_write_info(png, info);
// Extra check for debugging.
if( height * width * depth != bufsize ) {
LOG_ERROR("Buffer inconsistency h=%d w=%d b=%d", height, width, bufsize );
}
// write image
if(monochrome)
{
unsigned char tmp_row[width];
png_bytep row;
for (int i = 0; i < height; i++) {
int row_offset = i * width * depth ;
if( binary )
{
unsigned char accumPix = 0 ;
int j_offset = 0 ;
for(int j = 0 ; j < width; ++j )
{
int col_offset = row_offset + j * depth ;
unsigned char tmpChr = avg_pix( vidbuf + col_offset );
tmpChr = pix2bin(tmpChr) ? 1 : 0 ;
j_offset = j & 0x07 ;
tmpChr = tmpChr << ( 7 - j_offset );
accumPix |= tmpChr ;
if( j_offset == 7 ) {
tmp_row[ j >> 3 ] = accumPix ;
accumPix = 0 ;
}
}
if( j_offset != 7 ) {
tmp_row[ width >> 3 ] = accumPix ;
}
} else {
for(int j = 0 ; j < width; ++j )
{
int col_offset = row_offset + j * depth ;
tmp_row[j] = avg_pix( vidbuf + col_offset );
}
}
row = tmp_row;
png_write_rows(png, &row, 1);
}
}
else
{
png_bytep row;
for (int i = 0; i < height; i++) {
row = &vidbuf[i * width * depth];
png_write_rows(png, &row, 1);
}
}
png_write_end(png, info);
// clean up
free(text.key);
free(text.text);
png_destroy_write_struct(&png, &info);
fflush(fp);
fsync(fileno(fp));
fclose(fp);
return 0;
}
bool picture::restore( int row, int margin )
{
if( ( row <= noise_height_margin ) || ( row >= height ) ) return true;
unsigned char * line_ante = vidbuf + (row - noise_height_margin) * width * depth;
// Copy the new calculated value (at previous call) to all channels.
// TODO: Do that when switching off noise removal, otherwise a couple of colored pixels are left.
for( int col = margin ; col < width - margin; ++col )
{
int offset = col * depth ;
line_ante[ offset ] = line_ante[ offset + 2 ] = line_ante[ offset + 1 ];
}
return false ;
}
void picture::erosion( int row )
{
static const size_t margin_one = 1 ;
if( restore( row, margin_one ) ) return ;
const unsigned char * line_prev = vidbuf + (row - noise_height_margin + 1) * width * depth;
unsigned char * line_curr = vidbuf + (row - noise_height_margin + 2) * width * depth;
const unsigned char * line_next = vidbuf + (row - noise_height_margin + 3) * width * depth;
for( size_t col = margin_one ; col < width - margin_one; ++col )
{
unsigned char new_pix = 255 ;
new_pix = std::min( new_pix, line_prev[ depth * ( col - 1 ) ] );
new_pix = std::min( new_pix, line_prev[ depth * ( col ) ] );
new_pix = std::min( new_pix, line_prev[ depth * ( col + 1 ) ] );
new_pix = std::min( new_pix, line_curr[ depth * ( col - 1 ) ] );
new_pix = std::min( new_pix, line_curr[ depth * ( col ) ] );
new_pix = std::min( new_pix, line_curr[ depth * ( col + 1 ) ] );
new_pix = std::min( new_pix, line_next[ depth * ( col - 1 ) ] );
new_pix = std::min( new_pix, line_next[ depth * ( col ) ] );
new_pix = std::min( new_pix, line_next[ depth * ( col + 1 ) ] );
/// Use this channel as a buffer. Beware that if we change the slant,
// this component might not be restored
// because the line position changed. Not a big problem.
// We might forbid slanting when de-noising.
line_curr[ col * depth + 1 ] = new_pix;
}
}
void picture::dilatation( int row )
{
static const size_t margin_one = 1 ;
if( restore( row, margin_one ) ) return ;
const unsigned char * line_prev = vidbuf + (row - noise_height_margin + 1) * width * depth;
unsigned char * line_curr = vidbuf + (row - noise_height_margin + 2) * width * depth;
const unsigned char * line_next = vidbuf + (row - noise_height_margin + 3) * width * depth;
for( size_t col = margin_one ; col < width - margin_one; ++col )
{
unsigned char new_pix = 0 ;
new_pix = std::max( new_pix, line_prev[ depth * ( col - 1 ) ] );
new_pix = std::max( new_pix, line_prev[ depth * ( col ) ] );
new_pix = std::max( new_pix, line_prev[ depth * ( col + 1 ) ] );
new_pix = std::max( new_pix, line_curr[ depth * ( col - 1 ) ] );
new_pix = std::max( new_pix, line_curr[ depth * ( col ) ] );
new_pix = std::max( new_pix, line_curr[ depth * ( col + 1 ) ] );
new_pix = std::max( new_pix, line_next[ depth * ( col - 1 ) ] );
new_pix = std::max( new_pix, line_next[ depth * ( col ) ] );
new_pix = std::max( new_pix, line_next[ depth * ( col + 1 ) ] );
/// Use this channel as a buffer. Beware that if we change the slant,
// this component might not be restored
// because the line position changed. Not a big problem.
// We might forbid slanting when de-noising.
line_curr[ col * depth + 1 ] = new_pix;
}
}
void picture::remove_noise( int row, int half_len, int noise_margin )
{
if( restore( row, half_len ) ) return ;
const unsigned char * line_prev = vidbuf + (row - noise_height_margin + 1) * width * depth;
unsigned char * line_curr = vidbuf + (row - noise_height_margin + 2) * width * depth;
const unsigned char * line_next = vidbuf + (row - noise_height_margin + 3) * width * depth;
const int nb_neighbours = ( 2 * ( 2 * half_len + 1 ) );
int medians[nb_neighbours];
/// Takes into account the first component only.
for( int col = half_len ; col < width - half_len; ++col )
{
int curr_pix = line_curr[ col * depth ];
assert( ( curr_pix >= 0 ) && ( curr_pix <= 255 ) );
int pix_min = 255, pix_max = 0;
for( int subcol = col - half_len, tmp, nghb_i = 0 ; subcol <= col + half_len ; ++subcol )
{
int offset = subcol * depth ;
tmp = line_prev[ offset ];
if( tmp < pix_min ) pix_min = tmp ;
else if( tmp > pix_max ) pix_max = tmp ;
medians[nghb_i++] = tmp;
tmp = line_next[ offset ];
if( tmp < pix_min ) pix_min = tmp ;
else if( tmp > pix_max ) pix_max = tmp ;
medians[nghb_i++] = tmp;
}
// Maybe the pixel is between min and max.
int thres_min = pix_min - noise_margin;
if(thres_min < 0) thres_min = 0;
assert(thres_min <= pix_min);
int thres_max = pix_max + noise_margin;
if(thres_max > 255 ) thres_max = 255;
if(thres_max < pix_max) abort();
if( ( curr_pix >= thres_min ) && ( curr_pix <= thres_max ) ) continue ;
assert( ( pix_max >= 0 ) && ( pix_max <= 255 ) );
std::sort( medians, medians + nb_neighbours );
int new_pix = medians[ nb_neighbours / 2 ];
assert( new_pix >= 0 );
/// Use this channel as a buffer. Beware that if we change the slant,
// this component might not be restored
// because the line position changed. Not a big problem.
// We might forbid slanting when de-noising.
line_curr[ col * depth + 1 ] = new_pix;
}
}
int picbox::handle(int event)
{
if (!Fl::event_inside(this))
return 0;
switch (event) {
case FL_DND_ENTER: case FL_DND_LEAVE:
case FL_DND_DRAG: case FL_DND_RELEASE:
return 1;
case FL_PASTE:
break;
default:
return Fl_Box::handle(event);
}
// handle FL_PASTE
std::string text = Fl::event_text();
// from dnd event "file:///home/dave/Photos/dave.jpeg"
std::string::size_type p;
if ((p = text.find("file://")) != std::string::npos)
text.erase(0, p + strlen("file://"));
if ((p = text.find('\r')) != std::string::npos)
text.erase(p);
if ((p = text.find('\n')) != std::string::npos)
text.erase(p);
struct stat st;
if (stat(text.c_str(), &st) == -1 || !S_ISREG(st.st_mode))
return 0;
extern void load_image(const char*);
load_image(text.c_str());
return 1;
}
| 24,589
|
C++
|
.cxx
| 778
| 28.59126
| 117
| 0.609933
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,127
|
globals.cxx
|
w1hkj_fldigi/src/globals/globals.cxx
|
// ----------------------------------------------------------------------------
// globals.cxx -- constants, variables, arrays & functions that need to be
// outside of any thread
//
// Copyright (C) 2006-2009
// Dave Freese, W1HKJ
// Copyright (C) 2007-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <iosfwd>
#include <iomanip>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cerrno>
#include <cstdio>
#include "gettext.h"
#include "globals.h"
#include "modem.h"
#include "data_io.h"
#include "strutil.h"
// ************ Elements are in enum trx_mode order. ************
// N.B. it is not valid to use an _("NLS") std::string in this table!!
// ... doing so will break the Fl_menu_item table 'menu_'. -Kamal
// Last value (true/false) determines if it's used with the KISS interface.
// It must have 8 bit support. Current selection based on the modems used in FLAMP.
//struc entries:
// mode, **modem, *sname, *name, *pskmail_name, *adif_name, *export_mode, *export_submode, *vid_name, iface_io
// *** DO NOT PUT A '/' in the name std::string
const struct mode_info_t mode_info[NUM_MODES] = {
{MODE_NULL,&null_modem,"NULL","NULL","","NULL","","","", DISABLED_IO },
{MODE_CW,&cw_modem,"CW","CW","CW","CW","CW","","CW", DISABLED_IO },
{MODE_CONTESTIA,&contestia_modem,"CONTESTIA","Contestia","","CONTESTI","CONTESTI","","CT",DISABLED_IO},
{MODE_CONTESTIA_4_125,&contestia_4_125_modem,"Cont-4/125","Cont4-125","","CONTESTI4/125","CONTESTI","","CT4/125",DISABLED_IO},
{MODE_CONTESTIA_4_250,&contestia_4_250_modem,"Cont-4/250","Cont4-250","","CONTESTI4/250","CONTESTI","","CT4/250",DISABLED_IO},
{MODE_CONTESTIA_4_500,&contestia_4_500_modem,"Cont-4/500","Cont4-500","","CONTESTI4/500","CONTESTI","","CT4/500",DISABLED_IO},
{MODE_CONTESTIA_4_1000,&contestia_4_1000_modem,"Cont-4/1K","Cont4-1K","","CONTESTI4/1000","CONTESTI","","CT4/1K",DISABLED_IO},
{MODE_CONTESTIA_4_2000,&contestia_4_2000_modem,"Cont-4/2K","Cont4-2K","","CONTESTI4/2000","CONTESTI","","CT4/2K",DISABLED_IO},
{MODE_CONTESTIA_8_125,&contestia_8_125_modem,"Cont-8/125","Cont8-125","","CONTESTI8/125","CONTESTI","","CT8/125",DISABLED_IO},
{MODE_CONTESTIA_8_250,&contestia_8_250_modem,"Cont-8/250","Cont8-250","","CONTESTI8/250","CONTESTI","","CT8/250",DISABLED_IO},
{MODE_CONTESTIA_8_500,&contestia_8_500_modem,"Cont-8/500","Cont8-500","","CONTESTI8/500","CONTESTI","","CT8/500",DISABLED_IO},
{MODE_CONTESTIA_8_1000,&contestia_8_1000_modem,"Cont-8/1K","Cont8-1K","","CONTESTI8/1000","CONTESTI","","CT8/1K",DISABLED_IO},
{MODE_CONTESTIA_8_2000,&contestia_8_2000_modem,"Cont-8/2K","Cont8-2K","","CONTESTI8/2000","CONTESTI","","CT8/2K",DISABLED_IO},
{MODE_CONTESTIA_16_250,&contestia_16_250_modem,"Cont-16/250","Cont16-250","","CONTESTI16/250","CONTESTI","","CT16/250",DISABLED_IO},
{MODE_CONTESTIA_16_500,&contestia_16_500_modem,"Cont-16/500","Cont16-500","","CONTESTI16/500","CONTESTI","","CT16/500",DISABLED_IO},
{MODE_CONTESTIA_16_1000,&contestia_16_1000_modem,"Cont-16/1K","Cont16-1K","","CONTESTI16/1000","CONTESTI","","CT16/1K",DISABLED_IO},
{MODE_CONTESTIA_16_2000,&contestia_16_2000_modem,"Cont-16/2K","Cont16-2K","","CONTESTI16/2000","CONTESTI","","CT16/2K",DISABLED_IO},
{MODE_CONTESTIA_32_1000,&contestia_32_1000_modem,"Cont-32/1K","Cont32-1K","","CONTESTI32/1000","CONTESTI","","CT32/1K",DISABLED_IO},
{MODE_CONTESTIA_32_2000,&contestia_32_2000_modem,"Cont-32/2K","Cont32-2K","","CONTESTI32/2000","CONTESTI","","CT32/2K",DISABLED_IO},
{MODE_CONTESTIA_64_500,&contestia_64_500_modem,"Cont-64/500","Cont64-500","","CONTESTI64/500","CONTESTI","","CT64/500",DISABLED_IO},
{MODE_CONTESTIA_64_1000,&contestia_64_1000_modem,"Cont-64/1K","Cont64-1K","","CONTESTI64/1000","CONTESTI","","CT64/1K",DISABLED_IO},
{MODE_CONTESTIA_64_2000,&contestia_64_2000_modem,"Cont-64/2K","Cont64-2K","","CONTESTI64/2000","CONTESTI","","CT64/2K",DISABLED_IO},
{MODE_DOMINOEXMICRO,&dominoexmicro_modem,"DOMEX Micro","DominoEX Micro","DOMINOEXMICRO","DOMINO","DOMINO","","DM M", DISABLED_IO },
{MODE_DOMINOEX4,&dominoex4_modem,"DOMEX4","DominoEX 4","DOMINOEX4","DOMINO","DOMINO","","DM 4", DISABLED_IO },
{MODE_DOMINOEX5,&dominoex5_modem,"DOMEX5","DominoEX 5","DOMINOEX5","DOMINO","DOMINO","","DM 5", DISABLED_IO },
{MODE_DOMINOEX8,&dominoex8_modem,"DOMEX8","DominoEX 8","DOMINOEX8","DOMINO","DOMINO","","DM 8", DISABLED_IO },
{MODE_DOMINOEX11,&dominoex11_modem,"DOMX11","DominoEX 11","DOMINOEX11","DOMINO","DOMINO","","DM11", DISABLED_IO },
{MODE_DOMINOEX16,&dominoex16_modem,"DOMX16","DominoEX 16","DOMINOEX16","DOMINO","DOMINO","","DM16", ARQ_IO | KISS_IO },
{MODE_DOMINOEX22,&dominoex22_modem,"DOMX22","DominoEX 22","DOMINOEX22","DOMINO","DOMINO","","DM22", ARQ_IO | KISS_IO },
{MODE_DOMINOEX44,&dominoex44_modem,"DOMX44","DominoEX 44","DOMINOEX44","DOMINO","DOMINO","","DM44", ARQ_IO | KISS_IO },
{MODE_DOMINOEX88,&dominoex88_modem,"DOMX88","DominoEX 88","DOMINOEX88","DOMINO","DOMINO","","DM88", ARQ_IO | KISS_IO },
{MODE_FELDHELL,&feld_modem,"FELDHELL","Feld Hell","","HELL","HELL","","HELL", DISABLED_IO },
{MODE_SLOWHELL,&feld_slowmodem,"SLOWHELL","Slow Hell","","HELL","HELL","","SHLL", DISABLED_IO },
{MODE_HELLX5,&feld_x5modem,"HELLX5","Feld Hell X5","","HELL","HELL","","HLX5", DISABLED_IO },
{MODE_HELLX9,&feld_x9modem,"HELLX9","Feld Hell X9","","HELL","HELL","","HLX9", DISABLED_IO },
{MODE_FSKH245,&feld_FMmodem,"FSKH245","FSK Hell-245","","FSKH245","HELL","FSKH245","FSKHL", DISABLED_IO },
{MODE_FSKH105,&feld_FM105modem,"FSKH105","FSK Hell-105","","FSKH105","HELL","FSKH105","H105", DISABLED_IO },
{MODE_HELL80,&feld_80modem,"HELL80","Hell 80","","HELL80","HELL","HELL80","HL80", DISABLED_IO },
{MODE_MFSK8,&mfsk8_modem,"MFSK8","MFSK-8","MFSK8","MFSK8","MFSK","MFSK8","MK 8", DISABLED_IO },
{MODE_MFSK16,&mfsk16_modem,"MFSK16","MFSK-16","MFSK16","MFSK16","MFSK","MFSK16","MK16", ARQ_IO | KISS_IO },
{MODE_MFSK32,&mfsk32_modem,"MFSK32","MFSK-32","MFSK32","MFSK32","MFSK","MFSK32","MK32", ARQ_IO | KISS_IO },
{MODE_MFSK4,&mfsk4_modem,"MFSK4","MFSK-4","MFSK4","MFSK4","MFSK","MFSK4","MK 4", DISABLED_IO },
{MODE_MFSK11,&mfsk11_modem,"MFSK11","MFSK-11","MFSK11","MFSK11","MFSK","MFSK11","MK11", DISABLED_IO },
{MODE_MFSK22,&mfsk22_modem,"MFSK22","MFSK-22","MFSK22","MFSK22","MFSK","MFSK22","MK22", DISABLED_IO },
{MODE_MFSK31,&mfsk31_modem,"MFSK31","MFSK-31","MFSK31","MFSK31","MFSK","MFSK31","MK31", ARQ_IO | KISS_IO },
{MODE_MFSK64,&mfsk64_modem,"MFSK64","MFSK-64","MFSK64","MFSK64","MFSK","MFSK64","MK64", ARQ_IO | KISS_IO },
{MODE_MFSK128,&mfsk128_modem,"MFSK128","MFSK-128","MFSK128","MFSK128","MFSK","MFSK128","MK128", ARQ_IO | KISS_IO },
{MODE_MFSK64L,&mfsk64l_modem,"MFSK64L","MFSK-64L","MFSK64L","MFSK64L","MFSK","MFSK64","MK64L", ARQ_IO | KISS_IO },
{MODE_MFSK128L,&mfsk128l_modem,"MFSK128L","MFSK-128L","MFSK128L","MFSK128L","MFSK","MFSK128","MK128L", ARQ_IO | KISS_IO },
{MODE_WEFAX_576,&wefax576_modem,"WEFAX576","WEFAX-IOC576","WEFAXIOC576","FAX","FAX","","FX576", DISABLED_IO },
{MODE_WEFAX_288,&wefax288_modem,"WEFAX288","WEFAX-IOC288","WEFAXIOC288","FAX","FAX","","FX288", DISABLED_IO },
{MODE_NAVTEX,&navtex_modem,"NAVTEX","NAVTEX","NAVTEX","TOR","NAVTEX","","NAVTEX", DISABLED_IO },
{MODE_SITORB,&sitorb_modem,"SITORB","SITORB","SITORB","TOR","SITORB","","SITORB", DISABLED_IO },
{MODE_MT63_500S,&mt63_500S_modem,"MT63-500S","MT63-500S","MT63-500S","MT63-500S","MT63","","MT63-500S", ARQ_IO | KISS_IO },
{MODE_MT63_500L,&mt63_500L_modem,"MT63-500L","MT63-500L","MT63-500L","MT63-500L","MT63","","MT63-500L", ARQ_IO | KISS_IO },
{MODE_MT63_1000S,&mt63_1000S_modem,"MT63-1KS","MT63-1000S","MT63-1XXS","MT63-1KS","MT63","","MT63 1KS", ARQ_IO | KISS_IO },
{MODE_MT63_1000L,&mt63_1000L_modem,"MT63-1KL","MT63-1000L","MT63-1XXL","MT63-1KL","MT63","","MT63 1KL", ARQ_IO | KISS_IO },
{MODE_MT63_2000S,&mt63_2000S_modem,"MT63-2KS","MT63-2000S","MT63-2XXS","MT63-2KS","MT63","","MT63 2KS", ARQ_IO | KISS_IO },
{MODE_MT63_2000L,&mt63_2000L_modem,"MT63-2KL","MT63-2000L","MT63-2XXL","MT63-2KL","MT63","","MT63 2KL", ARQ_IO | KISS_IO },
{MODE_PSK31,&psk31_modem,"BPSK31","BPSK-31","PSK31","PSK31","PSK","PSK31","P31", ARQ_IO | KISS_IO },
{MODE_PSK63,&psk63_modem,"BPSK63","BPSK-63","PSK63","PSK63","PSK","PSK63","P63", ARQ_IO | KISS_IO },
{MODE_PSK63F,&psk63f_modem,"BPSK63F","BPSK-63F","PSK63F","PSK63F","PSK","PSK63F","P63F", ARQ_IO | KISS_IO },
{MODE_PSK125,&psk125_modem,"BPSK125","BPSK-125","PSK125","PSK125","PSK","PSK125","P125", ARQ_IO | KISS_IO },
{MODE_PSK250,&psk250_modem,"BPSK250","BPSK-250","PSK250","PSK250","PSK","PSK250","P250", ARQ_IO | KISS_IO },
{MODE_PSK500,&psk500_modem,"BPSK500","BPSK-500","PSK500","PSK500","PSK","PSK500","P500", ARQ_IO | KISS_IO },
{MODE_PSK1000,&psk1000_modem,"BPSK1000","BPSK-1000","PSK1000","PSK1000","PSK","PSK1000","P1000", ARQ_IO | KISS_IO },
{MODE_12X_PSK125,&psk125_c12_modem,"PSK125C12","12xPSK125","PSK125C12","PSK125C12","PSK","","P125C12", ARQ_IO | KISS_IO },
{MODE_6X_PSK250,&psk250_c6_modem,"PSK250C6","6xPSK250","PSK250C6","PSK250C6","PSK","","P2506", ARQ_IO | KISS_IO },
{MODE_2X_PSK500,&psk500_c2_modem,"PSK500C2","2xPSK500","PSK500C2","PSK500C2","PSK","","2xP500", ARQ_IO | KISS_IO },
{MODE_4X_PSK500,&psk500_c4_modem,"PSK500C4","4xPSK500","PSK500C4","PSK500C4","PSK","","4xP500", ARQ_IO | KISS_IO },
{MODE_2X_PSK800,&psk800_c2_modem,"PSK800C2","2xPSK800","PSK800C2","PSK800C2","PSK","","P800RC2", ARQ_IO | KISS_IO },
{MODE_2X_PSK1000,&psk1000_c2_modem,"PSK1000C2","2xPSK1000","PSK1000C2","PSK1000C2","PSK","","P1KC2", ARQ_IO | KISS_IO },
{MODE_QPSK31,&qpsk31_modem,"QPSK31","QPSK-31","QPSK31","QPSK31","PSK","QPSK31","Q31", ARQ_IO | KISS_IO },
{MODE_QPSK63,&qpsk63_modem,"QPSK63","QPSK-63","QPSK63","QPSK63","PSK","QPSK63","Q63", ARQ_IO | KISS_IO },
{MODE_QPSK125,&qpsk125_modem,"QPSK125","QPSK-125","QPSK125","QPSK125","PSK","QPSK125","Q125", ARQ_IO | KISS_IO },
{MODE_QPSK250,&qpsk250_modem,"QPSK250","QPSK-250","QPSK250","QPSK250","PSK","QPSK250","Q250", ARQ_IO | KISS_IO },
{MODE_QPSK500,&qpsk500_modem,"QPSK500","QPSK-500","QPSK500","QPSK500","PSK","QPSK500","Q500", ARQ_IO | KISS_IO },
{MODE_8PSK125,&_8psk125_modem,"8PSK125","8PSK-125","8PSK125","8PSK125","PSK","","8PSK125", ARQ_IO | KISS_IO },
{MODE_8PSK125FL,&_8psk125fl_modem,"8PSK125FL","8PSK-125FL","8PSK125FL","8PSK125FL","PSK","","8PSK125FL", ARQ_IO | KISS_IO },
{MODE_8PSK125F,&_8psk125f_modem,"8PSK125F","8PSK-125F","8PSK125F","8PSK125F","PSK","","8PSK125F", ARQ_IO | KISS_IO },
{MODE_8PSK250,&_8psk250_modem,"8PSK250","8PSK-250","8PSK250","8PSK250","PSK","","8PSK250", ARQ_IO | KISS_IO },
{MODE_8PSK250FL,&_8psk250fl_modem,"8PSK250FL","8PSK-250FL","8PSK250FL","8PSK250F","PSK","","8PSK250FL", ARQ_IO | KISS_IO },
{MODE_8PSK250F,&_8psk250f_modem,"8PSK250F","8PSK-250F","8PSK250F","8PSK250F","PSK","","8PSK250F", ARQ_IO | KISS_IO },
{MODE_8PSK500,&_8psk500_modem,"8PSK500","8PSK-500","8PSK500","8PSK500","PSK","","8PSK500", ARQ_IO | KISS_IO },
{MODE_8PSK500F,&_8psk500f_modem,"8PSK500F","8PSK-500F","8PSK500F","8PSK500F","PSK","","8PSK500F", ARQ_IO | KISS_IO },
{MODE_8PSK1000,&_8psk1000_modem,"8PSK1000","8PSK-1000","8PSK1000","8PSK1000","PSK","","8PSK1000", ARQ_IO | KISS_IO },
{MODE_8PSK1000F,&_8psk1000f_modem,"8PSK1000F","8PSK-1000F","8PSK1000F","8PSK1000F","PSK","","8PSK1000F", ARQ_IO | KISS_IO },
{MODE_8PSK1200F,&_8psk1200f_modem,"8PSK1200F","8PSK-1200F","8PSK1200F","8PSK1200F","PSK","","8PSK1200F", ARQ_IO | KISS_IO },
{MODE_OFDM_500F,&ofdm_500f_modem,"OFDM500F","OFDM-500F","OFDM500F","OFDM500F","OFDM","","OFDM500F", ARQ_IO | KISS_IO },
{MODE_OFDM_750F,&ofdm_750f_modem,"OFDM750F","OFDM-750F","OFDM750F","OFDM750F","OFDM","","OFDM750F", ARQ_IO | KISS_IO },
{MODE_OFDM_2000F,&ofdm_2000f_modem,"OFDM2000F","OFDM-2000F","OFDM2000F","OFDM2000F","OFDM","","OFDM2000F", ARQ_IO | KISS_IO },
{MODE_OFDM_2000,&ofdm_2000_modem,"OFDM2000","OFDM-2000","OFDM2000","OFDM2000","OFDM","","OFDM2000", ARQ_IO | KISS_IO },
{MODE_OFDM_3500,&ofdm_3500_modem,"OFDM3500","OFDM-3500","OFDM3500","OFDM3500","OFDM","","OFDM3500", ARQ_IO | KISS_IO },
{MODE_OLIVIA,&olivia_modem,"OLIVIA","OLIVIA","OLIVIA","OLIVIA","OLIVIA","","OL", DISABLED_IO },
{MODE_OLIVIA_4_125,&olivia_4_125_modem,"OLIVIA-4/125","OL 4-125","OLIV 4-125","OLIVIA 4/125","OLIVIA","OLIVIA 4/125","OL4/125", ARQ_IO },
{MODE_OLIVIA_4_250,&olivia_4_250_modem,"OLIVIA-4/250","OL 4-250","OLIV 4-250","OLIVIA 4/250","OLIVIA","OLIVIA 4/250","OL4/250", ARQ_IO },
{MODE_OLIVIA_4_500,&olivia_4_500_modem,"OLIVIA-4/500","OL 4-500","OLIV 4-500","OLIVIA 4/500","OLIVIA","OLIVIA 4/500","OL4/500", ARQ_IO | KISS_IO },
{MODE_OLIVIA_4_1000,&olivia_4_1000_modem,"OLIVIA-4/1K","OL 4-1K","OLIV 4-1K","OLIVIA 4/1K","OLIVIA","OLIVIA 4/1K","OL4/1K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_4_2000,&olivia_4_2000_modem,"OLIVIA-4/2K","OL 4-2K","OLIV 4-2K","OLIVIA 4/2K","OLIVIA","OLIVIA 4/2K","OL4/2K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_8_125,&olivia_8_125_modem,"OLIVIA-8/125","OL 8-125","OLIV 8-125","OLIVIA 8/125","OLIVIA","OLIVIA 8/125","OL8/125", ARQ_IO },
{MODE_OLIVIA_8_250,&olivia_8_250_modem,"OLIVIA-8/250","OL 8-250","OLIV 8-250","OLIVIA 8/250","OLIVIA","OLIVIA 8/250","OL8/250", ARQ_IO },
{MODE_OLIVIA_8_500,&olivia_8_500_modem,"OLIVIA-8/500","OL 8-500","OLIV 8-500","OLIVIA 8/500","OLIVIA","OLIVIA 8/500","OL8/500", ARQ_IO | KISS_IO },
{MODE_OLIVIA_8_1000,&olivia_8_1000_modem,"OLIVIA-8/1K","OL 8-1K","OLIV 8-1K","OLIVIA 8/1K","OLIVIA","OLIVIA 8/1K","OL8/1K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_8_2000,&olivia_8_2000_modem,"OLIVIA-8/2K","OL 8-2K","OLIV 8-2K","OLIVIA 8/2K","OLIVIA","OLIVIA 8/2K","OL8/1K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_16_500,&olivia_16_500_modem,"OLIVIA-16/500","OL 16-500","OLIV 16-500","OLIVIA 16/500","OLIVIA","OLIVIA 16/500","OL16/500", ARQ_IO | KISS_IO },
{MODE_OLIVIA_16_1000,&olivia_16_1000_modem,"OLIVIA-16/1K","OL 16-1K","OLIV 16-1K","OLIVIA 16/1K","OLIVIA","OLIVIA 16/1K","OL16/1K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_16_2000,&olivia_16_2000_modem,"OLIVIA-16/2K","OL 16-2K","OLIV 16-2K","OLIVIA 16/2K","OLIVIA","OLIVIA 16/2K","OL16/2K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_32_1000,&olivia_32_1000_modem,"OLIVIA-32/1K","OL 32-1K","OLIV 32-1K","OLIVIA 32/1K","OLIVIA","OLIVIA 32/1K","OL32/1K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_32_2000,&olivia_32_2000_modem,"OLIVIA-32/2K","OL 32-2K","OLIV 32-2K","OLIVIA 32/2K","OLIVIA","OLIVIA 32/2K","OL32/2K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_64_500,&olivia_64_500_modem,"OLIVIA-64/500","OL 64-500","OLIV 64-500","OLIVIA 64/500","OLIVIA","","OL64/500", ARQ_IO | KISS_IO },
{MODE_OLIVIA_64_1000,&olivia_64_1000_modem,"OLIVIA-64/1K","OL 64-1K","OLIV 64-1K","OLIVIA 64/1K","OLIVIA","","OL64/1K", ARQ_IO | KISS_IO },
{MODE_OLIVIA_64_2000,&olivia_64_2000_modem,"OLIVIA-64/2K","OL 64-2K","OLIV 64-2K","OLIVIA 64/2K","OLIVIA","","OL64/2K", ARQ_IO | KISS_IO },
{MODE_RTTY,&rtty_modem,"RTTY","RTTY","RTTY","RTTY","RTTY","","RY", DISABLED_IO },
{MODE_THORMICRO,&thormicro_modem,"THOR Micro","THOR Micro","THORM","THOR-M","THOR","","THM", DISABLED_IO },
{MODE_THOR4,&thor4_modem,"THOR4","THOR 4","THOR4","THOR4","THOR","","TH4", DISABLED_IO },
{MODE_THOR5,&thor5_modem,"THOR5","THOR 5","THOR5","THOR5","THOR","","TH5", DISABLED_IO },
{MODE_THOR8,&thor8_modem,"THOR8","THOR 8","THOR8","THOR8","THOR","","TH8", DISABLED_IO },
{MODE_THOR11,&thor11_modem,"THOR11","THOR 11","THOR11","THOR11","THOR","","TH11", DISABLED_IO },
{MODE_THOR16,&thor16_modem,"THOR16","THOR 16","THOR16","THOR16","THOR","","TH16", ARQ_IO | KISS_IO },
{MODE_THOR22,&thor22_modem,"THOR22","THOR 22","THOR22","THOR22","THOR","","TH22", ARQ_IO | KISS_IO },
{MODE_THOR25x4,&thor25x4_modem,"THOR25x4","THOR 25 x4","THOR25x4","THOR-25X4","THOR","","TH25", ARQ_IO | KISS_IO },
{MODE_THOR50x1,&thor50x1_modem,"THOR50x1","THOR 50 x1","THOR50x1","THOR-50X1","THOR","","TH51", ARQ_IO | KISS_IO },
{MODE_THOR50x2,&thor50x2_modem,"THOR50x2","THOR 50 x2","THOR50x2","THOR-50X2","THOR","","TH52", ARQ_IO | KISS_IO },
{MODE_THOR100,&thor100_modem,"THOR100","THOR 100","THOR100","THOR-100","THOR","","TH100", ARQ_IO | KISS_IO },
{MODE_THROB1,&throb1_modem,"THROB1","Throb 1","","THRB","THRB","","TB1", DISABLED_IO },
{MODE_THROB2,&throb2_modem,"THROB2","Throb 2","","THRB","THRB","","TB2", DISABLED_IO },
{MODE_THROB4,&throb4_modem,"THROB4","Throb 4","","THRB","THRB","","TB4", DISABLED_IO },
{MODE_THROBX1,&throbx1_modem,"THRBX1","ThrobX 1","","THRBX","THRB","THRBX","TX1", DISABLED_IO },
{MODE_THROBX2,&throbx2_modem,"THRBX2","ThrobX 2","","THRBX","THRB","THRBX","TX2", DISABLED_IO },
{MODE_THROBX4,&throbx4_modem,"THRBX4","ThrobX 4","","THRBX","THRB","THRBX","TX4", DISABLED_IO },
//{MODE_PACKET,&pkt_modem,"PACKET","Packet","","PKT","PKT","PKT",ARQ_IO | KISS_IO },
{MODE_PSK125R,&psk125r_modem,"PSK125R","PSK-125R","PSK125R","PSK125R","PSK","","P125R", ARQ_IO | KISS_IO },
{MODE_PSK250R,&psk250r_modem,"PSK250R","PSK-250R","PSK250R","PSK250R","PSK","","P250R", ARQ_IO | KISS_IO },
{MODE_PSK500R,&psk500r_modem,"PSK500R","PSK-500R","PSK500R","PSK500R","PSK","","P500R", ARQ_IO | KISS_IO },
{MODE_PSK1000R,&psk1000r_modem,"PSK1000R","PSK-1000R","PSK1000R","PSK1000R","PSK","","PSK1000R", ARQ_IO | KISS_IO },
{MODE_4X_PSK63R,&psk63r_c4_modem,"PSK63RC4","4xPSK63R","PSK63RC4","PSK63RC4","PSK","","P63R4", ARQ_IO | KISS_IO },
{MODE_5X_PSK63R,&psk63r_c5_modem,"PSK63RC5","5xPSK63R","PSK63RC5","PSK63RC5","PSK","","P63R5", ARQ_IO | KISS_IO },
{MODE_10X_PSK63R,&psk63r_c10_modem,"PSK63RC10","10xPSK63R","PSK63RC10","PSK63RC10","PSK","","P63R10", ARQ_IO | KISS_IO },
{MODE_20X_PSK63R,&psk63r_c20_modem,"PSK63RC20","20xPSK63R","PSK63RC20","PSK63RC20","PSK","","P63R20", ARQ_IO | KISS_IO },
{MODE_32X_PSK63R,&psk63r_c32_modem,"PSK63RC32","32xPSK63R","PSK63RC32","PSK63RC32","PSK","","P63R32", ARQ_IO | KISS_IO },
{MODE_4X_PSK125R,&psk125r_c4_modem,"PSK125RC4","4xPSK125R","PSK125RC4","PSK125RC4","PSK","","P125R4", ARQ_IO | KISS_IO },
{MODE_5X_PSK125R,&psk125r_c5_modem,"PSK125RC5","5xPSK125R","PSK125RC5","PSK125RC5","PSK","","P125R5", ARQ_IO | KISS_IO },
{MODE_10X_PSK125R,&psk125r_c10_modem,"PSK125RC10","10xPSK125R","PSK125RC10","PSK125RC10","PSK","","P125R10", ARQ_IO | KISS_IO },
{MODE_12X_PSK125R,&psk125r_c12_modem,"PSK125RC12","12xPSK125R","PSK125RC12","PSK125RC12","PSK","","P125R12", ARQ_IO | KISS_IO },
{MODE_16X_PSK125R,&psk125r_c16_modem,"PSK125RC16","16xPSK125R","PSK125RC16","PSK125RC16","PSK","","P125R16", ARQ_IO | KISS_IO },
{MODE_2X_PSK250R,&psk250r_c2_modem,"PSK250RC2","2xPSK250R","PSK250RC2","PSK250RC2","PSK","","P250R2", ARQ_IO | KISS_IO },
{MODE_3X_PSK250R,&psk250r_c3_modem,"PSK250RC3","3xPSK250R","PSK250RC3","PSK250RC3","PSK","","P250R3", ARQ_IO | KISS_IO },
{MODE_5X_PSK250R,&psk250r_c5_modem,"PSK250RC5","5xPSK250R","PSK250RC5","PSK250RC5","PSK","","P250R5", ARQ_IO | KISS_IO },
{MODE_6X_PSK250R,&psk250r_c6_modem,"PSK250RC6","6xPSK250R","PSK250RC6","PSK250RC6","PSK","","P250R6", ARQ_IO | KISS_IO },
{MODE_7X_PSK250R,&psk250r_c7_modem,"PSK250RC7","7xPSK250R","PSK250RC7","PSK250RC7","PSK","","P250R7", ARQ_IO | KISS_IO },
{MODE_2X_PSK500R,&psk500r_c2_modem,"PSK500RC2","2xPSK500R","PSK500RC2","PSK500RC2","PSK","","P500R2", ARQ_IO | KISS_IO },
{MODE_3X_PSK500R,&psk500r_c3_modem,"PSK500RC3","3xPSK500R","PSK500RC3","PSK500RC3","PSK","","P500R3", ARQ_IO | KISS_IO },
{MODE_4X_PSK500R,&psk500r_c4_modem,"PSK500RC4","4xPSK500R","PSK500RC4", "PSK500RC4","PSK","","P500R4", ARQ_IO | KISS_IO },
{MODE_2X_PSK800R,&psk800r_c2_modem,"PSK800RC2","2xPSK800R","PSK800RC2","PSK800RC2","PSK","","P800RC2", ARQ_IO | KISS_IO },
{MODE_2X_PSK1000R,&psk1000r_c2_modem,"PSK1000RC2","2xPSK1000R","PSK1000RC2","PSK1000RC2","PSK","","P1KRC2", ARQ_IO | KISS_IO },
{MODE_FSQ,&fsq_modem,"FSQ","FSQ","FSQ","FSQ","FSQ","","FSQ", DISABLED_IO },
{MODE_IFKP,&ifkp_modem,"IFKP","IFKP","IFKP","IFKP","IFKP","","IFKP", DISABLED_IO },
{MODE_SSB,&ssb_modem,"SSB","SSB","","SSB","SSB","","", DISABLED_IO },
{MODE_WWV,&wwv_modem,"WWV","WWV","","","","","", DISABLED_IO },
{MODE_ANALYSIS,&anal_modem,"ANALYSIS","Freq Analysis","","","","","", DISABLED_IO },
{MODE_FMT,&fmt_modem,"FMT","Frequency Measurement Test","","","","","", DISABLED_IO },
{MODE_EOT,&null_modem,"RSID_EOT","EOT","","EOT","","","", DISABLED_IO }
};
std::string adif2export(std::string adif)
{
std::string test = ucasestr(adif);
for (int n = 0; n < NUM_MODES; n++) {
if (test == ucasestr(mode_info[n].sname) ||
test == ucasestr(mode_info[n].adif_name) ||
test == ucasestr(mode_info[n].export_mode) ||
test == ucasestr(mode_info[n].export_submode))
return ucasestr(mode_info[n].export_mode);
}
return test;
}
std::string adif2submode(std::string adif)
{
std::string test = ucasestr(adif);
for (int n = 0; n < NUM_MODES; n++) {
if (test == ucasestr(mode_info[n].sname) ||
test == ucasestr(mode_info[n].adif_name) ||
test == ucasestr(mode_info[n].export_mode) ||
test == ucasestr(mode_info[n].export_submode))
return ucasestr(mode_info[n].export_submode);
}
return "";
}
std::ostream& operator<<(std::ostream& s, const qrg_mode_t& m)
{
return s << m.rfcarrier << ' '
<< m.rmode << ' '
<< m.carrier << ' '
<< mode_info[m.mode].sname << ' '
<< m.usage;
}
std::istream& operator>>(std::istream& s, qrg_mode_t& m)
{
std::string sMode;
char temp[255];
int mnbr;
s >> m.rfcarrier >> m.rmode >> m.carrier >> sMode;
s.getline(temp, 255);
m.usage = temp;
while (m.usage[0] == ' ') m.usage.erase(0,1);
// handle case for reading older type of specification std::string
if (sscanf(sMode.c_str(), "%d",&mnbr)) {
m.mode = mnbr;
return s;
}
m.mode = MODE_PSK31;
for (mnbr = MODE_CW; mnbr < NUM_MODES; mnbr++)
if (sMode == mode_info[mnbr].sname) {
m.mode = mnbr;
break;
}
return s;
}
std::string qrg_mode_t::str(void)
{
std::ostringstream s;
s << std::setiosflags(std::ios::fixed)
<< std::setprecision(3) << rfcarrier/1000.0 << '|'
<< rmode << '|'
<< (mode < NUM_MODES ? mode_info[mode].sname : "NONE") << '|'
// << carrier;
<< carrier << '|'
<< usage;
return s.str();
}
band_t band(long long freq_hz)
{
switch (freq_hz / 1000000LL) {
case 0: case 1: return BAND_160M;
case 3: return BAND_80M;
case 4: return BAND_75M;
case 5: return BAND_60M;
case 7: return BAND_40M;
case 10: return BAND_30M;
case 14: return BAND_20M;
case 18: return BAND_17M;
case 21: return BAND_15M;
case 24: return BAND_12M;
case 28 ... 29: return BAND_10M;
case 50 ... 54: return BAND_6M;
case 70 ... 71: return BAND_4M;
case 144 ... 148: return BAND_2M;
case 222 ... 225: return BAND_125CM;
case 420 ... 450: return BAND_70CM;
case 902 ... 928: return BAND_33CM;
case 1240 ... 1325: return BAND_23CM;
case 2300 ... 2450: return BAND_13CM;
case 3300 ... 3500: return BAND_9CM;
case 5650 ... 5925: return BAND_6CM;
case 10000 ... 10500: return BAND_3CM;
case 24000 ... 24250: return BAND_125MM;
case 47000 ... 47200: return BAND_6MM;
case 75500 ... 81000: return BAND_4MM;
case 119980 ... 120020: return BAND_2P5MM;
case 142000 ... 149000: return BAND_2MM;
case 241000 ... 250000: return BAND_1MM;
}
return BAND_OTHER;
}
band_t band(const char* freq_mhz)
{
errno = 0;
double d = strtod(freq_mhz, NULL);
if (d != 0.0 && errno == 0)
return band((long long)(d * 1e6));
else
return BAND_OTHER;
}
struct band_freq_t {
const char* band;
const char* freq;
};
static struct band_freq_t band_names[NUM_BANDS] = {
{ "160m", "1.8" },
{ "80m", "3.5" },
{ "75m", "4.0" },
{ "60m", "5.3" },
{ "40m", "7.0" },
{ "30m", "10.0" },
{ "20m", "14.0" },
{ "17m", "18.0" },
{ "15m", "21.0" },
{ "12m", "24.0" },
{ "10m", "28.0" },
{ "6m", "50.0" },
{ "4m", "70.0" },
{ "2m", "144.0" },
{ "1.25m", "222.0" },
{ "70cm", "420.0" },
{ "33cm", "902.0" },
{ "23cm", "1240.0" },
{ "13cm", "2300.0" },
{ "9cm", "3300.0" },
{ "6cm", "5650.0" },
{ "3cm", "10000.0" },
{ "1.25cm", "24000.0" },
{ "6mm", "47000.0" },
{ "4mm", "75500.0" },
{ "2.5mm", "119980.0" },
{ "2mm", "142000.0" },
{ "1mm", "241000.0" },
{ "other", "" }
};
const char* band_name(band_t b)
{
return band_names[CLAMP(b, 0, NUM_BANDS-1)].band;
}
const char* band_name(const char* freq_mhz)
{
return band_name(band(freq_mhz));
}
const char* band_freq(band_t b)
{
return band_names[CLAMP(b, 0, NUM_BANDS-1)].freq;
}
const char* band_freq(const char* band_name)
{
for (size_t i = 0; i < BAND_OTHER; i++)
if (!strcmp(band_names[i].band, band_name))
return band_names[i].freq;
return "";
}
| 24,995
|
C++
|
.cxx
| 372
| 65.473118
| 155
| 0.653719
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,130
|
dtmf.cxx
|
w1hkj_fldigi/src/dtmf/dtmf.cxx
|
// ----------------------------------------------------------------------------
//
// DTMF.cxx
//
// Copyright (C) 2011
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <cmath>
#include <cstring>
#include <float.h>
#include <samplerate.h>
#include "trx.h"
#include "dtmf.h"
#include "misc.h"
#include "fl_digi.h"
#include "configuration.h"
#include "qrunner.h"
#include "debug.h"
#include "status.h"
#include "main.h"
LOG_FILE_SOURCE(debug::LOG_MODEM);
// tones in 4x4 array
// 697 770 842 941 1209 1336 1447 1633
int cDTMF::row[] = {697, 770, 852, 941};
int cDTMF::col[] = {1209, 1336, 1477, 1633};
const char cDTMF::rc[] = "123A456B789C*0#D";
//======================================================================
// DTMF tone receive
//======================================================================
// tone #s and coefficients
// 8000 Hz sampling N == 240
// 11025 Hz sampling N == 331
/*
* calculate the power of each tone using Goertzel filters
*/
void cDTMF::calc_power()
{
double sr = active_modem->get_samplerate();
// reset row freq filters
for (int i = 0; i < 4; i++) filt[i]->reset(240, row[i], sr);
// reset col freq filters
for (int i = 0; i < 4; i++) filt[i+4]->reset(240, col[i], sr);
for (int i = 0; i < framesize; i++)
for (int j = 0; j < NUMTONES; j++)
filt[j]->run(data[i]);
for (int i = 0; i < NUMTONES; i++)
power[i] = filt[i]->mag();
maxpower = 0;
minpower = 1e6;
for (int i = 0; i < NUMTONES;i++) {
if (power[i] > maxpower)
maxpower = power[i];
if (power[i] < minpower)
minpower = power[i];
}
if ( minpower == 0 ) minpower = 1e-3;
}
/*
* detect which signals are present.
*
*/
int cDTMF::decode()
{
calc_power();
if (maxpower < (10 * progStatus.sldrSquelchValue))
return ' ';
int r = -1, c = -1;
double pwr = 0;
for (int i = 0; i < 4; i++)
if (power[i] > pwr) {
pwr = power[i];
r = i;
}
pwr = 0;
for (int i = 0; i < 4; i++)
if (power[i+4] > pwr) {
pwr = power[i+4];
c = i;
}
if (r == -1 || c == -1)
return ' ';
return rc[r*4 + c];
}
/*
* read in frames, output the decoded
* results
*/
void cDTMF::receive(const float* buf, size_t len)
{
int x;
static size_t dptr = 0;
size_t bufptr = 0;
if (!progdefaults.DTMFdecode) return;
framesize = (active_modem->get_samplerate() == 8000) ? 240 : 331;
while (1) {
int i;
for ( i = dptr; i < framesize; i++) {
data[i] = buf[bufptr];
bufptr++;
if (bufptr == len) break;
}
if (i < framesize) {
dptr = i + 1;
return;
}
dptr = 0;
x = decode();
if (x == ' ') {
silence_time++;
if (silence_time == 4 && !dtmfchars.empty()) dtmfchars += ' ';
if (silence_time == FLUSH_TIME) {
if (!dtmfchars.empty()) {
REQ(showDTMF, dtmfchars);
dtmfchars.clear();
}
silence_time = 0;
}
} else {
silence_time = 0;
if (x != last && last == ' ')
dtmfchars += x;
}
last = x;
}
}
//======================================================================
// DTMF tone transmit
//======================================================================
void cDTMF::makeshape()
{
for (int i = 0; i < 128; i++) shape[i] = 1.0;
for (int i = 0; i < RT; i++)
shape[i] = 0.5 * (1.0 - cos (M_PI * i / RT));
}
//----------------------------------------------------------------------
// transmit silence for specified time duration in milliseconds
//----------------------------------------------------------------------
void cDTMF::silence(int len)
{
double sr = active_modem->get_samplerate();
int length = len * sr / 1000;
if (length > 16384) length = 16384;
memset(outbuf, 0, length * sizeof(*outbuf));
active_modem->ModulateXmtr(outbuf, length);
}
//----------------------------------------------------------------------
// transmit DTMF tones for specific time interval
//----------------------------------------------------------------------
void cDTMF::two_tones(int ch)
{
if (!strchr(rc, ch)) return;
int pos = strchr(rc, ch) - rc;
int r = pos / 4;
int c = pos % 4;
double sr = active_modem->get_samplerate();
double phaseincr = 2.0 * M_PI * row[r] / sr;
double phase = 0;
int length = duration * sr / 1000;
if (length > 16384) length = 16384;
for (int i = 0; i < length; i++) {
outbuf[i] = 0.5 * sin(phase);
phase += phaseincr;
}
phaseincr = 2.0 * M_PI * col[c] / sr;
phase = 0;
for (int i = 0; i < length; i++) {
outbuf[i] += 0.5 * sin(phase);
phase += phaseincr;
}
for (int i = 0; i < RT; i++) {
outbuf[i] *= shape[i];
outbuf[length - 1 - i] *= shape[i];
}
active_modem->ModulateXmtr(outbuf, length);
}
//----------------------------------------------------------------------
// transmit the string contained in progdefaults.DTMFstr and output as
// dtmf valid characters, 0-9, *, #, A-D
// each pair of tones is separated by 50ms silence
// 500 msec silence for ' ', ',' or '-'
// 50 msec silence for invalid characters
//----------------------------------------------------------------------
void cDTMF::send()
{
int c = 0, delay = 0;
duration = 50;
RT = (int)(active_modem->get_samplerate() * 4 / 1000.0); // 4 msec edge
makeshape();
size_t colon = std::string::npos;
size_t modifier = progdefaults.DTMFstr.find("W");
if (modifier != std::string::npos) {
delay = atoi(&progdefaults.DTMFstr[modifier + 1]);
colon = progdefaults.DTMFstr.find(':', modifier);
progdefaults.DTMFstr.erase(modifier, colon - modifier + 1);
}
modifier = progdefaults.DTMFstr.find('L');
if (modifier != std::string::npos) {
duration = atoi(&progdefaults.DTMFstr[modifier + 1]);
colon = progdefaults.DTMFstr.find(':', modifier);
progdefaults.DTMFstr.erase(modifier, colon - modifier + 1);
}
while (delay > 50) { silence(50); delay -= 50;}
if (delay) silence(delay);
for(size_t i = 0; i < progdefaults.DTMFstr.length(); i++) {
c = progdefaults.DTMFstr[i];
if (c == ' ' || c == ',' || c == '-')
silence(duration);
else if ( (c >= '0' && c <= '9') ||
c == '*' ||
c == '#' ||
(c >= 'A' && c <= 'D') )
two_tones(c);
silence(duration);
}
progdefaults.DTMFstr.clear();
}
| 6,838
|
C++
|
.cxx
| 232
| 27.176724
| 79
| 0.542962
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,131
|
cw.cxx
|
w1hkj_fldigi/src/cw_rtty/cw.cxx
|
// ----------------------------------------------------------------------------
// cw.cxx -- morse code modem
//
// Copyright (C) 2006-2010
// Dave Freese, W1HKJ
// (C) Mauri Niininen, AG1LE
//
// This file is part of fldigi. Adapted from code contained in gmfsk source code
// distribution.
// gmfsk Copyright (C) 2001, 2002, 2003
// Tomi Manninen (oh2bns@sral.fi)
// Copyright (C) 2004
// Lawrence Glaister (ve7it@shaw.ca)
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <cstring>
#include <string>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <cstdlib>
#include "timeops.h"
#ifdef __MINGW32__
# include "compat.h"
#endif
#if !HAVE_CLOCK_GETTIME
# ifdef __APPLE__
# include <mach/mach_time.h>
# endif
#endif
#include "digiscope.h"
#include "waterfall.h"
#include "fl_digi.h"
#include "fftfilt.h"
#include "serial.h"
#include "ptt.h"
#include "main.h"
#include "cw.h"
#include "misc.h"
#include "configuration.h"
#include "confdialog.h"
#include "status.h"
#include "debug.h"
#include "FTextRXTX.h"
#include "modem.h"
#include "qrunner.h"
#include "winkeyer.h"
#include "nanoIO.h"
#include "KYkeying.h"
#include "ICOMkeying.h"
#include "YAESUkeying.h"
#include "audio_alert.h"
void start_cwio_thread();
void stop_cwio_thread();
#define XMT_FILT_LEN 256
#define QSK_DELAY_LEN 4*XMT_FILT_LEN
#define CW_FFT_SIZE 2048 // must be a factor of 2
static double nano_d2d = 0;
static int nano_wpm = 0;
const cw::SOM_TABLE cw::som_table[] = {
/* Prosigns */
{"-...-", {1.0, 0.33, 0.33, 0.33, 1.0, 0, 0} },
{".-.-", { 0.33, 1.0, 0.33, 1.0, 0, 0, 0} },
{".-...", { 0.33, 1.0, 0.33, 0.33, 0.33, 0, 0} },
{".-.-.", { 0.33, 1.0, 0.33, 1.0, 0.33, 0, 0} },
{"...-.-", { 0.33, 0.33, 0.33, 1.0, 0.33, 1.0, 0} },
{"-.--.", {1.0, 0.33, 1.0, 1.0, 0.33, 0, 0} },
{"..-.-", { 0.33, 0.33, 1.0, 0.33, 1.0, 0, 0} },
{"....--", { 0.33, 0.33, 0.33, 0.33, 1.0, 1.0, 0} },
{"...-.", { 0.33, 0.33, 0.33, 1.0, 0.33, 0, 0} },
/* ASCII 7bit letters */
{".-", { 0.33, 1.0, 0, 0, 0, 0, 0} },
{"-...", {1.0, 0.33, 0.33, 0.33, 0, 0, 0} },
{"-.-.", {1.0, 0.33, 1.0, 0.33, 0, 0, 0} },
{"-..", {1.0, 0.33, 0.33, 0, 0, 0, 0} },
{".", { 0.33, 0, 0, 0, 0, 0, 0} },
{"..-.", { 0.33, 0.33, 1.0, 0.33, 0, 0, 0} },
{"--.", {1.0, 1.0, 0.33, 0, 0, 0, 0} },
{"....", { 0.33, 0.33, 0.33, 0.33, 0, 0, 0} },
{"..", { 0.33, 0.33, 0, 0, 0, 0, 0} },
{".---", { 0.33, 1.0, 1.0, 1.0, 0, 0, 0} },
{"-.-", {1.0, 0.33, 1.0, 0, 0, 0, 0} },
{".-..", { 0.33, 1.0, 0.33, 0.33, 0, 0, 0} },
{"--", {1.0, 1.0, 0, 0, 0, 0, 0} },
{"-.", {1.0, 0.33, 0, 0, 0, 0, 0} },
{"---", {1.0, 1.0, 1.0, 0, 0, 0, 0} },
{".--.", { 0.33, 1.0, 1.0, 0.33, 0, 0, 0} },
{"--.-", {1.0, 1.0, 0.33, 1.0, 0, 0, 0} },
{".-.", { 0.33, 1.0, 0.33, 0, 0, 0, 0} },
{"...", { 0.33, 0.33, 0.33, 0, 0, 0, 0} },
{"-", {1.0, 0, 0, 0, 0, 0, 0} },
{"..-", { 0.33, 0.33, 1.0, 0, 0, 0, 0} },
{"...-", { 0.33, 0.33, 0.33, 1.0, 0, 0, 0} },
{".--", { 0.33, 1.0, 1.0, 0, 0, 0, 0} },
{"-..-", {1.0, 0.33, 0.33, 1.0, 0, 0, 0} },
{"-.--", {1.0, 0.33, 1.0, 1.0, 0, 0, 0} },
{"--..", {1.0, 1.0, 0.33, 0.33, 0, 0, 0} },
/* Numerals */
{"-----", {1.0, 1.0, 1.0, 1.0, 1.0, 0, 0} },
{".----", { 0.33, 1.0, 1.0, 1.0, 1.0, 0, 0} },
{"..---", { 0.33, 0.33, 1.0, 1.0, 1.0, 0, 0} },
{"...--", { 0.33, 0.33, 0.33, 1.0, 1.0, 0, 0} },
{"....-", { 0.33, 0.33, 0.33, 0.33, 1.0, 0, 0} },
{".....", { 0.33, 0.33, 0.33, 0.33, 0.33, 0, 0} },
{"-....", {1.0, 0.33, 0.33, 0.33, 0.33, 0, 0} },
{"--...", {1.0, 1.0, 0.33, 0.33, 0.33, 0, 0} },
{"---..", {1.0, 1.0, 1.0, 0.33, 0.33, 0, 0} },
{"----.", {1.0, 1.0, 1.0, 1.0, 0.33, 0, 0} },
/* Punctuation */
{".-..-.", { 0.33, 1.0, 0.33, 0.33, 1.0, 0.33, 0} },
{".----.", { 0.33, 1.0, 1.0, 1.0, 1.0, 0.33, 0} },
{"...-..-", { 0.33, 0.33, 0.33, 1.0, 0.33, 0.33, 1.0} },
{"-.---.", {1.0, 0.33, 1.0, 1.0, 0.33, 0, 0} },
{"-.--.-", {1.0, 0.33, 1.0, 1.0, 0.33, 1.0, 0} },
{"--..--", {1.0, 1.0, 0.33, 0.33, 1.0, 1.0, 0} },
{"-....-", {1.0, 0.33, 0.33, 0.33, 0.33, 1.0, 0} },
{".-.-.-", { 0.33, 1.0, 0.33, 1.0, 0.33, 1.0, 0} },
{"-..-.", {1.0, 0.33, 0.33, 1.0, 0.33, 0, 0} },
{"---...", {1.0, 1.0, 1.0, 0.33, 0.33, 0.33, 0} },
{"-.-.-.", {1.0, 0.33, 1.0, 0.33, 1.0, 0.33, 0} },
{"..--..", { 0.33, 0.33, 1.0, 1.0, 0.33, 0.33, 0} },
{"..--.-", { 0.33, 0.33, 1.0, 1.0, 0.33, 1.0, 0} },
{".--.-.", { 0.33, 1.0, 1.0, 0.33, 1.0, 0.33, 0} },
{"-.-.--", {1.0, 0.33, 1.0, 0.33, 1.0, 1.0, 0} },
{".-.-", {0.33, 1.0, 0.33, 1.0, 0, 0 , 0} }, // A umlaut, A aelig
{".--.-", {0.33, 1.0, 1.0, 0.33, 1.0, 0, 0 } }, // A ring
{"-.-..", {1.0, 0.33, 1.0, 0.33, 0.33, 0, 0} }, // C cedilla
{".-..-", {0.33, 1.0, 0.33, 0.33, 1.0, 0, 0} }, // E grave
{"..-..", {0.33, 0.33, 1.0, 0.33, 0.33, 0, 0} }, // E acute
{"---.", {1.0, 1.0, 1.0, 0.33, 0, 0, 0} }, // O acute, O umlat, O slash
{"--.--", {1.0, 1.0, 0.33, 1.0, 1.0, 0, 0} }, // N tilde
{"..--", {0.33, 0.33, 1.0, 1.0, 0, 0, 0} }, // U umlaut, U circ
{"", {0.0}}
};
int cw::normalize(float *v, int n, int twodots)
{
if( n == 0 ) return 0 ;
float max = v[0];
float min = v[0];
int j;
/* find max and min values */
for (j=1; j<n; j++) {
float vj = v[j];
if (vj > max) max = vj;
else if (vj < min) min = vj;
}
/* all values 0 - no need to normalize or decode */
if (max == 0.0) return 0;
/* scale values between [0,1] -- if Max longer than 2 dots it was "dah" and should be 1.0, otherwise it was "dit" and should be 0.33 */
float ratio = (max > twodots) ? 1.0 : 0.33 ;
ratio /= max ;
for (j=0; j<n; j++) v[j] *= ratio;
return (1);
}
std::string cw::find_winner (float *inbuf, int twodots)
{
float diffsf = 999999999999.0;
if ( normalize (inbuf, WGT_SIZE, twodots) == 0) return " ";
int winner = -1;
for ( int n = 0; som_table[n].rpr.length(); n++) {
/* Compute the distance between codebook and input entry */
float difference = 0.0;
for (int i = 0; i < WGT_SIZE; i++) {
float diff = (inbuf[i] - som_table[n].wgt[i]);
difference += diff * diff;
if (difference > diffsf) break;
}
/* If distance is smaller than previous distances */
if (difference < diffsf) {
winner = n;
diffsf = difference;
}
}
std::string sc;
if (!som_table[winner].rpr.empty()) {
sc = morse->rx_lookup(som_table[winner].rpr);
if (sc.empty())
sc = (progdefaults.CW_noise == '*' ? "*" :
progdefaults.CW_noise == '_' ? "_" :
progdefaults.CW_noise == ' ' ? " " : "");
} else
sc = (progdefaults.CW_noise == '*' ? "*" :
progdefaults.CW_noise == '_' ? "_" :
progdefaults.CW_noise == ' ' ? " " : "");
return sc;
}
void cw::tx_init()
{
phaseacc = 0;
lastsym = 0;
qskphase = 0;
if (progdefaults.pretone) pretone();
symbols = 0;
acc_symbols = 0;
ovhd_symbols = 0;
maxval = 0.0;
}
void cw::rx_init()
{
cw_receive_state = RS_IDLE;
smpl_ctr = 0;
cw_rr_current = 0;
cw_ptr = 0;
agc_peak = 0;
set_scope_mode(Digiscope::SCOPE);
update_Status();
usedefaultWPM = false;
scope_clear = true;
viewcw.restart();
}
void cw::init()
{
bool wfrev = wf->Reverse();
bool wfsb = wf->USB();
reverse = wfrev ^ !wfsb;
if (progdefaults.StartAtSweetSpot)
set_freq(progdefaults.CWsweetspot);
else if (progStatus.carrier != 0) {
set_freq(progStatus.carrier);
#if !BENCHMARK_MODE
progStatus.carrier = 0;
#endif
} else
set_freq(wf->Carrier());
trackingfilter->reset();
two_dots = (long int)trackingfilter->run(2 * cw_send_dot_length);
put_cwRcvWPM(cw_send_speed);
memset(outbuf, 0, OUTBUFSIZE*sizeof(*outbuf));
memset(qskbuf, 0, OUTBUFSIZE*sizeof(*qskbuf));
morse->init();
use_paren = progdefaults.CW_use_paren;
prosigns = progdefaults.CW_prosigns;
rx_init();
stopflag = false;
maxval = 0;
if (use_nanoIO) set_nanoCW();
}
cw::~cw() {
if (cw_FFT_filter) delete cw_FFT_filter;
if (bitfilter) delete bitfilter;
if (trackingfilter) delete trackingfilter;
stop_cwio_thread();
}
cw::cw() : modem()
{
cap |= CAP_BW;
mode = MODE_CW;
freqlock = false;
usedefaultWPM = false;
frequency = progdefaults.CWsweetspot;
tx_frequency = get_txfreq_woffset();
risetime = progdefaults.CWrisetime;
QSKshape = progdefaults.QSKshape;
cw_ptr = 0;
clrcount = CLRCOUNT;
samplerate = CW_SAMPLERATE;
fragmentsize = CWMaxSymLen;
wpm = cw_speed = progdefaults.CWspeed;
bandwidth = progdefaults.CWbandwidth;
cw_send_speed = cw_speed;
cw_receive_speed = cw_speed;
two_dots = 2 * KWPM / cw_speed;
cw_noise_spike_threshold = two_dots / 4;
cw_send_dot_length = KWPM / cw_send_speed;
cw_send_dash_length = 3 * cw_send_dot_length;
symbollen = (int)round(samplerate * 1.2 / progdefaults.CWspeed); // transmit char rate
fsymlen = (int)round(samplerate * 1.2 / progdefaults.CWfarnsworth); // transmit word rate
rx_rep_buf.clear();
// block of variables that get updated each time speed changes
pipesize = (22 * samplerate * 12) / (progdefaults.CWspeed * 160);
if (pipesize < 0) pipesize = 512;
if (pipesize > MAX_PIPE_SIZE) pipesize = MAX_PIPE_SIZE;
cwTrack = true;
phaseacc = 0.0;
FFTphase = 0.0;
FFTvalue = 0.0;
pipeptr = 0;
clrcount = 0;
upper_threshold = progdefaults.CWupper;
lower_threshold = progdefaults.CWlower;
for (int i = 0; i < MAX_PIPE_SIZE; clearpipe[i++] = 0.0);
agc_peak = 1.0;
in_replay = 0;
use_matched_filter = progdefaults.CWmfilt;
bandwidth = progdefaults.CWbandwidth;
if (use_matched_filter)
progdefaults.CWbandwidth = bandwidth = 5.0 * progdefaults.CWspeed / 1.2;
cw_FFT_filter = new fftfilt(1.0 * progdefaults.CWbandwidth / samplerate, CW_FFT_SIZE);
int bfv = symbollen / ( 2 * DEC_RATIO);
if (bfv < 1) bfv = 1;
bitfilter = new Cmovavg(bfv);
trackingfilter = new Cmovavg(TRACKING_FILTER_SIZE);
create_edges();
nano_wpm = progdefaults.CWspeed;
nano_d2d = progdefaults.CWdash2dot;
sync_parameters();
REQ(static_cast<void (waterfall::*)(int)>(&waterfall::Bandwidth), wf, (int)bandwidth);
REQ(static_cast<int (Fl_Value_Slider2::*)(double)>(&Fl_Value_Slider2::value), sldrCWbandwidth, (int)bandwidth);
update_Status();
synchscope = 50;
noise_floor = 1.0;
sig_avg = 0.0;
cal_wpm = 20;
start_cwio_thread();
}
// SHOULD ONLY BE CALLED FROM THE rx_processing loop
void cw::reset_rx_filter()
{
if (use_matched_filter != progdefaults.CWmfilt ||
cw_speed != progdefaults.CWspeed ||
(bandwidth != progdefaults.CWbandwidth && !use_matched_filter)) {
use_matched_filter = progdefaults.CWmfilt;
cw_send_speed = cw_speed = progdefaults.CWspeed;
if (use_matched_filter)
progdefaults.CWbandwidth = bandwidth = 5.0 * progdefaults.CWspeed / 1.2;
else
bandwidth = progdefaults.CWbandwidth;
cw_FFT_filter->create_lpf(1.0 * bandwidth / samplerate);
FFTphase = 0;
REQ(static_cast<void (waterfall::*)(int)>(&waterfall::Bandwidth),
wf, (int)bandwidth);
REQ(static_cast<int (Fl_Value_Slider2::*)(double)>(&Fl_Value_Slider2::value),
sldrCWbandwidth, (int)bandwidth);
pipesize = (22 * samplerate * 12) / (progdefaults.CWspeed * 160);
if (pipesize < 0) pipesize = 512;
if (pipesize > MAX_PIPE_SIZE) pipesize = MAX_PIPE_SIZE;
two_dots = 2 * KWPM / cw_speed;
cw_noise_spike_threshold = two_dots / 4;
cw_send_dot_length = KWPM / cw_send_speed;
cw_send_dash_length = 3 * cw_send_dot_length;
symbollen = (int)round(samplerate * 1.2 / progdefaults.CWspeed);
fsymlen = (int)round(samplerate * 1.2 / progdefaults.CWfarnsworth);
phaseacc = 0.0;
FFTphase = 0.0;
FFTvalue = 0.0;
pipeptr = 0;
clrcount = 0;
smpl_ctr = 0;
rx_rep_buf.clear();
int bfv = symbollen / ( 2 * DEC_RATIO);
if (bfv < 1) bfv = 1;
bitfilter->setLength(bfv);
siglevel = 0;
}
}
// sync_parameters()
// Synchronize the dot, dash, end of element, end of character, and end
// of word timings and ranges to new values of Morse speed, or receive tolerance.
void cw::sync_transmit_parameters()
{
// wpm = usedefaultWPM ? progdefaults.defCWspeed : progdefaults.CWspeed;
fwpm = progdefaults.CWfarnsworth;
cw_send_dot_length = KWPM / progdefaults.CWspeed;
cw_send_dash_length = 3 * cw_send_dot_length;
nusymbollen = (int)round(samplerate * 1.2 / progdefaults.CWspeed);
nufsymlen = (int)round(samplerate * 1.2 / fwpm);
if (symbollen != nusymbollen ||
nufsymlen != fsymlen ||
risetime != progdefaults.CWrisetime ||
QSKshape != progdefaults.QSKshape) {
risetime = progdefaults.CWrisetime;
QSKshape = progdefaults.QSKshape;
symbollen = nusymbollen;
fsymlen = nufsymlen;
create_edges();
}
}
void cw::sync_parameters()
{
sync_transmit_parameters();
if (use_nanoIO) {
if (nano_wpm != progdefaults.CWspeed) {
nano_wpm = progdefaults.CWspeed;
set_nanoWPM(progdefaults.CWspeed);
}
if (nano_d2d != progdefaults.CWdash2dot) {
nano_d2d = progdefaults.CWdash2dot;
set_nano_dash2dot(progdefaults.CWdash2dot);
}
}
// check if user changed the tracking or the cw default speed
if ((cwTrack != progdefaults.CWtrack) ||
(cw_send_speed != progdefaults.CWspeed)) {
trackingfilter->reset();
two_dots = 2 * cw_send_dot_length;
put_cwRcvWPM(cw_send_speed);
}
cwTrack = progdefaults.CWtrack;
cw_send_speed = progdefaults.CWspeed;
// Receive parameters:
lowerwpm = cw_send_speed - progdefaults.CWrange;
upperwpm = cw_send_speed + progdefaults.CWrange;
if (lowerwpm < progdefaults.CWlowerlimit)
lowerwpm = progdefaults.CWlowerlimit;
if (upperwpm > progdefaults.CWupperlimit)
upperwpm = progdefaults.CWupperlimit;
cw_lower_limit = 2 * KWPM / upperwpm;
cw_upper_limit = 2 * KWPM / lowerwpm;
if (cwTrack)
cw_receive_speed = KWPM / (two_dots / 2);
else {
cw_receive_speed = cw_send_speed;
two_dots = 2 * cw_send_dot_length;
}
if (cw_receive_speed > 0)
cw_receive_dot_length = KWPM / cw_receive_speed;
else
cw_receive_dot_length = KWPM / 5;
cw_receive_dash_length = 3 * cw_receive_dot_length;
cw_noise_spike_threshold = cw_receive_dot_length / 2;
}
//=======================================================================
// cw_update_tracking()
//=======================================================================
inline void cw::update_tracking(int dur_1, int dur_2)
{
static int min_dot = KWPM / 200;
static int max_dash = 3 * KWPM / 5;
if ((dur_1 > dur_2) && (dur_1 > 4 * dur_2)) return;
if ((dur_2 > dur_1) && (dur_2 > 4 * dur_1)) return;
if (dur_1 < min_dot || dur_2 < min_dot) return;
if (dur_2 > max_dash || dur_2 > max_dash) return;
two_dots = trackingfilter->run((dur_1 + dur_2) / 2);
sync_parameters();
}
void cw::update_Status()
{
put_MODEstatus("CW %s Rx %d", usedefaultWPM ? "*" : " ", cw_receive_speed);
}
//=======================================================================
//update_syncscope()
//Routine called to update the display on the sync scope display.
//For CW this is an o scope pattern that shows the cw data streacwTrackm.
//=======================================================================
//
void cw::update_syncscope()
{
if (pipesize < 0 || pipesize > MAX_PIPE_SIZE)
return;
for (int i = 0; i < pipesize; i++)
scopedata[i] = 0.96*pipe[i]+0.02;
set_scope_xaxis_1(siglevel);
set_scope(scopedata, pipesize, true);
scopedata.next(); // change buffers
clrcount = CLRCOUNT;
put_cwRcvWPM(cw_receive_speed);
update_Status();
}
void cw::clear_syncscope()
{
set_scope_xaxis_1(siglevel);
set_scope(clearpipe, pipesize, false);
clrcount = CLRCOUNT;
}
cmplx cw::mixer(cmplx in)
{
cmplx z (cos(phaseacc), sin(phaseacc));
z = z * in;
phaseacc += TWOPI * frequency / samplerate;
if (phaseacc > TWOPI) phaseacc -= TWOPI;
return z;
}
//=====================================================================
// cw_rxprocess()
// Called with a block (size SCBLOCKSIZE samples) of audio.
//
//======================================================================
void cw::decode_stream(double value)
{
std::string sc;
std::string somc;
int attack = 0;
int decay = 0;
switch (progdefaults.cwrx_attack) {
case 0: attack = 400; break;//100; break;
case 1: default: attack = 200; break;//50; break;
case 2: attack = 100;//25;
}
switch (progdefaults.cwrx_decay) {
case 0: decay = 2000; break;//1000; break;
case 1: default : decay = 1000; break;//500; break;
case 2: decay = 500;//250;
}
sig_avg = decayavg(sig_avg, value, decay);
if (value < sig_avg) {
if (value < noise_floor)
noise_floor = decayavg(noise_floor, value, attack);
else
noise_floor = decayavg(noise_floor, value, decay);
}
if (value > sig_avg) {
if (value > agc_peak)
agc_peak = decayavg(agc_peak, value, attack);
else
agc_peak = decayavg(agc_peak, value, decay);
}
float norm_noise = noise_floor / agc_peak;
float norm_sig = sig_avg / agc_peak;
siglevel = norm_sig;
if (agc_peak)
value /= agc_peak;
else
value = 0;
metric = 0.8 * metric;
if ((noise_floor > 1e-4) && (noise_floor < sig_avg))
metric += 0.2 * clamp(2.5 * (20*log10(sig_avg / noise_floor)) , 0, 100);
float diff = (norm_sig - norm_noise);
progdefaults.CWupper = norm_sig - 0.2 * diff;
progdefaults.CWlower = norm_noise + 0.7 * diff;
pipe[pipeptr] = value;
if (++pipeptr == pipesize) pipeptr = 0;
if (!progStatus.sqlonoff || metric > progStatus.sldrSquelchValue ) {
// Power detection using hysterisis detector
// upward trend means tone starting
if ((value > progdefaults.CWupper) && (cw_receive_state != RS_IN_TONE)) {
handle_event(CW_KEYDOWN_EVENT, sc);
}
// downward trend means tone stopping
if ((value < progdefaults.CWlower) && (cw_receive_state == RS_IN_TONE)) {
handle_event(CW_KEYUP_EVENT, sc);
}
}
if (handle_event(CW_QUERY_EVENT, sc) == CW_SUCCESS) {
update_syncscope();
synchscope = 100;
if (progdefaults.CWuseSOMdecoding) {
somc = find_winner(cw_buffer, two_dots);
if (!somc.empty())
for (size_t n = 0; n < somc.length(); n++)
put_rx_char(
somc[n],
somc[0] == '<' ? FTextBase::CTRL : FTextBase::RECV);
cw_ptr = 0;
memset(cw_buffer, 0, sizeof(cw_buffer));
} else {
for (size_t n = 0; n < sc.length(); n++)
put_rx_char(
sc[n],
sc[0] == '<' ? FTextBase::CTRL : FTextBase::RECV);
}
} else if (--synchscope == 0) {
synchscope = 25;
update_syncscope();
}
}
void cw::rx_FFTprocess(const double *buf, int len)
{
cmplx z, *zp;
int n;
while (len-- > 0) {
z = cmplx ( *buf * cos(FFTphase), *buf * sin(FFTphase) );
FFTphase += TWOPI * frequency / samplerate;
if (FFTphase > TWOPI) FFTphase -= TWOPI;
buf++;
n = cw_FFT_filter->run(z, &zp); // n = 0 or filterlen/2
if (!n) continue;
for (int i = 0; i < n; i++) {
// update the basic sample counter used for morse timing
++smpl_ctr;
if (smpl_ctr % DEC_RATIO) continue; // decimate by DEC_RATIO
// demodulate
FFTvalue = abs(zp[i]);
FFTvalue = bitfilter->run(FFTvalue);
decode_stream(FFTvalue);
} // for (i =0; i < n ...
} //while (len-- > 0)
}
static bool cwprocessing = false;
int cw::rx_process(const double *buf, int len)
{
if (use_paren != progdefaults.CW_use_paren ||
prosigns != progdefaults.CW_prosigns) {
use_paren = progdefaults.CW_use_paren;
prosigns = progdefaults.CW_prosigns;
morse->init();
}
if (cwprocessing)
return 0;
cwprocessing = true;
reset_rx_filter();
rx_FFTprocess(buf, len);
if (!clrcount--) clear_syncscope();
display_metric(metric);
if ( (dlgViewer->visible() || progStatus.show_channels )
&& !bHighSpeed && !bHistory )
viewcw.rx_process(buf, len);
cwprocessing = false;
return 0;
}
// ----------------------------------------------------------------------
// Compare two timestamps, and return the difference between them in usecs.
inline int cw::usec_diff(unsigned int earlier, unsigned int later)
{
return (earlier >= later) ? 0 : (later - earlier);
}
//=======================================================================
// handle_event()
// high level cw decoder... gets called with keyup, keydown, reset and
// query commands.
// Keyup/down influences decoding logic.
// Reset starts everything out fresh.
// The query command returns CW_SUCCESS and the character that has
// been decoded (may be '*',' ' or [a-z,0-9] or a few others)
// If there is no data ready, CW_ERROR is returned.
//=======================================================================
int cw::handle_event(int cw_event, std::string &sc)
{
static int space_sent = true; // for word space logic
static int last_element = 0; // length of last dot/dash
int element_usec; // Time difference in usecs
switch (cw_event) {
case CW_RESET_EVENT:
sync_parameters();
cw_receive_state = RS_IDLE;
cw_rr_current = 0; // reset decoding pointer
cw_ptr = 0;
memset(cw_buffer, 0, sizeof(cw_buffer));
smpl_ctr = 0; // reset audio sample counter
rx_rep_buf.clear();
break;
case CW_KEYDOWN_EVENT:
// A receive tone start can only happen while we
// are idle, or in the middle of a character.
if (cw_receive_state == RS_IN_TONE)
return CW_ERROR;
// first tone in idle state reset audio sample counter
if (cw_receive_state == RS_IDLE) {
smpl_ctr = 0;
rx_rep_buf.clear();
cw_rr_current = 0;
cw_ptr = 0;
}
// save the timestamp
cw_rr_start_timestamp = smpl_ctr;
// Set state to indicate we are inside a tone.
old_cw_receive_state = cw_receive_state;
cw_receive_state = RS_IN_TONE;
return CW_ERROR;
break;
case CW_KEYUP_EVENT:
// The receive state is expected to be inside a tone.
if (cw_receive_state != RS_IN_TONE)
return CW_ERROR;
// Save the current timestamp
cw_rr_end_timestamp = smpl_ctr;
element_usec = usec_diff(cw_rr_start_timestamp, cw_rr_end_timestamp);
// make sure our timing values are up to date
sync_parameters();
// If the tone length is shorter than any noise cancelling
// threshold that has been set, then ignore this tone.
if (cw_noise_spike_threshold > 0
&& element_usec < cw_noise_spike_threshold) {
cw_receive_state = RS_IDLE;
return CW_ERROR;
}
// Set up to track speed on dot-dash or dash-dot pairs for this test to work, we need a dot dash pair or a
// dash dot pair to validate timing from and force the speed tracking in the right direction. This method
// is fundamentally different than the method in the unix cw project. Great ideas come from staring at the
// screen long enough!. Its kind of simple really ... when you have no idea how fast or slow the cw is...
// the only way to get a threshold is by having both code elements and setting the threshold between them
// knowing that one is supposed to be 3 times longer than the other. with straight key code... this gets
// quite variable, but with most faster cw sent with electronic keyers, this is one relationship that is
// quite reliable. Lawrence Glaister (ve7it@shaw.ca)
if (last_element > 0) {
// check for dot dash sequence (current should be 3 x last)
if ((element_usec > 2 * last_element) &&
(element_usec < 4 * last_element)) {
update_tracking(last_element, element_usec);
}
// check for dash dot sequence (last should be 3 x current)
if ((last_element > 2 * element_usec) &&
(last_element < 4 * element_usec)) {
update_tracking(element_usec, last_element);
}
}
last_element = element_usec;
// ok... do we have a dit or a dah?
// a dot is anything shorter than 2 dot times
if (element_usec <= two_dots) {
rx_rep_buf += CW_DOT_REPRESENTATION;
// printf("%d dit ", last_element/1000); // print dot length
cw_buffer[cw_ptr++] = (float)last_element;
} else {
// a dash is anything longer than 2 dot times
rx_rep_buf += CW_DASH_REPRESENTATION;
cw_buffer[cw_ptr++] = (float)last_element;
}
// We just added a representation to the receive buffer.
// If it's full, then reset everything as it probably noise
if (rx_rep_buf.length() > MAX_MORSE_ELEMENTS) {
cw_receive_state = RS_IDLE;
cw_rr_current = 0; // reset decoding pointer
cw_ptr = 0;
smpl_ctr = 0; // reset audio sample counter
return CW_ERROR;
} else {
// zero terminate representation
// rx_rep_buf.clear();
cw_buffer[cw_ptr] = 0.0;
}
// All is well. Move to the more normal after-tone state.
cw_receive_state = RS_AFTER_TONE;
return CW_ERROR;
break;
case CW_QUERY_EVENT:
// this should be called quite often (faster than inter-character gap) It looks after timing
// key up intervals and determining when a character, a word space, or an error char '*' should be returned.
// CW_SUCCESS is returned when there is a printable character. Nothing to do if we are in a tone
if (cw_receive_state == RS_IN_TONE)
return CW_ERROR;
// compute length of silence so far
sync_parameters();
element_usec = usec_diff(cw_rr_end_timestamp, smpl_ctr);
// SHORT time since keyup... nothing to do yet
if (element_usec < (2 * cw_receive_dot_length))
return CW_ERROR;
// MEDIUM time since keyup... check for character space
// one shot through this code via receive state logic
// FARNSWOTH MOD HERE -->
if (element_usec >= (2 * cw_receive_dot_length) &&
element_usec <= (4 * cw_receive_dot_length) &&
cw_receive_state == RS_AFTER_TONE) {
// Look up the representation
sc = morse->rx_lookup(rx_rep_buf);
if (sc.empty()) {
// invalid decode... let user see error
sc = (progdefaults.CW_noise == '*' ? "*" :
progdefaults.CW_noise == '_' ? "_" :
progdefaults.CW_noise == ' ' ? " " : "");
}
rx_rep_buf.clear();
cw_receive_state = RS_IDLE;
cw_rr_current = 0; // reset decoding pointer
space_sent = false;
cw_ptr = 0;
return CW_SUCCESS;
}
// LONG time since keyup... check for a word space
// FARNSWOTH MOD HERE -->
if ((element_usec > (4 * cw_receive_dot_length)) && !space_sent) {
sc = " ";
space_sent = true;
return CW_SUCCESS;
}
// should never get here... catch all
return CW_ERROR;
break;
}
// should never get here... catch all
return CW_ERROR;
}
//===========================================================================
// cw transmit routines
// Define the amplitude envelop for key down events (32 samples long)
// this is 1/2 cycle of a raised cosine
//===========================================================================
double keyshape[CWKNUM];
double QSKkeyshape[CWKNUM];
void cw::create_edges()
{
for (int i = 0; i < CWKNUM; i++) keyshape[i] = 1.0;
switch (QSKshape) {
case 1: // blackman
knum = (int)(risetime * CW_SAMPLERATE / 1000);
if (knum >= symbollen) knum = symbollen;
for (int i = 0; i < knum; i++)
keyshape[i] = (0.42 - 0.50 * cos(M_PI * i/ knum) + 0.08 * cos(2 * M_PI * i / knum));
break;
case 0: // hanning
default:
knum = (int)(risetime * CW_SAMPLERATE / 1000);
if (knum >= symbollen) knum = symbollen;
for (int i = 0; i < knum; i++)
keyshape[i] = 0.5 * (1.0 - cos (M_PI * i / knum));
}
for (int i = 0; i < CWKNUM; i++) QSKkeyshape[i] = 1.0;
switch (QSKshape) {
case 1: // blackman
qnum = (int)(progdefaults.QSKrisetime * CW_SAMPLERATE / 1000);
if (qnum >= symbollen) qnum = symbollen;
for (int i = 0; i < qnum; i++)
QSKkeyshape[i] = (0.42 - 0.50 * cos(M_PI * i/ qnum) + 0.08 * cos(2 * M_PI * i / qnum));
break;
case 0: // hanning
default:
qnum = (int)(progdefaults.QSKrisetime * CW_SAMPLERATE / 1000);
if (qnum >= symbollen) qnum = symbollen;
for (int i = 0; i < qnum; i++)
QSKkeyshape[i] = 0.5 * (1.0 - cos (M_PI * i / qnum));
}
}
inline double cw::nco(double freq)
{
phaseacc += 2.0 * M_PI * freq / samplerate;
if (phaseacc > TWOPI) phaseacc -= TWOPI;
return sin(phaseacc);
}
inline double cw::qsknco()
{
double amp;
amp = sin(qskphase);
qskphase += TWOPI * progdefaults.QSKfrequency / samplerate;
if (qskphase > TWOPI) qskphase -= TWOPI;
return amp;
}
//=====================================================================
// send_symbol()
// Sends a part of a morse character (one dot duration) of either
// sound at the correct freq or silence. Rise and fall time is controlled
// with a raised cosine shape.
//
// Left channel contains the shaped A2 CW waveform
// Right channel contains a square wave signal that is used
// to trigger a qsk switch. Right channel has pre and post timings for
// proper switching of the qsk switch before and after the A2 element.
// If the Pre + Post timing exceeds the interelement spacing then the
// Pre and / or Post is only applied at the beginning and end of the
// character.
//=======================================================================
bool first_char = true;
enum {START, FIRST, MID, LAST, SPACE};
void cw::send_symbol(int bit, int len, int state)
{
double qsk_amp = progdefaults.QSK ? progdefaults.QSKamp : 0.0;
sync_transmit_parameters();
acc_symbols += len;
memset(outbuf, 0, OUTBUFSIZE*sizeof(*outbuf));
memset(qskbuf, 0, OUTBUFSIZE*sizeof(*qskbuf));
if (bit == 1) { // keydown
tx_frequency = get_txfreq_woffset();
if (CW_KEYLINE_isopen ||
progdefaults.CW_KEYLINE_on_cat_port ||
progdefaults.CW_KEYLINE_on_ptt_port)
tx_frequency = progdefaults.CWsweetspot;
for (int n = 0; n < len; n++) {
outbuf[n] = nco(tx_frequency);
if (n < knum) outbuf[n] *= keyshape[n];
if (len - n < knum) outbuf[n] *= keyshape[len - n];
qskbuf[n] = qsk_amp * qsknco();
}
} else { // keyup
for (int n = 0; n < len; n++) {
outbuf[n] = 0;
if (progdefaults.QSK) {
qskbuf[n] = 0;
if (state == START || state == FIRST) {
qskbuf[n] = 0;
if (n > len - kpre) {
qskbuf[n] = qsk_amp * qsknco();
if (n < len - kpre + qnum)
qskbuf[n] *= QSKkeyshape[n - (len - kpre)];
}
} else if (state == MID) {
qskbuf[n] = qsk_amp * qsknco();
if (len > kpre + kpost) {
if (n < kpost)
qskbuf[n] *= QSKkeyshape[kpost - n];
else if (n > len - kpre)
qskbuf[n] *= QSKkeyshape[n - (len - kpre)];
else qskbuf[n] = 0;
}
} else if (state == LAST) {
qskbuf[n] = qsk_amp * qsknco();
if (n > kpost - qnum)
qskbuf[n] *= QSKkeyshape[kpost - n];
if (n >= kpost) qskbuf[n] = 0;
} else { // state == SPACE
qskbuf[n] = 0;
}
}
}
}
if (progdefaults.QSK)
ModulateStereo(outbuf, qskbuf, len);
else
ModulateXmtr(outbuf, len);
}
//=====================================================================
// send_ch()
// sends a morse character and the space afterwards
//=======================================================================
void cw::send_ch(int ch)
{
std::string code;
float kfactor = CW_SAMPLERATE / 1000.0;
float tc = 1200.0 / progdefaults.CWspeed;
float ta = 0.0;
float tch = 3 * tc, twd = 4 * tc;
if (progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth)) {
ta = 60000.0 / progdefaults.CWfarnsworth - 37200.0 / progdefaults.CWspeed;
tch = 3 * ta / 19;
twd = 4 * ta / 19;
}
tc *= kfactor;
tch *= kfactor;
twd *= kfactor;
sync_parameters();
if (progdefaults.CWpre < progdefaults.QSKrisetime)
kpre = progdefaults.QSKrisetime * kfactor;
else
kpre = progdefaults.CWpre * kfactor;
if (progdefaults.CWpost < progdefaults.QSKrisetime)
kpost = progdefaults.QSKrisetime * kfactor;
else
kpost = progdefaults.CWpost * kfactor;
if ((ch == ' ') || (ch == '\n')) {
send_symbol(0,
twd,
SPACE);
put_echo_char(progdefaults.rx_lowercase ? tolower(ch) : ch);
return;
}
code = morse->tx_lookup(ch);
if (!code.length()) {
return;
}
float w = (progdefaults.CWdash2dot + 1) / (progdefaults.CWdash2dot -1);
int elements = code.length();
if (kpre)
send_symbol(
0,
(first_char ? kpre :
(kpre < 3 * tc - kpost) ? kpre :
3 * tc ),
(first_char ? START : FIRST));
for (int n = 0; n < elements; n++) {
send_symbol(1,
(code[n] == '-' ? (w + 1) : (w - 1)) * symbollen,
MID);
send_symbol(0,
((n < elements - 1) ? tc :
(kpost + kpre < 3 * tc) ? tch - kpre:
tch),
(n < elements - 1 ? MID : LAST) );
}
if (ch != -1) {
std::string prtstr = morse->tx_print();
for (size_t n = 0; n < prtstr.length(); n++)
put_echo_char(
prtstr[n],
prtstr[0] == '<' ? FTextBase::CTRL : FTextBase::XMIT);
}
}
//=====================================================================
// cw_txprocess()
// Read characters from screen and send them out the sound card.
// This is called repeatedly from a thread during tx.
//=======================================================================
int cw::tx_process()
{
int c = get_tx_char();
if (c == GET_TX_CHAR_NODATA) {
if (stopflag) {
stopflag = false;
put_echo_char('\n');
first_char = true;
return -1;
}
Fl::awake();
MilliSleep(50);
return 0;
}
if (progdefaults.use_FLRIGkeying) {
if (c == GET_TX_CHAR_ETX || stopflag) {
stopflag = false;
put_echo_char('\n');
return -1;
}
flrig_cwio_send(c);
put_echo_char(c);
return 0;
}
if (progStatus.WK_online) {
if (c == GET_TX_CHAR_ETX || stopflag) {
stopflag = false;
put_echo_char('\n');
return -1;
}
if (WK_send_char(c)) {
put_echo_char('\n');
return -1; // WinKeyer problem
}
return 0;
}
if (use_nanoIO) {
if (c == GET_TX_CHAR_ETX || stopflag) {
stopflag = false;
put_echo_char('\n');
return -1;
}
nano_send_char(c);
put_echo_char(c);
return 0;
}
if (progdefaults.use_ELCTkeying || progdefaults.use_KNWDkeying) {
if (c == GET_TX_CHAR_ETX || stopflag) {
stopflag = false;
put_echo_char('\n');
return -1;
}
KYkeyer_send_char(c);
put_echo_char(c);
return 0;
}
if (progdefaults.use_ICOMkeying) {
if (c == GET_TX_CHAR_ETX || stopflag) {
stopflag = false;
put_echo_char('\n');
return -1;
}
ICOMkeyer_send_char(c);
put_echo_char(c);
return 0;
}
if (progdefaults.use_YAESUkeying) {
if (c == GET_TX_CHAR_ETX || stopflag) {
stopflag = false;
put_echo_char('\n');
return -1;
}
FTkeyer_send_char(c);
put_echo_char(c);
return 0;
}
if (c == GET_TX_CHAR_ETX || stopflag) {
stopflag = false;
put_echo_char('\n');
first_char = true;
return -1;
}
acc_symbols = 0;
if (CW_KEYLINE_isopen ||
progdefaults.CW_KEYLINE_on_cat_port ||
progdefaults.CW_KEYLINE_on_ptt_port)
send_CW(c);
// else {
send_ch(c);
first_char = false;
// }
char_samples = acc_symbols;
return 0;
}
void cw::incWPM()
{
if (usedefaultWPM) return;
if (progdefaults.CWspeed < progdefaults.CWupperlimit) {
progdefaults.CWspeed++;
sync_parameters();
set_CWwpm();
update_Status();
}
}
void cw::decWPM()
{
if (usedefaultWPM) return;
if (progdefaults.CWspeed > progdefaults.CWlowerlimit) {
progdefaults.CWspeed--;
set_CWwpm();
sync_parameters();
update_Status();
}
}
void cw::toggleWPM()
{
usedefaultWPM = !usedefaultWPM;
if (usedefaultWPM) {
wpm = progdefaults.CWspeed;
progdefaults.CWspeed = progdefaults.defCWspeed;
} else {
progdefaults.CWspeed = wpm;
}
sync_parameters();
update_Status();
}
// ---------------------------------------------------------------------
// CW output on DTR/RTS signal lines
//----------------------------------------------------------------------
Cserial CW_KEYLINE_serial;
bool CW_KEYLINE_isopen = false;
int open_CW_KEYLINE()
{
CW_KEYLINE_serial.Device(progdefaults.CW_KEYLINE_serial_port_name);
CW_KEYLINE_serial.Baud(progdefaults.BaudRate(9));
CW_KEYLINE_serial.RTS(false);
CW_KEYLINE_serial.DTR(false);
CW_KEYLINE_serial.RTSptt(false);
CW_KEYLINE_serial.DTRptt(false);
CW_KEYLINE_serial.RestoreTIO(true);
CW_KEYLINE_serial.RTSCTS(false);
CW_KEYLINE_serial.Stopbits(1);
LOG_DEBUG("\n\
CW Keyline Serial port parameters:\n\
device : %s\n\
baudrate : %d\n\
stopbits : %d\n\
initial rts: %+d\n\
initial dtr: %+d\n\
restore tio: %c\n\
flowcontrol: %c\n",
CW_KEYLINE_serial.Device().c_str(),
CW_KEYLINE_serial.Baud(),
CW_KEYLINE_serial.Stopbits(),
(CW_KEYLINE_serial.RTS() ? +12 : -12),
(CW_KEYLINE_serial.DTR() ? +12 : -12),
(CW_KEYLINE_serial.RestoreTIO() ? 'T' : 'F'),
(CW_KEYLINE_serial.RTSCTS() ? 'T' : 'F')
);
if (CW_KEYLINE_serial.OpenPort() == false) {
LOG_ERROR("Cannot open serial port %s", CW_KEYLINE_serial.Device().c_str());
CW_KEYLINE_isopen = false;
return 0;
}
CW_KEYLINE_isopen = true;
return 1;
}
void close_CW_KEYLINE()
{
CW_KEYLINE_serial.ClosePort();
CW_KEYLINE_isopen = false;
}
//----------------------------------------------------------------------
#include <queue>
static pthread_t cwio_pthread;
static pthread_cond_t cwio_cond;
static pthread_mutex_t cwio_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t fifo_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t cwio_ptt_mutex = PTHREAD_MUTEX_INITIALIZER;
static bool cwio_thread_running = false;
static bool cwio_terminate_flag = false;
static bool cwio_calibrate_flag = false;
//----------------------------------------------------------------------
static int cwio_ch;
static cMorse *cwio_morse = 0;
static std::queue<int> fifo;
static std::string cwio_prosigns;
//----------------------------------------------------------------------
// CW output using flrig cwio calls
//----------------------------------------------------------------------
static char lastcwiochar = 0;
void flrig_cwio_send(char c)
{
if (cwio_morse == 0) {
cwio_morse = new cMorse;
cwio_morse->init();
}
// if (c == '[') {
// flrig_cwio_ptt(1);
// return;
// }
// if (c == ']') {
// flrig_cwio_ptt(0);
// return;
// }
std::string s = " ";
s[0] = c;
flrig_cwio_send_text(s);
if (c == '[' || c == ']')
return;
int tc = 1200 / progdefaults.CWspeed;
if (progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth))
tc = 1200 / progdefaults.CWfarnsworth;
if (c == ' ') {
if (lastcwiochar == ' ')
tc *= 7;
else
tc *= 5;
} else
tc *= (cwio_morse->tx_length(c));
lastcwiochar = c;
MilliSleep(tc);
}
//----------------------------------------------------------------------
void cwio_key(int on)
{
if (CW_KEYLINE_isopen ||
progdefaults.CW_KEYLINE_on_cat_port ||
progdefaults.CW_KEYLINE_on_ptt_port) {
Cserial *ser = &CW_KEYLINE_serial;
if (progdefaults.CW_KEYLINE_on_cat_port)
ser = &rigio;
else if (progdefaults.CW_KEYLINE_on_ptt_port)
ser = &push2talk->serPort;
switch (progdefaults.CW_KEYLINE) {
case 0: break;
case 1: ser->SetRTS(on); break;
case 2: ser->SetDTR(on); break;
}
}
}
void cwio_ptt(int on)
{
if (CW_KEYLINE_isopen ||
progdefaults.CW_KEYLINE_on_cat_port ||
progdefaults.CW_KEYLINE_on_ptt_port) {
Cserial *ser = &CW_KEYLINE_serial;
if (progdefaults.CW_KEYLINE_on_cat_port)
ser = &rigio;
else if (progdefaults.CW_KEYLINE_on_ptt_port)
ser = &push2talk->serPort;
switch (progdefaults.PTT_KEYLINE) {
case 0: break;
case 1: ser->SetRTS(on); break;
case 2: ser->SetDTR(on); break;
}
}
}
/*
#define cwio_bit(bit, len) {\
switch (progdefaults.CW_KEYLINE) {\
case 0: break;\
case 1: ser->SetRTS(bit); break;\
case 2: ser->SetDTR(bit); break;\
}\
MilliSleep(len);}
*/
// return accurate time of day in secs
double cwio_now()
{
static struct timespec tp;
#if HAVE_CLOCK_GETTIME
clock_gettime(CLOCK_MONOTONIC, &tp);
// return 1000.0 * tp.tv_sec + tp.tv_nsec * 1e-6;
#elif defined(__WIN32__)
DWORD msec = GetTickCount();
return 1.0 * msec;
tp.tv_sec = msec / 1000;
tp.tv_nsec = (msec % 1000) * 1000000;
#elif defined(__APPLE__)
static mach_timebase_info_data_t info = { 0, 0 };
if (unlikely(info.denom == 0))
mach_timebase_info(&info);
uint64_t t = mach_absolute_time() * info.numer / info.denom;
// return t * 1e-6;
tp.tv_sec = t / 1000000000;
tp.tv_nsec = t % 1000000000;
#endif
return 1.0 * tp.tv_sec + tp.tv_nsec * 1e-9;
}
// set DTR/RTS to bit value for msecs duration
//#define CW_TTEST
#ifdef CW_TTEST
static FILE *cwio_test = 0;
#endif
void cwio_bit(int bit, double msecs)
{
std::cout << bit << " : " << msecs << std::endl;
#ifdef CW_TTEST
if (!cwio_test) cwio_test = fopen("cwio_test.txt", "a");
#endif
static double secs;
static struct timespec tv = { 0, 1000000L};
static double end1 = 0;
static double end2 = 0;
static double t1 = 0;
#ifdef CW_TTEST
static double t2 = 0;
#endif
static double t3 = 0;
static double t4 = 0;
int loop1 = 0;
int loop2 = 0;
int n1 = msecs * 1e3;
secs = msecs * 1e-3;
#ifdef __WIN32__
timeBeginPeriod(1);
#endif
t1 = cwio_now();
end2 = t1 + secs - 0.00001;
cwio_key(bit);
#ifdef CW_TTEST
t2 = t3 = cwio_now();
#else
t3 = cwio_now();
#endif
end1 = end2 - 0.005;
while (t3 < end1 && (++loop1 < n1)) {
nanosleep(&tv, NULL);
t3 = cwio_now();
}
t4 = t3;
while (t4 <= end2) {
loop2++;
t4 = cwio_now();
}
#ifdef __WIN32__
timeEndPeriod(1);
#endif
#ifdef CW_TTEST
if (cwio_test)
fprintf(cwio_test, "%d, %d, %d, %6f, %6f, %6f, %6f, %6f, %6f, %6f\n",
bit, loop1, loop2,
secs * 1e3,
(t2 - t1)*1e3,
(t3 - t1)*1e3,
(t3 - end1) * 1e3,
(t4 - t1)*1e3,
(t4 - end2) * 1e3,
(t4 - t1 - secs)*1e3);
#endif
}
void send_cwio(int c)
{
if (c == GET_TX_CHAR_NODATA || c == 0x0d) {
return;
}
float tc = 1200.0 / progdefaults.CWspeed;
if (tc <= 0) tc = 1;
float ta = 0.0;
float tch = 3 * tc, twd = 4 * tc;
// Cserial *ser = &CW_KEYLINE_serial;
// if (progdefaults.CW_KEYLINE_on_cat_port)
// ser = &rigio;
// else if (progdefaults.CW_KEYLINE_on_ptt_port)
// ser = &push2talk->serPort;
if (progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth)) {
ta = 60000.0 / progdefaults.CWfarnsworth - 37200 / progdefaults.CWspeed;
tch = 3 * ta / 19;
twd = 4 * ta / 19;
}
if (c == 0x0a) c = ' ';
if (c == ' ') {
cwio_bit(0, twd);
return;
}
std::string code;
code = cwio_morse->tx_lookup(c);
if (!code.length()) {
return;
}
double xcvr_corr = progdefaults.CWkeycomp;
if (xcvr_corr < -tc / 2) xcvr_corr = - tc / 2;
else if (xcvr_corr > tc / 2) xcvr_corr = tc / 2;
guard_lock lk(&cwio_ptt_mutex);
for (size_t n = 0; n < code.length(); n++) {
if (code[n] == '.') {
cwio_bit(1, tc + xcvr_corr);
} else {
cwio_bit(1, 3*tc + xcvr_corr);
}
if (n < code.length() -1) {
cwio_bit(0, tc - xcvr_corr);
} else {
cwio_bit(0, tch - xcvr_corr);
}
}
}
unsigned long start_time = 0L;
unsigned long end_time = 0L;
int testwpm = 20;
void cwio_calibrate_finished(void *)
{
double ratio = 60000.0 / (end_time - start_time);
btn_cw_dtr_calibrate->value(0);
static char result[100];
snprintf(result, sizeof(result), "Time: %0.4f secs, %%error: %0.2f",
(end_time - start_time) / 1000.0,
100.0 * (1-ratio));
LOG_INFO("\n%s\n", result);
cwio_test_result->value(result);
cwio_test_result->redraw();
}
void cwio_calibrate()
{
std::string paris = "PARIS ";
bool farnsworth = progdefaults.CWusefarnsworth;
progdefaults.CWusefarnsworth = false;
guard_lock lk(&fifo_mutex);
start_time = zmsec();
for (int i = 0; i < progdefaults.CWspeed; i++)
for (size_t n = 0; n < paris.length(); n++)
send_cwio(paris[n]);
end_time = zmsec();
progdefaults.CWusefarnsworth = farnsworth;
Fl::awake(cwio_calibrate_finished);
}
static void * cwio_loop(void *args)
{
SET_THREAD_ID(CWIO_TID);
cwio_thread_running = true;
cwio_terminate_flag = false;
while(1) {
pthread_mutex_lock(&cwio_mutex);
pthread_cond_wait(&cwio_cond, &cwio_mutex);
pthread_mutex_unlock(&cwio_mutex);
if (cwio_terminate_flag)
break;
if (cwio_calibrate_flag) {
cwio_calibrate();
cwio_calibrate_flag = false;
}
while (!fifo.empty()) {
{
guard_lock lk(&fifo_mutex);
cwio_ch = fifo.front();
fifo.pop();
}
send_cwio(cwio_ch);
}
}
return (void *)0;
}
void calibrate_cwio()
{
if (!cwio_thread_running)
start_cwio_thread();
if (cwio_morse == 0) {
cwio_morse = new cMorse;
cwio_morse->init();
}
cwio_calibrate_flag = true;
pthread_cond_signal(&cwio_cond);
}
void stop_cwio_thread(void)
{
if(!cwio_thread_running) return;
cwio_terminate_flag = true;
pthread_cond_signal(&cwio_cond);
MilliSleep(10);
pthread_join(cwio_pthread, NULL);
pthread_mutex_destroy(&cwio_mutex);
pthread_cond_destroy(&cwio_cond);
memset((void *) &cwio_pthread, 0, sizeof(cwio_pthread));
memset((void *) &cwio_mutex, 0, sizeof(cwio_mutex));
cwio_thread_running = false;
cwio_terminate_flag = false;
delete cwio_morse;
cwio_morse = 0;
}
void start_cwio_thread(void)
{
if (cwio_thread_running) return;
memset((void *) &cwio_pthread, 0, sizeof(cwio_pthread));
memset((void *) &cwio_mutex, 0, sizeof(cwio_mutex));
memset((void *) &cwio_cond, 0, sizeof(cwio_cond));
if(pthread_cond_init(&cwio_cond, NULL)) {
LOG_ERROR("Alert thread create fail (pthread_cond_init)");
return;
}
if(pthread_mutex_init(&cwio_mutex, NULL)) {
LOG_ERROR("AUDIO_ALERT thread create fail (pthread_mutex_init)");
return;
}
if (pthread_create(&cwio_pthread, NULL, cwio_loop, NULL) < 0) {
pthread_mutex_destroy(&cwio_mutex);
LOG_ERROR("AUDIO_ALERT thread create fail (pthread_create)");
}
LOG_DEBUG("started audio cwio thread");
MilliSleep(10); // Give the CPU time to set 'cwio_thread_running'
}
void cw::send_CW(int c)
{
if (!cwio_thread_running)
start_cwio_thread();
if (cwio_morse == 0) {
cwio_morse = new cMorse;
cwio_morse->init();
}
if (cwio_prosigns != progdefaults.CW_prosigns) {
cwio_prosigns = progdefaults.CW_prosigns;
cwio_morse->init();
}
guard_lock lk(&fifo_mutex);
fifo.push(c);
pthread_cond_signal(&cwio_cond);
}
unsigned long CAT_start_time = 0L;
unsigned long CAT_end_time = 0L;
void CAT_keying_calibrate_finished(void *)
{
out_CATkeying_compensation->value(progdefaults.CATkeying_compensation / 1000.0);
char info[1000];
snprintf(info, sizeof(info),
"Speed test: %.0f wpm : %0.2f secs",
progdefaults.CWspeed,
progdefaults.CATkeying_compensation / 1000.0);
LOG_DEBUG("\n%s", info);
}
static pthread_t CW_keying_pthread;
bool CW_CAT_thread_running = false;
void *do_CAT_keying_calibrate(void *args)
{
CW_CAT_thread_running = true;
LOG_DEBUG("%s", "CAT keying calibrate thread running");
bool tempcwTrack = active_modem->get_cwTrack();
progdefaults.CWtrack = false;
active_modem->set_cwTrack(false);
LOG_DEBUG("1");
progdefaults.CWspeed = cntCW_WPM->value();
active_modem->calWPM(progdefaults.CWspeed);
sldrCWxmtWPM->value(progdefaults.CWspeed);
cntr_nanoCW_WPM->value(progdefaults.CWspeed);
LOG_DEBUG("2");
bool farnsworth = progdefaults.CWusefarnsworth;
progdefaults.CWusefarnsworth = false;
progdefaults.CATkeying_compensation = 0;
LOG_DEBUG("3");
if (progStatus.WK_online) {
WK_set_wpm();
WK_reset_timing();
} else if (progdefaults.use_KNWDkeying || progdefaults.use_ELCTkeying)
set_KYkeyer();
else if (progdefaults.use_ICOMkeying)
set_ICOMkeyer();
else if (progdefaults.use_YAESUkeying)
set_FTkeyer();
LOG_DEBUG("4");
std::string paris = "PARIS ";
CAT_start_time = zmsec();
LOG_DEBUG("5");
for (int i = 0; i < progdefaults.CWspeed; i++) {
LOG_DEBUG("6");
for (size_t n = 0; n < paris.length(); n++) {
LOG_DEBUG("7");
if (progdefaults.use_KNWDkeying || progdefaults.use_ELCTkeying)
KYkeyer_send_char(paris[n]);
else if (progdefaults.use_ICOMkeying)
ICOMkeyer_send_char(paris[n]);
else if (progdefaults.use_YAESUkeying)
FTkeyer_send_char(paris[n]);
else if (progStatus.WK_online) {
WK_send_char(paris[n]);
}
Fl::awake();
}
}
CAT_end_time = zmsec();
progdefaults.CATkeying_compensation = (CAT_end_time - CAT_start_time - 60000);
if (progStatus.WK_online)
WK_set_comp();
progdefaults.CWusefarnsworth = farnsworth;
Fl::awake(CAT_keying_calibrate_finished);
CW_CAT_thread_running = false;
progdefaults.CWtrack = tempcwTrack;
active_modem->set_cwTrack(tempcwTrack);
LOG_DEBUG("%s", "exiting calibration thread");
return NULL;
}
void CAT_keying_calibrate()
{
if (CW_CAT_thread_running) return;
if (pthread_create(&CW_keying_pthread, NULL, do_CAT_keying_calibrate, NULL) < 0) {
LOG_ERROR("CW CAT calibration thread create failed");
return;
}
LOG_DEBUG("started CW CAT calibration thread");
MilliSleep(10);
}
void CAT_keying_test_finished(void *)
{
int comp = (CAT_end_time - CAT_start_time - 60000);
out_CATkeying_test_result->value(comp / 1000.0);
}
void *do_CAT_keying_test(void *args)
{
CW_CAT_thread_running = true;
bool tempcwTrack = active_modem->get_cwTrack();
progdefaults.CWtrack = false;
active_modem->set_cwTrack(false);
progdefaults.CWspeed = cntCW_WPM->value();
sldrCWxmtWPM->value(progdefaults.CWspeed);
cntr_nanoCW_WPM->value(progdefaults.CWspeed);
progdefaults.CW_cal_speed = progdefaults.CWspeed;
bool farnsworth = progdefaults.CWusefarnsworth;
progdefaults.CWusefarnsworth = false;
if (progStatus.WK_online) {
WK_set_wpm();
} else if (progdefaults.use_KNWDkeying || progdefaults.use_ELCTkeying)
set_KYkeyer();
else if (progdefaults.use_ICOMkeying)
set_ICOMkeyer();
else if (progdefaults.use_YAESUkeying)
set_FTkeyer();
std::string paris = "PARIS ";
CAT_start_time = zmsec();
for (int i = 0; i < progdefaults.CW_cal_speed; i++) {
for (size_t n = 0; n < paris.length(); n++) {
if (progStatus.WK_online) {
WK_send_char(paris[n]);
}
if (progdefaults.use_KNWDkeying || progdefaults.use_ELCTkeying)
KYkeyer_send_char(paris[n]);
else if (progdefaults.use_ICOMkeying)
ICOMkeyer_send_char(paris[n]);
else if (progdefaults.use_YAESUkeying)
FTkeyer_send_char(paris[n]);
Fl::awake();
}
}
CAT_end_time = zmsec();
progdefaults.CWusefarnsworth = farnsworth;
Fl::awake(CAT_keying_test_finished);
CW_CAT_thread_running = false;
progdefaults.CWtrack = tempcwTrack;
active_modem->set_cwTrack(tempcwTrack);
return NULL;
}
void CAT_keying_test()
{
if (CW_CAT_thread_running) return;
if (pthread_create(&CW_keying_pthread, NULL, do_CAT_keying_test, NULL) < 0) {
LOG_ERROR("CW CAT calibration thread create failed");
return;
}
LOG_DEBUG("started CW CAT calibration thread");
MilliSleep(10);
}
| 50,565
|
C++
|
.cxx
| 1,619
| 28.712786
| 137
| 0.621259
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,132
|
Nav.cxx
|
w1hkj_fldigi/src/cw_rtty/Nav.cxx
|
// ----------------------------------------------------------------------------
// Nav.cxx -- Interface to Arduino Nano Nav keyer
//
// Copyright (C) 2018
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <iostream>
#include <fstream>
#include "main.h"
#include "fl_digi.h"
#include "gettext.h"
#include "rtty.h"
#include "serial.h"
#include "Nav.h"
bool use_Nav = false;
static int tty_mode = LETTERS;
static Cserial Nav_serial;
static Cserial Nav_config;
//#define NAVDEBUG 1
static void print_string(std::string s)
{
#ifdef NAVDEBUG
std::string fname = HomeDir;
fname.append("nav_debug.txt");
std::ofstream dbgfile(fname.c_str(), std::ios::app);
dbgfile << s;
dbgfile.close();
#else
LOG_INFO("%s", s.c_str());
#endif
ReceiveText->add(s.c_str());
}
static std::string Nav_config_string = "\
11101111012";
static std::string config_params = "\
||||||||||+-10 FSK stop bits - 1:1, 2:1.5, 3: 2 bits\n\
|||||||||+---9 FSK BAUD rate - 1: 45.45, 2: 75, 3: 100 baud\n\
||||||||+----8 FSK PTT - 0: PTT disabled, 1: PTT enabled\n\
|||||||+-----7 FSK side tone - 0: no tone, 1: tone\n\
||||||+------6 FSK polarity - 0: reverse, 1: normal polarity\n\
|||||+-------5 CAT LED behavior - 0: steady, 1: on-access poll\n\
||||+--------4 LED brightness - 0: DIM, 1: normal brightness\n\
|||+---------3 WinKey PTT - 0: no PTT, 1: WinKey PTT\n\
||+----------2 RF attenuator - 0: 20db atten', 1: no atten'\n\
|+-----------1 CH.2 attenuator - 0: 15db atten', 1: no atten'\n\
+------------0 CH.1 attenuator - 0: 15db atten', 1: no atten'\n";
void Nav_update_config_controls()
{
switch (Nav_config_string[0]) { // channel 1 attenuator
default:
case '1': sel_Nav_ch1->index(1); break;
case '0': sel_Nav_ch1->index(0); break;
}
switch (Nav_config_string[1]) { // channel 2 attenuator
default:
case '1': sel_Nav_ch2->index(1); break;
case '0': sel_Nav_ch2->index(0); break;
}
switch (Nav_config_string[2]) { // rf attenuator
default:
case '1': sel_Nav_rf_att->index(1); break;
case '0': sel_Nav_rf_att->index(0); break;
}
switch (Nav_config_string[3]) { // Winkey PTT
default:
case '1': sel_Nav_wk_ptt->index(0); break;
case '0': sel_Nav_wk_ptt->index(1); break;
}
switch (Nav_config_string[4]) { // LED
default:
case '1': sel_Nav_LED->index(1); break;
case '0': sel_Nav_LED->index(0); break;
}
switch (Nav_config_string[5]) { // CAT LED
default:
case '1': sel_Nav_CAT_LED->index(1); break;
case '0': sel_Nav_CAT_LED->index(0); break;
}
switch (Nav_config_string[6]) { // polarity
default:
case '0': sel_Nav_FSK_polarity->index(1); break;
case '1': sel_Nav_FSK_polarity->index(0); break;
}
switch (Nav_config_string[7]) { // sidetone
default:
case '1': sel_Nav_FSK_sidetone->index(0); break;
case '0': sel_Nav_FSK_sidetone->index(1); break;
}
switch (Nav_config_string[8]) { // PTT
default:
case '1': sel_Nav_FSK_ptt->index(0); break;
case '0': sel_Nav_FSK_ptt->index(1); break;
}
switch (Nav_config_string[9]) { // baud
default:
case '1' : sel_Nav_FSK_baud->index(0); break;
case '2' : sel_Nav_FSK_baud->index(1); break;
case '3' : sel_Nav_FSK_baud->index(2); break;
}
switch (Nav_config_string[10]) { // stop bits
default:
case '1': sel_Nav_FSK_stopbits->index(0); break;
case '2': sel_Nav_FSK_stopbits->index(1); break;
case '3': sel_Nav_FSK_stopbits->index(2); break;
}
print_string(std::string(Nav_config_string).append("\n").append(config_params));
}
void Nav_set_configuration()
{
std::string cmd = "KL";
cmd.append(Nav_config_string).append("\r\n");
Nav_config.WriteBuffer((unsigned char *)cmd.c_str(), cmd.length());
std::string resp = Nav_read_string(Nav_config, 2000, "\n");
if (resp.find("kl") != std::string::npos) {
print_string(_("Config change accepted\n"));
Nav_write_eeprom();
} else
print_string(_("Config change NOT accepted\n"));
}
void Nav_get_configuration()
{
std::string cmd = "KM\r\n";
Nav_config.WriteBuffer((unsigned char *)cmd.c_str(), cmd.length());
std::string resp = Nav_read_string(Nav_config, 2000, "\n");
size_t p = resp.find("km");
if (p >= 11) {
p -= 11;
Nav_config_string = resp.substr(0, 11);
Nav_update_config_controls();
} else {
std::string err;
err.assign(_("Nav_get_configuration: ")).append(resp).append("\n");
print_string(err);
}
}
void Nav_write_eeprom()
{
std::string cmd = "KS\r\n";
Nav_config.WriteBuffer((unsigned char *)cmd.c_str(), cmd.length());
std::string resp = Nav_read_string(Nav_config, 2000, "\n");
if (resp.find("ks") == std::string::npos) {
print_string(_("\nNavigator write to EEPROM failed!\n"));
} else
print_string(_("\nEEPROM write reported success\n"));
}
void Nav_restore_eeprom()
{
std::string cmd = "KR\r\n";
Nav_config.WriteBuffer((unsigned char *)cmd.c_str(), cmd.length());
std::string resp = Nav_read_string(Nav_config, 2000, "\n");
if (resp.find("kr") == std::string::npos) {
print_string(_("\nEEPROM data failed!\n"));
} else {
print_string(_("\nEEPROM data restored\n"));
Nav_get_configuration();
}
}
void Nav_set_channel_1_att(int v)
{
Nav_config_string[0] = (v ? '1' : '0');
Nav_set_configuration();
}
void Nav_set_channel_2_att(int v)
{
Nav_config_string[1] = (v ? '1' : '0');
Nav_set_configuration();
}
void Nav_set_rf_att(int v)
{
Nav_config_string[2] = (v ? '1' : '0');
Nav_set_configuration();
}
extern void Nav_set_wk_ptt(int v)
{
Nav_config_string[3] = (v ? '1' : '0');
Nav_set_configuration();
}
// "1" normal, "0" dim
void Nav_set_led(int v)
{
Nav_config_string[4] = (v ? '1' : '0');
Nav_set_configuration();
}
/*
void led_dim(void *)
{
Nav_set_led(0);
}
void led_normal(void *)
{
Nav_set_led(1);
}
void blink_led()
{
char led = Nav_config_string[4];
if (led == '1') {
led_dim(NULL);
Fl::add_timeout(1.0, led_normal);
} else {
led_normal(NULL);
Fl::add_timeout(1.0, led_dim);
}
}
*/
void Nav_set_cat_led(int v)
{
Nav_config_string[5] = (v ? '1' : '0');
Nav_set_configuration();
}
void Nav_set_polarity(int v)
{
Nav_config_string[6] = (v ? '0' : '1');
Nav_set_configuration();
}
void Nav_set_sidetone(int v)
{
Nav_config_string[7] = (v ? '0' : '1');
Nav_set_configuration();
}
void Nav_set_ptt(int v)
{
Nav_config_string[8] = (v ? '0' : '1');
Nav_set_configuration();
}
void Nav_set_baud(int v)
{
switch (v) {
case 0: Nav_config_string[9] = '1'; break; // 45.45 baud
case 1: Nav_config_string[9] = '2'; break; // 75.0 baud
case 2: Nav_config_string[9] = '3'; break; // 100.0 baud
}
Nav_set_configuration();
}
void Nav_set_stopbits(int v)
{
switch (v) {
case 0: Nav_config_string[10] = '1'; break;
case 1: Nav_config_string[10] = '2'; break;
case 2: Nav_config_string[10] = '3'; break;
}
Nav_set_configuration();
}
void Nav_PTT(int val)
{
}
char Nav_read_byte(Cserial &serial, int msec)
{
std::string resp;
resp.clear();
resp = Nav_serial_read(serial);
int numtries = msec/100;
while (resp.empty() && numtries) {
MilliSleep(100);
resp = Nav_serial_read(serial);
numtries--;
}
if (resp.empty())
return 0;
return resp[0];
}
std::string Nav_read_string(Cserial &serial, int msec_wait, std::string find)
{
std::string resp;
resp = Nav_serial_read(serial);
int timer = msec_wait;
if (timer < 100) msec_wait = timer = 100;
if (!find.empty()) {
while ((timer > 0) && (resp.find(find) == std::string::npos)) {
MilliSleep(100);
Fl::awake(); Fl::flush();
resp.append(Nav_serial_read(serial));
timer -= 100;
}
} else {
while (timer) {
MilliSleep(100);
Fl::awake(); Fl::flush();
resp.append(Nav_serial_read(serial));
timer -= 100;
}
}
if (resp.find("KR") != std::string::npos) {
print_string(_("\nNavigator returned error code!\n"));
}
return resp;
}
void xmt_delay(int n)
{
double baudrate = 45.45;
if (progdefaults.Nav_FSK_baud == 1) baudrate = 75.0;
if (progdefaults.Nav_FSK_baud == 2) baudrate = 100.0;
MilliSleep(n * 7500.0 / baudrate); // start + 5 data + 1.5 stop bits
}
static void send_char(int c)
{
if (c == LETTERS) {
tty_mode = LETTERS;
c = 0x1F;
} else if (c == FIGURES) {
tty_mode = FIGURES;
c = 0x1B;
} else
c &= 0x1F;
unsigned char cmd[2] = " ";
cmd[0] = c;
Nav_serial.WriteBuffer(cmd, 1);
xmt_delay(1);
}
static std::string letters = "E\nA SIU\rDRJNFCKTZLWHYPQOBG MXV ";
static std::string figures = "3\n- \a87\r$4\',!:(5\")2#6019?& ./; ";
int baudot_enc(char data)
{
size_t c = std::string::npos;
data = toupper(data);
c = letters.find(data);
if (c != std::string::npos)
return (c + 1) | LETTERS;
c = figures.find(data);
if (c != std::string::npos)
return (c + 1) | FIGURES;
return -1;
}
void Nav_send_char(int c)
{
if (c == GET_TX_CHAR_NODATA) {
send_char(LETTERS);
return;
}
if (c == ' ' && tty_mode == FIGURES)
send_char(LETTERS);
c = baudot_enc(c & 0xFF);
if ((tty_mode == LETTERS) && ((c & FIGURES) == FIGURES))
send_char(FIGURES);
if ((tty_mode == FIGURES) && ((c & LETTERS) == LETTERS))
send_char(LETTERS);
send_char(c);
}
std::string Nav_serial_read(Cserial &serial) {
static char buffer[1025];
memset(buffer, '\0',1025);
int rb = serial.ReadBuffer((unsigned char *)buffer, 1024);
if (rb)
return buffer;
return "";
}
// One time use of separate thread to read initial values
void close_NavFSK()
{
Nav_serial.ClosePort();
use_Nav = false;
print_string(_("Disconnected from Navigator FSK port\n"));
progStatus.Nav_online = false;
enable_rtty_quickchange();
}
/* =====================================================================
Received from Clint, designer of Navigator
The B channel of the 2nd FT2232C device is configured as an 8 bit FIFO,
only the lower 5 bits are used.
Actual FSK parameters are sent to the Navigator Configuration Port,
consisting of output
Polarity (Normal or Reverse),
Sidetone (On or Off),
FSK PTT (must be set to ON)
Baud Rate (45.45, 75, 100)
Stop Bits (1, 1.5, 2)
From these settings (Baud rate, Stop bits, Data length (5) and Start bit (1) )
the character rate can be computed to determine when to send the next
character to the FIFO (below).
Data Channel - Baudot encoded FSK 5 bit characters are sent to the FSK
FIFO device. The FIFO is 374 characters deep. The first two characters
sent to the FIFO should be sent with no delay between the two characters.
Subsequent characters should be sent at a rate determined by the parameters
in the previous paragraph. The rate should be about 0.5% faster than the
calculated rate to ensure that the buffer is not under run. When the
last character is sent to the FIFO, the PTT signal should be dropped.
The FSK Controller will maintain the PTT signal to the radio until the
last bit of the last character has been transmitted. Output PTT will be
dropped at that time. When the PTT drops to the radio, it will return
to RX state.
Baudot LTRS and FIGS bytes and USOS LTRS bytes are not handled by the Navigator
The Navigator does not provide any state feedback to the controlling PC,
i.e. state of the FIFO or the PTT signal lines, timing must be approximated
in the controlling PC. Note: The FTDI part must provide a Busy Status to
indicate when the FIFO is full.
In the Windows implementation, there were two configuration items that were used:
Open Port: SetCommState() function- the DCB was able to be configured as a
45 baud, 1.5 stop bit, no parity, 5 bit bytesize device.
WriteFile() function: Windows buffer size set to 1 - this allowed the flow
control to be done without having to time the data rate to avoid buffer under run.
======================================================================*/
bool open_NavFSK()
{
progStatus.Nav_online = false;
Nav_serial.Device(progdefaults.Nav_FSK_port);
Nav_serial.Baud(1200);
Nav_serial.Timeout(200);
Nav_serial.Retries(10);
Nav_serial.Stopbits(1);
if (!Nav_serial.OpenPort()) {
std::string err = std::string(_("Could not open ")).append(progdefaults.Nav_FSK_port).append("\n");
print_string(err);
return false;
}
use_Nav = true;
progStatus.Nav_online = true;
disable_rtty_quickchange();
print_string(_("Connected to Navigator FSK port\n"));
return true;
}
void close_NavConfig()
{
Nav_config.ClosePort();
print_string(_("Disconnected from Navigator config port\n"));
progStatus.Nav_config_online = false;
}
bool open_NavConfig()
{
#ifdef NAVDEBUG
std::string info = "Navigator debug file: ";
info.append(zdate()).append(" ").append(ztime()).append("\n");
print_string("========================================================\n");
print_string(info);
#endif
Nav_config.Device(progdefaults.Nav_config_port);
Nav_config.Baud(1200);
Nav_config.Timeout(200);
Nav_config.Retries(10);
Nav_config.Stopbits(1);
if (!Nav_config.OpenPort()) {
std::string err;
err.assign(_("Could not open ")).append(progdefaults.Nav_config_port);
print_string(err);
return false;
}
std::string cmd = "KT\r\n";
std::string resp = "";
Nav_config.WriteBuffer((unsigned char *)(cmd.c_str()), cmd.length());
resp = Nav_read_string(Nav_config, 2000, "\n");
if (resp.find("kt") == std::string::npos) {
Nav_config.WriteBuffer((unsigned char *)(cmd.c_str()), cmd.length());
resp = Nav_read_string(Nav_config, 2000, "\n");
if (resp.find("kt") == std::string::npos) {
print_string(_("Navigator failed to respond to NOOP.\n"));
close_NavConfig();
return false;
}
}
cmd = "KQ\r\n";
Nav_config.WriteBuffer((unsigned char *)(cmd.c_str()), cmd.length());
resp = Nav_read_string(Nav_config, 2000, "\n");
if (resp.find("\n") == std::string::npos) {
print_string(_("Navigator did not send Version string.\n"));
close_NavConfig();
return false;
}
print_string(std::string("Navigator ").append(resp));
Nav_get_configuration();
// blink_led();
print_string(_("Connected to Navigator configuration port\n"));
progStatus.Nav_config_online = true;
return true;
}
| 14,653
|
C++
|
.cxx
| 478
| 28.546025
| 101
| 0.656532
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,134
|
morse.cxx
|
w1hkj_fldigi/src/cw_rtty/morse.cxx
|
/*
* morse.c -- morse code tables
*
* Copyright (C) 2017
*
* Fldigi is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Fldigi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with fldigi. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <config.h>
#include <cstring>
#include <iostream>
#include "morse.h"
#include "configuration.h"
/* ---------------------------------------------------------------------- */
/*
* Morse code characters table. This table allows lookup of the Morse
* shape of a given alphanumeric character. Shapes are held as a string,
* with "-' representing dash, and ".' representing dot. The table ends
* with a NULL entry.
*
* This is the main table from which the other tables are computed.
*
* The Prosigns are also defined in the configuration.h file
* The user can specify the character which substitutes for the prosign
*/
bool CW_table_changed = false;
CWstruct cMorse::cw_table[] = {
// Prosigns
{1, "=", "<BT>", "-...-" }, // 0
{0, "~", "<AA>", ".-.-" }, // 1
{1, "<", "<AS>", ".-..." }, // 2
{1, ">", "<AR>", ".-.-." }, // 3
{1, "%", "<SK>", "...-.-" }, // 4
{1, "+", "<KN>", "-.--." }, // 5
{1, "&", "<INT>", "..-.-" }, // 6
{1, "{", "<HM>", "....--" }, // 7
{1, "}", "<VE>", "...-." }, // 8
// ASCII 7bit letters
{1, "A", "A", ".-" },
{1, "B", "B", "-..." },
{1, "C", "C", "-.-." },
{1, "D", "D", "-.." },
{1, "E", "E", "." },
{1, "F", "F", "..-." },
{1, "G", "G", "--." },
{1, "H", "H", "...." },
{1, "I", "I", ".." },
{1, "J", "J", ".---" },
{1, "K", "K", "-.-" },
{1, "L", "L", ".-.." },
{1, "M", "M", "--" },
{1, "N", "N", "-." },
{1, "O", "O", "---" },
{1, "P", "P", ".--." },
{1, "Q", "Q", "--.-" },
{1, "R", "R", ".-." },
{1, "S", "S", "..." },
{1, "T", "T", "-" },
{1, "U", "U", "..-" },
{1, "V", "V", "...-" },
{1, "W", "W", ".--" },
{1, "X", "X", "-..-" },
{1, "Y", "Y", "-.--" },
{1, "Z", "Z", "--.." },
//
{1, "a", "A", ".-" },
{1, "b", "B", "-..." },
{1, "c", "C", "-.-." },
{1, "d", "D", "-.." },
{1, "e", "E", "." },
{1, "f", "F", "..-." },
{1, "g", "G", "--." },
{1, "h", "H", "...." },
{1, "i", "I", ".." },
{1, "j", "J", ".---" },
{1, "k", "K", "-.-" },
{1, "l", "L", ".-.." },
{1, "m", "M", "--" },
{1, "n", "N", "-." },
{1, "o", "O", "---" },
{1, "p", "P", ".--." },
{1, "q", "Q", "--.-" },
{1, "r", "R", ".-." },
{1, "s", "S", "..." },
{1, "t", "T", "-" },
{1, "u", "U", "..-" },
{1, "v", "V", "...-" },
{1, "w", "W", ".--" },
{1, "x", "X", "-..-" },
{1, "y", "Y", "-.--" },
{1, "z", "Z", "--.." },
// Numerals
{1, "0", "0", "-----" },
{1, "1", "1", ".----" },
{1, "2", "2", "..---" },
{1, "3", "3", "...--" },
{1, "4", "4", "....-" },
{1, "5", "5", "....." },
{1, "6", "6", "-...." },
{1, "7", "7", "--..." },
{1, "8", "8", "---.." },
{1, "9", "9", "----." },
// Punctuation
{1, "\\", "\\", ".-..-." },
{1, "\'", "'", ".----." },
{1, "$", "$", "...-..-" },
{1, "(", "(", "-.--." },
{1, ")", ")", "-.--.-" },
{1, ",", ",", "--..--" },
{1, "-", "-", "-....-" },
{1, ".", ".", ".-.-.-" },
{1, "/", "/", "-..-." },
{1, ":", ":", "---..." },
{1, ";", ";", "-.-.-." },
{1, "?", "?", "..--.." },
{1, "_", "_", "..--.-" },
{1, "@", "@", ".--.-." },
{1, "!", "!", "-.-.--" },
// accented characters
{1, "Ä", "Ä", ".-.-" }, // A umlaut
{1, "ä", "Ä", ".-.-" }, // A umlaut
{0, "Æ", "Æ", ".-.-" }, // A aelig
{0, "æ", "Æ", ".-.-" }, // A aelig
{0, "Å", "Å", ".--.-" }, // A ring
{0, "å", "Å", ".--.-" }, // A ring
{1, "Ç", "Ç", "-.-.." }, // C cedilla
{1, "ç", "Ç", "-.-.." }, // C cedilla
{0, "È", "È", ".-..-" }, // E grave
{0, "è", "È", ".-..-" }, // E grave
{1, "É", "É", "..-.." }, // E acute
{1, "é", "É", "..-.." }, // E acute
{0, "Ó", "Ó", "---." }, // O acute
{0, "ó", "Ó", "---." }, // O acute
{1, "Ö", "Ö", "---." }, // O umlaut
{1, "ö", "Ö", "---." }, // O umlaut
{0, "Ø", "Ø", "---." }, // O slash
{0, "ø", "Ø", "---." }, // O slash
{1, "Ñ", "Ñ", "--.--" }, // N tilde
{1, "ñ", "Ñ", "--.--" }, // N tilde
{1, "Ü", "Ü", "..--" }, // U umlaut
{1, "ü", "Ü", "..--" }, // U umlaut
{0, "Û", "Û", "..--" }, // U circ
{0, "û", "Û", "..--" }, // U circ
// array termination
{0, "", "", ""}
};
/* ---------------------------------------------------------------------- */
void cMorse::enable(std::string s, bool val)
{
for (int i = 0; cw_table[i].rpr.length(); i++) {
if (cw_table[i].chr == s || cw_table[i].prt == s) {
cw_table[i].enabled = val;
return;
}
}
}
void cMorse::init()
{
// Update the char / prosign relationship
if (progdefaults.CW_prosigns.length() == 9) {
for (int i = 0; i < 9; i++) {
cw_table[i].chr = progdefaults.CW_prosigns[i];
}
}
enable("<AA>", 1);
enable("Ä", 0); enable("ä", 0);
enable("Æ", 0); enable("æ", 0);
enable("Å", 0); enable("å", 0);
enable("Ç", 0); enable("ç", 0);
enable("È", 0); enable("è", 0);
enable("É", 0); enable("é", 0);
enable("Ó", 0); enable("ó", 0);
enable("Ö", 0); enable("ö", 0);
enable("Ø", 0); enable("ø", 0);
enable("Ñ", 0); enable("ñ", 0);
enable("Ü", 0); enable("ü", 0);
enable("Û", 0); enable("û", 0);
if (progdefaults.A_umlaut)
{ enable("Ä", 1); enable("ä", 1); enable("<AA>", 0); }
if (progdefaults.A_aelig)
{ enable("Æ", 1); enable("æ", 1); enable("<AA>", 0); }
if (progdefaults.A_ring)
{ enable("Å", 1); enable("å", 1); }
if (progdefaults.C_cedilla)
{ enable("Ç", 1); enable("ç", 1); }
if (progdefaults.E_grave)
{ enable("È", 1); enable("è", 1); }
if (progdefaults.E_acute)
{ enable("É", 1); enable("é", 1); }
if (progdefaults.O_acute)
{ enable("Ó", 1); enable("ó", 1); }
if (progdefaults.O_umlaut)
{ enable("Ö", 1); enable("ö", 1); }
if (progdefaults.O_slash)
{ enable("Ø", 1); enable("ø", 1); }
if (progdefaults.N_tilde)
{ enable("Ñ", 1); enable("ñ", 1); }
if (progdefaults.U_umlaut)
{ enable("Ü", 1); enable("ü", 1); }
if (progdefaults.U_circ)
{ enable("Û", 1); enable("û", 1); }
enable ("\\", progdefaults.CW_backslash);
enable ("\'", progdefaults.CW_single_quote);
enable ("$", progdefaults.CW_dollar_sign);
enable ("(", progdefaults.CW_open_paren);
enable (")", progdefaults.CW_close_paren);
enable (":", progdefaults.CW_colon);
enable (";", progdefaults.CW_semi_colon);
enable ("_", progdefaults.CW_underscore);
enable ("@", progdefaults.CW_at_symbol);
enable ("!", progdefaults.CW_exclamation);
CW_table_changed = false;
utf8.reserve(4);
utf8.clear();
ptr = 0;
toprint.clear();
}
std::string cMorse::rx_lookup(std::string rx)
{
if (CW_table_changed) init();
for (int i = 0; cw_table[i].rpr.length(); i++) {
if (rx == cw_table[i].rpr) {
if (cw_table[i].enabled) {
if (progdefaults.CW_prosign_display)
return cw_table[i].chr;
return cw_table[i].prt;
}
}
}
return "";
}
std::string cMorse::tx_lookup(int c)
{
if (CW_table_changed) init();
toprint.clear();
c &= 0xFF;
utf8 += c;
// if (ptr < 4) utf8[ptr++] = c;
// if ( c > 0x7F && ptr == 1 )
// return "";
if (((utf8[0] & 0xFF) > 0x7F) && (utf8.length() == 1)) {
return "";
}
for (int i = 0; cw_table[i].rpr.length(); i++) {
if (utf8 == cw_table[i].chr) {
if (!cw_table[i].enabled) {
utf8.clear();
ptr = 0;
return "";
}
toprint = cw_table[i].prt;
utf8.clear();
ptr = 0;
return cw_table[i].rpr;
}
}
utf8.clear();
ptr = 0;
return "";
}
/*
Morse Code timing rules
The length of a dot is 1 time unit.
A dash is 3 time units.
The space between symbols (dots and dashes) of the same letter is 1 time unit.
The space between letters is 3 time units.
The space between words is 7 time units.
*/
int cMorse::tx_length(int c)
{
if (c == ' ') return 4;
std::string ms = tx_lookup(c);
if (ms.empty()) return 0;
int len = 0;
for (size_t i = 0; i < ms.length(); i++)
if (ms[i] == '.') len += 2;
else len += 4;
len += 2;
return len;
}
/* ---------------------------------------------------------------------- */
| 8,523
|
C++
|
.cxx
| 292
| 26.691781
| 80
| 0.432023
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,135
|
KYkeying.cxx
|
w1hkj_fldigi/src/cw_rtty/KYkeying.cxx
|
// ----------------------------------------------------------------------------
// KYkeying.cxx serial string CW interface to Elecraft transceivers
//
// Copyright (C) 2020
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <iostream>
#include <string>
#include "KYkeying.h"
#include "configuration.h"
#include "rigio.h"
#include "threads.h"
#include "debug.h"
#include "rigsupport.h"
#include "morse.h"
#include "fl_digi.h"
int KYwpm = 0;
bool use_KYkeyer = false;
static std::string KYcmd = "KY ;";
static std::string KNWDcmd = "KY ;";
// 0123456789012345678901234567
// 0 1 2
static std::string cmd;
static cMorse *KYmorse = 0;
static char lastKYchar = 0;
void set_KYkeyer()
{
KYwpm = progdefaults.CWspeed;
if (KYwpm < 8) KYwpm = 8;
if (KYwpm > 50) KYwpm = 50;
progdefaults.CWspeed = KYwpm;
char cmd[10];
snprintf(cmd, sizeof(cmd), "KS%03d;", KYwpm);
if (progdefaults.fldigi_client_to_flrig) {
xmlrpc_priority(cmd);
} else {
guard_lock ser_guard( &rigCAT_mutex);
rigio.WriteBuffer((unsigned char *)cmd, strlen(cmd));
}
MilliSleep(50);
}
void KYkeyer_send_char(int c)
{
if (KYmorse == 0) KYmorse = new cMorse;
if (KYwpm != progdefaults.CWspeed) {
set_KYkeyer();
}
if (c == GET_TX_CHAR_NODATA || c == 0x0d) {
MilliSleep(50);
return;
}
c = toupper(c);
if (c < ' ') c = ' ';
if (c > 'Z') c = ' ';
float tc = 1200.0 / progdefaults.CWspeed;
if (progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth))
tc = 1200.0 / progdefaults.CWfarnsworth;
if (c == ' ') {
if (lastKYchar == ' ')
tc *= 7;
else
tc *= 5;
} else {
tc *= KYmorse->tx_length(c);
if (progdefaults.use_KNWDkeying) {
cmd = KNWDcmd;
cmd[3] = (char)c;
} else {
cmd = KYcmd;
cmd[3] = (char)c;
}
if (progdefaults.fldigi_client_to_flrig) {
xmlrpc_priority(cmd);
} else if (progdefaults.chkUSERIGCATis) {
guard_lock ser_guard( &rigCAT_mutex);
rigio.WriteBuffer((unsigned char *)cmd.c_str(), cmd.length());
}
}
tc -= progdefaults.CATkeying_compensation / (progdefaults.CWspeed * 6);
tc = int(tc);
MilliSleep(tc);
lastKYchar = c;
}
| 2,931
|
C++
|
.cxx
| 98
| 27.918367
| 88
| 0.633948
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,136
|
view_rtty.cxx
|
w1hkj_fldigi/src/cw_rtty/view_rtty.cxx
|
// ----------------------------------------------------------------------------
// rtty.cxx -- RTTY modem
//
// Copyright (C) 2006-2010
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted from code contained in gmfsk source code
// distribution.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <iostream>
//#include "rtty.h"
#include "view_rtty.h"
#include "fl_digi.h"
#include "digiscope.h"
#include "misc.h"
#include "waterfall.h"
#include "confdialog.h"
#include "configuration.h"
#include "status.h"
#include "digiscope.h"
#include "Viewer.h"
#include "qrunner.h"
//=====================================================================
// Baudot support
//=====================================================================
static char letters[32] = {
'\0', 'E', '\n', 'A', ' ', 'S', 'I', 'U',
'\r', 'D', 'R', 'J', 'N', 'F', 'C', 'K',
'T', 'Z', 'L', 'W', 'H', 'Y', 'P', 'Q',
'O', 'B', 'G', ' ', 'M', 'X', 'V', ' '
};
// U.S. version of the figures case.
static char figures[32] = {
'\0', '3', '\n', '-', ' ', '\a', '8', '7',
'\r', '$', '4', '\'', ',', '!', ':', '(',
'5', '"', ')', '2', '#', '6', '0', '1',
'9', '?', '&', ' ', '.', '/', ';', ' '
};
const double view_rtty::SHIFT[] = {23, 85, 160, 170, 182, 200, 240, 350, 425, 850};
// FILTLEN must be same size as BAUD
const double view_rtty::BAUD[] = {45, 45.45, 50, 56, 75, 100, 110, 150, 200, 300};
const int view_rtty::FILTLEN[] = { 512, 512, 512, 512, 512, 512, 512, 256, 128, 64};
const int view_rtty::BITS[] = {5, 7, 8};
const int view_rtty::numshifts = (int)(sizeof(SHIFT) / sizeof(*SHIFT));
const int view_rtty::numbauds = (int)(sizeof(BAUD) / sizeof(*BAUD));
void view_rtty::rx_init()
{
for (int ch = 0; ch < progdefaults.VIEWERchannels; ch++) {
channel[ch].state = IDLE;
channel[ch].rxstate = RTTY_RX_STATE_IDLE;
channel[ch].rxmode = LETTERS;
channel[ch].phaseacc = 0;
channel[ch].timeout = 0;
channel[ch].frequency = NULLFREQ;
channel[ch].poserr = channel[ch].negerr = 0.0;
channel[ch].mark_phase = 0;
channel[ch].space_phase = 0;
channel[ch].mark_mag = 0;
channel[ch].space_mag = 0;
channel[ch].mark_env = 0;
channel[ch].space_env = 0;
channel[ch].inp_ptr = 0;
for (int i = 0; i < VIEW_MAXPIPE; i++)
channel[ch].mark_history[i] =
channel[ch].space_history[i] = cmplx(0,0);
}
}
void view_rtty::init()
{
bool wfrev = wf->Reverse();
bool wfsb = wf->USB();
reverse = wfrev ^ !wfsb;
rx_init();
}
view_rtty::~view_rtty()
{
for (int ch = 0; ch < MAX_CHANNELS; ch ++) {
if (channel[ch].mark_filt) delete channel[ch].mark_filt;
if (channel[ch].space_filt) delete channel[ch].space_filt;
if (channel[ch].bits) delete channel[ch].bits;
}
}
void view_rtty::reset_filters(int ch)
{
delete channel[ch].mark_filt;
channel[ch].mark_filt = new fftfilt(rtty_baud/samplerate, filter_length);
channel[ch].mark_filt->rtty_filter(rtty_baud/samplerate);
delete channel[ch].space_filt;
channel[ch].space_filt = new fftfilt(rtty_baud/samplerate, filter_length);
channel[ch].space_filt->rtty_filter(rtty_baud/samplerate);
}
void view_rtty::restart()
{
double stl;
rtty_shift = shift = (progdefaults.rtty_shift < rtty::numshifts ?
SHIFT[progdefaults.rtty_shift] : progdefaults.rtty_custom_shift);
rtty_baud = BAUD[progdefaults.rtty_baud];
filter_length = FILTLEN[progdefaults.rtty_baud];
nbits = rtty_bits = BITS[progdefaults.rtty_bits];
if (rtty_bits == 5)
rtty_parity = RTTY_PARITY_NONE;
else
switch (progdefaults.rtty_parity) {
case 0 : rtty_parity = RTTY_PARITY_NONE; break;
case 1 : rtty_parity = RTTY_PARITY_EVEN; break;
case 2 : rtty_parity = RTTY_PARITY_ODD; break;
case 3 : rtty_parity = RTTY_PARITY_ZERO; break;
case 4 : rtty_parity = RTTY_PARITY_ONE; break;
default : rtty_parity = RTTY_PARITY_NONE; break;
}
rtty_stop = progdefaults.rtty_stop;
symbollen = (int) (samplerate / rtty_baud + 0.5);
bflen = symbollen/3;
set_bandwidth(shift);
rtty_BW = progdefaults.RTTY_BW;
bp_filt_lo = (shift/2.0 - rtty_BW/2.0) / samplerate;
if (bp_filt_lo < 0) bp_filt_lo = 0;
bp_filt_hi = (shift/2.0 + rtty_BW/2.0) / samplerate;
for (int ch = 0; ch < MAX_CHANNELS; ch ++) {
reset_filters(ch);
channel[ch].state = IDLE;
channel[ch].timeout = 0;
channel[ch].freqerr = 0.0;
channel[ch].metric = 0.0;
channel[ch].sigpwr = 0.0;
channel[ch].noisepwr = 0.0;
channel[ch].sigsearch = 0;
channel[ch].frequency = NULLFREQ;
channel[ch].counter = symbollen / 2;
channel[ch].mark_phase = 0;
channel[ch].space_phase = 0;
channel[ch].mark_mag = 0;
channel[ch].space_mag = 0;
channel[ch].mark_env = 0;
channel[ch].space_env = 0;
channel[ch].inp_ptr = 0;
if (channel[ch].bits)
channel[ch].bits->setLength(symbollen / 8);
else
channel[ch].bits = new Cmovavg(symbollen / 8);
channel[ch].mark_noise = channel[ch].space_noise = 0;
channel[ch].bit = channel[ch].nubit = true;
for (int i = 0; i < VIEW_RTTY_MAXBITS; i++) channel[ch].bit_buf[i] = 0.0;
for (int i = 0; i < VIEW_MAXPIPE; i++)
channel[ch].mark_history[i] = channel[ch].space_history[i] = cmplx(0,0);
}
// stop length = 1, 1.5 or 2 bits
rtty_stop = progdefaults.rtty_stop;
if (rtty_stop == 0) stl = 1.0;
else if (rtty_stop == 1) stl = 1.5;
else stl = 2.0;
stoplen = (int) (stl * samplerate / rtty_baud + 0.5);
rx_init();
}
view_rtty::view_rtty(trx_mode tty_mode)
{
cap |= CAP_AFC | CAP_REV;
mode = tty_mode;
samplerate = RTTY_SampleRate;
for (int ch = 0; ch < MAX_CHANNELS; ch ++) {
channel[ch].mark_filt = (fftfilt *)0;
channel[ch].space_filt = (fftfilt *)0;
channel[ch].bits = (Cmovavg *)0;
}
restart();
}
cmplx view_rtty::mixer(double &phase, double f, cmplx in)
{
cmplx z = cmplx( cos(phase), sin(phase)) * in;;
phase -= TWOPI * f / samplerate;
if (phase < - TWOPI) phase += TWOPI;
return z;
}
unsigned char view_rtty::bitreverse(unsigned char in, int n)
{
unsigned char out = 0;
for (int i = 0; i < n; i++)
out = (out << 1) | ((in >> i) & 1);
return out;
}
static int rparity(int c)
{
int w = c;
int p = 0;
while (w) {
p += (w & 1);
w >>= 1;
}
return p & 1;
}
int view_rtty::rttyparity(unsigned int c)
{
c &= (1 << nbits) - 1;
switch (rtty_parity) {
default:
case RTTY_PARITY_NONE:
return 0;
case RTTY_PARITY_ODD:
return rparity(c);
case RTTY_PARITY_EVEN:
return !rparity(c);
case RTTY_PARITY_ZERO:
return 0;
case RTTY_PARITY_ONE:
return 1;
}
}
int view_rtty::decode_char(int ch)
{
unsigned int parbit, par, data;
parbit = (channel[ch].rxdata >> nbits) & 1;
par = rttyparity(channel[ch].rxdata);
if (rtty_parity != RTTY_PARITY_NONE && parbit != par)
return 0;
data = channel[ch].rxdata & ((1 << nbits) - 1);
if (nbits == 5)
return baudot_dec(ch & 0x7F, data);
return data;
}
bool view_rtty::is_mark_space( int ch, int &correction)
{
correction = 0;
// test for rough bit position
if (channel[ch].bit_buf[0] && !channel[ch].bit_buf[symbollen-1]) {
// test for mark/space straddle point
for (int i = 0; i < symbollen; i++)
correction += channel[ch].bit_buf[i];
if (abs(symbollen/2 - correction) < 6) // too small & bad signals are not decoded
return true;
}
return false;
}
bool view_rtty::is_mark(int ch)
{
return channel[ch].bit_buf[symbollen / 2];
}
bool view_rtty::rx(int ch, bool bit)
{
bool flag = false;
unsigned char c = 0;
int correction = 0;
for (int i = 1; i < symbollen; i++)
channel[ch].bit_buf[i-1] = channel[ch].bit_buf[i];
channel[ch].bit_buf[symbollen - 1] = bit;
switch (channel[ch].rxstate) {
case RTTY_RX_STATE_IDLE:
if ( is_mark_space(ch, correction)) {
channel[ch].rxstate = RTTY_RX_STATE_START;
channel[ch].counter = correction;
}
break;
case RTTY_RX_STATE_START:
if (--channel[ch].counter == 0) {
if (!is_mark(ch)) {
channel[ch].rxstate = RTTY_RX_STATE_DATA;
channel[ch].counter = symbollen;
channel[ch].bitcntr = 0;
channel[ch].rxdata = 0;
} else {
channel[ch].rxstate = RTTY_RX_STATE_IDLE;
}
}
break;
case RTTY_RX_STATE_DATA:
if (--channel[ch].counter == 0) {
channel[ch].rxdata |= is_mark(ch) << channel[ch].bitcntr++;
channel[ch].counter = symbollen;
}
if (channel[ch].bitcntr == nbits + (rtty_parity != RTTY_PARITY_NONE ? 1 : 0))
channel[ch].rxstate = RTTY_RX_STATE_STOP;
break;
case RTTY_RX_STATE_STOP:
if (--channel[ch].counter == 0) {
if (is_mark(ch)) {
if (channel[ch].metric > rtty_squelch) {
c = decode_char(ch);
// print this RTTY_CHANNEL
if ( c != 0 )
REQ(&viewaddchr, ch, (int)channel[ch].frequency, c, mode);
}
flag = true;
}
channel[ch].rxstate = RTTY_RX_STATE_IDLE;
}
break;
default : break;
}
return flag;
}
void view_rtty::Metric(int ch)
{
double delta = rtty_baud/2.0;
double np = wf->powerDensity(channel[ch].frequency, delta) * 3000 / delta;
double sp =
wf->powerDensity(channel[ch].frequency - shift/2, delta) +
wf->powerDensity(channel[ch].frequency + shift/2, delta) + 1e-10;
channel[ch].sigpwr = decayavg( channel[ch].sigpwr, sp, sp - channel[ch].sigpwr > 0 ? 2 : 16);
channel[ch].noisepwr = decayavg( channel[ch].noisepwr, np, 16 );
channel[ch].metric = CLAMP(channel[ch].sigpwr/channel[ch].noisepwr, 0.0, 100.0);
if (channel[ch].state == RCVNG)
if (channel[ch].metric < rtty_squelch) {
channel[ch].timeout = progdefaults.VIEWERtimeout * samplerate / WF_BLOCKSIZE;
channel[ch].state = WAITING;
}
if (channel[ch].timeout) {
channel[ch].timeout--;
if (!channel[ch].timeout) {
channel[ch].frequency = NULLFREQ;
channel[ch].metric = 0;
channel[ch].freqerr = 0;
channel[ch].state = IDLE;
REQ(&viewclearchannel, ch);
}
}
}
void view_rtty::find_signals()
{
double spwrhi = 0.0, spwrlo = 0.0, npwr = 0.0;
double rtty_squelch = pow(10, progStatus.VIEWER_rttysquelch / 10.0);
for (int i = 0; i < progdefaults.VIEWERchannels; i++) {
if (channel[i].state != IDLE) continue;
int cf = progdefaults.LowFreqCutoff + 100 * i;
if (cf < shift) cf = shift;
double delta = rtty_baud / 8;
for (int chf = cf; chf < cf + 100 - rtty_baud / 4; chf += 5) {
spwrlo = wf->powerDensity(chf - shift/2, delta);
spwrhi = wf->powerDensity(chf + shift/2, delta);
npwr = (wf->powerDensity(chf, delta) * 3000 / rtty_baud) + 1e-10;
if ((spwrlo / npwr > rtty_squelch) && (spwrhi / npwr > rtty_squelch)) {
if (!i && (channel[i+1].state == SRCHG || channel[i+1].state == RCVNG)) break;
if ((i == (progdefaults.VIEWERchannels -2)) &&
(channel[i+1].state == SRCHG || channel[i+1].state == RCVNG)) break;
if (i && (channel[i-1].state == SRCHG || channel[i-1].state == RCVNG)) break;
if (i > 3 && (channel[i-2].state == SRCHG || channel[i-2].state == RCVNG)) break;
channel[i].frequency = chf;
channel[i].sigsearch = SIGSEARCH;
channel[i].state = SRCHG;
REQ(&viewaddchr, i, (int)channel[i].frequency, 0, mode);
break;
}
}
}
for (int i = 1; i < progdefaults.VIEWERchannels; i++ )
if (fabs(channel[i].frequency - channel[i-1].frequency) < rtty_baud/2)
clearch(i);
}
void view_rtty::clearch(int ch)
{
channel[ch].state = IDLE;
channel[ch].rxstate = RTTY_RX_STATE_IDLE;
channel[ch].rxmode = LETTERS;
channel[ch].phaseacc = 0;
channel[ch].frequency = NULLFREQ;
channel[ch].poserr = channel[ch].negerr = 0.0;
REQ( &viewclearchannel, ch);
}
void view_rtty::clear()
{
for (int ch = 0; ch < progdefaults.VIEWERchannels; ch++) {
channel[ch].state = IDLE;
channel[ch].rxstate = RTTY_RX_STATE_IDLE;
channel[ch].rxmode = LETTERS;
channel[ch].phaseacc = 0;
channel[ch].frequency = NULLFREQ;
channel[ch].poserr = channel[ch].negerr = 0.0;
}
}
int view_rtty::rx_process(const double *buf, int buflen)
{
cmplx z, zmark, zspace, *zp_mark, *zp_space;
static bool bit = true;
int n = 0;
{
reverse = wf->Reverse() ^ !wf->USB();
}
rtty_squelch = pow(10, progStatus.VIEWER_rttysquelch / 10.0);
for (int ch = 0; ch < progdefaults.VIEWERchannels; ch++) {
if (channel[ch].state == IDLE)
continue;
if (channel[ch].sigsearch) {
channel[ch].sigsearch--;
if (!channel[ch].sigsearch)
channel[ch].state = RCVNG;
}
for (int len = 0; len < buflen; len++) {
z = cmplx(buf[len], buf[len]);
zmark = mixer(channel[ch].mark_phase, channel[ch].frequency + shift/2.0, z);
channel[ch].mark_filt->run(zmark, &zp_mark);
zspace = mixer(channel[ch].space_phase, channel[ch].frequency - shift/2.0, z);
n = channel[ch].space_filt->run(zspace, &zp_space);
// n loop
if (n) Metric(ch);
for (int i = 0; i < n; i++) {
channel[ch].mark_mag = abs(zp_mark[i]);
channel[ch].mark_env = decayavg (channel[ch].mark_env, channel[ch].mark_mag,
(channel[ch].mark_mag > channel[ch].mark_env) ? symbollen / 4 : symbollen * 16);
channel[ch].mark_noise = decayavg (channel[ch].mark_noise, channel[ch].mark_mag,
(channel[ch].mark_mag < channel[ch].mark_noise) ? symbollen / 4 : symbollen * 48);
channel[ch].space_mag = abs(zp_space[i]);
channel[ch].space_env = decayavg (channel[ch].space_env, channel[ch].space_mag,
(channel[ch].space_mag > channel[ch].space_env) ? symbollen / 4 : symbollen * 16);
channel[ch].space_noise = decayavg (channel[ch].space_noise, channel[ch].space_mag,
(channel[ch].space_mag < channel[ch].space_noise) ? symbollen / 4 : symbollen * 48);
channel[ch].noise_floor = std::min(channel[ch].space_noise, channel[ch].mark_noise);
// clipped if clipped decoder selected
double mclipped = 0, sclipped = 0;
mclipped = channel[ch].mark_mag > channel[ch].mark_env ?
channel[ch].mark_env : channel[ch].mark_mag;
sclipped = channel[ch].space_mag > channel[ch].space_env ?
channel[ch].space_env : channel[ch].space_mag;
if (mclipped < channel[ch].noise_floor) mclipped = channel[ch].noise_floor;
if (sclipped < channel[ch].noise_floor) sclipped = channel[ch].noise_floor;
// Optimal ATC
// int v = (((mclipped - channel[ch].noise_floor) * (channel[ch].mark_env - channel[ch].noise_floor) -
// (sclipped - channel[ch].noise_floor) * (channel[ch].space_env - channel[ch].noise_floor)) -
// 0.25 * ((channel[ch].mark_env - channel[ch].noise_floor) *
// (channel[ch].mark_env - channel[ch].noise_floor) -
// (channel[ch].space_env - channel[ch].noise_floor) *
// (channel[ch].space_env - channel[ch].noise_floor)));
// bit = (v > 0);
// Kahn Square Law demodulator
bit = norm(zp_mark[i]) >= norm(zp_space[i]);
channel[ch].mark_history[channel[ch].inp_ptr] = zp_mark[i];
channel[ch].space_history[channel[ch].inp_ptr] = zp_space[i];
channel[ch].inp_ptr = (channel[ch].inp_ptr + 1) % VIEW_MAXPIPE;
if (channel[ch].state == RCVNG && rx( ch, reverse ? !bit : bit ) ) {
if (channel[ch].sigsearch) channel[ch].sigsearch--;
int mp0 = channel[ch].inp_ptr - 2;
int mp1 = mp0 + 1;
if (mp0 < 0) mp0 += VIEW_MAXPIPE;
if (mp1 < 0) mp1 += VIEW_MAXPIPE;
double ferr = (TWOPI * samplerate / rtty_baud) *
(!reverse ?
arg(conj(channel[ch].mark_history[mp1]) * channel[ch].mark_history[mp0]) :
arg(conj(channel[ch].space_history[mp1]) * channel[ch].space_history[mp0]));
if (fabs(ferr) > rtty_baud / 2) ferr = 0;
channel[ch].freqerr = decayavg ( channel[ch].freqerr, ferr / 4,
progdefaults.rtty_afcspeed == 0 ? 8 :
progdefaults.rtty_afcspeed == 1 ? 4 : 1 );
if (channel[ch].metric > pow(10, progStatus.VIEWER_rttysquelch / 10.0))
channel[ch].frequency -= ferr;
}
}
}
}
find_signals();
return 0;
}
char view_rtty::baudot_dec(int ch, unsigned char data)
{
int out = 0;
switch (data) {
case 0x1F: /* letters */
channel[ch].rxmode = LETTERS;
break;
case 0x1B: /* figures */
channel[ch].rxmode = FIGURES;
break;
case 0x04: /* unshift-on-space */
if (progdefaults.UOSrx)
channel[ch].rxmode = LETTERS;
return ' ';
break;
default:
if (channel[ch].rxmode == LETTERS)
out = letters[data];
else
out = figures[data];
break;
}
return out;
}
//=====================================================================
// RTTY transmit
//=====================================================================
int view_rtty::tx_process()
{
return 0;
}
| 16,878
|
C++
|
.cxx
| 493
| 31.43002
| 105
| 0.631023
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,137
|
nanoIO.cxx
|
w1hkj_fldigi/src/cw_rtty/nanoIO.cxx
|
// ----------------------------------------------------------------------------
// nanoIO.cxx -- Interface to Arduino Nano keyer
//
// Copyright (C) 2018
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include "fl_digi.h"
#include "nanoIO.h"
#include "serial.h"
#include "morse.h"
#include "strutil.h"
#define LOG_TINYFSK LOG_INFO
Cserial nano_serial;
bool use_nanoIO = false;
bool nanoIO_isCW = false;
static cMorse *nano_morse = 0;
// use during debugging
void sent(std::string s)
{
if (!grp_nanoio_debug->visible()) return;
brws_nanoio_sent->add(s.c_str());
brws_nanoio_sent->redraw();
}
void rcvd(std::string s)
{
if (!grp_nanoio_debug->visible()) return;
if (s.empty())
brws_nanoio_rcvd->add("...nil");
else {
size_t ptr = s.find("\ncmd:");
if (ptr != std::string::npos) s.erase(ptr, 1);
if (s[s.length() - 1] == '\n') s.erase(s.length() -1);
ptr = s.find("\n");
while (!s.empty()) {
if (ptr == std::string::npos) {
brws_nanoio_rcvd->add(std::string("@t").append(s).c_str());
break;
}
brws_nanoio_rcvd->add(std::string("@t").append(s.substr(0, ptr)).c_str());
brws_nanoio_sent->add("@t-");
s.erase(0, ptr+1);
ptr = s.find("\n");
}
}
brws_nanoio_rcvd->redraw();
}
// subtract two timeval values and return result in seconds
double timeval_subtract (struct timeval &x, struct timeval &y)
{
double t1, t2;
t1 = x.tv_sec + x.tv_usec * 1e-6;
t2 = y.tv_sec + y.tv_usec * 1e-6;
return t2 - t1;
}
void nano_display_io(std::string s, int style)
{
if (s.empty()) return;
REQ(&FTextBase::addstr, txt_nano_io, s, style);
REQ(&FTextBase::addstr, txt_nano_CW_io, s, style);
}
int nano_serial_write(char c)
{
if (!use_nanoIO) {
return 1;
}
std::string buffer = " ";
buffer[0] = c;
REQ(sent, buffer);
return nano_serial.WriteBuffer((unsigned char *)(buffer.c_str()), 1);
}
char nano_read_byte(int &msec)
{
unsigned char c = 0;
int ret;
int numtries = 0;
timeval start = tmval();
timeval end = start;
while (timeval_subtract(start, end) < msec) {
ret = nano_serial.ReadByte(c);
end = tmval();
if (ret && c > 0) break;
if (++numtries % 50 == 0) Fl::awake();
}
double dmsec = timeval_subtract(start, end) * 1000;
msec = round(dmsec);
static char szresp[50];
snprintf(szresp, sizeof(szresp), "'%c' [%0.2f]", c, dmsec);
REQ(rcvd, szresp);
return c;
}
std::string nano_read_string(int msec_wait, std::string find)
{
std::string resp;
timeval start = tmval();
int timer = msec_wait;
if (!find.empty()) {
while (timer > 0 && (resp.find(find) == std::string::npos)) {
resp.append(nano_serial_read());
MilliSleep(10);
timer -= 10;
}
} else {
while (timer > 0) {
resp.append(nano_serial_read());
MilliSleep(10);
timer -= 10;
}
}
timeval end = tmval();
double diff = timeval_subtract(start, end);
int msec = round(diff * 1000);
static char szresp[1000];
snprintf(szresp, sizeof(szresp), "[%d msec] %s", msec, resp.c_str());
REQ(rcvd, szresp);
return resp;
}
static bool calibrating = false;
void nano_send_cw_char(int c)
{
if (c == GET_TX_CHAR_NODATA || c == 0x0d) {
MilliSleep(50);
return;
}
int msec = 0;
float tc = 1200.0 / progdefaults.CWspeed;
float ta = 0.0;
float tch = 3 * tc, twd = 4 * tc;
if (progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth)) {
ta = 60000.0 / progdefaults.CWfarnsworth - 37200 / progdefaults.CWspeed;
tch = 3 * ta / 19;
twd = 4 * ta / 19;
}
if (nano_morse == 0) {
MilliSleep(50);
return;
}
if (c == '^' || c == '|') {
nano_serial_write(c);
msec = 50;
nano_read_byte(msec);
MilliSleep(50);
return;
}
int len = 4;
if (c == 0x0a) c = ' ';
if (c == ' ') {
len = 4;
msec = len * tc + 10;
nano_serial_write(c);
nano_read_byte(msec);
if (!calibrating && progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth))
MilliSleep(twd);
} else {
len = nano_morse->tx_length(c);
if (len) {
msec = len * tc + 10;
nano_serial_write(c);
nano_read_byte(msec);
if (!calibrating && progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth))
MilliSleep(tch);
}
}
return;
}
void nano_send_tty_char(int c)
{
int msec = 165; // msec for start + 5 data + 1.5 stop bits @ 45.45
if (progdefaults.nanoIO_baud == 50.0) msec = 150;
if (progdefaults.nanoIO_baud == 75.0) msec = 100;
if (progdefaults.nanoIO_baud == 100.0) msec = 75;
if (c == GET_TX_CHAR_NODATA) {
MilliSleep(msec);
return;
}
nano_serial_write(c);
msec += 20;
c = nano_read_byte(msec);
}
void nano_send_char(int c)
{
if (nanoIO_isCW)
nano_send_cw_char(c);
else
nano_send_tty_char(c);
}
static int setwpm = progdefaults.CWspeed;
void save_nano_state()
{
if (!use_nanoIO) return;
setwpm = progdefaults.CWspeed;
}
void restore_nano_state()
{
if (!use_nanoIO) return;
progdefaults.CWspeed = setwpm;
sldrCWxmtWPM->value(progdefaults.CWspeed);
cntCW_WPM->value(progdefaults.CWspeed);
calibrating = false;
LOG_INFO("%f WPM", progdefaults.CWspeed);
}
void nanoIO_wpm_cal()
{
save_nano_state();
progdefaults.CWusefarnsworth = false;
progdefaults.CWspeed = cntrWPMtest->value();
LOG_INFO("%f WPM", progdefaults.CWspeed);
sldrCWxmtWPM->value(progdefaults.CWspeed);
cntCW_WPM->value(progdefaults.CWspeed);
nanoIO_isCW = true;
set_nanoWPM(progdefaults.CWspeed);
std::string s;
for (int i = 0; i < progdefaults.CWspeed; i++) s.append("paris ");
s.append("^r");
TransmitText->add_text(s);
calibrating = true;
start_tx();
}
void nano_sendString (const std::string &s)
{
REQ(sent, s);
nano_serial.WriteBuffer((unsigned char *)(s.c_str()), s.length());
return;
}
static timeval ptt_start;
static double wpm_err = 0;
void dispWPMtiming(void *)
{
corr_var_wpm->value(wpm_err + 60);
int nucorr = progdefaults.usec_correc;
nucorr += wpm_err * 1e6 / (cntrWPMtest->value() * 50);
usec_correc->value(nucorr);
}
static bool nanoIO_busy = false;
void nano_PTT(int val)
{
if (use_nanoIO) {
nano_serial_write(val ? '[' : ']');
int msec = 100;
nano_read_byte(msec);
}
if (val) {
ptt_start = tmval();
nanoIO_busy = true;
} else {
timeval ptt_end = tmval();
double tdiff = timeval_subtract(ptt_start, ptt_end);
if (calibrating) {
wpm_err = tdiff - 60;
Fl::awake(dispWPMtiming);
restore_nano_state();
} else {
ptt_start.tv_sec = 0;
ptt_start.tv_usec = 0;
nanoIO_busy = false;
}
}
}
void nano_cancel_transmit()
{
nano_serial_write('\\');
}
void nano_mark_polarity(int v)
{
std::string cmd = "~";
cmd.append(v == 0 ? "1" : "0");
std::string resp;
nano_sendString(cmd);
resp = nano_serial_read();
nano_display_io(resp, FTextBase::ALTR);
}
void nano_MARK_is(int val)
{
progdefaults.nanoIO_polarity = val;
chk_nanoIO_polarity->value(val);
}
void nano_set_baud(int bd)
{
std::string resp;
std::string cmd = "~";
cmd.append(bd == 3 ? "9" : bd == 2 ? "7" : bd == 1 ? "5" : "4");
nano_sendString(cmd);
resp = nano_serial_read();
nano_display_io(resp, FTextBase::ALTR);
}
void nano_baud_is(int val)
{
int index = 2;
if (val == 45) index = 0;
if (val == 50) index = 1;
if (val == 100) index = 2;
progdefaults.nanoIO_baud = index;
sel_nanoIO_baud->index(index);
}
static int pot_min, pot_rng;
static bool nanoIO_has_pot = false;
void init_pot_min_max()
{
nanoIO_has_pot = true;
btn_nanoIO_pot->activate();
nanoIO_use_pot();
cntr_nanoIO_min_wpm->activate();
cntr_nanoIO_rng_wpm->activate();
cntr_nanoIO_min_wpm->value(pot_min);
cntr_nanoIO_rng_wpm->value(pot_rng);
cntr_nanoIO_min_wpm->redraw();
cntr_nanoIO_rng_wpm->redraw();
}
void disable_min_max()
{
btn_nanoIO_pot->deactivate();
cntr_nanoIO_min_wpm->deactivate();
cntr_nanoIO_rng_wpm->deactivate();
}
// this function must be called from within the main UI thread
// use REQ(nano_parse_config, s);
void nano_parse_config(std::string s)
{
nano_display_io(s, FTextBase::ALTR);
size_t p1 = 0;
if (s.find("nanoIO") == std::string::npos) return;
if (s.find("HIGH") != std::string::npos) nano_MARK_is(1);
if (s.find("LOW") != std::string::npos) nano_MARK_is(0);
if (s.find("45.45") != std::string::npos) nano_baud_is(45);
if (s.find("50.0") != std::string::npos) nano_baud_is(50);
if (s.find("75.0") != std::string::npos) nano_baud_is(75);
if (s.find("100.0") != std::string::npos) nano_baud_is(100);
if ((p1 = s.find("WPM")) != std::string::npos) {
p1 += 4;
int wpm = progdefaults.CWspeed;
if (sscanf(s.substr(p1).c_str(), "%d", &wpm)) {
progdefaults.CWspeed = wpm;
LOG_INFO("%f WPM", progdefaults.CWspeed);
cntCW_WPM->value(wpm);
cntr_nanoCW_WPM->value(wpm);
sldrCWxmtWPM->value(wpm);
}
}
if ((p1 = s.find("/", p1)) != std::string::npos) {
p1++;
int wpm = progdefaults.CW_keyspeed;
if (sscanf(s.substr(p1).c_str(), "%d", &wpm)) {
progdefaults.CW_keyspeed = wpm;
cntr_nanoCW_paddle_WPM->value(wpm);
}
} else { // ver 1.1.x
if ((p1 = s.find("WPM", p1 + 4)) != std::string::npos) {
p1++;
int wpm = progdefaults.CW_keyspeed;
if (sscanf(s.substr(p1).c_str(), "%d", &wpm)) {
progdefaults.CW_keyspeed = wpm;
cntr_nanoCW_paddle_WPM->value(wpm);
}
}
}
if ((p1 = s.find("dash/dot ")) != std::string::npos) {
p1 += 9;
float val = progdefaults.CWdash2dot;
if (sscanf(s.substr(p1).c_str(), "%f", &val)) {
progdefaults.CWdash2dot = val;
cntCWdash2dot->value(val);
cnt_nanoCWdash2dot->value(val);
}
}
if ((p1 = s.find("PTT")) != std::string::npos) {
if (s.find("NO", p1 + 4) != std::string::npos)
progdefaults.disable_CW_PTT = true;
else
progdefaults.disable_CW_PTT = false;
} else
progdefaults.disable_CW_PTT = false;
nanoIO_set_cw_ptt();
if ((p1 = s.find("Speed Pot")) != std::string::npos) {
size_t p2 = s.find("ON", p1);
int OK = 0;
p2 = s.find("minimum", p1);
if (p2 != std::string::npos)
OK = sscanf(&s[p2 + 8], "%d", &pot_min);
p2 = s.find("range", p1);
if (p2 != std::string::npos)
OK = sscanf(&s[p2 + 6], "%d", &pot_rng);
if (OK)
init_pot_min_max();
} else
disable_min_max();
if ((p1 = s.find("corr usec")) != std::string::npos) {
int corr;
if (sscanf(s.substr(p1+9).c_str(), "%d", &corr)) {
progdefaults.usec_correc = corr;
usec_correc->value(corr);
}
}
return;
}
int open_port(std::string PORT)
{
if (PORT.empty()) return false;
REQ(sent, "reset");
nano_serial.Device(PORT);
switch (progdefaults.nanoIO_serbaud) {
case 0: nano_serial.Baud(1200); break;
case 1: nano_serial.Baud(4800); break;
case 2: nano_serial.Baud(9600); break;
case 3: nano_serial.Baud(19200); break;
case 4: nano_serial.Baud(38400); break;
case 5: nano_serial.Baud(57600); break;
case 6: nano_serial.Baud(115200); break;
default: nano_serial.Baud(57600);
}
nano_serial.Timeout(10);
nano_serial.Retries(5);
nano_serial.Stopbits(1);
use_nanoIO = false;
if (!nano_serial.OpenPort()) {
nano_display_io("\nCould not open serial port!", FTextBase::ALTR);
LOG_ERROR("Could not open %s", progdefaults.nanoIO_serial_port_name.c_str());
return false;
}
use_nanoIO = true;
nano_read_string(1500, "cmd:");
nano_display_io("Connected to nanoIO\n", FTextBase::RECV);
return true;
}
std::string nano_serial_read()
{
static char buffer[4096];
memset(buffer, '\0',4096);
int rb = nano_serial.ReadBuffer((unsigned char *)buffer, 4095);
if (rb)
return buffer;
return "";
}
void nano_serial_flush()
{
static char buffer[1025];
memset(buffer, 0, 1025);
while (nano_serial.ReadBuffer((unsigned char *)buffer, 1024) ) ;
}
void no_cmd(void *)
{
nano_display_io("Could not read current configuration\n", FTextBase::ALTR);
}
void close_nanoIO()
{
nano_serial.ClosePort();
use_nanoIO = false;
nano_display_io("Disconnected from nanoIO\n", FTextBase::RECV);
if (nano_morse) {
delete nano_morse;
nano_morse = 0;
}
progStatus.nanoCW_online = false;
progStatus.nanoFSK_online = false;
nanoIO_isCW = false;
enable_rtty_quickchange();
}
bool open_nano()
{
if (use_nanoIO)
return true;
if (!open_port(progdefaults.nanoIO_serial_port_name))
return false;
return true;
}
bool open_nanoIO()
{
std::string rsp;
progStatus.nanoCW_online = false;
progStatus.nanoFSK_online = false;
if (open_nano()) {
set_nanoIO();
nano_sendString("~?");
rsp = nano_read_string(1000, "PTT");
size_t p = rsp.find("~?");
if (p == std::string::npos) return false;
rsp.erase(0, p + 3);
if (rsp.find("eyer") != std::string::npos)
REQ(nano_parse_config, rsp);
progStatus.nanoFSK_online = true;
nanoIO_isCW = false;
disable_rtty_quickchange();
return true;
}
return false;
}
bool open_nanoCW()
{
if (nano_morse == 0) nano_morse = new cMorse;
progStatus.nanoCW_online = false;
progStatus.nanoFSK_online = false;
std::string rsp;
if (open_nano()) {
set_nanoCW();
nano_sendString("~?");
rsp = nano_read_string(1000, "PTT");
size_t p = rsp.find("~?");
if (p == std::string::npos) return false;
rsp.erase(0, p + 3);
if (rsp.find("eyer") != std::string::npos)
REQ(nano_parse_config, rsp);
progStatus.nanoCW_online = true;
return true;
}
return false;
}
void set_nanoIO()
{
if (progStatus.nanoFSK_online) return;
std::string cmd = "~F";
std::string rsp;
int count = 5;
while (rsp.empty() && count--) {
nano_sendString(cmd);
rsp = nano_read_string(165*cmd.length(), cmd);
}
progStatus.nanoFSK_online = true;
progStatus.nanoCW_online = false;
nanoIO_isCW = false;
}
void set_nanoCW()
{
std::string cmd = "~C";
std::string rsp;
int count = 5;
while (rsp.empty() && count--) {
nano_sendString(cmd);
rsp = nano_read_string(165*cmd.length(), cmd);
}
if (rsp.find(cmd) != std::string::npos) {
nanoIO_isCW = true;
set_nanoWPM(progdefaults.CWspeed);
set_nano_dash2dot(progdefaults.CWdash2dot);
}
setwpm = progdefaults.CWspeed;
progStatus.nanoCW_online = true;
progStatus.nanoFSK_online = false;
nanoIO_isCW = true;
}
void set_nanoWPM(int wpm)
{
static char szwpm[10];
if (wpm > 60 || wpm < 5) return;
snprintf(szwpm, sizeof(szwpm), "~S%ds", wpm);
nano_sendString(szwpm);
nano_read_string(165*strlen(szwpm), szwpm);
}
void nanoIO_correction()
{
progdefaults.usec_correc = usec_correc->value();
static char szcorr[15];
snprintf(szcorr, sizeof(szcorr), "~E%de", progdefaults.usec_correc);
nano_sendString(szcorr);
nano_read_string(165*strlen(szcorr), szcorr);
}
void set_nano_keyerWPM(int wpm)
{
static char szwpm[10];
if (wpm > 60 || wpm < 5) return;
snprintf(szwpm, sizeof(szwpm), "~U%du", wpm);
nano_sendString(szwpm);
nano_read_string(165*strlen(szwpm), szwpm);
}
void set_nano_dash2dot(float wt)
{
static char szd2d[10];
if (wt < 2.5 || wt > 3.5) return;
snprintf(szd2d, sizeof(szd2d), "~D%3dd", (int)(wt * 100) );
nano_sendString(szd2d);
nano_read_string(165*strlen(szd2d), szd2d);
}
void nano_CW_query()
{
nano_serial_flush();
nano_sendString("~?");
std::string resp = nano_read_string(165*3, "PTT");
nano_display_io(resp, FTextBase::ALTR);
REQ(nano_parse_config, resp);
}
void nano_help()
{
nano_serial_flush();
nano_sendString("~~");
std::string resp = nano_read_string(1000, "cmds");
nano_display_io(resp, FTextBase::ALTR);
}
void nano_CW_save()
{
nano_sendString("~W");
nano_read_string(165*2, "~W");
}
void nanoCW_tune(int val)
{
if (val) {
nano_sendString("~T");
nano_read_string(165*2, "~T");
} else {
nano_sendString("]");
nano_read_string(165, "]");
}
}
void set_nanoIO_incr()
{
std::string s_incr = "~I";
s_incr += progdefaults.nanoIO_CW_incr;
nano_sendString(s_incr);
nano_read_string(165*2, s_incr);
}
void set_nanoIO_keyer(int indx)
{
std::string s;
if (indx == 0) s = "~A";
if (indx == 1) s = "~B";
if (indx == 2) s = "~K";
nano_sendString(s);
nano_read_string(165*s.length(), s);
}
void nanoIO_set_cw_ptt()
{
std::string s = "~X";
s += progdefaults.disable_CW_PTT ? '0' : '1';
nano_sendString(s);
nano_read_string(165*s.length(), s);
}
void nanoIO_read_pot()
{
if (!use_nanoIO) return;
if (!nanoIO_has_pot) return;
if (!progdefaults.nanoIO_speed_pot) return;
if (nanoIO_busy) return;
// reread the current pot setting
static char szval[10];
std::string rsp;
snprintf(szval, sizeof(szval), "~P?");
nano_sendString(szval);
rsp = nano_read_string(165*strlen(szval), szval);
int val = 0;
size_t p = rsp.find("wpm");
if (p != std::string::npos) {
rsp.erase(0,p);
if (sscanf(rsp.c_str(), "wpm %d", &val) == 1) {
REQ(set_paddle_WPM, val);
}
}
}
void nanoIO_use_pot()
{
std::string s = "~P";
if (progdefaults.nanoIO_speed_pot) s += '1';
else s += '0';
nano_sendString(s);
nano_read_string(165*s.length(), s);
nanoIO_read_pot();
}
void set_paddle_WPM (int wpm)
{
cntr_nanoCW_paddle_WPM->value(wpm);
cntr_nanoCW_paddle_WPM->redraw();
}
void set_nanoIO_min_max()
{
static char szval[10];
// set min value for potentiometer
snprintf(szval, sizeof(szval), "~M%dm", (int)cntr_nanoIO_min_wpm->value());
nano_sendString(szval);
nano_read_string(165*strlen(szval), szval);
// set range value of potentiometer
snprintf(szval, sizeof(szval), "~N%dn", (int)cntr_nanoIO_rng_wpm->value());
nano_sendString(szval);
nano_read_string(165*strlen(szval), szval);
nanoIO_read_pot();
}
| 17,911
|
C++
|
.cxx
| 686
| 23.844023
| 106
| 0.66253
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,138
|
winkeyer.cxx
|
w1hkj_fldigi/src/cw_rtty/winkeyer.cxx
|
// ----------------------------------------------------------------------------
// winkeyer.cxx -- Interface to k1el WinKeyer hardware
//
// Copyright (C) 2017
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <math.h>
#include <string>
#include <cstring>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <FL/Fl.H>
#include "debug.h"
#include "fl_digi.h"
#include "confdialog.h"
#include "winkeyer.h"
#include "status.h"
#include "serial.h"
#include "threads.h"
#include "modem.h"
#include "morse.h"
#include "icons.h"
#define LOG_WKEY LOG_INFO
//----------------------------------------------------------------------
// WinKeyer general support
//----------------------------------------------------------------------
Cserial WK_serial;
pthread_t WK_serial_thread;
pthread_mutex_t WK_mutex_serial = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t WK_buffer_mutex = PTHREAD_MUTEX_INITIALIZER;
//======================================================================
// WinKey command sequences
//======================================================================
// ADMIN MODE
static const char ADMIN = '\x00';
//static const char CALIBRATE = '\x00';
static const char RESET = '\x01';
static const char HOST_OPEN = '\x02';
static const char HOST_CLOSE = '\x03';
static const char ECHO_TEST = '\x04';
//static const char PADDLE_A2D = '\x05';
//static const char SPEED_A2D = '\x06';
//static const char GET_VALUES = '\x07';
//static const char GET_CAL = '\x09';
//static const char WK1_MODE = '\x0A';
static const char WK2_MODE = '\x0B';
//static const char DUMP_EEPROM = '\x0C';
//static const char LOAD_EEPROM = '\x0D';
static const char FSK_MODE = '\x13';
//static const char *SEND_MSG_NBR = "\x0E";
// HOST MODE
//static const char *SIDETONE = "\x01"; // N see table page 6 Interface Manual
static const char *SET_WPM = "\x02"; // 5 .. N .. 99 in WPM
//static const char *SET_WEIGHT = "\x03"; // 10 .. N .. 90 %
//static const char *SET_PTT_LT = "\x04"; // A - lead time, B - tail time
// both 0..250 in 10 msec steps
// "0x04<01><A0> = 10 msec lead, 1.6 sec tail
static const char *SET_SPEED_POT = "\x05"; // A = min, B = range, C anything
//static const char *PAUSE = "\x06"; // 1 = pause, 0 = release
static const char *GET_SPEED_POT = "\x07"; // return values as per page 7/8
//static const char *BACKSPACE = "\x08";
//static const char *SET_PIN_CONFIG = "\x09"; // N as per tables page 8
static const char *CLEAR_BUFFER = "\x0A";
static const char *KEY_IMMEDIATE = "\x0B"; // 0 = keyup, 1 = keydown
//static const char *HSCW = "\x0C"; // N = lpm / 100
//static const char *FARNS_WPM = "\x0D"; // 10 .. N .. 99
//static const char *SET_WK2_MODE = "\x0E"; // N as per table page 9
static const char *LOAD_DEFAULTS = "\x0F";
// A = MODE REGISTER B = SPEED IN WPM C = SIDETONE FREQ
// D = WEIGHT E = LEAD-IN TIME F = TAIL TIME
// G = MIN_WPM H = WPM RANGE I = 1ST EXTENSION
// J = KEY COMPENSATION K = FARNSWORTH WPM L = PADDLE SETPOINT
// M = DIT/DAH RATIO N = PIN_CONFIGURATION O = DONT CARE ==> zero
//static const char *FIRST_EXT = "\x10"; // see page 10/11
//static const char *SET_KEY_COMP = "\x11"; // see page 11
static const char *NULL_CMD = "\x13\x13\x13";
//static const char *PADDLE_SW_PNT = "\x12"; // 10 .. N .. 90%
//static const char *SOFT_PADDLE = "\x14"; // 0 - up, 1 - dit, 2 - dah, 3 - both
//static const char *GET_STATUS = "\x15"; // request status byte, see page 12
//static const char *POINTER_CMD = "\x16"; // see page 12
//static const char *SET_DIT_DAH = "\x17"; // 33 .. N .. 66 N = ratio * 50 / 3
// BUFFERED COMMANDS
//static const char *PTT_ON_OFF = "\x18"; // 1 = on 0 = off
//static const char *KEY_BUFFERED = "\x19"; // 0 .. N .. 99 seconds
//static const char *WAIT = "\x1A"; // 0 .. N .. 99 seconds
//static const char *MERGE = "\x1B"; // merger CD into prosign, ie AR, SK etc
//static const char *CHANGE_BFR_SPD = "\x1C"; // 5 .. N .. 99
//static const char *CHANGE_HSCW_SPD = "\x1D"; // N = lpm / 100
//static const char *CANCEL_BFR_SPD = "\x1E";
//static const char *BUFFER_NOP = "\x1F";
//======================================================================
// loop for serial i/o thread
// runs continuously until program is closed
// only accesses the serial port if it has been successfully opened
//======================================================================
void WK_version_(int);
void WK_echo_test(int);
void WK_status_(int);
void WK_speed_(int);
void WK_echo_(int);
void WK_eeprom_(int);
bool WK_readByte(unsigned char &byte);
int WK_readString();
int WK_sendString (std::string &s);
void WK_clearSerialPort();
void WK_display_byte(int);
bool WK_bypass_serial_thread_loop = true;
bool WK_run_serial_thread = true;
bool WK_PTT = false;
int WK_powerlevel = 0;
static std::string WK_str_out = "";
static bool WK_get_version = false;
static bool WK_test_echo = false;
static bool WK_host_is_up = false;
static bool wk2_version = false;
static bool read_EEPROM = false;
static char eeprom_image[256];
static int eeprom_ptr = 0;
static int wkeyer_ready = true;
static cMorse *wkmorse = 0;
static std::string hexstr(std::string &s)
{
static std::string hex;
static char val[3];
hex.clear();
for (size_t i = 0; i < s.length(); i++) {
snprintf(val, sizeof(val), "%02x", s[i] & 0xFF);
hex.append(" 0x").append(val);
}
return hex;
}
static void upcase(std::string &s)
{
for (size_t n = 0; n < s.length(); n++)
if (s[n] > ' ') s[n] = toupper(s[n]);
}
enum {NOTHING, WAIT_ECHO, WAIT_VERSION};
static void WK_send_command(std::string &cmd, int what = NOTHING)
{
int cnt = 101;
while (cnt-- && !WK_str_out.empty()) MilliSleep(1);
if (!WK_str_out.empty())
return;
guard_lock wklock(&WK_mutex_serial);
upcase(cmd);
cnt = 101;
WK_str_out = cmd;
while (cnt-- && !WK_str_out.empty()) MilliSleep(1);
switch (what) {
case WAIT_ECHO :
WK_test_echo = true;
break;
case WAIT_VERSION :
WK_get_version = true;
break;
default: ;
}
}
static bool WK_wait_for_char = false;
static char lastchar = ' ';
double WK_accum = 0;
double WK_dcomp = 0;
void WK_reset_timing()
{
WK_accum = 0;
WK_dcomp = 0;
}
static bool comp_set = false;
void WK_set_comp()
{
// progdefaults.CATkeying_compensation in milliseconds of error over 60 seconds
// WK_dcomp is error for 1 dot interval
WK_dcomp = progdefaults.CATkeying_compensation / (50.0 * progdefaults.CW_cal_speed);
comp_set = true;
}
static int dispch;
void dispbyte(void *)
{
ReceiveText->add(dispch, FTextBase::XMIT);
}
int WK_send_char(int c)
{
if (!comp_set) WK_set_comp();
if (!wkmorse) wkmorse = new cMorse;
int ch = toupper(c);
if (ch <= 0) {
MilliSleep(10);
Fl::awake();
return 0;
}
if (ch < ' ' || ch > 'Z') ch = ' ';
if (ch == '0' && progStatus.WK_cut_zeronine) ch = 'T';
if (ch == '9' && progStatus.WK_cut_zeronine) ch = 'N';
double tc = 1200.0 / progdefaults.CWspeed;
tc -= progdefaults.CATkeying_compensation / (50.0 * progdefaults.CW_cal_speed);
if (lastchar == ' ' && ch == ' ') {
tc *= 7;
} else {
tc *= wkmorse->tx_length(ch);
}
int tn = trunc(tc);
WK_accum += (tc - tn);
if (WK_accum >= 1.0) {
WK_accum -= 1.0;
tn += 1;
}
LOG_VERBOSE("tn: %d, tc: %6.2f, accum: %6.2f", tn, tc, WK_accum);
lastchar = ch;
dispch = ch;
Fl::awake(dispbyte);
if (ch != ' ') {
guard_lock wklock(&WK_mutex_serial);
static unsigned char szstr[2];
szstr[0] = ch; szstr[1] = 0;
WK_serial.WriteBuffer(szstr, 1);
}
if (tn > 0)
MilliSleep(tn);
return 0;
}
void * WK_serial_thread_loop(void *d)
{
SET_THREAD_ID(WKEY_TID);
unsigned char byte;
for(;;) {
if (!WK_run_serial_thread) break;
MilliSleep(1);//5);
if (WK_bypass_serial_thread_loop ||
!WK_serial.IsOpen()) goto WK_serial_bypass_loop;
// process outgoing
{
guard_lock wklock(&WK_buffer_mutex);
if (!WK_str_out.empty()) {
WK_sendString(WK_str_out);
WK_str_out.clear();
}
}
// receive WinKeyer response
{
guard_lock wklock(&WK_mutex_serial);
if (WK_serial.ReadBuffer(&byte, 1) == 1) {
if ((byte == 0xA5 || read_EEPROM))
WK_eeprom_(byte);
else if ((byte & 0xC0) == 0xC0)
WK_status_(byte);
else if ((byte & 0xC0) == 0x80)
WK_speed_(byte);
else if (WK_test_echo)
WK_echo_test(byte);
else if (WK_get_version)
WK_version_(byte);
else if (WK_wait_for_char)
WK_echo_(byte);
}
}
WK_serial_bypass_loop: ;
}
return NULL;
}
void WK_display_byte(int ch)
{
ReceiveText->add(ch, FTextBase::XMIT);
}
void WK_display_chars(std::string s)
{
ReceiveText->add(s.c_str());
}
void WK_echo_(int byte)
{
if (WK_wait_for_char) {
if (byte == ' ' && lastchar == '\n')
byte = lastchar;
}
REQ(WK_display_byte, byte);
lastchar = byte;
WK_wait_for_char = false;
}
void WK_echo_test(int byte)
{
if (byte != 'U') return;
LOG_DEBUG("passed echo test");
WK_test_echo = false;
}
void WK_version_(int byte)
{
static char ver[200];
snprintf(ver, sizeof(ver), "\nConnected to Winkeyer h/w version %d\n",
byte & 0xFF);
WK_host_is_up = true;
WK_get_version = false;
REQ(WK_display_chars, ver);
progStatus.WK_version = byte;
}
void WK_show_status_change(int byte)
{
box_WK_wait->color((byte & 0x10) == 0x10 ? FL_DARK_GREEN : FL_BACKGROUND2_COLOR);
box_WK_wait->redraw();
box_WK_keydown->color((byte & 0x08) == 0x08 ? FL_DARK_GREEN : FL_BACKGROUND2_COLOR);
box_WK_keydown->redraw();
box_WK_busy->color((byte & 0x04) == 0x04 ? FL_DARK_GREEN : FL_BACKGROUND2_COLOR);
box_WK_busy->redraw();
box_WK_break_in->color((byte & 0x02) == 0x02 ? FL_DARK_GREEN : FL_BACKGROUND2_COLOR);
box_WK_break_in->redraw();
box_WK_xoff->color((byte & 0x01) == 0x01 ? FL_DARK_GREEN : FL_BACKGROUND2_COLOR);
box_WK_xoff->redraw();
}
void WK_status_(int byte)
{
if ((byte & 0x04)== 0x04) wkeyer_ready = false;
else wkeyer_ready = true;
LOG_DEBUG("Wait %c, Keydown %c, Busy %c, Breakin %c, Xoff %c",
byte & 0x10 ? 'T' : 'F',
byte & 0x08 ? 'T' : 'F',
byte & 0x04 ? 'T' : 'F',
byte & 0x02 ? 'T' : 'F',
byte & 0x01 ? 'T' : 'F');
REQ(WK_show_status_change, byte);
}
void WK_show_speed_change()
{
static char szwpm[8];
snprintf(szwpm, sizeof(szwpm), "%.0f", progdefaults.CWspeed);
txt_WK_wpm->value(szwpm);
txt_WK_wpm->redraw();
cntCW_WPM->value(progdefaults.CWspeed);
cntCW_WPM->redraw();
sync_cw_parameters();
std::string cmd = SET_WPM;
cmd += progdefaults.CWspeed;
LOG_DEBUG("SET_WPM %.0f : %s", progdefaults.CWspeed, hexstr(cmd).c_str());
WK_send_command(cmd);
}
void WK_speed_(int byte)
{
if (!progStatus.WK_use_pot) return;
int val = (byte & 0x3F) + progStatus.WK_min_wpm;
progdefaults.CWspeed = progStatus.WK_speed_wpm = val;
REQ(WK_show_speed_change);
}
void WK_set_wpm()
{
std::string cmd = SET_WPM;
cmd += progdefaults.CWspeed;
LOG_DEBUG("SET_WPM %.1f : %s", progdefaults.CWspeed, hexstr(cmd).c_str());
WK_send_command(cmd);
}
void WK_use_pot_changed()
{
progStatus.WK_use_pot = btn_WK_use_pot->value();
if (progStatus.WK_use_pot) {
std::string cmd = GET_SPEED_POT;
WK_send_command(cmd);
LOG_DEBUG("GET_SPEED_POT : %s", hexstr(cmd).c_str());
} else {
std::string cmd = SET_WPM;
if (cntCW_WPM->value() > 55) cntCW_WPM->value(55);
if (cntCW_WPM->value() < 5) cntCW_WPM->value(5);
progdefaults.CWspeed = cntCW_WPM->value();
cmd += progdefaults.CWspeed;
LOG_DEBUG("SET_WPM %.1f : %s", progdefaults.CWspeed, hexstr(cmd).c_str());
WK_send_command(cmd);
}
}
void WK_eeprom_(int byte)
{
if (byte == 0xA5) {
memset( eeprom_image, 0, 256);
eeprom_ptr = 0;
read_EEPROM = true;
}
if (eeprom_ptr < 256)
eeprom_image[eeprom_ptr++] = byte;
if (eeprom_ptr == 256) {
read_EEPROM = false;
LOG_DEBUG("\n%s", str2hex(eeprom_image, 256));
eeprom_ptr = 0;
}
}
void load_defaults()
{
std::string cmd = LOAD_DEFAULTS;
cmd += progStatus.WK_mode_register;
cmd += progdefaults.CWspeed;
cmd += progStatus.WK_sidetone;
cmd += progStatus.WK_weight;
cmd += progStatus.WK_lead_in_time;
cmd += progStatus.WK_tail_time;
cmd += progStatus.WK_min_wpm;
cmd += progStatus.WK_rng_wpm;
cmd += progStatus.WK_first_extension;
cmd += progStatus.WK_key_compensation;
cmd += progStatus.WK_farnsworth_wpm;
cmd += progStatus.WK_paddle_setpoint;
cmd += progStatus.WK_dit_dah_ratio;
cmd += progStatus.WK_pin_configuration;
cmd += progStatus.WK_dont_care;
LOG_DEBUG("\n\
mode register .... %0x\n\
CW speed ......... %.1f\n\
side tone ........ %d\n\
weight ........... %d\n\
lead in time ..... %d\n\
tail time ........ %d\n\
min wpm .......... %d\n\
rng wpm .......... %d\n\
first ext ........ %d\n\
key comp ......... %d\n\
farnsworth wpm ... %d\n\
paddle setpoint .. %d\n\
dit dah ratio .... %d\n\
pin config ....... %d\n\
don't care ....... %d\n\
hex std::string ....... %s",
progStatus.WK_mode_register,
progdefaults.CWspeed,
progStatus.WK_sidetone,
progStatus.WK_weight,
progStatus.WK_lead_in_time,
progStatus.WK_tail_time,
progStatus.WK_min_wpm,
progStatus.WK_rng_wpm,
progStatus.WK_first_extension,
progStatus.WK_key_compensation,
progStatus.WK_farnsworth_wpm,
progStatus.WK_paddle_setpoint,
progStatus.WK_dit_dah_ratio,
progStatus.WK_pin_configuration,
progStatus.WK_dont_care,
hexstr(cmd).c_str());
WK_send_command(cmd);
cmd = SET_SPEED_POT;
cmd += progStatus.WK_min_wpm;
cmd += progStatus.WK_rng_wpm;
cmd += 0xFF;
LOG_DEBUG("SET_SPEED_POT : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
if (progStatus.WK_use_pot) {
std::string cmd = GET_SPEED_POT;
LOG_WKEY("GET_SPEED_POT : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
} else {
std::string cmd = SET_WPM;
cmd += progdefaults.CWspeed;
LOG_DEBUG("SETWPM %.1f : %s", progdefaults.CWspeed, hexstr(cmd).c_str());
WK_send_command(cmd);
}
}
void WKCW_init()
{
std::string cmd;
if (wk2_version) {
cmd = " ";
cmd[0] = ADMIN;
cmd[1] = WK2_MODE;
LOG_DEBUG("WK2_MODE %s", hexstr(cmd).c_str());
WK_send_command(cmd);
}
btn_WK_use_pot->value(progStatus.WK_use_pot);
load_defaults();
cmd = GET_SPEED_POT;
LOG_DEBUG("GET_SPEED_POT : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
cmd = SET_WPM;
cmd += progdefaults.CWspeed;
LOG_DEBUG("SET_WPM %.1f : %s", progdefaults.CWspeed, hexstr(cmd).c_str());
WK_send_command(cmd);
cmd = SET_SPEED_POT;
cmd += progStatus.WK_min_wpm;
cmd += progStatus.WK_rng_wpm;
cmd += 0xFF;
LOG_DEBUG("SET_SPEED_POT : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
cmd = GET_SPEED_POT;
LOG_DEBUG("GET_SPEED_POT : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
}
void open_wkeyer()
{
int cnt = 0;
std::string cmd = NULL_CMD;
LOG_DEBUG("NULL_CMD : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
WK_clearSerialPort();
// This code only works for a real WinKeyer
// fails for the K3NG Arduino sketch code as written to MORTTY
if (btn_WK_serial_echo->value() && !btnK3NG->value()) {
cmd = " ";
cmd[0] = ADMIN;
cmd[1] = ECHO_TEST;
cmd += 'U';
LOG_DEBUG("ECHO_TEST : %s", hexstr(cmd).c_str());
WK_send_command(cmd, WAIT_ECHO);
cnt = 5000;
while (WK_test_echo == true && cnt) {
MilliSleep(1);
cnt--;
}
if (WK_test_echo) {
debug::show();
LOG_ERROR("%s", "Winkeyer not responding");
WK_test_echo = false;
pthread_mutex_lock(&WK_mutex_serial);
WK_bypass_serial_thread_loop = true;
pthread_mutex_unlock(&WK_mutex_serial);
WK_serial.ClosePort();
progStatus.WK_serial_port_name = "NONE";
select_WK_CommPort->value(progStatus.WK_serial_port_name.c_str());
return;
}
LOG_DEBUG("Echo response in %d msec", 5000 - cnt);
}
cmd = " ";
cmd[0] = ADMIN;
cmd[1] = HOST_OPEN;
LOG_DEBUG("HOST_OPEN : %s", hexstr(cmd).c_str());
WK_send_command(cmd, WAIT_VERSION);
cnt = 1000;
while (WK_get_version == true && cnt) {
MilliSleep(1);
cnt--;
}
}
void close_wkeyer()
{
std::string cmd = " ";
cmd[0] = ADMIN;
cmd[1] = RESET;
LOG_DEBUG("WKEY RESET : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
cmd[0] = ADMIN;
cmd[1] = HOST_CLOSE;
LOG_DEBUG("HOST CLOSE : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
}
void WK_cancel_transmit()
{
std::string cmd = CLEAR_BUFFER;
LOG_DEBUG("CLEAR_BUFFER : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
}
void WK_tune(bool on)
{
std::string cmd = KEY_IMMEDIATE;
if (on) cmd += '\1';
else cmd += '\0';
LOG_DEBUG("KEY_IMMEDIATE : %s", hexstr(cmd).c_str());
WK_send_command(cmd);
}
//----------------------------------------------------------------------
// WinKeyer setup support
//----------------------------------------------------------------------
void WK_change_btn_swap()
{
progStatus.WK_mode_register &=0xF7;
progStatus.WK_mode_register |= btn_WK_swap->value() ? 0x08 : 0x00;
LOG_DEBUG("mode reg: %2X", progStatus.WK_mode_register);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_btn_auto_space()
{
progStatus.WK_mode_register &=0xFD;
progStatus.WK_mode_register |= btn_WK_auto_space->value() ? 0x02 : 0x00;
LOG_DEBUG("mode reg: %2X", progStatus.WK_mode_register);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_btn_ct_space()
{
progStatus.WK_mode_register &= 0xFE;
progStatus.WK_mode_register |= btn_WK_ct_space->value();
LOG_DEBUG("mode reg: %2X", progStatus.WK_mode_register);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_btn_paddledog()
{
progStatus.WK_mode_register &=0x7F;
progStatus.WK_mode_register |= btn_WK_paddledog->value() ? 0x80 : 0x00;
LOG_DEBUG("mode reg: %2X", progStatus.WK_mode_register);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_btn_cut_zeronine()
{
progStatus.WK_cut_zeronine = btn_WK_cut_zeronine->value();
}
void WK_change_btn_paddle_echo()
{
progStatus.WK_mode_register &=0xBF;
progStatus.WK_mode_register |= btn_WK_paddle_echo->value() ? 0x40 : 0x00;
LOG_DEBUG("mode reg: %2X", progStatus.WK_mode_register);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_btn_serial_echo()
{
progStatus.WK_mode_register &=0xFB;
progStatus.WK_mode_register |= btn_WK_serial_echo->value() ? 0x04 : 0x00;
LOG_DEBUG("mode reg: %2X", progStatus.WK_mode_register);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_btn_sidetone_on()
{
progStatus.WK_sidetone = choice_WK_sidetone->index() + 1;
progStatus.WK_sidetone |= (btn_WK_sidetone_on->value() ? 0x80 : 0x00);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_btn_tone_on()
{
progStatus.WK_pin_configuration = (progStatus.WK_pin_configuration & 0xFD) | (btn_WK_tone_on->value() ? 2 : 0);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_btn_ptt_on()
{
progStatus.WK_pin_configuration = (progStatus.WK_pin_configuration & 0xFE) | (btn_WK_ptt_on->value() ? 1 : 0);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_min_wpm()
{
progStatus.WK_min_wpm = cntr_WK_min_wpm->value();
if (progStatus.WK_speed_wpm < progStatus.WK_min_wpm) {
progStatus.WK_speed_wpm = progStatus.WK_min_wpm;
cntCW_WPM->value(progStatus.WK_speed_wpm);
}
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_rng_wpm()
{
progStatus.WK_rng_wpm = cntr_WK_rng_wpm->value();
if (progStatus.WK_speed_wpm > progStatus.WK_min_wpm + progStatus.WK_rng_wpm) {
progStatus.WK_speed_wpm = progStatus.WK_min_wpm + progStatus.WK_rng_wpm;
cntCW_WPM->value(progStatus.WK_speed_wpm);
}
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_farnsworth()
{
progStatus.WK_farnsworth_wpm = cntr_WK_farnsworth->value();
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_cmd_wpm()
{
progStatus.WK_cmd_wpm = cntr_WK_cmd_wpm->value();
}
void WK_change_cntr_ratio()
{
progStatus.WK_dit_dah_ratio = (unsigned char)(cntr_WK_ratio->value() * 50 / 3);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_comp()
{
progStatus.WK_key_compensation = cntr_WK_comp->value();
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_first_ext()
{
progStatus.WK_first_extension = cntr_WK_first_ext->value();
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_sample()
{
progStatus.WK_paddle_setpoint = cntr_WK_sample->value();
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_weight()
{
progStatus.WK_weight = cntr_WK_weight->value();
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_leadin()
{
progStatus.WK_lead_in_time = cntr_WK_leadin->value();
if (progStatus.WK_online)
load_defaults();
}
void WK_change_cntr_tail()
{
progStatus.WK_tail_time = cntr_WK_tail->value();
if (progStatus.WK_online)
load_defaults();
}
void WK_change_choice_keyer_mode()
{
int modebits = choice_WK_keyer_mode->index() << 4;
progStatus.WK_mode_register = (progStatus.WK_mode_register & 0xCF) | modebits;
LOG_DEBUG("mode reg: %02X", progStatus.WK_mode_register);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_choice_hang()
{
int hangbits = choice_WK_hang->index() << 4;
progStatus.WK_pin_configuration = (progStatus.WK_pin_configuration & 0xCF) | hangbits;
if (progStatus.WK_online)
load_defaults();
}
void WK_change_choice_sidetone()
{
progStatus.WK_sidetone = choice_WK_sidetone->index() + 1;
progStatus.WK_sidetone |= (btn_WK_sidetone_on->value() ? 0x80 : 0x00);
if (progStatus.WK_online)
load_defaults();
}
void WK_change_choice_output_pins()
{
int pinbits = (choice_WK_output_pins->index() + 1) << 2;
progStatus.WK_pin_configuration = (progStatus.WK_pin_configuration & 0xF3) | pinbits;
if (progStatus.WK_online)
load_defaults();
}
//----------------------------------------------------------------------
// serial support
//----------------------------------------------------------------------
extern bool test;
bool WK_start_wkey_serial()
{
WK_bypass_serial_thread_loop = true;
WK_serial.ClosePort();
if (progStatus.WK_serial_port_name == "NONE") return false;
WK_serial.Device(progStatus.WK_serial_port_name);
WK_serial.Baud(1200);
WK_serial.Stopbits(2);
WK_serial.Retries(1);
WK_serial.Timeout(1);//50);
WK_serial.RTSptt(false);
WK_serial.DTRptt(false);
WK_serial.RTSCTS(false);
WK_serial.RTS(false);
WK_serial.DTR(true);
if (!WK_serial.OpenPort()) {
LOG_ERROR("Cannot access %s", progStatus.WK_serial_port_name.c_str());
return false;
} else {
LOG_DEBUG("\n\
Serial port:\n\
Port : %s\n\
Baud : %d\n\
Stopbits : %d\n\
Timeout : %d\n\
DTR : %s\n\
RTS/CTS : %s",
progStatus.WK_serial_port_name.c_str(),
WK_serial.Baud(),
WK_serial.Stopbits(),
WK_serial.Timeout(),
WK_serial.DTR() ? "true" : "false",
WK_serial.RTSCTS() ? "true" : "false");
}
MilliSleep(400); // to allow WK1 to wake up
return true;
}
#define WK_RXBUFFSIZE 512
static unsigned char WK_replybuff[WK_RXBUFFSIZE+1];
static std::string WK_replystr;
bool WK_readByte(unsigned char &byte)
{
unsigned char c;
int ret = WK_serial.ReadBuffer(&c, 1);
byte = c;
return ret;
}
int WK_readString()
{
int numread = 0;
size_t n;
memset(WK_replybuff, 0, WK_RXBUFFSIZE + 1);
while (numread < WK_RXBUFFSIZE) {
if ((n = WK_serial.ReadBuffer(&WK_replybuff[numread], WK_RXBUFFSIZE - numread)) == 0) break;
numread += n;
}
WK_replystr.append((const char *)WK_replybuff);
return numread;
}
int WK_sendString (std::string &s)
{
if (WK_serial.IsOpen() == false) {
LOG_DEBUG("command: %s", str2hex(s.data(), s.length()));
return 0;
}
int numwrite = (int)s.length();
WK_serial.WriteBuffer((unsigned char *)s.c_str(), numwrite);
if (isprint(s[0]))
LOG_DEBUG("Sent %d: '%s' %s", numwrite, s.c_str(), str2hex(s.data(), s.length()));
else
LOG_DEBUG("Sent %d: %s", numwrite, str2hex(s.data(), s.length()));
return numwrite;
}
void WK_clearSerialPort()
{
if (WK_serial.IsOpen() == false) return;
WK_serial.FlushBuffer();
}
static bool WK_thread_activated = false;
void WK_exit()
{
if (!WK_thread_activated) return;
if (progStatus.WK_online)
WKCW_connect(false);
pthread_mutex_lock(&WK_mutex_serial);
WK_run_serial_thread = false;
pthread_mutex_unlock(&WK_mutex_serial);
pthread_join(WK_serial_thread, NULL);
}
// =====================================================================
// Winkeyer 3.0 FSK interface support
// =====================================================================
// progStatus configuration parameters:
//
// WKFSK_baud
// WKFSK_stopbits
// WKFSK_ptt
// WKFSK_polarity
// WKFSK_sidetone
// WKFSK_auto_crlf
// WKFSK_diddle
// WKFSK_diddle_char
// WKFSK_usos
// WKFSK_monitor
#define wait_one_char(baud, stopbits) (int)((6 + (stopbits))*1000.0 / (baud))
void WKFSK_send_char(int ch)
{
unsigned char c = toupper(ch);
int n = (int)(5 * wait_one_char(45.45, 2));
if (c == 0 || c == '\n') {
MilliSleep(10);
Fl::awake();
return;
}
if (c == '\r') c = '}';
{
guard_lock wklock(&WK_buffer_mutex);
if (c == '[' || c == ']' || c == '}' || c == '{' || c < ' ') {
LOG_DEBUG("%s",
(c == '[' ? "[ - ptt ON" :
c == ']' ? "] - ptt OFF" :
c == '}' ? "} - CR/LF" :
c == '{' ? "{ - left brace" : "Control code"));
} else
LOG_DEBUG("Sending %c, %x", c, c);
if (progStatus.WKFSK_monitor)
WK_wait_for_char = true;
WK_str_out += c;
}
while (WK_wait_for_char) {
MilliSleep(10);
Fl::awake();
n -= 10;
if (n <= 0 || active_modem->get_stopflag()) {
WK_wait_for_char = false;
LOG_DEBUG("%s",
(n <= 0 ? "echo: NIL" : "xmt aborted") );
return;
}
}
return;
}
void WKFSK_init()
{
std::string cmd = " ";
LOG_DEBUG("mode %d", progStatus.WKFSK_mode);
LOG_DEBUG("diddle %d", progStatus.WKFSK_diddle);
LOG_DEBUG("ptt %d", progStatus.WKFSK_ptt);
LOG_DEBUG("auto crlf %d", progStatus.WKFSK_auto_crlf);
LOG_DEBUG("monitor %d", progStatus.WKFSK_monitor);
LOG_DEBUG("polarity %d", progStatus.WKFSK_polarity);
LOG_DEBUG("baud %d", progStatus.WKFSK_baud);
LOG_DEBUG("stopbits %d", progStatus.WKFSK_stopbits);
LOG_DEBUG("sidetone %d", progStatus.WKFSK_sidetone);
LOG_DEBUG("diddle_char %d", progStatus.WKFSK_diddle_char);
LOG_DEBUG("usos %d", progStatus.WKFSK_usos);
cmd[0] = ADMIN;
cmd[1] = FSK_MODE;
cmd[2] = (progStatus.WKFSK_mode ? 0x80 : 0x00);
cmd[2] |= (progStatus.WKFSK_diddle ? 0x40 : 0x00);
cmd[2] |= (progStatus.WKFSK_ptt ? 0x20 : 0x00);
cmd[2] |= (progStatus.WKFSK_auto_crlf ? 0x10 : 0x00);
cmd[2] |= (progStatus.WKFSK_monitor ? 0x08 : 0x00);
cmd[2] |= (progStatus.WKFSK_polarity ? 0x04 : 0x00);
cmd[2] |= progStatus.WKFSK_baud;
cmd[3] = (progStatus.WKFSK_sidetone ? 0x10 : 0x00);
cmd[3] |= (progStatus.WKFSK_stopbits ? 0x08 : 0x00);
cmd[3] |= (progStatus.WKFSK_diddle_char ? 0x04 : 0x00);
cmd[3] |= progStatus.WKFSK_usos;
WK_send_command(cmd);
}
void WKCW_connect(bool start)
{
LOG_DEBUG("WKCW_connect(%s)", (start ? "ON" : "OFF"));
progStatus.WKFSK_mode = false;
btn_WKFSK_connect->value(0);
btn_WKCW_connect->value(0);
if (!WK_thread_activated) {
if (pthread_create(&WK_serial_thread, NULL, WK_serial_thread_loop, NULL)) {
perror("pthread_create");
exit(EXIT_FAILURE);
}
WK_thread_activated = true;
}
if (!start) {
close_wkeyer();
MilliSleep(100);
WK_bypass_serial_thread_loop = true;
MilliSleep(50);
WK_serial.ClosePort();
ReceiveText->add("\nWinKeyer disconnected\n");
progStatus.WK_online = false;
return;
}
// shutdown and then reconnect if currently in FSK mode
if (progStatus.WK_online) {
close_wkeyer();
MilliSleep(100);
WK_bypass_serial_thread_loop = true;
MilliSleep(50);
WK_serial.ClosePort();
}
if (WK_start_wkey_serial()) {
WK_bypass_serial_thread_loop = false;
open_wkeyer();
if (!WK_serial.IsOpen()) {
progStatus.WK_online = false;
return;
} else {
progStatus.WK_online = true;
btn_WKCW_connect->value(1);
}
} else
progStatus.WK_online = false;
WKCW_init();
}
void WKFSK_connect(bool start)
{
LOG_DEBUG("WKFSK_connect(%s)", (start ? "ON" : "OFF"));
progStatus.WKFSK_mode = false;
btn_WKFSK_connect->value(0);
btn_WKCW_connect->value(0);
if (!WK_thread_activated) {
if (pthread_create(&WK_serial_thread, NULL, WK_serial_thread_loop, NULL)) {
perror("pthread_create");
exit(EXIT_FAILURE);
}
WK_thread_activated = true;
}
if (!start) {
close_wkeyer();
MilliSleep(100);
WK_bypass_serial_thread_loop = true;
MilliSleep(50);
WK_serial.ClosePort();
ReceiveText->add("\nWinKeyer disconnected\n");
progStatus.WK_online = false;
return;
}
// shutdown and then reconnect if currently in CW mode
if (progStatus.WK_online) {
close_wkeyer();
MilliSleep(100);
WK_bypass_serial_thread_loop = true;
MilliSleep(50);
WK_serial.ClosePort();
}
if (WK_start_wkey_serial()) {
WK_bypass_serial_thread_loop = false;
open_wkeyer();
if (!WK_serial.IsOpen()) {
progStatus.WK_online = false;
return;
} else {
progStatus.WK_online = true;
}
} else
progStatus.WK_online = false;
if (progStatus.WK_version < 31) {
fl_alert2("Winkeyer version must be 31 or greater");
close_wkeyer();
MilliSleep(100);
WK_bypass_serial_thread_loop = true;
MilliSleep(50);
WK_serial.ClosePort();
ReceiveText->add("\nWinKeyer disconnected\n");
progStatus.WK_online = false;
progStatus.WKFSK_mode = false;
return;
}
progStatus.WKFSK_mode = true;
WKFSK_init();
btn_WKFSK_connect->value(1);
}
| 30,143
|
C++
|
.cxx
| 1,020
| 27.276471
| 112
| 0.645609
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,139
|
YAESUkeying.cxx
|
w1hkj_fldigi/src/cw_rtty/YAESUkeying.cxx
|
// ----------------------------------------------------------------------------
// FTkeying.cxx serial string CW interface to Elecraft transceivers
//
// Copyright (C) 2020
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <iostream>
#include <string>
#include "YAESUkeying.h"
#include "configuration.h"
#include "rigio.h"
#include "threads.h"
#include "debug.h"
#include "rigsupport.h"
#include "morse.h"
#include "fl_digi.h"
#include "qrunner.h"
int FTwpm = 0;
bool use_FTkeyer = false;
static cMorse *FTmorse = 0;
static char lastFTchar = 0;
void set_FTkeyer()
{
FTwpm = progdefaults.CWspeed;
if (FTwpm < 4) FTwpm = 4;
if (FTwpm > 60) FTwpm = 60;
progdefaults.CWspeed = FTwpm;
char cmd[10];
snprintf(cmd, sizeof(cmd), "KS%03d;", FTwpm);
if (progdefaults.fldigi_client_to_flrig) {
xmlrpc_priority(cmd);
} else {
guard_lock ser_guard( &rigCAT_mutex);
rigio.WriteBuffer((unsigned char *)cmd, strlen(cmd));
}
MilliSleep(50);
}
void FTkeyer_send_char(int c)
{
if (FTmorse == 0) FTmorse = new cMorse;
if (FTwpm != progdefaults.CWspeed) {
set_FTkeyer();
}
if (c == GET_TX_CHAR_NODATA || c == 0x0d) {
MilliSleep(50);
return;
}
c = toupper(c);
if (c < ' ') c = ' ';
if (c > 'Z') c = ' ';
float tc = 1200.0 / progdefaults.CWspeed;
if (progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth))
tc = 1200.0 / progdefaults.CWfarnsworth;
if (c == ' ') {
if (lastFTchar == ' ')
tc *= 7;
else
tc *= 5;
} else {
tc *= FTmorse->tx_length(c);
char cmd[20];
memset(cmd, 0, 20);
snprintf(cmd, sizeof(cmd), "KM2%c;KY7;", (char)c);
if (progdefaults.fldigi_client_to_flrig) {
xmlrpc_priority(cmd);
} else if (progdefaults.chkUSERIGCATis) {
guard_lock ser_guard( &rigCAT_mutex);
rigio.WriteBuffer((unsigned char *)cmd, strlen(cmd));
}
}
if (progdefaults.CATkeying_compensation / (progdefaults.CWspeed * 6) < tc)
tc -= progdefaults.CATkeying_compensation / (progdefaults.CWspeed * 6);
MilliSleep(tc);
lastFTchar = c;
}
| 2,744
|
C++
|
.cxx
| 90
| 28.488889
| 88
| 0.660856
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,140
|
view_cw.cxx
|
w1hkj_fldigi/src/cw_rtty/view_cw.cxx
|
// ----------------------------------------------------------------------------
// view_cw.cxx
//
// (c) 2014 Mauri Niininen, AG1LE
// (c) 2017 Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
// viewpsk is a multi channel psk decoder which allows the parallel processing
// of the complete audio spectrum from 400 to 1150 Hz in equal 25 Hz
// channels. Each channel is separately decoded and the decoded characters
// passed to the user interface routines for presentation. The number of
// channels can be up to and including 30.
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include "cw.h"
#include "view_cw.h"
#include "pskeval.h"
#include "pskcoeff.h"
#include "pskvaricode.h"
#include "misc.h"
#include "configuration.h"
#include "Viewer.h"
#include "qrunner.h"
#include "status.h"
#include "waterfall.h"
extern waterfall *wf;
#define CH_SPACING 100
#define VCW_FFT_SIZE 2048 // must be a factor of 2
#define VCW_DEC_RATIO 16
#define VCW_SAMPLERATE 8000
// VKWPM conversion factor
// # samples per dot = VKWPM / wpm
// 30 samples @ 20 wpm
// 15 samples @ 40 wpm
//#define VKWPM 600 // ((12 * VCW_SAMPLERATE/10) / VCW_DEC_RATIO)
#define VKWPM ((12 * VCW_SAMPLERATE/10) / VCW_DEC_RATIO)
enum {READY, NOT_READY};
cMorse *CW_CHANNEL::morse = 0;
CW_CHANNEL::CW_CHANNEL() {
bitfilter.setLength(10);
trackingfilter.setLength(16);
if (!morse) morse = new cMorse;
VCW_filter = new fftfilt ((CH_SPACING * 0.6) / VCW_SAMPLERATE, VCW_FFT_SIZE);
smpl_ctr = dec_ctr = 0;
phi1 = phi2 = 0;
}
CW_CHANNEL::~CW_CHANNEL() {
if (morse) {
delete morse;
morse = 0;
}
delete VCW_filter;
}
void CW_CHANNEL::init(int _ch, double _freq)
{
ch_freq = _freq;
ch = _ch;
phase = 0.0;
phase_increment = TWOPI * ch_freq / VCW_SAMPLERATE;
agc_peak = 0.0;
sig_avg = 0.5;
timeout = 0;
smpl_ctr = 0;
dec_ctr = 0;
space_sent = true;
last_element = 0;
curr_element = 0;
bitfilter.reset();
two_dots = 2 * VKWPM / progdefaults.CWspeed;
sync_parameters();
}
void CW_CHANNEL::reset()
{
space_sent = true;
last_element = 0;
curr_element = 0;
decode_str.clear();
two_dots = 2 * VKWPM / progdefaults.CWspeed;
bitfilter.reset();
trackingfilter.reset();
}
void CW_CHANNEL::update_tracking(int dur_1, int dur_2)
{
static int min_dot = (VKWPM / 60) / 2;
static int max_dash = 6 * VKWPM / 10;
if ((dur_1 > dur_2) && (dur_1 > 4 * dur_2)) return;
if ((dur_2 > dur_1) && (dur_2 > 4 * dur_1)) return;
if (dur_1 < min_dot || dur_2 < min_dot) return;
if (dur_2 > max_dash || dur_2 > max_dash) return;
two_dots = trackingfilter.run((dur_1 + dur_2) / 2);
}
inline int CW_CHANNEL::sample_count(unsigned int earlier, unsigned int later)
{
return (earlier >= later) ? 0 : (later - earlier);
}
void CW_CHANNEL::sync_parameters()
{
trackingfilter.reset();
}
enum {KEYDOWN, KEYUP, POST_TONE, QUERY };
int CW_CHANNEL::decode_state(int cw_state)
{
switch (cw_state) {
case KEYDOWN:
{
if (cw_receive_state == KEYDOWN)
return NOT_READY;
// first tone in idle state reset audio sample counter
if (cw_receive_state == KEYUP) {
smpl_ctr = 0;
rx_rep_buf.clear();
}
// save the timestamp
cw_rr_start_timestamp = smpl_ctr;
// Set state to indicate we are inside a tone.
cw_receive_state = KEYDOWN;
return NOT_READY;
break;
}
case KEYUP:
{
// The receive state is expected to be inside a tone.
if (cw_receive_state != KEYDOWN)
return NOT_READY;
// Save the current timestamp
curr_element = sample_count( cw_rr_start_timestamp, smpl_ctr );
cw_rr_end_timestamp = smpl_ctr;
// If the tone length is shorter than any noise cancelling
// threshold that has been set, then ignore this tone.
if (curr_element < two_dots / 10) {
cw_receive_state = KEYUP;
return NOT_READY;
}
// Set up to track speed on dot-dash or dash-dot pairs for this test to
// work, we need a dot dash pair or a dash dot pair to validate timing
// from and force the speed tracking in the right direction.
if (last_element > 0) update_tracking( last_element, curr_element );
last_element = curr_element;
// a dot is anything shorter than 2 dot times
if (curr_element <= two_dots) {
rx_rep_buf += '.';
} else {
rx_rep_buf += '-';
}
// We just added a representation to the receive buffer.
// If it's full, then reset everything as it is probably noise
if (rx_rep_buf.length() > MAX_MORSE_ELEMENTS) {
cw_receive_state = KEYUP;
rx_rep_buf.clear();
smpl_ctr = 0; // reset audio sample counter
return NOT_READY;
}
// All is well. Move to the more normal after-tone state.
cw_receive_state = POST_TONE;
return NOT_READY;
break;
}
case QUERY:
{
// this should be called quite often (faster than inter-character gap) It looks after timing
// key up intervals and determining when a character, a word space, or an error char '*' should be returned.
// READY is returned when there is a printable character. Nothing to do if we are in a tone
if (cw_receive_state == KEYDOWN)
return NOT_READY;
// in this call we expect a pointer to a char to be valid
if (cw_state == KEYDOWN || cw_state == KEYUP) {
// else we had no place to put character...
cw_receive_state = KEYUP;
rx_rep_buf.clear();
// reset decoding pointer
return NOT_READY;
}
// compute length of silence so far
// sync_parameters();
curr_element = sample_count( cw_rr_end_timestamp, smpl_ctr );
// SHORT time since keyup... nothing to do yet
if (curr_element < two_dots)
return NOT_READY;
// MEDIUM time since keyup... check for character space
// one shot through this code via receive state logic
if ((curr_element > two_dots)
&& (curr_element < 2 * two_dots) ) {
// && cw_receive_state == POST_TONE) {
std::string code = morse->rx_lookup(rx_rep_buf);
if (code.empty()) {
decode_str.clear();
cw_receive_state = KEYUP;
rx_rep_buf.clear();
space_sent = false;
return NOT_READY ;
}
decode_str = code;
cw_receive_state = KEYUP;
rx_rep_buf.clear();
space_sent = false;
return READY;
}
// LONG time since keyup... check for a word space
if ((curr_element > 2 * two_dots) && !space_sent) {
decode_str = " ";
space_sent = true;
return READY;
}
break;
}
}
return NOT_READY;
}
//bool record = false;
//int rec_count = 0;
void CW_CHANNEL::detect_tone()
{
norm_sig = 0;
CWupper = 0;
CWlower = 0;
sig_avg = decayavg(sig_avg, value, 1000);
if (value > sig_avg) {
if (value > agc_peak)
agc_peak = decayavg(agc_peak, value, 100);
else
agc_peak = decayavg(agc_peak, value, 1000);
}
if (!agc_peak) return;
value /= agc_peak;
norm_sig = sig_avg / agc_peak;
// metric = 0.8 * metric;
// metric += 0.2 * clamp(20*log10(sig_avg / noise_floor) , 0, 40);
metric = clamp(20*log10(sig_avg / noise_floor) , 0, 40);
CWupper = norm_sig + 0.1;
CWlower = norm_sig - 0.1;
if (metric > progStatus.VIEWER_cwsquelch ) {
if ((value >= CWupper) && (cw_receive_state != KEYDOWN))
decode_state(KEYDOWN);
if ((value < CWlower) && (cw_receive_state == KEYDOWN))
decode_state(KEYUP);
if ((decode_state(QUERY) == READY) ) {
for (size_t n = 0; n < decode_str.length(); n++)
REQ(&viewaddchr,
ch,
(int)ch_freq,
decode_str[n], (int)MODE_CW);
timeout = progdefaults.VIEWERtimeout * VCW_SAMPLERATE / WF_BLOCKSIZE;
decode_str.clear();
rx_rep_buf.clear();
}
}
}
void CW_CHANNEL::rx_process(const double *buf, int len)
{
cmplx z, *zp;
int n = 0;
while (len-- > 0) {
z = cmplx ( *buf * cos(phase), *buf * sin(phase) );
buf++;
phase += phase_increment;
if (phase > TWOPI) phase -= TWOPI;
n = VCW_filter->run(z, &zp);
if (n) {
for (int i = 0; i < n; i++) {
if (++dec_ctr < VCW_DEC_RATIO) continue;
dec_ctr = 0;
smpl_ctr++;
value = bitfilter.run(abs(zp[i]));
detect_tone();
}
}
}
}
//======================================================================
// view_cw
//======================================================================
view_cw::view_cw()
{
for (int i = 0; i < VCW_MAXCH; i++) channel[i].reset();
viewmode = MODE_CW;
}
view_cw::~view_cw()
{
}
void view_cw::init()
{
nchannels = progdefaults.VIEWERchannels;
for (int i = 0; i < VCW_MAXCH; i++) {
channel[i].init(i, 400.0 + CH_SPACING * i);
}
for (int i = 0; i < nchannels; i++)
REQ(&viewclearchannel, i);
}
void view_cw::restart()
{
for (int i = 0; i < VCW_MAXCH; i++) {
channel[i].space_sent = true;
channel[i].last_element = 0;
channel[i].curr_element = 0;
channel[i].two_dots = 2 * VKWPM / progdefaults.CWspeed;
}
init();
}
void view_cw::clearch(int n)
{
REQ( &viewclearchannel, n);
REQ( &viewaddchr, n, (int)NULLFREQ, 0, viewmode);
}
void view_cw::clear()
{
for (int i = 0; i < VCW_MAXCH; i++) clearch(i);
}
int view_cw::rx_process(const double *buf, int len)
{
double nf = 1e8;
if (nchannels != progdefaults.VIEWERchannels) init();
for (int n = 0; n < nchannels; n++) {
channel[n].rx_process(buf, len);
if (nf > channel[n].avg_signal() &&
channel[n].avg_signal() > 1e-3) nf = channel[n].avg_signal();
if (channel[n].timeout)
if (! --channel[n].timeout)
clearch(n);
}
if (nf <= 1e-3) nf = 1e-3;
for (int n = 0; n < nchannels; n++) channel[n].set_noise_floor(nf);
return 0;
}
int view_cw::get_freq(int n)
{
return (int)channel[n].ch_freq;
}
| 10,098
|
C++
|
.cxx
| 343
| 26.900875
| 108
| 0.646755
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,141
|
ICOMkeying.cxx
|
w1hkj_fldigi/src/cw_rtty/ICOMkeying.cxx
|
// ----------------------------------------------------------------------------
// ICOMkeying.cxx serial string CW interface to Elecraft transceivers
//
// Copyright (C) 2020
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <iostream>
#include <string>
#include "ICOMkeying.h"
#include "configuration.h"
#include "rigio.h"
#include "threads.h"
#include "debug.h"
#include "rigsupport.h"
#include "morse.h"
#include "fl_digi.h"
#include "util.h"
int ICOMwpm = 0;
bool use_ICOMkeyer = false;
static std::string ICOMcmd;
static cMorse *ICOMmorse = 0;
char lastICOMchar = 0;
static std::string hexvals = "0123456789ABCDEF";
int CIVaddr(std::string s)
{
int val = 0;
if (s.length() != 2) return 0;
if (hexvals.find(s[0]) == std::string::npos) return 0;
if (hexvals.find(s[1]) == std::string::npos) return 0;
val = hexvals.find(s[0]) * 16 + hexvals.find(s[1]);
return val;
}
std::string ICOMheader()
{
std::string s;
s.assign("\xFE\xFE");
s += ((char)CIVaddr(progdefaults.ICOMcivaddr));
s.append("\xE0");
return s;
}
std::string hexstr(std::string s)
{
std::string hex;
for (size_t i = 0; i < s.length(); i++) {
hex.append(" x");
hex += hexvals[(s[i] & 0xFF) >> 4];
hex += hexvals[s[i] & 0xF];
}
return hex;
}
void set_ICOMkeyer() {
ICOMwpm = progdefaults.CWspeed;
if (ICOMwpm < 6) ICOMwpm = 6;
if (ICOMwpm > 48) ICOMwpm = 48;
progdefaults.CWspeed = ICOMwpm;
int hexwpm = (ICOMwpm - 6) * 6 + 2;
ICOMcmd.assign(ICOMheader());
ICOMcmd.append("\x14\x0C");
ICOMcmd += (char)(hexwpm / 100);
ICOMcmd += (char)(((hexwpm % 100) / 10) * 16 + (hexwpm % 10));
ICOMcmd += '\xFD';
if (progdefaults.fldigi_client_to_flrig) {
xmlrpc_priority(hexstr(ICOMcmd));
} else {
guard_lock ser_guard( &rigCAT_mutex);
rigio.WriteBuffer((unsigned char *)ICOMcmd.c_str(), ICOMcmd.length());
}
MilliSleep(100);
}
void ICOMkeyer_send_char(int c)
{
if (ICOMmorse == 0) ICOMmorse = new cMorse;
if (ICOMwpm != progdefaults.CWspeed) {
set_ICOMkeyer();
}
if (c == GET_TX_CHAR_NODATA || c == 0x0d) {
MilliSleep(50);
return;
}
int set_time = 0;
c = toupper(c);
if (c < ' ') c = ' ';
if (c > 'Z') c = ' ';
int tc = 1200 / progdefaults.CWspeed;
if (progdefaults.CWusefarnsworth && (progdefaults.CWspeed > progdefaults.CWfarnsworth))
tc = 1200 / progdefaults.CWfarnsworth;
if (c == ' ') {
if (lastICOMchar == ' ')
tc *= 7;
else
tc *= 5;
} else {
tc *= (ICOMmorse->tx_length(c));
ICOMcmd.assign(ICOMheader());
ICOMcmd.append("\x17");
ICOMcmd += (char)(c);
ICOMcmd += '\xFD';
if (progdefaults.fldigi_client_to_flrig) {
xmlrpc_priority(ICOMcmd);
} else if (progdefaults.chkUSERIGCATis) {
guard_lock ser_guard( &rigCAT_mutex);
rigio.WriteBuffer((unsigned char *)ICOMcmd.c_str(), ICOMcmd.length());
}
}
tc -= progdefaults.CATkeying_compensation / (progdefaults.CWspeed * 6);
tc = int(tc);
if (set_time < tc)
MilliSleep((int)(tc - set_time));
lastICOMchar = c;
}
| 3,666
|
C++
|
.cxx
| 125
| 27.344
| 88
| 0.65247
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,142
|
fsk.cxx
|
w1hkj_fldigi/src/cw_rtty/fsk.cxx
|
// ----------------------------------------------------------------------------
// fsk.cxx -- FSK signal generator
//
// Copyright (C) 2021
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// This code bears some resemblance to code contained in gmfsk from which
// it originated. Much has been changed, but credit should still be
// given to Tomi Manninen (oh2bns@sral.fi), who so graciously distributed
// his gmfsk modem under the GPL.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <errno.h>
#include "trx.h"
#include "fsk.h"
#include "serial.h"
#include <iostream>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
//#include <time.h>
#if !HAVE_CLOCK_GETTIME
# ifdef __APPLE__
# include <mach/mach_time.h>
# define CLOCK_REALTIME 0
# define CLOCK_MONOTONIC 6
# endif
# if TIME_WITH_SYS_TIME
# include <sys/time.h>
# endif
#endif
#include <math.h>
#include <stdio.h>
#ifdef __WIN32__
# include <windows.h>
//# include <chrono>
# include <math.h>
#else
# ifdef __APPLE__
//# include <chrono>
# include <sys/event.h>
# include <sys/time.h>
# else
//# include <chrono>
# include <sys/timerfd.h>
# endif
#endif
#include "threads.h"
#include "util.h"
#include "configuration.h"
#include "debug.h"
static pthread_mutex_t fsk_mutex = PTHREAD_MUTEX_INITIALIZER;
//using namespace std;
//using namespace std::chrono;
//static std::chrono::time_point<std::chrono::steady_clock> tp_start, tp_end;
char FSK::letters[32] = {
'\0', 'E', '\n', 'A', ' ', 'S', 'I', 'U',
'\r', 'D', 'R', 'J', 'N', 'F', 'C', 'K',
'T', 'Z', 'L', 'W', 'H', 'Y', 'P', 'Q',
'O', 'B', 'G', ' ', 'M', 'X', 'V', ' '
};
/*
* U.S. version of the figures case.
*/
char FSK::figures[32] = {
'\0', '3', '\n', '-', ' ', '\a', '8', '7',
'\r', '$', '4', '\'', ',', '!', ':', '(',
'5', '"', ')', '2', '#', '6', '0', '1',
'9', '?', '&', ' ', '.', '/', ';', ' '
};
const char * FSK::ascii[256] = {
"<NUL>", "<SOH>", "<STX>", "<ETX>", "<EOT>", "<ENQ>", "<ACK>", "<BEL>",
"<BS>", "<TAB>", "<LF>", "<VT>", "<FF>", "<CR>", "<SO>", "<SI>",
"<DLE>", "<DC1>", "<DC2>", "<DC3>", "<DC4>", "<NAK>", "<SYN>", "<ETB>",
"<CAN>", "<EM> ", "<SUB>", "<FIG>", "<FS>", "<GS>", "<RS>", "<LTR>",
" ", "!", "\"","#", "$", "%", "&", "\'",
"(", ")", "*", "+", ",", "-", ".", "/",
"0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", ":", ";", "<", "=", ">", "?",
"@", "A", "B", "C", "D", "E", "F", "G",
"H", "I", "J", "K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T", "U", "V", "W",
"X", "Y", "Z", "[", "\\","]", "^", "_",
"`", "a", "b", "c", "d", "e", "f", "g",
"h", "i", "j", "k", "l", "m", "n", "o",
"p", "q", "r", "s", "t", "u", "v", "w",
"x", "y", "z", "{", "|", "}", "~", "<DEL>",
"<128>", "<129>", "<130>", "<131>", "<132>", "<133>", "<134>", "<135>",
"<136>", "<137>", "<138>", "<139>", "<140>", "<141>", "<142>", "<143>",
"<144>", "<145>", "<146>", "<147>", "<148>", "<149>", "<150>", "<151>",
"<152>", "<153>", "<154>", "<155>", "<156>", "<157>", "<158>", "<159>",
"<160>", "<161>", "<162>", "<163>", "<164>", "<165>", "<166>", "<167>",
"<168>", "<169>", "<170>", "<171>", "<172>", "<173>", "<174>", "<175>",
"<176>", "<177>", "<178>", "<179>", "<180>", "<181>", "<182>", "<183>",
"<184>", "<185>", "<186>", "<187>", "<188>", "<189>", "<190>", "<191>",
"<192>", "<193>", "<194>", "<195>", "<196>", "<197>", "<198>", "<199>",
"<200>", "<201>", "<202>", "<203>", "<204>", "<205>", "<206>", "<207>",
"<208>", "<209>", "<210>", "<211>", "<212>", "<213>", "<214>", "<215>",
"<216>", "<217>", "<218>", "<219>", "<220>", "<221>", "<222>", "<223>",
"<224>", "<225>", "<226>", "<227>", "<228>", "<229>", "<230>", "<231>",
"<232>", "<233>", "<234>", "<235>", "<236>", "<237>", "<238>", "<239>",
"<240>", "<241>", "<242>", "<243>", "<244>", "<245>", "<246>", "<247>",
"<248>", "<249>", "<250>", "<251>", "<252>", "<253>", "<254>", "<255>"
};
FSK::FSK()
{
str_buff.clear();
start_bits = 0;
stop_bits = 0;
chr_bits = 0;
fsk_chr = 0;
chr_out = 0;
shift_state = FSK_FIGURES;
shift = 0;
_shift_on_space = false;
init_fsk_thread();
shared_port = false;
_sending = false;
}
FSK::~FSK()
{
exit_fsk_thread();
if (shared_port)
return;
fsk_port->ClosePort();
}
void FSK::open_port(std::string device_name)
{
if (shared_port)
return;
serial_device = device_name;
fsk_port->Device (serial_device.c_str());
fsk_port->OpenPort();
}
void FSK::fsk_shares_port(Cserial *shared_device)
{
//std::cout << "fsk shares port : " << shared_device << std::endl;
shared_port = true;
fsk_port = shared_device;
}
bool FSK::sending() {
return chr_out != 0;
// return str_buff.length() > 0;
}
void FSK::send(const char ch) {
chr_out = ch;
// str_buff.clear();
// str_buff += ch;
}
void FSK::append(const char ch) {
chr_out = ch;
// str_buff += ch;
}
void FSK::send(std::string s) {
str_buff = s;
}
void FSK::append(std::string s) {
str_buff.append(s);
}
void FSK::abort() {
str_buff.clear();
}
void FSK::fsk_out (bool state) {
if (_dtr) {
fsk_port->SetDTR(_reverse ? state : !state);
} else {
fsk_port->SetRTS(_reverse ? state : !state);
}
}
int FSK::baudot_enc(int data) {
data &= 0xFF;
int i;
if (islower(data))
data = toupper(data);
if (data == ' ') // always force space to be a LETTERS char
return FSK_LETTERS | 4;
for (i = 0; i < 32; i++) {
if (data == letters[i]) {
return (i | FSK_LETTERS);
}
if (data == figures[i]) {
return (i | FSK_FIGURES);
}
}
return shift_state | 4;
}
//----------------------------------------------------------------------
void FSK::send_baudot(int ch)
{
fskbit(FSK_SPACE, BITLEN);
fskbit((ch & 0x01) == 0x01 ? FSK_MARK : FSK_SPACE, BITLEN);
fskbit((ch & 0x02) == 0x02 ? FSK_MARK : FSK_SPACE, BITLEN);
fskbit((ch & 0x04) == 0x04 ? FSK_MARK : FSK_SPACE, BITLEN);
fskbit((ch & 0x08) == 0x08 ? FSK_MARK : FSK_SPACE, BITLEN);
fskbit((ch & 0x10) == 0x10 ? FSK_MARK : FSK_SPACE, BITLEN);
fskbit(FSK_MARK, BITLEN * (progdefaults.fsk_STOPBITS ? 1.5 : 2.0));
}
//----------------------------------------------------------------------
extern state_t trx_state;
static int idles = 0;
int FSK::callback_method()
{
if (trx_state != STATE_TX || chr_out == 0) {
stop_bits = 0;
idles = 4;
MilliSleep(22);
return 0;
}
while (idles) {
send_baudot(LTRS);
shift_state = FSK_LETTERS;
idles--;
}
if (chr_out == 0x03) {
chr_out = 0;
send_baudot(LTRS);
shift_state = FSK_LETTERS;
} else {
fsk_chr = baudot_enc(chr_out & 0xFF);
if ((fsk_chr & 0x300) != shift_state) {
shift_state = fsk_chr & 0x300;
if (shift_state == FSK_LETTERS) {
send_baudot(LTRS);
} else {
send_baudot(FIGS);
}
}
chr_out = 0;
send_baudot(fsk_chr & 0x1F);
}
return 0;
}
void *fsk_loop(void *data)
{
SET_THREAD_ID(FSK_TID);
FSK *fsk = (FSK *)data;
while (1) {
fsk->callback_method();
{
guard_lock tlock (&fsk_mutex);
if (fsk->fsk_loop_terminate) goto _exit;
}
}
_exit:
return NULL;
}
int FSK::init_fsk_thread()
{
fsk_loop_terminate = false;
if(pthread_mutex_init(&fsk_mutex, NULL)) {
LOG_ERROR("FSK tabortimer thread create fail (pthread_mutex_init)");
return 0;
}
if (pthread_create(&fsk_thread, NULL, fsk_loop, this)) {
LOG_ERROR("FSK timer thread create fail (pthread_create)");
return 0;
}
return 1;
}
void FSK::exit_fsk_thread()
{
{
guard_lock tlock (&fsk_mutex);
fsk_loop_terminate = true;
MilliSleep(50);
}
pthread_join(fsk_thread, NULL);
fsk_loop_terminate = false;
}
double FSK::fsk_now()
{
static struct timespec tp;
#if HAVE_CLOCK_GETTIME
clock_gettime(CLOCK_MONOTONIC, &tp);
#elif defined(__WIN32__)
DWORD msec = GetTickCount();
tp.tv_sec = msec / 1000;
tp.tv_nsec = (msec % 1000) * 1000000;
#elif defined(__APPLE__)
static mach_timebase_info_data_t info = { 0, 0 };
if (unlikely(info.denom == 0))
mach_timebase_info(&info);
uint64_t t = mach_absolute_time() * info.numer / info.denom;
tp.tv_sec = t / 1000000000;
tp.tv_nsec = t % 1000000000;
#endif
return 1.0 * tp.tv_sec + tp.tv_nsec * 1e-9;
}
// set DTR/RTS to bit value for secs duration
//#define TTEST
#ifdef TTEST
static FILE *ttest = 0;
#endif
void FSK::fskbit(int bit, double secs)
{
#ifdef TTEST
if (!ttest) ttest = fopen("ttest.txt", "a");
#endif
static struct timespec tv = { 0, 1000000L};
static double end1 = 0;
static double end2 = 0;
static double t1 = 0;
#ifdef TTEST
static double t2 = 0;
#endif
static double t3 = 0;
static double t4 = 0;
int loop1 = 0;
int loop2 = 0;
int n1 = secs*1e3;
#ifdef __WIN32__
timeBeginPeriod(1);
#endif
t1 = fsk_now();
end2 = t1 + secs - 0.0001;
fsk_out(bit);
#ifdef TTEST
t2 = fsk_now();
#endif
end1 = end2 - 0.005;
t3 = fsk_now();
while (t3 < end1 && (++loop1 < n1)) {
nanosleep(&tv, NULL);
t3 = fsk_now();
}
t4 = t3;
while (t4 <= end2) {
loop2++;
t4 = fsk_now();
}
#ifdef __WIN32__
timeEndPeriod(1);
#endif
#ifdef TTEST
if (ttest)
fprintf(ttest, "%d, %d, %d, %6f, %6f, %6f, %6f, %6f, %6f, %6f\n",
bit, loop1, loop2,
secs * 1e3,
(t2 - t1)*1e3,
(t3 - t1)*1e3,
(t3 - end1) * 1e3,
(t4 - t1)*1e3,
(t4 - end2) * 1e3,
(t4 - t1 - secs)*1e3);
#endif
}
| 9,857
|
C++
|
.cxx
| 362
| 25.279006
| 79
| 0.54478
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,143
|
DXSpiderCommandReference.cxx
|
w1hkj_fldigi/src/dxcluster/DXSpiderCommandReference.cxx
|
std::string dxspider_cmds = "\n\
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n\
<html>\n\
<head>\n\
<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n\
<title>DX Spider Command Reference</title>\n\
</head>\n\
<body>\n\
<h1 id=\"firstHeading\" class=\"firstHeading\" lang=\"en\"><span\n\
dir=\"auto\">DXSpider Command Reference</span></h1>\n\
<div id=\"bodyContent\">\n\
<div id=\"mw-content-text\" dir=\"ltr\" class=\"mw-content-ltr\"\n\
lang=\"en\">\n\
<div id=\"toc\" class=\"toc\">\n\
<div id=\"toctitle\">\n\
<h2>Contents</h2>\n\
</div>\n\
</div>\n\
</div>\n\
</div>\n\
<div id=\"toc\" class=\"toc\">\n\
<ul>\n\
<li class=\"toclevel-1 tocsection-1\"><a\n\
href=\"#ACCEPT\"><span class=\"tocnumber\">1</span> <span class=\"toctext\">ACCEPT</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-2\"><a\n\
href=\"#accept.2Fannounce\"><span class=\"tocnumber\">1.1</span> <span class=\"toctext\">accept/announce</span></a></li>\n\
<li class=\"toclevel-2 tocsection-3\"><a\n\
href=\"#accept.2Fspots\"><span class=\"tocnumber\">1.2</span> <span class=\"toctext\">accept/spots</span></a></li>\n\
<li class=\"toclevel-2 tocsection-4\"><a\n\
href=\"#accept.2Fwcy\"><span class=\"tocnumber\">1.3</span> <span class=\"toctext\">accept/wcy</span></a></li>\n\
<li class=\"toclevel-2 tocsection-5\"><a\n\
href=\"#accept.2Fwwv\"><span class=\"tocnumber\">1.4</span> <span class=\"toctext\">accept/wwv</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-6\"><a\n\
href=\"#ANNOUNCE\"><span class=\"tocnumber\">2</span> <span class=\"toctext\">ANNOUNCE</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-7\"><a\n\
href=\"#announce_2\"><span class=\"tocnumber\">2.1</span> <span class=\"toctext\">announce</span></a></li>\n\
<li class=\"toclevel-2 tocsection-8\"><a\n\
href=\"#announce_full\"><span class=\"tocnumber\">2.2</span> <span class=\"toctext\">announce\n\
full</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-9\"><a\n\
href=\"#APROPOS\"><span class=\"tocnumber\">3</span> <span class=\"toctext\">APROPOS</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-10\"><a\n\
href=\"#apropos_2\"><span class=\"tocnumber\">3.1</span> <span class=\"toctext\">apropos</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-11\"><a\n\
href=\"#BLANK\"><span class=\"tocnumber\">4</span> <span class=\"toctext\">BLANK</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-12\"><a\n\
href=\"#blank_2\"><span class=\"tocnumber\">4.1</span> <span class=\"toctext\">blank</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-13\"><a\n\
href=\"#BYE\"><span class=\"tocnumber\">5</span> <span class=\"toctext\">BYE</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-14\"><a\n\
href=\"#bye_2\"><span class=\"tocnumber\">5.1</span> <span class=\"toctext\">bye</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-15\"><a\n\
href=\"#CHAT\"><span class=\"tocnumber\">6</span> <span class=\"toctext\">CHAT</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-16\"><a\n\
href=\"#chat_2\"><span class=\"tocnumber\">6.1</span> <span class=\"toctext\">chat</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-17\"><a\n\
href=\"#CLEAR\"><span class=\"tocnumber\">7</span> <span class=\"toctext\">CLEAR</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-18\"><a\n\
href=\"#clear.2Fannounce\"><span class=\"tocnumber\">7.1</span> <span class=\"toctext\">clear/announce</span></a></li>\n\
<li class=\"toclevel-2 tocsection-19\"><a\n\
href=\"#clear.2Froute\"><span class=\"tocnumber\">7.2</span> <span class=\"toctext\">clear/route</span></a></li>\n\
<li class=\"toclevel-2 tocsection-20\"><a\n\
href=\"#clear.2Fspots_.5B0-9.7Call.5D\"><span class=\"tocnumber\">7.3</span> <span class=\"toctext\">clear/spots\n\
[0-9|all]</span></a></li>\n\
<li class=\"toclevel-2 tocsection-21\"><a\n\
href=\"#clear.2Fwcy\"><span class=\"tocnumber\">7.4</span> <span class=\"toctext\">clear/wcy</span></a></li>\n\
<li class=\"toclevel-2 tocsection-22\"><a\n\
href=\"#clear.2Fwwv\"><span class=\"tocnumber\">7.5</span> <span class=\"toctext\">clear/wwv</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-23\"><a\n\
href=\"#DATABASES\"><span class=\"tocnumber\">8</span> <span class=\"toctext\">DATABASES</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-24\"><a\n\
href=\"#dbavail\"><span class=\"tocnumber\">8.1</span> <span class=\"toctext\">dbavail</span></a></li>\n\
<li class=\"toclevel-2 tocsection-25\"><a\n\
href=\"#dbshow\"><span class=\"tocnumber\">8.2</span> <span class=\"toctext\">dbshow</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-26\"><a\n\
href=\"#MAIL\"><span class=\"tocnumber\">9</span> <span class=\"toctext\">MAIL</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-27\"><a\n\
href=\"#directory\"><span class=\"tocnumber\">9.1</span> <span class=\"toctext\">directory</span></a></li>\n\
<li class=\"toclevel-2 tocsection-28\"><a\n\
href=\"#directory_.3Cfrom.3E-.3Cto.3E\"><span class=\"tocnumber\">9.2</span> <span class=\"toctext\">directory\n\
<from>-<to></span></a></li>\n\
<li class=\"toclevel-2 tocsection-29\"><a\n\
href=\"#directory_.3Cnn.3E\"><span class=\"tocnumber\">9.3</span> <span class=\"toctext\">directory\n\
<nn></span></a></li>\n\
<li class=\"toclevel-2 tocsection-30\"><a\n\
href=\"#directory_all\"><span class=\"tocnumber\">9.4</span> <span class=\"toctext\">directory\n\
all</span></a></li>\n\
<li class=\"toclevel-2 tocsection-31\"><a\n\
href=\"#directory_from_.3Ccall.3E\"><span class=\"tocnumber\">9.5</span> <span class=\"toctext\">directory\n\
from <call></span></a></li>\n\
<li class=\"toclevel-2 tocsection-32\"><a\n\
href=\"#directory_new\"><span class=\"tocnumber\">9.6</span> <span class=\"toctext\">directory\n\
new</span></a></li>\n\
<li class=\"toclevel-2 tocsection-33\"><a\n\
href=\"#directory_own\"><span class=\"tocnumber\">9.7</span> <span class=\"toctext\">directory\n\
own</span></a></li>\n\
<li class=\"toclevel-2 tocsection-34\"><a\n\
href=\"#directory_subject_.3Cstring.3E\"><span class=\"tocnumber\">9.8</span> <span class=\"toctext\">directory\n\
subject <string></span></a></li>\n\
<li class=\"toclevel-2 tocsection-35\"><a\n\
href=\"#directory_to_.3Ccall.3E\"><span class=\"tocnumber\">9.9</span> <span class=\"toctext\">directory\n\
to <call></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-36\"><a\n\
href=\"#DX\"><span class=\"tocnumber\">10</span> <span class=\"toctext\">DX</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-37\"><a\n\
href=\"#dx_.5Bby_.3Ccall.3E.5D_.3Cfreq.3E_.3Ccall.3E_.3Cremarks.3E\"><span class=\"tocnumber\">10.1</span> <span class=\"toctext\">dx\n\
[by <call>] <freq> <call>\n\
<remarks></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-38\"><a\n\
href=\"#ECHO\"><span class=\"tocnumber\">11</span> <span class=\"toctext\">ECHO</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-39\"><a\n\
href=\"#echo_.3Cline.3E\"><span class=\"tocnumber\">11.1</span> <span class=\"toctext\">echo\n\
<line></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-40\"><a\n\
href=\"#FILTERING\"><span class=\"tocnumber\">12</span> <span class=\"toctext\">FILTERING</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-41\"><a\n\
href=\"#filtering...\"><span class=\"tocnumber\">12.1</span> <span class=\"toctext\">filtering...</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-42\"><a\n\
href=\"#HELP\"><span class=\"tocnumber\">13</span> <span class=\"toctext\">HELP</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-43\"><a\n\
href=\"#help_2\"><span class=\"tocnumber\">13.1</span> <span class=\"toctext\">help</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-44\"><a\n\
href=\"#JOIN\"><span class=\"tocnumber\">14</span> <span class=\"toctext\">JOIN</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-45\"><a\n\
href=\"#join_.3Cgroup.3E\"><span class=\"tocnumber\">14.1</span> <span class=\"toctext\">join\n\
<group></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-46\"><a\n\
href=\"#KILL\"><span class=\"tocnumber\">15</span> <span class=\"toctext\">KILL</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-47\"><a\n\
href=\"#kill_.3Cfrom_msgno.3E-.3Cto_msgno.3E\"><span class=\"tocnumber\">15.1</span> <span class=\"toctext\">kill\n\
<from msgno>-<to msgno></span></a></li>\n\
<li class=\"toclevel-2 tocsection-48\"><a\n\
href=\"#kill_.3Cmsgno.3E_.5B.3Cmsgno...5D\"><span class=\"tocnumber\">15.2</span> <span class=\"toctext\">kill\n\
<msgno> [<msgno..]</span></a></li>\n\
<li class=\"toclevel-2 tocsection-49\"><a\n\
href=\"#kill_.3Cmsgno.3E_.5B.3Cmsgno.3E_....5D\"><span class=\"tocnumber\">15.3</span> <span class=\"toctext\">kill\n\
<msgno> [<msgno> ...]</span></a></li>\n\
<li class=\"toclevel-2 tocsection-50\"><a\n\
href=\"#kill_from_.3Cregex.3E\"><span class=\"tocnumber\">15.4</span> <span class=\"toctext\">kill\n\
from <regex></span></a></li>\n\
<li class=\"toclevel-2 tocsection-51\"><a\n\
href=\"#kill_to_.3Cregex.3E\"><span class=\"tocnumber\">15.5</span> <span class=\"toctext\">kill\n\
to <regex></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-52\"><a\n\
href=\"#LEAVE\"><span class=\"tocnumber\">16</span> <span class=\"toctext\">LEAVE</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-53\"><a\n\
href=\"#leave_.3Cgroup.3E\"><span class=\"tocnumber\">16.1</span> <span class=\"toctext\">leave\n\
<group></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-54\"><a\n\
href=\"#LINKS\"><span class=\"tocnumber\">17</span> <span class=\"toctext\">LINKS</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-55\"><a\n\
href=\"#links_2\"><span class=\"tocnumber\">17.1</span> <span class=\"toctext\">links</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-56\"><a\n\
href=\"#READ\"><span class=\"tocnumber\">18</span> <span class=\"toctext\">READ</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-57\"><a\n\
href=\"#read_2\"><span class=\"tocnumber\">18.1</span> <span class=\"toctext\">read</span></a></li>\n\
<li class=\"toclevel-2 tocsection-58\"><a\n\
href=\"#read_.3Cmsgno.3E\"><span class=\"tocnumber\">18.2</span> <span class=\"toctext\">read\n\
<msgno></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-59\"><a\n\
href=\"#REJECT\"><span class=\"tocnumber\">19</span> <span class=\"toctext\">REJECT</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-60\"><a\n\
href=\"#reject_2\"><span class=\"tocnumber\">19.1</span> <span class=\"toctext\">reject</span></a></li>\n\
<li class=\"toclevel-2 tocsection-61\"><a\n\
href=\"#reject.2Fannounce_.5B0-9.5D_.3Cpattern.3E\"><span class=\"tocnumber\">19.2</span> <span class=\"toctext\">reject/announce\n\
[0-9] <pattern></span></a></li>\n\
<li class=\"toclevel-2 tocsection-62\"><a\n\
href=\"#reject.2Fspots_.5B0-9.5D_.3Cpattern.3E\"><span class=\"tocnumber\">19.3</span> <span class=\"toctext\">reject/spots\n\
[0-9] <pattern></span></a></li>\n\
<li class=\"toclevel-2 tocsection-63\"><a\n\
href=\"#reject.2Fwcy_.5B0-9.5D_.3Cpattern.3E\"><span class=\"tocnumber\">19.4</span> <span class=\"toctext\">reject/wcy\n\
[0-9] <pattern></span></a></li>\n\
<li class=\"toclevel-2 tocsection-64\"><a\n\
href=\"#reject.2Fwwv_.5B0-9.5D_.3Cpattern.3E\"><span class=\"tocnumber\">19.5</span> <span class=\"toctext\">reject/wwv\n\
[0-9] <pattern></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-65\"><a\n\
href=\"#REPLY\"><span class=\"tocnumber\">20</span> <span class=\"toctext\">REPLY</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-66\"><a\n\
href=\"#reply_2\"><span class=\"tocnumber\">20.1</span> <span class=\"toctext\">reply</span></a></li>\n\
<li class=\"toclevel-2 tocsection-67\"><a\n\
href=\"#reply_.3Cmsgno.3E\"><span class=\"tocnumber\">20.2</span> <span class=\"toctext\">reply\n\
<msgno></span></a></li>\n\
<li class=\"toclevel-2 tocsection-68\"><a\n\
href=\"#reply_b_.3Cmsgno.3E\"><span class=\"tocnumber\">20.3</span> <span class=\"toctext\">reply\n\
b <msgno></span></a></li>\n\
<li class=\"toclevel-2 tocsection-69\"><a\n\
href=\"#reply_noprivate_.3Cmsgno.3E\"><span class=\"tocnumber\">20.4</span> <span class=\"toctext\">reply\n\
noprivate <msgno></span></a></li>\n\
<li class=\"toclevel-2 tocsection-70\"><a\n\
href=\"#reply_rr_.3Cmsgno.3E\"><span class=\"tocnumber\">20.5</span> <span class=\"toctext\">reply\n\
rr <msgno></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-71\"><a\n\
href=\"#SEND\"><span class=\"tocnumber\">21</span> <span class=\"toctext\">SEND</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-72\"><a\n\
href=\"#send_.3Ccall.3E_.5B.3Ccall.3E_....5D\"><span class=\"tocnumber\">21.1</span> <span class=\"toctext\">send\n\
<call> [<call> ...]</span></a></li>\n\
<li class=\"toclevel-2 tocsection-73\"><a\n\
href=\"#send_copy_.3Cmsgno.3E_.3Ccall.3E\"><span class=\"tocnumber\">21.2</span> <span class=\"toctext\">send\n\
copy <msgno> <call></span></a></li>\n\
<li class=\"toclevel-2 tocsection-74\"><a\n\
href=\"#send_noprivate_.3Ccall.3E\"><span class=\"tocnumber\">21.3</span> <span class=\"toctext\">send\n\
noprivate <call></span></a></li>\n\
<li class=\"toclevel-2 tocsection-75\"><a\n\
href=\"#send_private_.3Ccall.3E\"><span class=\"tocnumber\">21.4</span> <span class=\"toctext\">send\n\
private <call></span></a></li>\n\
<li class=\"toclevel-2 tocsection-76\"><a\n\
href=\"#send_rr_.3Ccall.3E\"><span class=\"tocnumber\">21.5</span> <span class=\"toctext\">send\n\
rr <call></span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-77\"><a\n\
href=\"#SET\"><span class=\"tocnumber\">22</span> <span class=\"toctext\">SET</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-78\"><a\n\
href=\"#set.2Faddress_.3Cyour_address.3E\"><span class=\"tocnumber\">22.1</span> <span class=\"toctext\">set/address\n\
<your address></span></a></li>\n\
<li class=\"toclevel-2 tocsection-79\"><a\n\
href=\"#set.2Fannounce\"><span class=\"tocnumber\">22.2</span> <span class=\"toctext\">set/announce</span></a></li>\n\
<li class=\"toclevel-2 tocsection-80\"><a\n\
href=\"#set.2Fanntalk\"><span class=\"tocnumber\">22.3</span> <span class=\"toctext\">set/anntalk</span></a></li>\n\
<li class=\"toclevel-2 tocsection-81\"><a\n\
href=\"#set.2Fbeep\"><span class=\"tocnumber\">22.4</span> <span class=\"toctext\">set/beep</span></a></li>\n\
<li class=\"toclevel-2 tocsection-82\"><a\n\
href=\"#set.2Fdx\"><span class=\"tocnumber\">22.5</span> <span class=\"toctext\">set/dx</span></a></li>\n\
<li class=\"toclevel-2 tocsection-83\"><a\n\
href=\"#set.2Fdxcq\"><span class=\"tocnumber\">22.6</span> <span class=\"toctext\">set/dxcq</span></a></li>\n\
<li class=\"toclevel-2 tocsection-84\"><a\n\
href=\"#set.2Fdxgrid\"><span class=\"tocnumber\">22.7</span> <span class=\"toctext\">set/dxgrid</span></a></li>\n\
<li class=\"toclevel-2 tocsection-85\"><a\n\
href=\"#set.2Fdxitu\"><span class=\"tocnumber\">22.8</span> <span class=\"toctext\">set/dxitu</span></a></li>\n\
<li class=\"toclevel-2 tocsection-86\"><a\n\
href=\"#set.2Fecho\"><span class=\"tocnumber\">22.9</span> <span class=\"toctext\">set/echo</span></a></li>\n\
<li class=\"toclevel-2 tocsection-87\"><a\n\
href=\"#set.2Femail_.3Cemail.3E\"><span class=\"tocnumber\">22.10</span> <span class=\"toctext\">set/email\n\
<email></span></a></li>\n\
<li class=\"toclevel-2 tocsection-88\"><a\n\
href=\"#set.2Fhere\"><span class=\"tocnumber\">22.11</span> <span class=\"toctext\">set/here</span></a></li>\n\
<li class=\"toclevel-2 tocsection-89\"><a\n\
href=\"#set.2Fhomenode_.3Cnode.3E\"><span class=\"tocnumber\">22.12</span> <span class=\"toctext\">set/homenode\n\
<node></span></a></li>\n\
<li class=\"toclevel-2 tocsection-90\"><a\n\
href=\"#set.2Flanguage_.3Clang.3E\"><span class=\"tocnumber\">22.13</span> <span class=\"toctext\">set/language\n\
<lang></span></a></li>\n\
<li class=\"toclevel-2 tocsection-91\"><a\n\
href=\"#set.2Flocation_.3Clat_.26_long.3E\"><span class=\"tocnumber\">22.14</span> <span class=\"toctext\">set/location\n\
<lat & long></span></a></li>\n\
<li class=\"toclevel-2 tocsection-92\"><a\n\
href=\"#set.2Flogininfo\"><span class=\"tocnumber\">22.15</span> <span class=\"toctext\">set/logininfo</span></a></li>\n\
<li class=\"toclevel-2 tocsection-93\"><a\n\
href=\"#set.2Fname_.3Cyour_name.3E\"><span class=\"tocnumber\">22.16</span> <span class=\"toctext\">set/name\n\
<your name></span></a></li>\n\
<li class=\"toclevel-2 tocsection-94\"><a\n\
href=\"#set.2Fpage_.3Clines_per_page.3E\"><span class=\"tocnumber\">22.17</span> <span class=\"toctext\">set/page\n\
<lines per page></span></a></li>\n\
<li class=\"toclevel-2 tocsection-95\"><a\n\
href=\"#set.2Fpassword\"><span class=\"tocnumber\">22.18</span> <span class=\"toctext\">set/password</span></a></li>\n\
<li class=\"toclevel-2 tocsection-96\"><a\n\
href=\"#set.2Fprompt_.3Cstring.3E\"><span class=\"tocnumber\">22.19</span> <span class=\"toctext\">set/prompt\n\
<string></span></a></li>\n\
<li class=\"toclevel-2 tocsection-97\"><a\n\
href=\"#set.2Fqra_.3Clocator.3E\"><span class=\"tocnumber\">22.20</span> <span class=\"toctext\">set/qra\n\
<locator></span></a></li>\n\
<li class=\"toclevel-2 tocsection-98\"><a\n\
href=\"#set.2Fqth_.3Cyour_qth.3E\"><span class=\"tocnumber\">22.21</span> <span class=\"toctext\">set/qth\n\
<your qth></span></a></li>\n\
<li class=\"toclevel-2 tocsection-99\"><a\n\
href=\"#set.2Fstartup\"><span class=\"tocnumber\">22.22</span> <span class=\"toctext\">set/startup</span></a></li>\n\
<li class=\"toclevel-2 tocsection-100\"><a\n\
href=\"#set.2Ftalk\"><span class=\"tocnumber\">22.23</span> <span class=\"toctext\">set/talk</span></a></li>\n\
<li class=\"toclevel-2 tocsection-101\"><a\n\
href=\"#set.2Fusstate\"><span class=\"tocnumber\">22.24</span> <span class=\"toctext\">set/usstate</span></a></li>\n\
<li class=\"toclevel-2 tocsection-102\"><a\n\
href=\"#set.2Fwcy\"><span class=\"tocnumber\">22.25</span> <span class=\"toctext\">set/wcy</span></a></li>\n\
<li class=\"toclevel-2 tocsection-103\"><a\n\
href=\"#set.2Fwwv\"><span class=\"tocnumber\">22.26</span> <span class=\"toctext\">set/wwv</span></a></li>\n\
<li class=\"toclevel-2 tocsection-104\"><a\n\
href=\"#set.2Fwx\"><span class=\"tocnumber\">22.27</span> <span class=\"toctext\">set/wx</span></a></li>\n\
</ul>\n\
</li>\n\
<li class=\"toclevel-1 tocsection-105\"><a\n\
href=\"#SHOW\"><span class=\"tocnumber\">23</span> <span class=\"toctext\">SHOW</span></a>\n\
<ul>\n\
<li class=\"toclevel-2 tocsection-106\"><a\n\
href=\"#show.2Fchat\"><span class=\"tocnumber\">23.1</span> <span class=\"toctext\">show/chat</span></a></li>\n\
<li class=\"toclevel-2 tocsection-107\"><a\n\
href=\"#show.2Fconfiguration\"><span class=\"tocnumber\">23.2</span> <span class=\"toctext\">show/configuration</span></a></li>\n\
<li class=\"toclevel-2 tocsection-108\"><a\n\
href=\"#show.2Fconfiguration.2Fnode\"><span class=\"tocnumber\">23.3</span> <span class=\"toctext\">show/configuration/node</span></a></li>\n\
<li class=\"toclevel-2 tocsection-109\"><a\n\
href=\"#show.2Fcontest\"><span class=\"tocnumber\">23.4</span> <span class=\"toctext\">show/contest</span></a></li>\n\
<li class=\"toclevel-2 tocsection-110\"><a\n\
href=\"#show.2Fdate\"><span class=\"tocnumber\">23.5</span> <span class=\"toctext\">show/date</span></a></li>\n\
<li class=\"toclevel-2 tocsection-111\"><a\n\
href=\"#show.2Fdb0sdx\"><span class=\"tocnumber\">23.6</span> <span class=\"toctext\">show/db0sdx</span></a></li>\n\
<li class=\"toclevel-2 tocsection-112\"><a\n\
href=\"#show.2Fdx\"><span class=\"tocnumber\">23.7</span> <span class=\"toctext\">show/dx</span></a></li>\n\
<li class=\"toclevel-2 tocsection-113\"><a\n\
href=\"#show.2Fdxcc\"><span class=\"tocnumber\">23.8</span> <span class=\"toctext\">show/dxcc</span></a></li>\n\
<li class=\"toclevel-2 tocsection-114\"><a\n\
href=\"#show.2Fdxqsl\"><span class=\"tocnumber\">23.9</span> <span class=\"toctext\">show/dxqsl</span></a></li>\n\
<li class=\"toclevel-2 tocsection-115\"><a\n\
href=\"#show.2Fdxstats\"><span class=\"tocnumber\">23.10</span> <span class=\"toctext\">show/dxstats</span></a></li>\n\
<li class=\"toclevel-2 tocsection-116\"><a\n\
href=\"#show.2Ffdx\"><span class=\"tocnumber\">23.11</span> <span class=\"toctext\">show/fdx</span></a></li>\n\
<li class=\"toclevel-2 tocsection-117\"><a\n\
href=\"#show.2Ffiles\"><span class=\"tocnumber\">23.12</span> <span class=\"toctext\">show/files</span></a></li>\n\
<li class=\"toclevel-2 tocsection-118\"><a\n\
href=\"#show.2Ffilter\"><span class=\"tocnumber\">23.13</span> <span class=\"toctext\">show/filter</span></a></li>\n\
<li class=\"toclevel-2 tocsection-119\"><a\n\
href=\"#show.2Fhfstats\"><span class=\"tocnumber\">23.14</span> <span class=\"toctext\">show/hfstats</span></a></li>\n\
<li class=\"toclevel-2 tocsection-120\"><a\n\
href=\"#show.2Fhftable\"><span class=\"tocnumber\">23.15</span> <span class=\"toctext\">show/hftable</span></a></li>\n\
<li class=\"toclevel-2 tocsection-121\"><a\n\
href=\"#show.2Fmoon\"><span class=\"tocnumber\">23.16</span> <span class=\"toctext\">show/moon</span></a></li>\n\
<li class=\"toclevel-2 tocsection-122\"><a\n\
href=\"#show.2Fmuf\"><span class=\"tocnumber\">23.17</span> <span class=\"toctext\">show/muf</span></a></li>\n\
<li class=\"toclevel-2 tocsection-123\"><a\n\
href=\"#show.2Fmydx\"><span class=\"tocnumber\">23.18</span> <span class=\"toctext\">show/mydx</span></a></li>\n\
<li class=\"toclevel-2 tocsection-124\"><a\n\
href=\"#show.2Fnewconfiguration\"><span class=\"tocnumber\">23.19</span> <span class=\"toctext\">show/newconfiguration</span></a></li>\n\
<li class=\"toclevel-2 tocsection-125\"><a\n\
href=\"#show.2Fnewconfiguration.2Fnode\"><span class=\"tocnumber\">23.20</span> <span class=\"toctext\">show/newconfiguration/node</span></a></li>\n\
<li class=\"toclevel-2 tocsection-126\"><a\n\
href=\"#show.2Fprefix\"><span class=\"tocnumber\">23.21</span> <span class=\"toctext\">show/prefix</span></a></li>\n\
<li class=\"toclevel-2 tocsection-127\"><a\n\
href=\"#show.2Fqra\"><span class=\"tocnumber\">23.22</span> <span class=\"toctext\">show/qra</span></a></li>\n\
<li class=\"toclevel-2 tocsection-128\"><a\n\
href=\"#show.2Fqrz\"><span class=\"tocnumber\">23.23</span> <span class=\"toctext\">show/qrz</span></a></li>\n\
<li class=\"toclevel-2 tocsection-129\"><a\n\
href=\"#show.2Froute\"><span class=\"tocnumber\">23.24</span> <span class=\"toctext\">show/route</span></a></li>\n\
<li class=\"toclevel-2 tocsection-130\"><a\n\
href=\"#show.2Fsatellite\"><span class=\"tocnumber\">23.25</span> <span class=\"toctext\">show/satellite</span></a></li>\n\
<li class=\"toclevel-2 tocsection-131\"><a\n\
href=\"#show.2Fstartup\"><span class=\"tocnumber\">23.26</span> <span class=\"toctext\">show/startup</span></a></li>\n\
<li class=\"toclevel-2 tocsection-132\"><a\n\
href=\"#show.2Fstation\"><span class=\"tocnumber\">23.27</span> <span class=\"toctext\">show/station</span></a></li>\n\
<li class=\"toclevel-2 tocsection-133\"><a\n\
href=\"#show.2Fsun\"><span class=\"tocnumber\">23.28</span> <span class=\"toctext\">show/sun</span></a></li>\n\
<li class=\"toclevel-2 tocsection-134\"><a\n\
href=\"#show.2Ftime\"><span class=\"tocnumber\">23.29</span> <span class=\"toctext\">show/time</span></a></li>\n\
<li class=\"toclevel-2 tocsection-135\"><a\n\
href=\"#show.2Fusdb\"><span class=\"tocnumber\">23.30</span> <span class=\"toctext\">show/usdb</span></a></li>\n\
<li class=\"toclevel-2 tocsection-136\"><a\n\
href=\"#show.2Fvhfstats\"><span class=\"tocnumber\">23.31</span> <span class=\"toctext\">show/vhfstats</span></a></li>\n\
<li class=\"toclevel-2 tocsection-137\"><a\n\
href=\"#show.2Fvhftable\"><span class=\"tocnumber\">23.32</span> <span class=\"toctext\">show/vhftable</span></a></li>\n\
<li class=\"toclevel-2 tocsection-138\"><a\n\
href=\"#show.2Fwcy\"><span class=\"tocnumber\">23.33</span> <span class=\"toctext\">show/wcy</span></a></li>\n\
<li class=\"toclevel-2 tocsection-139\"><a\n\
href=\"#show.2Fwm7d\"><span class=\"tocnumber\">23.34</span> <span class=\"toctext\">show/wm7d</span></a></li>\n\
<li class=\"toclevel-2 tocsection-140\"><a\n\
href=\"#show.2Fwwv\"><span class=\"tocnumber\">23.35</span> <span class=\"toctext\">show/wwv</span></a></li>\n\
<li class=\"toclevel-2 tocsection-141\"><a\n\
href=\"#sysop\"><span class=\"tocnumber\">23.36</span> <span class=\"toctext\">sysop</span></a></li>\n\
<li class=\"toclevel-2 tocsection-142\"><a\n\
href=\"#talk\"><span class=\"tocnumber\">23.37</span> <span class=\"toctext\">talk</span></a></li>\n\
<li class=\"toclevel-2 tocsection-143\"><a\n\
href=\"#type\"><span class=\"tocnumber\">23.38</span> <span class=\"toctext\">type</span></a></li>\n\
<li class=\"toclevel-2 tocsection-144\"><a\n\
href=\"#unset.2Fannounce\"><span class=\"tocnumber\">23.39</span> <span class=\"toctext\">unset/announce</span></a></li>\n\
<li class=\"toclevel-2 tocsection-145\"><a\n\
href=\"#unset.2Fanntalk\"><span class=\"tocnumber\">23.40</span> <span class=\"toctext\">unset/anntalk</span></a></li>\n\
<li class=\"toclevel-2 tocsection-146\"><a\n\
href=\"#unset.2Fbeep\"><span class=\"tocnumber\">23.41</span> <span class=\"toctext\">unset/beep</span></a></li>\n\
<li class=\"toclevel-2 tocsection-147\"><a\n\
href=\"#unset.2Fdx\"><span class=\"tocnumber\">23.42</span> <span class=\"toctext\">unset/dx</span></a></li>\n\
<li class=\"toclevel-2 tocsection-148\"><a\n\
href=\"#unset.2Fdxcq\"><span class=\"tocnumber\">23.43</span> <span class=\"toctext\">unset/dxcq</span></a></li>\n\
<li class=\"toclevel-2 tocsection-149\"><a\n\
href=\"#unset.2Fdxgrid\"><span class=\"tocnumber\">23.44</span> <span class=\"toctext\">unset/dxgrid</span></a></li>\n\
<li class=\"toclevel-2 tocsection-150\"><a\n\
href=\"#unset.2Fdxitu\"><span class=\"tocnumber\">23.45</span> <span class=\"toctext\">unset/dxitu</span></a></li>\n\
<li class=\"toclevel-2 tocsection-151\"><a\n\
href=\"#unset.2Fecho\"><span class=\"tocnumber\">23.46</span> <span class=\"toctext\">unset/echo</span></a></li>\n\
<li class=\"toclevel-2 tocsection-152\"><a\n\
href=\"#unset.2Femail\"><span class=\"tocnumber\">23.47</span> <span class=\"toctext\">unset/email</span></a></li>\n\
<li class=\"toclevel-2 tocsection-153\"><a\n\
href=\"#unset.2Fhere\"><span class=\"tocnumber\">23.48</span> <span class=\"toctext\">unset/here</span></a></li>\n\
<li class=\"toclevel-2 tocsection-154\"><a\n\
href=\"#unset.2Flogininfo\"><span class=\"tocnumber\">23.49</span> <span class=\"toctext\">unset/logininfo</span></a></li>\n\
<li class=\"toclevel-2 tocsection-155\"><a\n\
href=\"#unset.2Fprivilege\"><span class=\"tocnumber\">23.50</span> <span class=\"toctext\">unset/privilege</span></a></li>\n\
<li class=\"toclevel-2 tocsection-156\"><a\n\
href=\"#unset.2Fprompt\"><span class=\"tocnumber\">23.51</span> <span class=\"toctext\">unset/prompt</span></a></li>\n\
<li class=\"toclevel-2 tocsection-157\"><a\n\
href=\"#unset.2Fstartup\"><span class=\"tocnumber\">23.52</span> <span class=\"toctext\">unset/startup</span></a></li>\n\
<li class=\"toclevel-2 tocsection-158\"><a\n\
href=\"#unset.2Ftalk\"><span class=\"tocnumber\">23.53</span> <span class=\"toctext\">unset/talk</span></a></li>\n\
<li class=\"toclevel-2 tocsection-159\"><a\n\
href=\"#unset.2Fusstate\"><span class=\"tocnumber\">23.54</span> <span class=\"toctext\">unset/usstate</span></a></li>\n\
<li class=\"toclevel-2 tocsection-160\"><a\n\
href=\"#unset.2Fwcy\"><span class=\"tocnumber\">23.55</span> <span class=\"toctext\">unset/wcy</span></a></li>\n\
<li class=\"toclevel-2 tocsection-161\"><a\n\
href=\"#unset.2Fwwv\"><span class=\"tocnumber\">23.56</span> <span class=\"toctext\">unset/wwv</span></a></li>\n\
<li class=\"toclevel-2 tocsection-162\"><a\n\
href=\"#unset.2Fwx\"><span class=\"tocnumber\">23.57</span> <span class=\"toctext\">unset/wx</span></a></li>\n\
<li class=\"toclevel-2 tocsection-163\"><a\n\
href=\"#who\"><span class=\"tocnumber\">23.58</span> <span class=\"toctext\">who</span></a></li>\n\
<li class=\"toclevel-2 tocsection-164\"><a\n\
href=\"#wx\"><span class=\"tocnumber\">23.59</span> <span class=\"toctext\">wx</span></a></li>\n\
</ul>\n\
</li>\n\
</ul>\n\
</div>\n\
<h2><span class=\"mw-headline\" id=\"ACCEPT\">ACCEPT</span></h2>\n\
<ul>\n\
<li>accept - Set a filter to accept something\n\
</li>\n\
</ul>\n\
<p>There are 2 types of filter, accept and reject. See HELP\n\
FILTERING for more info.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"accept.2Fannounce\">accept/announce</span></h3>\n\
<ul>\n\
<li>accept/announce [0-9] <pattern> Set an 'accept' filter\n\
line for announce\n\
</li>\n\
</ul>\n\
<p>Create an 'accept this announce' line for a filter.\n\
</p>\n\
<p>An accept filter line means that if the announce matches this\n\
filter it is passed onto the user. See HELP FILTERING for more\n\
info. Please read this to understand how filters work - it will\n\
save a lot of grief later on.\n\
You can use any of the following things in this line:-\n\
</p>\n\
<pre>info <string> eg: iota or qsl\n\
by <prefixes> eg: G,M,2\n\
origin <prefixes>\n\
origin_dxcc <prefixes or numbers> eg: 61,62 (from eg: sh/pre G)\n\
origin_itu <prefixes or numbers> or: G,GM,GW\n\
origin_zone <prefixes or numbers>\n\
origin_state <states> eg: VA,NH,RI,NH\n\
by_dxcc <prefixes or numbers>\n\
by_itu <prefixes or numbers>\n\
by_zone <prefixes or numbers>\n\
by_state <states>\n\
channel <prefixes>\n\
wx 1 filter WX announces\n\
dest <prefixes> eg: 6MUK,WDX (distros)\n\
</pre>\n\
<p>some examples:-\n\
</p>\n\
<pre>acc/ann dest 6MUK\n\
acc/ann 2 by_zone 14,15,16\n\
(this could be all on one line: acc/ann dest 6MUK or by_zone 14,15,16)\n\
</pre>\n\
<p>or\n\
</p>\n\
<pre>acc/ann by G,M,2\n\
</pre>\n\
<p>for american states\n\
</p>\n\
<pre>acc/ann by_state va,nh,ri,nh\n\
</pre>\n\
<p>You can use the tag 'all' to accept everything eg:\n\
</p>\n\
<pre>acc/ann all\n\
</pre>\n\
<p>but this probably for advanced users...\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"accept.2Fspots\">accept/spots</span></h3>\n\
<ul>\n\
<li>accept/spots [0-9] <pattern> Set an 'accept' filter line\n\
for spots\n\
</li>\n\
</ul>\n\
<p>Create an 'accept this spot' line for a filter.\n\
</p>\n\
<p>An accept filter line means that if the spot matches this filter\n\
it is passed onto the user. See HELP FILTERING for more info.\n\
Please read this to understand how filters work - it will save a\n\
lot of grief later on.\n\
</p>\n\
<p>You can use any of the following things in this line:-\n\
</p>\n\
<pre>freq <range> eg: 0/30000 or hf or hf/cw or 6m,4m,2m\n\
on <range> same as 'freq'\n\
call <prefixes> eg: G,PA,HB9\n\
info <string> eg: iota or qsl\n\
by <prefixes>\n\
call_dxcc <prefixes or numbers> eg: 61,62 (from eg: sh/pre G)\n\
call_itu <prefixes or numbers> or: G,GM,GW\n\
call_zone <prefixes or numbers>\n\
call_state <states> eg: VA,NH,RI,ME\n\
by_dxcc <prefixes or numbers>\n\
by_itu <prefixes or numbers>\n\
by_zone <prefixes or numbers>\n\
by_state <states> eg: VA,NH,RI,ME\n\
origin <prefixes>\n\
channel <prefixes>\n\
</pre>\n\
<p>For frequencies, you can use any of the band names defined in\n\
SHOW/BANDS and you can use a subband name like: cw, rtty, data,\n\
ssb - thus: hf/ssb. You can also just have a simple range like:\n\
0/30000 - this is more efficient than saying simply: freq HF (but\n\
don't get too hung up about that)\n\
</p>\n\
<p>some examples:-\n\
</p>\n\
<pre>acc/spot 1 on hf/cw\n\
acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)\n\
</pre>\n\
<p>You can use the tag 'all' to accept everything, eg:\n\
</p>\n\
<pre>acc/spot 3 all\n\
</pre>\n\
<p>for US states\n\
</p>\n\
<pre>acc/spots by_state VA,NH,RI,MA,ME\n\
</pre>\n\
<p>but this probably for advanced users...\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"accept.2Fwcy\">accept/wcy</span></h3>\n\
<ul>\n\
<li>accept/wcy [0-9] <pattern> set an 'accept' WCY filter\n\
</li>\n\
</ul>\n\
<p>It is unlikely that you will want to do this, but if you do then\n\
you can filter on the following fields:-\n\
</p>\n\
<pre>by <prefixes> eg: G,M,2\n\
origin <prefixes>\n\
origin_dxcc <prefixes or numbers> eg: 61,62 (from eg: sh/pre G)\n\
origin_itu <prefixes or numbers> or: G,GM,GW\n\
origin_zone <prefixes or numbers>\n\
by_dxcc <prefixes or numbers>\n\
by_itu <prefixes or numbers>\n\
by_zone <prefixes or numbers>\n\
channel <prefixes>\n\
</pre>\n\
<p>There are no examples because WCY Broadcasts only come from one\n\
place and you either want them or not (see UNSET/WCY if you don't\n\
want them).\n\
</p>\n\
<p>This command is really provided for future use.\n\
</p>\n\
<p>See HELP FILTER for information.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"accept.2Fwwv\">accept/wwv</span></h3>\n\
<ul>\n\
<li>accept/wwv [0-9] <pattern> set an 'accept' WWV filter\n\
</li>\n\
</ul>\n\
<p>It is unlikely that you will want to do this, but if you do then\n\
you can filter on the following fields:-\n\
</p>\n\
<pre>by <prefixes> eg: G,M,2\n\
origin <prefixes>\n\
origin_dxcc <prefixes or numbers> eg: 61,62 (from eg: sh/pre G)\n\
origin_itu <prefixes or numbers> or: G,GM,GW\n\
origin_zone <prefixes or numbers>\n\
by_dxcc <prefixes or numbers>\n\
by_itu <prefixes or numbers>\n\
by_zone <prefixes or numbers>\n\
channel <prefixes>\n\
</pre>\n\
<p>for example\n\
</p>\n\
<pre>accept/wwv by_zone 4\n\
</pre>\n\
<p>is probably the only useful thing to do (which will only show WWV\n\
broadcasts by stations in the US).\n\
</p>\n\
<p>See HELP FILTER for information.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"ANNOUNCE\">ANNOUNCE</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"announce_2\">announce</span></h3>\n\
<ul>\n\
<li>announce <text> Send an announcement to LOCAL users only\n\
</li>\n\
</ul>\n\
<p><text> is the text of the announcement you wish to\n\
broadcast\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"announce_full\">announce full</span></h3>\n\
<ul>\n\
<li>announce full <text> Send an announcement cluster wide\n\
</li>\n\
</ul>\n\
<p>This will send your announcement cluster wide\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"APROPOS\">APROPOS</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"apropos_2\">apropos</span></h3>\n\
<ul>\n\
<li>apropos <string> Search help database for <string>\n\
</li>\n\
</ul>\n\
<p>Search the help database for <string> (it isn't case\n\
sensitive), and print the names of all the commands that may be\n\
relevant.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"BLANK\">BLANK</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"blank_2\">blank</span></h3>\n\
<ul>\n\
<li>blank [<string>] [<nn>] Print nn (default 1) blank\n\
lines (or strings)\n\
</li>\n\
</ul>\n\
<p>In its basic form this command prints one or more blank lines.\n\
However if you pass it a string it will replicate the string for\n\
the width of the screen (default 80) and then print that one or\n\
more times, so:\n\
</p>\n\
<pre>blank 2\n\
</pre>\n\
<p>prints two blank lines\n\
</p>\n\
<pre>blank -\n\
</pre>\n\
<p>prints a row of - characters once.\n\
</p>\n\
<pre>blank abc\n\
</pre>\n\
<p>prints 'abcabcabcabcabcabc....'\n\
</p>\n\
<p>This is really only of any use in a script file and you can print\n\
a maximum of 9 lines.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"BYE\">BYE</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"bye_2\">bye</span></h3>\n\
<ul>\n\
<li>bye Exit from the cluster\n\
</li>\n\
</ul>\n\
<p>This will disconnect you from the cluster\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"CHAT\">CHAT</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"chat_2\">chat</span></h3>\n\
<ul>\n\
<li>chat <group> <text> Chat or Conference to a group\n\
</li>\n\
</ul>\n\
<p>It is now possible to JOIN a group and have network wide\n\
conferencing to that group. DXSpider does not (and probably will\n\
not) implement the AK1A conference mode as this seems very\n\
limiting, is hardly used and doesn't seem to work too well anyway.\n\
</p>\n\
<p>This system uses the existing ANN system and is compatible with\n\
both other DXSpider nodes and AK1A clusters (they use\n\
ANN/<group>).\n\
</p>\n\
<p>You can be a member of as many \"groups\" as you want. To join a\n\
group type:-\n\
</p>\n\
<pre>JOIN FOC (where FOC is the group name)\n\
</pre>\n\
<p>To leave a group type:-\n\
</p>\n\
<pre>LEAVE FOC\n\
</pre>\n\
<p>You can see which groups you are in by typing:-\n\
</p>\n\
<pre>STAT/USER\n\
</pre>\n\
<p>and you can see whether your mate is in the group, if he connects\n\
to the same node as you, by typing:-\n\
</p>\n\
<pre>STAT/USER g1tlh\n\
</pre>\n\
<p>To send a message to a group type:-\n\
</p>\n\
<pre>CHAT FOC hello everyone\n\
</pre>\n\
<p>or\n\
</p>\n\
<pre>CH #9000 hello I am back\n\
</pre>\n\
<p>See also JOIN, LEAVE, SHOW/CHAT\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"CLEAR\">CLEAR</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"clear.2Fannounce\">clear/announce</span></h3>\n\
<ul>\n\
<li>clear/announce [1|all] Clear a announce filter line\n\
</li>\n\
</ul>\n\
<p>This command allows you to clear (remove) a line in a annouce\n\
filter or to remove the whole filter. See CLEAR/SPOTS for a more\n\
detailed explanation.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"clear.2Froute\">clear/route</span></h3>\n\
<ul>\n\
<li>clear/route [1|all] Clear a route filter line\n\
</li>\n\
</ul>\n\
<p>This command allows you to clear (remove) a line in a route\n\
filter or to remove the whole filter. See CLEAR/SPOTS for a more\n\
detailed explanation.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"clear.2Fspots_.5B0-9.7Call.5D\">clear/spots\n\
[0-9|all]</span></h3>\n\
<ul>\n\
<li>clear/spots [0-9|all] Clear a spot filter line\n\
</li>\n\
</ul>\n\
<p>This command allows you to clear (remove) a line in a spot filter\n\
or to remove the whole filter.\n\
</p>\n\
<p>If you have a filter:-\n\
</p>\n\
<pre>acc/spot 1 on hf/cw\n\
acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)\n\
</pre>\n\
<p>and you say:-\n\
</p>\n\
<pre>clear/spot 1\n\
</pre>\n\
<p>you will be left with:-\n\
</p>\n\
<pre>acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)\n\
</pre>\n\
<p>If you do:\n\
</p>\n\
<pre>clear/spot all\n\
</pre>\n\
<p>the filter will be completely removed.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"clear.2Fwcy\">clear/wcy</span></h3>\n\
<ul>\n\
<li>clear/wcy [1|all] Clear a WCY filter line\n\
</li>\n\
</ul>\n\
<p>This command allows you to clear (remove) a line in a WCY filter\n\
or to remove the whole filter. See CLEAR/SPOTS for a more detailed\n\
explanation.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"clear.2Fwwv\">clear/wwv</span></h3>\n\
<ul>\n\
<li>clear/wwv [1|all] Clear a WWV filter line\n\
</li>\n\
</ul>\n\
<p>This command allows you to clear (remove) a line in a WWV filter\n\
or to remove the whole filter. See CLEAR/SPOTS for a more detailed\n\
explanation.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"DATABASES\">DATABASES</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"dbavail\">dbavail</span></h3>\n\
<ul>\n\
<li>dbavail - Show a list of all the Databases in the system\n\
</li>\n\
</ul>\n\
<p>The name says it all really, this command lists all the databases\n\
defined in the system. It is also aliased to SHOW/COMMAND.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"dbshow\">dbshow</span></h3>\n\
<ul>\n\
<li>dbshow <dbname> <key> - Display an entry, if it\n\
exists, in a database\n\
</li>\n\
</ul>\n\
<p>This is the generic user interface to the database to the\n\
database system. It is expected that the sysop will add an entry\n\
to the local Aliases file so that users can use the more familiar\n\
AK1A style of enquiry such as:\n\
</p>\n\
<pre>SH/BUCK G1TLH\n\
</pre>\n\
<p>but if he hasn't and the database really does exist (use DBAVAIL\n\
or SHOW/COMMAND to find out) you can do the same thing with:\n\
</p>\n\
<pre>DBSHOW buck G1TLH\n\
</pre>\n\
<h2><span class=\"mw-headline\" id=\"MAIL\">MAIL</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"directory\">directory</span></h3>\n\
<ul>\n\
<li>directory - List messages\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"directory_.3Cfrom.3E-.3Cto.3E\">directory\n\
<from>-<to></span></h3>\n\
<ul>\n\
<li>directory <from>-<to> - List messages <from>\n\
message <to> message\n\
</li>\n\
</ul>\n\
<p>List the messages in the messages directory.\n\
</p>\n\
<p>If there is a 'p' one space after the message number then it is a\n\
personal message. If there is a '-' between the message number and\n\
the 'p' then this indicates the message has been read.\n\
</p>\n\
<p>You can use shell escape characters such as '*' and '?' in the\n\
<call> fields.\n\
</p>\n\
<p>You can also combine some of the various directory commands\n\
together eg:-\n\
</p>\n\
<pre>DIR TO G1TLH 5\n\
</pre>\n\
<p>or\n\
</p>\n\
<pre>DIR SUBJECT IOTA 200-250\n\
</pre>\n\
<p>You can abbreviate all the commands to one letter and use ak1a\n\
syntax:-\n\
</p>\n\
<pre>DIR/T G1* 10\n\
DIR/S QSL 10-100 5\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"directory_.3Cnn.3E\">directory\n\
<nn></span></h3>\n\
<ul>\n\
<li>directory <nn> - List last <nn> messages\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"directory_all\">directory all</span></h3>\n\
<ul>\n\
<li>directory all - List all messages\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"directory_from_.3Ccall.3E\">directory\n\
from <call></span></h3>\n\
<ul>\n\
<li>directory from <call> - List all messages from\n\
<call>\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"directory_new\">directory new</span></h3>\n\
<ul>\n\
<li>directory new - List all new messages\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"directory_own\">directory own</span></h3>\n\
<ul>\n\
<li>directory own - List your own messages\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"directory_subject_.3Cstring.3E\">directory\n\
subject <string></span></h3>\n\
<ul>\n\
<li>directory subject <string> - List all messages with\n\
<string> in subject\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"directory_to_.3Ccall.3E\">directory\n\
to <call></span></h3>\n\
<ul>\n\
<li>directory to <call> - List all messages to <call>\n\
</li>\n\
</ul>\n\
<h2><span class=\"mw-headline\" id=\"DX\">DX</span></h2>\n\
<h3><span class=\"mw-headline\"\n\
id=\"dx_.5Bby_.3Ccall.3E.5D_.3Cfreq.3E_.3Ccall.3E_.3Cremarks.3E\">dx\n\
[by <call>] <freq> <call> <remarks></span></h3>\n\
<ul>\n\
<li>dx [by <call>] <freq> <call> <remarks>\n\
- Send a DX spot\n\
</li>\n\
</ul>\n\
<p>This is how you send a DX Spot to other users. You can, in fact,\n\
now enter the <freq> and the <call> either way round.\n\
</p>\n\
<pre>DX FR0G 144.600\n\
DX 144.600 FR0G\n\
DX 144600 FR0G\n\
</pre>\n\
<p>will all give the same result. You can add some remarks to the\n\
end of the command and they will be added to the spot.\n\
</p>\n\
<pre>DX FR0G 144600 this is a test\n\
</pre>\n\
<p>You can credit someone else by saying:-\n\
</p>\n\
<pre>DX by G1TLH FR0G 144.600 he isn't on the cluster\n\
</pre>\n\
<p>The <freq> is compared against the available bands set up\n\
in the cluster. See SHOW/BANDS for more information.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"ECHO\">ECHO</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"echo_.3Cline.3E\">echo <line></span></h3>\n\
<ul>\n\
<li>echo <line> - Echo the line to the output\n\
</li>\n\
</ul>\n\
<p>This command is useful in scripts and so forth for printing the\n\
line that you give to the command to the output. You can use this\n\
in user_default scripts and the SAVE command for titling and so\n\
forth.\n\
</p>\n\
<p>The script will interpret certain standard \"escape\" sequences as\n\
follows:-\n\
</p>\n\
<pre>\\t - becomes a TAB character (0x09 in ascii)\n\
\\a - becomes a BEEP character (0x07 in ascii)\n\
\\n - prints a new line\n\
</pre>\n\
<p>So the following example:-\n\
</p>\n\
<pre>echo GB7DJK is a dxcluster\n\
</pre>\n\
<p>produces:-\n\
</p>\n\
<pre>GB7DJK is a dxcluster\n\
</pre>\n\
<p>on the output. You don't need a \\n on the end of the line you\n\
want to send.\n\
</p>\n\
<p>A more complex example:-\n\
</p>\n\
<pre>echo GB7DJK\\n\\tg1tlh\\tDirk\\n\\tg3xvf\\tRichard\n\
</pre>\n\
<p>produces:-\n\
</p>\n\
<pre>GB7DJK\n\
g1tlh Dirk\n\
g3xvf Richard\n\
</pre>\n\
<p>on the output.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"FILTERING\">FILTERING</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"filtering...\">filtering...</span></h3>\n\
<ul>\n\
<li>filtering... - Filtering things in DXSpider\n\
</li>\n\
</ul>\n\
<p>There are a number of things you can filter in the DXSpider\n\
system. They all use the same general mechanism.\n\
</p>\n\
<p>In general terms you can create a 'reject' or an 'accept' filter\n\
which can have up to 10 lines in it. You do this using, for\n\
example:-\n\
</p>\n\
<pre>accept/spots .....\n\
reject/spots .....\n\
</pre>\n\
<p>where ..... are the specific commands for that type of filter.\n\
There are filters for spots, wwv, announce, wcy and (for sysops)\n\
connects. See each different accept or reject command reference\n\
for more details.\n\
</p>\n\
<p>There is also a command to clear out one or more lines in a\n\
filter and one to show you what you have set. They are:-\n\
</p>\n\
<pre>clear/spots 1\n\
clear/spots all\n\
</pre>\n\
<p>and\n\
</p>\n\
<pre>show/filter\n\
</pre>\n\
<p>There is clear/xxxx command for each type of filter.\n\
</p>\n\
<p>For now we are going to use spots for the examples, but you can\n\
apply the principles to all types of filter.\n\
</p>\n\
<p>There are two main types of filter 'accept' or 'reject'; which\n\
you use depends entirely on how you look at the world and what is\n\
least writing to achieve what you want. Each filter has 10 lines\n\
(of any length) which are tried in order. If a line matches then\n\
the action you have specified is taken (ie reject means ignore it\n\
and accept means gimme it).\n\
</p>\n\
<p>The important thing to remember is that if you specify a 'reject'\n\
filter (all the lines in it say 'reject/spots' (for instance))\n\
then if a spot comes in that doesn't match any of the lines then\n\
you will get it BUT if you specify an 'accept' filter then any\n\
spots that don't match are dumped. For example if I have a one\n\
line accept filter:-\n\
</p>\n\
<pre>accept/spots on vhf and (by_zone 14,15,16 or call_zone 14,15,16)\n\
</pre>\n\
<p>then automatically you will ONLY get VHF spots from or to CQ\n\
zones 14 15 and 16. If you set a reject filter like:\n\
</p>\n\
<pre>reject/spots on hf/cw\n\
</pre>\n\
<p>Then you will get everything EXCEPT HF CW spots, If you am\n\
interested in IOTA and will work it even on CW then you could\n\
say:-\n\
</p>\n\
<pre>reject/spots on hf/cw and not info iota\n\
</pre>\n\
<p>But in that case you might only be interested in iota and say:-\n\
</p>\n\
<pre>accept/spots not on hf/cw or info iota\n\
</pre>\n\
<p>which is exactly the same. You should choose one or the other\n\
until you are confortable with the way it works. Yes, you can mix\n\
them (actually you can have an accept AND a reject on the same\n\
line) but don't try this at home until you can analyse the results\n\
that you get without ringing up the sysop for help.\n\
</p>\n\
<p>Another useful addition now is filtering by US state\n\
</p>\n\
<pre>accept/spots by_state VA,NH,RI,ME\n\
</pre>\n\
<p>You can arrange your filter lines into logical units, either for\n\
your own understanding or simply convenience. I have one set\n\
frequently:-\n\
</p>\n\
<pre>reject/spots 1 on hf/cw\n\
reject/spots 2 on 50000/1400000 not (by_zone 14,15,16 or call_zone 14,15,16)\n\
</pre>\n\
<p>What this does is to ignore all HF CW spots (being a class B I\n\
can't read any CW and couldn't possibly be interested in\n\
HF :-) and also rejects any spots on VHF which don't either\n\
originate or spot someone in Europe.\n\
</p>\n\
<p>This is an exmaple where you would use the line number (1 and 2\n\
in this case), if you leave the digit out, the system assumes '1'.\n\
Digits '0'-'9' are available.\n\
</p>\n\
<p>You can leave the word 'and' out if you want, it is implied. You\n\
can use any number of brackets to make the 'expression' as you\n\
want it. There are things called precedence rules working here\n\
which mean that you will NEED brackets in a situation like line 2\n\
because, without it, will assume:-\n\
</p>\n\
<pre>(on 50000/1400000 and by_zone 14,15,16) or call_zone 14,15,16\n\
</pre>\n\
<p>annoying, but that is the way it is. If you use OR - use\n\
brackets. Whilst we are here CASE is not important. 'And BY_Zone'\n\
is just 'and by_zone'.\n\
</p>\n\
<p>If you want to alter your filter you can just redefine one or\n\
more lines of it or clear out one line. For example:-\n\
</p>\n\
<pre>reject/spots 1 on hf/ssb\n\
</pre>\n\
<p>or\n\
</p>\n\
<pre>clear/spots 1\n\
</pre>\n\
<p>To remove the filter in its entirety:-\n\
</p>\n\
<pre>clear/spots all\n\
</pre>\n\
<p>There are similar CLEAR commands for the other filters:-\n\
</p>\n\
<pre>clear/announce\n\
clear/wcy\n\
clear/wwv\n\
</pre>\n\
<p>ADVANCED USERS:-\n\
</p>\n\
<p>Once you are happy with the results you get, you may like to\n\
experiment.\n\
</p>\n\
<p>My example that filters hf/cw spots and accepts vhf/uhf spots\n\
from EU can be written with a mixed filter, eg:\n\
</p>\n\
<pre>rej/spot on hf/cw\n\
acc/spot on 0/30000\n\
acc/spot 2 on 50000/1400000 and (by_zone 14,15,16 or call_zone 14,15,16)\n\
</pre>\n\
<p>Each filter slot actually has a 'reject' slot and an 'accept'\n\
slot. The reject slot is executed BEFORE the accept slot.\n\
</p>\n\
<p>It was mentioned earlier that after a reject test that doesn't\n\
match, the default for following tests is 'accept', the reverse is\n\
true for first, any non hf/cw spot is passed to the accept line,\n\
which lets through everything else on HF.\n\
</p>\n\
<p>The last filter line in the example above lets through just\n\
VHF/UHF spots from EU.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"HELP\">HELP</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"help_2\">help</span></h3>\n\
<ul>\n\
<li>help - The HELP Command\n\
</li>\n\
</ul>\n\
<p>HELP is available for a number of commands. The syntax is:-\n\
</p>\n\
<pre>HELP <cmd>\n\
</pre>\n\
<p>Where <cmd> is the name of the command you want help on.\n\
All commands can be abbreviated, so SHOW/DX can be abbreviated to\n\
SH/DX, ANNOUNCE can be shortened to AN and so on.\n\
</p>\n\
<p>Look at the APROPOS <string> command which will search the\n\
help database for the <string> you specify and give you a\n\
list of likely commands to look at with HELP.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"JOIN\">JOIN</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"join_.3Cgroup.3E\">join\n\
<group></span></h3>\n\
<ul>\n\
<li>join <group> - Join a chat or conference group\n\
</li>\n\
</ul>\n\
<p>JOIN allows you to join a network wide conference group. To join\n\
a group (called FOC in this case) type:-\n\
</p>\n\
<pre>JOIN FOC\n\
</pre>\n\
<p>See also CHAT, LEAVE, SHOW/CHAT\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"KILL\">KILL</span></h2>\n\
<h3><span class=\"mw-headline\"\n\
id=\"kill_.3Cfrom_msgno.3E-.3Cto_msgno.3E\">kill <from\n\
msgno>-<to msgno></span></h3>\n\
<ul>\n\
<li>kill <from msgno>-<to msgno> - Delete a range of\n\
messages\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"kill_.3Cmsgno.3E_.5B.3Cmsgno...5D\">kill\n\
<msgno> [<msgno..]</span></h3>\n\
<ul>\n\
<li>kill <msgno> [<msgno..] - Delete a message from the\n\
local system\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\"\n\
id=\"kill_.3Cmsgno.3E_.5B.3Cmsgno.3E_....5D\">kill <msgno>\n\
[<msgno> ...]</span></h3>\n\
<ul>\n\
<li>kill <msgno> [<msgno> ...] - Remove or erase a\n\
message from the system\n\
</li>\n\
</ul>\n\
<p>You can get rid of any message to or originating from your\n\
callsign using this command. You can remove more than one message\n\
at a time.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"kill_from_.3Cregex.3E\">kill from\n\
<regex></span></h3>\n\
<ul>\n\
<li>kill from <regex> - Delete messages FROM a callsign or\n\
pattern\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"kill_to_.3Cregex.3E\">kill to\n\
<regex></span></h3>\n\
<ul>\n\
<li>kill to <regex> - Delete messages TO a callsign or\n\
pattern\n\
</li>\n\
</ul>\n\
<h2><span class=\"mw-headline\" id=\"LEAVE\">LEAVE</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"leave_.3Cgroup.3E\">leave\n\
<group></span></h3>\n\
<ul>\n\
<li>leave <group> - Leave a chat or conference group\n\
</li>\n\
</ul>\n\
<p>LEAVE allows you to leave a network wide conference group. To\n\
leave a group (called FOC in this case) type:-\n\
</p>\n\
<pre>LEAVE FOC\n\
</pre>\n\
<p>See also CHAT, JOIN, SHOW/CHAT\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"LINKS\">LINKS</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"links_2\">links</span></h3>\n\
<ul>\n\
<li>links - Show which nodes is physically connected\n\
</li>\n\
</ul>\n\
<p>This is a quick listing that shows which links are connected and\n\
some information about them. See WHO for a list of all\n\
connections.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"READ\">READ</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"read_2\">read</span></h3>\n\
<ul>\n\
<li>read - Read the next unread personal message addressed to you\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"read_.3Cmsgno.3E\">read\n\
<msgno></span></h3>\n\
<ul>\n\
<li>read <msgno> - Read the specified message\n\
</li>\n\
</ul>\n\
<p>You can read any messages that are sent as 'non-personal' and\n\
also any message either sent by or sent to your callsign.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"REJECT\">REJECT</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"reject_2\">reject</span></h3>\n\
<ul>\n\
<li>reject - Set a filter to reject something\n\
</li>\n\
</ul>\n\
<p>There are 2 types of filter, accept and reject. See HELP\n\
FILTERING for more info.\n\
</p>\n\
<h3><span class=\"mw-headline\"\n\
id=\"reject.2Fannounce_.5B0-9.5D_.3Cpattern.3E\">reject/announce\n\
[0-9] <pattern></span></h3>\n\
<ul>\n\
<li>reject/announce [0-9] <pattern> - Set a 'reject' filter\n\
line for announce\n\
</li>\n\
</ul>\n\
<p>A reject filter line means that if the announce matches this\n\
filter it is passed onto the user. See HELP FILTERING for more\n\
info. Please read this to understand how filters work - it will\n\
save a lot of grief later on.\n\
</p>\n\
<p>You can use any of the following things in this line:-\n\
</p>\n\
<pre>info <string> eg: iota or qsl\n\
by <prefixes> eg: G,M,2\n\
origin <prefixes>\n\
origin_dxcc <prefixes or numbers> eg: 61,62 (from eg: sh/pre G)\n\
origin_itu <prefixes or numbers> or: G,GM,GW\n\
origin_zone <prefixes or numbers>\n\
origin_state <states> eg: VA,NH,RI,ME\n\
by_dxcc <prefixes or numbers>\n\
by_itu <prefixes or numbers>\n\
by_zone <prefixes or numbers>\n\
by_state <states> eg: VA,NH,RI,ME\n\
channel <prefixes>\n\
wx 1 filter WX announces\n\
dest <prefixes> eg: 6MUK,WDX (distros)\n\
</pre>\n\
<p>some examples:-\n\
</p>\n\
<pre>rej/ann by_zone 14,15,16 and not by G,M,2\n\
</pre>\n\
<p>You can use the tag 'all' to reject everything eg:\n\
</p>\n\
<pre>rej/ann all\n\
</pre>\n\
<p>but this probably for advanced users...\n\
</p>\n\
<h3><span class=\"mw-headline\"\n\
id=\"reject.2Fspots_.5B0-9.5D_.3Cpattern.3E\">reject/spots [0-9]\n\
<pattern></span></h3>\n\
<ul>\n\
<li>reject/spots [0-9] <pattern> - Set a 'reject' filter\n\
line for spots\n\
</li>\n\
</ul>\n\
<p>A reject filter line means that if the spot matches this filter\n\
it is dumped (not passed on). See HELP FILTERING for more info.\n\
Please read this to understand how filters work - it will save a\n\
lot of grief later on.\n\
</p>\n\
<p>You can use any of the following things in this line:-\n\
</p>\n\
<pre>freq <range> eg: 0/30000 or hf or hf/cw or 6m,4m,2m\n\
on <range> same as 'freq'\n\
call <prefixes> eg: G,PA,HB9\n\
info <string> eg: iota or qsl\n\
by <prefixes>\n\
call_dxcc <prefixes or numbers> eg: 61,62 (from eg: sh/pre G)\n\
call_itu <prefixes or numbers> or: G,GM,GW\n\
call_zone <prefixes or numbers>\n\
call_state <states> eg: VA,NH,RI,ME\n\
by_dxcc <prefixes or numbers>\n\
by_itu <prefixes or numbers>\n\
by_zone <prefixes or numbers>\n\
by_state <states> eg: VA,NH,RI,ME\n\
origin <prefixes>\n\
channel <prefixes>\n\
</pre>\n\
<p>For frequencies, you can use any of the band names defined in\n\
SHOW/BANDS and you can use a subband name like: cw, rtty, data,\n\
ssb - thus: hf/ssb. You can also just have a simple range like:\n\
0/30000 - this is more efficient than saying simply: on HF (but\n\
don't get too hung up about that)\n\
</p>\n\
<p>some examples:-\n\
</p>\n\
<pre>rej/spot 1 on hf\n\
rej/spot 2 on vhf and not (by_zone 14,15,16 or call_zone 14,15,16)\n\
</pre>\n\
<p>You can use the tag 'all' to reject everything eg:\n\
</p>\n\
<pre>rej/spot 3 all\n\
</pre>\n\
<p>but this probably for advanced users...\n\
</p>\n\
<h3><span class=\"mw-headline\"\n\
id=\"reject.2Fwcy_.5B0-9.5D_.3Cpattern.3E\">reject/wcy [0-9]\n\
<pattern></span></h3>\n\
<ul>\n\
<li>reject/wcy [0-9] <pattern> - set a 'reject' WCY filter\n\
</li>\n\
</ul>\n\
<p>It is unlikely that you will want to do this, but if you do then\n\
you can filter on the following fields:-\n\
</p>\n\
<pre>by <prefixes> eg: G,M,2\n\
origin <prefixes>\n\
origin_dxcc <prefixes or numbers> eg: 61,62 (from eg: sh/pre G)\n\
origin_itu <prefixes or numbers> or: G,GM,GW\n\
origin_zone <prefixes or numbers>\n\
by_dxcc <prefixes or numbers>\n\
by_itu <prefixes or numbers>\n\
by_zone <prefixes or numbers>\n\
channel <prefixes>\n\
</pre>\n\
<p>There are no examples because WCY Broadcasts only come from one\n\
place and you either want them or not (see UNSET/WCY if you don't\n\
want them).\n\
</p>\n\
<p>This command is really provided for future use.\n\
</p>\n\
<p>See HELP FILTER for information.\n\
</p>\n\
<h3><span class=\"mw-headline\"\n\
id=\"reject.2Fwwv_.5B0-9.5D_.3Cpattern.3E\">reject/wwv [0-9]\n\
<pattern></span></h3>\n\
<ul>\n\
<li>reject/wwv [0-9] <pattern> - set a 'reject' WWV filter\n\
</li>\n\
</ul>\n\
<p>It is unlikely that you will want to do this, but if you do then\n\
you can filter on the following fields:-\n\
</p>\n\
<pre>by <prefixes> eg: G,M,2\n\
origin <prefixes>\n\
origin_dxcc <prefixes or numbers> eg: 61,62 (from eg: sh/pre G)\n\
origin_itu <prefixes or numbers> or: G,GM,GW\n\
origin_zone <prefixes or numbers>\n\
by_dxcc <prefixes or numbers>\n\
by_itu <prefixes or numbers>\n\
by_zone <prefixes or numbers>\n\
channel <prefixes>\n\
</pre>\n\
<p>for example\n\
</p>\n\
<pre>reject/wwv by_zone 14,15,16\n\
</pre>\n\
<p>is probably the only useful thing to do (which will only show WWV\n\
broadcasts by stations in the US).\n\
</p>\n\
<p>See HELP FILTER for information.\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"REPLY\">REPLY</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"reply_2\">reply</span></h3>\n\
<ul>\n\
<li>reply = Reply (privately) to the last message that you have\n\
read\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"reply_.3Cmsgno.3E\">reply\n\
<msgno></span></h3>\n\
<ul>\n\
<li>reply <msgno> - Reply (privately) to the specified\n\
message\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"reply_b_.3Cmsgno.3E\">reply b\n\
<msgno></span></h3>\n\
<ul>\n\
<li>reply b <msgno> - Reply as a Bulletin to the specified\n\
message\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"reply_noprivate_.3Cmsgno.3E\">reply\n\
noprivate <msgno></span></h3>\n\
<ul>\n\
<li>reply noprivate <msgno> - Reply as a Bulletin to the\n\
specified message\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"reply_rr_.3Cmsgno.3E\">reply rr\n\
<msgno></span></h3>\n\
<ul>\n\
<li>reply rr <msgno> - Reply to the specified message with\n\
read receipt\n\
</li>\n\
</ul>\n\
<p>You can reply to a message and the subject will automatically\n\
have \"Re:\" inserted in front of it, if it isn't already present.\n\
You can also use all the extra qualifiers such as RR, PRIVATE,\n\
NOPRIVATE, B that you can use with the SEND command (see SEND for\n\
further details)\n\
</p>\n\
<h2><span class=\"mw-headline\" id=\"SEND\">SEND</span></h2>\n\
<h3><span class=\"mw-headline\"\n\
id=\"send_.3Ccall.3E_.5B.3Ccall.3E_....5D\">send <call>\n\
[<call> ...]</span></h3>\n\
<ul>\n\
<li>send <call> [<call> ...] - Send a message to one\n\
or more callsigns\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"send_copy_.3Cmsgno.3E_.3Ccall.3E\">send\n\
copy <msgno> <call></span></h3>\n\
<ul>\n\
<li>send copy <msgno> <call> - Send a copy of a\n\
message to someone\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"send_noprivate_.3Ccall.3E\">send\n\
noprivate <call></span></h3>\n\
<ul>\n\
<li>send noprivate <call> - Send a message to all stations\n\
</li>\n\
</ul>\n\
<p>All the SEND commands will create a message which will be sent\n\
either to an individual callsign or to one of the 'bulletin'\n\
addresses.\n\
SEND <call> on its own acts as though you had typed SEND\n\
PRIVATE, that is it will mark the message as personal and send it\n\
to the cluster node that that callsign is connected to. If the\n\
<call> you have specified is in fact a known bulletin\n\
category on your node (eg: ALL) then the message should\n\
automatically become a bulletin. You can have more than one\n\
callsign in all of the SEND commands.\n\
</p>\n\
<p>You can have multiple qualifiers so that you can have for\n\
example:-\n\
</p>\n\
<pre>SEND RR COPY 123 PRIVATE G1TLH G0RDI\n\
</pre>\n\
<p>which should send a copy of message 123 to G1TLH and G0RDI and\n\
you will receive a read receipt when they have read the message.\n\
</p>\n\
<p>SB is an alias for SEND NOPRIVATE (or send a bulletin in BBS\n\
speak) SP is an alias for SEND PRIVATE\n\
</p>\n\
<p>The system will ask you for a subject. Conventionally this should\n\
be no longer than 29 characters for compatibility. Most modern\n\
cluster software should accept more.\n\
</p>\n\
<p>You will now be prompted to start entering your text.\n\
</p>\n\
<p>You finish the message by entering '/EX' on a new line. For\n\
instance:\n\
</p>\n\
<pre>...\n\
bye then Jim\n\
73 Dirk\n\
/ex\n\
</pre>\n\
<p>If you have started a message and you don't want to keep it then\n\
you can abandon the message with '/ABORT' on a new line, like:-\n\
</p>\n\
<pre>line 1\n\
line 2\n\
oh I just can't be bothered with this\n\
/abort\n\
</pre>\n\
<p>If you abort the message it will NOT be sent.\n\
</p>\n\
<p>When you are entering the text of your message, most normal\n\
output (such as DX announcements and so on are suppressed and\n\
stored for latter display (upto 20 such lines are stored, as new\n\
ones come along, so the oldest lines are dropped).\n\
</p>\n\
<p>Also, you can enter normal commands commands (and get the output\n\
immediately) whilst in the middle of a message. You do this by\n\
typing the command preceeded by a '/' character on a new line,\n\
so:-\n\
</p>\n\
<pre>/dx g1tlh 144010 strong signal\n\
</pre>\n\
<p>Will issue a dx annoucement to the rest of the cluster.\n\
</p>\n\
<p>Also, you can add the output of a command to your message by\n\
preceeding the command with '//', thus :-\n\
</p>\n\
<pre>//sh/vhftable\n\
</pre>\n\
<p>This will show YOU the output from SH/VHFTABLE and also store it\n\
in the message.\n\
</p>\n\
<p>You can carry on with the message until you are ready to send it.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"send_private_.3Ccall.3E\">send\n\
private <call></span></h3>\n\
<ul>\n\
<li>send private <call> - Send a personal message\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"send_rr_.3Ccall.3E\">send rr\n\
<call></span></h3>\n\
<ul>\n\
<li>send rr <call> - Send a message and ask for a read\n\
receipt\n\
</li>\n\
</ul>\n\
<h2><span class=\"mw-headline\" id=\"SET\">SET</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"set.2Faddress_.3Cyour_address.3E\">set/address\n\
<your address></span></h3>\n\
<ul>\n\
<li>set/address <your address> - Record your postal address\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fannounce\">set/announce</span></h3>\n\
<ul>\n\
<li>set/announce - Allow announce messages to come out on your\n\
terminal\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fanntalk\">set/anntalk</span></h3>\n\
<ul>\n\
<li>set/anntalk - Allow talk like announce messages on your\n\
terminal\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fbeep\">set/beep</span></h3>\n\
<ul>\n\
<li>set/beep - Add a beep to DX and other messages on your\n\
terminal\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fdx\">set/dx</span></h3>\n\
<ul>\n\
<li>set/dx - Allow DX messages to come out on your terminal\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fdxcq\">set/dxcq</span></h3>\n\
<ul>\n\
<li>set/dxcq - Show CQ Zones on the end of DX announcements\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fdxgrid\">set/dxgrid</span></h3>\n\
<ul>\n\
<li>set/dxgrid - Allow QRA Grid Squares on the end of DX\n\
announcements\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fdxitu\">set/dxitu</span></h3>\n\
<ul>\n\
<li>set/dxitu - Show ITU Zones on the end of DX announcements\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fecho\">set/echo</span></h3>\n\
<ul>\n\
<li>set/echo - Make the cluster echo your input\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Femail_.3Cemail.3E\">set/email\n\
<email></span></h3>\n\
<ul>\n\
<li>set/email <email> - Set email address(es) and forward\n\
your personals\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fhere\">set/here</span></h3>\n\
<ul>\n\
<li>set/here - Tell the system you are present at your terminal\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fhomenode_.3Cnode.3E\">set/homenode\n\
<node></span></h3>\n\
<ul>\n\
<li>set/homenode <node> - Set your normal cluster callsign\n\
</li>\n\
</ul>\n\
<p>Tell the cluster system where you normally connect to. Any\n\
Messages sent to you will normally find their way there should you\n\
not be connected. eg:-\n\
</p>\n\
<pre>SET/HOMENODE gb7djk\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"set.2Flanguage_.3Clang.3E\">set/language\n\
<lang></span></h3>\n\
<ul>\n\
<li>set/language <lang> - Set the language you want to use\n\
</li>\n\
</ul>\n\
<p>You can select the language that you want the cluster to use.\n\
Currently the languages available are en (English), de (German),\n\
es (Spanish), Czech (cz), French (fr), Portuguese (pt), Italian\n\
(it) and nl (Dutch).\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"set.2Flocation_.3Clat_.26_long.3E\">set/location\n\
<lat & long></span></h3>\n\
<ul>\n\
<li>set/location <lat & long> - Set your latitude and\n\
longitude\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Flogininfo\">set/logininfo</span></h3>\n\
<ul>\n\
<li>set/logininfo - Inform when a station logs in/out locally\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fname_.3Cyour_name.3E\">set/name\n\
<your name></span></h3>\n\
<ul>\n\
<li>set/name <your name> - Set your name\n\
</li>\n\
</ul>\n\
<p>Tell the system what your name is eg:-\n\
</p>\n\
<pre>SET/NAME Dirk\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fpage_.3Clines_per_page.3E\">set/page\n\
<lines per page></span></h3>\n\
<ul>\n\
<li>set/page <lines per page> - Set the lines per page\n\
</li>\n\
</ul>\n\
<p>Tell the system how many lines you wish on a page when the number\n\
of line of output from a command is more than this. The default is\n\
20. Setting it explicitly to 0 will disable paging.\n\
</p>\n\
<pre>SET/PAGE 30\n\
SET/PAGE 0\n\
</pre>\n\
<p>The setting is stored in your user profile.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fpassword\">set/password</span></h3>\n\
<ul>\n\
<li>set/password - Set your own password\n\
</li>\n\
</ul>\n\
<p>This command only works for a 'telnet' user (currently). It will\n\
only work if you have a password already set. This initial\n\
password can only be set by the sysop.\n\
</p>\n\
<p>When you execute this command it will ask you for your old\n\
password, then ask you to type in your new password twice (to make\n\
sure you get it right). You may or may not see the data echoed on\n\
the screen as you type, depending on the type of telnet client you\n\
have.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fprompt_.3Cstring.3E\">set/prompt\n\
<string></span></h3>\n\
<ul>\n\
<li>set/prompt <string> - Set your prompt to <string>\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fqra_.3Clocator.3E\">set/qra\n\
<locator></span></h3>\n\
<ul>\n\
<li>set/qra <locator> - Set your QRA Grid locator\n\
</li>\n\
</ul>\n\
<p>Tell the system what your QRA (or Maidenhead) locator is. If you\n\
have not done a SET/LOCATION then your latitude and longitude will\n\
be set roughly correctly (assuming your locator is\n\
correct ;-). For example:-\n\
</p>\n\
<pre>SET/QRA JO02LQ\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fqth_.3Cyour_qth.3E\">set/qth\n\
<your qth></span></h3>\n\
<ul>\n\
<li>set/qth <your qth> - Set your QTH\n\
</li>\n\
</ul>\n\
<p>Tell the system where you are. For example:-\n\
</p>\n\
<pre>SET/QTH East Dereham, Norfolk\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fstartup\">set/startup</span></h3>\n\
<ul>\n\
<li>set/startup - Create your own startup script\n\
</li>\n\
</ul>\n\
<p>Create a startup script of DXSpider commands which will be\n\
executed everytime that you login into this node. You can only\n\
input the whole script afresh, it is not possible to 'edit' it.\n\
Inputting a new script is just like typing in a message using\n\
SEND. To finish inputting type: /EX on a newline, to abandon the\n\
script type: /ABORT.\n\
</p>\n\
<p>You may find the (curiously named) command BLANK useful to break\n\
up the output. If you simply want a blank line, it is easier to\n\
input one or more spaces and press the <return> key.\n\
</p>\n\
<p>See UNSET/STARTUP to remove a script.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"set.2Ftalk\">set/talk</span></h3>\n\
<ul>\n\
<li>set/talk - Allow TALK messages to come out on your terminal\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fusstate\">set/usstate</span></h3>\n\
<ul>\n\
<li>set/usstate - Allow US State info on the end of DX\n\
announcements\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fwcy\">set/wcy</span></h3>\n\
<ul>\n\
<li>set/wcy - Allow WCY messages to come out on your terminal\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fwwv\">set/wwv</span></h3>\n\
<ul>\n\
<li>set/wwv - Allow WWV messages to come out on your terminal\n\
</li>\n\
</ul>\n\
<h3><span class=\"mw-headline\" id=\"set.2Fwx\">set/wx</span></h3>\n\
<ul>\n\
<li>set/wx - Allow WX messages to come out on your terminal\n\
</li>\n\
</ul>\n\
<h2><span class=\"mw-headline\" id=\"SHOW\">SHOW</span></h2>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fchat\">show/chat</span></h3>\n\
<ul>\n\
<li>show/chat [<group>] [<lines>]\n\
</li>\n\
</ul>\n\
<p>This command allows you to see any chat or conferencing that has\n\
occurred whilst you were away. SHOW/CHAT on its own will show data\n\
for all groups. If you use a group name then it will show only\n\
chat for that group.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fconfiguration\">show/configuration</span></h3>\n\
<ul>\n\
<li>show/configuration [<node>]\n\
</li>\n\
</ul>\n\
<p>This command allows you to see all the users that can be seen and\n\
the nodes to which they are connected.\n\
</p>\n\
<p>This command is normally abbreviated to: sh/c\n\
</p>\n\
<p>Normally, the list returned will be just for the nodes from your\n\
country (because the list otherwise will be very long).\n\
</p>\n\
<pre>SH/C ALL\n\
</pre>\n\
<p>will produce a complete list of all nodes.\n\
</p>\n\
<p>BE WARNED: the list that is returned can be VERY long\n\
</p>\n\
<p>It is possible to supply a node or part of a prefix and you will\n\
get a list of the users for that node or list of nodes starting\n\
with that prefix.\n\
</p>\n\
<pre>SH/C GB7DJK\n\
SH/C SK\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fconfiguration.2Fnode\">show/configuration/node</span></h3>\n\
<ul>\n\
<li>show/configuration/node\n\
</li>\n\
</ul>\n\
<p>Show all the nodes connected to this node.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fcontest\">show/contest</span></h3>\n\
<ul>\n\
<li>show/contest <year and month>\n\
</li>\n\
</ul>\n\
<p>Show all known contests which are maintained at <a\n\
rel=\"nofollow\" class=\"external free\"\n\
href=\"http://www.sk3bg.se/contest/\">http://www.sk3bg.se/contest/</a>\n\
for a particular month or year. The format is reasonably flexible.\n\
For example:-\n\
</p>\n\
<pre>SH/CONTEST sep2003\n\
SH/CONTEST 03 march\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fdate\">show/date</span></h3>\n\
<ul>\n\
<li>show/date [<prefix>|<callsign>]\n\
</li>\n\
</ul>\n\
<p>This is very nearly the same as SHOW/TIME, the only difference\n\
the format of the date string if no arguments are given.\n\
</p>\n\
<p>If no prefixes or callsigns are given then this command returns\n\
the local time and UTC as the computer has it right now. If you\n\
give some prefixes then it will show UTC and UTC + the local\n\
offset (not including DST) at the prefixes or callsigns that you\n\
specify.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fdb0sdx\">show/db0sdx</span></h3>\n\
<ul>\n\
<li>show/db0sdx <callsign>\n\
</li>\n\
</ul>\n\
<p>This command queries the DB0SDX QSL server on the internet and\n\
returns any information available for that callsign. This service\n\
is provided for users of this software by <a rel=\"nofollow\"\n\
class=\"external free\" href=\"http://www.qslinfo.de\">http://www.qslinfo.de</a>.\n\
</p>\n\
<p>See also SHOW/QRZ, SHOW/WM7D.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fdx\">show/dx</span></h3>\n\
<ul>\n\
<li>show/dx\n\
</li>\n\
</ul>\n\
<p>If you just type SHOW/DX you will get the last so many spots\n\
(sysop configurable, but usually 10).\n\
</p>\n\
<p>In addition you can add any number of these commands in very\n\
nearly any order to the basic SHOW/DX command, they are:-\n\
</p>\n\
<pre>on <band> - eg 160m 20m 2m 23cm 6mm\n\
on <region> - eg hf vhf uhf shf (see SHOW/BANDS)\n\
on <from>/<to> - eg 1000/4000 14000-30000 (in Khz)\n\
<from>-<to>\n\
<number> - the number of spots you want\n\
<from>-<to> - <from> spot no <to> spot no in the selected list\n\
<from>/<to>\n\
<prefix> - for a spotted callsign beginning with <prefix>\n\
*<suffix> - for a spotted callsign ending in <suffix>\n\
*<string>* - for a spotted callsign containing <string>\n\
day <number> - starting <number> days ago\n\
day <from>-<to> - <from> days <to> days ago\n\
<from>/<to>\n\
info <text> - any spots containing <text> in the info or remarks\n\
by <call> - any spots spotted by <call> (spotter <call> is the same).\n\
qsl - this automatically looks for any qsl info on the call\n\
held in the spot database.\n\
iota [<iota>] - If the iota island number is missing it will look for\n\
the string iota and anything which looks like an iota\n\
island number. If you specify then it will look for\n\
that island.\n\
qra [<locator>] - this will look for the specific locator if you specify\n\
one or else anything that looks like a locator.\n\
dxcc - treat the prefix as a 'country' and look for spots\n\
from that country regardless of actual prefix. eg dxcc oq2\n\
You can also use this with the 'by' keyword. eg by W dxcc\n\
real or rt - Format the output the same as for real time spots. The\n\
formats are deliberately different (so you can tell\n\
one sort from the other). This is useful for some\n\
logging programs that can't cope with normal sh/dx\n\
output. An alias of SHOW/FDX is available.\n\
filter - Filter the spots, before output, with the user's\n\
spot filter. An alias of SHOW/MYDX is available.\n\
zone <zones> - look for spots in the cq zone (or zones) specified.\n\
zones are numbers separated by commas.\n\
by_zone <zones> - look for spots spotted by people in the cq zone\n\
specified.\n\
itu <itus> - look for spots in the itu zone (or zones) specified\n\
itu zones are numbers separated by commas.\n\
by_itu <itus> - look for spots spotted by people in the itu zone\n\
specified.\n\
state <list> - look for spots in the US state (or states) specified\n\
The list is two letter state codes separated by commas.\n\
by_state <list> - look for spots spotted by people in the US state\n\
specified.\n\
</pre>\n\
<p>Examples...\n\
</p>\n\
<pre>SH/DX 9m0\n\
SH/DX on 20m info iota\n\
SH/DX 9a on vhf day 30\n\
SH/DX rf1p qsl\n\
SH/DX iota\n\
SH/DX iota eu-064\n\
SH/DX qra jn86\n\
SH/DX dxcc oq2\n\
SH/DX dxcc oq2 by w dxcc\n\
SH/DX zone 4,5,6\n\
SH/DX by_zone 4,5,6\n\
SH/DX state in,oh\n\
SH/DX by_state in,oh\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fdxcc\">show/dxcc</span></h3>\n\
<ul>\n\
<li>show/dxcc <prefix>\n\
</li>\n\
</ul>\n\
<p>This command takes the <prefix> (which can be a full or\n\
partial callsign if desired), looks up which internal country\n\
number it is and then displays all the spots as per SH/DX for that\n\
country.\n\
</p>\n\
<p>This is now an alias for 'SHOW/DX DXCC'\n\
</p>\n\
<p>The options for SHOW/DX also apply to this command. e.g.\n\
</p>\n\
<pre>SH/DXCC G\n\
SH/DXCC W on 20m iota\n\
</pre>\n\
<p>This can be done with the SHOW/DX command like this:-\n\
</p>\n\
<pre>SH/DX dxcc g\n\
SH/DX dxcc w on 20m iota\n\
</pre>\n\
<p>This is an alias for: SH/DX dxcc\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fdxqsl\">show/dxqsl</span></h3>\n\
<ul>\n\
<li>show/dxqsl <callsign>\n\
</li>\n\
</ul>\n\
<p>The node collects information from the comment fields in spots\n\
(things like 'VIA EA7WA' or 'QSL-G1TLH') and stores these in a\n\
database.\n\
</p>\n\
<p>This command allows you to interrogate that database and if the\n\
callsign is found will display the manager(s) that people have\n\
spotted. This information is NOT reliable, but it is normally\n\
reasonably accurate if it is spotted enough times.\n\
</p>\n\
<p>For example:-\n\
</p>\n\
<pre>sh/dxqsl 4k9w\n\
</pre>\n\
<p>You can check the raw input spots yourself with:-\n\
</p>\n\
<pre>sh/dx 4k9w qsl\n\
</pre>\n\
<p>This gives you more background information.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fdxstats\">show/dxstats</span></h3>\n\
<ul>\n\
<li>show/dxstats [days] [date]�[0m\n\
</li>\n\
</ul>\n\
<p>Show the total DX spots for the last <days> no of days\n\
(default is 31), starting from a <date> (default: today).\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Ffdx\">show/fdx</span></h3>\n\
<ul>\n\
<li>show/fdx\n\
</li>\n\
</ul>\n\
<p>Normally SHOW/DX outputs spot data in a different format to the\n\
realtime data. This is a deliberate policy (so you can tell the\n\
difference between the two). Some logging programs cannot handle\n\
this so SHOW/FDX outputs historical data in real time format.\n\
</p>\n\
<p>This is an alias for: SHOW/DX real\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Ffiles\">show/files</span></h3>\n\
<ul>\n\
<li>show/files [<filearea> [<string>]]\n\
</li>\n\
</ul>\n\
<p>SHOW/FILES on its own will show you a list of the various\n\
fileareas available on the system. To see the contents of a\n\
particular file area type:-\n\
</p>\n\
<pre>SH/FILES <filearea>\n\
</pre>\n\
<p>where <filearea> is the name of the filearea you want to\n\
see the contents of.\n\
</p>\n\
<p>You can also use shell globbing characters like '*' and '?' in a\n\
string to see a selection of files in a filearea eg:-\n\
</p>\n\
<pre>SH/FILES bulletins arld*\n\
</pre>\n\
<p>See also TYPE - to see the contents of a file.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Ffilter\">show/filter</span></h3>\n\
<ul>\n\
<li>show/filter\n\
</li>\n\
</ul>\n\
<p>Show the contents of all the filters that are set. This command\n\
displays all the filters set - for all the various categories.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fhfstats\">show/hfstats</span></h3>\n\
<ul>\n\
<li>show/hfstats [days] [date]\n\
</li>\n\
</ul>\n\
<p>Show the HF DX spots breakdown by band for the last <days>\n\
no of days (default is 31), starting from a <date> (default:\n\
today).\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fhftable\">show/hftable</span></h3>\n\
<ul>\n\
<li>show/hftable [days] [date] [prefix ...]\n\
</li>\n\
</ul>\n\
<p>Show the HF DX Spotter table for the list of prefixes for the\n\
last <days> no of days (default is 31), starting from a\n\
<date> (default: today).\n\
</p>\n\
<p>If there are no prefixes then it will show the table for your\n\
country.\n\
</p>\n\
<p>Remember that some countries have more than one \"DXCC country\" in\n\
them (eg G :-), to show them (assuming you are not in G\n\
already which is specially treated in the code) you must list all\n\
the relevant prefixes\n\
</p>\n\
<pre>sh/hftable g gm gd gi gj gw gu\n\
</pre>\n\
<p>Note that the prefixes are converted into country codes so you\n\
don't have to list all possible prefixes for each country.\n\
</p>\n\
<p>If you want more or less days than the default simply include the\n\
number you require:-\n\
</p>\n\
<pre>sh/hftable 20 pa\n\
</pre>\n\
<p>If you want to start at a different day, simply add the date in\n\
some recognizable form:-\n\
</p>\n\
<pre>sh/hftable 2 25nov02\n\
sh/hftable 2 25-nov-02\n\
sh/hftable 2 021125\n\
sh/hftable 2 25/11/02\n\
</pre>\n\
<p>This will show the stats for your DXCC for that CQWW contest\n\
weekend.\n\
</p>\n\
<p>You can specify either prefixes or full callsigns (so you can see\n\
how you did against all your mates). You can also say 'all' which\n\
will then print the worldwide statistics.\n\
</p>\n\
<pre>sh/hftable all\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fmoon\">show/moon</span></h3>\n\
<ul>\n\
<li>show/moon [ndays] [<prefix>|<callsign>]�[0m\n\
</li>\n\
</ul>\n\
<p>Show the Moon rise and set times for a (list of) prefixes or\n\
callsigns, together with the azimuth and elevation of the sun\n\
currently at those locations.\n\
</p>\n\
<p>If you don't specify any prefixes or callsigns, it will show the\n\
times for your QTH (assuming you have set it with either\n\
SET/LOCATION or SET/QRA), together with the current azimuth and\n\
elevation.\n\
</p>\n\
<p>In addition, it will show the illuminated fraction of the moons\n\
disk.\n\
</p>\n\
<p>If all else fails it will show the Moonrise and set times for the\n\
node that you are connected to.\n\
</p>\n\
<p>For example:-\n\
</p>\n\
<pre>SH/MOON\n\
SH/MOON G1TLH W5UN\n\
</pre>\n\
<p>You can also use this command to see into the past or the future,\n\
so if you want to see yesterday's times then do:-\n\
</p>\n\
<pre>SH/MOON -1\n\
</pre>\n\
<p>or in three days time:-\n\
</p>\n\
<pre>SH/MOON +3 W9\n\
</pre>\n\
<p>Upto 366 days can be checked both in the past and in the future.\n\
</p>\n\
<p>Please note that the rise and set times are given as the UT times\n\
of rise and set on the requested UT day.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fmuf\">show/muf</span></h3>\n\
<ul>\n\
<li>show/muf <prefix> [<hours>][long]\n\
</li>\n\
</ul>\n\
<p>This command allow you to estimate the likelihood of you\n\
contacting a station with the prefix you have specified. The\n\
output assumes a modest power of 20dBW and receiver sensitivity of\n\
-123dBm (about 0.15muV/10dB SINAD)\n\
</p>\n\
<p>The result predicts the most likely operating frequencies and\n\
signal levels for high frequency (shortwave) radio propagation\n\
paths on specified days of the year and hours of the day. It is\n\
most useful for paths between 250 km and 6000 km, but can be used\n\
with reduced accuracy for paths shorter or longer than this.\n\
</p>\n\
<p>The command uses a routine MINIMUF 3.5 developed by the U.S. Navy\n\
and used to predict the MUF given the predicted flux, day of the\n\
year, hour of the day and geographic coordinates of the\n\
transmitter and receiver. This routine is reasonably accurate for\n\
the purposes here, with a claimed RMS error of 3.8 MHz, but much\n\
smaller and less complex than the programs used by major shortwave\n\
broadcasting organizations, such as the Voice of America.\n\
</p>\n\
<p>The command will display some header information detailing its\n\
assumptions, together with the locations, latitude and longitudes\n\
and bearings. It will then show UTC (UT), local time at the other\n\
end (LT), calculate the MUFs, Sun zenith angle at the midpoint of\n\
the path (Zen) and the likely signal strengths. Then for each\n\
frequency for which the system thinks there is a likelihood of a\n\
circuit it prints a value.\n\
</p>\n\
<p>The value is currently a likely S meter reading based on the\n\
conventional 6dB / S point scale. If the value has a '+' appended\n\
it means that it is 1/2 an S point stronger. If the value is\n\
preceded by an 'm' it means that there is likely to be much fading\n\
and by an 's' that the signal is likely to be noisy.\n\
</p>\n\
<p>By default SHOW/MUF will show the next two hours worth of data.\n\
You can specify anything up to 24 hours worth of data by appending\n\
the no of hours required after the prefix. For example:-\n\
</p>\n\
<pre>SH/MUF W\n\
</pre>\n\
<p>produces:\n\
</p>\n\
<pre>RxSens: -123 dBM SFI: 159 R: 193 Month: 10 Day: 21\n\
Power : 20 dBW Distance: 6283 km Delay: 22.4 ms\n\
Location Lat / Long Azim\n\
East Dereham, Norfolk 52 41 N 0 57 E 47\n\
United-States-W 43 0 N 87 54 W 299\n\
UT LT MUF Zen 1.8 3.5 7.0 10.1 14.0 18.1 21.0 24.9 28.0 50.0\n\
18 23 11.5 -35 mS0+ mS2 S3\n\
19 0 11.2 -41 mS0+ mS2 S3\n\
</pre>\n\
<p>indicating that you will have weak, fading circuits on top band\n\
and 80m but usable signals on 40m (about S3).\n\
</p>\n\
<p>inputing:-\n\
</p>\n\
<pre>SH/MUF W 24\n\
</pre>\n\
<p>will get you the above display, but with the next 24 hours worth\n\
of propagation data.\n\
</p>\n\
<pre>SH/MUF W L 24\n\
SH/MUF W 24 Long\n\
</pre>\n\
<p>Gives you an estimate of the long path propagation characterics.\n\
It should be noted that the figures will probably not be very\n\
useful, nor terrible accurate, but it is included for\n\
completeness.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fmydx\">show/mydx</span></h3>\n\
<ul>\n\
<li>show/mydx\n\
</li>\n\
</ul>\n\
<p>SHOW/DX potentially shows all the spots available in the system.\n\
Using SHOW/MYDX will, instead, filter the availble spots using any\n\
spot filter that you have set, first.\n\
</p>\n\
<p>This command, together with ACCEPT/SPOT or REJECT/SPOT, will\n\
allow you to customise the spots that you receive.\n\
</p>\n\
<p>So if you have said: ACC/SPOT on hf, doing a SHOW/MYDX will now\n\
only, ever, show HF spots. </p>\n\
<p>All the other options on SH/DX can still be used.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fnewconfiguration\">show/newconfiguration</span></h3>\n\
<ul>\n\
<li>show/newconfiguration [<node>]\n\
</li>\n\
</ul>\n\
<p>This command allows you to see all the users that can be seen and\n\
the nodes to which they are connected.\n\
</p>\n\
<p>This command produces essentially the same information as\n\
SHOW/CONFIGURATION except that it shows all the duplication of any\n\
routes that might be present It also uses a different format which\n\
may not take up quite as much space if you don't have any loops.\n\
</p>\n\
<p>BE WARNED: the list that is returned can be VERY long\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fnewconfiguration.2Fnode\">show/newconfiguration/node</span></h3>\n\
<ul>\n\
<li>show/newconfiguration/node\n\
</li>\n\
</ul>\n\
<p>Show all the nodes connected to this node in the new format.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fprefix\">show/prefix</span></h3>\n\
<ul>\n\
<li>show/prefix <callsign>\n\
</li>\n\
</ul>\n\
<p>This command takes the <callsign> (which can be a full or\n\
partial callsign or a prefix), looks up which internal country\n\
number it is and then displays all the relevant prefixes for that\n\
country together with the internal country no, the CQ and ITU\n\
regions.\n\
</p>\n\
<p>See also SHOW/DXCC\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fqra\">show/qra</span></h3>\n\
<ul>\n\
<li>show/qra <lat> <long>\n\
</li>\n\
</ul>\n\
<p>This is a multipurpose command that allows you either to\n\
calculate the distance and bearing between two locators or (if\n\
only one locator is given on the command line) the distance and\n\
beraing from your station to the locator. For example:-\n\
</p>\n\
<pre>SH/QRA IO92QL\n\
SH/QRA JN06 IN73\n\
</pre>\n\
<p>The first example will show the distance and bearing to the\n\
locator from yourself, the second example will calculate the\n\
distance and bearing from the first locator to the second. You can\n\
use 4 or 6 character locators.\n\
</p>\n\
<p>It is also possible to convert a latitude and longitude to a\n\
locator by using this command with a latitude and longitude as an\n\
argument, for example:-\n\
</p>\n\
<pre>SH/QRA 52 41 N 0 58 E\n\
</pre>\n\
<ul>\n\
<li>show/qra <locator> [<locator>]\n\
</li>\n\
</ul>\n\
<p>Show distance between QRA Grid locators\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fqrz\">show/qrz</span></h3>\n\
<ul>\n\
<li>show/qrz <callsign>\n\
</li>\n\
</ul>\n\
<p>This command queries the QRZ callbook server on the internet and\n\
returns any information available for that callsign. This service\n\
is provided for users of this software by <a rel=\"nofollow\"\n\
class=\"external free\" href=\"http://www.qrz.com\">http://www.qrz.com</a>\n\
</p>\n\
<p>See also SHOW/WM7D for an alternative.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Froute\">show/route</span></h3>\n\
<ul>\n\
<li>show/route <callsign> ...\n\
</li>\n\
</ul>\n\
<p>This command allows you to see to which node the callsigns\n\
specified are connected. It is a sort of inverse sh/config.\n\
</p>\n\
<pre>sh/route n2tly\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fsatellite\">show/satellite</span></h3>\n\
<ul>\n\
<li>show/satellite <name> [<hours> <interval>]\n\
</li>\n\
</ul>\n\
<p>Show the tracking data from your location to the satellite of\n\
your choice from now on for the next few hours.\n\
</p>\n\
<p>If you use this command without a satellite name it will display\n\
a list of all the satellites known currently to the system.\n\
</p>\n\
<p>If you give a name then you can obtain tracking data of all the\n\
passes that start and finish 5 degrees below the horizon. As\n\
default it will give information for the next three hours for\n\
every five minute period.\n\
</p>\n\
<p>You can alter the number of hours and the step size, within\n\
certain limits.\n\
</p>\n\
<p>Each pass in a period is separated with a row of '-----'\n\
characters\n\
</p>\n\
<p>So for example:-\n\
</p>\n\
<pre>SH/SAT AO-10\n\
SH/SAT FENGYUN1 12 2\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fstartup\">show/startup</span></h3>\n\
<ul>\n\
<li>show/startup\n\
</li>\n\
</ul>\n\
<p>View the contents of a startup script created with SET/STARTUP.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fstation\">show/station</span></h3>\n\
<ul>\n\
<li>show/station [<callsign> ..]\n\
</li>\n\
</ul>\n\
<p>Show the information known about a callsign and whether (and\n\
where) that callsign is connected to the cluster.\n\
</p>\n\
<pre>SH/ST G1TLH\n\
</pre>\n\
<p>If no callsign is given then show the information for yourself.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fsun\">show/sun</span></h3>\n\
<ul>\n\
<li>show/sun [ndays] [<prefix>|<callsign>]\n\
</li>\n\
</ul>\n\
<p>Show the sun rise and set times for a (list of) prefixes or\n\
callsigns, together with the azimuth and elevation of the sun\n\
currently at those locations.\n\
</p>\n\
<p>If you don't specify any prefixes or callsigns, it will show the\n\
times for your QTH (assuming you have set it with either\n\
SET/LOCATION or SET/QRA), together with the current azimuth and\n\
elevation.\n\
</p>\n\
<p>If all else fails it will show the sunrise and set times for the\n\
node that you are connected to.\n\
</p>\n\
<p>For example:-\n\
</p>\n\
<pre>SH/SUN\n\
SH/SUN G1TLH K9CW ZS\n\
</pre>\n\
<p>You can also use this command to see into the past or the future,\n\
so if you want to see yesterday's times then do:-\n\
</p>\n\
<pre>SH/SUN -1\n\
</pre>\n\
<p>or in three days time:-\n\
</p>\n\
<pre>SH/SUN +3 W9\n\
</pre>\n\
<p>Upto 366 days can be checked both in the past and in the future.\n\
</p>\n\
<p>Please note that the rise and set times are given as the UT times\n\
of rise and set on the requested UT day.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Ftime\">show/time</span></h3>\n\
<ul>\n\
<li>show/time [<prefix>|<callsign>]\n\
</li>\n\
</ul>\n\
<p>If no prefixes or callsigns are given then this command returns\n\
the local time and UTC as the computer has it right now. If you\n\
give some prefixes then it will show UTC and UTC + the local\n\
offset (not including DST) at the prefixes or callsigns that you\n\
specify.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fusdb\">show/usdb</span></h3>\n\
<ul>\n\
<li>show/usdb [call ..]\n\
</li>\n\
</ul>\n\
<p>Show the City and State of a Callsign held on the FCC database if\n\
his is being run on this system, eg:-\n\
</p>\n\
<pre>sh/usdb k1xx\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fvhfstats\">show/vhfstats</span></h3>\n\
<ul>\n\
<li>show/vhfstats [days] [date]\n\
</li>\n\
</ul>\n\
<p>Show the VHF DX spots breakdown by band for the last <days>\n\
no of days (default is 31), starting from a date (default: today).\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fvhftable\">show/vhftable</span></h3>\n\
<ul>\n\
<li>show/vhftable [days] [date] [prefix ...]\n\
</li>\n\
</ul>\n\
<p>Show the VHF DX Spotter table for the list of prefixes for the\n\
last <days> no of days (default is 31), starting from a date\n\
(default: today).\n\
</p>\n\
<p>If there are no prefixes then it will show the table for your\n\
country.\n\
</p>\n\
<p>Remember that some countries have more than one \"DXCC country\" in\n\
them (eg G :-), to show them (assuming you are not in G\n\
already which is specially treated in the code) you must list all\n\
the relevant prefixes\n\
</p>\n\
<pre>sh/vhftable g gm gd gi gj gw gu\n\
</pre>\n\
<p>Note that the prefixes are converted into country codes so you\n\
don't have to list all possible prefixes for each country.\n\
</p>\n\
<p>If you want more or less days than the default simply include the\n\
number you require:-\n\
</p>\n\
<pre>sh/vhftable 20 pa\n\
</pre>\n\
<p>If you want to start at a different day, simply add the date in\n\
some recognizable form:-\n\
</p>\n\
<pre>sh/vhftable 2 25nov02\n\
sh/vhftable 2 25-nov-02\n\
sh/vhftable 2 021125\n\
sh/vhftable 2 25/11/02\n\
</pre>\n\
<p>This will show the stats for your DXCC for that CQWW contest\n\
weekend.\n\
</p>\n\
<p>You can specify either prefixes or full callsigns (so you can see\n\
how you did against all your mates). You can also say 'all' which\n\
will then print the worldwide statistics.\n\
</p>\n\
<pre>sh/vhftable all\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fwcy\">show/wcy</span></h3>\n\
<p>Display the most recent WCY information that has been received by\n\
the system\n\
</p>\n\
<ul>\n\
<li>show/wcy\n\
</li>\n\
</ul>\n\
<p>Show last 10 WCY broadcasts\n\
</p>\n\
<ul>\n\
<li>show/wcy <n>\n\
</li>\n\
</ul>\n\
<p>Show last <n> WCY broadcasts\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fwm7d\">show/wm7d</span></h3>\n\
<ul>\n\
<li>show/wm7d <callsign>\n\
</li>\n\
</ul>\n\
<p>This command queries the WM7D callbook server on the internet and\n\
returns any information available for that US callsign. This\n\
service is provided for users of this software by <a\n\
rel=\"nofollow\" class=\"external free\" href=\"http://www.wm7d.net\">http://www.wm7d.net</a>.\n\
</p>\n\
<p>See also SHOW/QRZ.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"show.2Fwwv\">show/wwv</span></h3>\n\
<p>Display the most recent WWV information that has been received by\n\
the system\n\
</p>\n\
<ul>\n\
<li>show/wwv\n\
</li>\n\
</ul>\n\
<p>Show last 10 WWV broadcasts\n\
</p>\n\
<ul>\n\
<li>show/wwv <n>\n\
</li>\n\
</ul>\n\
<p>Show last <n> WWV broadcasts\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"sysop\">sysop</span></h3>\n\
<ul>\n\
<li>sysop\n\
</li>\n\
</ul>\n\
<p>The system automatically reduces your privilege level to that of\n\
a normal user if you login in remotely. This command allows you to\n\
regain your normal privilege level. It uses the normal system:\n\
five numbers are returned that are indexes into the character\n\
array that is your assigned password (see SET/PASSWORD). The\n\
indexes start from zero.\n\
</p>\n\
<p>You are expected to return a string which contains the characters\n\
required in the correct order. You may intersperse those\n\
characters with others to obscure your reply for any watchers. For\n\
example (and these values are for explanation :-):\n\
</p>\n\
<pre>password = 012345678901234567890123456789\n\
> sysop\n\
22 10 15 17 3\n\
</pre>\n\
<p>you type:-\n\
</p>\n\
<pre>aa2bbbb0ccc5ddd7xxx3n\n\
or 2 0 5 7 3\n\
or 20573\n\
</pre>\n\
<p>They will all match. If there is no password you will still be\n\
offered numbers but nothing will happen when you input a string.\n\
Any match is case sensitive.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"talk\">talk</span></h3>\n\
<ul>\n\
<li>talk <call> > <node> [<text>]\n\
</li>\n\
</ul>\n\
<p>Send a short message to any other station that is visible on the\n\
cluster system. You can send it to anyone you can see with a\n\
SHOW/CONFIGURATION command, they don't have to be connected\n\
locally.\n\
</p>\n\
<p>The second form of TALK is used when other cluster nodes are\n\
connected with restricted information. This usually means that\n\
they don't send the user information usually associated with\n\
logging on and off the cluster.\n\
</p>\n\
<p>If you know that G3JNB is likely to be present on GB7TLH, but you\n\
can only see GB7TLH in the SH/C list but with no users, then you\n\
would use the second form of the talk message.\n\
</p>\n\
<p>If you want to have a ragchew with someone you can leave the text\n\
message out and the system will go into 'Talk' mode. What this\n\
means is that a short message is sent to the recipient telling\n\
them that you are in a go to the station that you asked for.\n\
</p>\n\
<p>All the usual announcements, spots and so on will still come out\n\
on your terminal. If you want to do something (such as send a\n\
spot) you preceed the normal command with a '/' character, eg:-\n\
</p>\n\
<pre>/DX 14001 G1TLH What's a B class licensee doing on 20m CW?\n\
/HELP talk\n\
</pre>\n\
<p>To leave talk mode type:\n\
</p>\n\
<pre>/EX\n\
</pre>\n\
<p>If you are in 'Talk' mode, there is an extention to the '/'\n\
command which allows you to send the output to all the people you\n\
are talking to. You do with the '//' command. For example:-\n\
</p>\n\
<pre>//sh/hftable\n\
</pre>\n\
<p>will send the hftable as you have it to all the people you are\n\
currently talking to.\n\
</p>\n\
<ul>\n\
<li>talk <call> [<text>]\n\
</li>\n\
</ul>\n\
<p>Send a text message to another station\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"type\">type</span></h3>\n\
<ul>\n\
<li>type <filearea>/<name>\n\
</li>\n\
</ul>\n\
<p>Type out the contents of a file in a filearea. So, for example,\n\
in filearea 'bulletins' you want to look at file 'arld051' you\n\
would enter:-\n\
</p>\n\
<pre>TYPE bulletins/arld051\n\
</pre>\n\
<p>See also SHOW/FILES to see what fileareas are available and a\n\
list of content.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fannounce\">unset/announce</span></h3>\n\
<ul>\n\
<li>unset/announce\n\
</li>\n\
</ul>\n\
<p>Stop announce messages coming out on your terminal\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fanntalk\">unset/anntalk</span></h3>\n\
<ul>\n\
<li>unset/anntalk\n\
</li>\n\
</ul>\n\
<p>The announce system on legacy cluster nodes is used as a talk\n\
substitute because the network is so poorly connected. If you:\n\
</p>\n\
<pre>unset/anntalk\n\
</pre>\n\
<p>you will suppress several of these announces, you may miss the\n\
odd useful one as well, but you would probably miss them anyway in\n\
the welter of useless ones.\n\
</p>\n\
<pre>set/anntalk\n\
</pre>\n\
<p>allows you to see them again. This is the default.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fbeep\">unset/beep</span></h3>\n\
<ul>\n\
<li>unset/beep\n\
</li>\n\
</ul>\n\
<p>Stop beeps for DX and other messages on your terminal\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fdx\">unset/dx</span></h3>\n\
<ul>\n\
<li>unset/dx\n\
</li>\n\
</ul>\n\
<p>Stop DX messages coming out on your terminal\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fdxcq\">unset/dxcq</span></h3>\n\
<ul>\n\
<li>unset/dxcq\n\
</li>\n\
</ul>\n\
<p>Stop CQ Zones on the end of DX announcements\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fdxgrid\">unset/dxgrid</span></h3>\n\
<ul>\n\
<li>unset/dxgrid\n\
</li>\n\
</ul>\n\
<p>Stop QRA Grid Square announcements </p>\n\
<p>A standard feature which is enabled in version 1.43 and above is\n\
that if the spotter's grid square is known it is output on the end\n\
of a DX announcement (there is just enough room). Some user\n\
programs cannot cope with this. You can use this command to reset\n\
(or set) this feature.\n\
</p>\n\
<p>Conflicts with: SET/DXCQ, SET/DXITU\n\
</p>\n\
<p>Do a STAT/USER to see which flags you have set if you are\n\
confused.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fdxitu\">unset/dxitu</span></h3>\n\
<ul>\n\
<li>unset/dxitu\n\
</li>\n\
</ul>\n\
<p>Stop ITU Zones on the end of DX announcements\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fecho\">unset/echo</span></h3>\n\
<ul>\n\
<li>unset/echo\n\
</li>\n\
</ul>\n\
<p>Stop the cluster echoing your input\n\
</p>\n\
<p>If you are connected via a telnet session, different\n\
implimentations of telnet handle echo differently depending on\n\
whether you are connected via port 23 or some other port. You can\n\
use this command to change the setting appropriately.\n\
</p>\n\
<p>The setting is stored in your user profile.\n\
</p>\n\
<p>YOU DO NOT NEED TO USE THIS COMMAND IF YOU ARE CONNECTED VIA\n\
AX25.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Femail\">unset/email</span></h3>\n\
<ul>\n\
<li>unset/email\n\
</li>\n\
</ul>\n\
<p>Stop personal messages being forwarded by email\n\
</p>\n\
<p>If any personal messages come in for your callsign then you can\n\
usevthese commands to control whether they are forwarded onto your\n\
email address. To enable the forwarding do something like:-\n\
</p>\n\
<pre>SET/EMAIL mike.tubby@somewhere.com\n\
</pre>\n\
<p>You can have more than one email address (each one separated by a\n\
space). Emails are forwarded to all the email addresses you\n\
specify.\n\
</p>\n\
<p>You can disable forwarding by:-\n\
</p>\n\
<pre>UNSET/EMAIL\n\
</pre>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fhere\">unset/here</span></h3>\n\
<ul>\n\
<li>unset/here\n\
</li>\n\
</ul>\n\
<p>Tell the system you are absent from your terminal\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Flogininfo\">unset/logininfo</span></h3>\n\
<ul>\n\
<li>unset/logininfo\n\
</li>\n\
</ul>\n\
<p>No longer inform when a station logs in/out locally\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fprivilege\">unset/privilege</span></h3>\n\
<ul>\n\
<li>unset/privilege\n\
</li>\n\
</ul>\n\
<p>Remove any privilege for this session\n\
</p>\n\
<p>You can use this command to 'protect' this session from\n\
unauthorised use. If you want to get your normal privilege back\n\
you will need to either logout and login again (if you are on a\n\
console) or use the SYSOP command.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fprompt\">unset/prompt</span></h3>\n\
<ul>\n\
<li>unset/prompt\n\
</li>\n\
</ul>\n\
<p>Set your prompt back to default\n\
</p>\n\
<p>UNSET/PROMPT will undo the SET/PROMPT command and set your prompt\n\
back to normal.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fstartup\">unset/startup</span></h3>\n\
<ul>\n\
<li>unset/startup\n\
</li>\n\
</ul>\n\
<p>Remove your own startup script\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Ftalk\">unset/talk</span></h3>\n\
<ul>\n\
<li>unset/talk\n\
</li>\n\
</ul>\n\
<p>Stop TALK messages coming out on your terminal\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fusstate\">unset/usstate</span></h3>\n\
<ul>\n\
<li>unset/usstate\n\
</li>\n\
</ul>\n\
<p>Stop US State info on the end of DX announcements\n\
</p>\n\
<p>If the spotter's or spotted's US State is known it is output on\n\
the end of a DX announcement (there is just enough room).\n\
</p>\n\
<p>A spotter's state will appear on the RHS of the time (like\n\
SET/DXGRID) and the spotted's State will appear on the LHS of the\n\
time field. Any information found will override any locator\n\
information from SET/DXGRID.\n\
</p>\n\
<p>Some user programs cannot cope with this. You can use this\n\
command to reset (or set) this feature.\n\
</p>\n\
<p>Conflicts with: SET/DXCQ, SET/DXITU\n\
</p>\n\
<p>Do a STAT/USER to see which flags you have set if you are\n\
confused.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fwcy\">unset/wcy</span></h3>\n\
<ul>\n\
<li>unset/wcy\n\
</li>\n\
</ul>\n\
<p>Stop WCY messages coming out on your terminal\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fwwv\">unset/wwv</span></h3>\n\
<ul>\n\
<li>unset/wwv\n\
</li>\n\
</ul>\n\
<p>Stop WWV messages coming out on your terminal\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"unset.2Fwx\">unset/wx</span></h3>\n\
<ul>\n\
<li>unset/wx\n\
</li>\n\
</ul>\n\
<p>Stop WX messages coming out on your terminal\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"who\">who</span></h3>\n\
<ul>\n\
<li>who\n\
</li>\n\
</ul>\n\
<p>Show who is physically connected\n\
</p>\n\
<p>This is a quick listing that shows which callsigns are connected\n\
and what sort of connection they have.\n\
</p>\n\
<h3><span class=\"mw-headline\" id=\"wx\">wx</span></h3>\n\
<ul>\n\
<li>wx <text>\n\
</li>\n\
</ul>\n\
<p>Send a weather message to local users\n\
</p>\n\
<ul>\n\
<li>wx full <text>\n\
</li>\n\
</ul>\n\
<p>Send a weather message to all cluster users\n\
</p>\n\
</body>\n\
</html>";
| 110,150
|
C++
|
.cxx
| 2,784
| 38.240302
| 149
| 0.670694
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,144
|
dx_dialog.cxx
|
w1hkj_fldigi/src/dxcluster/dx_dialog.cxx
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#include "gettext.h"
#include "dx_dialog.h"
#include "Fl_Text_Buffer_mod.H"
static Fl_Text_Buffer_mod telnet_txt_buffer;
static Fl_Text_Buffer_mod telnet_view_buffer;
#include "configuration.h"
#include "dx_cluster.h"
Fl_Group *btn_select_host=(Fl_Group *)0;
Fl_Input2 *inp_dxcc_host_url=(Fl_Input2 *)0;
static void cb_inp_dxcc_host_url(Fl_Input2* o, void*) {
progdefaults.dxcc_host_url=o->value();
progdefaults.changed = true;
}
Fl_Button *btn_show_host_tab=(Fl_Button *)0;
static void cb_btn_show_host_tab(Fl_Button*, void*) {
cluster_tabs->value(tabDXclusterConfig);
cluster_tabs->redraw();
}
Fl_Input2 *inp_dccc_host_port=(Fl_Input2 *)0;
static void cb_inp_dccc_host_port(Fl_Input2* o, void*) {
progdefaults.dxcc_host_port=o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_dccc_login=(Fl_Input2 *)0;
static void cb_inp_dccc_login(Fl_Input2* o, void*) {
progdefaults.dxcc_login=o->value();
progdefaults.changed = true;
}
Fl_Input2 *inp_dxcc_password=(Fl_Input2 *)0;
static void cb_inp_dxcc_password(Fl_Input2* o, void*) {
progdefaults.dxcc_password = o->value();
}
Fl_Button *btnDXCLUSTERpasswordShow=(Fl_Button *)0;
static void cb_btnDXCLUSTERpasswordShow(Fl_Button*, void*) {
inp_dxcc_password->type(inp_dxcc_password->type() ^ FL_SECRET_INPUT);
inp_dxcc_password->redraw();
}
Fl_Check_Button *btn_dxcc_connect=(Fl_Check_Button *)0;
static void cb_btn_dxcc_connect(Fl_Check_Button* o, void*) {
progStatus.cluster_connected=o->value();
DXcluster_connect(o->value());
}
Fl_Box *lbl_dxc_connected=(Fl_Box *)0;
Fl_Check_Button *btn_dxc_auto_connect=(Fl_Check_Button *)0;
static void cb_btn_dxc_auto_connect(Fl_Check_Button* o, void*) {
progdefaults.dxc_auto_connect = o->value();
progdefaults.changed = true;
}
Fl_Tabs *cluster_tabs=(Fl_Tabs *)0;
Fl_Group *tabDXclusterTelNetStream=(Fl_Group *)0;
FTextView *brws_tcpip_stream=(FTextView *)0;
Fl_Button *dxc_macro_1=(Fl_Button *)0;
Fl_Button *dxc_macro_2=(Fl_Button *)0;
Fl_Button *dxc_macro_3=(Fl_Button *)0;
Fl_Button *dxc_macro_4=(Fl_Button *)0;
Fl_Button *dxc_macro_5=(Fl_Button *)0;
Fl_Button *dxc_macro_6=(Fl_Button *)0;
Fl_Button *dxc_macro_7=(Fl_Button *)0;
Fl_Button *dxc_macro_8=(Fl_Button *)0;
Fl_Input2 *inp_dxcluster_cmd=(Fl_Input2 *)0;
static void cb_inp_dxcluster_cmd(Fl_Input2*, void*) {
DXcluster_submit();
}
Fl_Button *btn_cluster_spot=(Fl_Button *)0;
static void cb_btn_cluster_spot(Fl_Button*, void*) {
send_DXcluster_spot();
}
Fl_Button *btn_cluster_submit=(Fl_Button *)0;
static void cb_btn_cluster_submit(Fl_Button*, void*) {
DXcluster_submit();
}
Fl_Group *tabDXclusterReports=(Fl_Group *)0;
Fl_Browser *reports_header=(Fl_Browser *)0;
Fl_Browser *brws_dx_cluster=(Fl_Browser *)0;
static void cb_brws_dx_cluster(Fl_Browser*, void*) {
DXcluster_select();
}
Fl_Button *btn_dxc_cluster_clear=(Fl_Button *)0;
static void cb_btn_dxc_cluster_clear(Fl_Button*, void*) {
brws_dx_cluster->clear();
}
Fl_Check_Button *brws_order=(Fl_Check_Button *)0;
static void cb_brws_order(Fl_Check_Button* o, void*) {
progdefaults.dxc_topline = o->value();
dxc_lines();
progdefaults.changed=true;
}
Fl_Button *btn_cluster_spot2=(Fl_Button *)0;
static void cb_btn_cluster_spot2(Fl_Button*, void*) {
send_DXcluster_spot();
}
Fl_Group *tabDXclusterConfig=(Fl_Group *)0;
Fl_Browser *brws_dxcluster_hosts=(Fl_Browser *)0;
Fl_Button *btn_dxcluster_hosts_select=(Fl_Button *)0;
Fl_Button *btn_dxcluster_hosts_add=(Fl_Button *)0;
Fl_Button *btn_dxcluster_hosts_delete=(Fl_Button *)0;
Fl_Button *btn_dxcluster_servers=(Fl_Button *)0;
FTextEdit *ed_telnet_cmds=(FTextEdit *)0;
Fl_Button *btn_dxcluster_hosts_load_setup=(Fl_Button *)0;
Fl_Button *btn_dxcluster_hosts_save_setup=(Fl_Button *)0;
Fl_Button *btn_dxcluster_hosts_send_setup=(Fl_Button *)0;
Fl_Check_Button *btn_spot_when_logged=(Fl_Check_Button *)0;
static void cb_btn_spot_when_logged(Fl_Check_Button* o, void*) {
progdefaults.spot_when_logged = o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btn_dxc_hertz=(Fl_Check_Button *)0;
static void cb_btn_dxc_hertz(Fl_Check_Button* o, void*) {
progdefaults.dxc_hertz = o->value();
progdefaults.changed = true;
}
Fl_Input *mlabel_1=(Fl_Input *)0;
static void cb_mlabel_1(Fl_Input* o, void*) {
progdefaults.dxcm_label_1=o->value();
dxc_macro_1->label(progdefaults.dxcm_label_1.c_str());
progdefaults.changed=true;
}
Fl_Input2 *mtext_1=(Fl_Input2 *)0;
static void cb_mtext_1(Fl_Input2* o, void*) {
progdefaults.dxcm_text_1=o->value();
progdefaults.changed=true;
}
Fl_Input *mlabel_2=(Fl_Input *)0;
static void cb_mlabel_2(Fl_Input* o, void*) {
progdefaults.dxcm_label_2=o->value();
dxc_macro_2->label(progdefaults.dxcm_label_2.c_str());
progdefaults.changed=true;
}
Fl_Input2 *mtext_2=(Fl_Input2 *)0;
static void cb_mtext_2(Fl_Input2* o, void*) {
progdefaults.dxcm_text_2=o->value();
progdefaults.changed=true;
}
Fl_Input *mlabel_3=(Fl_Input *)0;
static void cb_mlabel_3(Fl_Input* o, void*) {
progdefaults.dxcm_label_3=o->value();
dxc_macro_3->label(progdefaults.dxcm_label_3.c_str());
progdefaults.changed=true;
}
Fl_Input2 *mtext_3=(Fl_Input2 *)0;
static void cb_mtext_3(Fl_Input2* o, void*) {
progdefaults.dxcm_text_3=o->value();
progdefaults.changed=true;
}
Fl_Input *mlabel_4=(Fl_Input *)0;
static void cb_mlabel_4(Fl_Input* o, void*) {
progdefaults.dxcm_label_4=o->value();
dxc_macro_4->label(progdefaults.dxcm_label_4.c_str());
progdefaults.changed=true;
}
Fl_Input2 *mtext_4=(Fl_Input2 *)0;
static void cb_mtext_4(Fl_Input2* o, void*) {
progdefaults.dxcm_text_4=o->value();
progdefaults.changed=true;
}
Fl_Input *mlabel_5=(Fl_Input *)0;
static void cb_mlabel_5(Fl_Input* o, void*) {
progdefaults.dxcm_label_5=o->value();
dxc_macro_5->label(progdefaults.dxcm_label_5.c_str());
progdefaults.changed=true;
}
Fl_Input2 *mtext_5=(Fl_Input2 *)0;
static void cb_mtext_5(Fl_Input2* o, void*) {
progdefaults.dxcm_text_5=o->value();
progdefaults.changed=true;
}
Fl_Input *mlabel_6=(Fl_Input *)0;
static void cb_mlabel_6(Fl_Input* o, void*) {
progdefaults.dxcm_label_6=o->value();
dxc_macro_6->label(progdefaults.dxcm_label_6.c_str());
progdefaults.changed=true;
}
Fl_Input2 *mtext_6=(Fl_Input2 *)0;
static void cb_mtext_6(Fl_Input2* o, void*) {
progdefaults.dxcm_text_6=o->value();
progdefaults.changed=true;
}
Fl_Input *mlabel_7=(Fl_Input *)0;
static void cb_mlabel_7(Fl_Input* o, void*) {
progdefaults.dxcm_label_7=o->value();
dxc_macro_7->label(progdefaults.dxcm_label_7.c_str());
progdefaults.changed=true;
}
Fl_Input2 *mtext_7=(Fl_Input2 *)0;
static void cb_mtext_7(Fl_Input2* o, void*) {
progdefaults.dxcm_text_7=o->value();
progdefaults.changed=true;
}
Fl_Input *mlabel_8=(Fl_Input *)0;
static void cb_mlabel_8(Fl_Input* o, void*) {
progdefaults.dxcm_label_8=o->value();
dxc_macro_8->label(progdefaults.dxcm_label_8.c_str());
progdefaults.changed=true;
}
Fl_Input2 *mtext_8=(Fl_Input2 *)0;
static void cb_mtext_8(Fl_Input2* o, void*) {
progdefaults.dxcm_text_8=o->value();
progdefaults.changed=true;
}
Fl_Button *btn_dxcluster_ar_help=(Fl_Button *)0;
Fl_Button *btn_dxcluster_cc_help=(Fl_Button *)0;
Fl_Button *btn_dxcluster_dx_help=(Fl_Button *)0;
Fl_Group *tabDXclusterHelp=(Fl_Group *)0;
FTextView *brws_dxc_help=(FTextView *)0;
Fl_Button *btn_dxc_help_query=(Fl_Button *)0;
static void cb_btn_dxc_help_query(Fl_Button*, void*) {
dxc_help_query();
}
Fl_Input2 *inp_help_string=(Fl_Input2 *)0;
static void cb_inp_help_string(Fl_Input2*, void*) {
dxc_help_query();
}
Fl_Button *btn_dxc_help_clear=(Fl_Button *)0;
static void cb_btn_dxc_help_clear(Fl_Button*, void*) {
dxc_help_clear();
}
Fl_Double_Window* dxc_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(680, 400, _("DX Cluster Spotting"));
w = o; if (w) {/* empty */}
{ btn_select_host = new Fl_Group(1, 2, 678, 50);
btn_select_host->box(FL_ENGRAVED_BOX);
{ Fl_Input2* o = inp_dxcc_host_url = new Fl_Input2(6, 25, 256, 22, _("DX HOST hostname/IP"));
inp_dxcc_host_url->tooltip(_("telnet server URL"));
inp_dxcc_host_url->box(FL_DOWN_BOX);
inp_dxcc_host_url->color(FL_BACKGROUND2_COLOR);
inp_dxcc_host_url->selection_color(FL_SELECTION_COLOR);
inp_dxcc_host_url->labeltype(FL_NORMAL_LABEL);
inp_dxcc_host_url->labelfont(0);
inp_dxcc_host_url->labelsize(14);
inp_dxcc_host_url->labelcolor(FL_FOREGROUND_COLOR);
inp_dxcc_host_url->callback((Fl_Callback*)cb_inp_dxcc_host_url);
inp_dxcc_host_url->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inp_dxcc_host_url->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcc_host_url.c_str());
} // Fl_Input2* inp_dxcc_host_url
{ btn_show_host_tab = new Fl_Button(263, 25, 20, 22, _("@2>"));
btn_show_host_tab->callback((Fl_Callback*)cb_btn_show_host_tab);
} // Fl_Button* btn_show_host_tab
{ Fl_Input2* o = inp_dccc_host_port = new Fl_Input2(285, 25, 50, 22, _("Port"));
inp_dccc_host_port->tooltip(_("telnet server port"));
inp_dccc_host_port->box(FL_DOWN_BOX);
inp_dccc_host_port->color(FL_BACKGROUND2_COLOR);
inp_dccc_host_port->selection_color(FL_SELECTION_COLOR);
inp_dccc_host_port->labeltype(FL_NORMAL_LABEL);
inp_dccc_host_port->labelfont(0);
inp_dccc_host_port->labelsize(14);
inp_dccc_host_port->labelcolor(FL_FOREGROUND_COLOR);
inp_dccc_host_port->callback((Fl_Callback*)cb_inp_dccc_host_port);
inp_dccc_host_port->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inp_dccc_host_port->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcc_host_port.c_str());
} // Fl_Input2* inp_dccc_host_port
{ Fl_Input2* o = inp_dccc_login = new Fl_Input2(336, 25, 80, 22, _("Login as"));
inp_dccc_login->tooltip(_("login call sign"));
inp_dccc_login->box(FL_DOWN_BOX);
inp_dccc_login->color(FL_BACKGROUND2_COLOR);
inp_dccc_login->selection_color(FL_SELECTION_COLOR);
inp_dccc_login->labeltype(FL_NORMAL_LABEL);
inp_dccc_login->labelfont(0);
inp_dccc_login->labelsize(14);
inp_dccc_login->labelcolor(FL_FOREGROUND_COLOR);
inp_dccc_login->callback((Fl_Callback*)cb_inp_dccc_login);
inp_dccc_login->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inp_dccc_login->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcc_login.c_str());
} // Fl_Input2* inp_dccc_login
{ Fl_Input2* o = inp_dxcc_password = new Fl_Input2(420, 25, 80, 22, _("Password"));
inp_dxcc_password->tooltip(_("Your login password"));
inp_dxcc_password->box(FL_DOWN_BOX);
inp_dxcc_password->color(FL_BACKGROUND2_COLOR);
inp_dxcc_password->selection_color(FL_SELECTION_COLOR);
inp_dxcc_password->labeltype(FL_NORMAL_LABEL);
inp_dxcc_password->labelfont(0);
inp_dxcc_password->labelsize(14);
inp_dxcc_password->labelcolor(FL_FOREGROUND_COLOR);
inp_dxcc_password->callback((Fl_Callback*)cb_inp_dxcc_password);
inp_dxcc_password->align(Fl_Align(FL_ALIGN_TOP_LEFT));
inp_dxcc_password->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcc_password.c_str());
o->type(FL_SECRET_INPUT);
inp_dxcc_password->labelsize(FL_NORMAL_SIZE);
} // Fl_Input2* inp_dxcc_password
{ btnDXCLUSTERpasswordShow = new Fl_Button(503, 25, 22, 22, _("?"));
btnDXCLUSTERpasswordShow->tooltip(_("Show password in plain text"));
btnDXCLUSTERpasswordShow->callback((Fl_Callback*)cb_btnDXCLUSTERpasswordShow);
} // Fl_Button* btnDXCLUSTERpasswordShow
{ Fl_Check_Button* o = btn_dxcc_connect = new Fl_Check_Button(571, 10, 101, 15, _("Connect"));
btn_dxcc_connect->tooltip(_("Connect / Disconnect"));
btn_dxcc_connect->down_box(FL_DOWN_BOX);
btn_dxcc_connect->callback((Fl_Callback*)cb_btn_dxcc_connect);
o->value(progStatus.cluster_connected);
} // Fl_Check_Button* btn_dxcc_connect
{ lbl_dxc_connected = new Fl_Box(540, 17, 20, 20);
lbl_dxc_connected->tooltip(_("Connected State"));
lbl_dxc_connected->box(FL_DIAMOND_DOWN_BOX);
lbl_dxc_connected->color((Fl_Color)55);
lbl_dxc_connected->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Box* lbl_dxc_connected
{ Fl_Check_Button* o = btn_dxc_auto_connect = new Fl_Check_Button(571, 31, 101, 15, _("Auto conn\'"));
btn_dxc_auto_connect->tooltip(_("Connect to host when starting fldigi"));
btn_dxc_auto_connect->down_box(FL_DOWN_BOX);
btn_dxc_auto_connect->callback((Fl_Callback*)cb_btn_dxc_auto_connect);
o->value(progdefaults.dxc_auto_connect);
} // Fl_Check_Button* btn_dxc_auto_connect
btn_select_host->end();
} // Fl_Group* btn_select_host
{ cluster_tabs = new Fl_Tabs(0, 55, 680, 340);
{ tabDXclusterTelNetStream = new Fl_Group(1, 80, 677, 314, _("TelNet stream"));
{ Fl_Group* o = new Fl_Group(2, 82, 676, 276);
o->box(FL_ENGRAVED_FRAME);
{ brws_tcpip_stream = new FTextView(4, 85, 668, 240);
brws_tcpip_stream->tooltip(_("Cluster server command strings"));
brws_tcpip_stream->box(FL_DOWN_FRAME);
brws_tcpip_stream->color(FL_BACKGROUND2_COLOR);
brws_tcpip_stream->selection_color(FL_SELECTION_COLOR);
brws_tcpip_stream->labeltype(FL_NORMAL_LABEL);
brws_tcpip_stream->labelfont(0);
brws_tcpip_stream->labelsize(13);
brws_tcpip_stream->labelcolor(FL_FOREGROUND_COLOR);
brws_tcpip_stream->textfont(13);
brws_tcpip_stream->align(Fl_Align(FL_ALIGN_TOP));
brws_tcpip_stream->when(FL_WHEN_RELEASE);
Fl_Group::current()->resizable(brws_tcpip_stream);
} // FTextView* brws_tcpip_stream
{ Fl_Button* o = dxc_macro_1 = new Fl_Button(4, 331, 80, 22, _("m1"));
dxc_macro_1->tooltip(_("DX cluster macro\\nLeft click execute\\nRight click edit"));
dxc_macro_1->callback((Fl_Callback*)dxc_click_m1);
o->label(progdefaults.dxcm_label_1.c_str());
} // Fl_Button* dxc_macro_1
{ Fl_Button* o = dxc_macro_2 = new Fl_Button(88, 331, 80, 22, _("m2"));
dxc_macro_2->callback((Fl_Callback*)dxc_click_m2);
o->label(progdefaults.dxcm_label_2.c_str());
} // Fl_Button* dxc_macro_2
{ Fl_Button* o = dxc_macro_3 = new Fl_Button(172, 331, 80, 22, _("m3"));
dxc_macro_3->callback((Fl_Callback*)dxc_click_m3);
o->label(progdefaults.dxcm_label_3.c_str());
} // Fl_Button* dxc_macro_3
{ Fl_Button* o = dxc_macro_4 = new Fl_Button(256, 331, 80, 22, _("m4"));
dxc_macro_4->callback((Fl_Callback*)dxc_click_m4);
o->label(progdefaults.dxcm_label_4.c_str());
} // Fl_Button* dxc_macro_4
{ Fl_Button* o = dxc_macro_5 = new Fl_Button(340, 331, 80, 22, _("m5"));
dxc_macro_5->callback((Fl_Callback*)dxc_click_m5);
o->label(progdefaults.dxcm_label_5.c_str());
} // Fl_Button* dxc_macro_5
{ Fl_Button* o = dxc_macro_6 = new Fl_Button(424, 331, 80, 22, _("m6"));
dxc_macro_6->callback((Fl_Callback*)dxc_click_m6);
o->label(progdefaults.dxcm_label_6.c_str());
} // Fl_Button* dxc_macro_6
{ Fl_Button* o = dxc_macro_7 = new Fl_Button(508, 331, 80, 22, _("m7"));
dxc_macro_7->callback((Fl_Callback*)dxc_click_m7);
o->label(progdefaults.dxcm_label_7.c_str());
} // Fl_Button* dxc_macro_7
{ Fl_Button* o = dxc_macro_8 = new Fl_Button(592, 331, 80, 22, _("m8"));
dxc_macro_8->tooltip(_("DX cluster macro\\nLeft click execute\\nRight click edit"));
dxc_macro_8->callback((Fl_Callback*)dxc_click_m8);
o->label(progdefaults.dxcm_label_8.c_str());
} // Fl_Button* dxc_macro_8
o->end();
} // Fl_Group* o
{ inp_dxcluster_cmd = new Fl_Input2(43, 364, 480, 22, _("Cmd:"));
inp_dxcluster_cmd->tooltip(_("Command string"));
inp_dxcluster_cmd->box(FL_DOWN_BOX);
inp_dxcluster_cmd->color(FL_BACKGROUND2_COLOR);
inp_dxcluster_cmd->selection_color(FL_SELECTION_COLOR);
inp_dxcluster_cmd->labeltype(FL_NORMAL_LABEL);
inp_dxcluster_cmd->labelfont(0);
inp_dxcluster_cmd->labelsize(13);
inp_dxcluster_cmd->labelcolor(FL_FOREGROUND_COLOR);
inp_dxcluster_cmd->callback((Fl_Callback*)cb_inp_dxcluster_cmd);
inp_dxcluster_cmd->align(Fl_Align(FL_ALIGN_LEFT));
inp_dxcluster_cmd->when(FL_WHEN_ENTER_KEY);
} // Fl_Input2* inp_dxcluster_cmd
{ btn_cluster_spot = new Fl_Button(527, 364, 70, 22, _("Spot"));
btn_cluster_spot->tooltip(_("Send SPOT string to server"));
btn_cluster_spot->callback((Fl_Callback*)cb_btn_cluster_spot);
} // Fl_Button* btn_cluster_spot
{ btn_cluster_submit = new Fl_Button(602, 364, 70, 22, _("Submit"));
btn_cluster_submit->tooltip(_("Send command to server"));
btn_cluster_submit->callback((Fl_Callback*)cb_btn_cluster_submit);
} // Fl_Button* btn_cluster_submit
tabDXclusterTelNetStream->end();
} // Fl_Group* tabDXclusterTelNetStream
{ tabDXclusterReports = new Fl_Group(1, 80, 673, 314, _("DX Reports"));
tabDXclusterReports->hide();
{ reports_header = new Fl_Browser(3, 84, 671, 20);
reports_header->color(FL_LIGHT2);
reports_header->textfont(4);
reports_header->when(FL_WHEN_NEVER);
} // Fl_Browser* reports_header
{ brws_dx_cluster = new Fl_Browser(3, 104, 671, 260);
brws_dx_cluster->tooltip(_("Left Click to select SPOT"));
brws_dx_cluster->type(2);
brws_dx_cluster->textfont(4);
brws_dx_cluster->callback((Fl_Callback*)cb_brws_dx_cluster);
brws_dx_cluster->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
Fl_Group::current()->resizable(brws_dx_cluster);
} // Fl_Browser* brws_dx_cluster
{ btn_dxc_cluster_clear = new Fl_Button(294, 366, 72, 22, _("Clear"));
btn_dxc_cluster_clear->tooltip(_("Clear parsed data stream"));
btn_dxc_cluster_clear->callback((Fl_Callback*)cb_btn_dxc_cluster_clear);
} // Fl_Button* btn_dxc_cluster_clear
{ Fl_Check_Button* o = brws_order = new Fl_Check_Button(31, 371, 186, 15, _("New entries in first line"));
brws_order->down_box(FL_DOWN_BOX);
brws_order->callback((Fl_Callback*)cb_brws_order);
brws_order->when(FL_WHEN_CHANGED);
o->value(progdefaults.dxc_topline);
} // Fl_Check_Button* brws_order
{ btn_cluster_spot2 = new Fl_Button(585, 368, 70, 22, _("Spot"));
btn_cluster_spot2->tooltip(_("Send SPOT string to server"));
btn_cluster_spot2->callback((Fl_Callback*)cb_btn_cluster_spot2);
} // Fl_Button* btn_cluster_spot2
tabDXclusterReports->end();
} // Fl_Group* tabDXclusterReports
{ tabDXclusterConfig = new Fl_Group(0, 80, 676, 314, _("Config"));
tabDXclusterConfig->tooltip(_("Initialization strings for telnet cluster host"));
tabDXclusterConfig->hide();
{ Fl_Group* o = new Fl_Group(0, 82, 676, 130);
{ Fl_Group* o = new Fl_Group(1, 82, 348, 124);
{ Fl_Browser* o = brws_dxcluster_hosts = new Fl_Browser(5, 100, 278, 100, _("Hosts"));
brws_dxcluster_hosts->type(2);
brws_dxcluster_hosts->textfont(4);
brws_dxcluster_hosts->align(Fl_Align(FL_ALIGN_TOP));
Fl_Group::current()->resizable(brws_dxcluster_hosts);
static int widths[]={o->w()*6/10, o->w()*2/10, o->w()*2/10, 0 };
o->column_widths(widths);
o->column_char(':');
dxcluster_hosts_load();
} // Fl_Browser* brws_dxcluster_hosts
{ Fl_Group* o = new Fl_Group(286, 100, 61, 100);
{ btn_dxcluster_hosts_select = new Fl_Button(290, 106, 54, 19, _("Select"));
btn_dxcluster_hosts_select->tooltip(_("Select highlighted DX cluster host"));
btn_dxcluster_hosts_select->callback((Fl_Callback*)dxcluster_hosts_select);
} // Fl_Button* btn_dxcluster_hosts_select
{ btn_dxcluster_hosts_add = new Fl_Button(290, 128, 54, 19, _("Add"));
btn_dxcluster_hosts_add->tooltip(_("Add current DX cluster host"));
btn_dxcluster_hosts_add->callback((Fl_Callback*)dxcluster_hosts_add);
} // Fl_Button* btn_dxcluster_hosts_add
{ btn_dxcluster_hosts_delete = new Fl_Button(290, 151, 54, 19, _("Delete"));
btn_dxcluster_hosts_delete->tooltip(_("Delete highlighted DX cluster host"));
btn_dxcluster_hosts_delete->callback((Fl_Callback*)dxcluster_hosts_delete);
} // Fl_Button* btn_dxcluster_hosts_delete
{ btn_dxcluster_servers = new Fl_Button(290, 174, 54, 19, _("Srvrs"));
btn_dxcluster_servers->tooltip(_("Server List"));
btn_dxcluster_servers->callback((Fl_Callback*)dxcluster_servers);
} // Fl_Button* btn_dxcluster_servers
{ Fl_Group* o = new Fl_Group(290, 195, 54, 2);
o->end();
Fl_Group::current()->resizable(o);
} // Fl_Group* o
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(350, 82, 325, 103);
{ ed_telnet_cmds = new FTextEdit(354, 100, 248, 80, _("Cluster Server Setup Cmds"));
ed_telnet_cmds->tooltip(_("Cluster server command strings"));
ed_telnet_cmds->box(FL_DOWN_FRAME);
ed_telnet_cmds->color(FL_BACKGROUND2_COLOR);
ed_telnet_cmds->selection_color(FL_SELECTION_COLOR);
ed_telnet_cmds->labeltype(FL_NORMAL_LABEL);
ed_telnet_cmds->labelfont(0);
ed_telnet_cmds->labelsize(14);
ed_telnet_cmds->labelcolor(FL_FOREGROUND_COLOR);
ed_telnet_cmds->textfont(13);
ed_telnet_cmds->align(Fl_Align(FL_ALIGN_TOP));
ed_telnet_cmds->when(FL_WHEN_RELEASE);
Fl_Group::current()->resizable(ed_telnet_cmds);
} // FTextEdit* ed_telnet_cmds
{ Fl_Group* o = new Fl_Group(606, 100, 59, 82);
{ btn_dxcluster_hosts_load_setup = new Fl_Button(610, 106, 54, 19, _("Load"));
btn_dxcluster_hosts_load_setup->tooltip(_("Load Cluster Setup Commands"));
btn_dxcluster_hosts_load_setup->callback((Fl_Callback*)dxcluster_hosts_load_setup);
} // Fl_Button* btn_dxcluster_hosts_load_setup
{ btn_dxcluster_hosts_save_setup = new Fl_Button(610, 128, 54, 19, _("Save"));
btn_dxcluster_hosts_save_setup->tooltip(_("Save Cluster Setup Commands"));
btn_dxcluster_hosts_save_setup->callback((Fl_Callback*)dxcluster_hosts_save_setup);
} // Fl_Button* btn_dxcluster_hosts_save_setup
{ btn_dxcluster_hosts_send_setup = new Fl_Button(610, 151, 54, 19, _("Send"));
btn_dxcluster_hosts_send_setup->tooltip(_("Send Commands to Cluster Server"));
btn_dxcluster_hosts_send_setup->callback((Fl_Callback*)dxcluster_hosts_send_setup);
} // Fl_Button* btn_dxcluster_hosts_send_setup
{ Fl_Group* o = new Fl_Group(610, 174, 54, 2);
o->end();
Fl_Group::current()->resizable(o);
} // Fl_Group* o
o->end();
} // Fl_Group* o
o->end();
} // Fl_Group* o
{ Fl_Check_Button* o = btn_spot_when_logged = new Fl_Check_Button(354, 188, 146, 15, _("Spot when logged"));
btn_spot_when_logged->tooltip(_("Create DX spot when logging contact"));
btn_spot_when_logged->down_box(FL_DOWN_BOX);
btn_spot_when_logged->callback((Fl_Callback*)cb_btn_spot_when_logged);
o->value(progdefaults.spot_when_logged);
} // Fl_Check_Button* btn_spot_when_logged
{ Fl_Check_Button* o = btn_dxc_hertz = new Fl_Check_Button(512, 188, 146, 15, _("Report [0..99 Hz]"));
btn_dxc_hertz->tooltip(_("Add [0..99] Hz WF value to DX report notes"));
btn_dxc_hertz->down_box(FL_DOWN_BOX);
btn_dxc_hertz->callback((Fl_Callback*)cb_btn_dxc_hertz);
o->value(progdefaults.dxc_hertz);
} // Fl_Check_Button* btn_dxc_hertz
o->end();
Fl_Group::current()->resizable(o);
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(0, 218, 676, 174);
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
{ Fl_Group* o = new Fl_Group(1, 218, 307, 170);
{ Fl_Input* o = mlabel_1 = new Fl_Input(5, 238, 80, 22, _("label 1"));
mlabel_1->callback((Fl_Callback*)cb_mlabel_1);
mlabel_1->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.dxcm_label_1.c_str());
} // Fl_Input* mlabel_1
{ Fl_Input2* o = mtext_1 = new Fl_Input2(87, 238, 220, 22, _("macro text"));
mtext_1->box(FL_DOWN_BOX);
mtext_1->color(FL_BACKGROUND2_COLOR);
mtext_1->selection_color(FL_SELECTION_COLOR);
mtext_1->labeltype(FL_NORMAL_LABEL);
mtext_1->labelfont(0);
mtext_1->labelsize(14);
mtext_1->labelcolor(FL_FOREGROUND_COLOR);
mtext_1->callback((Fl_Callback*)cb_mtext_1);
mtext_1->align(Fl_Align(FL_ALIGN_TOP));
mtext_1->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcm_text_1.c_str());
} // Fl_Input2* mtext_1
{ Fl_Input* o = mlabel_2 = new Fl_Input(5, 278, 80, 22, _("label 2"));
mlabel_2->callback((Fl_Callback*)cb_mlabel_2);
mlabel_2->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.dxcm_label_2.c_str());
} // Fl_Input* mlabel_2
{ Fl_Input2* o = mtext_2 = new Fl_Input2(87, 278, 220, 22);
mtext_2->box(FL_DOWN_BOX);
mtext_2->color(FL_BACKGROUND2_COLOR);
mtext_2->selection_color(FL_SELECTION_COLOR);
mtext_2->labeltype(FL_NORMAL_LABEL);
mtext_2->labelfont(0);
mtext_2->labelsize(14);
mtext_2->labelcolor(FL_FOREGROUND_COLOR);
mtext_2->callback((Fl_Callback*)cb_mtext_2);
mtext_2->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
mtext_2->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcm_text_2.c_str());
} // Fl_Input2* mtext_2
{ Fl_Input* o = mlabel_3 = new Fl_Input(5, 318, 80, 22, _("label 3"));
mlabel_3->callback((Fl_Callback*)cb_mlabel_3);
mlabel_3->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.dxcm_label_3.c_str());
} // Fl_Input* mlabel_3
{ Fl_Input2* o = mtext_3 = new Fl_Input2(87, 318, 220, 22);
mtext_3->box(FL_DOWN_BOX);
mtext_3->color(FL_BACKGROUND2_COLOR);
mtext_3->selection_color(FL_SELECTION_COLOR);
mtext_3->labeltype(FL_NORMAL_LABEL);
mtext_3->labelfont(0);
mtext_3->labelsize(14);
mtext_3->labelcolor(FL_FOREGROUND_COLOR);
mtext_3->callback((Fl_Callback*)cb_mtext_3);
mtext_3->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
mtext_3->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcm_text_3.c_str());
} // Fl_Input2* mtext_3
{ Fl_Input* o = mlabel_4 = new Fl_Input(5, 358, 80, 22, _("label 4"));
mlabel_4->callback((Fl_Callback*)cb_mlabel_4);
mlabel_4->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.dxcm_label_4.c_str());
} // Fl_Input* mlabel_4
{ Fl_Input2* o = mtext_4 = new Fl_Input2(87, 358, 220, 22);
mtext_4->box(FL_DOWN_BOX);
mtext_4->color(FL_BACKGROUND2_COLOR);
mtext_4->selection_color(FL_SELECTION_COLOR);
mtext_4->labeltype(FL_NORMAL_LABEL);
mtext_4->labelfont(0);
mtext_4->labelsize(14);
mtext_4->labelcolor(FL_FOREGROUND_COLOR);
mtext_4->callback((Fl_Callback*)cb_mtext_4);
mtext_4->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
mtext_4->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcm_text_4.c_str());
} // Fl_Input2* mtext_4
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(308, 218, 307, 170);
{ Fl_Input* o = mlabel_5 = new Fl_Input(310, 237, 80, 22, _("label 5"));
mlabel_5->callback((Fl_Callback*)cb_mlabel_5);
mlabel_5->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.dxcm_label_5.c_str());
} // Fl_Input* mlabel_5
{ Fl_Input2* o = mtext_5 = new Fl_Input2(391, 237, 220, 22, _("macro text"));
mtext_5->box(FL_DOWN_BOX);
mtext_5->color(FL_BACKGROUND2_COLOR);
mtext_5->selection_color(FL_SELECTION_COLOR);
mtext_5->labeltype(FL_NORMAL_LABEL);
mtext_5->labelfont(0);
mtext_5->labelsize(14);
mtext_5->labelcolor(FL_FOREGROUND_COLOR);
mtext_5->callback((Fl_Callback*)cb_mtext_5);
mtext_5->align(Fl_Align(FL_ALIGN_TOP));
mtext_5->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcm_text_5.c_str());
} // Fl_Input2* mtext_5
{ Fl_Input* o = mlabel_6 = new Fl_Input(310, 277, 80, 22, _("label 6"));
mlabel_6->callback((Fl_Callback*)cb_mlabel_6);
mlabel_6->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.dxcm_label_6.c_str());
} // Fl_Input* mlabel_6
{ Fl_Input2* o = mtext_6 = new Fl_Input2(391, 277, 220, 22);
mtext_6->box(FL_DOWN_BOX);
mtext_6->color(FL_BACKGROUND2_COLOR);
mtext_6->selection_color(FL_SELECTION_COLOR);
mtext_6->labeltype(FL_NORMAL_LABEL);
mtext_6->labelfont(0);
mtext_6->labelsize(14);
mtext_6->labelcolor(FL_FOREGROUND_COLOR);
mtext_6->callback((Fl_Callback*)cb_mtext_6);
mtext_6->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
mtext_6->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcm_text_6.c_str());
} // Fl_Input2* mtext_6
{ Fl_Input* o = mlabel_7 = new Fl_Input(310, 317, 80, 22, _("label 7"));
mlabel_7->callback((Fl_Callback*)cb_mlabel_7);
mlabel_7->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.dxcm_label_7.c_str());
} // Fl_Input* mlabel_7
{ Fl_Input2* o = mtext_7 = new Fl_Input2(391, 317, 220, 22);
mtext_7->box(FL_DOWN_BOX);
mtext_7->color(FL_BACKGROUND2_COLOR);
mtext_7->selection_color(FL_SELECTION_COLOR);
mtext_7->labeltype(FL_NORMAL_LABEL);
mtext_7->labelfont(0);
mtext_7->labelsize(14);
mtext_7->labelcolor(FL_FOREGROUND_COLOR);
mtext_7->callback((Fl_Callback*)cb_mtext_7);
mtext_7->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
mtext_7->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcm_text_7.c_str());
} // Fl_Input2* mtext_7
{ Fl_Input* o = mlabel_8 = new Fl_Input(310, 357, 80, 22, _("label 8"));
mlabel_8->callback((Fl_Callback*)cb_mlabel_8);
mlabel_8->align(Fl_Align(FL_ALIGN_TOP));
o->value(progdefaults.dxcm_label_8.c_str());
} // Fl_Input* mlabel_8
{ Fl_Input2* o = mtext_8 = new Fl_Input2(391, 357, 220, 22);
mtext_8->box(FL_DOWN_BOX);
mtext_8->color(FL_BACKGROUND2_COLOR);
mtext_8->selection_color(FL_SELECTION_COLOR);
mtext_8->labeltype(FL_NORMAL_LABEL);
mtext_8->labelfont(0);
mtext_8->labelsize(14);
mtext_8->labelcolor(FL_FOREGROUND_COLOR);
mtext_8->callback((Fl_Callback*)cb_mtext_8);
mtext_8->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
mtext_8->when(FL_WHEN_RELEASE);
o->value(progdefaults.dxcm_text_8.c_str());
} // Fl_Input2* mtext_8
o->end();
} // Fl_Group* o
{ btn_dxcluster_ar_help = new Fl_Button(618, 230, 56, 22, _("AR ?"));
btn_dxcluster_ar_help->tooltip(_("AR Commands"));
btn_dxcluster_ar_help->callback((Fl_Callback*)dxcluster_ar_help);
} // Fl_Button* btn_dxcluster_ar_help
{ btn_dxcluster_cc_help = new Fl_Button(618, 272, 56, 22, _("CC ?"));
btn_dxcluster_cc_help->tooltip(_("CC Commands"));
btn_dxcluster_cc_help->callback((Fl_Callback*)dxcluster_cc_help);
} // Fl_Button* btn_dxcluster_cc_help
{ btn_dxcluster_dx_help = new Fl_Button(618, 315, 56, 22, _("DX ?"));
btn_dxcluster_dx_help->tooltip(_("Spider Commands"));
btn_dxcluster_dx_help->callback((Fl_Callback*)dxcluster_dx_help);
} // Fl_Button* btn_dxcluster_dx_help
o->end();
} // Fl_Group* o
tabDXclusterConfig->end();
} // Fl_Group* tabDXclusterConfig
{ tabDXclusterHelp = new Fl_Group(1, 80, 675, 314, _("Help"));
tabDXclusterHelp->hide();
{ brws_dxc_help = new FTextView(3, 84, 673, 281);
brws_dxc_help->tooltip(_("Cluster server command strings"));
brws_dxc_help->box(FL_DOWN_FRAME);
brws_dxc_help->color(FL_BACKGROUND2_COLOR);
brws_dxc_help->selection_color(FL_SELECTION_COLOR);
brws_dxc_help->labeltype(FL_NORMAL_LABEL);
brws_dxc_help->labelfont(0);
brws_dxc_help->labelsize(13);
brws_dxc_help->labelcolor(FL_FOREGROUND_COLOR);
brws_dxc_help->textfont(13);
brws_dxc_help->align(Fl_Align(FL_ALIGN_TOP));
brws_dxc_help->when(FL_WHEN_RELEASE);
Fl_Group::current()->resizable(brws_dxc_help);
} // FTextView* brws_dxc_help
{ btn_dxc_help_query = new Fl_Button(441, 368, 70, 22, _("Get Help"));
btn_dxc_help_query->tooltip(_("Get WWV sunspot events"));
btn_dxc_help_query->callback((Fl_Callback*)cb_btn_dxc_help_query);
} // Fl_Button* btn_dxc_help_query
{ inp_help_string = new Fl_Input2(265, 368, 172, 22, _("Help on:"));
inp_help_string->tooltip(_("Leave blank for general help\nEnter subject, e.g. DX"));
inp_help_string->box(FL_DOWN_BOX);
inp_help_string->color(FL_BACKGROUND2_COLOR);
inp_help_string->selection_color(FL_SELECTION_COLOR);
inp_help_string->labeltype(FL_NORMAL_LABEL);
inp_help_string->labelfont(0);
inp_help_string->labelsize(13);
inp_help_string->labelcolor(FL_FOREGROUND_COLOR);
inp_help_string->callback((Fl_Callback*)cb_inp_help_string);
inp_help_string->align(Fl_Align(FL_ALIGN_LEFT));
inp_help_string->when(FL_WHEN_ENTER_KEY);
} // Fl_Input2* inp_help_string
{ btn_dxc_help_clear = new Fl_Button(517, 368, 71, 22, _("Clear"));
btn_dxc_help_clear->tooltip(_("Clear help panel"));
btn_dxc_help_clear->callback((Fl_Callback*)cb_btn_dxc_help_clear);
} // Fl_Button* btn_dxc_help_clear
tabDXclusterHelp->end();
} // Fl_Group* tabDXclusterHelp
cluster_tabs->end();
Fl_Group::current()->resizable(cluster_tabs);
} // Fl_Tabs* cluster_tabs
o->end();
} // Fl_Double_Window* o
return w;
}
| 36,227
|
C++
|
.cxx
| 721
| 41.345354
| 118
| 0.606209
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,145
|
arc-help.cxx
|
w1hkj_fldigi/src/dxcluster/arc-help.cxx
|
std::string arc_commands = "\
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 5.0//EN\">\n\
<html>\n\
<head>\n\
<meta http-equiv=\"Content-Type\" content=\"text/html;\">\n\
<title>AR Commands</title>\n\
</head>\n\
<body style=\"tab-interval:.5in\" lang=\"EN-US\">\n\
<div class=\"Section1\">\n\
<h2><span style=\"font-family:Verdana;color:blue\">Overview of\n\
AR-Cluster User\n\
Commands<span style=\"mso-spacerun: yes\"></span></span><span\n\
style=\"font-family:Verdana;\n\
color:blue\"></h2>\n\
<p><span\n\
style=\"font-family:Verdana\">The\n\
following list is a summary of AR-Cluster commands.<span\n\
style=\"mso-spacerun:\n\
yes\"> </span>The upper case part of the commands is\n\
required and the lower\n\
case part of the command is optional.<span\n\
style=\"mso-spacerun: yes\"> \n\
</span>Thus the command </span><b><span\n\
style=\"color:#993300\">A/F</span></b><span\n\
style=\"font-family:Verdana\"> is the same as the </span><b><span\n\
style=\"color:#993300\">Announce/Full</span></b><span\n\
style=\"font-family:Verdana\"> command.<span\n\
style=\"mso-spacerun: yes\"></span></p>\n\
<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">\n\
<tbody>\n\
<tr>\n\
<td valign=\"top\" width=\"28%\">Announce</td>\n\
<td valign=\"top\" width=\"72%\">Announcement to all locally users</td>\n\
</tr>\n\
<tr>\n\
<td>Announce/Full</td>\n\
<td>Announcement to all users</td>\n\
</tr>\n\
<tr>\n\
<td>Bye</td>\n\
<td>Terminate the connection to the cluster</td>\n\
</tr>\n\
<tr>\n\
<td>CLEAR/QSL</td>\n\
<td>Remove a QSL route from the local QSL database</td>\n\
</tr>\n\
<tr>\n\
<td>CONFErence</td>\n\
<td>Enter a local conference</td>\n\
</tr>\n\
<tr>\n\
<td>CONFErence/Full</td>\n\
<td>Enter a network wide conference</td>\n\
</tr>\n\
<tr>\n\
<td>DB</td>\n\
<td>Built in database information</td>\n\
</tr>\n\
<tr>\n\
<td>DEelete</td>\n\
<td>Delete a mail message</td>\n\
</tr>\n\
<tr>\n\
<td>DIrectroy</td>\n\
<td>List mail messages</td>\n\
</tr>\n\
<tr>\n\
<td>Dx</td>\n\
<td>Enter as DX spot</td>\n\
</tr>\n\
<tr>\n\
<td>Help</td>\n\
<td>Command for help</td>\n\
</tr>\n\
<tr>\n\
<td>List</td>\n\
<td>List mail messages</td>\n\
</tr>\n\
<tr>\n\
<td>Quit</td>\n\
<td>Terminate the connection to the cluster</td>\n\
</tr>\n\
<tr>\n\
<td>Read</td>\n\
<td>Read a mail message</td>\n\
</tr>\n\
<tr>\n\
<td>REPly</td>\n\
<td>Reply to a mail message</td>\n\
</tr>\n\
<tr>\n\
<td>Send</td>\n\
<td>Send a mail message</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/ANNouncements</td>\n\
<td>Turn on announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/BEep</td>\n\
<td>Turn on a beep for DX and Announcement spots</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/DX_Announcements</td>\n\
<td>Activate DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/DXSqth</td>\n\
<td>Turn on the display of the spotter QTH</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/EMAIL</td>\n\
<td>Set your Internet email address</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/FILTER</td>\n\
<td>Set the spot filters</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/HEre</td>\n\
<td>Let others know you are at your station</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/HOMenode</td>\n\
<td>Set your home node</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/LOCAtion</td>\n\
<td>Set the location (lat/lon) of your station</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/LOGIN_announcements</td>\n\
<td>Show user logins</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/Name</td>\n\
<td>Set your name</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NOAnnouncements</td>\n\
<td>Turn off announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NOBeep</td>\n\
<td>Turn off the beep for DX and Announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NODX_Announcements</td>\n\
<td>Turn off DX announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NODXSqth</td>\n\
<td>Turn off the display of the spotter QTH</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NOHere</td>\n\
<td>Indicate you are away from your station</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NOLOGin_announcements</td>\n\
<td>Turn off login announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NOTalk</td>\n\
<td>Turn off the display of talk messages</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NOWWV_announcements</td>\n\
<td>Turn off the display of WWV spots</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/NOWX_announcements</td>\n\
<td>Turn off the display of weather announcements</td>\n\
</tr>\n\
<tr>\n\
<td>Set/PHONE</td>\n\
<td>Set your phone number</td>\n\
</tr>\n\
<tr>\n\
<td>Set/QRA</td>\n\
<td>Set the QRA for your station</td>\n\
</tr>\n\
<tr>\n\
<td>Set/QSL</td>\n\
<td>Add a QSL route to the local database</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/QTH</td>\n\
<td>Set your location (city, etc)</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/TAlk</td>\n\
<td>Turn on the display of talk messages</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/WWV_announcements</td>\n\
<td>Turn on the display of WWV spots</td>\n\
</tr>\n\
<tr>\n\
<td>SEt/WX_announcements</td>\n\
<td>Turn on the display of weather announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/ANnounce</td>\n\
<td>Show previous announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/ARCHive</td>\n\
<td>Show the files in the archive folder</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/BUCmaster</td>\n\
<td>Show callbook information for a specified callsign</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/BULLEtins</td>\n\
<td>Show the files in the bulletins folder</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/CBA</td>\n\
<td>Show callbook information for a specified callsign</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/CLuster</td>\n\
<td>Show the configuration of the cluster</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Configuration</td>\n\
<td>Show the users on the node</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Dx</td>\n\
<td>Show previous DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Dx SQL</td>\n\
<td>Query for past DX using SQL</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/EMAIL</td>\n\
<td>Show a users Internet email address</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/FDx</td>\n\
<td>Display a formatted SH/DX command</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/FILEs</td>\n\
<td>Show the files in the files folder</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/FILTER</td>\n\
<td>Shows the current DX spot filters</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/FITu</td>\n\
<td>Display a formatted SH/ITU</td>\n\
</tr>\n\
<tr>\n\
<td>#Formatted\">SHow/FZOne</td>\n\
<td>Display a formatted SH/ZONE</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Grid</td>\n\
<td>Show the MaidenHead grid locator for a station</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/HAM</td>\n\
<td>Show callbook information for a specified callsign</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Heading</td>\n\
<td>Show the heading and distance to a station</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/HOMEnode</td>\n\
<td>Show a users homenode</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/ITu</td>\n\
<td>Show past DX based on a ITU zone</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/LOCation</td>\n\
<td>Show the location (lat/lon) of a station</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/LOG</td>\n\
<td>Show the node logins for a call</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Muf</td>\n\
<td>Show the MUF for a country</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/NEeds</td>\n\
<td>Show the CTY needs for a station</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/NOdes</td>\n\
<td>Displays a list of nodes in the network</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Prefix</td>\n\
<td>Show the prefix information for a call</td>\n\
</tr>\n\
<tr>\n\
<td>Show/QRA</td>\n\
<td>Show the station QRA</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Qsl</td>\n\
<td>Show QSL information for a call</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/STation</td>\n\
<td>Show detail information for a call</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Sun</td>\n\
<td>Show the sunrise/sunset for a location</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/TAlk</td>\n\
<td>Show past talk messages</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/TIme</td>\n\
<td>Show the time </td>\n\
</tr>\n\
<tr>\n\
<td>SHow/TIP</td>\n\
<td>Show a tip about using the cluster</td>\n\
</tr>\n\
<tr>\n\
<td>Show/UPTime</td>\n\
<td>Shows the uptime for the node</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Users</td>\n\
<td>Show the users connected to the node</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Version</td>\n\
<td>Shows the AR-Cluster software version</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/WWv</td>\n\
<td>Shows past WWV information</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/WX</td>\n\
<td>Show past weather announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/WXStation</td>\n\
<td>Show data from an optional weather station</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/Zone</td>\n\
<td>Show past DX based on a CQ zone</td>\n\
</tr>\n\
<tr>\n\
<td>Talk</td>\n\
<td>Talk to a station</td>\n\
</tr>\n\
<tr>\n\
<td>Talk/Timestamp</td>\n\
<td>Talk to a station with a timestamp</td>\n\
</tr>\n\
<tr>\n\
<td>Type/ARChive</td>\n\
<td>Display a file in the archive folder</td>\n\
</tr>\n\
<tr>\n\
<td>Type/BULletins</td>\n\
<td>Display a file in the bulletin folder</td>\n\
</tr>\n\
<tr>\n\
<td>Type/FILes</td>\n\
<td>Display a file in the files folder</td>\n\
</tr>\n\
<tr>\n\
<td>Wwv</td>\n\
<td>Send a WWV spot to the cluster</td>\n\
</tr>\n\
<tr>\n\
<td>WX</td>\n\
<td>Make a local weather announcement</td>\n\
</tr>\n\
<tr>\n\
<td>WX/Full</td>\n\
<td>Make a weather announcement to the network</td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</div>\n\
</body>\n\
</html>";
| 9,017
|
C++
|
.cxx
| 399
| 21.598997
| 74
| 0.64609
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,146
|
DXClusterServers.cxx
|
w1hkj_fldigi/src/dxcluster/DXClusterServers.cxx
|
std::string dxcc_servers = "\
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n\
<html>\n\
<head>\n\
<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n\
<title>DX Cluster Servers</title>\n\
</head>\n\
<body>\n\
<center><h2>DX Cluster Servers</h2></center>\n\
<table border=\"\" cellpadding=\"3\" align=\"center\">\n\
<tbody>\n\
<tr align=\"center\">\n\
<th>Call</th>\n\
<th>Domain Name/<br>IP address</th>\n\
<th>login</th>\n\
<th>comment</th>\n\
<th>Software, Location, etc.</th>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>NC7J Skimmer + Spots</td>\n\
<td><a href=\"telnet://dxc.nc7j.com\">dxc.nc7j.com</a><br>(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">NC7J AR-Cluster (Syracuse, UT, DN31xb);\n\
Sysop: <a href=\"mailto:m.matthew.george@gmail.com\">NG7M</a>\n\
and W7CT; default is North American spots. Filters may be\n\
adjusted to enable and filter skimmer spots to your\n\
preference by connecting callsign; for details see \n\
<a href=\"http://docs.google.com/document/d/198y2tB_lLSmDfjGqfE3u6YHt8uqvwwatvTwRm7Fauyo/edit\">\n\
NG7M Connection and Filter Guide</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>NC7J Direct CW Skimmer</td>\n\
<td><a href=\"telnet://dxc.nc7j.com:7300\">dxc.nc7j.com:7300</a><br>(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">Telnet access to NC7J's CW Skimmer (Syracuse, UT, DN31xb)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>NC7J Direct RTTY Skimmer</td>\n\
<td><a href=\"telnet://dxc.nc7j.com:7200\">dxc.nc7j.com:7200</a><br> (dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">Telnet access to NC7J's RTTY Skimmer (Syracuse, UT, DN31xb)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>DL4RCK DigiMode Skimmer</td>\n\
<td><a href=\"telnet://dl4rck.ham-radio-op.net:8000\">dl4rck.ham-radio-op.net:8000</a>\n\
<br>(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">Telnet access to DL4RCK's Digital Skimmer-Cluster</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W1AAA</td>\n\
<td><a href=\"telnet://dxusa.net:7300\">dxusa.net:7300</a><br>\n\
<a href=\"telnet:65.172.152.29:7300\">65.172.152.29:7300</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"http://dxusa.net/\">W1AAA</a> DX Spider (Ledyard, CT), \n\
<a href=\"mailto:W1AN@ctspectrum.com\">W1AN</a>(Sysop)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:k1aj@bellatlantic.net\">K1AJ</a></td>\n\
<td><a href=\"telnet://k1aj.mine.nu:7300\">k1aj.mine.nu:7300</a>\n\
<br>(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">K1AJ DXSpider (Boston MA)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:nn1d@comcast.net\">NN1D</a></td>\n\
<td><a href=\"telnet://nn1d.dyndns.org:7300\">K1RFI.com:7300</a>\n\
<br>(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">NN1D DXSpider Cluster (Swansea, MA)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>K1EU</td>\n\
<td><a href=\"telnet://k1eu.dynip.com\">k1eu.dynip.com</a><br>\n\
</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">K1EU AR-Cluster (Scarborough, ME)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:w1gq@adelphia.net\">W1GQ</a></td>\n\
<td><a href=\"telnet://dx.w1gq.net\">dx.w1gq.net</a>\n\
<br>(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">W1GQ AR-Cluster (Londonderry NH); Skimmer\n\
capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:sysop@w1nr.net\">W1NR</a></td>\n\
<td><a href=\"telnet://dx.w1nr.net\">dx.w1nr.net</a><br>\n\
<a href=\"telnet://173.255.227.205\">173.255.227.205</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">W1NR DXSpider (Marlborough, MA); Yankee Clipper Contest Club spotting network; also accessible through \n\
<a href=\"http://www.w1nr.net/cgi-bin/spider.cgi\">\n\
Java applet</a> (close applet using \"File\" drop-down menu); NTP\n\
server also available: timelord.w1nr.net</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:sysop@w1nr.net\">W1NR-8</a></td>\n\
<td><a href=\"telnet://usdx.w1nr.net\">usdx.w1nr.net</a><br>\n\
<a href=\"telnet://173.255.232.93\">173.255.232.93</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">W1NR DXSpider (Marlborough, MA); Yankee\n\
Clipper Contest Club spotting network; default filters set\n\
to only display spots from callsigns in zones 1-8</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://dxc.ww1r.com/scripts/spider.cgi\">WW1R-9</a></td>\n\
<td><a href=\"telnet://dxc.ww1r.com:7300\">dxc.ww1r.com:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"> Dx-Spider (Newton, NC); Sysop: <a\n\
href=\"mailto:kevin@w1ngl.us\">WW1R</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://www.k1ttt.net\">K1TTT</a></td>\n\
<td><a href=\"telnet://k1ttt.net:7373\">k1ttt.net:7373</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"http://www.yccc.org/\">YCCC</a>\n\
AR-Cluster (Peru, MA); Skimmer capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:wc2l@wc2l.com\">WC2L</a></td>\n\
<td><a href=\"telnet://dxc.wc2l.com\">dxc.wc2l.com</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">WC2L AR-Cluster (Niskayuna, NY); <a\n\
href=\"http://dxc.wc2l.com/\">Web access</a>; Skimmer\n\
capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>K2LS</td>\n\
<td><a href=\"telnet://dxc.k2ls.com\">dxc.k2ls.com</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">K2LS DXSpider (Greensboro, NC); spots from CQ\n\
Zones 1-8 (NA) only</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>AA2MF</td>\n\
<td><a href=\"telnet://dxc.aa2mf.net\">dxc.aa2mf.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">AA2MF AR-Cluster (Staten Island, NY)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>WB3FFV</td>\n\
<td><a href=\"telnet://dxc.wb3ffv.us:7300\">dxc.wb3ffv.us:7300</a><br>\n\
(static IP)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">WB3FFV DX-Spider (Abingdon, MD); reachable\n\
with either IPv4 or v6</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W3LPL</td>\n\
<td><a href=\"telnet://w3lpl.net:7373\">w3lpl.net:7373</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">W3LPL AR-Cluster, version 6 (Glenwood, MD)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W3LPL</td>\n\
<td><a href=\"telnet://dxc.w3lpl.net:7373\">dxc.w3lpl.net:7373</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td>Can include Skimmer spots</td>\n\
<td align=\"left\">W3LPL AR-Cluster, version 6 (Glenwood, MD)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:k3lr@k3lr.com\">K3LR</a></td>\n\
<td><a href=\"telnet:dx.k3lr.com\">dx.k3lr.com</a><br>\n\
<a href=\"telnet://75.185.154.114\">75.185.154.114</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"http://dx.k3lr.com/WebCluster/\">K3LR\n\
AR-Cluster</a>, West Midddlesex, PA; (<a\n\
href=\"http://www.northcoastcontesters.com/\">North Coast\n\
Contesters</a>)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>WD4IXD</td>\n\
<td><a href=\"telnet://dxc.wd4ixd.net\">dxc.wd4ixd.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">WD4IXD AR-Cluster (Clermont, FL); Sysop: <a\n\
href=\"mailto:pfountain@direcway.com\">WD4IXD</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>WC4J</td>\n\
<td><a href=\"telnet://dxc.wc4j.net\">dxc.wc4j.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">WC4J AR-Cluster (Nokesville, VA)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W4ML</td>\n\
<td><a href=\"telnet://dxc.w4ml.net\">dxc.w4ml.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">W4ML AR-Cluster (Montpelier, VA (FM17du))</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a\n\
href=\"http://skcc.matrixlist.com/geeklog/public_html/index.php\">AI4OF</a></td>\n\
<td><a href=\"telnet://skcc.matrixlist.com:7300\">skcc.matrixlist.com:7300</a><br>\n\
<a href=\"telnet://208.111.3.150:7300\">208.111.3.150:7300</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">AI4OF-SKCC DX-Spider (Orlando, FL); Sysop: <a\n\
href=\"mailto:philb@philb.us\">AI4OF</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>K4ZR</td>\n\
<td><a href=\"telnet://k4zr.no-ip.org:7300\">k4zr.no-ip.org:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">K4ZR DX Spider (Huntsville, AL); Sysop: <a\n\
href=\"mailto:AA4U@mchsi.com\">AA4U</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>KY4XX</td>\n\
<td><a href=\"telnet://dxc.ky4xx.com:7300\">dxc.ky4xx.com:7300</a><br>\n\
198.73.30.100</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">KY4XX DX Spider (Louisville, KY) - Kentucky\n\
DX Association; Sysop: <a href=\"mailto:dave@n8zfm.com\">N8ZFM</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>K5DX</td>\n\
<td> <br>\n\
<a href=\"telnet://75.148.198.113\">75.148.198.113</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"http://www.tdxs.net/\">Texas DX\n\
Society</a> AR-Cluster (Houston, TX); Sysop: <a\n\
href=\"mailto:wb5tuf@earthlink.net\">WB5TUF</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:n5in@digikey.com\">AE5E</a></td>\n\
<td><a href=\"telnet://dxspots.com\">dxspots.com</a><br>\n\
<a href=\"telnet://204.221.76.52\">204.221.76.52</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"http://www.dxspots.com\">AE5A\n\
CC-Cluster</a> (Thief River Falls, MN); Skimmer capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:tgerdes@freemarkets.com\">AB5K</a></td>\n\
<td><a href=\"telnet://dxc.ab5k.net\">dxc.ab5k.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td>Worldwide spots</td>\n\
<td align=\"left\">AB5K AR-Cluster (Holland, TX); Skimmer\n\
capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:tgerdes@freemarkets.com\">AB5K-2</a></td>\n\
<td><a href=\"telnet://dxc-us.ab5k.net\">dxc-us.ab5k.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td>US spots only</td>\n\
<td align=\"left\">AB5K AR-Cluster (Holland, TX); Skimmer\n\
capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://www.k5rlm.com/\">K5RLM</a></td>\n\
<td><a href=\"telnet://usrdude.webhop.net:7300\">usrdude.webhop.net:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Charleston AR); <a\n\
href=\"mailto:usrdude@centurytel.net\">K5RLM</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N5UXT</td>\n\
<td><a href=\"telnet://dxc.n5uxt.org\">dxc.n5uxt.org</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td>RF access on 145.010</td>\n\
<td align=\"left\">N5UXT DX-Cluster (New Orleans, LA)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:wright-s@comcast.net\">W6CUA</a></td>\n\
<td><a href=\"telnet://w6cua.no-ip.org:7300\">w6cua.no-ip.org:7300</a><br>\n\
(dynamically assigned</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">AR-Cluster (Castro Valley, CA)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:hshore@socal.rr.com\">K6EXO</a></td>\n\
<td><a href=\"telnet://k6exo.dyndns.org:7300\">k6exo.dyndns.org:7300</a><br>\n\
(dynamically assigned</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Los Angeles, CA)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:w6kk@earthlink.net\">W6KK</a></td>\n\
<td><a href=\"telnet://w6kk.zapto.org:7300\">w6kk.zapto.org:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Alta Loma, CA); <a\n\
href=\"http://www.scdxc.org/\">Southern CA DX Club</a>; USA\n\
and VE spots only</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W6RFU</td>\n\
<td><a href=\"telnet://ucsbdx.ece.ucsb.edu:7300\">ucsbdx.ece.ucsb.edu:7300</a><br>\n\
<a href=\"telnet://128.111.56.240:7300\">128.111.56.240:7300</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">W6RFU DX Spider (Santa Barbara, CA); Sysop: <a\n\
href=\"mailto:n6ws@n6ws.com\">N6WS</a>; CQ Zones 1-5 spots\n\
only</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N6WS-6</td>\n\
<td><a href=\"telnet://n6ws.no-ip.org:7300\">n6ws.no-ip.org:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Nipomo, CA); Sysop: <a\n\
href=\"mailto:n6ws@n6ws.com\">N6WS</a>; worldwide spots</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>K7EK</td>\n\
<td><a href=\"telnet://www.k7ek.net:9000\">www.k7ek.net:9000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">K7EK DX Spider (Spanaway, WA CN87tb); Sysop:\n\
<a href=\"mailto:gary.k7ek@gmail.com\">K7EK</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N7OD</td>\n\
<td><a href=\"telnet://n7od.pentux.net\">n7od.pentux.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">N7OD AR-Cluster (Hemet, CA); Sysop: <a\n\
href=\"mailto:n7od@pentux.net\">N7OD</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>NL7S</td>\n\
<td><a href=\"telnet://nl7s.net:8000\">nl7s.net:8000</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">NL7S DX Spider (Wasilla, AK); Sysop: <a\n\
href=\"mailto:NL7S@arrl.net\">NL7S</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N7XY</td>\n\
<td><a href=\"telnet://n7xy.net:7300\">n7xy.net:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">N7XY DXSpider (Bainbridge Island, WA); Sysop:\n\
<a href=\"mailto:nielsen@oz.net\">N7XY</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>NK7Z</td>\n\
<td><a href=\"telnet://nk7z-cluster.ddns.net:7373\">nk7z-cluster.ddns.net:7373</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">NK7Z AR-Cluster (Eugene, OR); Sysop: <a\n\
href=\"mailto:cluster@nk7z.net\">NK7Z</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N8NOE</td>\n\
<td><a href=\"telnet://n8noe.us\">n8noe.us</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">N8NOE AR DX Cluster, Waterford, MI</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N8NOE</td>\n\
<td><a href=\"telnet://n8noe.us:7373\">n8noe.us:7373</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">N8NOE AR CW SKimmer, Waterford, MI; Skimmer\n\
capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W9AEK</td>\n\
<td><a href=\"telnet://dx.svs.com:7300\">dx.svs.com:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">W9AEK DXSpider; Lisle, IL; Sysop: <a\n\
href=\"mailto:ken@svs.com\">W9AEK</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N9AI</td>\n\
<td><a href=\"telnet://n9ai.no-ip.org\">n9ai.no-ip.org</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">N9AI AR-Cluster; Green Bay, WI; Sysop: <a\n\
href=\"mailto:n9ai@arrl.net\">N9AI</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N9BC</td>\n\
<td><a href=\"telnet://dxc.n9bc.com:7300\">dxc.n9bc.com:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">N9BC DXSpider; Appleton, WI (EN54xl); Sysop:\n\
<a href=\"mailto:bcrier@gmail.com\">N9BC</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W9BG</td>\n\
<td><a href=\"telnet://w9bg.com\">w9bg.com</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td>No Skimmer</td>\n\
<td align=\"left\">W9BG AR-Cluster; Madison DX Club, Madison, WI</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W9BG</td>\n\
<td><a href=\"telnet://w9bg.com:7373\">w9bg.com:7373</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td>w/ Skimmer</td>\n\
<td align=\"left\">W9BG AR-Cluster; Madison DX Club, Madison,\n\
WI; Skimmer capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>NX9G</td>\n\
<td><a href=\"telnet://dxc.f2f.us:7300\">dxc.f2f.us:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td>ipv6 2607:f978:5:8001::1</td>\n\
<td align=\"left\">NX9G DXSpider, Bensenville, IL; Sysop: <a\n\
href=\"mailto:samy_b1@shell4you.net\">NX9G</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>N9KT</td>\n\
<td><a href=\"telnet://n9kt.homenet.org:8000\">n9kt.homenet.org:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">N9KT DXSpider, Indianapolis, IN; Sysop: <a\n\
href=\"mailto:davids@mediamachine.com\">N9KT</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>W9ODD</td>\n\
<td><a href=\"telnet://w9odd.bien.mu.edu\">w9odd.bien.mu.edu</a><br>\n\
<a href=\"telnet://134.48.91.173\">134.48.91.173</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"mailto:dean.jeutter@marquette.edu\">K3GGN</a>,\n\
Sysop; Marquette University, Milwaukee, WI,</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:kr9u@arrl.net\">KR9U</a></td>\n\
<td><a href=\"telnet://kr9u.net\">kr9u.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"http://www.qsl.net/fwdxa/\">Fort\n\
Wayne DX Association</a>; Fort Wayne, IN</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:zephd@indy.rr.com\">W9ZRX</a></td>\n\
<td><a href=\"telnet://dxc.w9zrx.net\">dxc.w9zrx.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">W9ZRX AR-Cluster, Westfield, IN<br>\n\
(<a href=\"http://www.hdxcc.org/\">Hoosier DX & Contest\n\
Club</a>)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://www.qsl.net/w0mw/\">W0MW</a></td>\n\
<td><a href=\"telnet://w0mw.dynip.com\">w0mw.dynip.com</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">Kansas City (Olathe, KS) AR-Cluster</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>WA0ROI</td>\n\
<td><a href=\"telnet://wa0roi.no-ip.com\">wa0roi.no-ip.com</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">WA0ROI AR-Cluster (Sheldahl, IA)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>K0WL</td>\n\
<td><a href=\"telnet://k0wl.ddns.net:23\">k0wl.ddns.net:23</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">K0WL AR-Cluster (Urbandale, IA (EN31dp))</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>DB0SPC-7</td>\n\
<td><a href=\"telnet://db0spc.dynv6.net:8000\">db0spc.dynv6.net:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Mainz); Sysop: <a\n\
href=\"mailto:dj6rx@t-online.de\">DJ6RX</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>DB0SUE-7</td>\n\
<td><a href=\"telnet://db0sue.de:8000\">db0sue.de:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Flensburg); Sysop: <a\n\
href=\"mailto:dk2zz@arrl.net\">DK2ZZ</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>DL9GTB</td>\n\
<td><a href=\"telnet://cluster.dl9gtb.de:8000\">cluster.dl9gtb.de:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"malto:torsten-ernst@web.de\">DL9GTB</a>\n\
AR Cluster (Nossendorf); Skimmer capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>EA4RCH</td>\n\
<td><a href=\"telnet://dxfun.com:8000\">dxfun.com:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">EA4RCH DX Spider (Madrid)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:ea4ure@ure.es\">EA4URE</a></td>\n\
<td><a href=\"telnet://eadx.org\">eadx.org</a><br>\n\
<a href=\"telnet://213.97.191.228\">213.97.191.228</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">Sysop: EA5BZ</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>EA7URC-5<br>\n\
ED7ZAB-5</td>\n\
<td><a href=\"telnet://dx.ea7urc.org:8000\">dx.ea7urc.org:8000</a><br>\n\
<a href=\"telnet://150.214.111.198:8000\">150.214.111.198:8000</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider; Sysop: <a\n\
href=\"mailto:urc.sysop@gmail.com\">EA7URC</a> (Cordoba)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>EI7MRE</td>\n\
<td><a href=\"telnet://ei7mre.ath.cx:7300\">ei7mre.ath.cx:7300</a><br>\n\
</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider; Sysop: <a\n\
href=\"mailto:ei6iz.brendan@gmail.com\">EI6IZ</a> (Co Mayo -\n\
IO53hu)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://gb7dxg.shacknet.nu/\">GB7DXG</a></td>\n\
<td><a href=\"telnet://gb7dxg.shacknet.nu:7300\">gb7dxg.shacknet.nu:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider Cluster (St Andrew's, Guernsey);\n\
Sysop: <a href=\"mailto:gu6efb@cwgsy.net\">GU6EFB</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://www.gb7mbc.net/\">GB7MBC</a></td>\n\
<td><a href=\"telnet://gb7mbc.spoo.org:8000\">gb7mbc.spoo.org:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">GB7MBC DXSpider Cluster (Morecambe,\n\
Lancashire); Sysop: <a href=\"mailto:ian@gb7mbc.net\">G0VGS</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>GB7NHR</td>\n\
<td><a href=\"telnet://gb7nhr.dydns.org:7300\">gb7nhr.dydns.org:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">GB7NHR DXSpider Cluster (Nunsfield House ARG,\n\
Derby); Sysop: G8IYZ</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>HA6DX</td>\n\
<td><a href=\"telnet://dx.hu:9000\">dx.hu:9000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">HA6DX</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IK2DUW-6</td>\n\
<td><a href=\"telnet://dx.arilimbiate.net:7300\">dx.arilimbiate.net:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DxSpider (Limbiate MB); Sysop: <a\n\
href=\"mailto:iw2ohx@iw2ohx.net\">IW2OHX</a> IK2DUW</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IQ4AX-6</td>\n\
<td> <br>\n\
<a href=\"telnet://195.43.189.178:8000\">195.43.189.178:8000</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (ARI Modena); Sysop: <a\n\
href=\"mailto:iz4efn@libero.it\">IZ4EFN</a> (Sysop)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IQ4AX-6</td>\n\
<td> <br>\n\
<a href=\"telnet://195.43.189.178:8000\">195.43.189.178:8000</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (ARI Modena); Sysop: <a\n\
href=\"mailto:iz4efn@libero.it\">IZ4EFN</a> (Sysop)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IK4ICZ-6</td>\n\
<td><a href=\"telnet://ik4icz.dyndns.org:8000\">ik4icz.dyndns.org:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider (Ravenna); Sysop: <a\n\
href=\"mailto:ik4icz@libero.it\">IK4ICZ</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IZ5IIN-6</td>\n\
<td><a href=\"telnet://iz5iin.no-ip.biz:8000\">iz5iin.no-ip.biz:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider (Santa Maria a Monte, Pisa); Sysop:\n\
IZ5IIN</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IK5PWJ-6</td>\n\
<td><a href=\"telnet://ik5pwj-6.dyndns.org:8000\">ik5pwj-6.dyndns.org:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider (Monte Carlo, Lucca); Sysops: <a\n\
href=\"mailto:ik5pwj@gmail.com\">IK5PWJ</a> and I5NOD</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IK7IMO-6</td>\n\
<td><a href=\"telnet://ik7imo.ddns.net:7000\">ik7imo.ddns.net:7000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider Cavallino (LE)); Sysop: <a\n\
href=\"mailto:ik7imo@tele2.it\">IK7IMO</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IK7QLZ-6</td>\n\
<td><a href=\"telnet://ik7qlz.dyndns.org:7000\">ik7qlz.dyndns.org:7000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Taranto); Sysop: <a\n\
href=\"mailto:befree2@tin.it\">IK7QLZ</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IK7UXW</td>\n\
<td><a href=\"telnet://ik7uxw.dyndns.org:7300\">ik7uxw.dyndns.org:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Brindisi); Sysop: <a\n\
href=\"mailto:p.pristipino@virgilio.it\">IK7UXW</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"mailto:ik8hjc@libero.it\">IK8HJC-6</a></td>\n\
<td><a href=\"telnet://ik8hjc.dyndns.org:8000\">ik8hjc.dyndns.org:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Battipaglia, SA)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IK8VRN-6</td>\n\
<td><a href=\"telnet://ik8vrn.dyndns.org:7000\">ik8vrn.dyndns.org:7000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Marigliano, NA); Sysop: <a\n\
href=\"mailto:gian@netgroup.it\">IK8VRN</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IR5AG-6</td>\n\
<td><a href=\"telnet://iz5fsa.duckdns.org:8000\">iz5fsa.duckdns.org:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider Scandicci (FI); Sysop: <a\n\
href=\"mailto:iz5fsa@tele2.it\">IZ5FSA</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IZ7AUH-6</td>\n\
<td><a href=\"telnet://dx.iz7auh.net:8000\">dx.iz7auh.net:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider (Taranto); Sysop: <a\n\
href=\"mailto:iz7auh.frank@virgilio.it\">IZ7AUH</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://www.iz8mbw.net/\">IZ8MBW-6</a></td>\n\
<td><a href=\"telnet://dx.iz8mbw.net:7300\">dx.iz8mbw.net:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider (Napoli); Sysop: <a\n\
href=\"mailto:iz8mbw@gmail.com\">IZ8MBW</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>IT9ESI-6</td>\n\
<td><a href=\"telnet://it9esi.ddns.net:7373\">it9esi.ddns.net:7373</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">IT9ESI-6 DXSpider (Gravina di Catania)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://www.kp4jrs.com/\">KP4JRS</a></td>\n\
<td><a href=\"telnet://kp4jrs.dyndns.org\">kp4jrs.dyndns.org</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Trujillo Alto); Sysop: <a\n\
href=\"mailto:kp4jrs@arrl.net\">KP4JRS</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>OH1RCF</td>\n\
<td><a href=\"telnet://oh1ab.dy.fi:8000\">oh1ab.dy.fi:8000</a><br>\n\
<a href=\"telnet:213.186.225.90:8000\">213.186.225.90:8000</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Pori); Sysops: <a\n\
href=\"mailto:oh1mrr@nic.fi\">OH1MRR</a> OH1KH OH1QG</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>ON2VHF-3</td>\n\
<td><a href=\"telnet://on2vhf-3.ddns.net:9001\">on2vhf-3.ddns.net:9001</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">AR-Cluster (Marcinelle, JO20FJ); Sysop: <a\n\
href=\"mailto:on2vhf@gmail.com\">ON2VHF</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>ON0DXK</td>\n\
<td><a href=\"telnet://on0dxk.dyndns.org:8000\">on0dxk.dyndns.org:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX-Spider (Kortrijk); Sysop: <a\n\
href=\"mailto:on6hh@uba.be\">ON6HH</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>ON0LLV-5</td>\n\
<td><a href=\"telnet://on0llv.ddns.net:7300\">telnet://on0llv.ddns.net:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX-Spider (Houdeng-Goegnies, Hainaut,\n\
Belgium; Sysop: <a href=\"mailto:on6lr@uba.be\">ON6LR</a> </td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>OZ5BBS-7</td>\n\
<td><a href=\"telnet://oz5bbs.no-ip.org:8000\">oz5bbs.no-ip.org:8000</a><br>\n\
dynamically assigned</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"mailto:rene_olsen@post3.tele.dk\">OZ1LQH</a>\n\
DXSpider (Odense)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://qsy.to/dx-cluster/\">PA1RBZ</a></td>\n\
<td><a href=\"telnet://pa1rbz.dyndns.org:9000\">pa1rbz.dyndns.org:9000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"mailto:pa1rbz@amsat.org\">PA1RBZ</a>\n\
DXSpider (Ermelo)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>PA4JJ-3</td>\n\
<td> <br>\n\
<a href=\"telnet://83.162.186.242:7388\">83.162.186.24.2:7388</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"mailto:jbuitenhuis@pa4jj.nl\">PA4JJ</a>\n\
DXSpider (Emmen, Drente)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>PI4CC</td>\n\
<td><a href=\"telnet://dxc.pi4cc.nl:8000\">dxc.pi4cc.nl:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"http://www.pi4cc.nl/\">PI4CC</a>\n\
DX-Cluster (Rotterdam); Sysop: <a\n\
href=\"mailto:pc2a@pi4cc.nl\">PC2A</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>PI8DXC</td>\n\
<td><a href=\"telnet://pi8dxc.mooo.com:41112\">pi8dxc.mooo.com:41112</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DX Spider (Voorburg); Sysop: <a\n\
href=\"mailto:pa2r@muurkrant.com\">PA2R</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://odxc.ru\">RW3XA</a></td>\n\
<td><a href=\"telnet://dx.feerc.ru:8000\">dx.feerc.ru:8000</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">RW3XA-8 DX-Cluster (Obninsk); Sysop: <a\n\
href=\"mailto:rw3xa@mail.ru\">RW3XA</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://s50clx.infrax.si\">S50CLX</a></td>\n\
<td><a href=\"telnet://bonaparte.infrax.si:41112\">bonaparte.infrax.si:41112</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">S50CLX DX Spider (Cerkno, Slovenia); Sysop: <a\n\
href=\"mailto:s50u@hamradio.si\">S50CLX</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>SV2HRT-1</td>\n\
<td><a href=\"telnet://sv2hrt.ath.cx:7300\">sv2hrt.ath.cx:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">SV2HRT DXSpider; White Tower DX Team, Sysop:\n\
<a href=\"mailto:sv2hrt@gmail.com\">SV2HRT</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>TA2NC-2</td>\n\
<td><a href=\"telnet://home.kayhan.name.tr:7300\">home.kayhan.name.tr:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">TA2NC DXSpider, Ankara, Turkey; Sysop: <a\n\
href=\"mailto:oguzhan@kayhan.name.tr\">TA2NC</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>VE1DXI</td>\n\
<td><a href=\"telnet://ve1dxi.no-ip.com\">ve1dxi.no-ip.com</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"mailto:paul.dunphy@ve1dx.net\">VE1DX</a>\n\
WinCluster (Lake Echo, NS)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>VA3NA</td>\n\
<td><a href=\"telnet://dx.fireroute.com\">dx.fireroute.com</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"mailto:va3na@rac.ca\">VA3NA</a>\n\
Linux-PacketCluster (Toronto, ON)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>VE6DXC</td>\n\
<td><a href=\"telnet://dx.middlebrook.ca:8000\">dx.middlebrook.ca:8000</a><br>\n\
<a href=\"telnet://64.59.129.23:8000\">64.59.129.23:8000</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">VE6DXC DXSpider Cluster (Calgary, AB)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>VE7CC</td>\n\
<td><a href=\"telnet://dxc.ve7cc.net\">dxc.ve7cc.net</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">VE7CC CC-Cluster (Whonnock, BC); Skimmer\n\
capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>VE9EMO</td>\n\
<td><a href=\"telnet://ve9emo.gnb.ca\">ve9emo.gnb.ca</a><br>\n\
<a href=\"telnet://205.174.162.164\">205.174.162.164</a></td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">VE9EMO DXSpider, the New-Brunswick DX Cluster</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>VE9SC</td>\n\
<td><a href=\"telnet://www.ve9sc.com:6300\">www.ve9sc.com:6300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"malto:ve9sc@ve9sc.com\">VE9SC</a> DX\n\
Spider (Moncton, NB)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>VK7HDM-2</td>\n\
<td><a href=\"telnet://ddmcomputers.com:7300\">ddmcomputers.com:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"malto:vk7hdm@ddmcomputers.com\">VK7HDM</a>\n\
DX Spider (Gagebrook, Hobart, Tasmania); <a\n\
href=\"http://www.ddmcomputers.com/cluster.php\">Web access</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td><a href=\"http://dxc.ardi.lv/\">YL7DXC</a></td>\n\
<td><a href=\"telnet://dxc.ardi.lv:8000\">dxc.ardi.lv:8000</a><br>\n\
</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">YL7C DXSpider Cluster (Jelgava, Latvia);\n\
Sysop: <a href=\"mailto:yl2md@inbox.lv\">YL2MD</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>YO8SAW-1</td>\n\
<td><a href=\"telnet://yo8saw.netroute.ro:7300\">yo8saw.netroute.ro:7300</a><br>\n\
</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"mailto:yo8saw@gmail.com\">YO8SAW</a>\n\
DX Spider (Barlad, Romania)</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>YV6BTF</td>\n\
<td><a href=\"telnet://yv6btf.no-ip.org:8000\">yv6btf.no-ip.org:8000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\"><a href=\"mailto:yv6btf@cantv.net\">YV6BTF</a>\n\
AR-Cluster (Barcelona); Skimmer capable</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>ZL2AQY-10</td>\n\
<td><a href=\"telnet://olson.net.nz:9000\">olson.net.nz:9000</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Glenfield, Auckland); Sysop: <a\n\
href=\"mailto:ed.o@xtra.co.nz\">ZL2AQY</a></td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td>ZL2ARN-10</td>\n\
<td><a href=\"telnet://zl2arn.dyndns.org\">zl2arn.dyndns.org:7300</a><br>\n\
(dynamically assigned)</td>\n\
<td>call</td>\n\
<td> </td>\n\
<td align=\"left\">DXSpider (Waikanae, Kapiti Coast); Sysop: <a\n\
href=\"mailto:zl2arn@xtra.co.nz\">ZL2ARN</a></td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</body>\n\
</html>";
| 35,974
|
C++
|
.cxx
| 992
| 34.268145
| 126
| 0.613762
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,147
|
dxcluster.cxx
|
w1hkj_fldigi/src/dxcluster/dxcluster.cxx
|
// =====================================================================
//
// dxcluster.cxx
//
// Copyright (C) 2016
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// =====================================================================
#include <iostream>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <list>
#include <fstream>
#include <stdlib.h>
#include <FL/Fl_Text_Display.H>
#include <FL/Fl_Text_Buffer.H>
#include "config.h"
#include "fl_digi.h"
#include "rigsupport.h"
#include "modem.h"
#include "trx.h"
#include "configuration.h"
#include "main.h"
#include "waterfall.h"
#include "macros.h"
#include "qrunner.h"
#include "debug.h"
#include "status.h"
#include "icons.h"
#include "threads.h"
#include "strutil.h"
#include "fileselect.h"
#include "logsupport.h"
#include "dx_dialog.h"
#include "dx_cluster.h"
#include "confdialog.h"
#ifdef __MINGW32__
# include "compat/mingw.h"
#endif
LOG_FILE_SOURCE(debug::LOG_FD);
//#define DXC_DEBUG 1
pthread_mutex_t dxcc_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t dxc_line_mutex = PTHREAD_MUTEX_INITIALIZER;
//forward declarations of local functions
void DXcluster_start();
static char even[50];
static char odd[50];
//======================================================================
// Socket DXcluster i/o used on all platforms
//======================================================================
pthread_t DXcluster_thread;
pthread_mutex_t DXcluster_mutex = PTHREAD_MUTEX_INITIALIZER;
Socket *DXcluster_socket = 0;
enum DXC_STATES {DISCONNECTED, CONNECTING, CONNECTED};
int DXcluster_state = DISCONNECTED;
bool DXcluster_exit = false;
bool DXcluster_enabled = false;
#define DXCLUSTER_CONNECT_TIMEOUT 5000 // 5 second timeout
#define DXCLUSTER_SOCKET_TIMEOUT 200 // milliseconds
#define DXCLUSTER_LOOP_TIME 100 // milliseconds
int DXcluster_connect_timeout =
(DXCLUSTER_CONNECT_TIMEOUT) / (DXCLUSTER_SOCKET_TIMEOUT + DXCLUSTER_LOOP_TIME);
//======================================================================
// support routines all called from DXcluster thread using REQ(...)
//======================================================================
void set_btn_dxcc_connect(bool v)
{
btn_dxcc_connect->value(v);
btn_dxcc_connect->redraw();
}
void dxc_label()
{
switch (DXcluster_state) {
case CONNECTING:
lbl_dxc_connected->color(FL_YELLOW);
cluster_tabs->value(tabDXclusterTelNetStream);
break;
case CONNECTED:
lbl_dxc_connected->color(FL_GREEN);
cluster_tabs->value(tabDXclusterTelNetStream);
break;
case DISCONNECTED:
default :
lbl_dxc_connected->color(FL_WHITE);
}
lbl_dxc_connected->redraw_label();
lbl_dxc_connected->redraw();
}
static std::string trim(std::string s)
{
size_t p;
while (s[s.length()-1] == ' ') s.erase(s.length()-1, 1);
while ( (p = s.find("\x07")) != std::string::npos) s.erase(p, 1);
while ((p = s.find("\r")) != std::string::npos) s.erase(p,1);
while ((p = s.find("\n")) != std::string::npos) s.erase(p,1);
return s;
}
//--------------------------------------------------------------------------------
// 1 2 3 4 5 6 7
//01234567890123456789012345678901234567890123456789012345678901234567890123456789
// 1 ^ 2 ^ 3 ^4 5 6 ^
//DX de KB8O: 14240.0 D66D up 10 59 Ohio 2059Z EN81<cr><lf>
//DX de W4DL: 18082.0 V44KAI 2220Z<cr><lf>
//DX de K2IOF: 14240.0 D66D up 5 2220Z<cr><lf>
//DX de N3ZV: 10147.0 AN400G RTTY 2220Z FM18<BELL><BELL><cr><lf>
//DX de W4LT: 14204.0 EA3HSO 2218Z EL88<BELL><BELL><cr><lf>
//--------------------------------------------------------------------------------
static std::string tcpip_buffer;
void show_tx_stream(std::string buff)
{
size_t p;
while ((p = buff.find("\r")) != std::string::npos) buff.erase(p,1);
if (buff[buff.length()-1] != '\n') buff += '\n';
brws_tcpip_stream->insert_position(brws_tcpip_stream->buffer()->length());
brws_tcpip_stream->addstr(buff, FTextBase::XMIT);
#ifdef DXC_DEBUG
std::string pname = "TempDir";
pname.append("dxcdebug.txt", "a");
FILE *dxcdebug = fl_fopen(pname.c_str(), "a");
fprintf(dxcdebug, "[T]:%s\n", buff.c_str());
fclose(dxcdebug);
#endif
}
void show_rx_stream(std::string buff)
{
for (size_t p = 0; p < buff.length(); p++) {
if ( (buff[p] < '\n') ||
(buff[p] > '\n' && buff[p] < ' ') ||
(buff[p] > '~') )
buff[p] = ' ';
}
if (buff.empty()) buff = "\n";
else if (buff[buff.length()-1] != '\n') buff += '\n';
brws_tcpip_stream->insert_position(brws_tcpip_stream->buffer()->length());
brws_tcpip_stream->addstr(buff, FTextBase::RECV);
#ifdef DXC_DEBUG
std::string pname = "TempDir";
pname.append("dxcdebug.txt", "a");
FILE *dxcdebug = fl_fopen(pname.c_str(), "a");
fprintf(dxcdebug, "[R]:%s\n", buff.c_str());
fclose(dxcdebug);
#endif
}
void show_error(std::string buff)
{
if (buff.empty()) return;
if (!brws_tcpip_stream) return;
if (buff[buff.length()-1] != '\n') buff += '\n';
brws_tcpip_stream->addstr(buff, FTextBase::CTRL);
brws_tcpip_stream->redraw();
#ifdef DXC_DEBUG
std::string pname = "TempDir";
pname.append("dxcdebug.txt", "a");
FILE *dxcdebug = fl_fopen(pname.c_str(), "a");
fprintf(dxcdebug, "[E]:%s\n", buff.c_str());
fclose(dxcdebug);
#endif
}
static void odd_even()
{
char hdr[100];
snprintf(hdr, sizeof(hdr),
"@F%d@S%d@.Spotter Freq Dx Station Notes UTC LOC",
progdefaults.DXC_textfont,
progdefaults.DXC_textsize);
reports_header->clear();
reports_header->add(hdr);
reports_header->redraw();
snprintf(odd, sizeof(odd), "@B%u@C%u@F%d@S%d@.",
progdefaults.DXC_odd_color,
FL_BLACK,
progdefaults.DXC_textfont,
progdefaults.DXC_textsize);
snprintf(even, sizeof(even), "@B%u@C%u@F%d@S%d@.",
progdefaults.DXC_even_color,
FL_BLACK,
progdefaults.DXC_textfont,
progdefaults.DXC_textsize);
}
void dxc_lines_redraw()
{
guard_lock dxcc_lock(&dxc_line_mutex);
odd_even();
int n = brws_dx_cluster->size();
if (n == 0) return;
std::queue<std::string> lines;
std::string dxc_line;
size_t p;
for (int i = 0; i < n; i++) {
dxc_line = brws_dx_cluster->text(i+1);
p = dxc_line.find(".");
if (p != std::string::npos) dxc_line.erase(0,p+1);
lines.push(dxc_line);
}
brws_dx_cluster->clear();
for (int i = 0; i < n; i++) {
if (i % 2)
dxc_line.assign(even);
else
dxc_line.assign(odd);
dxc_line.append(lines.front());
lines.pop();
brws_dx_cluster->insert(1, dxc_line.c_str());
}
if (progdefaults.dxc_topline)
brws_dx_cluster->make_visible(1);
else
brws_dx_cluster->bottomline(brws_dx_cluster->size());
brws_dx_cluster->redraw();
}
void dxc_lines()
{
guard_lock dxcc_lock(&dxc_line_mutex);
odd_even();
int n = brws_dx_cluster->size();
if (n == 0) return;
std::queue<std::string> lines;
std::string dxc_line;
size_t p;
for (int i = 0; i < n; i++) {
if (progdefaults.dxc_topline)
dxc_line = brws_dx_cluster->text(i+1);
else
dxc_line = brws_dx_cluster->text(n - i);
p = dxc_line.find(".");
if (p != std::string::npos) dxc_line.erase(0,p+1);
lines.push(dxc_line);
}
brws_dx_cluster->clear();
for (int i = 0; i < n; i++) {
if (i % 2)
dxc_line.assign(even);
else
dxc_line.assign(odd);
dxc_line.append(lines.front());
lines.pop();
if (progdefaults.dxc_topline)
brws_dx_cluster->insert(1, dxc_line.c_str());
else
brws_dx_cluster->add(dxc_line.c_str());
}
if (progdefaults.dxc_topline)
brws_dx_cluster->make_visible(1);
else
brws_dx_cluster->bottomline(brws_dx_cluster->size());
brws_dx_cluster->redraw();
}
void parse_dxline(std::string buffer)
{
guard_lock dxcc_lock(&dxc_line_mutex);
snprintf(odd, sizeof(odd), "@B%u@C%u@F%d@S%d@.",
progdefaults.DXC_odd_color,
FL_BLACK,
progdefaults.DXC_textfont,
progdefaults.DXC_textsize);
snprintf(even, sizeof(even), "@B%u@C%u@F%d@S%d@.",
progdefaults.DXC_even_color,
FL_BLACK,
progdefaults.DXC_textfont,
progdefaults.DXC_textsize);
buffer.erase(0, strlen("DX de "));
size_t p = buffer.find(":");
if (p != std::string::npos) buffer.replace(p, 1, " ");
std::string dxc_line;
if (brws_dx_cluster->size() % 2)
dxc_line.assign(even);
else
dxc_line.assign(odd);
dxc_line.append(buffer);
if (progdefaults.dxc_topline) {
bool visible = brws_dx_cluster->displayed(1);
brws_dx_cluster->insert(1, dxc_line.c_str());
if (visible) brws_dx_cluster->make_visible(1);
} else {
bool visible = brws_dx_cluster->displayed(brws_dx_cluster->size());
brws_dx_cluster->add(dxc_line.c_str());
if (visible) brws_dx_cluster->bottomline(brws_dx_cluster->size());
}
}
void show_help_line(std::string buff)
{
brws_dxc_help->insert_position(brws_dxc_help->buffer()->length());
brws_dxc_help->addstr(buff, FTextBase::RECV);
#ifdef DXC_DEBUG
std::string pname = "TempDir";
pname.append("dxcdebug.txt", "a");
FILE *dxcdebug = fl_fopen(pname.c_str(), "a");
fprintf(dxcdebug, "[W]:%s\n", buff.c_str());
fclose(dxcdebug);
#endif
}
enum server_type {NIL, DX_SPIDER, AR_CLUSTER, CC_CLUSTER};
static int cluster_login = NIL;
static bool logged_in = false;
void register_dxspider()
{
std::string login;
login.assign("set/page 0\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
login.assign("set/name ").append(progdefaults.myName);
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
login.assign("set/qth ").append(progdefaults.myQth);
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
login.assign("set/qra ").append(progdefaults.myLocator);
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
}
void login_to_dxspider()
{
if (!DXcluster_socket) return;
try {
std::string login = progdefaults.dxcc_login;
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
if (progdefaults.dxcc_password.empty())
register_dxspider();
logged_in = true;
cluster_login = NIL;
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
}
}
void login_to_arcluster()
{
std::string login = progdefaults.dxcc_login;
login.append("\r\n");
try {
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
logged_in = true;
cluster_login = NIL;
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
}
}
/*
* telnet session with dxspots.com 7300
*
Trying 204.221.76.52...
Connected to dxspots.com.
Escape character is '^]'.
Greetings from the AE5E CC Cluster in Thief River Falls MN USA
Running CC Cluster software version 3.101b
*************************************************************************
* *
* Please login with a callsign indicating your correct country *
* Portable calls are ok. *
* *
************************************************************************
New commands:
set/skimmer turns on Skimmer spots.
set/noskimmer turns off Skimmer spots.
set/own turns on Skimmer spots for own call.
set/noown turns them off.
set/nobeacon turns off spots for beacons.
set/beacon turns them back on.
For information on CC Cluster software see:
http://bcdxc.org/ve7cc/ccc/CCC_Commands.htm
Please enter your call:
login: w1hkj
W1HKJ
Hello David.
CC-User is the recommended telnet acess program. It simplifies filtering,
may be used stand alone or can feed spots to your logging program.
CC_User is free at: http://ve7cc.net/default.htm#prog
CC_User group at: http://groups.yahoo.com/group/ARUser
Using telnet port 7000
Cluster: 423 nodes 459 Locals 4704 Total users Uptime 7 days 15:32
Date Hour SFI A K Forecast Logger
19-Nov-2016 0 78 3 0 No Storms -> No Storms <VE7CC>
W1HKJ de AE5E 19-Nov-2016 0154Z CCC >
W1HKJ de AE5E 19-Nov-2016 0154Z CCC >
bye
73 David. W1HKJ de AE5E 19-Nov-2016 0154Z CCC >
Connection closed by foreign host.
*/
void register_cccluster()
{
std::string login;
login.assign("set/name ").append(progdefaults.myName);
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
login.assign("set/qth ").append(progdefaults.myQth);
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
login.assign("set/qra ").append(progdefaults.myLocator);
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
login.assign("set/noskimmer");
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
login.assign("set/noown");
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
login.assign("set/nobeacon");
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
}
void login_to_cccluster()
{
if (!DXcluster_socket) return;
try {
std::string login = progdefaults.dxcc_login;
login.append("\r\n");
DXcluster_socket->send(login);
REQ(show_tx_stream, login);
if (progdefaults.dxcc_password.empty())
register_cccluster();
logged_in = true;
cluster_login = NIL;
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
}
}
void send_password()
{
if (!DXcluster_socket ||
logged_in == false ||
inp_dxcc_password->value()[0] == 0) return;
try {
std::string password = inp_dxcc_password->value();
password.append("\r\n");
DXcluster_socket->send(password);
REQ(show_tx_stream, password);
switch (cluster_login) {
case AR_CLUSTER: break;
case CC_CLUSTER: register_cccluster(); break;
case DX_SPIDER: register_dxspider(); break;
}
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
}
}
static bool help_lines = false;
void init_cluster_stream()
{
std::string buffer;
help_lines = false;
tcpip_buffer.clear();
brws_tcpip_stream->clear();
brws_tcpip_stream->redraw();
}
void parse_DXcluster_stream(std::string input_buffer)
{
guard_lock dxcc_lock(&dxcc_mutex);
std::string buffer;
std::string ucasebuffer = ucasestr(input_buffer);
if (!logged_in) {
if (ucasebuffer.find("AR-CLUSTER") != std::string::npos) { // AR cluster
init_cluster_stream();
cluster_login = AR_CLUSTER;
}
else if (ucasebuffer.find("CC CLUSTER") != std::string::npos) { // CC cluster
init_cluster_stream();
cluster_login = CC_CLUSTER;
}
else if (ucasebuffer.find("LOGIN:") != std::string::npos) { // DX Spider
init_cluster_stream();
cluster_login = DX_SPIDER;
}
}
tcpip_buffer.append(input_buffer);
std::string strm;
std::string its_me = progdefaults.dxcc_login;
its_me.append(" DE ");
its_me = ucasestr(its_me);
size_t p;
while (!tcpip_buffer.empty()) {
p = tcpip_buffer.find("\n");
if (p != std::string::npos) {
buffer = trim(tcpip_buffer.substr(0, p));
tcpip_buffer.erase(0, p + 1);
} else {
buffer = trim(tcpip_buffer);
tcpip_buffer.clear();
}
REQ(show_rx_stream, buffer);
ucasebuffer = ucasestr(buffer);
if (ucasebuffer.find("DX DE") != std::string::npos) {
parse_dxline(buffer);
continue;
}
if (ucasebuffer.find("HELP") != std::string::npos) {
help_lines = true;
}
if (ucasebuffer.find(its_me) != std::string::npos) {
help_lines = false;
continue;
}
if (help_lines) {
show_help_line(buffer);
continue;
}
if (cluster_login == AR_CLUSTER && ucasebuffer.find("CALL:") != std::string::npos)
login_to_arcluster();
if (cluster_login == CC_CLUSTER && ucasebuffer.find("CALL:") != std::string::npos)
login_to_cccluster();
if (cluster_login == DX_SPIDER && ucasebuffer.find("LOGIN:") != std::string::npos)
login_to_dxspider();
if (cluster_login == DX_SPIDER && ucasebuffer.find("PASSWORD:") != std::string::npos)
send_password();
}
}
void clear_dxcluster_viewer()
{
guard_lock dxcc_lock(&dxcc_mutex);
brws_dx_cluster->clear();
brws_tcpip_stream->clear();
}
//======================================================================
// Receive tcpip data stream
//======================================================================
void DXcluster_recv_data()
{
if (!DXcluster_socket) return;
std::string tempbuff;
try {
guard_lock dxc_lock(&DXcluster_mutex);
if (DXcluster_state == CONNECTED) {
DXcluster_socket->recv(tempbuff);
if (!tempbuff.empty())
REQ(parse_DXcluster_stream, tempbuff);
}
} catch (const SocketException& e) {
LOG_ERROR("Error %d, %s", e.error(), e.what());
}
}
//======================================================================
//
//======================================================================
const char *default_help[]={
"Help available after logging on",
"Try URL: k4zr.no-ip.org, PORT 7300",
"",
"Visit http://www.dxcluster.info/telnet/ for a listing of dx cluster servers",
NULL };
void dxc_help_query()
{
// brws_dxc_help->clear();
if ((DXcluster_state == DISCONNECTED) || !DXcluster_socket) {
brws_dxc_help->clear();
const char **help = default_help;
while (*help) {
brws_dxc_help->add(*help);
help++;
}
return;
}
try {
guard_lock dxc_lock(&DXcluster_mutex);
std::string sendbuf = "help";
if (inp_help_string->value()[0]) {
std::string helptype = inp_help_string->value();
if (ucasestr(helptype).find("HELP") != std::string::npos)
sendbuf = helptype;
else
sendbuf.append(" ").append(helptype);
}
sendbuf.append("\r\n");
DXcluster_socket->send(sendbuf.c_str());
REQ(show_tx_stream, sendbuf);
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
}
}
void dxc_help_clear()
{
guard_lock dxcc_lock(&dxcc_mutex);
brws_dxc_help->clear();
}
//======================================================================
//
//======================================================================
void DXcluster_submit()
{
if (!DXcluster_socket) return;
try {
guard_lock dxc_lock(&DXcluster_mutex);
std::string sendbuf = trim(inp_dxcluster_cmd->value());
if (sendbuf[0] == '!') sendbuf.erase(0,1);
std::string test = ucasestr(sendbuf);
if (test.find("BYE") != std::string::npos) {
fl_alert2("Uncheck the \"Connect\" button to disconnect!");
logged_in = false;
return;
}
sendbuf.append("\r\n");
DXcluster_socket->send(sendbuf.c_str());
REQ(show_tx_stream, sendbuf);
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
}
inp_dxcluster_cmd->value("");
}
void rf_af(long &rf, long &af)
{
mode_t md = active_modem->get_mode();
std::string testmode = qso_opMODE->value();
bool xcvr_useFSK = (testmode.find("RTTY") != std::string::npos);
if (md == MODE_SSB) {
af = 0;
return;
}
if (md == MODE_CW) {
af = progdefaults.CWsweetspot;
std::string smode = qso_opMODE->value();
if (smode.find("CW") == std::string::npos) {
if (wf->USB()) rf -= af;
else rf += af;
}
}
else if (md == MODE_RTTY) {
if (xcvr_useFSK) {
af = progdefaults.xcvr_FSK_MARK + rtty::SHIFT[progdefaults.rtty_shift]/2;
} else {
int shift = rtty::SHIFT[progdefaults.rtty_shift];
af = progdefaults.RTTYsweetspot;
if (progdefaults.useMARKfreq) {
if (wf->USB()) rf -= (af + shift / 2);
else rf += (af - shift / 2);
}
else {
if (wf->USB()) rf -= af;
else rf += af;
}
}
} else {
af = progdefaults.PSKsweetspot;
if (wf->USB()) rf -= af;
else rf += af;
}
return;
}
void DXcluster_select()
{
int sel = brws_dx_cluster->value();
if (sel == 0) return;
//--------------------------------------------------------------------------------
// 1 2 3 4 5 6 7
//01234567890123456789012345678901234567890123456789012345678901234567890123456789
// 1^ ^ 3 ^ 4 5 6 ^
//KB8O 14240.0 D66D up 10 59 Ohio 2059Z EN81<cr><lf>
std::string dxcline = brws_dx_cluster->text(sel);
size_t p = dxcline.find("@.");
if (p == std::string::npos)
return;
// remove rendition characters
dxcline = dxcline.substr(p + 2);
// remove reporting stations call
p = dxcline.find(" ");
dxcline.erase(0, p+1);
// find reported frequency
while (dxcline[0] == ' ') dxcline.erase(0,1);
p = dxcline.find(" ");
std::string sfreq = dxcline.substr(0, p);
dxcline.erase(0, p+1);
// find dx call
while (dxcline[0] == ' ') dxcline.erase(0,1);
p = dxcline.find(" ");
std::string dxcall = trim(dxcline.substr(0, p));
dxcline.erase(0, p+1);
// treat remainder as remarks
// search for a mode name in the remarks
// change to that mode if discovered
dxcline = ucasestr(dxcline);
for (int i = 0; i < NUM_RXTX_MODES; i++) {
if (dxcline.find(mode_info[i].adif_name) != std::string::npos) {
if (active_modem->get_mode() != mode_info[i].mode)
init_modem_sync(mode_info[i].mode);
break;
}
}
inpCall->value(dxcall.c_str());
DupCheck();
long freq = (long)(atof(sfreq.c_str()) * 1000.0 + 0.5);
// does remark section have a [nn] block?
p = dxcline.find("[");
if (p != std::string::npos) {
dxcline.erase(0, p+1);
p = dxcline.find("]");
if (p == 2)
freq += atoi(dxcline.c_str());
}
long af = progdefaults.PSKsweetspot;
if (active_modem->get_mode() == MODE_CW) af = progdefaults.CWsweetspot;
if (active_modem->get_mode() == MODE_RTTY) af = progdefaults.RTTYsweetspot;
rf_af(freq, af);
qsy(freq, af);
}
//--------------------------------------------------------------------------------
// 1 2 3 4 5 6 7
//01234567890123456789012345678901234567890123456789012345678901234567890123456789
// 1 ^ 2 ^ 3 ^4 5 6 ^
//7080.4 CO3VR Optional Comment
void freqstrings (std::string &khz, std::string &hz )
{
std::string sfreq = inpFreq->value();
size_t p = sfreq.find_first_of(".,");
if (p != std::string::npos) sfreq.erase(p,1);
int phz = sfreq.length() - 2;
hz = sfreq.substr(phz, 2);
sfreq.erase(phz);
long freq = atol(sfreq.c_str());
if (!progdefaults.dxc_hertz) {
if (hz > "49") freq++;
}
char szfreq[20];
snprintf(szfreq, sizeof(szfreq), "%ld", freq);
khz = szfreq;
khz.insert(khz.length() - 1, ".");
return;
}
void send_DXcluster_spot()
{
if (inpCall->value()[0] == 0) return; // no call
std::string hz, khz;
freqstrings (khz, hz );
std::string spot = "dx ";
spot.append(khz)
.append(" ")
.append(inpCall->value())
.append(" ");
std::string comments = trim(inp_dxcluster_cmd->value());
std::string currmode = mode_info[active_modem->get_mode()].adif_name;
if (comments.find(currmode) == std::string::npos) {
if (progdefaults.dxc_hertz) {
currmode.append(" [")
.append(hz).
append("] ");
}
comments.insert(0, currmode);
}
spot.append(comments);
inp_dxcluster_cmd->value(spot.c_str());
tabDXclusterTelNetStream->show();
}
//======================================================================
//
//======================================================================
bool connect_changed;
bool connect_to_cluster;
void DXcluster_doconnect()
{
int result = 0;
if (connect_to_cluster) {
REQ(clear_dxcluster_viewer);
try {
if (DXcluster_state == DISCONNECTED) {
if (DXcluster_socket) {
DXcluster_socket->shut_down();
DXcluster_socket->close();
delete DXcluster_socket;
DXcluster_socket = 0;
DXcluster_state = DISCONNECTED;
REQ(dxc_label);
}
Address addr = Address(
progdefaults.dxcc_host_url.c_str(),
progdefaults.dxcc_host_port.c_str() );
DXcluster_socket = new Socket( addr );
DXcluster_socket->set_nonblocking(true);
DXcluster_socket->set_timeout((double)(DXCLUSTER_SOCKET_TIMEOUT / 1000.0));
}
result = DXcluster_socket->connect();
if ( (result == 0) || (result == EISCONN) || (result == EALREADY) ) {
DXcluster_state = CONNECTED;
REQ(dxc_label);
LOG_INFO( "Connected to dxserver %s:%s",
progdefaults.dxcc_host_url.c_str(),
progdefaults.dxcc_host_port.c_str() );
connect_changed = false;
return;
} else if ( (result == EWOULDBLOCK) || (result == EINPROGRESS) )
DXcluster_state = CONNECTING;
else
DXcluster_state = DISCONNECTED;
if ((DXcluster_state == CONNECTING) &&
(DXcluster_connect_timeout-- <= 0) ) {
REQ(show_error, "Connection attempt timed out");
DXcluster_state = DISCONNECTED;
set_btn_dxcc_connect(false);
REQ(dxc_label);
DXcluster_socket->shut_down();
DXcluster_socket->close();
delete DXcluster_socket;
DXcluster_socket = 0;
} else {
LOG_INFO("Connecting %f seconds remaining", DXcluster_connect_timeout * DXCLUSTER_LOOP_TIME * 0.001);
}
connect_changed = false;
return;
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
connect_to_cluster = false;
connect_changed = false;
DXcluster_state = DISCONNECTED;
set_btn_dxcc_connect(false);
REQ(dxc_label);
return;
}
} else {
if (!DXcluster_socket) {
REQ(show_error, "NO socket!");
DXcluster_state = DISCONNECTED;
connect_to_cluster = false;
connect_changed = false;
set_btn_dxcc_connect(false);
REQ(dxc_label);
return;
}
try {
std::string bye = "BYE\r\n";
DXcluster_socket->send(bye);
REQ(show_tx_stream, bye);
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
DXcluster_state = DISCONNECTED;
connect_to_cluster = false;
connect_changed = false;
set_btn_dxcc_connect(false);
REQ(dxc_label);
return;
}
MilliSleep(50);
logged_in = false;
DXcluster_socket->shut_down();
DXcluster_socket->close();
delete DXcluster_socket;
DXcluster_socket = 0;
DXcluster_state = DISCONNECTED;
lbl_dxc_connected->color(FL_WHITE);
lbl_dxc_connected->redraw();
progStatus.cluster_connected = false;
set_btn_dxcc_connect(false);
LOG_INFO("Disconnected from dxserver");
}
connect_changed = false;
}
void DXcluster_connect(bool val)
{
connect_changed = true;
connect_to_cluster = val;
}
//======================================================================
// Thread loop
//======================================================================
void *DXcluster_loop(void *args)
{
SET_THREAD_ID(DXCC_TID);
while(1) {
MilliSleep(DXCLUSTER_LOOP_TIME);
if (DXcluster_exit) break;
if (connect_changed || (DXcluster_state == CONNECTING) )
DXcluster_doconnect();
if (DXcluster_state == CONNECTED) DXcluster_recv_data();
}
// exit the DXCC thread
SET_THREAD_CANCEL();
return NULL;
}
//======================================================================
//
//======================================================================
void DXcluster_init(void)
{
DXcluster_enabled = false;
DXcluster_exit = false;
if (pthread_create(&DXcluster_thread, NULL, DXcluster_loop, NULL) < 0) {
LOG_ERROR("%s", "pthread_create failed");
return;
}
LOG_INFO("%s", "dxserver thread started");
DXcluster_enabled = true;
char hdr[100];
snprintf(hdr, sizeof(hdr), "@F%d@S%d@.Spotter Freq Dx Station Notes UTC LOC",
progdefaults.DXC_textfont,
progdefaults.DXC_textsize);
reports_header->clear();
reports_header->add(hdr);
reports_header->has_scrollbar(0);
brws_tcpip_stream->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_tcpip_stream->setFont(progdefaults.DXfontnbr);
brws_tcpip_stream->setFontSize(progdefaults.DXfontsize);
brws_tcpip_stream->setFontColor(progdefaults.DXfontcolor, FTextBase::RECV);
brws_tcpip_stream->setFontColor(progdefaults.DXalt_color, FTextBase::XMIT);
brws_tcpip_stream->setFontColor(
fl_contrast(progdefaults.DXfontcolor,
fl_rgb_color( progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B) ),
FTextBase::CTRL);
ed_telnet_cmds->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
ed_telnet_cmds->setFont(progdefaults.DXfontnbr);
ed_telnet_cmds->setFontSize(progdefaults.DXfontsize);
ed_telnet_cmds->setFontColor(progdefaults.DXfontcolor);
brws_dxc_help->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_dxc_help->setFontColor(progdefaults.DXfontcolor, FTextBase::RECV);
brws_dxc_help->setFont(progdefaults.DXfontnbr);
brws_dxc_help->setFontSize(progdefaults.DXfontsize);
brws_dxcluster_hosts->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_dxcluster_hosts->textcolor(progdefaults.DXfontcolor);
brws_dxcluster_hosts->textfont(progdefaults.DXfontnbr);
brws_dxcluster_hosts->textsize(progdefaults.DXfontsize);
cluster_tabs->selection_color(progdefaults.TabsColor);
if (progdefaults.dxc_auto_connect) {
DXcluster_connect(true);
set_btn_dxcc_connect(true);
}
#ifdef DXC_DEBUG
std::string pname = "TempDir";
pname.append("dxcdebug.txt", "a");
FILE *dxcdebug = fl_fopen(pname.c_str(), "w");
fprintf(dxcdebug, "DXC session\n\n");
fclose(dxcdebug);
#endif
}
//======================================================================
//
//======================================================================
void DXcluster_close(void)
{
if (!DXcluster_enabled) return;
if ((DXcluster_state != DISCONNECTED) && DXcluster_socket) {
DXcluster_connect(false);
int n = 500;
while ((DXcluster_state != DISCONNECTED) && n) {
MilliSleep(10);
n--;
}
if (n == 0) {
LOG_ERROR("%s", _("Failed to shut down dxcluster socket"));
fl_message2(_("Failed to shut down dxcluster socket"));
exit(1);
return;
}
}
DXcluster_exit = true;
pthread_join(DXcluster_thread, NULL);
DXcluster_enabled = false;
LOG_INFO("%s", "dxserver thread terminated. ");
if (DXcluster_socket) {
DXcluster_socket->shut_down();
DXcluster_socket->close();
}
}
void dxcluster_hosts_save()
{
std::string hosts = "";
int nlines = brws_dxcluster_hosts->size();
if (!nlines) {
progdefaults.dxcluster_hosts = hosts;
return;
}
std::string hostline;
size_t p;
for (int n = 1; n <= nlines; n++) {
hostline = brws_dxcluster_hosts->text(n);
p = hostline.find("@.");
if (p != std::string::npos) hostline.erase(0,p+2);
hosts.append(hostline).append("|");
}
progdefaults.dxcluster_hosts = hosts;
progdefaults.changed = true;
}
void dxcluster_hosts_load()
{
brws_dxcluster_hosts->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_dxcluster_hosts->textcolor(progdefaults.DXfontcolor);
brws_dxcluster_hosts->textfont(progdefaults.DXfontnbr);
brws_dxcluster_hosts->textsize(progdefaults.DXfontsize);
brws_dxcluster_hosts->clear();
if (progdefaults.dxcluster_hosts.empty()) {
return;
}
std::string hostline;
std::string hosts = progdefaults.dxcluster_hosts;
size_t p = hosts.find("|");
size_t p2;
while (p != std::string::npos && p != 0) {
hostline.assign(hosts.substr(0,p+1));
p2 = hostline.find("::|");
if (p2 != std::string::npos)
hostline.insert(p2 + 1, progdefaults.myCall);
p2 = hostline.find("|");
if (p2 != std::string::npos) hostline.erase(p2, 1);
brws_dxcluster_hosts->add(hostline.c_str());
hosts.erase(0, p+1);
p = hosts.find("|");
}
brws_dxcluster_hosts->sort(FL_SORT_ASCENDING);
brws_dxcluster_hosts->redraw();
}
void dxcluster_hosts_select(Fl_Button*, void*)
{
std::string host_line;
int line_nbr = brws_dxcluster_hosts->value();
if (line_nbr == 0) return;
host_line = brws_dxcluster_hosts->text(line_nbr);
std::string host_name,
host_port,
host_login,
host_password;
size_t p = host_line.find("@.");
if (p != std::string::npos) host_line.erase(0, p + 2);
p = host_line.find(":");
if (p == std::string::npos) return;
host_name = host_line.substr(0, p);
host_line.erase(0, p+1);
p = host_line.find(":");
if (p == std::string::npos) return;
host_port = host_line.substr(0, p);
host_line.erase(0, p+1);
p = host_line.find(":");
if (p == std::string::npos)
host_login = host_line;
else {
host_login = host_line.substr(0, p);
host_line.erase(0, p+1);
host_password = host_line;
}
progdefaults.dxcc_host_url = host_name;
inp_dxcc_host_url->value(host_name.c_str());
inp_dxcc_host_url->redraw();
progdefaults.dxcc_host_port = host_port;
inp_dccc_host_port->value(host_port.c_str());
inp_dccc_host_port->redraw();
progdefaults.dxcc_login = host_login;
inp_dccc_login->value(host_login.c_str());
inp_dccc_login->redraw();
progdefaults.dxcc_password = host_password;
inp_dxcc_password->value(host_password.c_str());
inp_dxcc_password->redraw();
}
void dxcluster_hosts_delete(Fl_Button*, void*)
{
int line_nbr = brws_dxcluster_hosts->value();
if (line_nbr == 0) return;
brws_dxcluster_hosts->remove(line_nbr);
dxcluster_hosts_save();
brws_dxcluster_hosts->redraw();
}
void dxcluster_hosts_clear(Fl_Button*, void*)
{
brws_dxcluster_hosts->clear();
dxcluster_hosts_save();
brws_dxcluster_hosts->redraw();
}
void dxcluster_hosts_add(Fl_Button*, void*)
{
brws_dxcluster_hosts->color(fl_rgb_color(
progdefaults.DX_Color.R,
progdefaults.DX_Color.G,
progdefaults.DX_Color.B));
brws_dxcluster_hosts->textcolor(progdefaults.DXfontcolor);
brws_dxcluster_hosts->textfont(progdefaults.DXfontnbr);
brws_dxcluster_hosts->textsize(progdefaults.DXfontsize);
std::string host_line = progdefaults.dxcc_host_url.c_str();
host_line.append(":").append(progdefaults.dxcc_host_port.c_str());
host_line.append(":").append(progdefaults.dxcc_login);
host_line.append(":").append(progdefaults.dxcc_password);
if (brws_dx_cluster->size() > 0) {
for (int i = 1; i <= brws_dxcluster_hosts->size(); i++) {
if (host_line == brws_dxcluster_hosts->text(i))
return;
}
}
brws_dxcluster_hosts->add(host_line.c_str());
brws_dxcluster_hosts->sort(FL_SORT_ASCENDING);
brws_dxcluster_hosts->redraw();
dxcluster_hosts_save();
}
void dxcluster_hosts_clear_setup(Fl_Button*, void*)
{
ed_telnet_cmds->clear();
}
void dxcluster_hosts_load_setup(Fl_Button*, void*)
{
const char* p = FSEL::select( _("Load dxcluster setup file"), "*.dxc", ScriptsDir.c_str());
if (!p) return;
if (!*p) return;
ed_telnet_cmds->buffer()->loadfile(p);
}
void dxcluster_hosts_save_setup(Fl_Button*, void*)
{
std::string defaultfilename = ScriptsDir;
defaultfilename.append("default.dxc");
const char* p = FSEL::saveas( _("Save dxcluster setup file"), "*.dxc",
defaultfilename.c_str());
if (!p) return;
if (!*p) return;
ed_telnet_cmds->buffer()->savefile(p);
}
void dxc_sendstring(std::string &tosend)
{
if (!DXcluster_socket) return;
std::string line;
size_t p;
while (!tosend.empty()) {
p = tosend.find("\n");
if (p != std::string::npos) {
line = tosend.substr(0,p);
tosend.erase(0,p+1);
} else {
line = tosend;
tosend.clear();
}
line.append("\r\n");
try {
DXcluster_socket->send(line);
REQ(show_tx_stream, line);
} catch (const SocketException& e) {
std::string serr = e.what();
LOG_ERROR("%s", serr.c_str() );
REQ(show_error, serr);
}
}
}
void dxcluster_hosts_send_setup(Fl_Button*, void*)
{
char *str = ed_telnet_cmds->buffer()->text();
std::string tosend = str;
free(str);
dxc_sendstring(tosend);
}
#include "arc-help.cxx"
void dxcluster_ar_help(Fl_Button*, void*)
{
std::string fn_help = HelpDir;
fn_help.append("arc_help.html");
std::ifstream f_help(fn_help.c_str());
if (!f_help) {
std::ofstream fo_help(fn_help.c_str());
fo_help << arc_commands;
fo_help.close();
} else
f_help.close();
cb_mnuVisitURL(0, (void*)fn_help.c_str());
}
#include "CCC_Commands.cxx"
void dxcluster_cc_help(Fl_Button*, void*)
{
std::string fn_help = HelpDir;
fn_help.append("ccc_help.html");
std::ifstream f_help(fn_help.c_str());
if (!f_help) {
std::ofstream fo_help(fn_help.c_str());
fo_help << ccc_commands;
fo_help.close();
} else
f_help.close();
cb_mnuVisitURL(0, (void*)fn_help.c_str());
}
#include "DXSpiderCommandReference.cxx"
void dxcluster_dx_help(Fl_Button*, void*)
{
std::string fn_help = HelpDir;
fn_help.append("dxc_help.html");
std::ifstream f_help(fn_help.c_str());
if (!f_help) {
std::ofstream fo_help(fn_help.c_str());
fo_help << dxspider_cmds;
fo_help.close();
} else
f_help.close();
cb_mnuVisitURL(0, (void*)fn_help.c_str());
}
#include "DXClusterServers.cxx"
void dxcluster_servers(Fl_Button*, void*)
{
std::string fn_help = HelpDir;
fn_help.append("dxc_servers.html");
std::ifstream f_help(fn_help.c_str());
if (!f_help) {
std::ofstream fo_help(fn_help.c_str());
fo_help << dxcc_servers;
fo_help.close();
} else
f_help.close();
cb_mnuVisitURL(0, (void*)fn_help.c_str());
}
void dxc_click_m1(Fl_Button*, void*)
{
inp_dxcluster_cmd->value(progdefaults.dxcm_text_1.c_str());
if (progdefaults.dxcm_text_1[0] == '!') DXcluster_submit();
}
void dxc_click_m2(Fl_Button*, void*)
{
inp_dxcluster_cmd->value(progdefaults.dxcm_text_2.c_str());
if (progdefaults.dxcm_text_2[0] == '!') DXcluster_submit();
}
void dxc_click_m3(Fl_Button*, void*)
{
inp_dxcluster_cmd->value(progdefaults.dxcm_text_3.c_str());
if (progdefaults.dxcm_text_3[0] == '!') DXcluster_submit();
}
void dxc_click_m4(Fl_Button*, void*)
{
inp_dxcluster_cmd->value(progdefaults.dxcm_text_4.c_str());
if (progdefaults.dxcm_text_4[0] == '!') DXcluster_submit();
}
void dxc_click_m5(Fl_Button*, void*)
{
inp_dxcluster_cmd->value(progdefaults.dxcm_text_5.c_str());
if (progdefaults.dxcm_text_5[0] == '!') DXcluster_submit();
}
void dxc_click_m6(Fl_Button*, void*)
{
inp_dxcluster_cmd->value(progdefaults.dxcm_text_6.c_str());
if (progdefaults.dxcm_text_6[0] == '!') DXcluster_submit();
}
void dxc_click_m7(Fl_Button*, void*)
{
inp_dxcluster_cmd->value(progdefaults.dxcm_text_7.c_str());
if (progdefaults.dxcm_text_7[0] == '!') DXcluster_submit();
}
void dxc_click_m8(Fl_Button*, void*)
{
inp_dxcluster_cmd->value(progdefaults.dxcm_text_8.c_str());
if (progdefaults.dxcm_text_8[0] == '!') DXcluster_submit();
}
| 39,371
|
C++
|
.cxx
| 1,281
| 28.298985
| 115
| 0.638419
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,148
|
CCC_Commands.cxx
|
w1hkj_fldigi/src/dxcluster/CCC_Commands.cxx
|
std::string ccc_commands = "\n\
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 5//EN\">\n\
<html>\n\
<head>\n\
<meta http-equiv=\"Content-Type\" content=\"text/html\">\n\
<title>CCC Commands</title>\n\
</head>\n\
<body>\n\
<div align=\"left\">\n\
<table height=\"20\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"\n\
width=\"100%\" align=\"center\">\n\
<tbody>\n\
<tr>\n\
<td bgcolor=\"#ffffff\">\n\
<h2 align=\"center\">CC Cluster Commands</h2>\n\
</td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</div>\n\
<div align=\"left\">\n\
<table bgcolor=\"#FFFFFF\" border=\"0\"\n\
cellpadding=\"5\" cellspacing=\"0\" width=\"100%\">\n\
<tbody>\n\
<tr>\n\
<td>\n\
<div align=\"center\">\n\
<table border=\"1\" cellpadding=\"3\"\n\
cellspacing=\"0\" width=\"100%\">\n\
<tbody>\n\
<tr>\n\
<td width=\"150\">ANnounce</td>\n\
<td width=\"600\">Send an announcement to local USERs. (AN<Text Message>)</td>\n\
</tr>\n\
<tr>\n\
<td>ANnounce/Full</td>\n\
<td>Send an announcement to all nodes and USERs. (AN/F <Text Message>)</td>\n\
</tr>\n\
<tr>\n\
<td>BYE</td>\n\
<td>Disconnect from the node. (BYE) or (B)</td>\n\
</tr>\n\
<tr>\n\
<td>DX</td>\n\
<td>Send a DX spot. (DX <Callsign> <Frequency> or DX <Frequency> <Callsign>)</td>\n\
</tr>\n\
<tr>\n\
<td>DXTest</td>\n\
<td>Returns to USER only. (DXT P5NOW 14006.06) Good for testing RES 1 & RES 2</td>\n\
</tr>\n\
<tr>\n\
<td>DIR</td>\n\
<td>Shows mail messages on the node</td>\n\
</tr>\n\
<tr>\n\
<td>DIR/BULLETIN</td>\n\
<td>Shows mail messages to ALL, BULLETIN and anything not to a call</td>\n\
</tr>\n\
<tr>\n\
<td>DIR/NEW</td>\n\
<td>Shows only mail messages you haven't seen since your last DIR</td>\n\
</tr>\n\
<tr>\n\
<td>DIR/OWN</td>\n\
<td>Shows only mail messages to you including messages to ALL & ones you sent</td>\n\
</tr>\n\
<tr>\n\
<td>DIR/SUBJECT</td>\n\
<td>Shows mail messages with subject you enter. (DIR/SUBJECT ARL)</td>\n\
</tr>\n\
<tr>\n\
<td>DELete</td>\n\
<td>Delete mail messages. (DEL (Msg #) (DEL 1-99) Deletes your messages from 1 to 99</td>\n\
</tr>\n\
<tr>\n\
<td>Kill</td>\n\
<td>Delete mail messages. (K (Msg #) (K 1-99) Deletes your messages from 1 to 99</td>\n\
</tr>\n\
<tr>\n\
<td>List</td>\n\
<td>Shows mail messages on the node</td>\n\
</tr>\n\
<tr>\n\
<td>List/NEW</td>\n\
<td>Shows only mail messages you haven't seen since your last DIR or L</td>\n\
</tr>\n\
<tr>\n\
<td>List/OWN</td>\n\
<td>Shows only mail messages to you including messages to ALL & ones you sent</td>\n\
</tr>\n\
<tr>\n\
<td>QUIT</td>\n\
<td>Disconnect from the node</td>\n\
</tr>\n\
<tr>\n\
<td>READ</td>\n\
<td>Read cluster mail. (READ <Message #>) See Mail Send/Receive below</td>\n\
</tr>\n\
<tr>\n\
<td>REply</td>\n\
<td>REply without a number following replies to the last mail message you read. \n\
REply <#> replies to the message with that number given. \n\
REply/DELete replies to message and deletes it. REply/DELete/RR replies\n\
to message, delets message and gets a return receipt. REply/RR replies\n\
to message and gets a return receipt. </td>\n\
</tr>\n\
<tr>\n\
<td>SEND</td>\n\
<td>(SEND <Callsign>) Sends mail to that callsign. SEND <LOCAL>\n\
to just send a message to local node USERs. SEND <ALL>, SEND\n\
<FORSALE> and SEND <DXNEWS> will be passed to all nodes for all USERs.</td>\n\
</tr>\n\
<tr>\n\
<td>SET/ANN</td>\n\
<td>Turn on announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SET/BEACON</td>\n\
<td>Turn on beacon spots. These are spots ending in \"/B\" or \"BCN\"</td>\n\
</tr>\n\
<tr>\n\
<td>SET/BEEP</td>\n\
<td>Turn on a beep for DX and Announcement spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/BOB</td>\n\
<td>Turn on bottom of band DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/DX</td>\n\
<td>Turn on DX spot announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SET/DXCQ</td>\n\
<td>Turn on CQ Zone in DX info for DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/DXITU</td>\n\
<td>Turn on ITU Zone in DX info for DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/DXS</td>\n\
<td>Turn on US state/province or country in DX info for DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/USSTATE</td>\n\
<td>Turn on US\n\
state or Canadian province spotter in DX info for DX spots</td>\n\
</tr> \n\
<tr>\n\
<td>SET/FILTER</td>\n\
<td>See Band\n\
& Mode Filtering Below</td>\n\
</tr>\n\
<tr>\n\
<td>SET/GRID</td>\n\
<td>Turns on DX\n\
Grid, toggles CQ Zone, ITU Zone, & US State to off</td>\n\
</tr>\n\
<tr>\n\
<td>SET/HOME</td>\n\
<td>Tell cluster\n\
your home node. (SET/HOME <Node Call>) If you normally connect to\n\
K8SMC then it would be (SET/HOME K8SMC) </td>\n\
</tr>\n\
<tr>\n\
<td>SET/LOCATION</td>\n\
<td>Set your location (lat/lon) of your station. (SET/LOCATION 42 17 N 84 21 W)</td>\n\
</tr>\n\
<tr>\n\
<td>SET/LOGIN</td>\n\
<td>Tells cluster to send USER connects and disconnects.</td> \n\
</tr>\n\
<tr>\n\
<td>SET/NAME</td>\n\
<td>Set your name<o:p></o:p> (SET/NAME <First Name>)</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOANN</td>\n\
<td>Turn off announcements.</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOBEACON</td>\n\
<td>Turn off beacon spots. These are spots ending in \"/B\" or \"BCN\"</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOBEEP</td>\n\
<td>Turn off a beep for DX and Announcement spots<o:p>\n\
</o:p> .</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOBOB</td>\n\
<td>Turn off bottom of band DX spots.</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOCQ</td>\n\
<td>Turn off CQ Zone in spot announcements.</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NODX</td>\n\
<td>Turn off DX spot announcements.</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NODXCQ</td>\n\
<td>Turn off CQ Zone in DX info for DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NODXITU</td>\n\
<td>Turn off ITU Zone in DX info for DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NODXS</td>\n\
<td>Turn off US state/province or country in DX info for DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOUSSTATE</td>\n\
<td>Turn off US state or Canadian province spotter in DX info for DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOGRID</td>\n\
<td>Turn off DX Grids in spot announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOITU</td>\n\
<td>Turn off ITU Zone in spot announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOLOGIN</td>\n\
<td>Stops cluster from sending USER connects and disconnects</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOOWN</td>\n\
<td>Turn off skimmer spots for your own call</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOSELF</td>\n\
<td>Turn off self spots by other users</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOSKIMMER</td>\n\
<td>Turn off Skimmer spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOTALK</td>\n\
<td>Turn off the display of talk messages<o:p></o:p></td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOWCY</td>\n\
<td>Turn off the display of WCY spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOWWV</td>\n\
<td>Turn off the display of WWV spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOWX</td>\n\
<td>Turn off the display of weather announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SET/OWN</td>\n\
<td>Turn on Skimmer spots for own call</td>\n\
</tr>\n\
<tr>\n\
<td>SET/NOLOGIN</td>\n\
<td>Stops cluster from sending USER connects and disconnects</td>\n\
</tr>\n\
<tr>\n\
<td>SET/QRA</td>\n\
<td>Input your Grid Square. (SET/QRA EN72)</td>\n\
</tr>\n\
<tr>\n\
<td>SET/QTH</td>\n\
<td>Set your city and state. (SET/QTH <City, State>) DX <City, Country></td>\n\
</tr>\n\
<tr>\n\
<td>SET/RES 1</td>\n\
<td>Tells CC-Cluster to give you 1 decimal point rounding in DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/RES 2</td>\n\
<td>Tells CC-Cluster to give you 2 decimal point rounding in DX spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/SELF</td>\n\
<td>Turn on self spots by other users</td>\n\
</tr>\n\
<tr>\n\
<td>SET/SKIMMER</td>\n\
<td>Turn on Skimmer spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/TALK</td>\n\
<td>Turn on the display of talk messages</td>\n\
</tr>\n\
<tr>\n\
<td>SET/USSTATE</td>\n\
<td>Turns on US State, toggles CQ Zone, DX Grid, & ITU Zone to off</td>\n\
</tr>\n\
<tr>\n\
<td>SET/WCY</td>\n\
<td>Turn on the display of WCY spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/WIDTH</td>\n\
<td>Sets the line width for DX spots, normally this has been 80 characters. Depending\n\
on your logging program you can use anything between 45 to 130\n\
characters, SET/WIDTH XX where XX is the number of characters.</td>\n\
</tr>\n\
<tr>\n\
<td>SET/WWV</td>\n\
<td>Turn on the display of WWV spots</td>\n\
</tr>\n\
<tr>\n\
<td>SET/WX</td>\n\
<td>Turn on the display of weather announcements</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/CL</td>\n\
<td>Node Info and CCC Uptime See SH/VERSION </td>\n\
</tr>\n\
<tr>\n\
<td>SHow/CONF</td>\n\
<td>Shows nodes and callsigns of USERs, only nodes called LOCAL by Sysop.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/DX</td>\n\
<td>Shows last 30 spots</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/DX <Call></td>\n\
<td>Shows last 30 spots for that call</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/DX/<number></td>\n\
<td>Shows that number of spots. SH/DX/100</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/DX <Band></td>\n\
<td>Shows spots on that band. SH/DX 20 for 20 meters</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/DX/ <Freq></td>\n\
<td>Shows spots by frequency range. Syntax = SH/DX 7020-7130</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/DX <prefix*></td>\n\
<td>Shows all spots for a country, standard prefix not necessary, asterisk needed</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/DX 'rtty'</td>\n\
<td>Shows spots where the comment field contains (rtty)</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/DXBY <call></td>\n\
<td>Shows spots where spotter = Call</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/FDX</td>\n\
<td>Shows real time formatted dx spots.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/FILTER</td>\n\
<td>Shows how you have your filters set.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/HEAD <Call></td>\n\
<td>Shows heading - distance and bearing for the\n\
call.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/MYANN</td>\n\
<td>Shows last 5 announcements allowed by your filter settings.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/MYDX</td>\n\
<td>Shows last 30 spots allowed by your filter settings</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/MYDX <Call></td>\n\
<td>Shows last 30 spots for the call allowed by your filter settings.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/MYDX/<number></td>\n\
<td>Shows that number of spots allowed by your filter. SH/MYDX/100</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/MYDX <Band></td>\n\
<td>Shows spots on that band allowed by your filter settings. SH/MYDX 20 for 20 meters</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/MYFDX</td>\n\
<td>Shows last 30 spots allowed by your filter settings. </td>\n\
</tr>\n\
<tr>\n\
<td>SHow/MYWX</td>\n\
<td>Shows last 5 weather announcements allowed by your filter settings.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/RES</td>\n\
<td>Shows the number of digits after the decimal point for frequencies</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/SETTINGS</td>\n\
<td>Shows information on the node for your call and how you are setup.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/STATION</td>\n\
<td>Shows information on the node for a station. (SH/STA <Callsign>)</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/SUN</td>\n\
<td>Shows local sunrise and sunset times. (SH/SUN <Prefix.) for that country</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/TIME</td>\n\
<td>Shows GMT time.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/TIME <Call></td>\n\
<td>Shows local time for the call.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/USDB</td>\n\
<td>Shows State/Province for US/VE calls. (SH/USDB <Callsign>)</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/USERS</td>\n\
<td>Shows callsigns of everyone connected to the local node.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/VERSION</td>\n\
<td>Shows the CCC Uptime for connections.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/WIDTH</td>\n\
<td>Shows the length of a DX Spot. Normally 80 characters.</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/WWV</td>\n\
<td>Shows WWV info, (SH/WWV) gives last 5 (SH/WWV/99) gives last 99</td>\n\
</tr>\n\
<tr>\n\
<td>SHow/WCY</td>\n\
<td>Shows last 5 DK0WCY, similar to WWV</td>\n\
</tr>\n\
<tr>\n\
<td>Talk</td>\n\
<td>Send a talk message to someone on the node. (T<Callsign> <Message>)</td>\n\
</tr>\n\
<tr>\n\
<td>UNSET/</td>\n\
<td>This command can be used instead of SET/NO, Compatibility for DX-Spider USERs</td>\n\
</tr>\n\
<tr>\n\
<td>WHO</td>\n\
<td>This command will return a list of connections in alphabetical order. Items are: Call User/Node Name IP/AGW</td>\n\
</tr>\n\
<tr>\n\
<td>WX</td>\n\
<td>The command \"WX\" will send a local weather announcement. (WX Sunny and Warm)</td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</div>\n\
\n\
\n\
<div align=\"center\">\n\
<center>\n\
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"\n\
width=\"600\">\n\
<tbody>\n\
<tr>\n\
<td width=\"100%\" align=\"center\"><font color=\"#800000\">Most Common Used Filter Commands</font></td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</center>\n\
</div>\n\
<div align=\"center\">\n\
<center>\n\
<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\"\n\
width=\"100%\">\n\
<tbody>\n\
<tr>\n\
<td width=\"250\">Filter Settings:</td>\n\
<td width=\"500\">Filters are mostly default to off, but one simple setting for say someone in the US or Canada\n\
that is happy seeing spots from just the US and Canada can do a quick setting for this: SET/FILTER K,VE/PASS</td>\n\
</tr>\n\
<tr>\n\
<td width=\"250\">SH/FILTER</td>\n\
<td width=\"500\">Shows all of your USER\n\
filter settings</td>\n\
</tr>\n\
<tr>\n\
<td width=\"250\">SH/FILTER <aaa></td>\n\
<td width=\"500\">Show setting for specific filter, <aaa> = filter name.<br>\n\
SH/FILTER DOC = DX Origination Country<br>\n\
SH/FILTER DOS = DX Origination State<br>\n\
SH/FILTER AOC = Announce Origination Country<br>\n\
SH/FILTER AOS = Announce Origination State<br>\n\
SH/FILTER WOC = Weather Origination Country<br>\n\
SH/FILTER WOS = Weather Origination State<br>\n\
SH/FILTER DXCTY = DX spot CounTrY<br>\n\
SH/FILTER DXSTATE = DX spot STATE </td>\n\
</tr>\n\
<tr>\n\
<td width=\"250\">SET/NOFILTER</td>\n\
<td width=\"500\">Resets all filters to default. If you suspect you have\n\
entered invalid filter command or commands, reset and start over.</td>\n\
</tr>\n\
<tr>\n\
<td width=\"250\">SET/FILTER <aaa>/OFF</td>\n\
<td width=\"500\">Turn off specific filter. <aaa> = filter name (see SH/FILTER <aaa>)</td>\n\
</tr>\n\
<tr>\n\
<td width=\"250\">SET/FILTER K,VE/PASS</td>\n\
<td width=\"500\">This would be the most common filter setting for say someone\n\
in the United States or Canada to set so as to only see spots that\n\
originated in the US or Canada. </td>\n\
</tr>\n\
<tr>\n\
<td width=\"250\">SET/FILTER <aaa>/<p/r> <bbb></td>\n\
<td width=\"500\">Set specific filter.<br>\n\
<aaa> = filter name (see SH/FILTER <aaa><br>\n\
<p/r> = PASS or REJECT<br>\n\
<bbb> = Country or State<br>\n\
Example #1: SET/FILTER DOC/PASS EA,OH,G This would set your\n\
filter to pass originated spots from Spain, Finland and England only.<br>\n\
Example #2: SET/FILTER DXCTY/PASS F,OH This would set\n\
your filter to pass spots for France and Finland only.</td>\n\
</tr>\n\
<tr>\n\
<td width=\"250\">DX Band Mode Filtering</td>\n\
<td width=\"500\">The DXBM filter has many variations for your settings, it\n\
is defaulted to receive all DX spots for all modes from 160 to 10 meters,\n\
(see Band & Mode Filtering below).</td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</center>\n\
</div>\n\
<p> </p>\n\
<div align=\"center\">\n\
<center>\n\
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"\n\
width=\"600\">\n\
<tbody>\n\
<tr>\n\
<td>\n\
<p align=\"center\"><font color=\"#800000\">Band & Mode Filtering</font></p>\n\
</td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</center>\n\
</div>\n\
<div align=\"center\">\n\
<center>\n\
<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\"\n\
width=\"80%\">\n\
<tbody>\n\
<tr>\n\
<td>You can tailor the DX spots from CC Cluster to only the bands and modes that interest you.</td>\n\
</tr>\n\
<tr>\n\
<td>The default setting for new users is to receive all DX\n\
spots from 160 to 10 meters, all modes.</td>\n\
</tr>\n\
<tr>\n\
<td>To reset the band/mode filter to pass everything, enter \"SET/FILTER DXBM/OFF\".</td>\n\
</tr>\n\
<tr>\n\
<td>To display your current settings, enter \"SH/FILTER DXBM\".</td>\n\
</tr>\n\
<tr>\n\
<td>You can change any band or band/mode</td>\n\
</tr>\n\
<tr>\n\
<td>You can set the band or band/mode to either pass or reject.</td>\n\
</tr>\n\
<tr>\n\
<td>You can add items one at a time, or all at once.</td>\n\
</tr>\n\
<tr>\n\
<td> </td>\n\
</tr>\n\
<tr>\n\
<td>For example:</td>\n\
</tr>\n\
<tr>\n\
<td>To add 6 meters, you enter \"SET/FILTER DXBM/PASS 6\".<br>\n\
To delete 80 meter and 40 meter CW, enter \"SET/FILTER DXBM/REJECT 80-CW,40-CW\"</td>\n\
</tr>\n\
<tr>\n\
<td> </td>\n\
</tr>\n\
<tr>\n\
<td>Although the band/mode has a \"mode\" name, it does not mean\n\
that when you select 40-RTTY that you are selecting only RTTY spots. What it\n\
really means is that you are selecting the frequency range in the following\n\
table that corresponds to this name. In this case 7040-7100. The actual\n\
mode may be anything. The only thing you have selected is a frequency range.</td>\n\
</tr>\n\
<tr>\n\
<td> </td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</center>\n\
</div>\n\
<div align=\"center\">\n\
<br>\n\
<center>\n\
<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\"\n\
width=\"100%\">\n\
<caption><font color=\"#800000\">DXBM Frequencies</font></caption>\n\
<tbody>\n\
<tr align=\"center\">\n\
<th bgcolor=\"#cccc99\">Band Mode</th>\n\
<th bgcolor=\"#cccc99\">Low</th>\n\
<th bgcolor=\"#cccc99\">High</th>\n\
<th bgcolor=\"#cccc99\">Band Mode</th>\n\
<th bgcolor=\"#cccc99\">Low</th>\n\
<th bgcolor=\"#cccc99\">High</th>\n\
<th bgcolor=\"#cccc99\">Band Mode</th>\n\
<th bgcolor=\"#cccc99\">Low</th>\n\
<th bgcolor=\"#cccc99\">High</th>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">160-CW</td>\n\
<td bgcolor=\"#ffff99\">1800</td>\n\
<td bgcolor=\"#ffff99\">1850</td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff66\">160-SSB</td>\n\
<td bgcolor=\"#ffff99\">1850</td>\n\
<td bgcolor=\"#ffff99\">2000</td>\n\
</tr><tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">80-CW</td>\n\
<td bgcolor=\"#ffff99\">3500</td>\n\
<td bgcolor=\"#ffff99\">3580</td>\n\
<td bgcolor=\"#ffff66\">80-RTTY</td>\n\
<td bgcolor=\"#ffff99\">3580</td>\n\
<td bgcolor=\"#ffff99\">3700</td>\n\
<td bgcolor=\"#ffff66\">80-SSB</td>\n\
<td bgcolor=\"#ffff99\">3700</td>\n\
<td bgcolor=\"#ffff99\">4000</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff66\">60-SSB</td>\n\
<td bgcolor=\"#ffff99\">5260</td>\n\
<td bgcolor=\"#ffff99\">5405</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">40-CW</td>\n\
<td bgcolor=\"#ffff99\">7000</td>\n\
<td bgcolor=\"#ffff99\">7040</td>\n\
<td bgcolor=\"#ffff66\">40-RTTY</td>\n\
<td bgcolor=\"#ffff99\">7040</td>\n\
<td bgcolor=\"#ffff99\">7100</td>\n\
<td bgcolor=\"#ffff66\">40-SSB</td>\n\
<td bgcolor=\"#ffff99\">7100</td>\n\
<td bgcolor=\"#ffff99\">7300</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">30-CW</td>\n\
<td bgcolor=\"#ffff99\">10100</td>\n\
<td bgcolor=\"#ffff99\">10130</td>\n\
<td bgcolor=\"#ffff66\">30-RTTY</td>\n\
<td bgcolor=\"#ffff99\">10130</td>\n\
<td bgcolor=\"#ffff99\">10150</td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
</tr><tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">20-CW</td>\n\
<td bgcolor=\"#ffff99\">14000</td>\n\
<td bgcolor=\"#ffff99\">14070</td>\n\
<td bgcolor=\"#ffff66\">20-RTTY</td>\n\
<td bgcolor=\"#ffff99\">14070</td>\n\
<td bgcolor=\"#ffff99\">14150</td>\n\
<td bgcolor=\"#ffff66\">20-SSB</td>\n\
<td bgcolor=\"#ffff99\">14150</td>\n\
<td bgcolor=\"#ffff99\">14350</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">17-CW</td>\n\
<td bgcolor=\"#ffff99\">18068</td>\n\
<td bgcolor=\"#ffff99\">18100</td>\n\
<td bgcolor=\"#ffff66\">17-RTTY</td>\n\
<td bgcolor=\"#ffff99\">18100</td>\n\
<td bgcolor=\"#ffff99\">18110</td>\n\
<td bgcolor=\"#ffff66\">17-SSB</td>\n\
<td bgcolor=\"#ffff99\">18110</td>\n\
<td bgcolor=\"#ffff99\">18168</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">15-CW</td>\n\
<td bgcolor=\"#ffff99\">21000</td>\n\
<td bgcolor=\"#ffff99\">21070</td>\n\
<td bgcolor=\"#ffff66\">15-RTTY</td>\n\
<td bgcolor=\"#ffff99\">21070</td>\n\
<td bgcolor=\"#ffff99\">21200</td>\n\
<td bgcolor=\"#ffff66\">15-SSB</td>\n\
<td bgcolor=\"#ffff99\">21200</td>\n\
<td bgcolor=\"#ffff99\">21450</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">12-CW</td>\n\
<td bgcolor=\"#ffff99\">24890</td>\n\
<td bgcolor=\"#ffff99\">24920</td>\n\
<td bgcolor=\"#ffff66\">12-RTTY</td>\n\
<td bgcolor=\"#ffff99\">24920</td>\n\
<td bgcolor=\"#ffff99\">24930</td>\n\
<td bgcolor=\"#ffff66\">12-SSB</td>\n\
<td bgcolor=\"#ffff99\">24930</td>\n\
<td bgcolor=\"#ffff99\">24990</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">10-CW</td>\n\
<td bgcolor=\"#ffff99\">28000</td>\n\
<td bgcolor=\"#ffff99\">28070</td>\n\
<td bgcolor=\"#ffff66\">10-RTTY</td>\n\
<td bgcolor=\"#ffff99\">28070</td>\n\
<td bgcolor=\"#ffff99\">28300</td>\n\
<td bgcolor=\"#ffff66\">10-SSB</td>\n\
<td bgcolor=\"#ffff99\">28300</td>\n\
<td bgcolor=\"#ffff99\">29700</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">6-CW</td>\n\
<td bgcolor=\"#ffff99\">50000</td>\n\
<td bgcolor=\"#ffff99\">50080</td>\n\
<td bgcolor=\"#ffff66\">6-SSB</td>\n\
<td bgcolor=\"#ffff99\">50080</td>\n\
<td bgcolor=\"#ffff99\">50500</td>\n\
<td bgcolor=\"#ffff66\">6-FM</td>\n\
<td bgcolor=\"#ffff99\">50500</td>\n\
<td bgcolor=\"#ffff99\">54000</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff66\">4-MTR</td>\n\
<td bgcolor=\"#ffff99\">70000</td>\n\
<td bgcolor=\"#ffff99\">70650</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">2-CW</td>\n\
<td bgcolor=\"#ffff99\">144000</td>\n\
<td bgcolor=\"#ffff99\">144100</td>\n\
<td bgcolor=\"#ffff66\">2-SSB</td>\n\
<td bgcolor=\"#ffff99\">144100</td>\n\
<td bgcolor=\"#ffff99\">144500</td>\n\
<td bgcolor=\"#ffff66\">2-FM</td>\n\
<td bgcolor=\"#ffff99\">144500</td>\n\
<td bgcolor=\"#ffff99\">148000</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\">1-CW</td>\n\
<td bgcolor=\"#ffff99\">220000</td>\n\
<td bgcolor=\"#ffff99\">221000</td>\n\
<td bgcolor=\"#ffff66\">1-SSB</td>\n\
<td bgcolor=\"#ffff99\">222000</td>\n\
<td bgcolor=\"#ffff99\">224000</td>\n\
<td bgcolor=\"#ffff66\">1-FM</td>\n\
<td bgcolor=\"#ffff99\">221000</td>\n\
<td bgcolor=\"#ffff99\">222000</td>\n\
</tr>\n\
<tr align=\"center\">\n\
<td bgcolor=\"#ffff66\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff66\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff99\"> </td>\n\
<td bgcolor=\"#ffff66\">MW-MW</td>\n\
<td bgcolor=\"#ffff99\">500000</td>\n\
<td bgcolor=\"#ffff99\">47000000</td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</center>\n\
</div>\n\
</td>\n\
</tr>\n\
</tbody>\n\
</table>\n\
</div>\n\
</body>\n\
</html>";
| 23,874
|
C++
|
.cxx
| 802
| 28.723192
| 125
| 0.641195
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,150
|
utf8file_io.cxx
|
w1hkj_fldigi/src/misc/utf8file_io.cxx
|
// ----------------------------------------------------------------------------
// utf8file_io.cxx
//
// Copyright (C) 2012
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <FL/Fl.H>
#include <FL/Fl_Text_Buffer.H>
#include <FL/fl_ask.H>
#include "utf8file_io.h"
#include "icons.h"
#define linelen 1024
//----------------------------------------------------------------------
// filter that produces, from an input stream fed by reading from fp,
// a UTF-8-encoded output stream written in buffer.
// Input can be UTF-8. If it is not, it is decoded with CP1252.
// Output is UTF-8.
// *input_was_changed is set to true if the input was not strict UTF-8
// so output differs from input.
//----------------------------------------------------------------------
#include <FL/fl_utf8.h>
static int utf8_read_(
char *buffer, int buflen,
char *line, int sline, char *endline,
FILE *fp,
bool *input_was_changed )
{
char *p, *q, multibyte[5];
int l, lp, lq, r;
unsigned u;
p = line;
q = buffer;
while (q < buffer + buflen) {
if (p >= endline) {
r = fread(line, 1, sline, fp);
endline = line + r;
if (r == 0) return q - buffer;
p = line;
}
l = fl_utf8len1(*p);
if (p + l > endline) {
memmove(line, p, endline - p);
endline -= (p - line);
r = fread(endline, 1, sline - (endline - line), fp);
endline += r;
p = line;
if (endline - line < l) break;
}
while ( l > 0) {
u = fl_utf8decode(p, p+l, &lp);
lq = fl_utf8encode(u, multibyte);
if (lp != l || lq != l) *input_was_changed = true;
if (q + lq > buffer + buflen) {
memmove(line, p, endline - p);
endline -= (p - line);
return q - buffer;
}
memcpy(q, multibyte, lq);
q += lq;
p += lp;
l -= lp;
}
}
memmove(line, p, endline - p);
endline -= (p - line);
return q - buffer;
}
static const char file_encoding_warning_message[] =
"Input file was not UTF-8 encoded.\n"
"Text has been converted to UTF-8.";
//----------------------------------------------------------------------
// Read text from a file.
// utf8_input_filter accepts UTF-8 or CP1252 as input encoding.
// Output is always UTF-8 encoded std::string
//----------------------------------------------------------------------
int UTF8_readfile(const char *file, std::string &output)
{
FILE *fp;
if (!(fp = fl_fopen(file, "r")))
return 1;
char buffer[2 * linelen + 1], line[linelen];
char *endline = line;
int l;
bool input_file_was_transcoded = false;
while (true) {
l = utf8_read_(
buffer, linelen * 2 + 1,
line, linelen, endline,
fp,
&input_file_was_transcoded);
if (l == 0) break;
buffer[l] = 0;
output.append(buffer);
}
int e = ferror(fp) ? 2 : 0;
fclose(fp);
if ( (!e) && input_file_was_transcoded)
fl_alert2("%s", file_encoding_warning_message);
return e;
}
//----------------------------------------------------------------------
// Write text std::string to file.
// Unicode safe.
//----------------------------------------------------------------------
int UTF8_writefile( const char *file, std::string &text )
{
FILE *fp;
if (!(fp = fl_fopen(file, "w")))
return 1;
int buflen = text.length();
int r = fwrite( text.c_str(), 1, buflen, fp );
int e = (r != buflen) ? 1 : ferror(fp) ? 2 : 0;
fclose(fp);
return e;
}
| 4,118
|
C++
|
.cxx
| 134
| 28.447761
| 79
| 0.556732
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,151
|
newinstall.cxx
|
w1hkj_fldigi/src/misc/newinstall.cxx
|
// ----------------------------------------------------------------------------
//
// newinstall.cxx
//
// Copyright (C) 2007-2014 Dave Freese, W1HKJ
// Copyright (C) 2010 Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include "macros.h"
#include "main.h"
#include "fl_digi.h"
#include "configuration.h"
#include "confdialog.h"
#include "record_browse.h"
#include "record_loader.h"
#include "logger.h"
#include "tabdefs.h"
#include <string>
#include <ctime>
#include <iostream>
#include <fstream>
#include <sys/stat.h>
static std::string label[24];
static std::string text[24];
void newmacros()
{
label[0] = "RsID CQ";
text[0] = "<TXRSID:on><TX>\n\
CQ CQ CQ de <MYCALL> <MYCALL> <MYCALL>\n\
CQ CQ CQ de <MYCALL> <MYCALL> <MYCALL> pse k\n\
<RX><@TXRSID:off>";
label[1] = "ANS @>|";
text[1] = "<TX>\
<CALL> <CALL> de <MYCALL> <MYCALL> <MYCALL> kn\n\
<RX>";
label[2] ="QSO @>>";
text[2] = "<TX>\n\
<CALL> de <MYCALL> ";
label[3] = "KN @||";
text[3] = " btu <NAME> <CALL> de <MYCALL> k\n\
<RX>";
label[4] = "SK @||";
text[4] = "\n\
tnx fer QSO <NAME>, 73, God bless.\n\
<ZDT> <CALL> de <MYCALL> sk\n\
<RX>";
label[5] = "Me/Qth";
text[5] = "\n\
op: <MYNAME>\n\
qth: <MYQTH>\n\
loc: <MYLOC>\n";
label[6] = "Brag";
text[6] = "\n\
<< <MYCALL>, <MYNAME> >>\n\
Age: \n\
Rig: \n\
Pwr: \n\
Ant: \n\
OS: \n\
Soft: <VER>\n\
Web: \n\
Email: ";
label[7] = "";
text[7] = "";
label[8] = "T/R";
text[8] = "<TX/RX>";
label[9] = "Tx @>>";
text[9] = "<TX>";
label[10] = "Rx @||";
text[10] = "<RX>";
label[11] = "TX @>|";
text[11] = "<TX>\n\
de <MYCALL> k\n\
<RX>";
label[12] = "C Ans @>|";
text[12] = "<TX>de <MYCALL> <MYCALL><RX>";
label[13] = "C rpt @>|";
text[13] = "<TX><CNTR> <CNTR> QSL DE <MYCALL> K\n\
<RX>";
label[14] = "C Rep @>|";
text[14] = "<TX>\n\
<CALL> RR NBR <CNTR> <CNTR> TU DE <MYCALL> K\n\
<RX>";
label[15] = "C Incr";
text[15] = "<INCR>";
label[16] = "C Decr";
text[16] = "<DECR>";
label[17] = "Log QSO";
text[17] = "<LOG><INCR>";
label[18] = "CW-CQ @>|";
text[18] = "<TX>CQ CQ CQ DE <MYCALL> <MYCALL> CQ CQ CQ DE <MYCALL> K<RX>";
label[19] = "";
text[19] = "";
label[20] = "CQ @-3+";
text[20] = "<TX>\n\
<IDLE:5>CQ CQ CQ de <MYCALL> <MYCALL>\n\
CQ CQ CQ de <MYCALL> k<RX><TIMER:15>";
label[21] = "CQ-ID @>|";
text[21] = "<TX><ID>\n\
CQ CQ CQ de <MYCALL> <MYCALL>\n\
CQ CQ CQ de <MYCALL> <MYCALL> K\n\
<RX>";
label[22] = "";
text[22] = "";
label[23] = "";
text[23] = "";
for (int i = 0; i < 24; i++) {
macros.text[i] = text[i];
macros.name[i] = label[i];
}
for (int i = 24; i < MAXMACROS; i++) {
macros.text[i] = "";
macros.name[i] = "";
}
}
struct paldata {
const char *fname;
const char *rgbstr0;
const char *rgbstr1;
const char *rgbstr2;
const char *rgbstr3;
const char *rgbstr4;
const char *rgbstr5;
const char *rgbstr6;
const char *rgbstr7;
const char *rgbstr8;
};
paldata palfiles[] = {
{ "banana.pal", " 0; 0; 0",
" 59; 59; 27","119;119; 59","179;179; 91","227;227;123",
"235;235;151","239;239;183","247;247;219","255;255;255"
},
{ "blue1.pal"," 0; 0; 2",
" 0; 0; 64"," 7; 11;128"," 39; 47;192"," 95;115;217",
"151;179;231","187;203;239","219;227;247","255;255;255"
},
{ "blue2.pal"," 3; 3; 64",
" 7; 11;128"," 39; 47;192"," 95;115;217","151;179;231",
"187;203;239","219;227;247","255;255;255","255;253;108"
},
{ "blue3.pal"," 0; 0; 0",
" 31; 31; 31"," 63; 63; 63"," 91; 91;167","119;119;191",
"155;155;219","191;191;191","223;223;223","255;255;255"
},
{ "brown.pal"," 0; 0; 0",
"107; 63; 11","175; 95; 31","199;119; 43","215;163; 63",
"231;211; 87","243;247;111","247;251;179","255;255;255"
},
{ "cyan1.pal"," 0; 0; 0",
" 5; 10; 10"," 22; 42; 42"," 52; 99; 99"," 94;175;175",
"131;209;209","162;224;224","202;239;239","255;255;255"
},
{ "cyan2.pal"," 0; 0; 0",
" 35; 51; 51"," 75;103;103","115;159;159","155;211;211",
"183;231;231","203;239;239","227;247;247","255;255;255"
},
{ "cyan3.pal"," 0; 0; 0",
" 94;114;114","138;162;162","171;201;201","199;232;232",
"216;243;243","228;247;247","241;251;251","255;255;255"
},
{ "default.pal", " 0; 0; 0",
" 0; 6;136"," 0; 19;198"," 0; 32;239","172;167;105",
"194;198; 49","225;228;107","255;255; 0","255; 51; 0"
},
{ "digipan.pal"," 0; 0; 0",
" 0; 0; 64"," 0; 0;128"," 0; 0;217","150;147; 92",
"183;186; 46","225;228;107","255;255; 0","255; 51; 0"
},
{ "fldigi.pal"," 0; 0; 0",
" 0; 0;177"," 3;110;227"," 0;204;204","223;223;223",
" 0;234; 0","244;244; 0","250;126; 0","244; 0; 0"
},
{ "gmfsk.pal"," 0; 0;256",
" 0; 62;194"," 0;126;130"," 0;190; 66"," 0;254; 2",
" 62;194; 0","126;130; 0","190; 66; 0","254; 2; 0"
},
{ "gray1.pal"," 0; 0; 0",
" 69; 69; 69"," 99; 99; 99","121;121;121","140;140;140",
"157;157;157","172;172;172","186;186;186","199;199;199"
},
{ "gray2.pal"," 0; 0; 0",
" 88; 88; 88","126;126;126","155;155;155","179;179;179",
"200;200;200","220;220;220","237;237;237","254;254;254"
},
{ "green1.pal"," 0; 0; 0",
" 0; 32; 0"," 0; 64; 0"," 0; 96; 0"," 0;128; 0",
" 0;160; 0"," 0;192; 0"," 0;224; 0","255;255;255"
},
{ "green2.pal"," 0; 0; 0",
" 0; 60; 0"," 0;102; 0"," 0;151; 0"," 0;242; 0",
"255;255; 89","240;120; 0","255;148; 40","255; 0; 0"
},
{ "jungle.pal"," 0; 0; 0",
"107; 67; 0","223;143; 0","255;123; 27","255; 91; 71",
"255;195; 95","195;255;111","151;255;151","255;255;255"
},
{ "negative.pal","255;255;255",
"223;223;223","191;191;191","159;159;159","127;127;127",
" 95; 95; 95"," 63; 63; 63"," 31; 31; 31"," 0; 0; 0"
},
{ "orange.pal"," 0; 0; 0",
" 63; 27; 0","131; 63; 0","199; 95; 0","251;127; 11",
"251;155; 71","251;187;131","251;219;191","255;255;255"
},
{ "pink.pal"," 0; 0; 0",
" 63; 35; 35","135; 75; 75","203;111;111","255;147;147",
"255;175;175","255;199;199","255;227;227","255;255;255"
},
{ "rainbow.pal"," 0; 0;163",
" 0; 87;191"," 0;207;219"," 0;247;139"," 0;255; 23",
" 95;255; 0","219;255; 0","255;171;155","255;255;255"
},
{ "scope.pal"," 0; 0; 0",
" 0; 0;167"," 0; 79;255"," 0;239;255"," 0;255; 75",
" 95;255; 0","255;255; 0","255;127; 0","255; 0; 0"
},
{ "sunburst.pal"," 0; 0; 0",
" 0; 0; 59"," 0; 0;123","131; 0;179","235; 0; 75",
"255; 43; 43","255;215;111","255;255;183","255;255;255"
},
{ "vk4bdj.pal"," 0; 0; 0",
" 0; 32; 0"," 0;154; 0"," 0;161; 0"," 0;177; 0",
"156;209;144","192;185;183","214;222;224","255;255;255"
},
{ "yellow1.pal", " 0; 0; 0",
" 31; 31; 0"," 63; 63; 0"," 95; 95; 0","127;127; 0",
"159;159; 0","191;191; 0","223;223; 0","255;255; 0"
},
{ "yellow2.pal", " 0; 0; 0",
" 39; 39; 0"," 75; 75; 0","111;111; 0","147;147; 0",
"183;183; 0","219;219; 0","255;255; 0","255;255;255"
},
{ "yl2kf.pal"," 0; 0; 0",
" 0; 0;119"," 7; 11;195"," 39; 47;159"," 95;115;203",
"151;179;255","187;203;255","219;227;255","255;255; 5"
},
{ 0,0,
0,0,0,0,
0,0,0,0
}
};
void create_new_palettes()
{
paldata *pd = palfiles;
std::string Filename;
while (pd->fname) {
Filename = PalettesDir;
Filename.append(pd->fname);
std::ofstream pfile(Filename.c_str());
pfile << pd->rgbstr0 << std::endl;
pfile << pd->rgbstr1 << std::endl;
pfile << pd->rgbstr2 << std::endl;
pfile << pd->rgbstr3 << std::endl;
pfile << pd->rgbstr4 << std::endl;
pfile << pd->rgbstr5 << std::endl;
pfile << pd->rgbstr6 << std::endl;
pfile << pd->rgbstr7 << std::endl;
pfile << pd->rgbstr8 << std::endl;
pfile.close();
pd++;
}
}
void create_new_macros()
{
std::string Filename = MacrosDir;
Filename.append("macros.mdf");
newmacros();
macros.saveMacros(Filename);
}
// =============================================================================
#include <vector>
#include <sstream>
#include <FL/Fl_Window.H>
#include <FL/Fl_Wizard.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Box.H>
#include <FL/fl_draw.H>
#include "configuration.h"
#include "confdialog.h"
#include "icons.h"
#include "gettext.h"
class Wizard : public Fl_Window
{
public:
struct wizard_tab {
Fl_Group* tab;
Fl_Group* parent;
int position;
int x, y, w, h;
};
Wizard(int w, int h, const char* l = 0)
: Fl_Window(w, h, l)
{ create_wizard(); }
~Wizard() { destroy_wizard(); }
private:
void create_wizard(void);
Fl_Group* make_intro(void);
void destroy_wizard(void);
static void wizard_cb(Fl_Widget* w, void* arg);
Fl_Wizard *wizard;
Fl_Button *prev, *next, *done;
typedef std::vector<wizard_tab> tab_t;
tab_t tabs;
};
static int btn_h = 22;
static int pad = 4;
void Wizard::create_wizard(void)
{
createRecordLoader();
callback(wizard_cb, this);
xclass(PACKAGE_TARNAME);
wizard = new Fl_Wizard(0, 0, w(), h());
wizard->end();
// create the buttons
fl_font(FL_HELVETICA, FL_NORMAL_SIZE);
struct {
Fl_Button** button;
const char* label;
} buttons[] = {
{ &done, _("Finish") },
{ &next, _("Next") },
{ &prev, _("Back") },
};
int x = w() - 10;
int bw = 0;
for (size_t i = 0; i < sizeof(buttons)/sizeof(*buttons); i++) {
bw = fl_width(buttons[i].label) + 10;
Fl_Button* b = *buttons[i].button = new Fl_Button(
(x = x - bw - 10), wizard->y() + grpOperator->h() + pad,
bw, btn_h,
buttons[i].label);
b->callback(wizard_cb, this);
}
done->activate();
prev->deactivate();
next->activate();
end();
position(MAX(0, fl_digi_main->x() + (fl_digi_main->w() - w()) / 2),
MAX(0, fl_digi_main->y() + (fl_digi_main->h() - h()) / 2));
// populate the Fl_Wizard group
struct wizard_tab tabs_[] = {
{ NULL },
{ grpOperator },
{ grpSoundDevices },
{ grpRigFlrig },
{ grpRigCat },
{ grpRigHamlib },
{ tabDataFiles }
};
tabs.resize(sizeof(tabs_)/sizeof(*tabs_));
memcpy(&tabs[0], tabs_, sizeof(tabs_));
for (tab_t::iterator i = tabs.begin() + 1; i != tabs.end(); ++i) {
i->parent = i->tab->parent();
i->position = i->parent->find(i->tab);
i->x = i->tab->x();
i->y = i->tab->y();
i->w = i->tab->w();
i->h = i->tab->h();
}
tabs[0].tab = make_intro();
tabs[0].w = grpOperator->w();
tabs[0].h = grpOperator->h();
for (tab_t::iterator i = tabs.begin(); i != tabs.end(); ++i) {
i->tab->resize(0, 0, grpOperator->w(), grpOperator->h());
wizard->add(i->tab);
}
wizard->value(tabs[0].tab);
}
void Wizard::destroy_wizard(void)
{
// re-parent tabs
for (tab_t::const_iterator i = tabs.begin() + 1; i != tabs.end(); ++i) {
i->parent->insert(*i->tab, i->position);
if (i < tabs.end() - 1)
i->tab->hide();
i->tab->resize(i->x, i->y, i->w, i->h);
i->parent->init_sizes();
}
Fl_Button* b[] = { prev, next, done };
for (size_t i = 0; i < sizeof(b)/sizeof(*b); i++)
delete b[i];
}
void Wizard::wizard_cb(Fl_Widget* w, void* arg)
{
Wizard* wiz = static_cast<Wizard*>(arg);
if (w == wiz || w == wiz->done) {
delete wiz;
return;
}
if (w == wiz->prev)
wiz->wizard->prev();
else if (w == wiz->next)
wiz->wizard->next();
Fl_Group* cur = static_cast<Fl_Group*>(wiz->wizard->value());
// modify buttons
if (cur == wiz->tabs[0].tab) {
wiz->prev->deactivate();
wiz->next->activate();
wiz->done->activate();
} else if (cur == wiz->tabs.back().tab) {
wiz->prev->activate();
wiz->next->deactivate();
wiz->done->activate();
} else {
wiz->prev->activate();
wiz->next->activate();
wiz->done->activate();
}
wiz->prev->show();
wiz->next->show();
wiz->done->show();
wiz->prev->redraw();
wiz->next->redraw();
wiz->done->redraw();
}
Fl_Group* Wizard::make_intro(void)
{
Fl_Group* intro = new Fl_Group(
0, 0,
grpOperator->w(), grpOperator->h(),
"");
std::ostringstream help_;
help_ << "\n" <<
_("The wizard will guide you through the basic fldigi settings:") << "\n\n\t- " <<
_("Operator") << "\n\t- " <<
_("Sound Card Interface") << "\n\t- " <<
_("Transceiver control, flrig/rigcat/hamlib") << "\n\n" <<
_("Feel free to skip any pages or exit the wizard at any time") << ". " <<
_("All settings shown here can be changed later via the Configure menu") << '.';
Fl_Box* help = new Fl_Box(20, intro->y() + intro->h() / 4,
intro->w() - 40, 3 * intro->h()/ 4);
help->align(FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_WRAP);
help->copy_label(help_.str().c_str());
intro->end();
return intro;
}
void show_wizard(int argc, char** argv)
{
Wizard* w = new Wizard(grpOperator->w(), grpOperator->h() + (btn_h + 2 * pad), _("Fldigi configuration wizard"));
if (argc && argv)
w->show(argc, argv);
else {
w->show();
w->set_modal();
}
first_use = true;
}
| 13,347
|
C++
|
.cxx
| 462
| 26.677489
| 114
| 0.55709
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,152
|
benchmark.cxx
|
w1hkj_fldigi/src/misc/benchmark.cxx
|
// ----------------------------------------------------------------------------
// benchmark.cxx
//
// Copyright (C) 2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <fstream>
#include <string>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <inttypes.h>
#include <sys/time.h>
#include <time.h>
#ifndef __MINGW32__
# include <sys/resource.h>
#else
# include "compat.h"
#endif
# include <sndfile.h>
#include "fl_digi.h"
#include "modem.h"
#include "trx.h"
#include "timeops.h"
#include "configuration.h"
#include "status.h"
#include "debug.h"
#include "benchmark.h"
struct benchmark_params benchmark = { MODE_PSK31, 1000, false, false, 0.0, 1.0, SRC_SINC_FASTEST };
int setup_benchmark(void)
{
ENSURE_THREAD(FLMAIN_TID);
if (benchmark.input.empty()) {
LOG_ERROR("Missing input");
return 1;
}
else {
char* p;
benchmark.samples = (size_t)strtol(benchmark.input.c_str(), &p, 10);
if (*p != '\0') { // invalid char in input string
// treat as filename
benchmark.samples = 0;
}
}
if (!benchmark.output.empty())
benchmark.buffer.reserve(BUFSIZ);
progdefaults.rsid = false;
progdefaults.StartAtSweetSpot = false;
if (benchmark.modem != NUM_MODES)
progStatus.lastmode = benchmark.modem;
if (benchmark.freq)
progStatus.carrier = benchmark.freq;
progStatus.afconoff = benchmark.afc;
progStatus.sqlonoff = benchmark.sql;
progStatus.sldrSquelchValue = benchmark.sqlevel;
debug::level = debug::INFO_LEVEL;
TRX_WAIT(STATE_ENDED, trx_start(); init_modem(progStatus.lastmode));
if (!benchmark.output.empty()) {
ofstream out(benchmark.output.c_str());
if (out)
out << benchmark.buffer;
}
return 0;
}
SNDFILE* infile = 0;
static size_t do_rx(struct rusage ru[2], struct timespec wall_time[2]);
static size_t do_rx_src(struct rusage ru[2], struct timespec wall_time[2]);
void do_benchmark(void)
{
ENSURE_THREAD(TRX_TID);
std::stringstream info;
if (benchmark.src_ratio != 1.0)
info << "modem=" << active_modem->get_mode()
<< " (" << mode_info[active_modem->get_mode()].sname << ")"
<< " rate=" << active_modem->get_samplerate()
<< " ratio=" << benchmark.src_ratio
<< " converter=" << benchmark.src_type
<< " (" << src_get_name(benchmark.src_type) << ")";
else
info << "modem=" << active_modem->get_mode()
<< " (" << mode_info[active_modem->get_mode()].sname << ")"
<< " rate=" << active_modem->get_samplerate();
LOG_INFO("%s", info.str().c_str());
if (!benchmark.samples) {
SF_INFO info = { 0, 0, 0, 0, 0, 0 };
if ((infile = sf_open(benchmark.input.c_str(), SFM_READ, &info)) == NULL) {
LOG_ERROR("Could not open input file \"%s\"", benchmark.input.c_str());
return;
}
}
struct rusage ru[2];
struct timespec wall_time[2];
size_t nproc, nrx;
if (benchmark.src_ratio == 1.0)
nrx = nproc = do_rx(ru, wall_time);
else {
nproc = do_rx_src(ru, wall_time);
nrx = (size_t)(nproc * benchmark.src_ratio);
}
ru[1].ru_utime -= ru[0].ru_utime;
wall_time[1] -= wall_time[0];
if (infile) {
sf_close(infile);
infile = 0;
}
info << "processed: " << nproc << " samples (decoded " << nrx << ") in "
<< wall_time[1].tv_sec + wall_time[1].tv_nsec / 1e9 << " seconds";
LOG_INFO("%s", info.str().c_str());
double speed = nproc / (ru[1].ru_utime.tv_sec + ru[1].ru_utime.tv_usec / 1e6);
char secs[20];
snprintf(secs, sizeof(secs), "%d.%06d",
(int)(ru[1].ru_utime.tv_sec),
(int)(ru[1].ru_utime.tv_usec / 1000) );
info << "cpu time : " << secs
<< "; speed=" << speed
<< "/s; factor=" << speed / active_modem->get_samplerate();
LOG_INFO("%s", info.str().c_str());
}
// ----------------------------------------------------------------------------
static size_t do_rx(struct rusage ru[2], struct timespec wall_time[2])
{
size_t nread;
size_t inlen = 1 << 19;
double* inbuf = new double[inlen];
if (infile) {
nread = 0;
clock_gettime(CLOCK_MONOTONIC, &wall_time[0]);
getrusage(RUSAGE_SELF, &ru[0]);
for (size_t n; (n = sf_readf_double(infile, inbuf, inlen)); nread += n)
active_modem->rx_process(inbuf, n);
}
else {
memset(inbuf, 0, sizeof(double) * inlen);
clock_gettime(CLOCK_MONOTONIC, &wall_time[0]);
getrusage(RUSAGE_SELF, &ru[0]);
for (nread = benchmark.samples; nread > inlen; nread -= inlen)
active_modem->rx_process(inbuf, inlen);
if (nread)
active_modem->rx_process(inbuf, nread);
nread = benchmark.samples;
}
getrusage(RUSAGE_SELF, &ru[1]);
clock_gettime(CLOCK_MONOTONIC, &wall_time[1]);
delete [] inbuf;
return nread;
}
size_t inlen = 1 << 19;
static float* inbuf = 0;
static long src_read(void* arg, float** data)
{
*data = inbuf;
return inlen;
}
static long src_readf(void* arg, float** data)
{
long n = (long)sf_readf_float(infile, inbuf, inlen);
*data = n ? inbuf : 0;
return n;
}
static size_t do_rx_src(struct rusage ru[2], struct timespec wall_time[2])
{
int err;
SRC_STATE* src_state;
if (infile)
src_state = src_callback_new(src_readf, benchmark.src_type, 1, &err, NULL);
else
src_state = src_callback_new(src_read, benchmark.src_type, 1, &err, NULL);
if (!src_state) {
LOG_ERROR("src_callback_new error %d: %s", err, src_strerror(err));
return 0;
}
inbuf = new float[inlen];
size_t outlen = (size_t)floor(inlen * benchmark.src_ratio);
float* outbuf = new float[outlen];
double* rxbuf = new double[outlen];
long n;
size_t nread;
if (infile) { // read until src returns 0
nread = 0;
clock_gettime(CLOCK_MONOTONIC, &wall_time[0]);
getrusage(RUSAGE_SELF, &ru[0]);
while ((n = src_callback_read(src_state, benchmark.src_ratio, outlen, outbuf))) {
for (long i = 0; i < n; i++)
rxbuf[i] = outbuf[i];
active_modem->rx_process(rxbuf, n);
nread += n;
}
nread = (size_t)round(nread * benchmark.src_ratio);
}
else { // read benchmark.samples * benchmark.src_ratio
nread = (size_t)round(benchmark.samples * benchmark.src_ratio);
clock_gettime(CLOCK_MONOTONIC, &wall_time[0]);
getrusage(RUSAGE_SELF, &ru[0]);
while (nread > outlen) {
if ((n = src_callback_read(src_state, benchmark.src_ratio, outlen, outbuf)) == 0)
break;
for (long i = 0; i < n; i++)
rxbuf[i] = outbuf[i];
active_modem->rx_process(rxbuf, n);
nread -= (size_t)n;
}
if (nread) {
if ((n = src_callback_read(src_state, benchmark.src_ratio, nread, outbuf))) {
for (long i = 0; i < n; i++)
rxbuf[i] = outbuf[i];
active_modem->rx_process(rxbuf, n);
}
}
nread = benchmark.samples;
}
getrusage(RUSAGE_SELF, &ru[1]);
clock_gettime(CLOCK_MONOTONIC, &wall_time[1]);
delete [] inbuf;
delete [] outbuf;
delete [] rxbuf;
return nread;
}
| 7,410
|
C++
|
.cxx
| 234
| 29.209402
| 99
| 0.645121
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,153
|
macroedit.cxx
|
w1hkj_fldigi/src/misc/macroedit.cxx
|
// ----------------------------------------------------------------------------
// macroedit.cxx
//
// Copyright (C) 2007-2009
// Dave Freese, W1HKJ
// Copyright (C) 2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <string>
#ifndef __MINGW32__
# include <glob.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <cstring>
#include <cassert>
#include "macros.h"
#include "macroedit.h"
#include "globals.h"
#include "status.h"
#include "fileselect.h"
#include "fl_digi.h"
#include "main.h"
#include "gettext.h"
#include "pixmaps.h"
#include "configuration.h"
Fl_Double_Window *MacroEditDialog = (Fl_Double_Window *)0;
Fl_Button *btnMacroEditApply = (Fl_Button *)0;
Fl_Button *btnMacroEditClose = (Fl_Button *)0;
Fl_Button *btnInsertMacro = (Fl_Button *)0;
Fl_Input2 *macrotext = (Fl_Input2 *)0;
Fl_Input2 *labeltext = (Fl_Input2 *)0;
static int widths[] = {150, 0};
Fl_Hold_Browser *macroDefs=(Fl_Hold_Browser *)0;
static int iMacro, iType;
static Fl_Input* iInput;
// fl_color(0) is always the foreground colour
#define LINE_SEP "@B0"
void loadBrowser(Fl_Widget *widget) {
Fl_Browser *w = (Fl_Browser *)widget;
/* Do not translate the tags lefthand-side */
w->add(_("<FREQ>\tmy frequency"));
w->add(_("<MODE>\tmode"));
w->add(_("<MYCALL>\tmy call"));
w->add(_("<MYLOC>\tmy locator"));
w->add(_("<MYNAME>\tmy name"));
w->add(_("<MYQTH>\tmy QTH"));
w->add(_("<MYRST>\tmy RST"));
w->add(_("<MYCLASS>\tmy FD class"));
w->add(_("<MYSECTION>\tmy FD section"));
w->add(_("<MYSTATE>\tmy state"));
w->add(_("<MYST>\tmy ST"));
w->add(_("<MYCOUNTY>\tmy county"));
w->add(_("<MYCNTY>\tmy CNTY"));
w->add(_("<ANTENNA>\tmy antenna"));
w->add(_("<BAND>\toperating band"));
w->add(_("<VER>\tFldigi version"));
w->add(_("<DIGI>\tdigital mode (adif)"));
w->add(LINE_SEP);
w->add(_("<CALL>\tother call"));
w->add(_("<NAME>\tother name"));
w->add(_("<QTH>\tother QTH"));
w->add(_("<ST>\tother State"));
w->add(_("<PR>\tother Province"));
w->add(_("<LOC>\tother locator"));
w->add(_("<RST>\tother RST"));
w->add(LINE_SEP);
w->add(_("<INFO1>\tS/N etc."));
w->add(_("<INFO2>\tIMD etc."));
w->add(LINE_SEP);
w->add(_("<QSONBR>\t# QSO recs"));
w->add(_("<NXTNBR>\tnext QSO rec #"));
w->add(LINE_SEP);
w->add(_("<MAPIT>\tmap on google"));
w->add(_("<MAPIT:adr/lat/loc>\tmap by value"));
w->add(LINE_SEP);
w->add(_("<CLRRX>\tclear RX pane"));
w->add(_("<CLRTX>\tclear TX pane"));
w->add(_("<CLRQSO>\tclear QSO fields"));
w->add(LINE_SEP);
w->add(_("<GET>\ttext to NAME/QTH"));
#ifdef __WIN32__
w->add(LINE_SEP);
w->add(_("<TALK:on|off|t>\tDigitalk On, Off, Toggle"));
#endif
w->add(LINE_SEP);
w->add(_("<CLRLOG>\tclear log fields"));
w->add(_("<LOG>\tsave QSO data"));
w->add(_("<LOG:msg>\tsaveQSO data, append msg to notes"));
w->add(_("<LNW>\tlog at xmt time"));
w->add(_("<LNW:msg>\tsaveQSO data, append msg to notes"));
w->add(_("<EQSL>\tlog eQSL"));
w->add(_("<EQSL:[msg]>\tlog eQSL optional msg"));
w->add(LINE_SEP);
w->add(_("<QSOTIME>\tQSO time (HHMM))"));
w->add(_("<ILDT[:fmt]>\tLDT default '%Y-%m-%d %H:%M%z'"));
w->add(_("<LDT[[fmt]>\tLocal datetime, default '%x %H:%M %Z'"));
w->add(_("<IZDT[:fmt]>\tZDT default '%Y-%m-%d %H:%MZ'"));
w->add(_("<ZDT[:fmt]>\tUTC datetime, default '%x %H:%MZ'"));
w->add(_("<LT[:fmt]>\tlocal time, default %H%M"));
w->add(_("<ZT[:fmt]>\tzulu time default %H%MZ"));
w->add(_("<LD[:fmt]>\tlocal date, default '%Y-%M-%D'"));
w->add(_("<ZD[:fmt]>\tzulu date, default '%Y-%M-%D Z'"));
w->add(_("<WX>\tget weather data"));
w->add(_("<WX:xxxx>\tget weather data for station"));
w->add(LINE_SEP);
w->add(_("<CNTR>\tcontest counter"));
w->add(_("<DECR>\tdecrement counter"));
w->add(_("<INCR>\tincrement counter"));
w->add(_("<XIN>\texchange in"));
w->add(_("<XOUT>\texchange out"));
w->add(_("<XBEG>\texchange begin"));
w->add(_("<XEND>\texchange end"));
w->add(_("<SAVEXCHG>\tsave contest out"));
w->add(_("<SERNO>\tcurrent contest serno"));
w->add(_("<LASTNO>\tlast serno sent"));
w->add(_("<FDCLASS>\tFD class"));
w->add(_("<FDSECT>\tFD section"));
w->add(_("<CLASS>\tcontest class"));
w->add(_("<SECTION>\tARRL section"));
w->add(LINE_SEP);
w->add(_("<RX>\treceive"));
w->add(_("<TX>\ttransmit"));
w->add(_("<TX/RX>\ttoggle T/R"));
w->add(_("<SRCHUP>\tsearch UP for signal"));
w->add(_("<SRCHDN>\tsearch DOWN for signal"));
w->add(_("<GOHOME>\treturn to sweet spot"));
w->add(_("<GOFREQ:NNNN>\tmove to freq NNNN Hz"));
w->add(_("<QSYTO>\tleft-clk QSY button"));
w->add(_("<QSYFM>\tright-clk QSY button"));
w->add(_("<QSY:FFF.F[:NNNN]>\tqsy to kHz, Hz"));
w->add(_("<QSY+:+/-n.nnn>\tincr/decr xcvr freq"));
w->add(_("<RIGMODE:mode>\tvalid xcvr mode"));
w->add(_("<FILWID:width>\tvalid xcvr filter width"));
w->add(_("<RIGLO:lowcut>\tvalid xcvr low cutoff filter"));
w->add(_("<RIGHI:hicut>\tvalid xcvr hi cutoff filter"));
w->add(_("<FOCUS>\trig freq has kbd focus"));
w->add(LINE_SEP);
w->add(_("<QRG:text>\tinsert QRG into Rx text"));
w->add(LINE_SEP);
w->add(_("<FILE:>\tinsert text file"));
w->add(_("<IMAGE:>\tinsert image file"));
w->add(_("<AVATAR>\tsend avatar"));
w->add(LINE_SEP);
w->add(_("<PAUSE>\tpause transmit"));
w->add(_("<IDLE:NN.nn>\tidle signal for NN.nn sec"));
w->add(_("<TIMER:NN>\trepeat every NN sec"));
w->add(_("<AFTER:NN>\trepeat after waiting NN sec"));
w->add(_("<TUNE:NN>\ttune signal for NN sec"));
w->add(_("<WAIT:NN.n>\tdelay xmt for NN.n sec"));
w->add(_("<REPEAT>\trepeat macro continuously"));
w->add(_("<SKED:hhmm[ss][:YYYYMMDD]>\tschedule execution for"));
w->add(_("<UNTIL:hhmm[ss][:YYYYMMDD]>\tend execution at"));
w->add(_("<LOCAL>\tuse local date/time"));
w->add(LINE_SEP);
w->add(_("<TXATTEN:nn.n>\t set xmt attenuator"));
w->add(LINE_SEP);
w->add(_("<CWID>\tCW identifier"));
w->add(_("<ID>\tsend mode ID; TX start only"));
w->add(_("<TEXT>\ttext at start of TX"));
w->add(_("<VIDEO:\tvideo text in TX stream"));
w->add(_("<TXRSID:on|off|t>\tTx RSID on,off,toggle"));
w->add(_("<RXRSID:on|off|t>\tRx RSID on,off,toggle"));
w->add(_("<NRSID:NN>\tTransmit |NN| successive RsID bursts"));
w->add(_("<DTMF:[Wn:][Ln:]chrs>\t[Wait][Len](ms)"));
w->add(LINE_SEP);
w->add(_("<AUDIO:>\tXmt audio wav file"));
w->add(LINE_SEP);
w->add(_("<ALERT:[bark][checkout][doesnot][phone][beeboo][diesel][steam_train][dinner_bell][standard_tone]>"));
w->add(_("<ALERT:>\talert using external wav file"));
w->add(LINE_SEP);
w->add(_("<POST:+/-nn.n>\tCW QSK post-timing"));
w->add(_("<PRE:nn.n>\tCW QSK pre-timing"));
w->add(_("<RISE:nn.n>\tCW rise time"));
w->add(_("<WPM:NN.nn:FF.nn>\tChar WPM:Text WPM (15.0:5.0)"));
w->add(LINE_SEP);
w->add(_("<RIGCAT:[\"text\"][hex ...]:ret>\tsend CAT cmd"));
w->add(_("<FLRIG:[\"text\"][hex ...]>\tsend CAT cmd"));
w->add(LINE_SEP);
w->add(_("<AFC:on|off|t>\tAFC on,off,toggle"));
w->add(_("<LOCK:on|off|t>\tLOCK on,off,toggle"));
w->add(_("<REV:on|off|t>\tRev on,off,toggle"));
w->add(LINE_SEP);
w->add(_("<MACROS:>\tchange macro defs file"));
w->add(_("<SAVE>\tsave current macro file"));
w->add(_("<BUFFERED>\trun macro from buffered teext"));
w->add(LINE_SEP);
w->add(_("<COMMENT:comment text>\tignore comment text"));
w->add(_("<#comments>\t ignore comments"));
w->add(LINE_SEP);
w->add(_("<CPS_TEST:nn>\tmodem char/sec test on nn chars"));
w->add(_("<CPS_N:n>\tmodem timing test, 'n' random 5 char groups"));
w->add(_("<CPS_FILE:>\tmodem timing test, spec' file"));
w->add(_("<CPS_STRING:s>\tmodem timing test, string 's'"));
w->add(LINE_SEP);
w->add(_("<WAV_TEST>\tWAV file; internal string"));
w->add(_("<WAV_N:n>\tWAV file; 'n' random 5 char groups"));
w->add(_("<WAV_FILE:>\tWAV file; spec' file"));
w->add(_("<WAV_STRING:s>\tWAV file; string 's'"));
w->add(LINE_SEP);
w->add(_("<CSV:on|off|t>\tAnalysis CSV on,off,toggle"));
w->add(LINE_SEP);
w->add(_("<PUSH>\tpush current mode to stack"));
w->add(_("<PUSH:m|f\tpush current mode / audio freq to stack"));
w->add(_("<POP>\tpop current mode/freq from stack"));
w->add(LINE_SEP);
assert(MODE_CONTESTIA < MODE_OLIVIA);
char s[256];
for (trx_mode i = 0; i <= MODE_CONTESTIA; i++) {
snprintf(s, sizeof(s), "<MODEM:%s>", mode_info[i].sname);
w->add(s);
}
// add some Contestia macros
const char* contestia[] = { "250:8", "250:16", "500:8", "500:16", "1000:8", "1000:16" };
for (size_t i = 0; i < sizeof(contestia)/sizeof(*contestia); i++) {
snprintf(s, sizeof(s), "<MODEM:%s:%s>", mode_info[MODE_CONTESTIA].sname, contestia[i]);
w->add(s);
}
for (trx_mode i = MODE_CONTESTIA + 1; i <= MODE_OLIVIA; i++) {
snprintf(s, sizeof(s), "<MODEM:%s>", mode_info[i].sname);
w->add(s);
}
assert(MODE_OLIVIA < MODE_RTTY);
// add some Olivia macros
const char* olivia[] = { "250:8", "250:16", "500:8", "500:16", "1000:8", "500:32", "1000:32" };
for (size_t i = 0; i < sizeof(olivia)/sizeof(*olivia); i++) {
snprintf(s, sizeof(s), "<MODEM:%s:%s>", mode_info[MODE_OLIVIA].sname, olivia[i]);
w->add(s);
}
for (trx_mode i = MODE_OLIVIA + 1; i <= MODE_RTTY; i++) {
snprintf(s, sizeof(s), "<MODEM:%s>", mode_info[i].sname);
w->add(s);
}
// add some RTTY macros
const char* rtty[] = { "170:45.45:5", "170:50:5", "850:75:5" };
for (size_t i = 0; i < sizeof(rtty)/sizeof(*rtty); i++) {
snprintf(s, sizeof(s), "<MODEM:%s:%s>", mode_info[MODE_RTTY].sname, rtty[i]);
w->add(s);
}
for (trx_mode i = MODE_RTTY + 1; i < NUM_MODES; i++) {
snprintf(s, sizeof(s), "<MODEM:%s>", mode_info[i].sname);
w->add(s);
}
#ifndef __MINGW32__
glob_t gbuf;
glob(std::string(ScriptsDir).append("*").c_str(), 0, NULL, &gbuf);
if (gbuf.gl_pathc == 0) {
globfree(&gbuf);
return;
}
w->add(LINE_SEP);
struct stat st;
# if defined(__OpenBSD__)
for (int i = 0; i < gbuf.gl_pathc; i++) {
# else
for (size_t i = 0; i < gbuf.gl_pathc; i++) {
# endif
if (!(stat(gbuf.gl_pathv[i], &st) == 0
&& S_ISREG(st.st_mode) && (st.st_mode & S_IXUSR)))
continue;
const char* p;
if ((p = strrchr(gbuf.gl_pathv[i], '/'))) {
snprintf(s, sizeof(s), "<EXEC>%s</EXEC>", p+1);
w->add(s);
}
}
globfree(&gbuf);
#else
w->add("<EXEC>\tlaunch a program");
#endif
}
void cbMacroEditOK(Fl_Widget *w, void *)
{
if (w == btnMacroEditClose) {
MacroEditDialog->hide();
return;
}
if (iType == MACRO_EDIT_BUTTON) {
update_macro_button(iMacro, macrotext->value(), labeltext->value());
}
else if (iType == MACRO_EDIT_INPUT)
iInput->value(macrotext->value());
}
void update_macro_button(int iMacro, const char *text, const char *name)
{
macros.text[iMacro].assign(text);
macros.name[iMacro].assign(name);
if (progdefaults.mbar_scheme > MACRO_SINGLE_BAR_MAX) {
if (iMacro < NUMMACKEYS) {
btnMacro[iMacro]->label( macros.name[iMacro].c_str() );
btnMacro[iMacro]->redraw_label();
} else if ((iMacro / NUMMACKEYS) == altMacros) {
btnMacro[(iMacro % NUMMACKEYS) + NUMMACKEYS]->label( macros.name[iMacro].c_str() );
btnMacro[(iMacro % NUMMACKEYS) + NUMMACKEYS]->redraw_label();
}
} else {
btnMacro[iMacro % NUMMACKEYS]->label( macros.name[iMacro].c_str() );
btnMacro[iMacro % NUMMACKEYS]->redraw_label();
}
btnDockMacro[iMacro]->label(macros.name[iMacro].c_str());
btnDockMacro[iMacro]->redraw_label();
macros.changed = true;
}
void cbInsertMacro(Fl_Widget *, void *)
{
int nbr = macroDefs->value();
if (!nbr) return;
std::string edittext = macrotext->value();
std::string text = macroDefs->text(nbr);
size_t tab = text.find('\t');
if (tab != std::string::npos)
text.erase(tab);
if (text == LINE_SEP)
return;
if (text == "<FILE:>") {
std::string filters = "Text\t*.txt";
const char* p = FSEL::select(
_("Text file to insert"),
filters.c_str(),
HomeDir.c_str());
if (p && *p) {
text.insert(6, p);
} else
text = "";
} else if ((text == "<CPS_FILE:>") || (text == "<WAV_FILE:>")) {
std::string filters = "Text\t*.txt";
const char* p = FSEL::select(
_("Test text file"),
filters.c_str(),
HomeDir.c_str());
if (p && *p) {
text.insert(10, p);
} else
text = "";
} else if (text == "<IMAGE:>") {
std::string filters = "*.{png,jpg,bmp}\t*.png";
const char *p = FSEL::select(
_("MFSK image file"),
filters.c_str(),
PicsDir.c_str());
if (p && *p) {
text.insert(7, p);
} else
text = "";
} else if (text == "<MACROS:>") {
std::string filters = "Macrost\t*.mdf";
const char* p = FSEL::select(
_("Change to Macro file"),
filters.c_str(),
MacrosDir.c_str());
if (p && *p) {
text.insert(8, p);
} else
text = "";
} else if (text == "<ALERT:>") {
std::string filters = "Audio file\t*.{mp3,wav}";
const char* p = FSEL::select(
_("Select audio file"),
filters.c_str(),
HomeDir.c_str());
if (p && *p) {
text.insert(7, p);
} else
text = "";
} else if (text == "<AUDIO:>") {
std::string filters = "Audio file\t*.{mp3,wav}";
const char* p = FSEL::select(
_("Select audio file"),
filters.c_str(),
HomeDir.c_str());
if (p && *p) {
text.insert(7, p);
} else
text = "";
}
#ifdef __MINGW32__
else if (text == "<EXEC>") {
std::string filters = "Exe\t*.exe";
const char* p = FSEL::select(
_("Executable file to insert"),
filters.c_str(),
HomeDir.c_str());
if (p && *p) {
std::string exefile = p;
exefile.append("</EXEC>");
text.insert(6, exefile);
} else
text = "";
}
#endif
macrotext->insert(text.c_str());
macrotext->take_focus();
}
#include <FL/Fl_Tile.H>
Fl_Double_Window* make_macroeditor(void)
{
Fl_Double_Window* w = new Fl_Double_Window(800, 190, "");
Fl_Group *grpA = new Fl_Group(0, 0, 800, 22);
Fl_Group *grpB = new Fl_Group(450, 0, 350, 22);
btnInsertMacro = new Fl_Button(450, 2, 40, 20);
btnInsertMacro->image(new Fl_Pixmap(left_arrow_icon));
btnInsertMacro->callback(cbInsertMacro);
grpB->end();
grpA->end();
Fl_Group *grpC = new Fl_Group(0, 22, 800, 140);
Fl_Tile *tile = new Fl_Tile(0,22,800,140);
macrotext = new Fl_Input2(0, 22, 450, 140, _("Macro Text"));
macrotext->type(FL_MULTILINE_INPUT);
macrotext->textfont(FL_HELVETICA);
macrotext->align(FL_ALIGN_TOP);
macroDefs = new Fl_Hold_Browser(450, 22, 350, 140, _("Select Tag"));
macroDefs->column_widths(widths);
macroDefs->align(FL_ALIGN_TOP);
Fl_Box *minbox = new Fl_Box(200, 22, 400, 140);
minbox->hide();
tile->end();
tile->resizable(minbox);
grpC->end();
Fl_Group *grpD = new Fl_Group(0, 164, 452, 24);
Fl_Box *box3a = new Fl_Box(0, 164, 327, 24, "");
labeltext = new Fl_Input2(337, 164, 115, 24, _("Macro Button Label"));
labeltext->textfont(FL_HELVETICA);
grpD->end();
grpD->resizable(box3a);
Fl_Group *grpE = new Fl_Group(452, 164, 348, 24);
Fl_Box *box4a = new Fl_Box(452, 164, 92, 24, "");
btnMacroEditApply = new Fl_Button(544, 164, 80, 24, _("Apply"));
btnMacroEditApply->callback(cbMacroEditOK);
btnMacroEditClose = new Fl_Button(626 , 164, 80, 24, _("Close"));
btnMacroEditClose->callback(cbMacroEditOK);
grpE->end();
grpE->resizable(box4a);
w->end();
w->resizable(grpC);
w->size_range( 600, 120);
w->xclass(PACKAGE_NAME);
loadBrowser(macroDefs);
return w;
}
void editMacro(int n, int t, Fl_Input* in)
{
if (!MacroEditDialog)
MacroEditDialog = make_macroeditor();
if (t == MACRO_EDIT_BUTTON) {
std::string editor_label;
editor_label.append(_("Macro editor - ")).append(progStatus.LastMacroFile);
if (editor_label != MacroEditDialog->label())
MacroEditDialog->copy_label(editor_label.c_str());
macrotext->value(macros.text[n].c_str());
labeltext->value(macros.name[n].c_str());
labeltext->show();
}
else if (t == MACRO_EDIT_INPUT) {
MacroEditDialog->label(in->label());
macrotext->value(in->value());
labeltext->hide();
}
macrotext->textfont(progdefaults.MacroEditFontnbr);
macrotext->textsize(progdefaults.MacroEditFontsize);
iMacro = n;
iType = t;
iInput = in;
MacroEditDialog->show();
}
void update_macroedit_font()
{
if (!MacroEditDialog) return;
if (!MacroEditDialog->visible()) return;
macrotext->textfont(progdefaults.MacroEditFontnbr);
macrotext->textsize(progdefaults.MacroEditFontsize);
MacroEditDialog->redraw();
}
| 16,838
|
C++
|
.cxx
| 489
| 32.141104
| 112
| 0.620963
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,154
|
charsetdistiller.cxx
|
w1hkj_fldigi/src/misc/charsetdistiller.cxx
|
// ----------------------------------------------------------------------------
// charsetdistiller.cxx -- input charset cleaning and conversion
//
// Copyright (C) 2012
// Andrej Lajovic, S57LN
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <cstring>
#include <string>
#include "debug.h"
#include "charsetdistiller.h"
#include "tiniconv.h"
/*
CharsetDistiller
This class implements a charset "distiller" that receives input data one
byte at a time and converts this data stream from a particular character
set into UTF-8. Invalid input data is treated as if it was encoded in
CP1252. Character set conversion is performed as soon as possible, i.e.,
when enough input is received to constitute a valid character in the input
character set, this character is immediatly converted into UTF-8 and made
available at the output.
*/
/*
The constructor. Look up tiniconv.h for the list of possible values of
charset_in.
*/
CharsetDistiller::CharsetDistiller(const int charset_in)
{
bufptr = buf;
nutf8 = 0;
tiniconv_init(charset_in, TINICONV_CHARSET_UTF_8, 0, &ctx);
tiniconv_init(TINICONV_CHARSET_CP1252, TINICONV_CHARSET_UTF_8, TINICONV_OPTION_IGNORE_IN_ILSEQ, &ctx1252);
}
/*
Change the input encoding. Look up tiniconv.h for the list of possible
values of charset_in.
Returns 0 if successful or -1 in case of error.
*/
int CharsetDistiller::set_input_encoding(const int charset_in)
{
flush();
return tiniconv_init(charset_in, TINICONV_CHARSET_UTF_8, 0, &ctx);
}
/*
Receive a single byte of input data and make an immediate conversion
attempt.
*/
void CharsetDistiller::rx(const unsigned char c)
{
*bufptr++ = c;
process_buffer();
}
/*
Receive a zero-terminated string of input data.
This is a convenience method: it merely feeds the string into the distiller
one byte at a time.
*/
void CharsetDistiller::rx(const unsigned char *c)
{
const unsigned char *ptr;
for (ptr = c; *ptr != 0; ptr++)
rx(*ptr);
}
/*
Examine the input buffer and decide on the possible actions (construct an
UTF-8 character, interpret the bytes as invalid input etc.)
*/
void CharsetDistiller::process_buffer(void)
{
bool again = true;
while (again)
{
if (bufptr == buf)
{
// the buffer is empty
return;
}
int convert_status;
int consumed_in;
int consumed_out;
unsigned char outbuf[6];
convert_status = tiniconv_convert(&ctx, buf, (bufptr - buf), &consumed_in, outbuf, sizeof(outbuf), &consumed_out);
if (consumed_out)
{
// Append the converted data to the output string.
outdata.append(reinterpret_cast<char *>(outbuf), consumed_out);
// Count the number of converted UTF-8 characters (by counting the
// number of bytes that are not continuation bytes).
for (unsigned char *iptr = outbuf; iptr < outbuf + consumed_out; iptr++)
{
if ((*iptr & 0xc0) != 0x80)
nutf8++;
}
// If not all input was consumed, move the remaining data to the
// beginning of the buffer
if (bufptr - buf > consumed_in)
{
memmove(buf, buf + consumed_in, bufptr - buf - consumed_in);
bufptr -= consumed_in;
}
else
bufptr = buf;
}
again = false;
if (convert_status == TINICONV_CONVERT_OK)
{
// Successful conversion, nothing else to do.
return;
}
else if (convert_status == TINICONV_CONVERT_IN_TOO_SMALL)
{
// Partial data left in the input buffer. We can't proceed with the
// conversion until we get more input.
return;
}
else if (convert_status == TINICONV_CONVERT_IN_ILSEQ)
{
// Invalid sequence in input; spit out the offending byte and try again.
shift_first_out();
again = true;
}
else if (convert_status == TINICONV_CONVERT_OUT_TOO_SMALL)
{
// More characters were available than could be converted in one
// go. Have another round.
again = true;
}
// The following two cases should never happen.
else if (convert_status == TINICONV_CONVERT_OUT_ILSEQ)
{
LOG_ERROR("Character not representable in UTF-8? Is this possible?");
bufptr = buf;
return;
}
else
{
LOG_ERROR("Unknown tiniconv return value %d.", convert_status);
bufptr = buf;
return;
}
}
}
/*
Convert the first byte of the input buffer; treat it as if it was encoded
in CP1252
*/
void CharsetDistiller::shift_first_out(void)
{
int consumed_in;
int consumed_out;
unsigned char outbuf[6];
tiniconv_convert(&ctx1252, buf, 1, &consumed_in, outbuf, sizeof(outbuf), &consumed_out);
outdata.append(reinterpret_cast<char *>(outbuf), consumed_out);
nutf8++;
memmove(buf, buf+1, (bufptr - buf - 1));
bufptr--;
}
/*
Flush input. Recode the input data left in the buffer in whatever way
necessary to make the buffer empty.
*/
void CharsetDistiller::flush(void)
{
while (bufptr > buf)
shift_first_out();
}
/*
Reset input buffer. All data still waiting in the input buffer is lost.
Data already converted and waiting at the output is not affected.
*/
void CharsetDistiller::reset(void)
{
bufptr = buf;
}
/*
Clear the output buffer.
*/
void CharsetDistiller::clear(void)
{
outdata.clear();
nutf8 = 0;
}
/*
Return the number of bytes available in the output buffer.
*/
int CharsetDistiller::data_length(void)
{
return outdata.length();
}
/*
Return the number of UTF-8 characters in the output buffer.
*/
int CharsetDistiller::num_chars(void)
{
return nutf8;
}
/*
Return a reference to the output buffer.
*/
const std::string &CharsetDistiller::data(void)
{
return outdata;
}
| 6,666
|
C++
|
.cxx
| 218
| 26.050459
| 120
| 0.664307
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,155
|
re.cxx
|
w1hkj_fldigi/src/misc/re.cxx
|
// ----------------------------------------------------------------------------
// re.cxx
//
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <vector>
#include <string>
#include "re.h"
re_t::re_t(const char* pattern_, int cflags_)
: pattern(pattern_), cflags(cflags_), eflags(0), error(false)
{
compile();
}
re_t::re_t(const re_t& re)
: pattern(re.pattern), cflags(re.cflags), eflags(re.eflags),
suboffsets(re.suboffsets), substrings(re.substrings)
{
compile();
}
re_t::~re_t()
{
if (!error)
regfree(&preg);
}
re_t& re_t::operator=(const re_t& rhs)
{
if (&rhs == this)
return *this;
pattern = rhs.pattern;
cflags = rhs.cflags;
eflags = rhs.eflags;
suboffsets = rhs.suboffsets;
substrings = rhs.substrings;
if (!error)
regfree(&preg);
compile();
return *this;
}
void re_t::recompile(const char* pattern_)
{
pattern = pattern_;
if (!error)
regfree(&preg);
compile();
}
void re_t::compile(void)
{
error = regcomp(&preg, pattern.c_str(), cflags);
if (!error && !(cflags & REG_NOSUB) && preg.re_nsub > 0)
suboffsets.resize(preg.re_nsub + 1);
}
bool re_t::match(const char* str, int eflags_)
{
if (error)
return false;
eflags = eflags_;
bool nosub = cflags & REG_NOSUB || preg.re_nsub == 0;
bool found = !regexec(&preg, str, (nosub ? 0 : preg.re_nsub+1),
(nosub ? NULL : &suboffsets[0]), eflags_);
substrings.clear();
if (found && !nosub) {
size_t n = suboffsets.size();
substrings.resize(n);
for (size_t i = 0; i < n; i++)
if (suboffsets[i].rm_so != -1)
substrings[i].assign(str + suboffsets[i].rm_so,
suboffsets[i].rm_eo - suboffsets[i].rm_so);
}
return found;
}
const std::string& re_t::submatch(size_t n) const
{
return substrings[n];
}
void re_t::suboff(size_t n, int* start, int* end) const
{
if (n < nsub()) {
if (start) *start = suboffsets[n].rm_so;
if (end) *end = suboffsets[n].rm_eo;
}
else {
if (start) *start = -1;
if (end) *end = -1;
}
}
#if HAVE_STD_HASH
# include <functional>
#elif HAVE_STD_TR1_HASH
# include <tr1/functional>
#else
# error "No std::hash or std::tr1::hash support"
#endif
size_t re_t::hash(void) const
{
#if HAVE_STD_HASH
size_t h = std::hash<std::string>()(pattern);
return h ^ (std::hash<int>()(cflags) + 0x9e3779b9 + (h << 6) + (h >> 2));
#elif HAVE_STD_TR1_HASH
size_t h = std::tr1::hash<std::string>()(pattern);
return h ^ (std::tr1::hash<int>()(cflags) + 0x9e3779b9 + (h << 6) + (h >> 2));
#endif
}
// ------------------------------------------------------------------------
fre_t::fre_t(const char* pattern_, int cflags_) : re_t(pattern_, cflags_) { }
bool fre_t::match(const char* str, int eflags_)
{
if (error)
return false;
bool nosub = cflags & REG_NOSUB || preg.re_nsub == 0;
return !regexec(&preg, str, (nosub ? 0 : preg.re_nsub+1),
(nosub ? NULL : &suboffsets[0]), eflags_);
}
| 3,646
|
C++
|
.cxx
| 129
| 26.317829
| 79
| 0.621173
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,156
|
ax25_decode.cxx
|
w1hkj_fldigi/src/misc/ax25_decode.cxx
|
// ---------------------------------------------------------------------
// ax25_decode.cxx -- AX25 Packet disassembler.
//
// This file is a proposed part of fldigi. Adapted very liberally from
// rtty.cxx, with many thanks to John Hansen, W2FS, who wrote
// 'dcc.doc' and 'dcc2.doc', GNU Octave, GNU Radio Companion, and finally
// Bartek Kania (bk.gnarf.org) whose 'aprs.c' expository coding style helped
// shape this implementation.
//
// Copyright (C) 2010, 2014
// Dave Freese, W1HKJ
// Chris Sylvain, KB3CS
// Robert Stiles, KK5VD
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi; if not, write to the
//
// Free Software Foundation, Inc.
// 51 Franklin Street, Fifth Floor
// Boston, MA 02110-1301 USA.
//
// ---------------------------------------------------------------------
#include "fl_digi.h"
#include "modem.h"
#include "misc.h"
#include "confdialog.h"
#include "configuration.h"
#include "status.h"
#include "timeops.h"
#include "debug.h"
#include "qrunner.h"
#include "threads.h"
#include "ax25_decode.h"
static PKT_MicE_field MicE_table[][12][5] = {
{
{ Zero, Zero, South, P0, East },
{ One, Zero, South, P0, East },
{ Two, Zero, South, P0, East },
{ Three, Zero, South, P0, East },
{ Four, Zero, South, P0, East },
{ Five, Zero, South, P0, East },
{ Six, Zero, South, P0, East },
{ Seven, Zero, South, P0, East },
{ Eight, Zero, South, P0, East },
{ Nine, Zero, South, P0, East },
{ Invalid, Null, Null, Null, Null },
{ Invalid, Null, Null, Null, Null }
},
{ // ['A'..'K'] + 'L'
{ Zero, One, Null, Null, Null }, // custom A/B/C msg codes
{ One, One, Null, Null, Null },
{ Two, One, Null, Null, Null },
{ Three, One, Null, Null, Null },
{ Four, One, Null, Null, Null },
{ Five, One, Null, Null, Null },
{ Six, One, Null, Null, Null },
{ Seven, One, Null, Null, Null },
{ Eight, One, Null, Null, Null },
{ Nine, One, Null, Null, Null },
{ Space, One, Null, Null, Null },
{ Space, Zero, South, P0, East }
},
{ // ['P'..'Z']
{ Zero, One, North, P100, West }, // standard A/B/C msg codes
{ One, One, North, P100, West },
{ Two, One, North, P100, West },
{ Three, One, North, P100, West },
{ Four, One, North, P100, West },
{ Five, One, North, P100, West },
{ Six, One, North, P100, West },
{ Seven, One, North, P100, West },
{ Eight, One, North, P100, West },
{ Nine, One, North, P100, West },
{ Space, One, North, P100, West },
{ Invalid, Null, Null, Null, Null }
} };
static PKT_PHG_table PHG_table[] = {
{ "Omni", 4 },
{ "NE", 2 },
{ "E", 1 },
{ "SE", 2 },
{ "S", 1 },
{ "SW", 2 },
{ "W", 1 },
{ "NW", 2 },
{ "N", 1 }
};
static unsigned char rxbuf[MAXOCTETS+4];
int mode = FTextBase::RECV;
#define put_rx_char put_rx_local_char
inline void put_rx_local_char(char value)
{
put_rx_processed_char(value, mode);
}
inline void put_rx_hex(unsigned char c)
{
char v[3];
snprintf(&v[0], 3, "%02x", c);
put_rx_char(v[0]);
put_rx_char(v[1]);
}
inline void put_rx_const(const char s[])
{
unsigned char *p = (unsigned char *) &s[0];
for( ; *p; p++) put_rx_char(*p);
}
static void expand_Cmp(unsigned char *cpI)
{
// APRS Spec 1.0.1 Chapter 9 - Compressed Position Report format
unsigned char *cp, tc, cc;
unsigned char Cmpbuf[96], *bp = &Cmpbuf[0];
unsigned char *tbp = bp;
double Lat, Lon, td;
bool sign;
cp = cpI+1; // skip past Symbol Table ID char
// Latitude as base91 number
tc = *cp++ - 33;
Lat = tc * 91 * 91 * 91; // fourth digit ==> x * 91^3
tc = *cp++ - 33;
Lat += tc * 91 * 91; // third digit ==> x * 91^2
tc = *cp++ - 33;
Lat += tc * 91; // second digit ==> x * 91^1
tc = *cp++ - 33;
Lat += tc; // units digit ==> x * 91^0
Lat = 90.0 - Lat / 380926.0; // - ==> S, + ==> N
// Longitude as base91 number
tc = *cp++ - 33;
Lon = tc * 91 * 91 * 91; // 4th digit
tc = *cp++ - 33;
Lon += tc * 91 * 91; // 3rd digit
tc = *cp++ - 33;
Lon += tc * 91; // 2nd digit
tc = *cp++ - 33;
Lon += tc; // units digit
Lon = -180.0 + Lon / 190463.0; // - ==> W, + ==> E
if (Lat < 0) {
sign = 1; // has sign (is negative)
Lat *= -1;
}
else sign = 0;
td = Lat - floor(Lat);
cc = snprintf((char *)bp, 3, "%2.f", (Lat - td)); // DD
bp += cc;
cc = snprintf((char *)bp, 6, "%05.2f", td*60); // MM.MM
bp += cc;
if (sign) *bp++ = 'S';
else *bp++ = 'N';
*bp++ = ' ';
if (Lon < 0) {
sign = 1;
Lon *= -1;
}
else sign = 0;
td = Lon - floor(Lon);
cc = snprintf((char *)bp, 4, "%03.f", (Lon - td)); // DDD
bp += cc;
cc = snprintf((char *)bp, 6, "%5.2f", td*60); // MM.MM
bp += cc;
if (sign) *bp++ = 'W';
else *bp++ = 'E';
cp += 1; // skip past Symbol Code char
if (*cp != ' ') { // still more
if ((*(cp + 2) & 0x18) == 0x10) { // NMEA source = GGA sentence
// compressed Altitude uses chars in the same range
// as CSE/SPD but the Compression Type ID takes precedence
// when it indicates the NMEA source is a GGA sentence.
// so check on this one first and CSE/SPD last.
double Altitude;
tc = *cp++ - 33; // 2nd digit
Altitude = tc * 91;
tc = *cp++ - 33;
Altitude += tc;
// this compressed posit field is not very useful as spec'ed,
// since it cannot produce a possible negative altitude!
// the NMEA GGA sentence is perfectly capable of providing
// a negative altitude value. Mic-E gets this right.
// Since the example given in the APRS 1.0.1 Spec uses a value
// in excess of 10000, this field should be re-spec'ed as a
// value in meters relative to 10km below mean sea level (just
// as done in Mic-E).
Altitude = pow(1.002, Altitude);
if (progdefaults.PKT_unitsSI)
cc = snprintf((char *)bp, 11, " %-.1fm", Altitude*0.3048);
else // units per Spec
cc = snprintf((char *)bp, 12, " %-.1fft", Altitude);
bp += cc;
}
else if (*cp == '{') { // pre-calculated radio range
double Range;
cp += 1; // skip past ID char
tc = *cp++ - 33; // range
Range = pow(1.08, (double)tc) * 2;
if (progdefaults.PKT_unitsSI)
cc = snprintf((char *)bp, 24, " Est. Range = %-.1fkm", Range*1.609);
else // units per Spec
cc = snprintf((char *)bp, 24, " Est. Range = %-.1fmi", Range);
bp += cc;
}
else if (*cp >= '!' && *cp <= 'z') { // compressed CSE/SPD
int Speed;
tc = *cp++ - 33; // course
cc = snprintf((char *)bp, 8, " %03ddeg", tc*4);
bp += cc;
tc = *cp++ - 33; // speed
Speed = (int)floor(pow(1.08, (double)tc) - 1); // 1.08^tc - 1 kts
if (progdefaults.PKT_unitsSI)
cc = snprintf((char *)bp, 8, " %03dkph", (int)floor(Speed*1.852+0.5));
else if (progdefaults.PKT_unitsEnglish)
cc = snprintf((char *)bp, 8, " %03dmph", (int)floor(Speed*1.151+0.5));
else // units per Spec
cc = snprintf((char *)bp, 8, " %03dkts", Speed);
bp += cc;
}
}
if (progdefaults.PKT_RXTimestamp)
put_rx_const(" ");
put_rx_const(" [Cmp] ");
for(; tbp < bp; tbp++) put_rx_char(*tbp);
put_rx_char('\r');
if (debug::level >= debug::VERBOSE_LEVEL) {
cp = cpI+12; // skip to Compression Type ID char
if (*(cp - 2) != ' ') { // Cmp Type ID is valid
tbp = bp = &Cmpbuf[0];
tc = *cp - 33; // T
cc = snprintf((char *)bp, 4, "%02x:", tc);
bp += cc;
strcpy((char *)bp, " GPS Fix = ");
bp += 11;
if ((tc & 0x20) == 0x20) {
strcpy((char *)bp, "old");
bp += 3;
}
else {
strcpy((char *)bp, "current");
bp += 7;
}
strcpy((char *)bp, ", NMEA Source = ");
bp += 16;
switch (tc & 0x18) {
case 0x00:
strcpy((char *)bp, "other");
bp += 5;
break;
case 0x08:
strcpy((char *)bp, "GLL");
bp += 3;
break;
case 0x10:
strcpy((char *)bp, "GGA");
bp += 3;
break;
case 0x18:
strcpy((char *)bp, "RMC");
bp += 3;
break;
default:
strcpy((char *)bp, "\?\?");
bp += 2;
break;
}
strcpy((char *)bp, ", Cmp Origin = ");
bp += 15;
switch (tc & 0x07) {
case 0x00:
strcpy((char *)bp, "Compressed");
bp += 10;
break;
case 0x01:
strcpy((char *)bp, "TNC BText");
bp += 9;
break;
case 0x02:
strcpy((char *)bp, "Software (DOS/Mac/Win/+SA)");
bp += 26;
break;
case 0x03:
strcpy((char *)bp, "[tbd]");
bp += 5;
break;
case 0x04:
strcpy((char *)bp, "KPC3");
bp += 4;
break;
case 0x05:
strcpy((char *)bp, "Pico");
bp += 4;
break;
case 0x06:
strcpy((char *)bp, "Other tracker [tbd]");
bp += 19;
break;
case 0x07:
strcpy((char *)bp, "Digipeater conversion");
bp += 21;
break;
default:
strcpy((char *)bp, "\?\?");
bp += 2;
break;
}
if (progdefaults.PKT_RXTimestamp)
put_rx_const(" ");
put_rx_const(" [CmpType] ");
for(; tbp < bp; tbp++) put_rx_char(*tbp);
put_rx_char('\r');
}
}
}
static void expand_PHG(unsigned char *cpI)
{
// APRS Spec 1.0.1 Chapter 6 - Time and Position format
// APRS Spec 1.0.1 Chapter 7 - PHG Extension format
bool hasPHG = false;
unsigned char *cp, tc, cc;
unsigned char PHGbuf[64], *bp = &PHGbuf[0];
unsigned char *tbp = bp;
switch (*cpI) {
case '!':
case '=': // simplest posits
cp = cpI+1; // skip past posit ID char
if (*cp != '/') { // posit not compressed
cp += 19; // skip past posit data
}
else { // posit is compressed
cp += 1; // skip past compressed posit ID char
cp += 12; // skip past compressed posit data
}
if (strncmp((const char *)cp, "PHG", 3) == 0) { // strings match
unsigned char ndigits;
int power, height;
double gain, range;
cp += 3; // skip past Data Extension ID chars
// get span of chars in cp which are only digits
ndigits = strspn((const char *)cp, "0123456789");
switch (ndigits) {
//case 1: H might be larger than '9'. code below will work.
// must also check that P.GD are all '0'-'9'
//break;
case 4: // APRS Spec 1.0.1 Chapter 7 page 28
case 5: // PHGR proposed for APRS Spec 1.2
hasPHG = true;
tc = *cp++ - '0'; // P
power = tc * tc; // tc^2
cc = snprintf((char *)bp, 5, "%dW,", power);
bp += cc;
tc = *cp++ - '0'; // H
*bp++ = ' ';
if (tc < 30) { // constrain Height to signed 32bit value
height = 10 * (1 << tc); // 10 * 2^tc
if (progdefaults.PKT_unitsSI)
cc = snprintf((char *)bp, 11, "%dm", (int)floor(height*0.3048+0.5));
else // units per Spec
cc = snprintf((char *)bp, 12, "%dft", height);
bp += cc;
}
else {
height = 0;
strcpy((char *)bp, "-\?\?-");
bp += 4;
}
strcpy((char *)bp, " HAAT,");
bp += 6;
tc = *cp++; // G
gain = pow(10, ((double)(tc - '0') / 10));
cc = snprintf((char *)bp, 6, " %cdB,", tc);
bp += cc;
tc = *cp++ - '0'; // D
*bp++ = ' ';
if (tc < 9) {
strcpy((char *)bp, PHG_table[tc].s);
bp += PHG_table[tc].l;
}
else {
strcpy((char *)bp, "-\?\?-");
bp += 4;
}
*bp++ = ',';
range = sqrt(2 * height * sqrt(((double)power / 10) * (gain / 2)));
if (progdefaults.PKT_unitsSI)
cc = snprintf((char *)bp, 24, " Est. Range = %-.1fkm", range*1.609);
else // units per Spec
cc = snprintf((char *)bp, 24, " Est. Range = %-.1fmi", range);
bp += cc;
if (ndigits == 5 && *(cp + 1) == '/') {
// PHGR: http://www.aprs.org/aprs12/probes.txt
// '1'-'9' and 'A'-'Z' are actually permissible.
// does anyone send 10 ('A') or more beacons per hour?
strcpy((char *)bp, ", ");
bp += 2;
tc = *cp++; // R
cc = snprintf((char *)bp, 14, "%c beacons/hr", tc);
bp += cc;
}
break;
default: // switch(ndigits)
break;
}
}
break;
default: // switch(*cpI)
break;
}
if (hasPHG) {
if (progdefaults.PKT_RXTimestamp)
put_rx_const(" ");
put_rx_const(" [PHG] ");
for(; tbp < bp; tbp++) put_rx_char(*tbp);
put_rx_char('\r');
}
}
static void expand_MicE(unsigned char *cpI, unsigned char *cpE)
{
// APRS Spec 1.0.1 Chapter 10 - Mic-E Data format
bool isMicE = true;
bool msgstd = false, msgcustom = false;
// decoding starts at first AX.25 dest addr
unsigned char *cp = &rxbuf[1], tc, cc;
unsigned char MicEbuf[64], *bp = &MicEbuf[0];
unsigned char *tbp = bp;
unsigned int msgABC = 0;
PKT_MicE_field Lat = North, LonOffset = Zero, Lon = West;
for (int i = 0; i < 3; i++) {
// remember: AX.25 dest addr chars are shifted left by one
tc = *cp++ >> 1;
switch (tc & 0xF0) {
case 0x30: // MicE_table[0]
cc = tc - '0';
if (cc < 10) {
*bp++ = MicE_table[0][cc][0];
}
else isMicE = false;
break;
case 0x40: // MicE_table[1]
cc = tc - 'A';
if (cc < 12) {
bool t = MicE_table[1][cc][1]-'0';
if (t) {
msgABC |= t << (2-i);
msgcustom = true;
}
else msgABC &= ~(1 << (2-i));
*bp++ = MicE_table[1][cc][0];
}
else isMicE = false;
break;
case 0x50: // MicE_table[2]
cc = tc - 'P';
if (cc < 11) {
msgABC |= (MicE_table[2][cc][1]-'0') << (2-i);
msgstd = true;
*bp++ = MicE_table[2][cc][0];
}
else isMicE = false;
break;
default: // Invalid
isMicE = false;
break;
}
}
for (int i = 3; i < 6; i++) {
// remember: AX.25 dest addr chars are shifted left by one
tc = *cp++ >> 1;
switch (i) {
case 3:
switch (tc & 0xF0) {
case 0x30: // MicE_table[0]
cc = tc - '0';
if (cc < 10) {
Lat = MicE_table[0][cc][2];
*bp++ = MicE_table[0][cc][0];
}
else isMicE = false;
break;
case 0x40: // MicE_table[1]
cc = tc - 'A';
if (cc == 11) {
Lat = MicE_table[1][cc][2];
*bp++ = MicE_table[1][cc][0];
}
else isMicE = false;
break;
case 0x50: // MicE_table[2]
cc = tc - 'P';
if (cc < 11) {
Lat = MicE_table[2][cc][2];
*bp++ = MicE_table[2][cc][0];
}
else isMicE = false;
break;
default: // Invalid
isMicE = false;
break;
}
break;
case 4:
switch (tc & 0xF0) {
case 0x30: // MicE_table[0]
cc = tc - '0';
if (cc < 10) {
LonOffset = MicE_table[0][cc][3];
*bp++ = MicE_table[0][cc][0];
}
else isMicE = false;
break;
case 0x40: // MicE_table[1]
cc = tc - 'A';
if (cc == 11) {
LonOffset = MicE_table[1][cc][3];
*bp++ = MicE_table[1][cc][0];
}
else isMicE = false;
break;
case 0x50: // MicE_table[2]
cc = tc - 'P';
if (cc < 11) {
LonOffset = MicE_table[2][cc][3];
*bp++ = MicE_table[2][cc][0];
}
else isMicE = false;
break;
default: // Invalid
isMicE = false;
break;
}
break;
case 5:
switch (tc & 0xF0) {
case 0x30: // MicE_table[0]
cc = tc - '0';
if (cc < 10) {
Lon = MicE_table[0][cc][4];
*bp++ = MicE_table[0][cc][0];
}
else isMicE = false;
break;
case 0x40: // MicE_table[1]
cc = tc - 'A';
if (cc == 11) {
Lon = MicE_table[1][cc][4];
*bp++ = MicE_table[1][cc][0];
}
else isMicE = false;
break;
case 0x50: // MicE_table[2]
cc = tc - 'P';
if (cc < 11) {
Lon = MicE_table[2][cc][4];
*bp++ = MicE_table[2][cc][0];
}
else isMicE = false;
break;
default: // Invalid
isMicE = false;
break;
}
break;
default: // Invalid
isMicE = false;
break;
}
}
if (isMicE) {
int Speed = 0, Course = 0;
if (progdefaults.PKT_RXTimestamp)
put_rx_const(" ");
put_rx_const(" [Mic-E] ");
if (msgstd && msgcustom)
put_rx_const("Unknown? ");
else if (msgcustom) {
put_rx_const("Custom-");
put_rx_char((7 - msgABC)+'0');
put_rx_const(". ");
}
else {
switch (msgABC) { // APRS Spec 1.0.1 Chapter 10 page 45
case 0:
put_rx_const("Emergency");
break;
case 1:
put_rx_const("Priority");
break;
case 2:
put_rx_const("Special");
break;
case 3:
put_rx_const("Committed");
break;
case 4:
put_rx_const("Returning");
break;
case 5:
put_rx_const("In Service");
break;
case 6:
put_rx_const("En Route");
break;
case 7:
put_rx_const("Off Duty");
break;
default:
put_rx_const("-\?\?-");
break;
}
if (msgABC) put_rx_char('.');
else put_rx_char('!'); // Emergency!
put_rx_char(' ');
}
for (; tbp < bp; tbp++) {
put_rx_char(*tbp);
if (tbp == (bp - 3)) put_rx_char('.');
}
if (Lat == North) put_rx_char('N');
else if (Lat == South) put_rx_char('S');
else put_rx_char('\?');
put_rx_char(' ');
cp = cpI+1; // one past the Data Type ID char
// decode Lon degrees - APRS Spec 1.0.1 Chapter 10 page 48
tc = *cp++ - 28;
if (LonOffset == P100) tc += 100;
if (tc > 179 && tc < 190) tc -= 80;
else if (tc > 189 && tc < 200) tc -= 190;
cc = snprintf((char *)bp, 4, "%03d", tc);
bp += cc;
// decode Lon minutes
tc = *cp++ - 28;
if (tc > 59) tc -= 60;
cc = snprintf((char *)bp, 3, "%02d", tc);
bp += cc;
// decode Lon hundredths of a minute
tc = *cp++ - 28;
cc = snprintf((char *)bp, 3, "%02d", tc);
bp += cc;
for (; tbp < bp; tbp++) {
put_rx_char(*tbp);
if (tbp == (bp - 3)) put_rx_char('.');
}
if (Lon == East) put_rx_char('E');
else if (Lon == West) put_rx_char('W');
else put_rx_char('\?');
// decode Speed and Course - APRS Spec 1.0.1 Chapter 10 page 52
tc = *cp++ - 28; // speed: hundreds and tens
if (tc > 79) tc -= 80;
Speed = tc * 10;
tc = *cp++ - 28; // speed: units and course: hundreds
Course = (tc % 10); // remainder from dividing by 10
tc -= Course; tc /= 10; // tc is now quotient from dividing by 10
Speed += tc;
if (Course > 3) Course -= 4;
Course *= 100;
tc = *cp++ - 28; // course: tens and units
Course += tc;
if (progdefaults.PKT_unitsSI)
cc = snprintf((char *)bp, 8, " %03dkph", (int)floor(Speed*1.852+0.5));
else if (progdefaults.PKT_unitsEnglish)
cc = snprintf((char *)bp, 8, " %03dmph", (int)floor(Speed*1.151+0.5));
else // units per Spec
cc = snprintf((char *)bp, 8, " %03dkts", Speed);
bp += cc;
cc = snprintf((char *)bp, 8, " %03ddeg", Course);
bp += cc;
for (; tbp < bp; tbp++) {
put_rx_char(*tbp);
}
cp += 2; // skip past Symbol and Symbol Table ID chars
if (cp <= cpE) { // still more
if (*cp == '>') {
cp += 1;
put_rx_const(" TH-D7");
}
else if (*cp == ']' && *cpE == '=') {
cp += 1;
cpE -= 1;
put_rx_const(" TM-D710");
}
else if (*cp == ']') {
cp += 1;
put_rx_const(" TM-D700");
}
else if (*cp == '\'' && *(cpE - 1) == '|' && *cpE == '3') {
cp += 1;
cpE -= 2;
put_rx_const(" TT3");
}
else if (*cp == '\'' && *(cpE - 1) == '|' && *cpE == '4') {
cp += 1;
cpE -= 2;
put_rx_const(" TT4");
}
else if (*cp == '`' && *(cpE - 1) == '_' && *cpE == ' ') {
cp += 1;
cpE -= 2;
put_rx_const(" VX-8");
}
else if (*cp == '`' && *(cpE - 1) == '_' && *cpE == '#') {
cp += 1;
cpE -= 2;
put_rx_const(" VX-8D/G"); // VX-8G for certain. guessing.
}
else if (*cp == '`' && *(cpE - 1) == '_' && *cpE == '\"') {
cp += 1;
cpE -= 2;
put_rx_const(" FTM-350");
}
else if ((*cp == '\'' || *cp == '`') && *(cp + 4) == '}') {
cp += 1;
// tracker? rig? ID codes are somewhat ad hoc.
put_rx_const(" MFR\?");
}
if (cp < cpE) {
if (*(cp + 3) == '}') { // station altitude as base91 number
int Altitude = 0;
tc = *cp++ - 33; // third digit ==> x * 91^2
Altitude = tc * 91 * 91;
tc = *cp++ - 33; // second digit ==> x * 91^1 ==> x * 91
Altitude += tc * 91;
tc = *cp++ - 33; // unit digit ==> x * 91^0 ==> x * 1
Altitude += tc;
Altitude -= 10000; // remove offset from datum
*bp++ = ' ';
if (Altitude >= 0) *bp++ = '+';
if (progdefaults.PKT_unitsEnglish)
cc = snprintf((char *)bp, 12, "%dft", (int)floor(Altitude*3.281+0.5));
else // units per Spec
cc = snprintf((char *)bp, 11, "%dm", Altitude);
bp += cc;
for (; tbp < bp; tbp++) {
put_rx_char(*tbp);
}
cp += 1; // skip past '}'
}
}
if (cp < cpE) put_rx_char(' ');
for (; cp <= cpE; cp++) put_rx_char(*cp);
}
put_rx_char('\r');
}
}
static void do_put_rx_char(unsigned char *cp, size_t count)
{
int i, j;
unsigned char c;
bool isMicE = false;
unsigned char *cpInfo;
for (i = 8; i < 14; i++) { // src callsign is second in AX.25 frame
c = rxbuf[i] >> 1;
if (c != ' ') put_rx_char(c); // skip past padding (if any)
}
// bit 7 = command/response bit
// bits 6,5 = 1
// bits 4-1 = src SSID
// bit 0 = last callsign flag
c = (rxbuf[14] & 0x7f) >> 1;
if (c > 0x30) {
put_rx_char('-');
if (c < 0x3a)
put_rx_char(c);
else {
put_rx_char('1');
put_rx_char(c-0x0a);
}
}
put_rx_char('>');
for (i = 1; i < 7; i++) { // dest callsign is first in AX.25 frame
c = rxbuf[i] >> 1;
if (c != ' ') put_rx_char(c);
}
c = (rxbuf[7] & 0x7f) >> 1;
if (c > 0x30) {
put_rx_char('-');
if (c < 0x3a)
put_rx_char(c);
else {
put_rx_char('1');
put_rx_char(c-0x0a);
}
}
j=8;
if ((rxbuf[14] & 0x01) != 1) { // check last callsign flag
do {
put_rx_char(',');
j += 7;
for (i = j; i < (j+6); i++) {
c = rxbuf[i] >> 1;
if (c != ' ') put_rx_char(c);
}
c = (rxbuf[j+6] & 0x7f) >> 1;
if (c > 0x30) {
put_rx_char('-');
if (c < 0x3a)
put_rx_char(c);
else {
put_rx_char('1');
put_rx_char(c-0x0a);
}
}
} while ((rxbuf[j+6] & 0x01) != 1);
if (rxbuf[j+6] & 0x80) // packet gets no more hops
put_rx_char('*');
}
if (debug::level < debug::VERBOSE_LEVEL) {
// skip past CTRL and PID to INFO bytes when I_FRAME
// puts buffer pointer in FCS when U_FRAME and S_FRAME
// (save CTRL byte for possible MicE decoding)
j += 7;
c = rxbuf[j];
j += 2;
}
else { // show more frame info when .ge. VERBOSE debug level
j += 7;
put_rx_char(';');
c = rxbuf[j]; // CTRL present in all frames
if ((c & 0x01) == 0) { // I_FRAME
unsigned char p = rxbuf[j+1]; // PID present only in I_FRAME
if (debug::level == debug::DEBUG_LEVEL) {
put_rx_hex(c);
put_rx_char(' ');
put_rx_hex(p);
put_rx_char(';');
}
put_rx_const("I/");
put_rx_hex( (c & 0xE0) >> 5 ); // AX.25 v2.2 para 2.3.2.1
if (c & 0x10) put_rx_char('*'); // P/F bit
else put_rx_char('.');
put_rx_hex( (c & 0x0E) >> 1 );
put_rx_char('/');
switch (p) { // AX.25 v2.2 para 2.2.4
case 0x01:
put_rx_const("X.25PLP");
break;
case 0x06:
put_rx_const("C-TCPIP");
break;
case 0x07:
put_rx_const("U-TCPIP");
break;
case 0x08:
put_rx_const("FRAG");
break;
case 0xC3:
put_rx_const("TEXNET");
break;
case 0xC4:
put_rx_const("LQP");
break;
case 0xCA:
put_rx_const("ATALK");
break;
case 0xCB:
put_rx_const("ATALK-ARP");
break;
case 0xCC:
put_rx_const("ARPA-IP");
break;
case 0xCD:
put_rx_const("ARPA-AR");
break;
case 0xCE:
put_rx_const("FLEXNET");
break;
case 0xCF:
put_rx_const("NET/ROM");
break;
case 0xF0:
put_rx_const("NO-L3");
break;
case 0xFF:
put_rx_const("L3ESC=");
put_rx_hex(rxbuf[++j]);
break;
default:
if ((p & 0x30) == 0x10) put_rx_const("L3V1");
else if ((p & 0x30) == 0x20) put_rx_const("L3V2");
else put_rx_const("L3-RSVD");
put_rx_char('=');
put_rx_hex(p);
break;
}
}
else if ((c & 0x03) == 0x01) { // S_FRAME
if (debug::level == debug::DEBUG_LEVEL) {
put_rx_hex(c);
put_rx_char(';');
}
put_rx_const("S/");
put_rx_hex( (c & 0xE0) >> 5 );
if (c & 0x10) put_rx_char('*');
else put_rx_char('.');
put_rx_char('/');
switch (c & 0x0C) { // AX.25 v2.2 para 2.3.4.2
case 0x00:
put_rx_const("RR");
break;
case 0x04:
put_rx_const("RNR");
break;
case 0x08:
put_rx_const("REJ");
break;
case 0x0C:
default:
put_rx_const("UNK");
break;
}
}
else if ((c & 0x03) == 0x03) { // U_FRAME
if (debug::level == debug::DEBUG_LEVEL) {
put_rx_hex(c);
put_rx_char(';');
}
put_rx_char('U');
if (c & 0x10) put_rx_char('*');
else put_rx_char('.');
switch (c & 0xEC) { // AX.25 v2.2 para 2.3.4.3
case 0x00:
put_rx_const("UI");
break;
case 0x0E:
put_rx_const("DM");
break;
case 0x1E:
put_rx_const("SABM");
break;
case 0x20:
put_rx_const("DISC");
break;
case 0x30:
put_rx_const("UA");
break;
case 0x81:
put_rx_const("FRMR");
break;
default:
put_rx_const("UNK");
break;
}
}
j+=2;
}
put_rx_char(':');
// ptr to first info field char
cpInfo = &rxbuf[j];
if ((c & 0x03) == 0x03 && (c & 0xEC) == 0x00
&& (*cpInfo == '\'' || *cpInfo == '`'
|| *cpInfo == 0x1C || *cpInfo == 0x1D)
&& (cp - cpInfo) > 7) {
/*
Mic-E must have at least 8 info chars + Data Type ID char
cp - (cpInfo - 1) > 8 ==> cp - cpInfo > 7
*/
// this is very probably a Mic-E encoded packet
isMicE = true;
}
// offset between last info char (not FCS) and bufhead
//i = (cp - &rxbuf[0]); // (cp - &rxbuf[1]) + 1 ==> (cp - &rxbuf[0])
i = count; // (cp - &rxbuf[1]) + 1 ==> (cp - &rxbuf[0])
while (j < i) put_rx_char(rxbuf[j++]);
if (*(cp-1) != '\r')
put_rx_char('\r'); // <cr> only for packets not ending with <cr>
// cp points to FCS, so (cp-X) is last info field char
if ((progdefaults.PKT_expandMicE || debug::level >= debug::VERBOSE_LEVEL)
&& isMicE)
expand_MicE(cpInfo, (*(cp-1) == '\r' ? cp-2 : cp-1));
// need to deal with posits having timestamps ('/' and '@' leading char)
if (*cpInfo == '!' || *cpInfo == '=') {
if ((progdefaults.PKT_expandCmp || debug::level >= debug::VERBOSE_LEVEL)
&& (*(cpInfo + 1) == '/' || *(cpInfo + 1) == '\\'))
// compressed posit
expand_Cmp(cpInfo+1);
if (progdefaults.PKT_expandPHG
|| debug::level >= debug::VERBOSE_LEVEL) // look for PHG data
expand_PHG(cpInfo);
}
if (*(cp-1) == '\r')
put_rx_char('\r'); // for packets ending with <cr>: show it on-screen
}
extern bool PERFORM_CPS_TEST;
static pthread_mutex_t decode_lock_mutex = PTHREAD_MUTEX_INITIALIZER;
void ax25_decode(unsigned char *buffer, size_t count, bool pad, bool tx_flag)
{
guard_lock decode_lock(&decode_lock_mutex);
if(!buffer && !count) return;
if(count > MAXOCTETS)
count = MAXOCTETS;
memset(rxbuf, 0, sizeof(rxbuf));
if(pad) {
rxbuf[0] = 0xfe;
memcpy(&rxbuf[1], buffer, count);
count++;
} else {
memcpy(rxbuf, buffer, count);
}
if(tx_flag) {
mode = FTextBase::XMIT;
} else {
mode = FTextBase::RECV;
}
do_put_rx_char(&rxbuf[count], count);
}
| 27,819
|
C++
|
.cxx
| 1,008
| 23.155754
| 77
| 0.52879
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,157
|
strutil.cxx
|
w1hkj_fldigi/src/misc/strutil.cxx
|
// ----------------------------------------------------------------------------
// strutil.cxx
//
// Copyright (C) 2009-2012
// Stelios Bounanos, M0GLD
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <stdio.h>
#include <stdarg.h>
#include <vector>
#include <string>
#include <cstring>
#include <climits>
#include <stdexcept>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include <limits>
#include "re.h"
#include "strutil.h"
std::vector<std::string> split(const char* re_str, const char* str, unsigned max_split)
{
std::vector<std::string> v;
size_t n = strlen(re_str);
std::string s; s.reserve(n + 2); s.append(1, '(').append(re_str, n).append(1, ')');
fre_t re(s.c_str(), REG_EXTENDED);
bool ignore_trailing_empty = false;
if (max_split == 0) {
max_split = UINT_MAX;
ignore_trailing_empty = true;
}
s = str;
const std::vector<regmatch_t>& sub = re.suboff();
while (re.match(s.c_str())) {
if (unlikely(sub.empty() || ((max_split != UINT_MAX) && --max_split == 0)))
break;
else {
s[sub[0].rm_so] = '\0';
v.push_back(s.c_str());
s.erase(0, sub[0].rm_eo);
}
}
if (!(ignore_trailing_empty && s.empty()))
v.push_back(s);
return v;
}
/// Builds a string out of a printf-style formatted vararg list.
std::string strformat( const char * fmt, ... )
{
static const int sz_buf = 512 ;
char buf_usual[sz_buf];
va_list ap;
va_start(ap, fmt);
int res = vsnprintf( buf_usual, sz_buf, fmt, ap);
va_end(ap);
if( res < 0 ) throw std::runtime_error(__FUNCTION__);
if( res < sz_buf ) return buf_usual ;
std::string str( res, ' ' );
va_start(ap, fmt);
res = vsnprintf( &str[0], res + 1, fmt, ap);
va_end(ap);
if( res < 0 ) throw std::runtime_error(__FUNCTION__);
return str ;
}
/// Removes leading spaces and tabs.
static std::string & strtriml(std::string &str) {
str.erase(str.begin(), std::find_if(str.begin(), str.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
return str;
}
/// Removes trailing spaces and tabs.
static std::string & strtrimr(std::string &str) {
str.erase(std::find_if(str.rbegin(), str.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), str.end());
return str;
}
/// Removes leading trailing spaces and tabs.
void strtrim(std::string &str) {
strtriml(strtrimr(str));
}
void strcapitalize(std::string &str) {
bool isStart = true ;
for( size_t i = 0; i < str.size(); ++i ) {
const char tmpC = str[i];
if( isalpha( tmpC ) ) {
if( isStart ) {
str[ i ] = toupper( tmpC );
isStart = false ;
} else {
str[ i ] = tolower( tmpC );
}
} else {
isStart = true ;
}
}
}
std::string strreplace( const std::string & inp, const std::string & from, const std::string & to )
{
size_t from_sz=from.size();
std::string tmp ;
for( size_t old_curr = 0 ; ; ) {
size_t new_curr = inp.find( from, old_curr );
if( new_curr == std::string::npos ) {
tmp.append( inp, old_curr, std::string::npos );
break ;
}
else
{
tmp.append( inp, old_curr, new_curr - old_curr );
tmp.append( to );
old_curr = new_curr + from_sz ;
}
}
return tmp ;
}
/// Edit distance. Not the fastest implementation.
size_t levenshtein(const std::string & source, const std::string & target) {
const size_t n = source.size();
const size_t m = target.size();
if (n == 0) return m;
if (m == 0) return n;
typedef std::vector< std::vector<size_t> > Tmatrix;
Tmatrix matrix(n+1);
for (size_t i = 0; i <= n; i++) {
matrix[i].resize(m+1);
}
for (size_t i = 0; i <= n; i++) {
matrix[i][0]=i;
}
for (size_t j = 0; j <= m; j++) {
matrix[0][j]=j;
}
for (size_t i = 1; i <= n; i++) {
char s_i = source[i-1];
for (size_t j = 1; j <= m; j++) {
char t_j = target[j-1];
size_t cost = (s_i == t_j) ? 0 : 1 ;
size_t above = matrix[i-1][j];
size_t left = matrix[i][j-1];
size_t diag = matrix[i-1][j-1];
size_t cell = std::min( above + 1, std::min(left + 1, diag + cost));
// Step 6A: Cover transposition, in addition to deletion,
// insertion and substitution. This step is taken from:
// Berghel, Hal ; Roach, David : "An Extension of Ukkonen's
// Enhanced Dynamic Programming ASM Algorithm"
// (http://www.acm.org/~hlb/publications/asm/asm.html)
if (i>2 && j>2) {
size_t trans=matrix[i-2][j-2]+1;
if (source[i-2]!=t_j) trans++;
if (s_i!=target[j-2]) trans++;
if (cell>trans) cell=trans;
}
matrix[i][j]=cell;
}
}
return matrix[n][m];
}
/// Converts a string to ucasestr.
std::string ucasestr( std::string str )
{
std::string resu ;
for( size_t i = 0 ; i < str.size(); ++i )
{
resu += static_cast<char>( toupper( str[i] ) );
}
return resu ;
}
std::string ucasestr(const char *str)
{
std::string resu ;
for( size_t i = 0 ; i < strlen(str); ++i )
{
resu += static_cast<char>( toupper( str[i] ) );
}
return resu ;
}
size_t ufind(std::string s1, std::string s2, size_t idx)
{
std::string up1 = ucasestr(s1);
std::string up2 = ucasestr(s2);
return up1.find(up2, idx);
}
// ----------------------------------------------------------------------------
/// Just reads all chars until the delimiter.
bool read_until_delim( char delim, std::istream & istrm )
{
istrm.ignore ( std::numeric_limits<std::streamsize>::max(), delim );
if(istrm.eof()) return true ;
return istrm.bad() ? false : true ;
}
/// Reads a char up to the given delimiter, or returns the default value if there is none.
bool read_until_delim( char delim, std::istream & istrm, char & ref, const char dflt )
{
if(istrm.eof()) {
ref = dflt ;
return true ;
}
ref = istrm.get();
if( istrm.bad() ) return false;
if( ref == delim ) {
ref = dflt ;
return true ;
}
char tmpc = istrm.get();
if( istrm.eof() ) return true;
if( tmpc == delim ) return true ;
if( tmpc == '\n' ) return true ;
if( tmpc == '\r' ) return true ;
return false;
}
| 6,677
|
C++
|
.cxx
| 225
| 27.106667
| 125
| 0.614807
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,161
|
arq_io.cxx
|
w1hkj_fldigi/src/misc/arq_io.cxx
|
// ----------------------------------------------------------------------------
// arq_io.cxx
//
// support for ARQ server/client system such as pskmail and fl_arq
//
// Copyright (C) 2006-2017
// Dave Freese, W1HKJ
// Copyright (C) 2008-2013
// Stelios Bounanos, M0GLD
// Copyright (C) 2009-2013
// John Douyere, VK2ETA
// Copyright (c) 2013
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#ifdef __MINGW32__
# include "compat.h"
#endif
#include <fstream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <ctime>
#include <errno.h>
#include <sys/types.h>
#if !defined(__WIN32__) && !defined(__APPLE__)
# include <sys/ipc.h>
# include <sys/msg.h>
#endif
#include <signal.h>
#include "main.h"
#include "configuration.h"
#include "fl_digi.h"
#include "trx.h"
#include "arq_io.h"
#include "threads.h"
#include "socket.h"
#include "debug.h"
#include "qrunner.h"
#include <FL/Fl.H>
#include <FL/fl_ask.H>
LOG_FILE_SOURCE(debug::LOG_ARQCONTROL);
// =====================================================================
static pthread_t arq_thread;
static pthread_mutex_t arq_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t arq_rx_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t tosend_mutex = PTHREAD_MUTEX_INITIALIZER;
static void *arq_loop(void *args);
static bool arq_exit = false;
static bool arq_enabled;
static bool abort_flag = false;
/// Any access to shared variables must be protected.
static std::string tosend = ""; // Protected by tosend_mutex
//static std::string enroute = ""; // Protected by tosend_mutex
static std::string arqtext = ""; // Protected by arq_rx_mutex
static std::string txstring = ""; // Protected by arq_rx_mutex
bool arq_text_available = false; // Protected by arq_rx_mutex
// Beware 'arq_text_available' is accessed by other modules.
// =====================================================================
static const char *asc[128] = {
"<NUL>", "<SOH>", "<STX>", "<ETX>",
"<EOT>", "<ENQ>", "<ACK>", "<BEL>",
"<BS>", "<TAB>", "\n", "<VT>",
"<FF>", "", "<SO>", "<SI>",
"<DLE>", "<DC1>", "<DC2>", "<DC3>",
"<DC4>", "<NAK>", "<SYN>", "<ETB>",
"<CAN>", "<EM>", "<SUB>", "<ESC>",
"<FS>", "<GS>", "<RS>", "<US>",
" ", "!", "\"", "#",
"$", "%", "&", "\'",
"(", ")", "*", "+",
",", "-", ".", "/",
"0", "1", "2", "3",
"4", "5", "6", "7",
"8", "9", ":", ";",
"<", "=", ">", "?",
"@", "A", "B", "C",
"D", "E", "F", "G",
"H", "I", "J", "K",
"L", "M", "N", "O",
"P", "Q", "R", "S",
"T", "U", "V", "W",
"X", "Y", "Z", "[",
"\\", "]", "^", "_",
"`", "a", "b", "c",
"d", "e", "f", "g",
"h", "i", "j", "k",
"l", "m", "n", "o",
"p", "q", "r", "s",
"t", "u", "v", "w",
"x", "y", "z", "{",
"|", "}", "~", "<DEL>"
};
std::string noctrl(std::string src)
{
static std::string retstr;
retstr.clear();
char hexstr[10];
int c;
for (size_t i = 0; i < src.length(); i++) {
c = src[i];
if ( c > 0 && c < 128)
retstr.append(asc[c]);
else {
snprintf(hexstr, sizeof(hexstr), "<%0X>", c & 0xFF);
retstr.append(hexstr);
}
}
return retstr;
}
//======================================================================
extern void parse_arqtext(std::string &toparse);
static void set_button(Fl_Button* button, bool value)
{
button->value(value);
button->do_callback();
}
void ParseMode(std::string src)
{
LOG_INFO("%s", src.c_str());
if ((src.find("XMTTUNE") != std::string::npos) ||
(src.find("PTTTUNE") != std::string::npos)) {
int msecs = 100;
if (src.length() > 7) {
int ret = sscanf( src.substr(7, src.length() - 7).c_str(), "%d", &msecs);
if (ret != 1 || msecs < 10 || msecs > 20000) msecs = 100;
}
// if (debug_pskmail)
LOG_INFO("%s %5.2f sec", "ARQ set ptt-tune on", msecs/1000.0);
REQ_SYNC(&waterfall::set_XmtRcvBtn, wf, true);
REQ_SYNC(trx_tune);
MilliSleep(msecs);
// if (debug_pskmail)
LOG_INFO("%s", "ARQ set ptt-tune off");
REQ_SYNC(&waterfall::set_XmtRcvBtn, wf, false);
REQ_SYNC(trx_receive);
}
else for (size_t i = 0; i < NUM_MODES; ++i) {
if (strlen(mode_info[i].pskmail_name) > 0) {
if (src == mode_info[i].pskmail_name) {
if (active_modem->get_mode() == mode_info[i].mode) {
LOG_INFO("Active modem already set to %s", src.c_str());
} else {
REQ_SYNC(init_modem_sync, mode_info[i].mode, 0);
MilliSleep(100);
// AbortARQ();
// if (debug_pskmail)
LOG_INFO("Modem set to %s", mode_info[i].pskmail_name);
}
break;
}
}
}
WriteARQ('\002');
}
void ParseRSID(std::string src)
{
if (src == "ON") {
// if (debug_pskmail)
LOG_INFO("%s", "RsID turned ON");
REQ(set_button, btnRSID, 1);
}
if (src == "OFF") {
// if (debug_pskmail)
LOG_INFO("%s", "RsID turned OFF");
REQ(set_button, btnRSID, 0);
}
}
void ParseTxRSID(std::string src)
{
if (src == "ON") {
// if (debug_pskmail)
LOG_INFO("%s", "TxRsID turned ON");
REQ(set_button, btnTxRSID, 1);
}
if (src == "OFF") {
// if (debug_pskmail)
LOG_INFO("%s", "TxRsID turned OFF");
REQ(set_button, btnTxRSID, 0);
}
}
void parse_arqtext(std::string &toparse)
{
static std::string strCmdText;
static std::string strSubCmd;
unsigned long int idxCmd, idxCmdEnd, idxSubCmd, idxSubCmdEnd;
if (toparse.empty()) return;
LOG_VERBOSE("parsing: %s", noctrl(toparse).c_str());
idxCmd = toparse.find("<cmd>");
idxCmdEnd = toparse.find("</cmd>");
while ( idxCmd != std::string::npos && idxCmdEnd != std::string::npos && idxCmdEnd > idxCmd ) {
LOG_VERBOSE("Parsing: %s", noctrl(toparse.substr(idxCmd, idxCmdEnd - idxCmd + 6)).c_str());
strCmdText = toparse.substr(idxCmd + 5, idxCmdEnd - idxCmd - 5);
if (strCmdText == "server" && mailserver == false && mailclient == false) {
mailserver = true;
mailclient = false;
std::string PskMailLogName;
PskMailLogName.assign(PskMailDir);
PskMailLogName.append("gMFSK.log");
Maillogfile = new cLogfile(PskMailLogName.c_str());
Maillogfile->log_to_file_start();
REQ(set_button, wf->xmtlock, 1);
if (progdefaults.PSKmailSweetSpot)
active_modem->set_freq(progdefaults.PSKsweetspot);
active_modem->set_freqlock(true);
LOG_INFO("%s", "ARQ is set to pskmail server");
} else if (strCmdText == "client" && mailclient == false && mailserver == false) {
mailclient = true;
mailserver = false;
std::string PskMailLogName;
PskMailLogName.assign(PskMailDir);
PskMailLogName.append("gMFSK.log");
Maillogfile = new cLogfile(PskMailLogName.c_str());
Maillogfile->log_to_file_start();
REQ(set_button, wf->xmtlock, 0);
active_modem->set_freqlock(false);
LOG_INFO("%s", "ARQ is set to pskmail client");
} else if (strCmdText == "normal") {
mailserver = false;
mailclient = false;
if (Maillogfile) {
delete Maillogfile;
Maillogfile = 0;
}
REQ(set_button, wf->xmtlock, 0);
active_modem->set_freqlock(false);
LOG_INFO("%s", "ARQ is reset to normal ops");
} else if ((idxSubCmd = strCmdText.find("<mode>")) != std::string::npos) {
idxSubCmdEnd = strCmdText.find("</mode>");
if ( idxSubCmdEnd != std::string::npos &&
idxSubCmdEnd > idxSubCmd ) {
strSubCmd = strCmdText.substr(idxSubCmd + 6, idxSubCmdEnd - idxSubCmd - 6);
LOG_INFO("%s %s", "ARQ mode ", strSubCmd.c_str());
ParseMode(strSubCmd);
}
} else if ((idxSubCmd = strCmdText.find("<rsid>")) != std::string::npos) {
idxSubCmdEnd = strCmdText.find("</rsid>");
if ( idxSubCmdEnd != std::string::npos &&
idxSubCmdEnd > idxSubCmd ) {
strSubCmd = strCmdText.substr(idxSubCmd + 6, idxSubCmdEnd - idxSubCmd - 6);
ParseRSID(strSubCmd);
LOG_INFO("%s %s", "ARQ rsid ", strSubCmd.c_str());
}
} else if ((idxSubCmd = strCmdText.find("<txrsid>")) != std::string::npos) {
idxSubCmdEnd = strCmdText.find("</txrsid>");
if ( idxSubCmdEnd != std::string::npos &&
idxSubCmdEnd > idxSubCmd ) {
strSubCmd = strCmdText.substr(idxSubCmd + 8, idxSubCmdEnd - idxSubCmd - 8);
ParseTxRSID(strSubCmd);
LOG_INFO("%s %s", "ARQ txrsid ", strSubCmd.c_str());
}
} else if (strCmdText == "abort") {
LOG_INFO("%s", "Abort current ARQ ops");
abort_flag = true;
}
toparse.erase(idxCmd, idxCmdEnd - idxCmd + 6);
while (toparse[0] == '\n' || toparse[0] == '\r') toparse.erase(0, 1);
idxCmd = toparse.find("<cmd>");
idxCmdEnd = toparse.find("</cmd>");
}
if (!toparse.empty())
LOG_VERBOSE("Remaining text: %s", noctrl(toparse).c_str());
}
#define TIMEOUT 180 // 3 minutes
//======================================================================
// Gmfsk ARQ file i/o used only on Linux
//======================================================================
// checkTLF
// look for files named
// TLFfldigi ==> tlfio is true and
// ==> mailclient is true
// in $HOME
void checkTLF() {
static std::string TLFfile;
static std::string TLFlogname;
std::ifstream testFile;
tlfio = mailserver = mailclient = false;
TLFfile.assign(PskMailDir);
TLFfile.append("TLFfldigi");
testFile.open(TLFfile.c_str());
if (testFile.is_open()) {
testFile.close();
mailclient = true;
tlfio = true;
TLFlogname.assign(PskMailDir);
TLFlogname.append("gMFSK.log");
Maillogfile = new cLogfile(TLFlogname.c_str());
Maillogfile->log_to_file_start();
}
}
static bool TLF_arqRx()
{
/// The mutex is automatically unlocked when returning.
#if defined(__WIN32__) || defined(__APPLE__)
return false;
#else
time_t start_time, prog_time;
static char mailline[1000];
static std::string sAutoFile("");
sAutoFile.assign(PskMailDir);
sAutoFile.append("gmfsk_autofile");
std::ifstream autofile(sAutoFile.c_str());
if(autofile) {
time(&start_time);
while (!autofile.eof()) {
memset(mailline, 0, sizeof(mailline));
autofile.getline(mailline, 998); // leave space for "\n" and null byte
txstring.append(mailline);
txstring.append("\n");
time(&prog_time);
if (prog_time - start_time > TIMEOUT) {
LOG_ERROR("TLF file I/O failure");
autofile.close();
std::remove (sAutoFile.c_str());
return false;
}
}
autofile.close();
std::remove (sAutoFile.c_str());
parse_arqtext(txstring);
if (abort_flag) {
AbortARQ();
abort_flag = false;
return true;
}
if (!txstring.empty()) {
guard_lock arq_rx_lock(&arq_rx_mutex);
if (arqtext.empty()) {
arqtext = txstring;
if (mailserver && progdefaults.PSKmailSweetSpot)
active_modem->set_freq(progdefaults.PSKsweetspot);
arq_text_available = true;
active_modem->set_stopflag(false);
start_tx();
} else {
arqtext.append(txstring);
active_modem->set_stopflag(false);
}
txstring.clear();
}
}
return true;
#endif
}
//======================================================================
// Auto transmit of file contained in WRAP_auto_dir
//======================================================================
bool WRAP_auto_arqRx()
{
time_t start_time, prog_time;
static char mailline[1000];
static std::string sAutoFile("");
std::ifstream autofile;
if (sAutoFile.empty()) {
sAutoFile.assign(FLMSG_WRAP_auto_dir);
sAutoFile.append("wrap_auto_file");
autofile.open(sAutoFile.c_str());
if (!autofile) {
sAutoFile.assign(WRAP_auto_dir);
sAutoFile.append("wrap_auto_file");
autofile.open(sAutoFile.c_str());
}
} else
autofile.open(sAutoFile.c_str());
if(autofile) {
/// Mutex is unlocked when leaving the block.
guard_lock arq_rx_lock(&arq_rx_mutex);
txstring.clear();
time(&start_time);
while (!autofile.eof()) {
memset(mailline,0,1000);
autofile.getline(mailline, 998); // leave space for "\n" and null byte
txstring.append(mailline);
txstring.append("\n");
time(&prog_time);
if (prog_time - start_time > TIMEOUT) {
LOG_ERROR("autowrap file I/O failure");
autofile.close();
std::remove (sAutoFile.c_str());
return false;
}
}
autofile.close();
std::remove (sAutoFile.c_str());
if (!txstring.empty()) {
arqtext.assign("\n....start\n");
arqtext.append(txstring);
arqtext.append("\n......end\n");
arq_text_available = true;
LOG_DEBUG("%s", arqtext.c_str());
start_tx();
txstring.clear();
return true;
}
}
return false;
}
//======================================================================
// Socket ARQ i/o used on all platforms
//======================================================================
#define ARQLOOP_TIMING 50 // 100 // msec
#define CLIENT_TIMEOUT 5 // timeout after 5 secs
struct ARQCLIENT { Socket sock; time_t keep_alive; };
static std::string errstring;
static pthread_t* arq_socket_thread = 0;
ARQ_SOCKET_Server* ARQ_SOCKET_Server::inst = 0;
static std::vector<ARQCLIENT *> arqclient; // Protected by arq_mutex
void arq_run(Socket);
ARQ_SOCKET_Server::ARQ_SOCKET_Server()
{
server_socket = new Socket;
arq_socket_thread = new pthread_t;
run = true;
}
ARQ_SOCKET_Server::~ARQ_SOCKET_Server()
{
run = false;
if (arq_socket_thread) {
CANCEL_THREAD(*arq_socket_thread);
pthread_join(*arq_socket_thread, NULL);
delete arq_socket_thread;
arq_socket_thread = 0;
}
delete server_socket;
}
bool ARQ_SOCKET_Server::start(const char* node, const char* service)
{
if (inst) return false;
inst = new ARQ_SOCKET_Server;
try {
inst->server_socket->open(Address(node, service));
inst->server_socket->bind();
#ifdef __WIN32__
inst->server_socket->listen();
inst->server_socket->set_timeout(0.1);
#endif
}
catch (const SocketException& e) {
errstring.assign("Could not start ARQ server (");
errstring.append(e.what()).append(")");
if (e.error() == EADDRINUSE)
errstring.append("\nMultiple instances of fldigi??");
LOG_ERROR("%s", errstring.c_str());
delete arq_socket_thread;
arq_socket_thread = 0;
delete inst;
inst = 0;
return false;
}
return !pthread_create(arq_socket_thread, NULL, thread_func, NULL);
}
bool server_stopped = false;
void ARQ_SOCKET_Server::stop(void)
{
if (!inst)
return;
inst->run = false;
SET_THREAD_CANCEL();
MilliSleep(50);
#if !defined(__WOE32__) && !defined(__APPLE__)
int timeout = 10;
while(!server_stopped) {
MilliSleep(100);
Fl::awake();
if (--timeout == 0) break;
}
#endif
delete inst;
inst = 0;
}
void* ARQ_SOCKET_Server::thread_func(void*)
{
SET_THREAD_ID(ARQSOCKET_TID);
SET_THREAD_CANCEL();
// On POSIX we block indefinitely and are interrupted by a signal.
// On WIN32 we block for a short time and test for cancellation.
while (inst->run) {
try {
#ifdef __WIN32__
if (inst->server_socket->wait(0))
arq_run(inst->server_socket->accept());
#else
arq_run(inst->server_socket->accept());
TEST_THREAD_CANCEL();
#endif
}
catch (const SocketException& e) {
if (e.error() != EINTR) {
errstring = e.what();
LOG_ERROR("%s", errstring.c_str());
break;
}
}
catch (...) {
break;
}
}
{
/// Mutex is unlocked when leaving the block.
guard_lock arq_lock(&arq_mutex);
if (!arqclient.empty()) {
for (std::vector<ARQCLIENT *>::iterator p = arqclient.begin();
p < arqclient.end();
p++) {
(*p)->sock.close();
arqclient.erase(p);
}
}
}
inst->server_socket->close();
server_stopped = true;
return NULL;
}
void arq_reset()
{
/// Mutex is unlocked when returning from function
guard_lock arq_rx_lock(&arq_rx_mutex);
arqmode = mailserver = mailclient = false;
// txstring.clear();
// arqtext.clear();
}
void arq_run(Socket s)
{
/// Mutex is unlocked when returning from function
guard_lock arq_lock(&arq_mutex);
struct timeval t = { 0, 20000 };
s.set_timeout(t);
s.set_nonblocking();
ARQCLIENT *client = new ARQCLIENT;
client->sock = s;
client->keep_alive = time(0);
arqclient.push_back(client);
arqmode = true;
std::vector<ARQCLIENT *>::iterator p = arqclient.begin();
std::ostringstream outs;
outs << "Clients: ";
while (p != arqclient.end()) {
outs << (*p)->sock.fd() << " ";
p++;
}
LOG_INFO("%s", outs.str().c_str());
}
void WriteARQsocket(unsigned char* data, size_t len)
{
/// Mutex is unlocked when returning from function
guard_lock arq_lock(&arq_mutex);
if (arqclient.empty()) return;
static std::string instr;
instr.clear();
std::string outs = "";
for (unsigned int i = 0; i < len; i++)
outs += asc[data[i] & 0x7F];
LOG_INFO("%s", outs.c_str());
std::vector<ARQCLIENT *>::iterator p;
for (p = arqclient.begin(); p < arqclient.end(); p++) {
try {
(*p)->sock.wait(1);
(*p)->sock.send(data, len);
(*p)->keep_alive = time(0);
p++;
}
catch (const SocketException& e) {
LOG_INFO("closing socket fd %d %s", (*p)->sock.fd(), e.what());
try {
(*p)->sock.close();
} catch (const SocketException& e) {
LOG_ERROR("Socket error on # %d, %d: %s", (*p)->sock.fd(), e.error(), e.what());
}
arqclient.erase(p);
}
}
if (arqclient.empty()) arq_reset();
}
void test_arq_clients()
{
/// Mutex is unlocked when returning from function
guard_lock arq_lock(&arq_mutex);
if (arqclient.empty()) return;
static std::string instr;
instr.clear();
std::vector<ARQCLIENT *>::iterator p;
p = arqclient.begin();
time_t now;
size_t ret;
while (p < arqclient.end()) {
if (difftime(now = time(0), (*p)->keep_alive) > CLIENT_TIMEOUT) {
try {
(*p)->sock.wait(1);
ret = (*p)->sock.send("\0", 1);
if (ret <= 0) {
LOG_INFO("closing inactive socket %d", (int)((*p)->sock.fd()));
(*p)->sock.close();
arqclient.erase(p); // sets p to next iterator
} else {
(*p)->keep_alive = now;
p++;
}
}
catch (const SocketException& e) {
LOG_INFO("socket %d timed out, error %d, %s", (*p)->sock.fd(), e.error(), e.what());
try {
(*p)->sock.close();
} catch (const SocketException& e) {
LOG_ERROR("Socket error on # %d, %d: %s", (*p)->sock.fd(), e.error(), e.what());
}
arqclient.erase(p);
}
} else {
p++;
}
}
if (arqclient.empty()) arq_reset();
}
bool Socket_arqRx()
{
{
/// Mutex is unlocked when leaving block
guard_lock arq_lock(&arq_mutex);
if (arqclient.empty()) return false;
static std::string instr;
std::vector<ARQCLIENT *>::iterator p = arqclient.begin();
size_t n = 0;
instr.clear();
while (p != arqclient.end()) {
try {
(*p)->sock.wait(0);
while ( (n = (*p)->sock.recv(instr)) > 0) {
txstring.append(instr);
LOG_VERBOSE("%s", txstring.c_str());
}
p++;
}
catch (const SocketException& e) {
txstring.clear();
LOG_INFO("closing socket fd %d, %d: %s", (*p)->sock.fd(), e.error(), e.what());
try {
(*p)->sock.close();
} catch (const SocketException& e) {
LOG_ERROR("socket error on # %d, %d: %s", (*p)->sock.fd(), e.error(), e.what());
}
arqclient.erase(p);
}
}
if (arqclient.empty()) arq_reset();
}
if (!txstring.empty()) parse_arqtext(txstring);
if (abort_flag) {
AbortARQ();
abort_flag = false;
return true;
}
{
/// Mutex is unlocked when leaving block
guard_lock arq_rx_lock(&arq_rx_mutex);
if (txstring.empty()) return false;
arqtext.append(txstring);
if (mailserver && progdefaults.PSKmailSweetSpot)
active_modem->set_freq(progdefaults.PSKsweetspot);
if (trx_state != STATE_TX)
start_tx();
txstring.clear();
arq_text_available = true;
active_modem->set_stopflag(false);
}
return true;
}
//======================================================================
// Implementation using thread vice the fldigi timeout facility
//======================================================================
void WriteARQ(unsigned char data)
{
if (active_modem->get_mode() == MODE_FSQ) return;
guard_lock tosend_lock(&tosend_mutex);
tosend += data;
}
void WriteARQ(const char *data)
{
if (active_modem->get_mode() == MODE_FSQ) return;
guard_lock tosend_lock(&tosend_mutex);
tosend.append(data);
}
static void *arq_loop(void *args)
{
SET_THREAD_ID(ARQ_TID);
for (;;) {
/* see if we are being canceled */
if (arq_exit)
break;
test_arq_clients();
{
/// Mutex is unlocked when exiting block
guard_lock tosend_lock(&tosend_mutex);
// enroute.clear();
if (!tosend.empty()) {
// enroute = tosend;
WriteARQsocket((unsigned char*)tosend.c_str(), tosend.length());
tosend.clear();
}
// if (!enroute.empty()) {
// WriteARQsocket((unsigned char*)enroute.c_str(), enroute.length());
// }
}
if (arq_exit) break;
// order of precedence; Socket, Wrap autofile, TLF autofile
if (!Socket_arqRx())
if (!WRAP_auto_arqRx())
TLF_arqRx();
MilliSleep(ARQLOOP_TIMING);
}
// exit the arq thread
return NULL;
}
bool arq_state(void)
{
return arq_enabled;
}
void arq_init()
{
arq_enabled = false;
txstring.clear();
arqclient.clear();
if (!ARQ_SOCKET_Server::start( progdefaults.arq_address.c_str(), progdefaults.arq_port.c_str() )) {
arq_enabled = false;
return;
}
if (pthread_create(&arq_thread, NULL, arq_loop, NULL) < 0) {
LOG_ERROR("arq init: pthread_create failed");
arq_enabled = false;
return;
}
arq_enabled = true;
}
void arq_close(void)
{
if (!arq_enabled) return;
ARQ_SOCKET_Server::stop();
// tell the arq thread to kill it self
{
guard_lock arqclose(&tosend_mutex);
arq_exit = true;
}
// and then wait for it to die
pthread_join(arq_thread, NULL);
arq_enabled = false;
LOG_INFO("ARQ closed");
if(data_io_enabled == ARQ_IO)
data_io_enabled = DISABLED_IO ;
arq_exit = false;
}
int arq_get_char()
{
/// Mutex is unlocked when returning from function
guard_lock arq_rx_lock(&arq_rx_mutex);
int c = 0;
if (arq_text_available) {
if (!arqtext.empty()) {
c = arqtext[0] & 0xFF;
arqtext.erase(0,1);
} else {
arq_text_available = false;
c = GET_TX_CHAR_ETX;
}
}
return c;
}
void flush_arq_tx_buffer(void)
{
guard_lock arq_rx_lock(&arq_rx_mutex);
arq_text_available = false;
// arqtext.clear();
}
//======================================================================
// following function used if the T/R button is pressed to stop a transmission
// that is servicing the ARQ text buffer. It allows the ARQ client to reset
// itself properly
//======================================================================
void AbortARQ() {
/// Mutex is unlocked when returning from function
guard_lock arq_lock(&arq_rx_mutex);
arqtext.clear();
txstring.clear();
arq_text_available = false;
}
//======================================================================
// Special notification for PSKMAIL: new mode marked only, in following
// format: "<DC2><Mode:newmode>", with <DC2> = '0x12'.
//======================================================================
void pskmail_notify_rsid(trx_mode mode)
{
static char buf[64];
memset(buf, 0, sizeof(buf));
int n = snprintf(buf, sizeof(buf),
"\x12<Mode:%s>\n",
mode_info[mode].name);
if (n > 0 && n < (int)sizeof(buf)) {
WriteARQ((const char *)buf);
REQ(&FTextBase::addstr, ReceiveText, buf, FTextBase::CTRL);
LOG_INFO("%s", buf);
}
}
//======================================================================
// Special notification for PSKMAIL: signal to noise measured by decoder
// format "<DC2><s2n: CC, A.a, D.d>"
// where CC = count, A.a = average s/n, D.d = Std dev of s/n
//======================================================================
void pskmail_notify_s2n(double s2n_ncount, double s2n_avg, double s2n_stddev)
{
static char buf[64];
memset(buf, 0, sizeof(buf));
int n = snprintf(buf, sizeof(buf),
"\x12<s2n: %1.0f, %1.1f, %1.1f>\n",
s2n_ncount, s2n_avg, s2n_stddev);
if (n > 0 && n < (int)sizeof(buf)) {
WriteARQ((const char *)buf);
REQ(&FTextBase::addstr, ReceiveText, buf, FTextBase::CTRL);
LOG_INFO("%s", buf);
}
}
| 24,606
|
C++
|
.cxx
| 833
| 26.831933
| 100
| 0.602638
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,162
|
pixmaps.cxx
|
w1hkj_fldigi/src/misc/pixmaps.cxx
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
// This file contains custom icons, icons from gtk, and possibly other sources.
/* XPM */
const char *waterfall_icon[] = {
/* columns rows colors chars-per-pixel */
"16 16 5 1",
" c None",
". c #124188",
"+ c #788D9B",
"@ c #ABCBE2",
"# c #204A87",
" ",
" ..+..@@@@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@##@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@##@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@##@..+.. ",
" ..+..@@@@..+.. ",
" ..+..@##@..+.. ",
" "};
// audio-card from gnome icon theme
/* XPM */
const char *audio_card_icon[] = {
/* columns rows colors chars-per-pixel */
"16 16 102 2",
" c #3A3E00",
". c #3A3F00",
"X c #3B3F00",
"o c #2F3536",
"O c #303634",
"+ c #303735",
"@ c #303637",
"# c #363D32",
"$ c #323835",
"% c #313836",
"& c #333936",
"* c #323937",
"= c #343936",
"- c #383E31",
"; c #3B4000",
": c #3D4104",
"> c #3E4206",
", c #657000",
"< c #677300",
"1 c #687400",
"2 c #687502",
"3 c #687505",
"4 c #6B7704",
"5 c #6B7901",
"6 c #6C7900",
"7 c #6C7801",
"8 c #6D7A00",
"9 c #6C7A02",
"0 c #6F7D01",
"q c #707E02",
"w c #707E07",
"e c #404630",
"r c #3D5B50",
"t c #38595E",
"y c #38595F",
"u c #395A5F",
"i c #365761",
"p c #405C4F",
"a c #545650",
"s c #545652",
"d c #555753",
"f c #565852",
"g c #565853",
"h c #565854",
"j c #575955",
"k c #585A56",
"l c #5A5C58",
"z c #5D5E5B",
"x c #5E5F5C",
"c c #426050",
"v c #426251",
"b c #646662",
"n c #656663",
"m c #666864",
"M c #676965",
"N c #696A67",
"B c #696B67",
"V c #6E6F6D",
"C c #6E706C",
"Z c #6F716D",
"A c #758201",
"S c #748202",
"D c #798708",
"F c #7F8839",
"G c #A3B31A",
"H c #A4B31A",
"J c #A4B419",
"K c #AABA1A",
"L c #858E39",
"P c #848D3B",
"I c #878F3D",
"U c #87903B",
"Y c #8A9539",
"T c #8C9638",
"R c #919C38",
"E c #949E39",
"W c #959F3A",
"Q c #959F3B",
"! c #929D3C",
"~ c #939E3C",
"^ c #959F3D",
"/ c #95A03C",
"( c #96A03C",
") c #97A03C",
"_ c #97A13C",
"` c #97A23D",
"' c #D8EB31",
"] c #DBEF33",
"[ c #DFF234",
"{ c #E0F338",
"} c #E4F839",
"| c #E8FB38",
" . c #EBFF39",
".. c #EFFF65",
"X. c #B7B9B5",
"o. c #C4C6C2",
"O. c #C6C8C4",
"+. c #C7C9C5",
"@. c #C8CAC6",
"#. c #D0D2CE",
"$. c #D4D6D2",
"%. c None",
/* pixels */
"%.%.%.%.%.%.%.%.%.%.%.%.j k j %.",
"%.%.%.%.%.%.%.%.%.%.%.d O.#.X.d ",
"X a $.d d %.",
" E W W W Q Q ( ( ( ^ f $.d %.%.",
" ` e * * % % + # c v f $.d l x ",
" ` + V Z Z Z C & y u f $.d o.d ",
" ` + Z d d d N = 3 8 f $.d h g ",
" _ + B M m n b $ p t f $.d %.%.",
" ) - @ o o o o O r i f $.d k z ",
" / A q 0 9 5 2 1 < , f $.d @.d ",
" ~ K S J 6 H 7 G U I f $.d d h ",
" ! { D ' 4 ] w [ P : a $.d %.%.",
" T ..R } L | Y .F > s $.d %.%.",
"; X X X X X X . . . . s +.d %.%.",
"%.%.%.%.%.%.%.%.%.%.%.d d d %.%.",
"%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%."
};
// help-about from gnome
/* XPM */
const char *help_about_icon[] = {
/* columns rows colors chars-per-pixel */
"16 16 76 1",
" c #C4A001",
". c #C5A101",
"X c #C5A102",
"o c #C6A202",
"O c #C6A203",
"+ c #C7A403",
"@ c #C7A404",
"# c #C7A405",
"$ c #C7A406",
"% c #C7A407",
"& c #C7A507",
"* c #C8A508",
"= c #C9A70B",
"- c #C9A80D",
"; c #CAA80C",
": c #C9A810",
"> c #CCAC12",
", c #CCAC14",
"< c #CDAE1B",
"1 c #CFB11C",
"2 c #D0B11F",
"3 c #CFB021",
"4 c #D2B522",
"5 c #D3B62C",
"6 c #D2B62F",
"7 c #F6E132",
"8 c #F6E235",
"9 c #F5E038",
"0 c #F7E23A",
"q c #F8E33C",
"w c #F8E43E",
"e c #D9C04A",
"r c #E4CE4C",
"t c #E4CE4F",
"y c #E7D041",
"u c #E7D247",
"i c #EBD755",
"p c #EBD756",
"a c #ECD85A",
"s c #F8E441",
"d c #F9E644",
"f c #F6E349",
"g c #FBE74A",
"h c #F9E74D",
"j c #F7E75F",
"k c #F8E75A",
"l c #FBE95C",
"z c #E9D668",
"x c #EAD86C",
"c c #F6E664",
"v c #F6E667",
"b c #F8E864",
"n c #F8E865",
"m c #F9E96B",
"M c #FAEB71",
"N c #F9EB73",
"B c #F8EA7B",
"V c #FAEC7C",
"C c #F9EC7F",
"Z c #EEDF83",
"A c #EEDF85",
"S c #F7E981",
"D c #F8EC88",
"F c #F9ED89",
"G c #FAED8B",
"H c #F8EB8F",
"J c #F9EE9B",
"K c #FBF097",
"L c #FCF2A6",
"P c #FCF3AA",
"I c #FDF6BC",
"U c #FCF7CF",
"Y c #FDF8D1",
"T c #FDF9DF",
"R c #FEFCEE",
"E c None",
/* pixels */
"EEEEEEE.EEEEEEEE",
"EEEEEE@e@EEEEEEE",
"EEEEEE3T<EEEEEEE",
"EEEEE+ARZ+EEEEEE",
"EEEEE%UVYOEEEEEE",
"EEE+OxLdIzo+EEEE",
"E$:rHKhglPJt-@EE",
"X6DCf8wddwkGS5XE",
"E&2aBn0qsNFi1#EE",
"EEE#;pj7mp=+EEEE",
"EEEEE*c9v@EEEEEE",
"EEEEE#uby@EEEEEE",
"EEEEEE,M>EEEEEEE",
"EEEEEE&4&EEEEEEE",
"EEEEEEE EEEEEEEE",
"EEEEEEEEEEEEEEEE"
};
// insert link icon from gnome
/* XPM */
const char *insert_link_icon[] = {
/* columns rows colors chars-per-pixel */
"16 16 97 2",
" c #2E3436",
". c #2F3536",
"X c #363C3D",
"o c #373D3E",
"O c #464A48",
"+ c #464B4C",
"@ c #4F524F",
"# c #545652",
"$ c #555753",
"% c #575955",
"& c #585A56",
"* c #595B57",
"= c #5A5B57",
"- c #5A5C58",
"; c #5B5D58",
": c #5C5D59",
"> c #62645F",
", c #656763",
"< c #6B6D69",
"1 c #6E6F6B",
"2 c #6F716D",
"3 c #71726F",
"4 c #767773",
"5 c #777875",
"6 c #7C7E79",
"7 c #7C7F79",
"8 c #CF5F04",
"9 c #D06106",
"0 c #D86605",
"q c #D86706",
"w c #F47A03",
"e c #F47A04",
"r c #F47D0B",
"t c #E97910",
"y c #E97911",
"u c #7E807D",
"i c #EA9D4C",
"p c #F4B15E",
"a c #F5B364",
"s c #FDC97D",
"d c #838580",
"f c #8A8C87",
"g c #979B96",
"h c #989B95",
"j c #9FA19D",
"k c #B3B4B0",
"l c #B4B7B0",
"z c #B7B7B1",
"x c #B5B7B2",
"c c #B5B8B2",
"v c #BABDB6",
"b c #BBBEB7",
"n c #BBBEB8",
"m c #BDBEBB",
"M c #C0C0BC",
"N c #C2C3BF",
"B c #FBD7AA",
"V c #FBD9AE",
"C c #C4C6C0",
"Z c #C5C7C1",
"A c #CBCEC8",
"S c #CCCEC9",
"D c #D0D1CE",
"F c #D1D3CE",
"G c #D4D4D0",
"H c #D6D7D6",
"J c #D9DAD8",
"K c #DBDCDB",
"L c #DEDEDA",
"P c #DFDFDD",
"I c #FDE6C4",
"U c #FEE9CA",
"Y c #FEEACC",
"T c #E0E0DC",
"R c #E0E0DD",
"E c #E2E3E2",
"W c #E4E4E1",
"Q c #E6E6E4",
"! c #E7E8E6",
"~ c #E9E9E6",
"^ c #E8E9E8",
"/ c #EDEDEB",
"( c #EDEDEC",
") c #EDEEED",
"_ c #EEEEEC",
"` c #EFF0EE",
"' c #F1F1F0",
"] c #F3F3F1",
"[ c #F3F3F2",
"{ c #F4F5F4",
"} c #F5F5F4",
"| c #F6F6F5",
" . c #F6F6F6",
".. c #F8F8F7",
"X. c #F9F9F9",
"o. c #FDFDFD",
"O. c None",
/* pixels */
"O.# # # # ; O.O.O.O.O.O.O.O.; # ",
"O. .{ [ ` J u - O.O.O.O.- H ) o.",
"O.v v v b C F < # $ $ # 5 / A n ",
"O.# * $ * 7 b h 1 m m 1 x Z 6 % ",
"O.O.& R Q 2 $ $ $ $ $ $ $ $ 3 K ",
"O.O.: z L ] } ...X.| ' ( ^ ! E ",
"O.O @ 4 M G T W ~ _ P D N k j f ",
"O.S c d , = $ $ $ $ $ $ $ $ & > ",
"O.v v v l g + X O.O.O.O.X + g l ",
"O. . o O.O.O.O.O.O.O.O.o . ",
"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
"O.O.O.O.O.w e r r r r r e w O.O.",
"O.O.O.O.O.O.y V Y I U B t O.O.O.",
"O.O.O.O.O.O.O.q a s p 0 O.O.O.O.",
"O.O.O.O.O.O.O.O.9 i 9 O.O.O.O.O.",
"O.O.O.O.O.O.O.O.O.8 O.O.O.O.O.O."
};
// close icon from default gtk theme
/* XPM */
const char *close_icon[] = {
/* columns rows colors chars-per-pixel */
"16 16 74 1",
" c #5A5C58",
". c #5C5E5B",
"X c #5C5F5B",
"o c #5D5F5B",
"O c #5E5F5B",
"+ c #5E5F5C",
"@ c #5D605A",
"# c #5D605B",
"$ c #5C615B",
"% c #5F605A",
"& c #5E615B",
"* c #5E605C",
"= c #5F605C",
"- c #5E615C",
"; c #5F615C",
": c #5E605D",
"> c #5E615D",
", c #5F625C",
"< c #5F625D",
"1 c #5F615E",
"2 c #5F625E",
"3 c #60615B",
"4 c #60625D",
"5 c #60615E",
"6 c #60625E",
"7 c #61625E",
"8 c #61645F",
"9 c #7D807A",
"0 c #7E817B",
"q c #80827B",
"w c #80837E",
"e c #82847D",
"r c #82857E",
"t c #838680",
"y c #848681",
"u c #848781",
"i c #868983",
"p c #878983",
"a c #868984",
"s c #888A85",
"d c #898C86",
"f c #898D86",
"g c #8A8C86",
"h c #8A8D88",
"j c #8D9089",
"k c #8E908A",
"l c #8E918B",
"z c #8F928C",
"x c #8F928D",
"c c #91938E",
"v c #92948F",
"b c #949590",
"n c #949691",
"m c #959892",
"M c #959992",
"N c #969994",
"B c #979B95",
"V c #B1B4AC",
"C c #B4B7AF",
"Z c #B8BBB3",
"A c #B9BCB4",
"S c #BABDB5",
"D c #BDC0B8",
"F c #BDC1B9",
"G c #BFC3BB",
"H c #C1C4BC",
"J c #C3C6BE",
"K c #C3C7BF",
"L c #C4C8C0",
"P c #C5C9C1",
"I c #CACEC6",
"U c #CBCEC6",
"Y c #CDD1C9",
"T c None",
/* pixels */
"TTTTTTTTTTTTTTTT",
"TTTTTTTTTTTTTTTT",
"TT681TTTTTT ,5TT",
"TT5Ll2TTTT=wZ:TT",
"TT4fUx7TT4aDu;TT",
"TTT3jYz<;dHs+TTT",
"TTTT>kINmJh=TTTT",
"TTTTT>BPKM*TTTTT",
"TTTTT-vHGc+TTTTT",
"TTTT-uFnbSr.TTTT",
"TTT=eAg%#iCq$TTT",
"TT:9Cp@TTXyV0;TT",
"TT;Vp@TTTTOtVoTT",
"TT44&TTTTTT&O4TT",
"TTTTTTTTTTTTTTTT",
"TTTTTTTTTTTTTTTT"
};
// gtk apply icon
/* XPM */
const char *apply_icon[] = {
/* columns rows colors chars-per-pixel */
"16 16 88 1",
" c #498D07",
". c #498A0D",
"X c #519412",
"o c #529612",
"O c #559815",
"+ c #579B16",
"@ c #589B17",
"# c #579818",
"$ c #599C1B",
"% c #5A9D1B",
"& c #59991C",
"* c #5B9C1D",
"= c #5C9D1E",
"- c #5D9E1F",
"; c #5D9C21",
": c #5E9D22",
"> c #60A023",
", c #60A222",
"< c #66A52C",
"1 c #6AA92F",
"2 c #6AA730",
"3 c #6BA931",
"4 c #6FAB36",
"5 c #71AC38",
"6 c #74AF3A",
"7 c #74AE3D",
"8 c #75B13D",
"9 c #76B13E",
"0 c #7DB648",
"q c #7FB749",
"w c #8EE03E",
"e c #81B84D",
"r c #83B950",
"t c #88BF53",
"y c #89BE57",
"u c #95DF4D",
"i c #8CC259",
"p c #8FC55B",
"a c #91E145",
"s c #98E152",
"d c #99E054",
"f c #9BE355",
"g c #9DE25A",
"h c #9EE459",
"j c #A1E55E",
"k c #92C660",
"l c #93C661",
"z c #95C863",
"x c #96C965",
"c c #97C867",
"v c #9FD16F",
"b c #A1D073",
"n c #A1D372",
"m c #A4D475",
"M c #A6D777",
"N c #A7DC75",
"B c #A8DA77",
"V c #A6D678",
"C c #ABDB7C",
"Z c #ABDA7E",
"A c #ACDC7C",
"S c #A0E360",
"D c #A4E366",
"F c #A5E566",
"G c #A7E66A",
"H c #A7E26E",
"J c #A8E56C",
"K c #A7E868",
"L c #A9E470",
"P c #ABE672",
"I c #AFE877",
"U c #ADE279",
"Y c #ADE07A",
"T c #AEE47A",
"R c #B0E77B",
"E c #B3EB7D",
"W c #B4EB7C",
"Q c #ACD980",
"! c #ADDC80",
"~ c #AEDC81",
"^ c #B3E583",
"/ c #B3E187",
"( c #B4E684",
") c #B8EB87",
"_ c #BBE98E",
"` c #BCE990",
"' c #C2F094",
"] c None",
/* pixels */
"]]]]]]]]]]]->]]]",
"]]]]]]]]]]%bBq@]",
"]]]]]]]]]]yTGZ>]",
"]]]]]]]]]3AgHi]]",
"]]]]]]]]ocPdm#]]",
"]]]]]]]]7(uU5]]]",
"]] ]]]]&ZSFl]]]]",
"]5b0o]]iRsN<]]]]",
"%V'`z:4/fPe]]]]]",
"+p_W)Z~Ggv-]]]]]",
"]+e/EKjaU7]]]]]]",
"]]]2MIwFz]]]]]]]",
"]]]]*l^~:]]]]]]]",
"]]]]].81]]]]]]]]",
"]]]]]]]]]]]]]]]]",
"]]]]]]]]]]]]]]]]"
};
// enter key icon from KDE's crystal theme
/* XPM */
const char *enter_key_icon[] = {
/* columns rows colors chars-per-pixel */
"16 16 91 1",
" c #5C5C5C",
". c #626262",
"X c #666666",
"o c #696969",
"O c #6B6B6B",
"+ c #6C6C6C",
"@ c #6E6E6E",
"# c #6F6F6F",
"$ c #717171",
"% c #737373",
"& c #747474",
"* c #838383",
"= c #8D8D8D",
"- c #92928F",
"; c #939393",
": c #A3A3A2",
"> c #A7A7A5",
", c #A7A7A6",
"< c #A7A7A7",
"1 c #A9A9A8",
"2 c #A9A9A9",
"3 c #AEAEAD",
"4 c #B0B0AE",
"5 c #B1B1AF",
"6 c #B2B2B0",
"7 c #B4B4B2",
"8 c #B5B5B3",
"9 c #B7B7B6",
"0 c #B7B7B7",
"q c #B9B9B7",
"w c #BABAB9",
"e c #BBBBBB",
"r c #BCBCBB",
"t c #BEBEBC",
"y c #C2C2C1",
"u c #C4C4C0",
"i c #C4C4C4",
"p c #C5C5C5",
"a c #C6C6C4",
"s c #C7C7C7",
"d c #C9C9C6",
"f c #CBCBC8",
"g c #CACACA",
"h c #CFCFCD",
"j c #D0D0CE",
"k c #D1D1CF",
"l c #D0D0D0",
"z c #D1D1D1",
"x c #D2D2D0",
"c c #D3D3D1",
"v c #D2D2D2",
"b c #D3D3D2",
"n c #D3D3D3",
"m c #D4D4D3",
"M c #D4D4D4",
"N c #D5D5D5",
"B c #D7D7D6",
"V c #D7D7D7",
"C c #D8D8D8",
"Z c #D9D9D8",
"A c #D9D9D9",
"S c #DADAD9",
"D c #DADADA",
"F c #DCDCDC",
"G c #DDDDDD",
"H c #DEDEDE",
"J c #DFDFDF",
"K c #E0E0E0",
"L c #E2E2E2",
"P c #E3E3E3",
"I c #E4E4E4",
"U c #E5E5E5",
"Y c #E7E7E7",
"T c #E8E8E8",
"R c #E9E9E9",
"E c #EBEBEB",
"W c #ECECEC",
"Q c #EDEDED",
"! c #EFEFEF",
"~ c #F0F0F0",
"^ c #F3F3F3",
"/ c #F4F4F4",
"( c #F5F5F5",
") c #F6F6F6",
"_ c #F7F7F7",
"` c #F8F8F8",
"' c #F9F9F9",
"] c #FAFAFA",
"[ c #FCFCFC",
"{ c #FDFDFD",
"} c None",
/* pixels */
"}}}}}}}}}}}}}}}}",
"}}}}}}fSFFFFFSd}",
"}}}}}}c{[[[[['a}",
"}}}}}}x]_`'`_`t}",
"}}}}}}x)^(p`^/r}",
"}}}}}}k^!!%'!!w}",
"}}}}}}j~WQ#`EWq}",
"}}}}}}yWTR@(TR9}",
"}Z)))_/YIU+~PI8}",
"}BLHKH<zLPOWJK7}",
"}mHGD= 2siXTFG6}",
"}bDApo$&**;HCC4}",
"}bVMA0.eDDCNMN3}",
"}hvlzngzllllll1}",
"}u5>,,,,,,,,,:-}",
"}}}}}}}}}}}}}}}}"
};
// question icon from default gtk theme
/* XPM */
const char *dialog_question_48_icon[] = {
"48 48 215 2",
" c None",
". c #3768A6",
"+ c #3968A7",
"@ c #3A6AA7",
"# c #386BA6",
"$ c #3968A5",
"% c #A7BEDA",
"& c #F4F7FB",
"* c #F4F8FB",
"= c #A5BDD9",
"- c #3769A6",
"; c #3869A6",
"> c #BBCEE4",
", c #FFFFFF",
"' c #FEFEFF",
") c #BBCDE3",
"! c #F9FBFD",
"~ c #98B9DC",
"{ c #99B9DC",
"] c #729FCF",
"^ c #97B8DB",
"/ c #BACDE3",
"( c #719ECE",
"_ c #709DCD",
": c #709DCE",
"< c #6F9CCD",
"[ c #6F9CCC",
"} c #95B6DA",
"| c #B9CDE3",
"1 c #6E9CCC",
"2 c #6E9BCC",
"3 c #6D9BCC",
"4 c #6D9ACB",
"5 c #94B5D9",
"6 c #B9CCE3",
"7 c #78A2D0",
"8 c #709CCC",
"9 c #6C9ACB",
"0 c #6C99CA",
"a c #6B99CA",
"b c #93B4D8",
"c c #B9CCE2",
"d c #739FCE",
"e c #A1BEDE",
"f c #C9DAEC",
"g c #EBF1F8",
"h c #FAFCFD",
"i c #E7EEF6",
"j c #B7CDE6",
"k c #759FCE",
"l c #6B98CA",
"m c #6A98C9",
"n c #6A97C9",
"o c #92B3D8",
"p c #B9CBE2",
"q c #80A8D3",
"r c #E8EFF7",
"s c #6997C9",
"t c #6996C8",
"u c #6896C8",
"v c #91B2D7",
"w c #B8CBE2",
"x c #7FA7D2",
"y c #FDFDFE",
"z c #E9F0F7",
"A c #EFF4F9",
"B c #BBD0E7",
"C c #6895C8",
"D c #6795C7",
"E c #6794C7",
"F c #8FB1D6",
"G c #B8CBE1",
"H c #7EA6D1",
"I c #F2F6FA",
"J c #ADC6E1",
"K c #749FCD",
"L c #6A98CA",
"M c #AFC7E2",
"N c #E1EAF4",
"O c #6694C7",
"P c #6694C6",
"Q c #6593C6",
"R c #8EAFD5",
"S c #B7CBE1",
"T c #96B7DA",
"U c #6C99CB",
"V c #709CCB",
"W c #719DCC",
"X c #7FA5D0",
"Y c #6693C6",
"Z c #6592C6",
"` c #6492C5",
" . c #6391C5",
".. c #8DAFD4",
"+. c #B0C7E2",
"@. c #CBDBEC",
"#. c #6391C4",
"$. c #6290C4",
"%. c #8CADD3",
"&. c #B7CAE1",
"*. c #3768A5",
"=. c #396AA7",
"-. c #A4BCD8",
";. c #96B6D8",
">. c #FDFEFE",
",. c #85A9D2",
"'. c #6290C3",
"). c #618FC3",
"!. c #608EC3",
"~. c #8BADD3",
"{. c #A0B8D6",
"]. c #3768A7",
"^. c #FEFFFF",
"/. c #99B8DA",
"(. c #A4BFDD",
"_. c #608EC2",
":. c #5F8DC2",
"<. c #5F8DC1",
"[. c #8AABD2",
"}. c #3868A6",
"|. c #396AA6",
"1. c #87AAD2",
"2. c #FBFCFE",
"3. c #A1BDDC",
"4. c #5F8EC2",
"5. c #5E8DC1",
"6. c #5E8CC1",
"7. c #89AAD1",
"8. c #3767A6",
"9. c #3969A6",
"0. c #92B4D8",
"a. c #D0DEEE",
"b. c #B1C8E2",
"c. c #5D8CC1",
"d. c #5D8BC0",
"e. c #87AAD1",
"f. c #F9FAFD",
"g. c #79A0CC",
"h. c #5C8BC0",
"i. c #87A9D0",
"j. c #F9FAFC",
"k. c #B6C9E0",
"l. c #3767A5",
"m. c #90B2D6",
"n. c #6B97C7",
"o. c #6C97C8",
"p. c #6C97C7",
"q. c #6C96C7",
"r. c #5C8AC0",
"s. c #5B8ABF",
"t. c #87A8D0",
"u. c #3668A4",
"v. c #8FB0D6",
"w. c #5C8ABF",
"x. c #5B89BF",
"y. c #86A8D0",
"z. c #B6CAE1",
"A. c #8DAFD5",
"B. c #ECF1F8",
"C. c #5A89BF",
"D. c #5A89BE",
"E. c #85A7CF",
"F. c #F8FAFC",
"G. c #B6CAE0",
"H. c #BACDE2",
"I. c #8BADD4",
"J. c #F6F8FB",
"K. c #5A88BE",
"L. c #5988BE",
"M. c #5987BD",
"N. c #84A7CE",
"O. c #89ABD3",
"P. c #EBF1F7",
"Q. c #5887BD",
"R. c #84A6CE",
"S. c #88ABD1",
"T. c #5886BD",
"U. c #5786BC",
"V. c #83A6CE",
"W. c #82A5CE",
"X. c #3667A4",
"Y. c #85A8D0",
"Z. c #5785BC",
"`. c #5685BC",
" + c #82A4CD",
".+ c #B6C8E0",
"++ c #3767A3",
"@+ c #85A8CF",
"#+ c #5685BB",
"$+ c #5584BB",
"%+ c #3667A3",
"&+ c #B8CAE1",
"*+ c #5684BB",
"=+ c #81A4CC",
"-+ c #B5C8E0",
";+ c #3566A2",
">+ c #82A5CD",
",+ c #5483BA",
"'+ c #B7C9E0",
")+ c #81A4CD",
"!+ c #5382BA",
"~+ c #80A3CB",
"{+ c #B5C8DF",
"]+ c #80A3CC",
"^+ c #5382B9",
"/+ c #7FA2CB",
"(+ c #B4C8DF",
"_+ c #9DB5D3",
":+ c #F1F5F9",
"<+ c #F0F4F9",
"[+ c #9CB4D3",
"}+ c #3565A1",
"|+ c #305D95",
"1+ c #3666A3",
"2+ c #305D96",
" ",
" ",
" . + @ # ",
" $ % & * = - ",
" ; > , ' ' , ) ; ",
" ; > , ! ~ { ! , ) ; ",
" ; > , ! ~ ] ] ~ ! , ) ; ",
" ; > , ! ~ ] ] ] ] ~ ! , ) ; ",
" ; > , ! ~ ] ] ] ] ] ] ~ ! , ) ; ",
" ; > , ! ~ ] ] ] ] ] ] ] ] ~ ! , ) - ",
" ; > , ! ~ ] ] ] ] ] ] ] ] ] ] ^ ! , / - ",
" ; > , ! ~ ] ] ] ] ] ] ] ] ] ( ( _ ^ ! , / - ",
" ; > , ! ~ ] ] ] ] ] ] ] ( ( : _ < < [ } ! , | - ",
" ; > , ! ~ ] ] ] ] ] ] ( ( _ _ < < 1 2 3 4 5 ! , 6 - ",
" ; > , ! ~ ] ] ] ] ( ( : _ < 7 8 2 2 4 4 9 0 a b ! , c - ",
" ; > , ! ~ ] ] ] ( ( d e f g h , ' i j k a a l m n o ! , p - ",
" ; > , ! ~ ] ( ( : _ < q , , , , , , , , r k n n s t u v ! , w - ",
" ; > , ! ~ ( ( _ _ < < 1 x , , y z A , , , , B t u u C D E F ! , G - ",
" ; > , ! ^ : _ < < [ 2 2 4 H I J K l L M , , , N C D D O P Q Q R ! , S - ",
" ; > , ! T _ < < 1 2 3 4 9 U V W l m n s X , , , i E O Y Q Z ` ` ...! , S - ",
" $ > , ! } < [ 2 2 4 4 9 0 a l L n n s t u +., , , @.Q Q Z ` ` .#.$.$.%.! , &.*. ",
" =.-., ! } 1 2 3 4 9 U 0 a l m n s t u u C ;.>., , >.,.` ` .#.$.$.'.).).!.~.! , {.]. ",
" . & ^.} 2 4 4 9 0 a l L n n s t u C D D /.y , , ^.(.` .#.$.$.).).)._._.:.<.[.' I }. ",
" |.& ^.5 9 U 0 a l m n s t u u C D E O 1.2., , ^.3.#.$.$.'.).).!._.4.:.5.6.6.7.' I 8. ",
" 9.-., ! 0.l L n n s t u C D D O P Q Q a., , , b.$.$.).).)._._.:.<.6.6.c.d.e.f., {.8. ",
" *./ , ! v s t u u C D E O Y Q Q ` ` r , , , g.).).!._.4.:.5.6.6.d.d.h.i.j., k.l. ",
" - ) , ! m.C D D O P Q Q Z ` ` .#.n.o.p.q.'._._.:.<.6.6.c.d.h.r.s.t.j., k.u. ",
" - ) , ! v.O Y Q Q ` ` .#.$.$.'.).).!._.4.:.5.6.6.d.d.h.w.s.x.y.j., z.u. ",
" - / , ! A.Z ` ` .#.$.$.'.).).B.& & & 6.6.c.d.h.r.s.x.C.D.E.F., G.u. ",
" - H., ! I.#.$.$.'.).).!._.4.J., , , d.d.h.w.s.x.C.D.K.E.F., k.u. ",
" - c , ! ~.'.).)._._.:.<.6.J., , , r.s.x.x.D.K.L.M.N.F., k.u. ",
" - c , ! O._.4.:.5.6.6.d.P.& & & x.C.D.K.L.M.Q.R.F., k.u. ",
" - p , ! S.5.6.c.d.h.r.s.x.x.D.K.L.M.Q.T.U.V.F., k.u. ",
" l.w , f.i.d.h.w.s.x.C.D.K.L.M.Q.T.U.U.W.F., k.X. ",
" l.G , f.Y.x.x.D.K.L.M.Q.T.U.U.Z.`. +F., .+X. ",
" ++G , j.@+K.L.M.Q.T.U.U.`.#+$+ +F., .+%+ ",
" %+&+, F.V.T.U.U.Z.`.*+$+$+=+F., -+%+ ",
" ;+&., F.>+`.#+$+$+,+,+=+F., -+;+ ",
" ;+'+, F.)+$+,+,+!+~+F., {+;+ ",
" ;+k., F.]+!+^+/+F., {+;+ ",
" ;+k., F./+~+F., (+;+ ",
" %+k., ^.^., (+%+ ",
" ;+_+:+<+[+}+ ",
" |+}+1+2+ ",
" ",
" ",
" ",
" "
};
/* XPM */
const char *clear_sq_icon[] = {
"16 16 1 1",
" c None",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
const char *clear_row_icon[] = {
"16 1 1 1",
" c None",
" "
};
// The lightning bolt icons are based on gmfsk's rx.xpm and tx.xpm
/* XPM */
const char *rx1_icon[] = {
"16 16 4 1",
" c None",
". c #0F1F01",
"+ c #4E9A06",
"@ c #888A85",
" ",
" ......... ",
" .++++++.@ ",
" .++++++.@ ",
" .+++++.@ ",
" .+++++.@ ",
" .++++..... ",
" .++++++++.@ ",
" .....+++.@ ",
" @@.+++.@ ",
" .++.@ ",
" .++.@ ",
" .+.@ ",
" .+.@ ",
" ..@ ",
" "
};
/* XPM */
const char *tx1_icon[] = {
"16 16 4 1",
" c None",
". c #210000",
"+ c #A40000",
"@ c #888A85",
" ",
" ......... ",
" .++++++.@ ",
" .++++++.@ ",
" .+++++.@ ",
" .+++++.@ ",
" .++++..... ",
" .++++++++.@ ",
" .....+++.@ ",
" @@.+++.@ ",
" .++.@ ",
" .++.@ ",
" .+.@ ",
" .+.@ ",
" ..@ ",
" "
};
/* XPM */
const char *rx2_icon[] = {
"16 16 3 1",
" c None",
". c #0F1F01",
"+ c #4E9A06",
" ",
" ......... ",
" .++++++. ",
" .++++++. ",
" .+++++. ",
" .+++++. ",
" .++++..... ",
" .++++++++. ",
" .....+++. ",
" .+++. ",
" .++. ",
" .++. ",
" .+. ",
" .+. ",
" .. ",
" "
};
/* XPM */
const char *tx2_icon[] = {
"16 16 3 1",
" c None",
". c #210000",
"+ c #A40000",
" ",
" ......... ",
" .++++++. ",
" .++++++. ",
" .+++++. ",
" .+++++. ",
" .++++..... ",
" .++++++++. ",
" .....+++. ",
" .+++. ",
" .++. ",
" .++. ",
" .+. ",
" .+. ",
" .. ",
" "
};
/* XPM */
const char *rx_icon[] = {
"16 16 38 1",
" c None",
". c #0F1F01",
"+ c #64B517",
"@ c #62B315",
"# c #61B014",
"$ c #5EAE12",
"% c #5CAC11",
"& c #5AA90F",
"* c #68BA1B",
"= c #66B719",
"- c #65B517",
"; c #63B315",
"> c #60B014",
", c #5EAD13",
"' c #6ABD1C",
") c #69BA1A",
"! c #66B718",
"~ c #64B418",
"{ c #6FC11F",
"] c #6CBF1E",
"^ c #6ABC1C",
"/ c #70C421",
"( c #6CBE1E",
"_ c #6BBC1C",
": c #75C824",
"< c #72C622",
"[ c #6EC11F",
"} c #6CBE1D",
"| c #67B819",
"1 c #6DBF1E",
"2 c #73C622",
"3 c #70C321",
"4 c #74C924",
"5 c #72C522",
"6 c #79CD27",
"7 c #76CA26",
"8 c #7ACF28",
"9 c #7FD42B",
" ",
" ......... ",
" .+@#$%&. ",
" .*=-;>,. ",
" .')!~@. ",
" .{]^)=. ",
" ./{(_..... ",
" .:</[}^*|. ",
" .....{1_. ",
" .23[. ",
" .45. ",
" .67. ",
" .8. ",
" .9. ",
" .. ",
" "
};
/* XPM */
const char *tx_icon[] = {
"16 16 34 1",
" c None",
". c #210000",
"+ c #C11010",
"@ c #BE0E0E",
"# c #BB0D0C",
"$ c #B90B0C",
"% c #B60A0A",
"& c #B40908",
"* c #C51212",
"= c #C31111",
"- c #C00F0F",
"; c #BC0C0D",
"> c #B90C0B",
", c #C81313",
"' c #C10F10",
") c #CC1617",
"! c #CA1515",
"~ c #C71313",
"{ c #CF1818",
"] c #CC1616",
"^ c #D41A1A",
"/ c #D11819",
"( c #CF1718",
"_ c #C71414",
": c #CA1514",
"< c #C81413",
"[ c #D21919",
"} c #CF1817",
"| c #CD1616",
"1 c #D11818",
"2 c #D81D1D",
"3 c #D61B1B",
"4 c #DB1E1E",
"5 c #E02121",
" ",
" ......... ",
" .+@#$%&. ",
" .*=-@;>. ",
" .,*='@. ",
" .)!~*=. ",
" .{]!,..... ",
" .^/(]!_*=. ",
" .....]:<. ",
" .[}|. ",
" .^1. ",
" .23. ",
" .4. ",
" .5. ",
" .. ",
" "};
// pskreporter.info "favicon"
/* XPM */
const char *pskr_icon[] = {
"16 16 3 1",
" c None",
". c #FF0000",
"+ c #FFFF00",
" .. ",
" ... ",
" ..... ",
" .....+.. ",
". ...++++... ",
".. ..+++++. .. ",
"....++++++..+. ",
"..+++++++++++.. ",
"..+++++++.++++. ",
"....+++++..++.. ",
".. ..+++++.... ",
". ..+++++.. ",
" ...+... ",
" .... ",
" .. ",
" . "};
/* XPM */
const char *fldigi_icon[] = {
"48 48 215 2",
" c None",
". c #000000",
"+ c #BFBFBF",
"@ c #050505",
"# c #1A1A1A",
"$ c #1F1F1F",
"% c #C5C5C5",
"& c #FEC1C1",
"* c #FDC5C5",
"= c #FEC2C2",
"- c #FFBFBF",
"; c #D5C4C4",
"> c #0C0C0C",
", c #FE0303",
"' c #FB0C0C",
") c #FD0606",
"! c #FE0000",
"~ c #4F0909",
"{ c #D1BFBF",
"] c #2F2F2F",
"^ c #303030",
"/ c #3C3C3C",
"( c #838383",
"_ c #C7C7C7",
": c #D9D9D9",
"< c #D7D7D7",
"[ c #C2C2C2",
"} c #C4C4C4",
"| c #C9C9C9",
"1 c #9F9F9F",
"2 c #DDDDDD",
"3 c #DBDBDB",
"4 c #CDCDCD",
"5 c #8F8F8F",
"6 c #414141",
"7 c #343434",
"8 c #313131",
"9 c #010101",
"0 c #292929",
"a c #8A8A8A",
"b c #A8A8A8",
"c c #B6B6B6",
"d c #CFCFCF",
"e c #DEDEDE",
"f c #DFDFDF",
"g c #E5E5E5",
"h c #E2E2E2",
"i c #A0A0A0",
"j c #7D7D7D",
"k c #1D1D1D",
"l c #767676",
"m c #888888",
"n c #9B9B9B",
"o c #D3D3D3",
"p c #C6C6C6",
"q c #EBEBEB",
"r c #DADADA",
"s c #AAAAAA",
"t c #858585",
"u c #747474",
"v c #232323",
"w c #171717",
"x c #818181",
"y c #979797",
"z c #AEAEAE",
"A c #E4E4E4",
"B c #D4D4D4",
"C c #B5B5B5",
"D c #E1E1E1",
"E c #BABABA",
"F c #9A9A9A",
"G c #989898",
"H c #030303",
"I c #070707",
"J c #242424",
"K c #C1C1C1",
"L c #E0E0E0",
"M c #B2B2B2",
"N c #363636",
"O c #060606",
"P c #020202",
"Q c #929292",
"R c #959595",
"S c #C8C8C8",
"T c #CECECE",
"U c #B0B0B0",
"V c #999999",
"W c #040404",
"X c #151515",
"Y c #606060",
"Z c #A2A2A2",
"` c #CBCBCB",
" . c #919191",
".. c #A4A4A4",
"+. c #AFAFAF",
"@. c #737373",
"#. c #181818",
"$. c #131313",
"%. c #393939",
"&. c #C3C3C3",
"*. c #454545",
"=. c #3A3A3A",
"-. c #222222",
";. c #333333",
">. c #484848",
",. c #A1A1A1",
"'. c #616161",
"). c #0F0F0F",
"!. c #C0C0C0",
"~. c #808080",
"{. c #404040",
"]. c #121212",
"^. c #191919",
"/. c #BDBDBD",
"(. c #7E7E7E",
"_. c #3F3F3F",
":. c #161616",
"<. c #090909",
"[. c #212121",
"}. c #777777",
"|. c #BBBBBB",
"1. c #3B3B3B",
"2. c #5D5D5D",
"3. c #A5A5A5",
"4. c #727272",
"5. c #272727",
"6. c #101010",
"7. c #9C9C9C",
"8. c #B7B7B7",
"9. c #B3B3B3",
"0. c #080808",
"a. c #262626",
"b. c #ADADAD",
"c. c #CCCCCC",
"d. c #E9E9E9",
"e. c #E8E8E8",
"f. c #ACACAC",
"g. c #2A2A2A",
"h. c #323232",
"i. c #DCDCDC",
"j. c #D1D1D1",
"k. c #E7E7E7",
"l. c #D2D2D2",
"m. c #0E0E0E",
"n. c #0D0D0D",
"o. c #4A4A4A",
"p. c #8C8C8C",
"q. c #B9B9B9",
"r. c #7A7A7A",
"s. c #525252",
"t. c #373737",
"u. c #7B7B7B",
"v. c #E6E6E6",
"w. c #A9A9A9",
"x. c #6B6B6B",
"y. c #141414",
"z. c #757575",
"A. c #D6D6D6",
"B. c #E3E3E3",
"C. c #6E6E6E",
"D. c #0B0B0B",
"E. c #1E1E1E",
"F. c #EAEAEA",
"G. c #B4B4B4",
"H. c #D8D8D8",
"I. c #9E9E9E",
"J. c #444444",
"K. c #ABABAB",
"L. c #A6A6A6",
"M. c #505050",
"N. c #B1B1B1",
"O. c #3E3E3E",
"P. c #0A0A0A",
"Q. c #878787",
"R. c #EFEFEF",
"S. c #8B8B8B",
"T. c #4B4B4B",
"U. c #4F4F4F",
"V. c #CACACA",
"W. c #EEEEEE",
"X. c #434343",
"Y. c #D5D5D5",
"Z. c #7F7F7F",
"`. c #5B5B5B",
" + c #515151",
".+ c #868686",
"++ c #8E8E8E",
"@+ c #575757",
"#+ c #707070",
"$+ c #636363",
"%+ c #B8B8B8",
"&+ c #909090",
"*+ c #252525",
"=+ c #8D8D8D",
"-+ c #969696",
";+ c #282828",
">+ c #A3A3A3",
",+ c #BCBCBC",
"'+ c #A7A7A7",
")+ c #3D3D3D",
"!+ c #2E2E2E",
"~+ c #353535",
"{+ c #D0D0D0",
"]+ c #595959",
"^+ c #BEBEBE",
"/+ c #111111",
"(+ c #5E5E5E",
"_+ c #383838",
":+ c #939393",
"<+ c #464646",
"[+ c #2C2C2C",
"}+ c #717171",
"|+ c #898989",
"1+ c #494949",
"2+ c #555555",
". . . . . . . . + @ . . . . . . . . . . . . . . . . . . . . . . . + . . . . . . . . . . . . . . ",
". . . . . . . . + # . . . . . . . . . . . . . . . . . . . . . . . + . . . . . . . . . . . . . . ",
". . . . . . . . + $ . . . . . . . . . . . . . . . . . . . . . . . + . . . . . . . . . . . . . . ",
"% % % % % % % % % % % % % % % % % % % % % & * * * = - - - ; % % % % % % % % % % % % % % % % % % ",
"> > > > > > > > > > > > > > > > > > > > > , ' ' ' ) ! ! ! ~ > > > > > > > > > > > > > > > > > > ",
"+ + + + + + + + + + + + + + + + + + + + + - - - - - - - - { + + + + + + + + + + + + + + + + + + ",
"] ] ] ] ] ] ] ] ] ] ] ] ] ] ^ ] ] ] / ( _ : < [ } | 1 2 3 4 5 6 ^ ] ] ] 7 8 ] ] ] ] ] ] ] ] ] ] ",
". . . . . . . . . . . . . . 9 . . . 0 a b c d e f g 2 h } i j 0 9 . . . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . . . . k l m n o p 3 q h r s t u v . . . . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . . . 9 w x y z : _ A B C D E F G 0 . . H 9 . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . I 9 . J t z % D K L d d r | M ( N 9 . O H . . . . . . . . . . . . ",
". . . . . . . . . . . . . . P > 9 . ] Q R S f D L T 4 e } U V 7 9 . H 9 . . . . . . . . . . . . ",
". . . . . P P . . . . . . 9 P W . . X Y Z e ` + .( ..d 3 +.@.#.. . . . O H . . . . . . . . . . ",
". . . . . @ @ . . . . . . W P . . . P $.%.&.*.=.-.k ;.>.,.'.X @ . . . . ).O . . . . . . . . . . ",
". . . . . @ @ . . . . . . P 9 . . . . 9 . !.P . . . . . ~.{.. . . . . . ].I . . . . . . . . . . ",
". . . . . O O . . . . . . . . . . . P O ^./.$.H H H H W (._.P . . . . . :.<.. . . . . . . . . . ",
". . . . . H H . . . . . . . . . . . O [.}.|.Y 1.6 6 1.2.3.4.5.P . . . . 6.I . . . . . . . . . . ",
". . . . . . . . . . . . . . 9 9 . . ).u } A 4 7.8.9.7.: D d ~.W . . . 9 H 9 . . . . . . . . . . ",
". . . . . . . . . . . . . . H 0.. . a.b.&.c.d.o D L L e._ + f.g.9 . 0.@ . . . . . . . . . . . . ",
". . . . . . . . . . . . . . 9 0.9 . h.F c ` i.j.A e.k.2 l.C Q / 9 9 m.@ . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . n.P . o.p.f.% q.A g e.q e e Z r.s.@ @ m.P . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . 9 . . t.u.+ v.B i.Z w.: L d.|.x.7 O 9 P . I 9 . . . . . . . . . . ",
". . . . . . . . . . . . . H O @ . . y.z.c.v.A.+ b b ,.B.e.[ C.D.9 . . 9 <.9 . . . . . . . . . . ",
". . . . . . . . . . . . . H D.n.. . E.,.o B.e.A.!.z ..F.L 3 Z [.9 . W H . . . . . . . . . . . . ",
". . . . . . . . . . . . . . P n.9 . 1.c G.H.g F.k.g e.A ` 9.I.J.W . O W . . . . . . . . . . . . ",
". . . . . . . . . . . . . . W m.. W t.K.1 L.i.2 h i.v.D ..1 +.^ O 9 0.D.. . . . . . . . . . . . ",
". . . . . . . . . . . . . . H O P > M.5 t p.< g g D d.i.1 Q N.O.O @ ).D.. . . . . . . . . . . . ",
". . . . . . . . . . . . . . 9 P.H W o.Q.C p l.v.q R.i.i.d 1 S.T.I 9 P . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . O H . U.t +.l.V.V.e.W.k.r } S }.X.<.P W . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . . 9 . 1.x U g 2 Y.g g g D 3 l.Z.v H . 9 . D.H . . . . . . . . . . ",
". . . . . 9 9 . . . . . . 9 9 . . . O -.> 4 @.C.`. +C.}.!..+W 0.. . . . w <.. . . . . . . . . . ",
". . . . . W W . . . . . . P 9 . . . . P 9 % y.<.<.0.I m.++@+@ . . . . . :.<.. . . . . . . . . . ",
". . . . . 9 9 . . . . . . H 9 . . . O t.S.f ,.#+j u.$+n c.z +I 9 . . . > @ . . . . . . . . . . ",
". . . . . . . . . . . . . . . . . . X ( | H.v.%+D 4 &+v.` d n *+W . 9 9 9 . . . . . . . . . . . ",
". . . . . . . . . . . . . . . . . . y.=+G.G.h [ F.d.j.A b +.-+;+P . 9 . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . H . . ] >+C U L B.k.e.h k.s b i *.O . 9 W . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . D.P . %.M -+,+o d.i.A q 2 /.3.s +0.W n.0.. . . . . . . . . . . . ",
". . . . . . . . . . . . . . H @ 9 . ] '+c V.L e.A 2 D B.S C i )+O 9 H 9 . . . . . . . . . . . . ",
". . . . . . . . . . . . . . O O . . !+f._ l.e.d.g 2 D e.S &.K.s.P.. . . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . P . 9 ~+f.E {+h d.e.g g L % !.R ]+D.9 P . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . O 9 O h.7.9.l.v.k.L B T 2 T ^+3.J.0.. 9 9 . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . /+I D.X.Q L.e g q v.B.v.D B &.i (+P.W P.9 . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . D.I O _+b /.A.2 d.v.F.d.A : %+L.T.0.O /+H . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . m.P . ;.Q + 3 f A h F.q d : } :+<+W H m.W . . . . . . . . . . . . ",
". . . . . . . . . . . . . H 9 I 9 . [+a p v.g k.o % e i.B.j.p.J.O . H 9 W P . . . . . . . . . . ",
". . . . . . . . . . . . . I H . . . O 5.}+o |+t 1+X.C..+,+p.8 ).9 . . . y.0.. . . . . . . . . . ",
". . . . . 9 9 . . . . . . P 9 . . . . . . p X D.9 P O <.~.2+. . . . . . :.<.. . . . . . . . . . ",
". . . . . @ @ . . . . . . . . . . . . . . &.I . . . . . ~.T.. . . . . . #.P.. . . . . . . . . . "};
/* XPM */
const char *flarq_icon[] = {
/* columns rows colors chars-per-pixel */
"48 35 924 2",
" c None",
". c #5B1E0E",
"+ c #7F381B",
"@ c #A7624B",
"# c #A8624E",
"$ c #652012",
"% c #90555F",
"& c #AA7A86",
"* c #D4B5BE",
"= c #5E231C",
"- c #540900",
"; c #AC5D55",
"> c #B4644F",
", c #CF7F58",
"' c #FCAD85",
") c #FBB18F",
"! c #BA7057",
"~ c #965140",
"{ c #4F1509",
"] c #3B1314",
"^ c #45151B",
"/ c #895156",
"( c #AB8687",
"_ c #D7C6C1",
": c #FFFFFD",
"< c #FFFFFE",
"[ c #A58088",
"} c #945D68",
"| c #642D34",
"1 c #AC6352",
"2 c #A45C49",
"3 c #A35B46",
"4 c #CC8C74",
"5 c #F4B8A0",
"6 c #FAC5A8",
"7 c #FFD4B3",
"8 c #FFD8B8",
"9 c #FFDCBD",
"0 c #FFCFAC",
"a c #E7A380",
"b c #A2563C",
"c c #984D37",
"d c #A2787A",
"e c #997474",
"f c #AA8B91",
"g c #D1C0C6",
"h c #CAB3BD",
"i c #FBE6F1",
"j c #F9FFFF",
"k c #F8FAFA",
"l c #FEFFFF",
"m c #F3F2EF",
"n c #E9D7D9",
"o c #AC9092",
"p c #AC8C8D",
"q c #926A6E",
"r c #9A737B",
"s c #9B747C",
"t c #9E573C",
"u c #98543D",
"v c #9A5F47",
"w c #BF8469",
"x c #E9AE90",
"y c #FFCAA8",
"z c #FFD9B6",
"A c #FFDFBA",
"B c #FDE1BA",
"C c #FDDEB8",
"D c #FEDBBB",
"E c #FBDBC3",
"F c #F8DBC5",
"G c #FFDCC3",
"H c #FFD1AF",
"I c #FBB891",
"J c #E79B74",
"K c #9A4E30",
"L c #9B5644",
"M c #7D4F54",
"N c #D0BCBE",
"O c #F5EDE7",
"P c #FCF4EE",
"Q c #FFFAFC",
"R c #FFFFFF",
"S c #C7BDC6",
"T c #C4B0BD",
"U c #F4F3F8",
"V c #FDFCFF",
"W c #FFFDFF",
"X c #F7FFFF",
"Y c #DEDCDC",
"Z c #E6E1E1",
"` c #FFFAF9",
" . c #FFF3F5",
".. c #FFF4F7",
"+. c #E2D9DA",
"@. c #C1AEB5",
"#. c #C5A3AF",
"$. c #7B5057",
"%. c #7D2F24",
"&. c #C87559",
"*. c #EA9464",
"=. c #FFA873",
"-. c #FFB886",
";. c #FFC193",
">. c #FBBD92",
",. c #FBBE92",
"'. c #F9B98A",
"). c #FAB784",
"!. c #F8AE77",
"~. c #F9AC76",
"{. c #F3A97B",
"]. c #F3BB97",
"^. c #FDD7BD",
"/. c #FEDCC3",
"(. c #FFDBB4",
"_. c #FED2A6",
":. c #FEBF94",
"<. c #E89574",
"[. c #D07355",
"}. c #C06F4F",
"|. c #C09581",
"1. c #F0F1E9",
"2. c #E8FBF4",
"3. c #EEF9F3",
"4. c #FDFDFE",
"5. c #FDF8FE",
"6. c #EFE7ED",
"7. c #A6969F",
"8. c #F2E9EF",
"9. c #F7F9F9",
"0. c #FEFDFF",
"a. c #B2A3AC",
"b. c #CBBFC7",
"c. c #FCFBFE",
"d. c #F9F6F8",
"e. c #F5F8F7",
"f. c #F6FFFF",
"g. c #69302D",
"h. c #5D0100",
"i. c #A0402C",
"j. c #CC7D59",
"k. c #BF6F4E",
"l. c #C16645",
"m. c #F6996A",
"n. c #FCA264",
"o. c #F8995F",
"p. c #F3925E",
"q. c #F29968",
"r. c #F29F71",
"s. c #E79469",
"t. c #C26640",
"u. c #CF6A43",
"v. c #FD9366",
"w. c #FF9B68",
"x. c #F99B63",
"y. c #F19F6E",
"z. c #EEAB80",
"A. c #F8C59B",
"B. c #FBD3AB",
"C. c #FCD2AA",
"D. c #FCD9B1",
"E. c #F8D1AA",
"F. c #F9C596",
"G. c #FFB371",
"H. c #FEAC6B",
"I. c #D69B78",
"J. c #EAD5D1",
"K. c #ECF6FA",
"L. c #F1FAFB",
"M. c #FFFBFF",
"N. c #FDF4FB",
"O. c #FDFAFB",
"P. c #D3CACE",
"Q. c #D8C7CE",
"R. c #F6FAF8",
"S. c #FEFCFF",
"T. c #C4B4C0",
"U. c #D3C8D3",
"V. c #FAFBFF",
"W. c #FBFBFF",
"X. c #FBFDFF",
"Y. c #F7FEFF",
"Z. c #F8DEDA",
"`. c #B76C57",
" + c #D76E4E",
".+ c #F89463",
"++ c #F9A36A",
"@+ c #FFB783",
"#+ c #F5A27A",
"$+ c #D0744E",
"%+ c #EB9060",
"&+ c #E68655",
"*+ c #EA8855",
"=+ c #F1935B",
"-+ c #F0975D",
";+ c #D27B43",
">+ c #E18450",
",+ c #E98B5A",
"'+ c #DD7C50",
")+ c #D07242",
"!+ c #F9A06A",
"~+ c #FFA771",
"{+ c #F6A26B",
"]+ c #EE9D67",
"^+ c #EEA26D",
"/+ c #F2AA77",
"(+ c #ECA776",
"_+ c #EDAC7B",
":+ c #EEB17D",
"<+ c #F1A55D",
"[+ c #FFA45C",
"}+ c #DC855E",
"|+ c #D9A3A2",
"1+ c #F5F0FC",
"2+ c #E9F7FA",
"3+ c #F6FDFE",
"4+ c #FDFBFE",
"5+ c #F8F9F9",
"6+ c #D1CFD0",
"7+ c #CCB9C0",
"8+ c #F9FAF9",
"9+ c #FBFAFC",
"0+ c #F7F0F5",
"a+ c #D7C6D1",
"b+ c #E7E0EB",
"c+ c #EAF4FB",
"d+ c #F1F9FD",
"e+ c #F9FEFF",
"f+ c #F2FCFB",
"g+ c #F6F5F5",
"h+ c #CA9E8E",
"i+ c #F4A27A",
"j+ c #FAA77A",
"k+ c #F6B280",
"l+ c #F5C896",
"m+ c #FED8AD",
"n+ c #FFCFAB",
"o+ c #FFCCA8",
"p+ c #F8C39B",
"q+ c #F5BC9C",
"r+ c #F2B48F",
"s+ c #ECA878",
"t+ c #F3A86C",
"u+ c #FCAA68",
"v+ c #FAA664",
"w+ c #F9A76A",
"x+ c #EC9B65",
"y+ c #D38048",
"z+ c #E69056",
"A+ c #E0874E",
"B+ c #FAA26B",
"C+ c #FAA470",
"D+ c #F5A06F",
"E+ c #F59E6A",
"F+ c #FA9C62",
"G+ c #F99A5D",
"H+ c #F49E6C",
"I+ c #F89E63",
"J+ c #FF9D5E",
"K+ c #ED8F64",
"L+ c #B67466",
"M+ c #F5EBF0",
"N+ c #E4F6F9",
"O+ c #EAFCFA",
"P+ c #FDFFFF",
"Q+ c #F5F8F8",
"R+ c #E6E6E7",
"S+ c #BEAAB2",
"T+ c #E9E2E6",
"U+ c #FCF9FB",
"V+ c #DFCFD2",
"W+ c #C4AEB7",
"X+ c #FAF0F9",
"Y+ c #EAF0F6",
"Z+ c #F3F8FC",
"`+ c #FBFEFF",
" @ c #F8F9F8",
".@ c #EADFDD",
"+@ c #B47A60",
"@@ c #E99560",
"#@ c #F3BB8E",
"$@ c #FDD8B6",
"%@ c #FFDDC1",
"&@ c #FDCFB2",
"*@ c #FECEAD",
"=@ c #FBD0A7",
"-@ c #F7D3A7",
";@ c #FAD1AA",
">@ c #F9CAA1",
",@ c #F8C392",
"'@ c #FAB179",
")@ c #F9A468",
"!@ c #F9A166",
"~@ c #F69F67",
"{@ c #F9A470",
"]@ c #FDA56E",
"^@ c #F69A5A",
"/@ c #D37536",
"(@ c #D1753D",
"_@ c #EF9868",
":@ c #F8A67A",
"<@ c #F39F71",
"[@ c #FB9E68",
"}@ c #FF9D60",
"|@ c #FA9C65",
"1@ c #FAA06B",
"2@ c #FA9C63",
"3@ c #FDA26C",
"4@ c #D5926E",
"5@ c #F2DFDA",
"6@ c #F0F3FD",
"7@ c #EDF3F8",
"8@ c #FEFCFC",
"9@ c #F9FAFA",
"0@ c #F3F4F6",
"a@ c #A2929B",
"b@ c #C0B1BA",
"c@ c #C4B0B0",
"d@ c #AC9398",
"e@ c #FEF1F8",
"f@ c #EEF2F7",
"g@ c #F2F3F8",
"h@ c #FEF9FB",
"i@ c #FBF2F0",
"j@ c #EFD9D8",
"k@ c #E09D81",
"l@ c #F0A268",
"m@ c #F9CCA1",
"n@ c #FDD3B7",
"o@ c #F2B094",
"p@ c #F3A377",
"q@ c #F5A66E",
"r@ c #F4A873",
"s@ c #F3A476",
"t@ c #F4A66D",
"u@ c #F6A367",
"v@ c #F9A269",
"w@ c #FBA169",
"x@ c #FD9F69",
"y@ c #FC9F69",
"z@ c #FC9F68",
"A@ c #F99F65",
"B@ c #F4A471",
"C@ c #F9B385",
"D@ c #F6A36E",
"E@ c #F19359",
"F@ c #D1743D",
"G@ c #E3905E",
"H@ c #F5A370",
"I@ c #F59F69",
"J@ c #FAA062",
"K@ c #FBA05E",
"L@ c #F8A26B",
"M@ c #F9A46F",
"N@ c #FAA160",
"O@ c #EA9C62",
"P@ c #C3998A",
"Q@ c #F7EBFA",
"R@ c #EEEAF8",
"S@ c #F6F4F6",
"T@ c #FCFEFF",
"U@ c #F4F4F7",
"V@ c #E4DCE3",
"W@ c #D4C1CD",
"X@ c #F2F5FA",
"Y@ c #AEA19F",
"Z@ c #C2B0B5",
"`@ c #F9F8FC",
" # c #E5F2F8",
".# c #EAF5FB",
"+# c #F0F5F5",
"@# c #F9F7F7",
"## c #D3B3A9",
"$# c #DF916B",
"%# c #FAA76E",
"&# c #F3B787",
"*# c #F0AE84",
"=# c #EE9D6B",
"-# c #F6A15D",
";# c #F7A559",
"># c #F9A160",
",# c #FE9B68",
"'# c #FD9D67",
")# c #FC9F67",
"!# c #FA9F69",
"~# c #F9A06C",
"{# c #F69F6A",
"]# c #F5A067",
"^# c #F9A464",
"/# c #F5A35C",
"(# c #E9A779",
"_# c #F8D5C1",
":# c #FFCEAA",
"<# c #FAB079",
"[# c #E1884B",
"}# c #CD713A",
"|# c #F39961",
"1# c #FAA56C",
"2# c #F8A668",
"3# c #FFA864",
"4# c #EF9965",
"5# c #E59462",
"6# c #FBA360",
"7# c #F49958",
"8# c #BE8469",
"9# c #E7DAE0",
"0# c #EFF2FB",
"a# c #EBF0F3",
"b# c #FBFEFE",
"c# c #F6F6FA",
"d# c #FAF3FA",
"e# c #B7A0AF",
"f# c #C4C0C8",
"g# c #D4CECD",
"h# c #DED5DD",
"i# c #EEF5FC",
"j# c #E4F0FD",
"k# c #E6F2FC",
"l# c #EBF5FB",
"m# c #EAE0E9",
"n# c #B67A69",
"o# c #ED8F5B",
"p# c #FCA368",
"q# c #F59E66",
"r# c #F9A067",
"s# c #F9A165",
"t# c #F99F66",
"u# c #FAA069",
"v# c #FAA169",
"w# c #FAA166",
"x# c #F8A264",
"y# c #F7A262",
"z# c #F9A162",
"A# c #F59E5E",
"B# c #FCA464",
"C# c #F0A172",
"D# c #F8C7AA",
"E# c #FFDFBE",
"F# c #F7D7AF",
"G# c #F7C497",
"H# c #F19C6B",
"I# c #DC7947",
"J# c #E48552",
"K# c #DD8553",
"L# c #BF6033",
"M# c #E28B60",
"N# c #E99B6D",
"O# c #F2A367",
"P# c #FA9F60",
"Q# c #E89874",
"R# c #E2CBBF",
"S# c #E9F6F7",
"T# c #EAF1FA",
"U# c #F6F6FB",
"V# c #FAF9FC",
"W# c #F9F1FA",
"X# c #BBABB5",
"Y# c #BDAEB7",
"Z# c #DDCBCC",
"`# c #FBF1F9",
" $ c #EFEAF7",
".$ c #E9EFFC",
"+$ c #EAF0FC",
"@$ c #F1F6FE",
"#$ c #E2CDCB",
"$$ c #D28869",
"%$ c #FFA26B",
"&$ c #F99F64",
"*$ c #FAA065",
"=$ c #FAA167",
"-$ c #FAA168",
";$ c #F9A066",
">$ c #F7A168",
",$ c #F7A167",
"'$ c #F7A165",
")$ c #F9A163",
"!$ c #FB9F63",
"~$ c #FA9E65",
"{$ c #F89D64",
"]$ c #FEA667",
"^$ c #F4B072",
"/$ c #FBD2AB",
"($ c #FBDFCB",
"_$ c #F9DECA",
":$ c #FBCBAA",
"<$ c #EFA579",
"[$ c #D3764B",
"}$ c #AE4621",
"|$ c #EA865A",
"1$ c #F8A674",
"2$ c #F8A16F",
"3$ c #FAA66A",
"4$ c #E38A65",
"5$ c #D5AFA0",
"6$ c #F1FDFF",
"7$ c #E9EFFF",
"8$ c #EEEDFC",
"9$ c #F5F4FD",
"0$ c #F0EDF6",
"a$ c #F5E9EF",
"b$ c #C6AFB4",
"c$ c #A28385",
"d$ c #FFF7FE",
"e$ c #F1E8F9",
"f$ c #EBEFF9",
"g$ c #EBEFFA",
"h$ c #F0EFF8",
"i$ c #D5B09E",
"j$ c #ED9B6E",
"k$ c #FDA168",
"l$ c #F89F66",
"m$ c #F89F65",
"n$ c #F6A066",
"o$ c #F5A166",
"p$ c #F6A065",
"q$ c #F8A065",
"r$ c #F9A167",
"s$ c #FCA06A",
"t$ c #F99B68",
"u$ c #DA7F51",
"v$ c #E88B52",
"w$ c #F9A15D",
"x$ c #F1AF7D",
"y$ c #F8D0B1",
"z$ c #FBDCC7",
"A$ c #FDDEC9",
"B$ c #FED4B9",
"C$ c #FBBC9A",
"D$ c #E58C65",
"E$ c #DB794C",
"F$ c #F69F61",
"G$ c #FF9F61",
"H$ c #FD9D60",
"I$ c #FAA163",
"J$ c #F79C6E",
"K$ c #DCA289",
"L$ c #EAE3E3",
"M$ c #ECF2FF",
"N$ c #E7F0FB",
"O$ c #E7F3FA",
"P$ c #E7EFF2",
"Q$ c #FEF7F9",
"R$ c #B49DA0",
"S$ c #C0A5A8",
"T$ c #F7F6FB",
"U$ c #E9EAFB",
"V$ c #E9F0F8",
"W$ c #E9F0FA",
"X$ c #F5F1FA",
"Y$ c #DBAD8E",
"Z$ c #EF975E",
"`$ c #FBA16A",
" % c #F7A065",
".% c #F6A165",
"+% c #F6A067",
"@% c #F6A570",
"#% c #F4A673",
"$% c #EC9A6C",
"%% c #D1794A",
"&% c #E68752",
"*% c #FDA26F",
"=% c #F2A374",
"-% c #F9C29B",
";% c #FFE0C1",
">% c #FDDDBC",
",% c #F4C29D",
"'% c #E09266",
")% c #D67F46",
"!% c #FB9E5C",
"~% c #FF9D63",
"{% c #FBA972",
"]% c #CE805C",
"^% c #C8A39D",
"/% c #F2F5FD",
"(% c #EAF1F4",
"_% c #E6F2F3",
":% c #E6F5F4",
"<% c #E7F1F1",
"[% c #EAEDED",
"}% c #E6E0E3",
"|% c #E7F3F7",
"1% c #DEF1FD",
"2% c #E7F2FB",
"3% c #EBF3FB",
"4% c #E7D7DC",
"5% c #D5916A",
"6% c #FCA265",
"7% c #F89E68",
"8% c #F8A066",
"9% c #F29F67",
"0% c #EFA56E",
"a% c #FBC490",
"b% c #F6BC8A",
"c% c #E9A26E",
"d% c #D8834F",
"e% c #E58456",
"f% c #FF9B6E",
"g% c #FAA16D",
"h% c #EDB075",
"i% c #F3C790",
"j% c #FCD7AD",
"k% c #FED4B6",
"l% c #F6BB94",
"m% c #CE8350",
"n% c #D6854A",
"o% c #FBA16F",
"p% c #F39F6D",
"q% c #F1A86D",
"r% c #E89568",
"s% c #D79F8D",
"t% c #F4EDEE",
"u% c #F0EEF8",
"v% c #ECEEF6",
"w% c #ECEFF9",
"x% c #ECEDF7",
"y% c #F1F0FC",
"z% c #F0F4FA",
"A% c #E6F2F5",
"B% c #DCF5FD",
"C% c #E3EBF7",
"D% c #F9FBFF",
"E% c #C19A96",
"F% c #D57E55",
"G% c #FDA366",
"H% c #F99F67",
"I% c #F99F63",
"J% c #FA9F63",
"K% c #F99E64",
"L% c #F8A86F",
"M% c #F1A66F",
"N% c #F8B985",
"O% c #FDD4A2",
"P% c #F2BD89",
"Q% c #F5A971",
"R% c #E28955",
"S% c #D97847",
"T% c #F69962",
"U% c #F4A66A",
"V% c #E9A46A",
"W% c #F2AA79",
"X% c #F9AE84",
"Y% c #F6AB7C",
"Z% c #EA9B63",
"`% c #E49159",
" & c #FFA572",
".& c #FBA36B",
"+& c #F8A363",
"@& c #FFA66F",
"#& c #CE7F5A",
"$& c #E9CAC3",
"%& c #F2F3FF",
"&& c #EBEDFD",
"*& c #F1EFFF",
"=& c #F8F1FF",
"-& c #FAEFFE",
";& c #FDF8FF",
">& c #FCF4F9",
",& c #F4F9FA",
"'& c #F9F7FF",
")& c #FDE9EB",
"!& c #D99781",
"~& c #F59668",
"{& c #F8A165",
"]& c #F8A164",
"^& c #F7A063",
"/& c #F9A164",
"(& c #FBA069",
"_& c #D98350",
":& c #DA8954",
"<& c #E79A68",
"[& c #FAB887",
"}& c #F6B181",
"|& c #F5A46D",
"1& c #F4A15F",
"2& c #E6914E",
"3& c #D37D41",
"4& c #EA9569",
"5& c #F8A078",
"6& c #FC9E6C",
"7& c #FE9D5C",
"8& c #FF9F5B",
"9& c #FFA46B",
"0& c #E58B5F",
"a& c #F09769",
"b& c #F39562",
"c& c #F09762",
"d& c #EF9A6A",
"e& c #D67F58",
"f& c #BB8678",
"g& c #F6F6FF",
"h& c #F7F4FF",
"i& c #EADFE9",
"j& c #D8C4CE",
"k& c #DABEC8",
"l& c #E3C8DB",
"m& c #E9CAD1",
"n& c #ECD7D4",
"o& c #EEDFE4",
"p& c #B98787",
"q& c #D9805B",
"r& c #F9A266",
"s& c #F6A360",
"t& c #F79E64",
"u& c #F6A466",
"v& c #F6A465",
"w& c #F9A065",
"x& c #FD9E67",
"y& c #DC7E4D",
"z& c #C7693C",
"A& c #ED9167",
"B& c #F4976B",
"C& c #FBA160",
"D& c #FFAC67",
"E& c #F49B60",
"F& c #D6784A",
"G& c #E5895F",
"H& c #F09662",
"I& c #FFA866",
"J& c #FFAD6E",
"K& c #E07F5D",
"L& c #7B2B1B",
"M& c #853D24",
"N& c #963E27",
"O& c #8D472B",
"P& c #824730",
"Q& c #843A2A",
"R& c #712A23",
"S& c #BA9092",
"T& c #DABABA",
"U& c #8B6E6B",
"V& c #4D3232",
"W& c #5D2D3D",
"X& c #68353A",
"Y& c #734744",
"Z& c #6A4A4C",
"`& c #663235",
" * c #934833",
".* c #DF8766",
"+* c #F99766",
"@* c #FB9E61",
"#* c #FFA66E",
"$* c #FCA16D",
"%* c #F99E69",
"&* c #F7A169",
"** c #F3A266",
"=* c #F4A365",
"-* c #FB9F68",
";* c #F6A16A",
">* c #F6A16B",
",* c #FCA06C",
"'* c #FC9D69",
")* c #FF9D6B",
"!* c #FF9E6C",
"~* c #F69563",
"{* c #D67949",
"]* c #D47348",
"^* c #F79567",
"/* c #FA9F68",
"(* c #F9A265",
"_* c #FFA166",
":* c #FC9B65",
"<* c #E98D5B",
"[* c #C4683A",
"}* c #BE6339",
"|* c #B06D4E",
"1* c #732F25",
"2* c #64201E",
"3* c #8B463B",
"4* c #B6573A",
"5* c #D06B39",
"6* c #D37A42",
"7* c #F4986B",
"8* c #FC9C73",
"9* c #F99F6C",
"0* c #F4A766",
"a* c #F1A561",
"b* c #F49E63",
"c* c #FB9E6B",
"d* c #F7A069",
"e* c #F9A16A",
"f* c #FCA16C",
"g* c #FE9F6C",
"h* c #FFA06C",
"i* c #FBA468",
"j* c #F49D5F",
"k* c #ED925B",
"l* c #C86A3A",
"m* c #DF8653",
"n* c #FBA26F",
"o* c #F9A369",
"p* c #FFA673",
"q* c #F6936D",
"r* c #7C1705",
"s* c #7C3625",
"t* c #C76E51",
"u* c #DE7B53",
"v* c #CA693D",
"w* c #BF633B",
"x* c #E88C57",
"y* c #E98E54",
"z* c #F9A267",
"A* c #FEA86F",
"B* c #F4A167",
"C* c #F6A362",
"D* c #F19C5B",
"E* c #DD8848",
"F* c #E89255",
"G* c #E68F53",
"H* c #F49D63",
"I* c #FEA76D",
"J* c #FCA36A",
"K* c #FAA466",
"L* c #F29B5B",
"M* c #EC8E5C",
"N* c #DB8154",
"O* c #D6874F",
"P* c #E79659",
"Q* c #FFA778",
"R* c #D07B64",
"S* c #6E1913",
"T* c #6C1F18",
"U* c #963729",
"V* c #EC9366",
"W* c #FFB374",
"X* c #E98F56",
"Y* c #B24C23",
"Z* c #ED8661",
"`* c #E78B58",
" = c #FAA561",
".= c #F8A262",
"+= c #F6A164",
"@= c #F7A466",
"#= c #E49459",
"$= c #C16E36",
"%= c #E08C58",
"&= c #E1895C",
"*= c #EF9265",
"== c #FFA372",
"-= c #FEA36A",
";= c #F5A268",
">= c #F6AA6A",
",= c #DC8545",
"'= c #D47440",
")= c #C87153",
"!= c #69241A",
"~= c #AB5E46",
"{= c #E88666",
"]= c #E37B53",
"^= c #D26E43",
"/= c #F4996C",
"(= c #CC6C39",
"_= c #E5834A",
":= c #F39462",
"<= c #FA9F6F",
"[= c #F6A16D",
"}= c #F49F6B",
"|= c #F69E6D",
"1= c #DD7F55",
"2= c #C7653C",
"3= c #E7825E",
"4= c #E4895D",
"5= c #F1A364",
"6= c #FFAC66",
"7= c #FEA067",
"8= c #CD7151",
"9= c #6E2215",
"0= c #7F2427",
"a= c #902F20",
"b= c #E5895A",
"c= c #FFB175",
"d= c #F2915D",
"e= c #B7522B",
"f= c #C05D34",
"g= c #D67649",
"h= c #F69E68",
"i= c #FDA46B",
"j= c #FCA069",
"k= c #FFA46E",
"l= c #F49460",
"m= c #EB8E5D",
"n= c #D06F41",
"o= c #C9683C",
"p= c #D67D55",
"q= c #A55135",
"r= c #682616",
"s= c #8F4C2E",
"t= c #DE8C68",
"u= c #CA6E51",
"v= c #C4654C",
"w= c #FFA579",
"x= c #F09360",
"y= c #CC7345",
"z= c #DA844C",
"A= c #EE9556",
"B= c #F59D5E",
"C= c #FFB174",
"D= c #FFB075",
"E= c #FFB073",
"F= c #FFA472",
"G= c #B85D49",
"H= c #6C1515",
"I= c #8B5446",
"J= c #73251B",
"K= c #95402C",
"L= c #E48F68",
"M= c #FFAA79",
"N= c #F59D70",
"O= c #EB9061",
"P= c #E48A59",
"Q= c #C57046",
"R= c #B26340",
"S= c #B16947",
"T= c #B36943",
"U= c #A65D40",
"V= c #7B3629",
"W= c #6A230D",
"X= c #BA6848",
"Y= c #D57C5E",
"Z= c #D1745E",
"`= c #CE7260",
" - c #923C2D",
".- c #84382F",
"+- c #813F39",
"@- c #7B423B",
" ",
" ",
" ",
" ",
" . + @ # $ % & * ",
" = - ; > , ' ) ! ~ { ] ^ / ( _ : < ",
"[ } | 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l ",
"m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W ",
"X Y Z ` ...+.@.#.$. %.&.*.=.-.;.>.,.'.).!.~.{.].^./.9 (._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.",
"R a.b.c.d.e.f.R W g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.",
"R T.U.V.W.X.Y.V Z.`. +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+",
"0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+",
"V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@R ",
"c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@",
"Y@Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/#(#_#:#<#[#}#|#1#2#3#4#5#6#7#8#9#0#a#b#c#d#e#f#",
"g#h#i#j#k#l#m#n#o#p#~@q#r#s#s#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#",
"Z#`# $.$+$@$#$$$%$&$&$*$=$-$r#r#;$>$,$'$)$)$!$~${$]$^$/$($_$:$<$[$}$|$1$2$~@3$4$5$6$7$8$9$0$a$b$",
"c$d$e$f$g$h$i$j$k$A@;$=$;$;$l$m$m$n$o$p$q$r$s$t$u$v$w$x$y$z$A$B$C$D$E$F$G$H$I$J$K$L$M$N$O$P$Q$R$",
"S$T$U$V$W$X$Y$Z$`$;$=$;$=$=$;$;$;$ % %.% %+%@%#%$%%%&%*%=%-%D ;%>%,%'%)%!%~%t#{%]%^%/%(%_%:%<%[%",
"}%|%1%2%3%4%5%6%7%r#=$m$;$;$=$;$8%&$&$q$+%9%0%a%b%c%d%e%f%g%h%i%j%k%l%m%n%o%p%q%r%s%t%u%v%w%x%y%",
"z%A%B%C%D%E%F%G%H%=$=$;$;$;$=$;$m$I%J%K%v@L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%`% &.&+&@&#&$&%&&&*&=&-&",
";&>&,&'&)&!&~&{&]&;$;$;$;$;$;$;$;$^&/&K%(&_&:&<&[&}&|&1&2&3&4&5&6&7&8&9&0&a&b&c&d&e&f&g&h&i&j&k&",
"l&m&n&o&p&q&=.r&s&t&t&r$;$;$m$;$r$u&v&w&x&t$y&z&A&B&x@C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V& ",
"W&X&Y&Z&`& *.*+*@*#*$*%*&***=*A@-*;*>*,*'*)*!*~*{*]*^*/*(*_*:*<*[*}*|*1* 2* ",
" 3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*z@i*j*k*l*m*n*8%o*p*q*r* ",
" s*t*u*v*w*x*y*z*A*B*C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S* ",
" T*U*V*W*X*Y*Z*`* =.=+=@=#=$=%=&=*===-=;=>=,='=)=!= ",
" ~={=]=^=/=(=_=:=<=n*[=}=|=1=2=3=4=5=6=7=8=9= ",
" 0=a=b=c=d=e=f=g=o%h=i=j=k=l=m=n=o=p=q=r= ",
" s=t=u=v=w=x=y=z=A=B=C=D=E=F=G=H= ",
" I=J=K=L=M=N=O=P=Q=R=S=T=U=V= ",
" W=X=Y=Z=`= -.-+-@- ",
" ",
" ",
" "};
/* actions/view-refresh.png */
/* XPM */
const char *tango_view_refresh[] = {
/* width height ncolors chars_per_pixel */
"16 16 100 2",
/* colors */
" c #9DBDDC",
" . c #6990C0",
" X c #3767A6",
" o c #3667A5",
" O c #3565A4",
" + c #DDE8F3",
" @ c #8AACD3",
" # c #99B9DB",
" $ c #B4CBE5",
" % c #D8E4F1",
" & c #5783BB",
" * c #537FB7",
" = c #4B77AF",
" - c #A0BEDE",
" ; c #3868A6",
" : c #3768A5",
" > c #4C79B3",
" , c #769DCF",
" < c #5580B5",
" 1 c #97B6D8",
" 2 c #8FACD0",
" 3 c #E4ECF5",
" 4 c #4E7AB1",
" 5 c #C8D8EA",
" 6 c #4C78AF",
" 7 c #8FB0D3",
" 8 c #6D94C2",
" 9 c #6891C7",
" 0 c #3C6BA9",
" q c #3A69A7",
" w c #3969A6",
" e c #C6D8EB",
" r c #4774AD",
" t c #C1D2E6",
" y c #6890C0",
" u c #CDDBEB",
" i c #3465A4",
" p c #6188B9",
" a c #DBE6F2",
" s c #BFD2E7",
" d c #84A6CE",
" f c #E5EDF5",
" g c #C9D9EA",
" h c #8FADD2",
" j c #A1BEDD",
" k c #3A6AA6",
" l c #E2EBF5",
" z c #88A7CE",
" x c #3768A6",
" c c #95B2D4",
" v c #3566A4",
" b c #C4D7EB",
" n c #4371AB",
" m c #A1BBD9",
" M c #E7EEF6",
" N c #BFD3E9",
" B c #5F87B9",
" V c #7298C5",
" C c #5D85B7",
" Z c #6C95C9",
" A c #82A5CE",
" S c #9CB7D7",
" D c #C9DAEC",
" F c #E3ECF5",
" G c #4C78B0",
" H c #8EAED3",
" J c #4F7CB6",
" K c #3969A7",
" L c #3869A6",
" P c #3767A5",
" I c #A8C2DF",
" U c #93B1D4",
" Y c #4170AB",
" T c #CCDDEE",
" R c #B0C9E3",
" E c #E5EDF6",
" W c #E4EDF5",
" Q c #FFFFFF",
" ! c #4D79B0",
" ~ c #C7D7E9",
" ^ c #4C77AF",
" / c #5B84B7",
" ( c #D5E2F0",
" ) c #3C6CA9",
" _ c #3A6AA7",
" ` c #E0E9F4",
" ' c #A8C1DE",
" ] c #8CADD3",
" [ c #B4CAE3",
" { c #3566A5",
" } c #7299CD",
" | c #88ABD2",
". c #CCDCED",
".. c #E6EEF6",
".X c #BCD1E7",
".o c #7EA4D5",
".O c #3D6DA9",
".+ c #3C6BA8",
".@ c #3B6BA7",
".# c None",
/* pixels */
".#.#.#.# q _ o K _.#.#.#.#.#.#.#",
".#.#.# ; y 7 I ' U B P.#.#.# i.#",
".#.# w ] j $ N T ( s = o n v.#",
".# K . V.+ v _ C m % a + z 5 _.#",
".# ; Y ) _.#.#.# L p u l.... _.#",
".# O _ 9 P.#.#.#.#.# v ~ e F k.#",
".# i.#.#.#.#.#.#.# ; 2 M a.. k.#",
".#.#.#.#.#.#.#.# i i r ^ ^ 6 i.#",
".# i i i i i i i.#.#.#.#.#.#.#.#",
".# i f E 3 S x.#.#.#.#.#.#.# i.#",
".# v.. b g i.#.#.#.#.# { Z * i.#",
".# P.. F W t ! L.#.#.# 0 J _ :.#",
".# ; % c ` +. h G { w w.O G _.#",
".# P / o 4 [ D.X R - | A H ;.#.#",
".# i o.#.# X < d 1 # @ 8 ;.#.#.#",
".# i.#.#.#.#.# _ L v _.@.#.#.#.#"
};
| 54,763
|
C++
|
.cxx
| 2,588
| 20.146059
| 100
| 0.389747
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,164
|
locator.cxx
|
w1hkj_fldigi/src/misc/locator.cxx
|
/**
* \addtogroup utilities
* @{
*/
/**
* \file src/locator.cxx
* \brief locator and bearing conversion interface
* \author Stephane Fillod and the Hamlib Group
* \date 2000-2006
*
* Hamlib Interface - locator, bearing, and conversion calls
*/
/*
* Hamlib Interface - locator and bearing conversion calls
* Copyright (c) 2001-2006 by Stephane Fillod
* Copyright (c) 2003 by Nate Bargmann
* Copyright (c) 2003 by Dave Hines
*
* $Id$
*
* Code to determine bearing and range was taken from the Great Circle,
* by S. R. Sampson, N5OWK.
* Ref: "Air Navigation", Air Force Manual 51-40, 1 February 1987
* Ref: "ARRL Satellite Experimenters Handbook", August 1990
*
* Code to calculate distance and azimuth between two Maidenhead locators,
* taken from wwl, by IK0ZSN Mirko Caserta.
*
* New bearing code added by N0NB was found at:
* http://williams.best.vwh.net/avform.htm#Crs
*
*
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
*
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA.
*
*/
/*! \page hamlib Hamlib general purpose API
*
* Here are grouped some often used functions, like locator conversion
* routines.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "configuration.h"
#include "locator.h"
namespace QRB {
#define RADIAN (180.0 / M_PI)
/* arc length for 1 degree, 60 Nautical Miles
* 109.728 Kilometers
* 68.182 statute miles
* arc length for 1 radian, 6286.951 Km
* 3437.746 Nm
* 3906.41 Sm
*/
#define ARC_IN_KM 6372.5639
#define ARC_IN_NM 3484.5603
#define ARC_IN_SM 3959.7276
/* The following is contributed by Dave Hines M1CXW
*
* begin dph
*/
/*
* These are the constants used when converting between Maidenhead grid
* locators and longitude/latitude values. MAX_LOCATOR_PAIRS is the maximum
* number of locator character pairs to convert. This number MUST NOT exceed
* the number of pairs of values in loc_char_range[].
* Setting MAX_LOCATOR_PAIRS to 3 will convert the currently defined 6
* character locators. A value of 4 will convert the extended 8 character
* locators described in section 3L of "The IARU region 1 VHF managers
* handbook". Values of 5 and 6 will extent the format even more, to the
* longest definition I have seen for locators, see
* http://www.btinternet.com/~g8yoa/geog/non-ra.html
* Beware that there seems to be no universally accepted standard for 10 & 12
* character locators.
*
* The ranges of characters which will be accepted by locator2longlat, and
* generated by longlat2locator, are specified by the loc_char_range[] array.
* This array may be changed without requiring any other code changes.
*
* For the fifth pair to range from aa to xx use:
* const static int loc_char_range[] = { 18, 10, 24, 10, 24, 10 };
*
* For the fifth pair to range from aa to yy use:
* const static int loc_char_range[] = { 18, 10, 24, 10, 25, 10 };
*
* MAX_LOCATOR_PAIRS now sets the limit locator2longlat() will convert and
* sets the maximum length longlat2locator() will generate. Each function
* properly handles any value from 1 to 6 so MAX_LOCATOR_PAIRS should be
* left at 6. MIN_LOCATOR_PAIRS sets a floor on the shortest locator that
* should be handled. -N0NB
*/
const static int loc_char_range[] = { 18, 10, 24, 10, 24, 10 };
#define MAX_LOCATOR_PAIRS 6
#define MIN_LOCATOR_PAIRS 1
/**
* \brief Convert DMS to decimal degrees
* \param degrees Degrees, whole degrees
* \param minutes Minutes, whole minutes
* \param seconds Seconds, decimal seconds
* \param sw South or West
*
* Convert degree/minute/second angle to decimal degrees angle.
* \a degrees >360, \a minutes > 60, and \a seconds > 60.0 are allowed,
* but resulting angle won't be normalized.
*
* When the variable sw is passed a value of 1, the returned decimal
* degrees value will be negative (south or west). When passed a
* value of 0 the returned decimal degrees value will be positive
* (north or east).
*
* \return The angle in decimal degrees.
*
* \sa dec2dms()
*/
double dms2dec(int degrees, int minutes, double seconds, int sw) {
double st;
if (degrees < 0)
degrees = abs(degrees);
if (minutes < 0)
minutes = abs(minutes);
if (seconds < 0)
seconds = fabs(seconds);
st = (double)degrees + (double)minutes / 60. + seconds / 3600.;
if (sw == 1)
return -st;
else
return st;
}
/**
* \brief Convert D M.MMM notation to decimal degrees
* \param degrees Degrees, whole degrees
* \param minutes Minutes, decimal minutes
* \param sw South or West
*
* Convert a degrees, decimal minutes notation common on
* many GPS units to its decimal degrees value.
*
* \a degrees > 360, \a minutes > 60.0 are allowed, but
* resulting angle won't be normalized.
*
* When the variable sw is passed a value of 1, the returned decimal
* degrees value will be negative (south or west). When passed a
* value of 0 the returned decimal degrees value will be positive
* (north or east).
*
* \return The angle in decimal degrees.
*
* \sa dec2dmmm()
*/
double dmmm2dec(int degrees, double minutes, int sw) {
double st;
if (degrees < 0)
degrees = abs(degrees);
if (minutes < 0)
minutes = fabs(minutes);
st = (double)degrees + minutes / 60.;
if (sw == 1)
return -st;
else
return st;
}
/**
* \brief Convert decimal degrees angle into DMS notation
* \param dec Decimal degrees
* \param degrees Pointer for the calculated whole Degrees
* \param minutes Pointer for the calculated whole Minutes
* \param seconds Pointer for the calculated decimal Seconds
* \param sw Pointer for the calculated SW flag
*
* Convert decimal degrees angle into its degree/minute/second
* notation.
*
* When \a dec < -180 or \a dec > 180, the angle will be normalized
* within these limits and the sign set appropriately.
*
* Upon return dec2dms guarantees 0 >= \a degrees <= 180,
* 0 >= \a minutes < 60, and 0.0 >= \a seconds < 60.0.
*
* When \a dec is < 0.0 \a sw will be set to 1. When \a dec is
* >= 0.0 \a sw will be set to 0. This flag allows the application
* to determine whether the DMS angle should be treated as negative
* (south or west).
*
* \retval -QRB_EINVAL if any of the pointers are NULL.
* \retval QRB_OK if conversion went OK.
*
* \sa dms2dec()
*/
int dec2dms(double dec, int *degrees, int *minutes, double *seconds, int *sw) {
int deg, min;
double st;
/* bail if NULL pointers passed */
if (!degrees || !minutes || !seconds || !sw)
return -QRB_EINVAL;
/* reverse the sign if dec has a magnitude greater
* than 180 and factor out multiples of 360.
* e.g. when passed 270 st will be set to -90
* and when passed -270 st will be set to 90. If
* passed 361 st will be set to 1, etc. If passed
* a value > -180 || < 180, value will be unchanged.
*/
if (dec >= 0.0)
st = fmod(dec + 180, 360) - 180;
else
st = fmod(dec - 180, 360) + 180;
/* if after all of that st is negative, we want deg
* to be negative as well except for 180 which we want
* to be positive.
*/
if (st < 0.0 && st != -180)
*sw = 1;
else
*sw = 0;
/* work on st as a positive value to remove a
* bug introduced by the effect of floor() when
* passed a negative value. e.g. when passed
* -96.8333 floor() returns -95! Also avoids
* a rounding error introduced on negative values.
*/
st = fabs(st);
deg = (int)floor(st);
st = 60. * (st - (double)deg);
min = (int)floor(st);
st = 60. * (st - (double)min);
*degrees = deg;
*minutes = min;
*seconds = st;
return QRB_OK;
}
/**
* \brief Convert a decimal angle into D M.MMM notation
* \param dec Decimal degrees
* \param degrees Pointer for the calculated whole Degrees
* \param minutes Pointer for the calculated decimal Minutes
* \param sw Pointer for the calculated SW flag
*
* Convert a decimal angle into its degree, decimal minute
* notation common on many GPS units.
*
* When passed a value < -180 or > 180, the value will be normalized
* within these limits and the sign set apropriately.
*
* Upon return dec2dmmm guarantees 0 >= \a degrees <= 180,
* 0.0 >= \a minutes < 60.0.
*
* When \a dec is < 0.0 \a sw will be set to 1. When \a dec is
* >= 0.0 \a sw will be set to 0. This flag allows the application
* to determine whether the D M.MMM angle should be treated as negative
* (south or west).
*
* \retval -QRB_EINVAL if any of the pointers are NULL.
* \retval QRB_OK if conversion went OK.
*
* \sa dmmm2dec()
*/
int dec2dmmm(double dec, int *degrees, double *minutes, int *sw) {
int r, min;
double sec;
/* bail if NULL pointers passed */
if (!degrees || !minutes || !sw)
return -QRB_EINVAL;
r = dec2dms(dec, degrees, &min, &sec, sw);
if (r != QRB_OK)
return r;
*minutes = (double)min + sec / 60;
return QRB_OK;
}
/**
* \brief Convert Maidenhead grid locator to Longitude/Latitude
* \param longitude Pointer for the calculated Longitude
* \param latitude Pointer for the calculated Latitude
* \param locator The Maidenhead grid locator--2 through 12 char + nul string
*
* Convert Maidenhead grid locator to Longitude/Latitude (decimal degrees).
* The locator should be in 2 through 12 chars long format.
* \a locator2longlat is case insensitive, however it checks for
* locator validity.
*
* Decimal long/lat is computed to center of grid square, i.e. given
* EM19 will return coordinates equivalent to the southwest corner
* of EM19mm.
*
* \retval -QRB_EINVAL if locator exceeds RR99xx99xx99 or exceeds length
* limit--currently 1 to 6 lon/lat pairs.
* \retval QRB_OK if conversion went OK.
*
* \bug The fifth pair ranges from aa to xx, there is another convention
* that ranges from aa to yy. At some point both conventions should be
* supported.
*
* \sa longlat2locator()
*/
/* begin dph */
int locator2longlat(double *longitude, double *latitude, const char *locator) {
int x_or_y, paircount;
int locvalue, pair;
int divisions;
double xy[2], ordinate;
/* bail if NULL pointers passed */
if (!longitude || !latitude)
return -QRB_EINVAL;
paircount = strlen(locator) / 2;
/* verify paircount is within limits */
if (paircount > MAX_LOCATOR_PAIRS)
paircount = MAX_LOCATOR_PAIRS;
else if (paircount < MIN_LOCATOR_PAIRS)
return -QRB_EINVAL;
/* For x(=longitude) and y(=latitude) */
for (x_or_y = 0; x_or_y < 2; ++x_or_y) {
ordinate = -90.0;
divisions = 1;
for (pair = 0; pair < paircount; ++pair) {
locvalue = locator[pair*2 + x_or_y];
/* Value of digit or letter */
locvalue -= (loc_char_range[pair] == 10) ? '0' :
(isupper(locvalue)) ? 'A' : 'a';
/* Check range for non-letter/digit or out of range */
if ((locvalue < 0) || (locvalue >= loc_char_range[pair]))
return -QRB_EINVAL;
divisions *= loc_char_range[pair];
ordinate += locvalue * 180.0 / divisions;
}
/* Center ordinate in the Maidenhead "square" or "subsquare" */
ordinate += 90.0 / divisions;
xy[x_or_y] = ordinate;
}
*longitude = xy[0] * 2.0;
*latitude = xy[1];
return QRB_OK;
}
/* end dph */
/**
* \brief Convert longitude/latitude to Maidenhead grid locator
* \param longitude Longitude, decimal degrees
* \param latitude Latitude, decimal degrees
* \param locator Pointer for the Maidenhead Locator
* \param pair_count Precision expressed as lon/lat pairs in the locator
*
* Convert longitude/latitude (decimal degrees) to Maidenhead grid locator.
* \a locator must point to an array at least \a pair_count * 2 char + '\\0'.
*
* \retval -QRB_EINVAL if \a locator is NULL or \a pair_count exceeds
* length limit. Currently 1 to 6 lon/lat pairs.
* \retval QRB_OK if conversion went OK.
*
* \bug \a locator is not tested for overflow.
* \bug The fifth pair ranges from aa to yy, there is another convention
* that ranges from aa to xx. At some point both conventions should be
* supported.
*
* \sa locator2longlat()
*/
/* begin dph */
int longlat2locator(double longitude, double latitude, char *locator, int pair_count) {
int x_or_y, pair, locvalue, divisions;
double square_size, ordinate;
if (!locator)
return -QRB_EINVAL;
if (pair_count < MIN_LOCATOR_PAIRS || pair_count > MAX_LOCATOR_PAIRS)
return -QRB_EINVAL;
for (x_or_y = 0; x_or_y < 2; ++x_or_y) {
ordinate = (x_or_y == 0) ? longitude / 2.0 : latitude;
divisions = 1;
/* The 1e-6 here guards against floating point rounding errors */
ordinate = fmod(ordinate + 270.000001, 180.0);
for (pair = 0; pair < pair_count; ++pair) {
divisions *= loc_char_range[pair];
square_size = 180.0 / divisions;
locvalue = (int) (ordinate / square_size);
ordinate -= square_size * locvalue;
locvalue += (loc_char_range[pair] == 10) ? '0':'A';
locator[pair * 2 + x_or_y] = locvalue;
}
}
locator[pair_count * 2] = '\0';
return QRB_OK;
}
/* end dph */
/**
* \brief Calculate the distance and bearing between two points.
* \param lon1 The local Longitude, decimal degrees
* \param lat1 The local Latitude, decimal degrees
* \param lon2 The remote Longitude, decimal degrees
* \param lat2 The remote Latitude, decimal degrees
* \param distance Pointer for the distance, km
* \param azimuth Pointer for the bearing, decimal degrees
*
* Calculate the QRB between \a lon1, \a lat1 and \a lon2, \a lat2.
*
* This version will calculate the QRB to a precision sufficient
* for 12 character locators. Antipodal points, which are easily
* calculated, are considered equidistant and the bearing is
* simply resolved to be true north (0.0°).
*
* \retval -QRB_EINVAL if NULL pointer passed or lat and lon values
* exceed -90 to 90 or -180 to 180.
* \retval QRB_OK if calculations are successful.
*
* \return The distance in kilometers and azimuth in decimal degrees
* for the short path are stored in \a distance and \a azimuth.
*
* \sa distance_long_path(), azimuth_long_path()
*/
int qrb(double lon1, double lat1, double lon2, double lat2, double *distance, double *azimuth) {
double delta_long, tmp, arc, az;
/* bail if NULL pointers passed */
if (!distance || !azimuth)
return -QRB_EINVAL;
if ((lat1 > 90.0 || lat1 < -90.0) || (lat2 > 90.0 || lat2 < -90.0))
return -QRB_EINVAL;
if ((lon1 > 180.0 || lon1 < -180.0) || (lon2 > 180.0 || lon2 < -180.0))
return -QRB_EINVAL;
/* Prevent ACOS() Domain Error */
if (lat1 == 90.0)
lat1 = 89.999999999;
else if (lat1 == -90.0)
lat1 = -89.999999999;
if (lat2 == 90.0)
lat2 = 89.999999999;
else if (lat2 == -90.0)
lat2 = -89.999999999;
/* Convert variables to Radians */
lat1 /= RADIAN;
lon1 /= RADIAN;
lat2 /= RADIAN;
lon2 /= RADIAN;
delta_long = lon2 - lon1;
tmp = sin(lat1) * sin(lat2) + cos(lat1) * cos(lat2) * cos(delta_long);
if (tmp > .999999999999999) {
/* Station points coincide, use an Omni! */
*distance = 0.0;
*azimuth = 0.0;
return QRB_OK;
}
if (tmp < -.999999) {
/*
* points are antipodal, it's straight down.
* Station is equal distance in all Azimuths.
* So take 180 Degrees of arc times 60 nm,
* and you get 10800 nm, or whatever units...
*/
*distance = M_PI * ARC_IN_KM;
*azimuth = 0.0;
return QRB_OK;
}
arc = acos(tmp);
/*
* One degree of arc is 60 Nautical miles
* at the surface of the earth, 111.2 km, or 69.1 sm
* This method is easier than the one in the handbook
*/
*distance = arc * ARC_IN_KM;
/* Short Path */
/* Change to azimuth computation by Dave Freese, W1HKJ */
az = RADIAN * atan2(sin(lon2 - lon1) * cos(lat2),
(cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(lon2 - lon1)));
az = fmod(360.0 + az, 360.0);
if (az < 0.0)
az += 360.0;
else if (az >= 360.0)
az -= 360.0;
*azimuth = floor(az + 0.5);
return QRB_OK;
}
/**
* \brief Calculate the long path distance between two points.
* \param distance The shortpath distance
*
* Calculate the long path (respective of the short path)
* of a given distance.
*
* \return the distance in kilometers for the opposite path.
*
* \sa qrb()
*/
double distance_long_path(double distance) {
return (ARC_IN_KM * 2.0 * M_PI) - distance;
}
/**
* \brief Calculate the long path bearing between two points.
* \param azimuth The shortpath bearing
*
* Calculate the long path (respective of the short path)
* of a given bearing.
*
* \return the azimuth in decimal degrees for the opposite path.
*
* \sa qrb()
*/
double azimuth_long_path(double azimuth) {
return azimuth + (azimuth <= 180.0 ? 180.0 : -180.0);
}
} // namespace QRB
/*! @} */
| 17,409
|
C++
|
.cxx
| 515
| 31.520388
| 96
| 0.691379
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,165
|
estrings.cxx
|
w1hkj_fldigi/src/misc/estrings.cxx
|
#include "estrings.h"
#ifdef __MINGW32__
static std::string unknown = "UNKNOWN ERROR";
ESTRINGS emap[] = {
{NO_ERROR, "NO ERROR"},
{ERROR_INVALID_FUNCTION, "INVALID_FUNCTION"},
{ERROR_FILE_NOT_FOUND, "FILE_NOT_FOUND"},
{ERROR_PATH_NOT_FOUND, "PATH_NOT_FOUND"},
{ERROR_TOO_MANY_OPEN_FILES, "TOO_MANY_OPEN_FILES"},
{ERROR_ACCESS_DENIED, "ACCESS_DENIED"},
{ERROR_INVALID_HANDLE, "INVALID_HANDLE"},
{ERROR_ARENA_TRASHED, "ARENA_TRASHED"},
{ERROR_NOT_ENOUGH_MEMORY, "NOT_ENOUGH_MEMORY"},
{ERROR_INVALID_BLOCK, "INVALID_BLOCK"},
{ERROR_BAD_ENVIRONMENT, "BAD_ENVIRONMENT"},
{ERROR_BAD_FORMAT, "BAD_FORMAT"},
{ERROR_INVALID_ACCESS, "INVALID_ACCESS"},
{ERROR_INVALID_DATA, "INVALID_DATA"},
{ERROR_OUTOFMEMORY, "OUTOFMEMORY"},
{ERROR_INVALID_DRIVE, "INVALID_DRIVE"},
{ERROR_CURRENT_DIRECTORY, "CURRENT_DIRECTORY"},
{ERROR_NOT_SAME_DEVICE, "NOT_SAME_DEVICE"},
{ERROR_NO_MORE_FILES, "NO_MORE_FILES"},
{ERROR_WRITE_PROTECT, "WRITE_PROTECT"},
{ERROR_BAD_UNIT, "BAD_UNIT"},
{ERROR_NOT_READY, "NOT_READY"},
{ERROR_BAD_COMMAND, "BAD_COMMAND"},
{ERROR_CRC, "CRC"},
{ERROR_BAD_LENGTH, "BAD_LENGTH"},
{ERROR_SEEK, "SEEK"},
{ERROR_NOT_DOS_DISK, "NOT_DOS_DISK"},
{ERROR_SECTOR_NOT_FOUND, "SECTOR_NOT_FOUND"},
{ERROR_OUT_OF_PAPER, "OUT_OF_PAPER"},
{ERROR_WRITE_FAULT, "WRITE_FAULT"},
{ERROR_READ_FAULT, "READ_FAULT"},
{ERROR_GEN_FAILURE, "GEN_FAILURE"},
{ERROR_SHARING_VIOLATION, "SHARING_VIOLATION"},
{ERROR_LOCK_VIOLATION, "LOCK_VIOLATION"},
{ERROR_WRONG_DISK, "WRONG_DISK"},
{ERROR_SHARING_BUFFER_EXCEEDED, "SHARING_BUFFER_EXCEEDED"},
{ERROR_HANDLE_EOF, "HANDLE_EOF"},
{ERROR_HANDLE_DISK_FULL, "HANDLE_DISK_FULL"},
{ERROR_NOT_SUPPORTED, "NOT_SUPPORTED"},
{ERROR_REM_NOT_LIST, "REM_NOT_LIST"},
{ERROR_DUP_NAME, "DUP_NAME"},
{ERROR_BAD_NETPATH, "BAD_NETPATH"},
{ERROR_NETWORK_BUSY, "NETWORK_BUSY"},
{ERROR_DEV_NOT_EXIST, "DEV_NOT_EXIST"},
{ERROR_TOO_MANY_CMDS, "TOO_MANY_CMDS"},
{ERROR_ADAP_HDW_ERR, "ADAP_HDW_ERR"},
{ERROR_BAD_NET_RESP, "BAD_NET_RESP"},
{ERROR_UNEXP_NET_ERR, "UNEXP_NET_ERR"},
{ERROR_BAD_REM_ADAP, "BAD_REM_ADAP"},
{ERROR_PRINTQ_FULL, "PRINTQ_FULL"},
{ERROR_NO_SPOOL_SPACE, "NO_SPOOL_SPACE"},
{ERROR_PRINT_CANCELLED, "PRINT_CANCELLED"},
{ERROR_NETNAME_DELETED, "NETNAME_DELETED"},
{ERROR_NETWORK_ACCESS_DENIED, "NETWORK_ACCESS_DENIED"},
{ERROR_BAD_DEV_TYPE, "BAD_DEV_TYPE"},
{ERROR_BAD_NET_NAME, "BAD_NET_NAME"},
{ERROR_TOO_MANY_NAMES, "TOO_MANY_NAMES"},
{ERROR_TOO_MANY_SESS, "TOO_MANY_SESS"},
{ERROR_SHARING_PAUSED, "SHARING_PAUSED"},
{ERROR_REQ_NOT_ACCEP, "REQ_NOT_ACCEP"},
{ERROR_REDIR_PAUSED, "REDIR_PAUSED"},
{ERROR_FILE_EXISTS, "FILE_EXISTS"},
{ERROR_CANNOT_MAKE, "CANNOT_MAKE"},
{ERROR_FAIL_I24, "FAIL_I24"},
{ERROR_OUT_OF_STRUCTURES, "OUT_OF_STRUCTURES"},
{ERROR_ALREADY_ASSIGNED, "ALREADY_ASSIGNED"},
{ERROR_INVALID_PASSWORD, "INVALID_PASSWORD"},
{ERROR_INVALID_PARAMETER, "INVALID_PARAMETER"},
{ERROR_NET_WRITE_FAULT, "NET_WRITE_FAULT"},
{ERROR_NO_PROC_SLOTS, "NO_PROC_SLOTS"},
{ERROR_TOO_MANY_SEMAPHORES, "TOO_MANY_SEMAPHORES"},
{ERROR_EXCL_SEM_ALREADY_OWNED, "EXCL_SEM_ALREADY_OWNED"},
{ERROR_SEM_IS_SET, "SEM_IS_SET"},
{ERROR_TOO_MANY_SEM_REQUESTS, "TOO_MANY_SEM_REQUESTS"},
{ERROR_INVALID_AT_INTERRUPT_TIME, "INVALID_AT_INTERRUPT_TIME"},
{ERROR_SEM_OWNER_DIED, "SEM_OWNER_DIED"},
{ERROR_SEM_USER_LIMIT, "SEM_USER_LIMIT"},
{ERROR_DISK_CHANGE, "DISK_CHANGE"},
{ERROR_DRIVE_LOCKED, "DRIVE_LOCKED"},
{ERROR_BROKEN_PIPE, "BROKEN_PIPE"},
{ERROR_OPEN_FAILED, "OPEN_FAILED"},
{ERROR_BUFFER_OVERFLOW, "BUFFER_OVERFLOW"},
{ERROR_DISK_FULL, "DISK_FULL"},
{ERROR_NO_MORE_SEARCH_HANDLES, "NO_MORE_SEARCH_HANDLES"},
{ERROR_INVALID_TARGET_HANDLE, "INVALID_TARGET_HANDLE"},
{ERROR_INVALID_CATEGORY, "INVALID_CATEGORY"},
{ERROR_INVALID_VERIFY_SWITCH, "INVALID_VERIFY_SWITCH"},
{ERROR_BAD_DRIVER_LEVEL, "BAD_DRIVER_LEVEL"},
{ERROR_CALL_NOT_IMPLEMENTED, "CALL_NOT_IMPLEMENTED"},
{ERROR_SEM_TIMEOUT, "SEM_TIMEOUT"},
{ERROR_INSUFFICIENT_BUFFER, "INSUFFICIENT_BUFFER"},
{ERROR_INVALID_NAME, "INVALID_NAME"},
{ERROR_INVALID_LEVEL, "INVALID_LEVEL"},
};
/*
ERROR_NO_VOLUME_LABEL 125L
ERROR_MOD_NOT_FOUND 126L
ERROR_PROC_NOT_FOUND 127L
ERROR_WAIT_NO_CHILDREN 128L
ERROR_CHILD_NOT_COMPLETE 129L
ERROR_DIRECT_ACCESS_HANDLE 130L
ERROR_NEGATIVE_SEEK 131L
ERROR_SEEK_ON_DEVICE 132L
ERROR_IS_JOIN_TARGET 133L
ERROR_IS_JOINED 134L
ERROR_IS_SUBSTED 135L
ERROR_NOT_JOINED 136L
ERROR_NOT_SUBSTED 137L
ERROR_JOIN_TO_JOIN 138L
ERROR_SUBST_TO_SUBST 139L
ERROR_JOIN_TO_SUBST 140L
ERROR_SUBST_TO_JOIN 141L
ERROR_BUSY_DRIVE 142L
ERROR_SAME_DRIVE 143L
ERROR_DIR_NOT_ROOT 144L
ERROR_DIR_NOT_EMPTY 145L
ERROR_IS_SUBST_PATH 146L
ERROR_IS_JOIN_PATH 147L
ERROR_PATH_BUSY 148L
ERROR_IS_SUBST_TARGET 149L
ERROR_SYSTEM_TRACE 150L
ERROR_INVALID_EVENT_COUNT 151L
ERROR_TOO_MANY_MUXWAITERS 152L
ERROR_INVALID_LIST_FORMAT 153L
ERROR_LABEL_TOO_LONG 154L
ERROR_TOO_MANY_TCBS 155L
ERROR_SIGNAL_REFUSED 156L
ERROR_DISCARDED 157L
ERROR_NOT_LOCKED 158L
ERROR_BAD_THREADID_ADDR 159L
ERROR_BAD_ARGUMENTS 160L
ERROR_BAD_PATHNAME 161L
ERROR_SIGNAL_PENDING 162L
ERROR_MAX_THRDS_REACHED 164L
ERROR_LOCK_FAILED 167L
ERROR_BUSY 170L
ERROR_CANCEL_VIOLATION 173L
ERROR_ATOMIC_LOCKS_NOT_SUPPORTED 174L
ERROR_INVALID_SEGMENT_NUMBER 180L
ERROR_INVALID_ORDINAL 182L
ERROR_ALREADY_EXISTS 183L
ERROR_INVALID_FLAG_NUMBER 186L
ERROR_SEM_NOT_FOUND 187L
ERROR_INVALID_STARTING_CODESEG 188L
ERROR_INVALID_STACKSEG 189L
ERROR_INVALID_MODULETYPE 190L
ERROR_INVALID_EXE_SIGNATURE 191L
ERROR_EXE_MARKED_INVALID 192L
ERROR_BAD_EXE_FORMAT 193L
ERROR_ITERATED_DATA_EXCEEDS_64k 194L
ERROR_INVALID_MINALLOCSIZE 195L
ERROR_DYNLINK_FROM_INVALID_RING 196L
ERROR_IOPL_NOT_ENABLED 197L
ERROR_INVALID_SEGDPL 198L
ERROR_AUTODATASEG_EXCEEDS_64k 199L
ERROR_RING2SEG_MUST_BE_MOVABLE 200L
ERROR_RELOC_CHAIN_XEEDS_SEGLIM 201L
ERROR_INFLOOP_IN_RELOC_CHAIN 202L
ERROR_ENVVAR_NOT_FOUND 203L
ERROR_NO_SIGNAL_SENT 205L
ERROR_FILENAME_EXCED_RANGE 206L
ERROR_RING2_STACK_IN_USE 207L
ERROR_META_EXPANSION_TOO_LONG 208L
ERROR_INVALID_SIGNAL_NUMBER 209L
ERROR_THREAD_1_INACTIVE 210L
ERROR_LOCKED 212L
ERROR_TOO_MANY_MODULES 214L
ERROR_NESTING_NOT_ALLOWED 215L
ERROR_EXE_MACHINE_TYPE_MISMATCH 216L
ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY 217L
ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY 218L
ERROR_BAD_PIPE 230L
ERROR_PIPE_BUSY 231L
ERROR_NO_DATA 232L
ERROR_PIPE_NOT_CONNECTED 233L
ERROR_MORE_DATA 234L
ERROR_VC_DISCONNECTED 240L
ERROR_INVALID_EA_NAME 254L
ERROR_EA_LIST_INCONSISTENT 255L
WAIT_TIMEOUT 258L
ERROR_NO_MORE_ITEMS 259L
ERROR_CANNOT_COPY 266L
ERROR_DIRECTORY 267L
ERROR_EAS_DIDNT_FIT 275L
ERROR_EA_FILE_CORRUPT 276L
ERROR_EA_TABLE_FULL 277L
ERROR_INVALID_EA_HANDLE 278L
ERROR_EAS_NOT_SUPPORTED 282L
ERROR_NOT_OWNER 288L
ERROR_TOO_MANY_POSTS 298L
ERROR_PARTIAL_COPY 299L
ERROR_OPLOCK_NOT_GRANTED 300L
ERROR_INVALID_OPLOCK_PROTOCOL 301L
ERROR_DISK_TOO_FRAGMENTED 302L
ERROR_DELETE_PENDING 303L
ERROR_MR_MID_NOT_FOUND 317L
ERROR_SCOPE_NOT_FOUND 318L
ERROR_INVALID_ADDRESS 487L
ERROR_ARITHMETIC_OVERFLOW 534L
ERROR_PIPE_CONNECTED 535L
ERROR_PIPE_LISTENING 536L
ERROR_EA_ACCESS_DENIED 994L
ERROR_OPERATION_ABORTED 995L
ERROR_IO_INCOMPLETE 996L
ERROR_IO_PENDING 997L
ERROR_NOACCESS 998L
ERROR_SWAPERROR 999L
ERROR_STACK_OVERFLOW 1001L
ERROR_INVALID_MESSAGE 1002L
ERROR_CAN_NOT_COMPLETE 1003L
ERROR_INVALID_FLAGS 1004L
ERROR_UNRECOGNIZED_VOLUME 1005L
ERROR_FILE_INVALID 1006L
ERROR_FULLSCREEN_MODE 1007L
ERROR_NO_TOKEN 1008L
ERROR_BADDB 1009L
ERROR_BADKEY 1010L
ERROR_CANTOPEN 1011L
ERROR_CANTREAD 1012L
ERROR_CANTWRITE 1013L
ERROR_REGISTRY_RECOVERED 1014L
ERROR_REGISTRY_CORRUPT 1015L
ERROR_REGISTRY_IO_FAILED 1016L
ERROR_NOT_REGISTRY_FILE 1017L
ERROR_KEY_DELETED 1018L
ERROR_NO_LOG_SPACE 1019L
ERROR_KEY_HAS_CHILDREN 1020L
ERROR_CHILD_MUST_BE_VOLATILE 1021L
ERROR_NOTIFY_ENUM_DIR 1022L
ERROR_DEPENDENT_SERVICES_RUNNING 1051L
ERROR_INVALID_SERVICE_CONTROL 1052L
ERROR_SERVICE_REQUEST_TIMEOUT 1053L
ERROR_SERVICE_NO_THREAD 1054L
ERROR_SERVICE_DATABASE_LOCKED 1055L
ERROR_SERVICE_ALREADY_RUNNING 1056L
ERROR_INVALID_SERVICE_ACCOUNT 1057L
ERROR_SERVICE_DISABLED 1058L
ERROR_CIRCULAR_DEPENDENCY 1059L
ERROR_SERVICE_DOES_NOT_EXIST 1060L
ERROR_SERVICE_CANNOT_ACCEPT_CTRL 1061L
ERROR_SERVICE_NOT_ACTIVE 1062L
ERROR_FAILED_SERVICE_CONTROLLER_CONNECT 1063L
ERROR_EXCEPTION_IN_SERVICE 1064L
ERROR_DATABASE_DOES_NOT_EXIST 1065L
ERROR_SERVICE_SPECIFIC_ERROR 1066L
ERROR_PROCESS_ABORTED 1067L
ERROR_SERVICE_DEPENDENCY_FAIL 1068L
ERROR_SERVICE_LOGON_FAILED 1069L
ERROR_SERVICE_START_HANG 1070L
ERROR_INVALID_SERVICE_LOCK 1071L
ERROR_SERVICE_MARKED_FOR_DELETE 1072L
ERROR_SERVICE_EXISTS 1073L
ERROR_ALREADY_RUNNING_LKG 1074L
ERROR_SERVICE_DEPENDENCY_DELETED 1075L
ERROR_BOOT_ALREADY_ACCEPTED 1076L
ERROR_SERVICE_NEVER_STARTED 1077L
ERROR_DUPLICATE_SERVICE_NAME 1078L
ERROR_DIFFERENT_SERVICE_ACCOUNT 1079L
ERROR_CANNOT_DETECT_DRIVER_FAILURE 1080L
ERROR_CANNOT_DETECT_PROCESS_ABORT 1081L
ERROR_NO_RECOVERY_PROGRAM 1082L
ERROR_SERVICE_NOT_IN_EXE 1083L
ERROR_NOT_SAFEBOOT_SERVICE 1084L
ERROR_END_OF_MEDIA 1100L
ERROR_FILEMARK_DETECTED 1101L
ERROR_BEGINNING_OF_MEDIA 1102L
ERROR_SETMARK_DETECTED 1103L
ERROR_NO_DATA_DETECTED 1104L
ERROR_PARTITION_FAILURE 1105L
ERROR_INVALID_BLOCK_LENGTH 1106L
ERROR_DEVICE_NOT_PARTITIONED 1107L
ERROR_UNABLE_TO_LOCK_MEDIA 1108L
ERROR_UNABLE_TO_UNLOAD_MEDIA 1109L
ERROR_MEDIA_CHANGED 1110L
ERROR_BUS_RESET 1111L
ERROR_NO_MEDIA_IN_DRIVE 1112L
ERROR_NO_UNICODE_TRANSLATION 1113L
ERROR_DLL_INIT_FAILED 1114L
ERROR_SHUTDOWN_IN_PROGRESS 1115L
ERROR_NO_SHUTDOWN_IN_PROGRESS 1116L
ERROR_IO_DEVICE 1117L
ERROR_SERIAL_NO_DEVICE 1118L
ERROR_IRQ_BUSY 1119L
ERROR_MORE_WRITES 1120L
ERROR_COUNTER_TIMEOUT 1121L
ERROR_FLOPPY_ID_MARK_NOT_FOUND 1122L
ERROR_FLOPPY_WRONG_CYLINDER 1123L
ERROR_FLOPPY_UNKNOWN_ERROR 1124L
ERROR_FLOPPY_BAD_REGISTERS 1125L
ERROR_DISK_RECALIBRATE_FAILED 1126L
ERROR_DISK_OPERATION_FAILED 1127L
ERROR_DISK_RESET_FAILED 1128L
ERROR_EOM_OVERFLOW 1129L
ERROR_NOT_ENOUGH_SERVER_MEMORY 1130L
ERROR_POSSIBLE_DEADLOCK 1131L
ERROR_MAPPED_ALIGNMENT 1132L
ERROR_SET_POWER_STATE_VETOED 1140L
ERROR_SET_POWER_STATE_FAILED 1141L
ERROR_TOO_MANY_LINKS 1142L
ERROR_OLD_WIN_VERSION 1150L
ERROR_APP_WRONG_OS 1151L
ERROR_SINGLE_INSTANCE_APP 1152L
ERROR_RMODE_APP 1153L
ERROR_INVALID_DLL 1154L
ERROR_NO_ASSOCIATION 1155L
ERROR_DDE_FAIL 1156L
ERROR_DLL_NOT_FOUND 1157L
ERROR_NO_MORE_USER_HANDLES 1158L
ERROR_MESSAGE_SYNC_ONLY 1159L
ERROR_SOURCE_ELEMENT_EMPTY 1160L
ERROR_DESTINATION_ELEMENT_FULL 1161L
ERROR_ILLEGAL_ELEMENT_ADDRESS 1162L
ERROR_MAGAZINE_NOT_PRESENT 1163L
ERROR_DEVICE_REINITIALIZATION_NEEDED 1164L
ERROR_DEVICE_REQUIRES_CLEANING 1165L
ERROR_DEVICE_DOOR_OPEN 1166L
ERROR_DEVICE_NOT_CONNECTED 1167L
ERROR_NOT_FOUND 1168L
ERROR_NO_MATCH 1169L
ERROR_SET_NOT_FOUND 1170L
ERROR_POINT_NOT_FOUND 1171L
ERROR_NO_TRACKING_SERVICE 1172L
ERROR_NO_VOLUME_ID 1173L
ERROR_UNABLE_TO_REMOVE_REPLACED 1175L
ERROR_UNABLE_TO_MOVE_REPLACEMENT 1176L
ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 1177L
ERROR_JOURNAL_DELETE_IN_PROGRESS 1178L
ERROR_JOURNAL_NOT_ACTIVE 1179L
ERROR_POTENTIAL_FILE_FOUND 1180L
ERROR_JOURNAL_ENTRY_DELETED 1181L
ERROR_BAD_DEVICE 1200L
ERROR_CONNECTION_UNAVAIL 1201L
ERROR_DEVICE_ALREADY_REMEMBERED 1202L
ERROR_NO_NET_OR_BAD_PATH 1203L
ERROR_BAD_PROVIDER 1204L
ERROR_CANNOT_OPEN_PROFILE 1205L
ERROR_BAD_PROFILE 1206L
ERROR_NOT_CONTAINER 1207L
ERROR_EXTENDED_ERROR 1208L
ERROR_INVALID_GROUPNAME 1209L
ERROR_INVALID_COMPUTERNAME 1210L
ERROR_INVALID_EVENTNAME 1211L
ERROR_INVALID_DOMAINNAME 1212L
ERROR_INVALID_SERVICENAME 1213L
ERROR_INVALID_NETNAME 1214L
ERROR_INVALID_SHARENAME 1215L
ERROR_INVALID_PASSWORDNAME 1216L
ERROR_INVALID_MESSAGENAME 1217L
ERROR_INVALID_MESSAGEDEST 1218L
ERROR_SESSION_CREDENTIAL_CONFLICT 1219L
ERROR_REMOTE_SESSION_LIMIT_EXCEEDED 1220L
ERROR_DUP_DOMAINNAME 1221L
ERROR_NO_NETWORK 1222L
ERROR_CANCELLED 1223L
ERROR_USER_MAPPED_FILE 1224L
ERROR_CONNECTION_REFUSED 1225L
ERROR_GRACEFUL_DISCONNECT 1226L
ERROR_ADDRESS_ALREADY_ASSOCIATED 1227L
ERROR_ADDRESS_NOT_ASSOCIATED 1228L
ERROR_CONNECTION_INVALID 1229L
ERROR_CONNECTION_ACTIVE 1230L
ERROR_NETWORK_UNREACHABLE 1231L
ERROR_HOST_UNREACHABLE 1232L
ERROR_PROTOCOL_UNREACHABLE 1233L
ERROR_PORT_UNREACHABLE 1234L
ERROR_REQUEST_ABORTED 1235L
ERROR_CONNECTION_ABORTED 1236L
ERROR_RETRY 1237L
ERROR_CONNECTION_COUNT_LIMIT 1238L
ERROR_LOGIN_TIME_RESTRICTION 1239L
ERROR_LOGIN_WKSTA_RESTRICTION 1240L
ERROR_INCORRECT_ADDRESS 1241L
ERROR_ALREADY_REGISTERED 1242L
ERROR_SERVICE_NOT_FOUND 1243L
ERROR_NOT_AUTHENTICATED 1244L
ERROR_NOT_LOGGED_ON 1245L
ERROR_CONTINUE 1246L
ERROR_ALREADY_INITIALIZED 1247L
ERROR_NO_MORE_DEVICES 1248L
ERROR_NO_SUCH_SITE 1249L
ERROR_DOMAIN_CONTROLLER_EXISTS 1250L
ERROR_ONLY_IF_CONNECTED 1251L
ERROR_OVERRIDE_NOCHANGES 1252L
ERROR_BAD_USER_PROFILE 1253L
ERROR_NOT_SUPPORTED_ON_SBS 1254L
ERROR_SERVER_SHUTDOWN_IN_PROGRESS 1255L
ERROR_HOST_DOWN 1256L
ERROR_NON_ACCOUNT_SID 1257L
ERROR_NON_DOMAIN_SID 1258L
ERROR_APPHELP_BLOCK 1259L
ERROR_ACCESS_DISABLED_BY_POLICY 1260L
ERROR_REG_NAT_CONSUMPTION 1261L
ERROR_CSCSHARE_OFFLINE 1262L
ERROR_PKINIT_FAILURE 1263L
ERROR_SMARTCARD_SUBSYSTEM_FAILURE 1264L
ERROR_DOWNGRADE_DETECTED 1265L
SEC_E_SMARTCARD_CERT_REVOKED 1266L
SEC_E_ISSUING_CA_UNTRUSTED 1267L
SEC_E_REVOCATION_OFFLINE_C 1268L
SEC_E_PKINIT_CLIENT_FAILUR 1269L
SEC_E_SMARTCARD_CERT_EXPIRED 1270L
ERROR_MACHINE_LOCKED 1271L
ERROR_CALLBACK_SUPPLIED_INVALID_DATA 1273L
ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED 1274L
ERROR_DRIVER_BLOCKED 1275L
ERROR_INVALID_IMPORT_OF_NON_DLL 1276L
ERROR_ACCESS_DISABLED_WEBBLADE 1277L
ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER 1278L
ERROR_RECOVERY_FAILURE 1279L
ERROR_ALREADY_FIBER 1280L
ERROR_ALREADY_THREAD 1281L
ERROR_STACK_BUFFER_OVERRUN 1282L
ERROR_PARAMETER_QUOTA_EXCEEDED 1283L
ERROR_DEBUGGER_INACTIVE 1284L
ERROR_NOT_ALL_ASSIGNED 1300L
ERROR_SOME_NOT_MAPPED 1301L
ERROR_NO_QUOTAS_FOR_ACCOUNT 1302L
ERROR_LOCAL_USER_SESSION_KEY 1303L
ERROR_NULL_LM_PASSWORD 1304L
ERROR_UNKNOWN_REVISION 1305L
ERROR_REVISION_MISMATCH 1306L
ERROR_INVALID_OWNER 1307L
ERROR_INVALID_PRIMARY_GROUP 1308L
ERROR_NO_IMPERSONATION_TOKEN 1309L
ERROR_CANT_DISABLE_MANDATORY 1310L
ERROR_NO_LOGON_SERVERS 1311L
ERROR_NO_SUCH_LOGON_SESSION 1312L
ERROR_NO_SUCH_PRIVILEGE 1313L
ERROR_PRIVILEGE_NOT_HELD 1314L
ERROR_INVALID_ACCOUNT_NAME 1315L
ERROR_USER_EXISTS 1316L
ERROR_NO_SUCH_USER 1317L
ERROR_GROUP_EXISTS 1318L
ERROR_NO_SUCH_GROUP 1319L
ERROR_MEMBER_IN_GROUP 1320L
ERROR_MEMBER_NOT_IN_GROUP 1321L
ERROR_LAST_ADMIN 1322L
ERROR_WRONG_PASSWORD 1323L
ERROR_ILL_FORMED_PASSWORD 1324L
ERROR_PASSWORD_RESTRICTION 1325L
ERROR_LOGON_FAILURE 1326L
ERROR_ACCOUNT_RESTRICTION 1327L
ERROR_INVALID_LOGON_HOURS 1328L
ERROR_INVALID_WORKSTATION 1329L
ERROR_PASSWORD_EXPIRED 1330L
ERROR_ACCOUNT_DISABLED 1331L
ERROR_NONE_MAPPED 1332L
ERROR_TOO_MANY_LUIDS_REQUESTED 1333L
ERROR_LUIDS_EXHAUSTED 1334L
ERROR_INVALID_SUB_AUTHORITY 1335L
ERROR_INVALID_ACL 1336L
ERROR_INVALID_SID 1337L
ERROR_INVALID_SECURITY_DESCR 1338L
ERROR_BAD_INHERITANCE_ACL 1340L
ERROR_SERVER_DISABLED 1341L
ERROR_SERVER_NOT_DISABLED 1342L
ERROR_INVALID_ID_AUTHORITY 1343L
ERROR_ALLOTTED_SPACE_EXCEEDED 1344L
ERROR_INVALID_GROUP_ATTRIBUTES 1345L
ERROR_BAD_IMPERSONATION_LEVEL 1346L
ERROR_CANT_OPEN_ANONYMOUS 1347L
ERROR_BAD_VALIDATION_CLASS 1348L
ERROR_BAD_TOKEN_TYPE 1349L
ERROR_NO_SECURITY_ON_OBJECT 1350L
ERROR_CANT_ACCESS_DOMAIN_INFO 1351L
ERROR_INVALID_SERVER_STATE 1352L
ERROR_INVALID_DOMAIN_STATE 1353L
ERROR_INVALID_DOMAIN_ROLE 1354L
ERROR_NO_SUCH_DOMAIN 1355L
ERROR_DOMAIN_EXISTS 1356L
ERROR_DOMAIN_LIMIT_EXCEEDED 1357L
ERROR_INTERNAL_DB_CORRUPTION 1358L
ERROR_INTERNAL_ERROR 1359L
ERROR_GENERIC_NOT_MAPPED 1360L
ERROR_BAD_DESCRIPTOR_FORMAT 1361L
ERROR_NOT_LOGON_PROCESS 1362L
ERROR_LOGON_SESSION_EXISTS 1363L
ERROR_NO_SUCH_PACKAGE 1364L
ERROR_BAD_LOGON_SESSION_STATE 1365L
ERROR_LOGON_SESSION_COLLISION 1366L
ERROR_INVALID_LOGON_TYPE 1367L
ERROR_CANNOT_IMPERSONATE 1368L
ERROR_RXACT_INVALID_STATE 1369L
ERROR_RXACT_COMMIT_FAILURE 1370L
ERROR_SPECIAL_ACCOUNT 1371L
ERROR_SPECIAL_GROUP 1372L
ERROR_SPECIAL_USER 1373L
ERROR_MEMBERS_PRIMARY_GROUP 1374L
ERROR_TOKEN_ALREADY_IN_USE 1375L
ERROR_NO_SUCH_ALIAS 1376L
ERROR_MEMBER_NOT_IN_ALIAS 1377L
ERROR_MEMBER_IN_ALIAS 1378L
ERROR_ALIAS_EXISTS 1379L
ERROR_LOGON_NOT_GRANTED 1380L
ERROR_TOO_MANY_SECRETS 1381L
ERROR_SECRET_TOO_LONG 1382L
ERROR_INTERNAL_DB_ERROR 1383L
ERROR_TOO_MANY_CONTEXT_IDS 1384L
ERROR_LOGON_TYPE_NOT_GRANTED 1385L
ERROR_NT_CROSS_ENCRYPTION_REQUIRED 1386L
ERROR_NO_SUCH_MEMBER 1387L
ERROR_INVALID_MEMBER 1388L
ERROR_TOO_MANY_SIDS 1389L
ERROR_LM_CROSS_ENCRYPTION_REQUIRED 1390L
ERROR_NO_INHERITANCE 1391L
ERROR_FILE_CORRUPT 1392L
ERROR_DISK_CORRUPT 1393L
ERROR_NO_USER_SESSION_KEY 1394L
ERROR_LICENSE_QUOTA_EXCEEDED 1395L
ERROR_WRONG_TARGET_NAME 1396L
ERROR_MUTUAL_AUTH_FAILED 1397L
ERROR_TIME_SKEW 1398L
ERROR_CURRENT_DOMAIN_NOT_ALLOWED 1399L
ERROR_INVALID_WINDOW_HANDLE 1400L
ERROR_INVALID_MENU_HANDLE 1401L
ERROR_INVALID_CURSOR_HANDLE 1402L
ERROR_INVALID_ACCEL_HANDLE 1403L
ERROR_INVALID_HOOK_HANDLE 1404L
ERROR_INVALID_DWP_HANDLE 1405L
ERROR_TLW_WITH_WSCHILD 1406L
ERROR_CANNOT_FIND_WND_CLASS 1407L
ERROR_WINDOW_OF_OTHER_THREAD 1408L
ERROR_HOTKEY_ALREADY_REGISTERED 1409L
ERROR_CLASS_ALREADY_EXISTS 1410L
ERROR_CLASS_DOES_NOT_EXIST 1411L
ERROR_CLASS_HAS_WINDOWS 1412L
ERROR_INVALID_INDEX 1413L
ERROR_INVALID_ICON_HANDLE 1414L
ERROR_PRIVATE_DIALOG_INDEX 1415L
ERROR_LISTBOX_ID_NOT_FOUND 1416L
ERROR_NO_WILDCARD_CHARACTERS 1417L
ERROR_CLIPBOARD_NOT_OPEN 1418L
ERROR_HOTKEY_NOT_REGISTERED 1419L
ERROR_WINDOW_NOT_DIALOG 1420L
ERROR_CONTROL_ID_NOT_FOUND 1421L
ERROR_INVALID_COMBOBOX_MESSAGE 1422L
ERROR_WINDOW_NOT_COMBOBOX 1423L
ERROR_INVALID_EDIT_HEIGHT 1424L
ERROR_DC_NOT_FOUND 1425L
ERROR_INVALID_HOOK_FILTER 1426L
ERROR_INVALID_FILTER_PROC 1427L
ERROR_HOOK_NEEDS_HMOD 1428L
ERROR_GLOBAL_ONLY_HOOK 1429L
ERROR_JOURNAL_HOOK_SET 1430L
ERROR_HOOK_NOT_INSTALLED 1431L
ERROR_INVALID_LB_MESSAGE 1432L
ERROR_SETCOUNT_ON_BAD_LB 1433L
ERROR_LB_WITHOUT_TABSTOPS 1434L
ERROR_DESTROY_OBJECT_OF_OTHER_THREAD 1435L
ERROR_CHILD_WINDOW_MENU 1436L
ERROR_NO_SYSTEM_MENU 1437L
ERROR_INVALID_MSGBOX_STYLE 1438L
ERROR_INVALID_SPI_VALUE 1439L
ERROR_SCREEN_ALREADY_LOCKED 1440L
ERROR_HWNDS_HAVE_DIFF_PARENT 1441L
ERROR_NOT_CHILD_WINDOW 1442L
ERROR_INVALID_GW_COMMAND 1443L
ERROR_INVALID_THREAD_ID 1444L
ERROR_NON_MDICHILD_WINDOW 1445L
ERROR_POPUP_ALREADY_ACTIVE 1446L
ERROR_NO_SCROLLBARS 1447L
ERROR_INVALID_SCROLLBAR_RANGE 1448L
ERROR_INVALID_SHOWWIN_COMMAND 1449L
ERROR_NO_SYSTEM_RESOURCES 1450L
ERROR_NONPAGED_SYSTEM_RESOURCES 1451L
ERROR_PAGED_SYSTEM_RESOURCES 1452L
ERROR_WORKING_SET_QUOTA 1453L
ERROR_PAGEFILE_QUOTA 1454L
ERROR_COMMITMENT_LIMIT 1455L
ERROR_MENU_ITEM_NOT_FOUND 1456L
ERROR_INVALID_KEYBOARD_HANDLE 1457L
ERROR_HOOK_TYPE_NOT_ALLOWED 1458L
ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION 1459L
ERROR_TIMEOUT 1460L
ERROR_INVALID_MONITOR_HANDLE 1461L
ERROR_EVENTLOG_FILE_CORRUPT 1500L
ERROR_EVENTLOG_CANT_START 1501L
ERROR_LOG_FILE_FULL 1502L
ERROR_EVENTLOG_FILE_CHANGED 1503L
ERROR_INSTALL_SERVICE_FAILURE 1601L
ERROR_INSTALL_USEREXIT 1602L
ERROR_INSTALL_FAILURE 1603L
ERROR_INSTALL_SUSPEND 1604L
ERROR_UNKNOWN_PRODUCT 1605L
ERROR_UNKNOWN_FEATURE 1606L
ERROR_UNKNOWN_COMPONENT 1607L
ERROR_UNKNOWN_PROPERTY 1608L
ERROR_INVALID_HANDLE_STATE 1609L
ERROR_BAD_CONFIGURATION 1610L
ERROR_INDEX_ABSENT 1611L
ERROR_INSTALL_SOURCE_ABSENT 1612L
ERROR_INSTALL_PACKAGE_VERSION 1613L
ERROR_PRODUCT_UNINSTALLED 1614L
ERROR_BAD_QUERY_SYNTAX 1615L
ERROR_INVALID_FIELD 1616L
ERROR_DEVICE_REMOVED 1617L
ERROR_INSTALL_ALREADY_RUNNING 1618L
ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619L
ERROR_INSTALL_PACKAGE_INVALID 1620L
ERROR_INSTALL_UI_FAILURE 1621L
ERROR_INSTALL_LOG_FAILURE 1622L
ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623L
ERROR_INSTALL_TRANSFORM_FAILURE 1624L
ERROR_INSTALL_PACKAGE_REJECTED 1625L
ERROR_FUNCTION_NOT_CALLED 1626L
ERROR_FUNCTION_FAILED 1627L
ERROR_INVALID_TABLE 1628L
ERROR_DATATYPE_MISMATCH 1629L
ERROR_UNSUPPORTED_TYPE 1630L
ERROR_CREATE_FAILED 1631L
ERROR_INSTALL_TEMP_UNWRITABLE 1632L
ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633L
ERROR_INSTALL_NOTUSED 1634L
ERROR_PATCH_PACKAGE_OPEN_FAILED 1635L
ERROR_PATCH_PACKAGE_INVALID 1636L
ERROR_PATCH_PACKAGE_UNSUPPORTED 1637L
ERROR_PRODUCT_VERSION 1638L
ERROR_INVALID_COMMAND_LINE 1639L
ERROR_INSTALL_REMOTE_DISALLOWED 1640L
ERROR_SUCCESS_REBOOT_INITIATED 1641L
ERROR_PATCH_TARGET_NOT_FOUND 1642L
ERROR_PATCH_PACKAGE_REJECTED 1643L
ERROR_INSTALL_TRANSFORM_REJECTED 1644L
ERROR_INSTALL_REMOTE_PROHIBITED 1645L
*/
static int esize = static_cast<int>(sizeof(emap) / sizeof(ESTRINGS));
std::string &win_error_string(long err) {
int mark = -1;
for (int i = 0; i < esize; i++) {
if (emap[i].ecode == err) {
mark = i;
break;
}
}
if (mark == -1) return unknown;
return emap[mark].estring;
}
#endif
| 20,462
|
C++
|
.cxx
| 642
| 30.693146
| 69
| 0.836067
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,166
|
stacktrace.cxx
|
w1hkj_fldigi/src/misc/stacktrace.cxx
|
// ----------------------------------------------------------------------------
// stacktrace.cxx: portable stack trace and error handlers
//
// Copyright (C) 2007-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#ifdef __MINGW32__
# include "compat.h"
#endif
#include <unistd.h>
#if HAVE_DBG_STACK
# include <fstream>
#endif
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <csignal>
#include <FL/fl_utf8.h>
#ifdef BUILD_FLDIGI
# include "main.h"
# include "debug.h"
#else
# include "flarq.h"
#endif
static volatile sig_atomic_t signum = 0;
#if !HAVE_DBG_STACK
static void pstack(int fd, unsigned skip = 0);
#else
static void pstack(ostream& out, unsigned skip = 0);
#endif
void diediedie(void)
{
#ifndef __MINGW32__
// If this environment variable is set, creates a core dump.
if( getenv("FLDIGI_COREDUMP") )
{
signal(SIGSEGV, SIG_DFL);
kill(getpid(), SIGSEGV);
}
#endif
static bool print_trace = true;
if (!print_trace)
exit(128 + (signum ? signum : SIGABRT));
#define CRASH_HEADER "\nAborting " PACKAGE_TARNAME " due to a fatal error.\n" \
"Please report this to: " PACKAGE_BUGREPORT \
"\nor file a bug report at: " PACKAGE_NEWBUG \
"\n\n****** Stack trace:\n"
#ifndef __MINGW32__
if (isatty(STDERR_FILENO))
#endif
{
if (signum)
std::cerr << "\nCaught signal " << signum;
std::cerr << CRASH_HEADER;
#if !HAVE_DBG_STACK
pstack(STDERR_FILENO);
#else
pstack(std::cerr);
#endif
extern std::string version_text, build_text;
std::cerr << "\n****** Version information:\n" << version_text
<< "\n****** Build information:\n" << build_text;
std::string stfname;
#ifdef BUILD_FLDIGI
stfname.assign(DebugDir).append("stacktrace.txt");
rotate_log(stfname);
#else
stfname = Logfile;
#endif
#if !HAVE_DBG_STACK
FILE* stfile = fl_fopen(stfname.c_str(), "w");
if (stfile) {
pstack(fileno(stfile), 1);
fprintf(stfile, "%s\n****** Version information:\n%s\n****** Build information:%s\n",
CRASH_HEADER, version_text.c_str(), build_text.c_str());
}
#else
ofstream stfile(stfname.c_str());
if (stfile) {
stfile << CRASH_HEADER;
pstack(stfile, 1);
stfile << "\n****** Version information:\n" << version_text;
stfile << "\n****** Build information:\n" << build_text;
}
#endif
}
print_trace = false;
exit(128 + (signum ? signum : SIGABRT));
}
#if !HAVE_DBG_STACK
# if HAVE_EXECINFO_H
# include <execinfo.h>
# define MAX_STACK_FRAMES 64
void pstack(int fd, unsigned skip)
{
void* stack[MAX_STACK_FRAMES];
++skip;
backtrace_symbols_fd(stack + skip, backtrace(stack, MAX_STACK_FRAMES) - skip, fd);
}
# else
void pstack(int fd, unsigned skip) { }
# endif
#else
# include <algorithm>
# include <iterator>
# include "stack.h"
static void pstack(ostream& out, unsigned skip)
{
dbg::stack s;
dbg::stack::const_iterator start = s.begin(), end = s.end();
while (skip-- && ++start != end);
copy(start, end, ostream_iterator<dbg::stack_frame>(out, "\n"));
}
#endif
void pstack_maybe(void)
{
static bool trace = getenv("FLDIGI_TRACE_LOCKS");
if (trace)
#if !HAVE_DBG_STACK
pstack(STDERR_FILENO, 1);
#else
pstack(std::cerr, 1);
#endif
}
void handle_unexpected(void)
{
std::cerr << "Uncaught exception. Not again!\n";
abort();
}
// this may not give us anything useful, but we can try...
void handle_signal(int s)
{
if (s != SIGUSR2) {
signum = s;
diediedie();
}
}
| 4,287
|
C++
|
.cxx
| 153
| 25.614379
| 90
| 0.64776
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,169
|
record_loader.cxx
|
w1hkj_fldigi/src/misc/record_loader.cxx
|
// ----------------------------------------------------------------------------
// record_loader.cxx
//
// Copyright (C) 2013
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <sstream>
#ifdef __MINGW32__
# include "compat.h"
#endif
#include "record_loader.h"
#include "record_browse.h"
#include "debug.h"
#include "main.h"
#include "icons.h"
#include "fl_digi.h"
#include "strutil.h"
#include "gettext.h"
#include "network.h"
#include <stdexcept>
#include <fstream>
#include <iostream>
#include <sys/stat.h>
#include "FL/Fl_Double_Window.H"
#include "FL/Fl_Output.H"
#include "FL/fl_ask.H"
#include "FL/Fl_Check_Button.H"
LOG_FILE_SOURCE(debug::LOG_DATASOURCES);
Fl_Double_Window *dlgRecordLoader = (Fl_Double_Window *)0;
/// Loads a file and stores it for later lookup.
int RecordLoaderInterface::LoadAndRegister()
{
Clear();
std::string filnam = storage_filename().first;
time_t cntTim = time(NULL);
LOG_INFO("Opening:%s", filnam.c_str());
std::ifstream ifs( filnam.c_str() );
/// Reuse the same string for each new record.
std::string input_str ;
size_t nbRec = 0 ;
while( ! ifs.eof() )
{
if( ! std::getline( ifs, input_str ) ) break;
/// Comments are legal with # as first character.
if( input_str[0] == '#' ) continue;
imemstream str_strm( input_str );
try
{
if( ReadRecord( str_strm ) ) {
++nbRec;
} else {
LOG_WARN( "Cannot process '%s'", input_str.c_str() );
}
}
catch(const std::exception & exc)
{
LOG_WARN( "%s: Caught <%s> when reading '%s'",
base_filename().c_str(),
exc.what(),
input_str.c_str() );
return -1 ;
}
}
ifs.close();
LOG_INFO( "Read:%s with %d records in %d seconds",
filnam.c_str(), static_cast<int>(nbRec),
static_cast<int>( time(NULL) - cntTim ) );
return nbRec ;
}
// ----------------------------------------------------------------------------
struct Row
{
Fl_Output * m_timestamp ;
Fl_Check_Button * m_select ;
Fl_Output * m_content_size ;
Fl_Output * m_nb_rows ;
Fl_Button * m_url ;
RecordLoaderInterface * m_itf ;
bool UpdateRow()
{
const std::string str = m_itf->Timestamp();
m_timestamp->value(str.c_str());
const std::string & strSz = m_itf->ContentSize();
m_content_size->value(strSz.c_str());
int nb_recs = m_itf->LoadAndRegister();
char nb_recs_str[64];
bool isGood = ( nb_recs >= 0 );
if( isGood )
snprintf( nb_recs_str, sizeof(nb_recs_str), "%6d", nb_recs );
else
strcpy( nb_recs_str, " N/A" );
m_nb_rows->value(nb_recs_str);
const char * strurl = m_itf->Url();
if( strurl != NULL ) {
const std::string strnam = m_itf->base_filename();
m_url->tooltip( strurl );
}
if (dlgRecordLoader)
dlgRecordLoader->damage();
return isGood ;
}
};
/// Array all data loaders. It is setup at start time.
static Row * all_recs = NULL ;
/// Number of data loaders, it is a very small integer.
static int dataloader_nb = 0 ;
static const int nb_cols = 5 ;
// ----------------------------------------------------------------------------
/// This is a virtual class, therefore it must have a default constructor.
RecordLoaderInterface::RecordLoaderInterface()
{
++dataloader_nb ;
/// We prefer tp use realloc because it is ready before main() is called.
all_recs = (Row *)realloc( all_recs, dataloader_nb * sizeof( Row ) );
all_recs[ dataloader_nb - 1 ].m_itf = this ;
}
/// This happens very rarely, so performance is not an issue.
RecordLoaderInterface::~RecordLoaderInterface()
{
for( int i = 0; i < dataloader_nb; ++i )
{
if( all_recs[i].m_itf == this ) {
memmove( all_recs + i, all_recs + i + 1, sizeof( Row ) * ( dataloader_nb - i - 1 ) );
--dataloader_nb ;
return ;
}
}
LOG_ERROR("Inconsistent %d", dataloader_nb );
}
/// This takes only the filename from the complete HTTP or FTP URL, or file path.
std::string RecordLoaderInterface::base_filename() const
{
const char * pFil = strrchr( Url(), '/' );
if( pFil == NULL )
pFil = Url();
else
++pFil ;
/// This might be an URL so we take only the beginning.
const char * quest = strchr( pFil, '?' );
if( quest == NULL ) quest = pFil + strlen(pFil);
return std::string( pFil, quest );
}
std::pair< std::string, bool > RecordLoaderInterface::storage_filename(bool create_dir) const
{
/// We check if it is changed, it is not performance-critical.
if( create_dir ) {
if( ask_dir_creation( DATA_dir ) ) {
const char * err = create_directory( DATA_dir.c_str() );
if( err ) {
fl_alert("Error:%s",err);
}
}
}
std::string filnam_data = DATA_dir;
filnam_data.append(base_filename());
if( create_dir ) {
return std::make_pair( filnam_data, false );
}
/// This is for a read access.
std::ifstream ifs( filnam_data.c_str() );
if( ifs )
{
ifs.close();
return std::make_pair( filnam_data, false );
}
if( errno != ENOENT ) {
LOG_WARN( "Cannot read '%s': %s", filnam_data.c_str(), strerror(errno) );
}
// Second try with a file maybe installed by "make install".
std::string filnam_inst = PKGDATADIR "/" + base_filename();
LOG_INFO("Errno=%s with %s. Trying %s",
strerror(errno), filnam_data.c_str(), filnam_inst.c_str() );
ifs.open( filnam_inst.c_str() );
if( ifs )
{
ifs.close();
return std::make_pair( filnam_inst, true );
}
/// But the file is not there.
return std::make_pair( filnam_data, false );
}
std::string RecordLoaderInterface::Timestamp() const
{
std::string filnam = storage_filename().first;
struct stat st;
if (stat(filnam.c_str(), &st) == -1 ) return "N/A";
struct tm tmLastMod = *localtime( & st.st_mtime );
char buf[64];
snprintf(buf, sizeof(buf), "%d/%d/%d %02d:%02d",
tmLastMod.tm_year + 1900,
tmLastMod.tm_mon + 1,
tmLastMod.tm_mday,
tmLastMod.tm_hour,
tmLastMod.tm_min );
return buf ;
}
std::string RecordLoaderInterface::ContentSize() const
{
/// It would be faster to cache this result in the object.
std::string filnam = storage_filename().first;
struct stat st;
if (stat(filnam.c_str(), &st) == -1 ) return " N/A";
std::stringstream buf;
buf.width(9); buf.fill(' ');
buf << st.st_size;
return buf.str();
}
// ----------------------------------------------------------------------------
static void cb_record_url(Fl_Widget *w, void* ptr)
{
const RecordLoaderInterface * it = static_cast< const RecordLoaderInterface * >(ptr);
cb_mnuVisitURL( NULL, const_cast< char * >( it->Url() ) );
}
void DerivedRecordLst::AddRow( int row )
{
Row * ptRow = all_recs + row ;
int X,Y,W,H;
int col=0;
{
col_width( col, 110 );
find_cell(CONTEXT_TABLE, row, col, X, Y, W, H);
ptRow->m_timestamp = new Fl_Output(X,Y,W,H);
ptRow->m_timestamp->tooltip( _("Data file creation date") );
}
++col;
{
col_width( col, 16 );
find_cell(CONTEXT_TABLE, row, col, X, Y, W, H);
ptRow->m_select = new Fl_Check_Button(X,Y,W,H);
ptRow->m_select->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
ptRow->m_select->value(1);
}
++col;
{
col_width( col, 80 );
find_cell(CONTEXT_TABLE, row, col, X, Y, W, H);
ptRow->m_content_size = new Fl_Output(X,Y,W,H);
ptRow->m_content_size->tooltip( _("Size in bytes") );
}
++col;
{
col_width( col, 50 );
find_cell(CONTEXT_TABLE, row, col, X, Y, W, H);
ptRow->m_nb_rows = new Fl_Output(X,Y,W,H);
ptRow->m_nb_rows->tooltip( _("Number of lines in data file") );
}
++col;
{
col_width( col, 166 );
find_cell(CONTEXT_TABLE, row, col, X, Y, W, H);
const char * strurl = ptRow->m_itf->Url();
ptRow->m_url = NULL ;
if( strurl != NULL ) {
const std::string strnam = ptRow->m_itf->base_filename();
ptRow->m_url = new Fl_Button(X,Y,W,H, strdup(strnam.c_str()) );
ptRow->m_url->tooltip( strurl );
ptRow->m_url->callback(cb_record_url, ptRow->m_itf);
} else {
ptRow->m_url = new Fl_Button(X, Y, W, H, "N/A");
}
}
ptRow->UpdateRow();
}
DerivedRecordLst::DerivedRecordLst(int x, int y, int w, int h, const char *title)
: Fl_Table(x,y,w,h,title)
{
col_header(1);
col_resize(1);
col_header_height(25);
row_header(1);
row_resize(0);
row_header_width(105);
rows(dataloader_nb);
cols(nb_cols);
begin(); // start adding widgets to group
{
for( int row = 0; row < dataloader_nb; ++row )
{
AddRow( row );
}
}
end();
}
DerivedRecordLst::~DerivedRecordLst()
{
}
// Handle drawing all cells in table
void DerivedRecordLst::draw_cell(TableContext context,
int R, int C, int X, int Y, int W, int H)
{
switch ( context )
{
case CONTEXT_STARTPAGE:
fl_font(FL_HELVETICA, 12); // font used by all headers
break;
case CONTEXT_RC_RESIZE:
{
int X, Y, W, H;
int index = 0;
for ( int r = 0; r<rows(); r++ )
{
for ( int c = 0; c<cols(); c++ )
{
if ( index >= children() ) break;
find_cell(CONTEXT_TABLE, r, c, X, Y, W, H);
child(index++)->resize(X,Y,W,H);
}
}
init_sizes(); // tell group children resized
return;
}
case CONTEXT_ROW_HEADER:
fl_push_clip(X, Y, W, H);
{
RecordLoaderInterface * it = ( (R >= 0) && ( R < dataloader_nb ) ) ? all_recs[ R ].m_itf : NULL;
if( it == NULL ) {
LOG_ERROR("R=%d",R);
return;
}
const char * str = it ? it->Description() : "Unknown" ;
fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, row_header_color());
fl_color(FL_BLACK);
fl_draw(str, X, Y, W, H, FL_ALIGN_CENTER);
}
fl_pop_clip();
return;
case CONTEXT_COL_HEADER:
fl_push_clip(X, Y, W, H);
{
static const char * col_names[nb_cols] = {
_("Timestamp"),
_(" "),
_("Size"),
_("# recs"),
_("WWW"),
};
const char * title = ( ( C >= 0 ) && ( C < nb_cols ) ) ? col_names[C] : "?" ;
fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, col_header_color());
fl_color(FL_BLACK);
fl_draw(title, X, Y, W, H, FL_ALIGN_CENTER);
}
fl_pop_clip();
return;
case CONTEXT_CELL:
// fl_push_clip(X, Y, W, H);
return; // fltk handles drawing the widgets
default:
return;
}
}
void DerivedRecordLst::cbGuiUpdate()
{
std::string server = inpDataSources->value();
if( server.empty() ) {
fl_alert(_("No server selected"));
return ;
}
if( server[server.size()-1] != '/' ) server += '/' ;
for( int row = 0; row < dataloader_nb; ++row ) {
Row * ptrRow = all_recs + row;
if( ! ptrRow->m_select->value() ) continue ;
RecordLoaderInterface * it = ptrRow->m_itf;
std::string url = server + it->base_filename();
std::string reply ;
// double timeout=5.0;
// Consider truncating the HTTP header.
// int res = get_http_gui(url, reply, timeout );
int res = get_http(url, reply, 5.0);
LOG_INFO("Loaded %s : %d chars. res=%d",
url.c_str(), (int)reply.size(), res );
if (reply.empty()) {
int ok = fl_choice2(
_("Could not download %s"),
_("Continue"),
_("Stop"),
NULL,
url.c_str() );
if( ok == 1 ) break ;
continue ;
}
static const char *notFound404 = "HTTP/1.1 404 Not Found";
if( 0 == strncmp( reply.c_str(), notFound404, strlen(notFound404) ) )
{
int ok = fl_choice2(
_("Non-existent URL: %s"),
_("Continue"),
_("Stop"),
NULL,
url.c_str() );
if( ok == 1 ) break ;
continue ;
}
/// This creates the directory if necessary;
std::string filnam = it->storage_filename(true).first;
std::ofstream ofstrm( filnam.c_str() );
if( ofstrm )
ofstrm.write( &reply[0], reply.size() );
if( ! ofstrm ) {
int ok = fl_choice2(
_("Error saving %s to %s:%s"),
_("Continue"),
_("Stop"),
NULL,
url.c_str(), filnam.c_str(), strerror(errno) );
if( ok == 1 ) break ;
continue ;
}
ofstrm.close();
bool isGood = all_recs[row].UpdateRow();
if( ! isGood ) {
int ok = fl_choice2(
_("Error loading %s to %s: %s."),
_("Continue"),
_("Stop"),
NULL,
url.c_str(), filnam.c_str(), strerror(errno) );
if( ok == 0 ) break ;
continue ;
}
}
btnDataSourceUpdate->value(0);
}
void DerivedRecordLst::cbGuiReset()
{
fprintf(stderr, "%s\n", __FUNCTION__ );
for( int row = 0; row < dataloader_nb; ++row )
{
Row * ptrRow = all_recs + row;
if( ! ptrRow->m_select->value() ) continue ;
RecordLoaderInterface * it = ptrRow->m_itf;
std::pair< std::string, bool > stofil_pair = it->storage_filename(true);
it->Clear();
const char * stofil = stofil_pair.first.c_str() ;
if( stofil_pair.second ) {
fl_alert("Cannot erase installed data file %s", stofil );
continue ;
} else {
LOG_INFO("Erasing %s", stofil );
int res = ::remove( stofil );
if( ( res != 0 ) && ( res != ENOENT ) ) {
fl_alert("Error erasing data file %s:%s", stofil, strerror(errno) );
continue ;
}
all_recs[row].UpdateRow();
}
}
}
// ----------------------------------------------------------------------------
/// Necessary because in a Fl_Menu, a slash has a special meaning.
static std::string fl_escape( const char * str )
{
std::string res ;
for( char ch ; ( ch = *str ) != '\0' ; ++str )
{
if( ch == '/' ) res += '\\';
res += ch ;
}
return res ;
}
static void fl_input_add( const char * str )
{
inpDataSources->add( fl_escape( str ).c_str() );
}
void createRecordLoader()
{
if (dlgRecordLoader) return;
dlgRecordLoader = make_record_loader_window();
fl_input_add("http://www.w1hkj.com/support_files/");
inpDataSources->value(0);
}
// ----------------------------------------------------------------------------
| 14,118
|
C++
|
.cxx
| 490
| 26.085714
| 99
| 0.609585
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,170
|
macros.cxx
|
w1hkj_fldigi/src/misc/macros.cxx
|
// ----------------------------------------------------------------------------
// macros.cxx
//
// Copyright (C) 2007-2010
// Dave Freese, W1HKJ
// Copyright (C) 2008-2010
// Stelios Bounanos, M0GLD
// Copyright (C) 2009
// Chris Sylvain, KB3CS
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <sys/time.h>
#include <ctime>
#include "macros.h"
#include "gettext.h"
#include "main.h"
#include "misc.h"
#include "fl_digi.h"
#include "timeops.h"
#include "configuration.h"
#include "confdialog.h"
#include "logger.h"
#include "newinstall.h"
#include "globals.h"
#include "debug.h"
#include "status.h"
#include "trx.h"
#include "modem.h"
#include "qrunner.h"
#include "waterfall.h"
#include "rigsupport.h"
#include "network.h"
#include "logsupport.h"
#include "icons.h"
#include "weather.h"
#include "utf8file_io.h"
#include "xmlrpc.h"
#include "rigio.h"
#include "strutil.h"
#include "threads.h"
#include "squelch_status.h"
#include <FL/Fl.H>
#include <FL/filename.H>
#include "fileselect.h"
#include <ctime>
#include <cstdio>
#include <cstdlib>
#include <unistd.h>
#include <string>
#include <sstream>
#include <fstream>
#include <queue>
#include <stack>
#ifdef __WIN32__
#include "speak.h"
#endif
#include "audio_alert.h"
#include <float.h>
#include "re.h"
static pthread_mutex_t exec_mutex = PTHREAD_MUTEX_INITIALIZER;
struct CMDS { std::string cmd; void (*fp)(std::string); };
static std::queue<CMDS> Tx_cmds;
static std::queue<CMDS> Rx_cmds;
bool txque_wait = false;
static std::string buffered_macro;
static bool buffered = false;
static size_t buffered_pointer;
/*
static const char *ascii4[256] = {
"<NUL>", "<SOH>", "<STX>", "<ETX>", "<EOT>", "<ENQ>", "<ACK>", "<BEL>",
"<BS>", "<TAB>", "<LF>\n", "<VT>", "<FF>", "<CR>", "<SO>", "<SI>",
"<DLE>", "<DC1>", "<DC2>", "<DC3>", "<DC4>", "<NAK>", "<SYN>", "<ETB>",
"<CAN>", "<EM>", "<SUB>", "<ESC>", "<FS>", "<GS>", "<RS>", "<US>",
" ", "!", "\"", "#", "$", "%", "&", "\'",
"(", ")", "*", "+", ",", "-", ".", "/",
"0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", ":", ";", "<", "=", ">", "?",
"@", "A", "B", "C", "D", "E", "F", "G",
"H", "I", "J", "K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T", "U", "V", "W",
"X", "Y", "Z", "[", "\\", "]", "^", "_",
"`", "a", "b", "c", "d", "e", "f", "g",
"h", "i", "j", "k", "l", "m", "n", "o",
"p", "q", "r", "s", "t", "u", "v", "w",
"x", "y", "z", "{", "|", "}", "~", "<DEL>",
"<128>", "<129>", "<130>", "<131>", "<132>", "<133>", "<134>", "<135>",
"<136>", "<137>", "<138>", "<139>", "<140>", "<141>", "<142>", "<143>",
"<144>", "<145>", "<146>", "<147>", "<148>", "<149>", "<150>", "<151>",
"<152>", "<153>", "<154>", "<155>", "<156>", "<157>", "<158>", "<159>",
"<160>", "<161>", "<162>", "<163>", "<164>", "<165>", "<166>", "<167>",
"<168>", "<169>", "<170>", "<171>", "<172>", "<173>", "<174>", "<175>",
"<176>", "<177>", "<178>", "<179>", "<180>", "<181>", "<182>", "<183>",
"<184>", "<185>", "<186>", "<187>", "<188>", "<189>", "<190>", "<191>",
"<192>", "<193>", "<194>", "<195>", "<196>", "<197>", "<198>", "<199>",
"<200>", "<201>", "<202>", "<203>", "<204>", "<205>", "<206>", "<207>",
"<208>", "<209>", "<210>", "<211>", "<212>", "<213>", "<214>", "<215>",
"<216>", "<217>", "<218>", "<219>", "<220>", "<221>", "<222>", "<223>",
"<224>", "<225>", "<226>", "<227>", "<228>", "<229>", "<230>", "<231>",
"<232>", "<233>", "<234>", "<235>", "<236>", "<237>", "<238>", "<239>",
"<240>", "<241>", "<242>", "<243>", "<244>", "<245>", "<246>", "<247>",
"<248>", "<249>", "<250>", "<251>", "<252>", "<253>", "<254>", "<255>"
};
static std::string hout(std::string s)
{
static std::string sout;
sout.clear();
for (size_t n = 0; n < s.length(); n++)
sout.append(ascii4[int(s[n])]);
return sout;
}
*/
static void substitute (std::string &s, size_t &start, size_t end, std::string sub)
{
if (start && s[start - 1] == '\n') {
start--;
}
//std::cout << "--------------------------------------------------------" << std::endl;
if (sub.empty()) {
//std::cout << "ERASED:" << hout(s.substr(start, end - start + 1)) << std::endl;
s.erase(start, end - start + 1);
} else {
//std::cout << "REPLACED: '" << hout(s.substr(start, end - start + 1)) <<
// "' WITH '" << hout(sub) << "'" << std::endl;
s.replace(start, end - start + 1, sub);
}
//std::cout << "--------------------------------------------------------" << std::endl;
//std::cout << hout(s) << std::endl;
//std::cout << "=========================================================" << std::endl;
}
static void add_text(std::string text)
{
if (buffered) {
buffered_macro.append(text);
buffered_pointer = 0;
} else {
TransmitText->add_text(text);
}
}
void clear_buffered_text()
{
buffered_macro.clear();
}
char next_buffered_macro_char()
{
if (buffered_macro.empty())
return 0;
char c = buffered_macro[buffered_pointer++];
if (buffered_pointer >= buffered_macro.length()) {
buffered_macro.clear();
buffered_pointer = 0;
}
return c;
}
static void pBUFFERED(std::string &s, size_t &i, size_t endbracket)
{
substitute(s, i, endbracket, "");
buffered = true;
buffered_macro.clear();
}
static void setwpm(double d)
{
sldrCWxmtWPM->value(d);
cntCW_WPM->value(d);
progdefaults.CWusefarnsworth = false;
btnCWusefarnsworth->value(0);
que_ok = true;
}
static void setfwpm(double d)
{
sldrCWfarnsworth->value(d);
progdefaults.CWusefarnsworth = true;
btnCWusefarnsworth->value(1);
que_ok = true;
}
// following used for debugging and development
void push_txcmd(CMDS cmd)
{
LOG_INFO("%s, # = %d", cmd.cmd.c_str(), (int)Tx_cmds.size());
Tx_cmds.push(cmd);
}
void push_rxcmd(CMDS cmd)
{
LOG_INFO("%s, # = %d", cmd.cmd.c_str(), (int)Rx_cmds.size());
Rx_cmds.push(cmd);
}
// these variables are referenced outside of this file
MACROTEXT macros;
CONTESTCNTR contest_count;
std::string qso_time = "";
std::string qso_exchange = "";
std::string exec_date = "";
std::string exec_time = "";
std::string exec_string = "";
std::string until_date = "";
std::string until_time = "";
std::string info1msg = "";
std::string info2msg = "";
std::string text2repeat = "";
size_t repeatchar = 0;
bool macro_idle_on = false;
bool macro_rx_wait = false;
static float idleTime = 0;
static bool TransmitON = false;
static bool ToggleTXRX = false;
static int mNbr;
static std::string text2send = "";
static size_t xbeg = 0, xend = 0;
static bool save_xchg;
static bool expand;
static bool GET = false;
static bool timed_exec = false;
static bool run_until = false;
static bool within_exec = false;
bool local_timed_exec = false;
void rx_que_continue(void *);
static void postQueue(std::string s)
{
s.append("\n");
if (!progdefaults.macro_post) return;
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->addstr(s, FTextBase::CTRL);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->addstr(s, FTextBase::CTRL);
else
ReceiveText->addstr(s, FTextBase::CTRL);
}
static const char cutnumbers[] = "T12345678N";
static std::string cutstr;
static std::string cut_string(const char *s)
{
cutstr = s;
if (!progdefaults.cutnbrs || active_modem != cw_modem)
return cutstr;
for (size_t i = 0; i < cutstr.length(); i++)
if (cutstr[i] >= '0' && cutstr[i] <= '9')
cutstr[i] = cutnumbers[cutstr[i] - '0'];
return cutstr;
}
static size_t mystrftime( char *s, size_t max, const char *fmt, const struct tm *tm) {
return strftime(s, max, fmt, tm);
}
static std::string CPSstring = "\
=============================================\n\
ABCDEFGHIJKLMN OPQRSTUVWXYZ\n\
abcdefghijklmn opqrstuvwxyz\n\
0123456789 9876543210\n\
!@#$%&*()_+-=[]{}\\|;:'\",.<>/?\n\
=============================================\n\
\n\
The Jaberwocky\n\
\n\
'Twas brillig, and the slithy toves\n\
Did gyre and gimble in the wabe;\n\
All mimsy were the borogoves,\n\
And the mome raths outgrabe.\n\
\n\
\"Beware the Jabberwock, my son!\n\
The jaws that bite, the claws that catch!\n\
Beware the Jubjub bird, and shun\n\
The frumious Bandersnatch!\"\n\
\n\
He took his vorpal sword in hand:\n\
Long time the manxome foe he sought-\n\
So rested he by the Tumtum tree,\n\
And stood awhile in thought.\n\
\n\
And as in uffish thought he stood,\n\
The Jabberwock, with eyes of flame,\n\
Came whiffling through the tulgey wood,\n\
And burbled as it came!\n\
\n\
One, two! One, two! and through and through\n\
The vorpal blade went snicker-snack!\n\
He left it dead, and with its head\n\
He went galumphing back.\n\
\n\
\"And hast thou slain the Jabberwock?\n\
Come to my arms, my beamish boy!\n\
O frabjous day! Callooh! Callay!\"\n\
He chortled in his joy.\n\
\n\
'Twas brillig, and the slithy toves\n\
Did gyre and gimble in the wabe;\n\
All mimsy were the borogoves,\n\
And the mome raths outgrabe.\n";
static std::string ccode = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
bool PERFORM_CPS_TEST = false;
int num_cps_chars = 0;
std::string testfilename;
void CPS_report(int samples, int prepost)
{
char specs[1000];
memset(specs, 0, 1000);
std::string results = "\nCPS test\ntext: ";
if (testfilename[0] != '\n')
results.append("\n");
results.append(testfilename).append("\n");
std::string strout;
double xmttime = 1.0 * samples / active_modem->get_samplerate();
double overhead = 1.0 * prepost / active_modem->get_samplerate();
num_cps_chars--;
snprintf(specs, sizeof(specs), "\
mode: %s\n\
# chars: %d\n\
overhead: %f sec\n\
xmt time: %f sec\n\
xmt samples: %d\n\
sample rate: %d\n\
chars/sec: %f",
mode_info[active_modem->get_mode()].name,
num_cps_chars,
overhead,
xmttime - overhead,
samples,
active_modem->get_samplerate(),
num_cps_chars / (xmttime - overhead));
results.append(specs);
LOG_INFO("%s", results.c_str());
results.append("\n");
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add(results.c_str(), FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->addstr(results.c_str(), FTextBase::ALTR);
else
ReceiveText->add(results.c_str(), FTextBase::ALTR);
PERFORM_CPS_TEST = false;
}
static void pCPS_TEST(std::string &s, size_t &i, size_t endbracket)
{
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB || id == MODE_WWV ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->add("Mode not supported\n", FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->addstr("Mode not supported", FTextBase::ALTR);
else
ReceiveText->add("Mode not supported\n", FTextBase::ALTR);
s.clear();
return;
}
std::string buffer = s.substr(i+10, endbracket - i - 10);
s.clear();
int n;
if (buffer.empty()) n = 10;
sscanf(buffer.c_str(), "%d", &n);
if (n <= 0) n = 10;
if (n > 100) n = 100;
// sample count with 'n' characters
int s1[256];
for (int i = 0; i < 256; i++) s1[i] = 0;
// converstion from sample count to milliseconds
double k = 1000.0 / (active_modem->get_samplerate() * n);
stopMacroTimer();
active_modem->set_stopflag(false);
PERFORM_CPS_TEST = true;
int s0 = number_of_samples("");
// sample count for characters ' ' through '~'
for(int j = 0; j < 256; j++) {
s1[j] = number_of_samples(std::string(n, j)) - s0;
}
PERFORM_CPS_TEST = false;
// report generator
char results[200];
std::string line_out;
snprintf(results, sizeof(results), "\nCPS test\nMode : %s\n", mode_info[active_modem->get_mode()].name);
line_out = results;
snprintf(results, sizeof(results), "Based on %d character string\n", n);
line_out.append(results);
snprintf(results, sizeof(results), "Overhead = %.3f msec\n", 1000.0 * s0 / active_modem->get_samplerate());
line_out.append(results);
for (int j = 0, ln = 0; j < 256; j++ ) {
snprintf(results, sizeof(results), "%2x%8.2f", j, k * s1[j]);
line_out.append(results);
ln++;
if (ln && (ln % 4 == 0)) line_out.append("\n");
else line_out.append(" | ");
}
if (!line_out.empty()) {
LOG_INFO("%s", line_out.c_str());
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add(line_out.c_str(), FTextBase::ALTR);
if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add(line_out.c_str(), FTextBase::ALTR);
else
ReceiveText->add(line_out.c_str(), FTextBase::ALTR);
}
return;
}
static void pCPS_FILE(std::string &s, size_t &i, size_t endbracket)
{
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB || id == MODE_WWV ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else
ReceiveText->add("Mode not supported\n", FTextBase::ALTR);
s.clear();
return;
}
std::string fname = s.substr(i+10, endbracket - i - 10);
if (fname.length() > 0 && !within_exec) {
FILE *toadd = fl_fopen(fname.c_str(), "r");
if (toadd) {
std::string buffer;
char c = getc(toadd);
while (c && !feof(toadd)) {
if (c != '\r') buffer += c; // damn MSDOS txt files
c = getc(toadd);
}
s.clear();
fclose(toadd);
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->clear();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->clear();
else
TransmitText->clear();
testfilename = fname;
stopMacroTimer();
active_modem->set_stopflag(false);
PERFORM_CPS_TEST = true;
int s0 = number_of_samples("");
num_cps_chars = 0;
CPS_report(number_of_samples(buffer), s0);
PERFORM_CPS_TEST = false;
} else {
std::string resp = "Could not locate ";
resp.append(fname).append("\n");
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add(resp.c_str(), FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add(resp.c_str(), FTextBase::ALTR);
else
ReceiveText->add(resp.c_str(), FTextBase::ALTR);
LOG_WARN("%s not found", fname.c_str());
substitute(s, i, endbracket, "");
PERFORM_CPS_TEST = false;
}
} else {
PERFORM_CPS_TEST = false;
s.clear();
}
}
static void pCPS_STRING(std::string &s, size_t &i, size_t endbracket)
{
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB || id == MODE_WWV ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else
ReceiveText->add("Mode not supported\n", FTextBase::ALTR);
s.clear();
return;
}
std::string buffer = s.substr(i+12, endbracket - i - 12);
std::string txtbuf = buffer;
s.clear();
size_t p = buffer.find("\\n");
while (p != std::string::npos) {
buffer.replace(p,2,"\n");
p = buffer.find("\\n");
}
if (buffer.length()) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->clear();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->clear();
else
TransmitText->clear();
stopMacroTimer();
active_modem->set_stopflag(false);
PERFORM_CPS_TEST = true;
int s0 = number_of_samples("");
num_cps_chars = 0;
testfilename = txtbuf;
CPS_report(number_of_samples(buffer), s0);
PERFORM_CPS_TEST = false;
} else {
std::string resp = "Text not specified";
LOG_WARN("%s", resp.c_str());
resp.append("\n");
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add(resp.c_str(), FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add(resp.c_str(), FTextBase::ALTR);
else
ReceiveText->add(resp.c_str(), FTextBase::ALTR);
PERFORM_CPS_TEST = false;
}
}
static void pCPS_N(std::string &s, size_t &i, size_t endbracket)
{
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB || id == MODE_WWV ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else
ReceiveText->add("Mode not supported\n", FTextBase::ALTR);
s.clear();
return;
}
std::string buffer = s.substr(i+7, endbracket - i - 7);
s.clear();
if (buffer.empty()) return;
int numgroups, wc, cc, cl;
cl = ccode.length();
sscanf(buffer.c_str(), "%d", &numgroups);
if (numgroups <= 0 || numgroups > 100000) numgroups = 100;
srand(time(0));
buffer.clear();
for (wc = 1; wc <= numgroups; wc++) {
for (cc = 0; cc < 5; cc++) {
buffer += ccode[ rand() % cl ];
}
if (wc % 10 == 0) buffer += '\n';
else buffer += ' ';
}
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->clear();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->clear();
else
TransmitText->clear();
stopMacroTimer();
active_modem->set_stopflag(false);
PERFORM_CPS_TEST = true;
int s0 = number_of_samples("");
num_cps_chars = 0;
testfilename = "Random group test";
CPS_report(number_of_samples(buffer), s0);
PERFORM_CPS_TEST = false;
return;
}
static void pWAV_TEST(std::string &s, size_t &i, size_t endbracket)
{
s.clear();
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB || id == MODE_WWV ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else
ReceiveText->add("Mode not supported\n", FTextBase::ALTR);
return;
}
testfilename = "internal string";
stopMacroTimer();
active_modem->set_stopflag(false);
PERFORM_CPS_TEST = true;
trx_transmit();
number_of_samples(CPSstring);
PERFORM_CPS_TEST = false;
}
static void pWAV_N(std::string &s, size_t &i, size_t endbracket)
{
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB || id == MODE_WWV ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else
ReceiveText->add("Mode not supported\n", FTextBase::ALTR);
s.clear();
return;
}
std::string buffer = s.substr(i+7, endbracket - i - 7);
s.clear();
if (buffer.empty()) return;
int numgroups, wc, cc, cl;
cl = ccode.length();
sscanf(buffer.c_str(), "%d", &numgroups);
if (numgroups <= 0 || numgroups > 100000) numgroups = 100;
srand(time(0));
buffer.clear();
for (wc = 1; wc <= numgroups; wc++) {
for (cc = 0; cc < 5; cc++) {
buffer += ccode[ rand() % cl ];
}
if (wc % 10 == 0) buffer += '\n';
else buffer += ' ';
}
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->clear();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->clear();
else
TransmitText->clear();
stopMacroTimer();
active_modem->set_stopflag(false);
PERFORM_CPS_TEST = true;
trx_transmit();
number_of_samples(buffer);
PERFORM_CPS_TEST = false;
return;
}
static void pWAV_FILE(std::string &s, size_t &i, size_t endbracket)
{
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB || id == MODE_WWV ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else
ReceiveText->add("Mode not supported\n", FTextBase::ALTR);
s.clear();
return;
}
std::string fname = s.substr(i+10, endbracket - i - 10);
if (fname.length() > 0 && !within_exec) {
FILE *toadd = fl_fopen(fname.c_str(), "r");
if (toadd) {
std::string buffer;
char c = getc(toadd);
while (c && !feof(toadd)) {
if (c != '\r') buffer += c; // damn MSDOS txt files
c = getc(toadd);
}
s.clear();
fclose(toadd);
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->clear();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->clear();
else
TransmitText->clear();
testfilename = fname;
stopMacroTimer();
active_modem->set_stopflag(false);
PERFORM_CPS_TEST = true;
trx_transmit();
number_of_samples(buffer);
PERFORM_CPS_TEST = false;
} else {
std::string resp = "Could not locate ";
resp.append(fname).append("\n");
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add(resp.c_str(), FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add(resp.c_str(), FTextBase::ALTR);
else
ReceiveText->add(resp.c_str(), FTextBase::ALTR);
LOG_WARN("%s not found", fname.c_str());
substitute(s, i, endbracket, "");
PERFORM_CPS_TEST = false;
}
} else {
PERFORM_CPS_TEST = false;
s.clear();
}
}
static void pWAV_STRING(std::string &s, size_t &i, size_t endbracket)
{
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB || id == MODE_WWV ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add("Mode not supported\n", FTextBase::ALTR);
else
ReceiveText->add("Mode not supported\n", FTextBase::ALTR);
s.clear();
return;
}
std::string buffer = s.substr(i+12, endbracket - i - 12);
std::string txtbuf = buffer;
s.clear();
size_t p = buffer.find("\\n");
while (p != std::string::npos) {
buffer.replace(p,2,"\n");
p = buffer.find("\\n");
}
if (buffer.length()) {
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->clear();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->clear();
else
TransmitText->clear();
stopMacroTimer();
active_modem->set_stopflag(false);
PERFORM_CPS_TEST = true;
trx_transmit();
testfilename = txtbuf;
number_of_samples(buffer);
PERFORM_CPS_TEST = false;
} else {
std::string resp = "Text not specified";
LOG_WARN("%s", resp.c_str());
resp.append("\n");
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->add(resp.c_str(), FTextBase::ALTR);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->add(resp.c_str(), FTextBase::ALTR);
else
ReceiveText->add(resp.c_str(), FTextBase::ALTR);
PERFORM_CPS_TEST = false;
}
}
static void pCOMMENT(std::string &s, size_t &i, size_t endbracket)
{
substitute(s, i, endbracket, "");
if (s[i] == '\n') i++;
}
static void pFILE(std::string &s, size_t &i, size_t endbracket)
{
std::string fname = s.substr(i+6, endbracket - i - 6);
if (fname.length() > 0 && !within_exec) {
FILE *toadd = fl_fopen(fname.c_str(), "r");
if (toadd) {
std::string buffer;
char c = getc(toadd);
while (c && !feof(toadd)) {
if (c != '\r') buffer += c; // change CRLF to LF
c = getc(toadd);
}
size_t blen = buffer.length();
if (blen > 0) {
if (!(buffer[blen -1] == ' ' || buffer[blen-1] == '\n'))
buffer += ' ';
}
substitute(s, i, endbracket, buffer);
fclose(toadd);
} else {
LOG_WARN("%s not found", fname.c_str());
substitute(s, i, endbracket, "ERROR: CANNOT OPEN FILE");
}
} else {
substitute(s, i, endbracket, "OH SHIT");
}
}
static notify_dialog *macro_alert_dialog = 0;
static void doTIMER(std::string s)
{
int number;
std::string sTime = s.substr(7);
if (sTime.length() > 0) {
sscanf(sTime.c_str(), "%d", &number);
int mtime = stop_macro_time();
if (mtime >= number) {
if (!macro_alert_dialog) macro_alert_dialog = new notify_dialog;
std::ostringstream comment;
comment << "Macro timer must be > macro duration of " << mtime << " secs";
macro_alert_dialog->notify(comment.str().c_str(), 5.0);
REQ(show_notifier, macro_alert_dialog);
progStatus.skip_sked_macro = false;
} else {
progStatus.timer = number - mtime;
progStatus.timerMacro = mNbr;
progStatus.skip_sked_macro = true;
}
}
que_ok = true;
}
static void pTIMER(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doTIMER };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void doAFTER(std::string s)
{
int number;
std::string sTime = s.substr(7);
if (sTime.length() > 0) {
sscanf(sTime.c_str(), "%d", &number);
progStatus.timer = number;
progStatus.timerMacro = mNbr;
progStatus.skip_sked_macro = true;
}
que_ok = true;
}
static void pAFTER(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doAFTER };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pREPEAT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
progStatus.repeatMacro = mNbr;
substitute(s, i, endbracket, "");
text2repeat = s;
repeatchar = 0;
s.insert(i, "[REPEAT]");
}
static void pWPM(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
float number;
std::string snumber = s.substr(i+5, endbracket - i - 5);
if (snumber.length() > 0) {
// first value = WPM
sscanf(snumber.c_str(), "%f", &number);
if (number < 5) number = 5;
if (number > 200) number = 200;
progdefaults.CWspeed = number;
setwpm(number);
// second value = Farnsworth WPM
size_t pos;
if ((pos = snumber.find(":")) != std::string::npos) {
snumber.erase(0, pos+1);
if (snumber.length())
sscanf(snumber.c_str(), "%f", &number);
if (number < 5) number = 5;
if (number > progdefaults.CWspeed) number = progdefaults.CWspeed;
progdefaults.CWfarnsworth = number;
if (number == progdefaults.CWspeed)
setwpm(number);
else
setfwpm(number);
}
}
substitute(s, i, endbracket, "");
}
static void pRISETIME(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
float number;
std::string sVal = s.substr(i+6, endbracket - i - 6);
if (sVal.length() > 0) {
sscanf(sVal.c_str(), "%f", &number);
if (number < 0) number = 0;
if (number > 20) number = 20;
progdefaults.CWrisetime = number;
cntCWrisetime->value(number);
}
substitute(s, i, endbracket, "");
}
static void pPRE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
float number;
std::string sVal = s.substr(i+5, endbracket - i - 5);
if (sVal.length() > 0) {
sscanf(sVal.c_str(), "%f", &number);
if (number < 0) number = 0;
if (number > 20) number = 20;
progdefaults.CWpre = number;
cntPreTiming->value(number);
}
substitute(s, i, endbracket, "");
}
static void pPOST(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
float number;
std::string sVal = s.substr(i+6, endbracket - i - 6);
if (sVal.length() > 0) {
sscanf(sVal.c_str(), "%f", &number);
if (number < -20) number = -20;
if (number > 20) number = 20;
progdefaults.CWpost = number;
cntPostTiming->value(number);
}
substitute(s, i, endbracket, "");
}
static void doWPM(std::string s)
{
float number;
std::string snumber = s.substr(6);
if (snumber.length() > 0) {
// first value = WPM
sscanf(snumber.c_str(), "%f", &number);
if (number < 5) number = 5;
if (number > 200) number = 200;
progdefaults.CWspeed = number;
REQ(setwpm, number);
// second value = Farnsworth WPM
size_t pos;
if ((pos = snumber.find(":")) != std::string::npos) {
snumber.erase(0, pos+1);
if (snumber.length())
sscanf(snumber.c_str(), "%f", &number);
if (number < 5) number = 5;
if (number > progdefaults.CWspeed) number = progdefaults.CWspeed;
progdefaults.CWfarnsworth = number;
if (number == progdefaults.CWspeed)
REQ(setwpm, number);
else
REQ(setfwpm, number);
}
}
}
static void pTxQueWPM(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doWPM };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
struct STRpush {
std::string smode;
int freq;
STRpush() { smode = ""; freq = -1; }
};
std::stack<STRpush> mf_stack;
//static std::string mf_stack = "";
static void mMODEM(std::string s)
{
trx_mode m;
s = ucasestr(s);
for (m = 0; m < NUM_MODES; m++)
if (s == ucasestr(mode_info[m].sname))
break;
if (m == NUM_MODES) {
return;
}
if (active_modem->get_mode() != mode_info[m].mode)
init_modem_sync(mode_info[m].mode);
}
static void mFREQ(int f)
{
active_modem->set_freq(f);
}
static void doPOP(std::string s)
{
if (!mf_stack.empty()) {
STRpush psh = mf_stack.top();
mf_stack.pop();
LOG_INFO("%s, %d", psh.smode.c_str(), psh.freq);
if (psh.freq != -1) mFREQ(psh.freq);
if (!psh.smode.empty()) mMODEM(psh.smode);
} else
LOG_INFO("%s", "stack empty");
que_ok = true;
}
static void pPOP(std::string &s, size_t &i, size_t endbracket)
{
if (!mf_stack.empty()) {
STRpush psh = mf_stack.top();
mf_stack.pop();
LOG_INFO("%s, %d", psh.smode.c_str(), psh.freq);
if (psh.freq != -1) mFREQ(psh.freq);
if (!psh.smode.empty()) mMODEM(psh.smode);
} else
LOG_INFO("%s", "stack empty");
substitute(s, i, endbracket, "");
}
static void pTxQuePOP(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doPOP };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQuePOP(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doPOP };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void doPUSHmode(std::string s)
{
STRpush psh;
if (s[5] == '>') {
psh.smode = mode_info[active_modem->get_mode()].sname;
psh.freq = active_modem->get_freq();
} else {
if (s[5] == ':') {
if (s[6] == 'm' || s[7] == 'm')
psh.smode = mode_info[active_modem->get_mode()].sname;
if (s[6] == 'f' || s[7] == 'f')
psh.freq = active_modem->get_freq();
}
}
LOG_INFO("%s, %d", psh.smode.c_str(), psh.freq);
mf_stack.push(psh);
que_ok = true;
}
static void pTxQuePUSH(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doPUSHmode };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQuePUSH(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doPUSHmode };
push_rxcmd(cmd);
// substitute(s, i, endbracket, "^!");
substitute(s, i, endbracket, "");
}
static void pPUSH(std::string &s, size_t &i, size_t endbracket)
{
STRpush psh;
if (s[i+5] == '>') {
psh.smode = mode_info[active_modem->get_mode()].sname;
psh.freq = active_modem->get_freq();
} else {
if (s[i+5] == ':') {
if (s[i+6] == 'm' || s[i+7] == 'm')
psh.smode = mode_info[active_modem->get_mode()].sname;
if (s[i+6] == 'f' || s[i+7] == 'f')
psh.freq = active_modem->get_freq();
}
}
LOG_INFO("%s, %d", psh.smode.c_str(), psh.freq);
mf_stack.push(psh);
substitute(s, i, endbracket, "");
return;
}
static void pDIGI(std::string &s, size_t &i, size_t endbracket)
{
s.replace(i, endbracket - i + 1, mode_info[active_modem->get_mode()].adif_name);
}
std::string macrochar = "";
static void doTxDIGI(std::string s)
{
macrochar = mode_info[active_modem->get_mode()].adif_name;
que_ok = true;
}
static void pTxDIGI(std::string &s, size_t &i, size_t endbracket)
{
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doTxDIGI };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void doTxFREQ(std::string s)
{
macrochar = inpFreq->value();
que_ok = true;
}
static void pTxFREQ(std::string &s, size_t &i, size_t endbracket)
{
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doTxFREQ };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void setRISETIME(int d)
{
cntCWrisetime->value(d);
que_ok = true;
}
static void doRISETIME(std::string s)
{
float number;
std::string sVal = s.substr(7, s.length() - 8);
if (sVal.length() > 0) {
sscanf(sVal.c_str(), "%f", &number);
if (number < 0) number = 0;
if (number > 20) number = 20;
progdefaults.CWrisetime = number;
REQ(setRISETIME, number);
}
}
static void pTxQueRISETIME(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRISETIME };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void setPRE(int d)
{
cntPreTiming->value(d);
que_ok = true;
}
static void doPRE(std::string s)
{
float number;
std::string sVal = s.substr(6, s.length() - 7);
if (sVal.length() > 0) {
sscanf(sVal.c_str(), "%f", &number);
if (number < 0) number = 0;
if (number > 20) number = 20;
progdefaults.CWpre = number;
REQ(setPRE, number);
}
}
static void pTxQuePRE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doPRE };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void setPOST(int d)
{
cntPostTiming->value(d);
que_ok = true;
}
static void doPOST(std::string s)
{
float number;
std::string sVal = s.substr(7, s.length() - 8);
if (sVal.length() > 0) {
sscanf(sVal.c_str(), "%f", &number);
if (number < -20) number = -20;
if (number > 20) number = 20;
progdefaults.CWpost = number;
REQ(setPOST, number);
}
}
static void pTxQuePOST(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doPOST };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void setTXATTEN(float v)
{
int d = (int)(v * 10);
v = d / 10.0;
v = clamp(v, -30.0, 0.0);
progStatus.txlevel = v;
cntTxLevel->value(progStatus.txlevel);
set_mode_txlevel(active_modem->get_mode(), progStatus.txlevel);
que_ok = true;
}
static void pTXATTEN(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
float number;
std::string sVal = s.substr(i+9, endbracket - i - 9);
if (sVal.length() > 0) {
sscanf(sVal.c_str(), "%f", &number);
setTXATTEN(number);
}
substitute(s, i, endbracket, "");
}
static void doTXATTEN(std::string s)
{
float number;
std::string sVal = s.substr(10);
if (sVal.length() > 0) {
sscanf(sVal.c_str(), "%f", &number);
REQ(setTXATTEN, number);
}
}
static void pTxQueTXATTEN(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doTXATTEN };
push_txcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pIDLE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
float number;
std::string sTime = s.substr(i+6, endbracket - i - 6);
if (sTime.length() > 0) {
sscanf(sTime.c_str(), "%f", &number);
macro_idle_on = true;
idleTime = number;
}
substitute(s, i, endbracket, "");
}
static int idle_time = 0; // in 0.1 second increments
static int idle_count = 0;
static void doneIDLE(void *)
{
idle_count++;
if (idle_count == idle_time) {
Qidle_time = 0;
que_ok = true;
idle_time = idle_count = 0;
return;
}
Fl::repeat_timeout(0.1, doneIDLE);
}
static void doIDLE(std::string s)
{
std::string sTime = s.substr(7, s.length() - 8);
if (sTime.length() > 0) {
float ftime;
if (sscanf(sTime.c_str(), "%f", &ftime) != 1)
ftime = 1.0;
idle_time = 10 * ftime;
Qidle_time = 1;
Fl::add_timeout(0.1, doneIDLE);
} else {
Qidle_time = 0;
}
}
static void pTxQueIDLE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doIDLE };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
bool do_tune_on;
static bool tune_on;
static bool rx_tune_on;
static float tune_timeout = 0;
static void start_tune(void *)
{
trx_tune();
}
static void end_tune(void *data = 0)
{
if (data == 0)
trx_receive();
else
trx_transmit();
tune_on = false;
}
static void end_do_tune(void *)
{
trx_transmit();
do_tune_on = false;
}
static void doTUNE(std::string s)
{
std::string sTime = s.substr(7, s.length() - 8);
if (sTime.length() > 0) {
if (sscanf(sTime.c_str(), "%f", &tune_timeout) != 1)
tune_timeout = 1.0;
do_tune_on = true;
Fl::add_timeout(0, start_tune);
Fl::add_timeout(tune_timeout, end_do_tune);
}
que_ok = true;
}
static void pTxQueTUNE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doTUNE };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void end_rxtune(void *)
{
trx_receive();
rx_tune_on = false;
}
static void doRxTUNE(std::string s)
{
std::string sTime = s.substr(7, s.length() - 8);
if (sTime.length() > 0) {
if (sscanf(sTime.c_str(), "%f", &tune_timeout) != 1)
tune_timeout = 1.0;
rx_tune_on = true;
Fl::add_timeout(0, start_tune);
Fl::add_timeout(tune_timeout, end_rxtune);
}
}
static void pRxQueTUNE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRxTUNE };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pTUNE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sTime = s.substr(i+6, endbracket - i - 6);
if (sTime.length() > 0) {
if (sscanf(sTime.c_str(), "%f", &tune_timeout) != 1)
tune_timeout = 1.0;
tune_on = true;
Fl::add_timeout(0, start_tune);
}
substitute(s, i, endbracket, "");
}
static void pQSONBR(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
s.replace(i, endbracket - i + 1, "");
return;
}
char szqsonbr[10];
snprintf(szqsonbr, sizeof(szqsonbr), "%d", qsodb.nbrRecs());
s.replace(i, endbracket - i + 1, szqsonbr);
}
static void pNXTNBR(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
s.replace(i, endbracket - i + 1, "");
return;
}
char szqsonbr[20];
snprintf(szqsonbr, sizeof(szqsonbr), "%d", qsodb.nbrRecs() + 1);
s.replace(i, endbracket - i + 1, szqsonbr);
}
static void pNRSID(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
int number = 0;
std::string sNumber = s.substr(i+7, endbracket - i - 7);
if (sNumber.length() > 0) {
sscanf(sNumber.c_str(), "%d", &number);
progStatus.n_rsids = number;
}
substitute(s, i, endbracket, "");
}
static bool useWait = false;
static float waitTime = 0;
static void pWAIT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
float number;
std::string sTime = s.substr(i+6, endbracket - i - 6);
if (sTime.length() > 0) {
sscanf(sTime.c_str(), "%f", &number);
useWait = true;
waitTime = number;
}
substitute(s, i, endbracket, "");
}
static void doneWAIT(void *)
{
Qwait_time = 0;
start_tx();
que_ok = true;
}
static void doWAIT(std::string s)
{
float number;
std::string sTime = s.substr(7, s.length() - 8);
if (sTime.length() > 0) {
sscanf(sTime.c_str(), "%f", &number);
Qwait_time = number;
Fl::add_timeout (number, doneWAIT);
} else
Qwait_time = 0;
}
static void pTxQueWAIT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doWAIT };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void doRxWAIT(std::string s)
{
float number = 0;
std::string sTime = s.substr(7, s.length() - 8);
if (sTime.length() > 0) {
sscanf(sTime.c_str(), "%f", &number);
macro_rx_wait = true;
Fl::add_timeout(number, rx_que_continue);
}
}
static void pRxQueWAIT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRxWAIT };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pINFO1(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 7, info1msg );
}
static void pINFO2(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 7, info2msg );
}
static void pCLRRX(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
trx_mode md = active_modem->get_mode();
if (md == MODE_IFKP)
ifkp_rx_text->clear();
else if (md == MODE_FSQ)
fsq_rx_text->clear();
else if ((md >= MODE_FELDHELL) && (md <= MODE_HELL80))
FHdisp->clear();
else
ReceiveText->clear();
}
static void pCLRTX(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
queue_reset();
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->clear();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->clear();
else
TransmitText->clear();
}
static void pCLRQSO(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
clearQSO();
}
static void pFOCUS(std::string &s, size_t &i, size_t endbracket)
{
if (!within_exec) {
if (qsoFreqDisp->is_reversed_colors()) {
qsoFreqDisp->restore_colors();
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->take_focus();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->take_focus ();
else
TransmitText->take_focus();
} else {
qsoFreqDisp->take_focus();
qsoFreqDisp->reverse_colors();
}
}
substitute(s, i, endbracket, "");
}
static void pQSYPLUS(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
int rf = 0;
float rfd = 0;
std::string sIncrFreq = s.substr(i+6, endbracket - i - 6);
// no frequency(s) specified
if (sIncrFreq.length() == 0) {
substitute(s, i, endbracket, "");
return;
}
// rf first value
sscanf(sIncrFreq.c_str(), "%f", &rfd);
if (rfd != 0) {
rf = wf->rfcarrier() + (int)(1000*rfd);
qsy(rf, active_modem ? active_modem->get_freq() : 1500);
}
substitute(s, i, endbracket, "");
}
static void pCALL(std::string &s, size_t &i, size_t endbracket)
{
std::string call = inpCall->value();
if (active_modem->get_mode() == MODE_IFKP && progdefaults.ifkp_lowercase_call)
for (size_t n = 0; n < call.length(); n++) call[n] = tolower(call[n]);
s.replace( i, 6, call );
}
static void pGET(std::string &s, size_t &i, size_t endbracket)
{
s.erase( i, 9 );
GET = true;
}
static void pFREQ(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 6, inpFreq->value() );
}
static void pBAND(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 6, band_name( band( wf->rfcarrier() ) ) );
}
static void pLOC(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 5, inpLoc->value() );
}
static void pMODE(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 6, active_modem->get_mode_name());
}
static void pNAME(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 6, inpName->value() );
}
static void pQTH(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i,5, inpQth->value() );
}
static void pST(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 4, inpState->value() );
}
static void pPR(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 4, inpVEprov->value() );
}
static void pQSOTIME(std::string &s, size_t &i, size_t endbracket)
{
qso_time = inpTimeOff->value();
s.replace( i, 9, qso_time.c_str() );
}
static void pRST(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 5, cut_string(inpRstOut->value()));
}
static void pMYCALL(std::string &s, size_t &i, size_t endbracket)
{
std::string call = inpMyCallsign->value();
if (active_modem->get_mode() == MODE_IFKP && progdefaults.ifkp_lowercase)
for (size_t n = 0; n < call.length(); n++) call[n] = tolower(call[n]);
s.replace( i, 8, call );
}
static void pMYLOC(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 7, inpMyLocator->value() );
}
static void pMYNAME(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 8, inpMyName->value() );
}
static void pMYQTH(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 7, inpMyQth->value() );
}
static void pMYRST(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 7, inpRstIn->value() );
}
static void pANTENNA(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 9, progdefaults.myAntenna.c_str() );
}
static void pMYCLASS(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 9, progdefaults.my_FD_class.c_str() );
}
static void pMYSECTION(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 11, progdefaults.my_FD_section.c_str() );
}
static void pMYSTATE(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 9, listbox_states->value() );
}
static void pMYST(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 6, inp_QP_state_short->value() );
}
static void pMYCOUNTY(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 10, listbox_counties->value() );
}
static void pMYCNTY(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 8, inp_QP_short_county->value() );
}
static void pLDT(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
std::string fmt = "%x %H:%M %Z";
std::string timefmt = s.substr(i, endbracket-i);
size_t p = timefmt.find(":");
if (p == 4) {
fmt = timefmt.substr(p + 1, timefmt.length() - p - 1);
if (fmt[0] == '"') fmt.erase(0,1);
if (fmt[fmt.length()-1] == '"') fmt.erase(fmt.length()-1);
}
time_t tmptr;
tm sTime;
time (&tmptr);
localtime_r(&tmptr, &sTime);
mystrftime(szDt, 79, fmt.c_str(), &sTime);
s.replace(i, endbracket - i + 1, szDt);
}
static void pILDT(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
std::string fmt = "%Y-%m-%d %H:%M%z";
std::string timefmt = s.substr(i, endbracket-i);
size_t p = timefmt.find(":");
if (p == 5) {
fmt = timefmt.substr(p + 1, timefmt.length() - p - 1);
if (fmt[0] == '"') fmt.erase(0,1);
if (fmt[fmt.length()-1] == '"') fmt.erase(fmt.length()-1);
}
time_t tmptr;
tm sTime;
time (&tmptr);
localtime_r(&tmptr, &sTime);
mystrftime(szDt, 79, fmt.c_str(), &sTime);
s.replace(i, endbracket - i + 1, szDt);
}
static void pZDT(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
std::string fmt = "%x %H:%MZ";
std::string timefmt = s.substr(i, endbracket - i);
size_t p = timefmt.find(":");
if (p == 4) {
fmt = timefmt.substr(p + 1, timefmt.length() - p - 1);
if (fmt[0] == '"') fmt.erase(0,1);
if (fmt[fmt.length()-1] == '"') fmt.erase(fmt.length()-1);
}
time_t tmptr;
tm sTime;
time (&tmptr);
gmtime_r(&tmptr, &sTime);
mystrftime(szDt, 79, fmt.c_str(), &sTime);
s.replace(i, endbracket - i + 1, szDt);
}
static void pIZDT(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
std::string fmt = "%Y-%m-%d %H:%MZ";
std::string timefmt = s.substr(i, endbracket-i);
size_t p = timefmt.find(":");
if (p == 5) {
fmt = timefmt.substr(p + 1, timefmt.length() - p - 1);
if (fmt[0] == '"') fmt.erase(0,1);
if (fmt[fmt.length()-1] == '"') fmt.erase(fmt.length()-1);
}
time_t tmptr;
tm sTime;
time (&tmptr);
gmtime_r(&tmptr, &sTime);
mystrftime(szDt, 79, fmt.c_str(), &sTime);
s.replace(i, endbracket - i + 1, szDt);
}
static void pLT(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
std::string fmt = "%H%ML";
std::string timefmt = s.substr(i, endbracket-i);
size_t p = timefmt.find(":");
if (p == 3) {
fmt = timefmt.substr(p + 1, timefmt.length() - p - 1);
if (fmt[0] == '"') fmt.erase(0,1);
if (fmt[fmt.length()-1] == '"') fmt.erase(fmt.length()-1);
}
time_t tmptr;
tm sTime;
time (&tmptr);
localtime_r(&tmptr, &sTime);
mystrftime(szDt, 79, fmt.c_str(), &sTime);
s.replace(i, endbracket - i + 1, szDt);
}
static void pZT(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
std::string fmt = "%H%MZ";
std::string timefmt = s.substr(i, endbracket-i);
size_t p = timefmt.find(":");
if (p == 3) {
fmt = timefmt.substr(p + 1, timefmt.length() - p - 1);
if (fmt[0] == '"') fmt.erase(0,1);
if (fmt[fmt.length()-1] == '"') fmt.erase(fmt.length()-1);
}
time_t tmptr;
tm sTime;
time (&tmptr);
gmtime_r(&tmptr, &sTime);
mystrftime(szDt, 79, fmt.c_str(), &sTime);
s.replace(i, endbracket - i + 1, szDt);
}
static void pLD(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
std::string fmt = "%Y-%m-%d";
std::string timefmt = s.substr(i, endbracket - i);
size_t p = timefmt.find(":");
if (p == 3) {
fmt = timefmt.substr(p + 1, timefmt.length() - p - 1);
if (fmt[0] == '"') fmt.erase(0,1);
if (fmt[fmt.length()-1] == '"') fmt.erase(fmt.length()-1);
}
time_t tmptr;
tm sTime;
time (&tmptr);
localtime_r(&tmptr, &sTime);
mystrftime(szDt, 79, fmt.c_str(), &sTime);
s.replace(i, endbracket - i + 1, szDt);
}
static void pZD(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
std::string fmt = "%Y-%m-%d";
std::string timefmt = s.substr(i, endbracket - i);
size_t p = timefmt.find(":");
if (p == 3) {
fmt = timefmt.substr(p + 1, timefmt.length() - p - 1);
if (fmt[0] == '"') fmt.erase(0,1);
if (fmt[fmt.length()-1] == '"') fmt.erase(fmt.length()-1);
}
time_t tmptr;
tm sTime;
time (&tmptr);
gmtime_r(&tmptr, &sTime);
mystrftime(szDt, 79, fmt.c_str(), &sTime);
s.replace(i, endbracket - i + 1, szDt);
}
static void p_ID(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
progdefaults.macroid = true;
substitute(s, i, endbracket, "");
}
static void pTEXT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
progdefaults.macrotextid = true;
substitute(s, i, endbracket, "");
}
static void doCWID(std::string s)
{
progdefaults.macroCWid = true;
que_ok = true;
}
static void pCWID(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
CMDS cmd = {s.substr(i, endbracket - i + 1), doCWID};
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void doDTMF(std::string s)
{
progdefaults.DTMFstr = s.substr(6, s.length() - 8);
que_ok = true;
}
static void pDTMF(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
CMDS cmd = {s.substr(i, endbracket - i + 1), doDTMF};
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pALERT(std::string &s, size_t &i, size_t endbracket)
{
if (trx_state != STATE_RX) {
substitute(s, i, endbracket, "");
return;
}
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string cmd = s.substr(i+7, endbracket - i - 7);
if (audio_alert)
try {
audio_alert->alert(cmd);
} catch (...) {
}
substitute(s, i, endbracket, "");
}
static void doAUDIO(std::string s)
{
s.erase(0, 16);
active_modem->Audio_filename(s);
que_ok = true;
}
static void pAUDIO(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string acmd = "Xmt audio file: ";
acmd.append(s.substr(i + 7, endbracket - (i + 7)));
CMDS cmd = {acmd, doAUDIO};
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pPAUSE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
}
static void pRX(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "^r");
}
static void pTX(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
if (rx_only)
TransmitON = false;
else {
start_macro_time();
TransmitON = true;
}
}
static void pTXRX(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
if (rx_only)
ToggleTXRX = false;
else
ToggleTXRX = true;
}
/*
static std::string hexstr(std::string &s)
{
static std::string hex;
static char val[3];
hex.clear();
for (size_t i = 0; i < s.length(); i++) {
snprintf(val, sizeof(val), "%02x", s[i] & 0xFF);
hex.append("<").append(val).append(">");
}
return hex;
}
*/
static void doRIGCAT(std::string s)
{
size_t start = s.find(':');
std::string buff;
LOG_INFO("!RIGCAT %s", s.substr(start + 1, s.length() - start + 1).c_str());
size_t val = 0;
int retnbr = 0;
char c, ch;
bool asciisw = false;
bool valsw = false;
for (size_t j = start+1 ; j <= s.length() ; j++) {
ch = s[j];
if (ch == '\"') {
asciisw = !asciisw;
continue;
}
// accumulate ascii string
if (asciisw) {
if (isprint(ch)) buff += ch;
continue;
}
// following digits is expected size of CAT response from xcvr
if (ch == ':' && s[j+1] != '>') {
sscanf(&s[j+1], "%d", &retnbr);
}
// accumulate hex string values
if ((ch == ' ' || ch == '>' || ch == ':') && valsw) {
c = char(val);
// LOG_INFO("c=%02x, val=%d", c, val);
buff += c;
val = 0;
valsw = false;
} else {
val *= 16;
ch = toupper(ch);
if (isdigit(ch)) val += ch - '0';
else if (ch >= 'A' && ch <= 'F') val += ch - 'A' + 10;
valsw = true;
}
if (ch == ':') break;
}
add_to_cmdque("RIGCAT macro", buff, retnbr, progdefaults.RigCatWait);
que_ok = true;
}
static void pTxQueRIGCAT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRIGCAT };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQueRIGCAT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRIGCAT };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pRIGCAT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
LOG_INFO("cat cmd:retnbr %s", s.substr(i, endbracket - i + 1).c_str());
size_t start = s.find(':', i);
std::basic_string<char> buff;
size_t val = 0;
int retnbr = 0;
char c, ch;
bool asciisw = false;
bool valsw = false;
for (size_t j = start+1 ; j <= endbracket ; j++) {
ch = s[j];
if (ch == '\"') {
asciisw = !asciisw;
continue;
}
// accumulate ascii string
if (asciisw) {
if (isprint(ch)) buff += ch;
continue;
}
// following digits is expected size of CAT response from xcvr
if (ch == ':' && s[j+1] != '>') {
sscanf(&s[j+1], "%d", &retnbr);
}
// accumulate hex string values
if ((ch == ' ' || ch == '>' || ch == ':') && valsw) {
c = char(val);
// LOG_INFO("c=%02x, val=%d", c, val);
buff += c;
val = 0;
valsw = false;
} else {
val *= 16;
ch = toupper(ch);
if (isdigit(ch)) val += ch - '0';
else if (ch >= 'A' && ch <= 'F') val += ch - 'A' + 10;
valsw = true;
}
if (ch == ':') break;
}
add_to_cmdque( "RIGCAT macro", buff, retnbr, progdefaults.RigCatWait);
substitute(s, i, endbracket, "");
}
static void doFLRIG(std::string s)
{
size_t start = s.find(':');
std::string cmd = s.substr(start + 1, s.length() - start + 1);
LOG_INFO("!FLRIG %s", cmd.c_str());
xmlrpc_send_command(cmd);
que_ok = true;
}
static void pTxQueFLRIG(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doFLRIG };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQueFLRIG(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doFLRIG };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pFLRIG(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
LOG_INFO("flrig CAT cmd: %s", s.substr(i, endbracket - i + 1).c_str());
size_t start = s.find(':');
std::string cmd = s.substr(start + 1, s.length() - start - 2);
xmlrpc_send_command(cmd);
substitute(s, i, endbracket, "");
}
static void doVIDEO(std::string s)
{
trx_mode id = active_modem->get_mode();
if ( id == MODE_SSB ||
id == MODE_ANALYSIS ||
id == MODE_WEFAX_576 || id == MODE_WEFAX_288 ||
id == MODE_SITORB || id == MODE_NAVTEX ) {
return;
}
size_t start = s.find(':') + 1;
size_t end = s.find('>');
active_modem->macro_video_text = s.substr(start, end - start);
que_ok = true;
}
static void pVIDEO(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doVIDEO };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pVER(std::string &s, size_t &i, size_t endbracket)
{
std::string progname;
progname = "Fldigi ";
progname.append(PACKAGE_VERSION);
s.replace( i, 5, progname );
}
static void pSERNO(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
s.replace(i, endbracket - i + 1, "");
return;
}
int contestval;
contestval = atoi(outSerNo->value());
if (contestval) {
char serstr[10];
contest_count.Format(progdefaults.ContestDigits, progdefaults.UseLeadingZeros);
snprintf(serstr, sizeof(serstr), contest_count.fmt.c_str(), contestval);
s.replace (i, 7, cut_string(serstr));
} else
s.replace (i, 7, "");
}
static void pLASTNO(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
s.replace(i, endbracket - i + 1, "");
return;
}
int contestval;
contestval = atoi(outSerNo->value()) - 1;
if (contestval) {
char serstr[10];
contest_count.Format(progdefaults.ContestDigits, progdefaults.UseLeadingZeros);
snprintf(serstr, sizeof(serstr), contest_count.fmt.c_str(), contestval);
s.replace (i, 8, cut_string(serstr));
} else
s.replace (i, 8, "");
}
static void pCNTR(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
s.replace(i, endbracket - i + 1, "");
return;
}
int contestval;
contestval = contest_count.count;
if (contestval) {
contest_count.Format(progdefaults.ContestDigits, progdefaults.UseLeadingZeros);
snprintf(contest_count.szCount, sizeof(contest_count.szCount), contest_count.fmt.c_str(), contestval);
s.replace (i, 6, cut_string(contest_count.szCount));
} else
s.replace (i, 6, "");
}
static void pDECR(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
contest_count.count--;
if (contest_count.count < 0) contest_count.count = 0;
substitute(s, i, endbracket, "");
updateOutSerNo();
}
static void pINCR(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
contest_count.count++;
substitute(s, i, endbracket, "");
updateOutSerNo();
}
static void pXIN(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 5, inpXchgIn->value() );
}
static void pXOUT(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 6, cut_string(progdefaults.myXchg.c_str()));
}
static void pXBEG(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
xbeg = i;
}
static void pXEND(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
xend = i;
}
static void pSAVEXCHG(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
save_xchg = true;
substitute(s, i, endbracket, "");
}
static void pFD_CLASS(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 9, inpClass->value() );
}
static void pFD_SECTION(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 8, inpSection->value() );
}
static void pCLASS(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 7, inpClass->value() );
}
static void pSECTION(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 9, inpSection->value() );
}
static void pLOG(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
size_t start = s.find(':', i);
if (start != std::string::npos && start < endbracket) {
std::string msg = inpNotes->value();
if (!msg.empty()) msg.append("\n");
msg.append(s.substr(start + 1, endbracket-start-1));
inpNotes->value(msg.c_str());
}
substitute(s, i, endbracket, "");
qsoSave_cb(0, 0);
}
static void pLNW(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
size_t start = s.find(':', i);
if (start != std::string::npos) {
std::string msg = inpNotes->value();
if (!msg.empty()) msg.append("\n");
msg.append(s.substr(start + 1, endbracket-start-1));
inpNotes->value(msg.c_str());
}
substitute(s, i, endbracket, "");
qsoSave_cb(0, 0);
}
static void pCLRLOG(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
}
static void pMODEM_COMPSKED(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
size_t j, k,
len = s.length();
std::string name;
if ((j = s.find('>', i)) == std::string::npos)
return;
while (++j < len)
if (!isspace(s[j])) break;
k = j;
while (++k < len)
if (isspace(s[k]) || s[k] == '<') break;
name = ucasestr(s.substr(j, k - j));
for (int m = 0; m < NUM_MODES; m++) {
if (name == ucasestr(mode_info[m].sname)) {
if (active_modem->get_mode() != mode_info[m].mode)
init_modem(mode_info[m].mode);
break;
}
}
s.erase(i, k-i);
}
static void doIMAGE(std::string s)
{
if (s.length() > 0) {
bool Greyscale = false;
size_t p = std::string::npos;
std::string fname = s.substr(7);
p = fname.find(">");
fname.erase(p);
p = fname.find("G,");
if (p == std::string::npos) p = fname.find("g,");
if (p != std::string::npos) {
Greyscale = true;
fname.erase(p,2);
}
while (fname[0] == ' ') fname.erase(0,1);
trx_mode active_mode = active_modem->get_mode();
if ((active_mode == MODE_MFSK16 ||
active_mode == MODE_MFSK32 ||
active_mode == MODE_MFSK64 ||
active_mode == MODE_MFSK128) &&
active_modem->get_cap() & modem::CAP_IMG) {
Greyscale ?
active_modem->send_Grey_image(fname) :
active_modem->send_color_image(fname);
} else if (active_mode >= MODE_THOR_FIRST && active_mode <= MODE_THOR_LAST) {
thor_load_scaled_image(fname, Greyscale);
} else if (active_mode == MODE_IFKP) {
ifkp_load_scaled_image(fname, Greyscale);
}
}
que_ok = true;
}
static void pTxQueIMAGE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string Tx_cmdstr = s.substr(i, endbracket - i + 1);
struct CMDS cmd = { Tx_cmdstr, doIMAGE };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void doINSERTIMAGE(std::string s)
{
if (s.length() > 0) {
bool Greyscale = false;
size_t p = std::string::npos;
std::string fname = s.substr(7);
p = fname.find(">");
fname.erase(p);
p = fname.find("G,");
if (p == std::string::npos) p = fname.find("g,");
if (p != std::string::npos) {
Greyscale = true;
fname.erase(p,2);
}
while (fname[0] == ' ') fname.erase(0,1);
if (s.empty()) return;
trx_mode md = active_modem->get_mode();
if ((md == MODE_MFSK16 || md == MODE_MFSK32 ||
md == MODE_MFSK64 || md == MODE_MFSK128) &&
active_modem->get_cap() & modem::CAP_IMG) {
Greyscale ?
active_modem->send_Grey_image(fname) :
active_modem->send_color_image(fname);
}
else if (md == MODE_IFKP)
ifkp_load_scaled_image(fname, Greyscale);
else if (md >= MODE_THOR_FIRST && md <= MODE_THOR_LAST)
thor_load_scaled_image(fname, Greyscale);
}
que_ok = true;
}
void TxQueINSERTIMAGE(std::string s)
{
trx_mode active_mode = active_modem->get_mode();
if (! (active_mode == MODE_MFSK16 ||
active_mode == MODE_MFSK32 ||
active_mode == MODE_MFSK64 ||
active_mode == MODE_MFSK128 ||
active_mode == MODE_IFKP ||
(active_mode >= MODE_THOR_FIRST && active_mode <= MODE_THOR_LAST) ) &&
active_modem->get_cap() & modem::CAP_IMG)
return;
std::string scmd = "<IMAGE:>";
scmd.insert(7,s);
struct CMDS cmd = { scmd, doINSERTIMAGE };
push_txcmd(cmd);
std::string itext = s;
size_t p = itext.rfind("\\");
if (p == std::string::npos) p = itext.rfind("/");
if (p != std::string::npos) itext.erase(0, p+1);
p = itext.rfind(".");
if (p != std::string::npos) itext.erase(p);
itext.insert(0, "\nImage: ");
itext.append(" ^!");
if (active_mode == MODE_IFKP)
ifkp_tx_text->add_text(itext);
else if (active_mode == MODE_FSQ)
fsq_tx_text->add_text(itext);
else
add_text(itext);
}
static void doAVATAR(std::string s)
{
if (active_modem->get_mode() == MODE_IFKP)
active_modem->m_ifkp_send_avatar();
que_ok = true;
}
static void pTxQueAVATAR(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
s.replace(i, endbracket - i + 1, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doAVATAR };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void doMODEM(std::string s)
{
static fre_t re("<!MODEM:([[:alnum:]-]+)((:[[:digit:].+-]*)*)>", REG_EXTENDED);
std::string tomatch = s;
for (int i = 2; i < 7; i++) s[i] = toupper(s[i]);
if (!re.match(tomatch.c_str())) {
que_ok = true;
return;
}
const std::vector<regmatch_t>& o = re.suboff();
std::string name = ucasestr(tomatch.substr(o[1].rm_so, o[1].rm_eo - o[1].rm_so));
trx_mode m;
for (m = 0; m < NUM_MODES; m++)
if (name == ucasestr(mode_info[m].sname))
break;
// do we have arguments and a valid modem?
if (o.size() == 2 || m == NUM_MODES) {
que_ok = true;
return;
}
// parse arguments
std::vector<double> args;
args.reserve(8);
char* end;
double d;
for (const char* p = s.c_str() + o[2].rm_so + 1; *p; p++) {
errno = 0;
d = strtod(p, &end);
if (!errno && p != end) {
args.push_back(d);
p = end;
}
else // push an invalid value
args.push_back(DBL_MIN);
}
try {
switch (m) {
case MODE_RTTY: // carrier shift, baud rate, bits per char
if (args.at(0) != DBL_MIN)
set_rtty_shift((int)args[0]);
if (args.at(1) != DBL_MIN)
set_rtty_baud((float)args[1]);
if (args.at(2) != DBL_MIN)
set_rtty_bits((int)args[2]);
break;
case MODE_CONTESTIA: // bandwidth, tones
if (args.at(0) != DBL_MIN && args.at(1) != DBL_MIN) {
int bw = (int)args[0];
int tones = (int)args[1];
set_contestia_bw(bw);
set_contestia_tones(tones);
switch (tones) {
case 4 :
if (bw == 125) m = MODE_CONTESTIA_4_125;
else if (bw == 250) m = MODE_CONTESTIA_4_250;
else if (bw == 500) m = MODE_CONTESTIA_4_500;
else if (bw == 1000) m = MODE_CONTESTIA_4_1000;
else if (bw == 2000) m = MODE_CONTESTIA_4_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
case 8 :
if (bw == 125) m = MODE_CONTESTIA_8_125;
else if (bw == 250) m = MODE_CONTESTIA_8_250;
else if (bw == 500) m = MODE_CONTESTIA_8_500;
else if (bw == 1000) m = MODE_CONTESTIA_8_1000;
else if (bw == 2000) m = MODE_CONTESTIA_8_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
case 16 :
if (bw == 250) m = MODE_CONTESTIA_16_250;
else if (bw == 500) m = MODE_CONTESTIA_16_500;
else if (bw == 1000) m = MODE_CONTESTIA_16_1000;
else if (bw == 2000) m = MODE_CONTESTIA_16_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
case 32 :
if (bw == 1000) m = MODE_CONTESTIA_32_1000;
else if (bw == 2000) m = MODE_CONTESTIA_32_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
case 64 :
if (bw == 500) m = MODE_CONTESTIA_64_500;
else if (bw == 1000) m = MODE_CONTESTIA_64_1000;
else if (bw == 2000) m = MODE_CONTESTIA_64_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
default :
set_contestia_bw(bw);
set_contestia_tones(tones);
}
}
break;
case MODE_OLIVIA: // bandwidth, tones
if (args.at(0) != DBL_MIN && args.at(1) != DBL_MIN) {
int bw = (int)args[0];
int tones = (int)args[1];
set_olivia_bw(bw);
set_olivia_tones(tones);
switch (tones) {
case 4 :
if (bw == 125) m = MODE_OLIVIA_4_125;
else if (bw == 250) m = MODE_OLIVIA_4_250;
else if (bw == 500) m = MODE_OLIVIA_4_500;
else if (bw == 1000) m = MODE_OLIVIA_4_1000;
else if (bw == 2000) m = MODE_OLIVIA_4_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
case 8 :
if (bw == 125) m = MODE_OLIVIA_8_125;
else if (bw == 250) m = MODE_OLIVIA_8_250;
else if (bw == 500) m = MODE_OLIVIA_8_500;
else if (bw == 1000) m = MODE_OLIVIA_8_1000;
else if (bw == 2000) m = MODE_OLIVIA_8_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
case 16 :
if (bw == 500) m = MODE_OLIVIA_16_500;
else if (bw == 1000) m = MODE_OLIVIA_16_1000;
else if (bw == 2000) m = MODE_OLIVIA_16_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
case 32 :
if (bw == 1000) m = MODE_OLIVIA_32_1000;
else if (bw == 2000) m = MODE_OLIVIA_32_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
case 64 :
if (bw == 500) m = MODE_OLIVIA_64_500;
else if (bw == 1000) m = MODE_OLIVIA_64_1000;
else if (bw == 2000) m = MODE_OLIVIA_64_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
default :
set_olivia_bw(bw);
set_olivia_tones(tones);
}
}
break;
default:
break;
}
}
catch (const std::exception& e) { }
if (active_modem->get_mode() != mode_info[m].mode) {
init_modem_sync(mode_info[m].mode);
}
que_ok = true;
}
static void pTxQueMODEM(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string Tx_cmdstr = s.substr(i, endbracket - i + 1);
struct CMDS cmd = { Tx_cmdstr, doMODEM };
if (Tx_cmdstr.find("SSB") != std::string::npos || Tx_cmdstr.find("ANALYSIS") != std::string::npos) {
LOG_ERROR("Disallowed: %s", Tx_cmdstr.c_str());
size_t nowbracket = s.find('<', endbracket);
if (nowbracket != std::string::npos)
s.erase(i, nowbracket - i - 1);
else
s.clear();
} else {
push_txcmd(cmd);
if (i && s[i-1] == '\n') i--;
substitute(s, i, endbracket, "^!");
}
}
static void pRxQueMODEM(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string rx_cmdstr = s.substr(i, endbracket - i + 1);
struct CMDS cmd = { rx_cmdstr, doMODEM };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pMODEM(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
static fre_t re("<MODEM:([[:alnum:]-]+)((:[[:digit:].+-]*)*)>", REG_EXTENDED);
std::string testmode = s.substr(i, endbracket - i + 1);
for (int i = 2; i < 7; i++) testmode[i] = toupper(testmode[i]);
std::string name = testmode;
name.erase(0,7);
name.erase(name.length() - 1);
name = ucasestr(name);
// test for exact match on mode name (ignore case)
for (trx_mode m = 0; m < NUM_MODES; m++) {
if (name == ucasestr(mode_info[m].sname)) {
init_modem(mode_info[m].mode);
s.erase(i, endbracket - i + 1);
int count = 500;
while ((active_modem->get_mode() != mode_info[m].mode) && --count)
MilliSleep(10);
return;
}
}
if (!re.match(testmode.c_str())) {
s.erase(i, endbracket - i + 1);
return;
}
const std::vector<regmatch_t>& o = re.suboff();
name = ucasestr(testmode.substr(o[1].rm_so, o[1].rm_eo - o[1].rm_so));
trx_mode m;
for (m = 0; m < NUM_MODES; m++)
if (name == ucasestr(mode_info[m].sname))
break;
// do we have arguments and a valid modem?
if (o.size() == 2 || m == NUM_MODES) {
if (m < NUM_MODES && active_modem->get_mode() != mode_info[m].mode)
init_modem(mode_info[m].mode);
s.erase(i, o[0].rm_eo - i);
int count = 500;
while ((active_modem->get_mode() != mode_info[m].mode) && --count)
MilliSleep(10);
return;
}
// parse arguments
std::vector<double> args;
args.reserve(8);
char* end;
double d;
for (const char* p = testmode.c_str() + o[2].rm_so + 1; *p; p++) {
errno = 0;
d = strtod(p, &end);
if (!errno && p != end) {
args.push_back(d);
p = end;
}
else // push an invalid value
args.push_back(DBL_MIN);
}
try {
switch (m) {
case MODE_RTTY: // carrier shift, baud rate, bits per char
if (args.at(0) != DBL_MIN)
set_rtty_shift((int)args[0]);
if (args.at(1) != DBL_MIN)
set_rtty_baud((float)args[1]);
if (args.at(2) != DBL_MIN)
set_rtty_bits((int)args[2]);
break;
case MODE_CONTESTIA: // bandwidth, tones
if (args.at(0) != DBL_MIN && args.at(1) != DBL_MIN) {
int bw = (int)args[0];
int tones = (int)args[1];
set_contestia_bw(bw);
set_contestia_tones(tones);
switch (tones) {
case 4 :
if (bw == 125) m = MODE_CONTESTIA_4_125;
else if (bw == 250) m = MODE_CONTESTIA_4_250;
else if (bw == 500) m = MODE_CONTESTIA_4_500;
else if (bw == 1000) m = MODE_CONTESTIA_4_1000;
else if (bw == 2000) m = MODE_CONTESTIA_4_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
case 8 :
if (bw == 125) m = MODE_CONTESTIA_8_125;
else if (bw == 250) m = MODE_CONTESTIA_8_250;
else if (bw == 500) m = MODE_CONTESTIA_8_500;
else if (bw == 1000) m = MODE_CONTESTIA_8_1000;
else if (bw == 2000) m = MODE_CONTESTIA_8_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
case 16 :
if (bw == 250) m = MODE_CONTESTIA_16_250;
else if (bw == 500) m = MODE_CONTESTIA_16_500;
else if (bw == 1000) m = MODE_CONTESTIA_16_1000;
else if (bw == 2000) m = MODE_CONTESTIA_16_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
case 32 :
if (bw == 1000) m = MODE_CONTESTIA_32_1000;
else if (bw == 2000) m = MODE_CONTESTIA_32_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
case 64 :
if (bw == 500) m = MODE_CONTESTIA_64_500;
else if (bw == 1000) m = MODE_CONTESTIA_64_1000;
else if (bw == 2000) m = MODE_CONTESTIA_64_2000;
else {
set_contestia_bw(bw);
set_contestia_tones(tones);
}
break;
default :
set_contestia_bw(bw);
set_contestia_tones(tones);
}
}
break;
case MODE_OLIVIA: // bandwidth, tones
if (args.at(0) != DBL_MIN && args.at(1) != DBL_MIN) {
int bw = (int)args[0];
int tones = (int)args[1];
set_olivia_bw(bw);
set_olivia_tones(tones);
switch (tones) {
case 4 :
if (bw == 125) m = MODE_OLIVIA_4_125;
else if (bw == 250) m = MODE_OLIVIA_4_250;
else if (bw == 500) m = MODE_OLIVIA_4_500;
else if (bw == 1000) m = MODE_OLIVIA_4_1000;
else if (bw == 2000) m = MODE_OLIVIA_4_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
case 8 :
if (bw == 125) m = MODE_OLIVIA_8_125;
else if (bw == 250) m = MODE_OLIVIA_8_250;
else if (bw == 500) m = MODE_OLIVIA_8_500;
else if (bw == 1000) m = MODE_OLIVIA_8_1000;
else if (bw == 2000) m = MODE_OLIVIA_8_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
case 16 :
if (bw == 500) m = MODE_OLIVIA_16_500;
else if (bw == 1000) m = MODE_OLIVIA_16_1000;
else if (bw == 2000) m = MODE_OLIVIA_16_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
case 32 :
if (bw == 1000) m = MODE_OLIVIA_32_1000;
else if (bw == 2000) m = MODE_OLIVIA_32_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
case 64 :
if (bw == 500) m = MODE_OLIVIA_64_500;
else if (bw == 1000) m = MODE_OLIVIA_64_1000;
else if (bw == 2000) m = MODE_OLIVIA_64_2000;
else {
set_olivia_bw(bw);
set_olivia_tones(tones);
}
break;
default :
set_olivia_bw(bw);
set_olivia_tones(tones);
}
}
break;
default:
break;
}
}
catch (const std::exception& e) { }
if (active_modem->get_mode() != mode_info[m].mode) {
init_modem(mode_info[m].mode);
int count = 500;
while ((active_modem->get_mode() != mode_info[m].mode) && --count)
MilliSleep(10);
}
substitute(s, i, endbracket, "");
}
static void pAFC(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i+5, endbracket - i - 5);
if (sVal.length() > 0) {
// sVal = on|off|t [ON, OFF or Toggle]
if (sVal.compare(0,2,"on") == 0)
btnAFC->value(1);
else if (sVal.compare(0,3,"off") == 0)
btnAFC->value(0);
else if (sVal.compare(0,1,"t") == 0)
btnAFC->value(!btnAFC->value());
btnAFC->do_callback();
}
substitute(s, i, endbracket, "");
}
static void pREV(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i+5, endbracket - i - 5);
if (sVal.length() > 0) {
// sVal = on|off|t [ON, OFF or Toggle]
if (sVal.compare(0,2,"on") == 0)
wf->btnRev->value(1);
else if (sVal.compare(0,3,"off") == 0)
wf->btnRev->value(0);
else if (sVal.compare(0,1,"t") == 0)
wf->btnRev->value(!wf->btnRev->value());
wf->btnRev->do_callback();
}
substitute(s, i, endbracket, "");
}
// <HS:on|off|t>
static void pHS(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i+4, endbracket - i - 4);
if (sVal.length() > 0) {
// sVal = on|off|t [ON, OFF or Toggle]
if (sVal.compare(0,2,"on") == 0)
bHighSpeed = 1;
else if (sVal.compare(0,3,"off") == 0)
bHighSpeed = 0;
else if (sVal.compare(0,1,"t") == 0)
bHighSpeed = !bHighSpeed;
}
substitute(s, i, endbracket, "");
}
static void pLOCK(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i+6, endbracket - i - 6);
if (sVal.length() > 0) {
// sVal = on|off|t [ON, OFF or Toggle]
if (sVal.compare(0,2,"on") == 0)
wf->xmtlock->value(1);
else if (sVal.compare(0,3,"off") == 0)
wf->xmtlock->value(0);
else if (sVal.compare(0,1,"t") == 0)
wf->xmtlock->value(!wf->xmtlock->value());
wf->xmtlock->damage();
wf->xmtlock->do_callback();
}
substitute(s, i, endbracket, "");
}
static void doLOCK( std::string s){
std::string sVal = s.substr(7, s.length() - 8);
if (sVal.length() > 0) {
// sVal = on|off|t[oggle] [ON, OFF or Toggle]
if (sVal.compare(0,2,"on") == 0)
wf->xmtlock->value(1);
else if (sVal.compare(0,3,"off") == 0)
wf->xmtlock->value(0);
else if (sVal.compare(0,1,"t") == 0)
wf->xmtlock->value(!wf->xmtlock->value());
wf->xmtlock->damage();
wf->xmtlock->do_callback();
}
}
static void pRxQueLOCK(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doLOCK };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pTX_RSID(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i+8, endbracket - i - 8);
if (sVal.length() > 0) {
// sVal = on|off|t [ON, OFF or Toggle]
if (sVal.compare(0,2,"on") == 0)
btnTxRSID->value(1);
else if (sVal.compare(0,3,"off") == 0)
btnTxRSID->value(0);
else if (sVal.compare(0,1,"t") == 0)
btnTxRSID->value(!btnTxRSID->value());
btnTxRSID->do_callback();
}
substitute(s, i, endbracket, "");
}
static void doTXRSID(std::string s)
{
if (s.find("on") != std::string::npos) {
btnTxRSID->value(1);
btnTxRSID->do_callback();
}
else if (s.find("off") != std::string::npos) {
btnTxRSID->value(0);
btnTxRSID->do_callback();
}
else if (s.find("t") != std::string::npos) {
btnTxRSID->value(!btnTxRSID->value());
btnTxRSID->do_callback();
}
que_ok = true;
}
static void pRxQueTXRSID(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doTXRSID };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pRX_RSID(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i+8, endbracket - i - 8);
if (sVal.length() > 0) {
// sVal = on|off|t [ON, OFF or Toggle]
if (sVal.compare(0,2,"on") == 0)
btnRSID->value(1);
else if (sVal.compare(0,3,"off") == 0)
btnRSID->value(0);
else if (sVal.compare(0,1,"t") == 0)
btnRSID->value(!btnRSID->value());
btnRSID->do_callback();
}
substitute(s, i, endbracket, "");
}
static void pCSV(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i+5, endbracket - i - 5);
if (sVal.length() > 0) {
// sVal = on|off [ON, OFF]
if (sVal.compare(0,2,"on") == 0)
set_CSV(1);
else if (sVal.compare(0,3,"off") == 0)
set_CSV(0);
else if (sVal.compare(0,1,"t") == 0)
set_CSV(2);
}
substitute(s, i, endbracket, "");
}
#ifdef __WIN32__
static void pTALK(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i+6, endbracket - i - 6);
if (sVal.length() > 0) {
// sVal = on|off [ON, OFF]
if (sVal.compare(0,2,"on") == 0)
open_talker();
else if (sVal.compare(0,3,"off") == 0)
close_talker();
else if (sVal.compare(0,1,"t") == 0)
toggle_talker();
}
substitute(s, i, endbracket, "");
}
#endif
static void pSRCHUP(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
active_modem->searchUp();
if (progdefaults.WaterfallClickInsert)
wf->insert_text(true);
}
static void pSRCHDN(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
active_modem->searchDown();
if (progdefaults.WaterfallClickInsert)
wf->insert_text(true);
}
static void pGOHOME(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
if (active_modem == cw_modem)
active_modem->set_freq(progdefaults.CWsweetspot);
else if (active_modem == rtty_modem)
active_modem->set_freq(progdefaults.RTTYsweetspot);
else
active_modem->set_freq(progdefaults.PSKsweetspot);
}
static void doGOHOME(std::string s)
{
if (active_modem == cw_modem)
active_modem->set_freq(progdefaults.CWsweetspot);
else if (active_modem == rtty_modem)
active_modem->set_freq(progdefaults.RTTYsweetspot);
else
active_modem->set_freq(progdefaults.PSKsweetspot);
que_ok = true;
}
static void pTxQueGOHOME(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doGOHOME };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQueGOHOME(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doGOHOME };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pGOFREQ(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
int number;
std::string sGoFreq = s.substr(i+8, endbracket - i - 8);
if (sGoFreq.length() > 0) {
sscanf(sGoFreq.c_str(), "%d", &number);
if (number < progdefaults.LowFreqCutoff)
number = progdefaults.LowFreqCutoff;
if (number > progdefaults.HighFreqCutoff)
number = progdefaults.HighFreqCutoff;
active_modem->set_freq(number);
}
substitute(s, i, endbracket, "");
}
static void doGOFREQ(std::string s)
{
int number;
std::string sGoFreq = s.substr(9, s.length() - 10);
if (sGoFreq.length() > 0) {
sscanf(sGoFreq.c_str(), "%d", &number);
if (number < progdefaults.LowFreqCutoff)
number = progdefaults.LowFreqCutoff;
if (number > progdefaults.HighFreqCutoff)
number = progdefaults.HighFreqCutoff;
active_modem->set_freq(number);
}
que_ok = true;
}
static void pTxQueGOFREQ(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
s.replace(i, endbracket - i + 1, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doGOFREQ };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQueGOFREQ(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doGOFREQ };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pQRG(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string prefix = "\n";
prefix.append(s.substr(i+5, endbracket - i - 5));
if (prefix.length()) note_qrg ( false, prefix.c_str(), "\n" );
substitute(s, i, endbracket, "");
}
static void pQSYTO(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
do_qsy(true);
}
static void pQSYFM(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
substitute(s, i, endbracket, "");
do_qsy(false);
}
struct rfafmd { int rf; int af; std::string mdname;
rfafmd(int a, int b, std::string nm) { rf = a; af = b; mdname = nm;}
rfafmd(int a, int b) {rf = a; af = b; mdname = active_modem->get_mode_name();}
rfafmd(){rf = af = 0; mdname = active_modem->get_mode_name();}
};
static std::queue<rfafmd> fpairs;
static void pQSY(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string mdname = active_modem->get_mode_name();
int rf = 0;
int af = 0;
float rfd = 0;
std::string sGoFreq = s.substr(i+5, endbracket - i - 5);
// no frequency(s) specified
if (sGoFreq.length() == 0) {
substitute(s, i, endbracket, "");
return;
}
if (fpairs.empty()) {
std::string triad;
size_t pos;
while (!sGoFreq.empty()) {
pos = sGoFreq.find(";");
if (pos == std::string::npos) triad = sGoFreq;
else triad = sGoFreq.substr(0, pos);
sGoFreq.erase(0, triad.length()+1);
sscanf(triad.c_str(), "%f", &rfd);
if (rfd > 0) rf = (int)(1000*rfd);
if ((pos = triad.find(":")) != std::string::npos) {
triad.erase(0,pos+1);
if (triad.length())
sscanf(triad.c_str(), "%d", &af);
if (af < 0) af = 0;
if (af < progdefaults.LowFreqCutoff) af = progdefaults.LowFreqCutoff;
if (af > progdefaults.HighFreqCutoff) af = progdefaults.HighFreqCutoff;
} else af = active_modem->get_freq();
if ((pos = triad.find(":")) != std::string::npos) {
triad.erase(0, pos+1);
strtrim(triad);
fpairs.push(rfafmd(rf, af, triad));
} else
fpairs.push(rfafmd(rf,af, mdname));
}
}
struct rfafmd fpair;
fpair = fpairs.front();
rf = fpair.rf;
af = fpair.af;
if (fpair.mdname != mdname) {
for (int m = 0; m < NUM_MODES; m++) {
if (fpair.mdname == mode_info[m].sname) {
init_modem_sync(mode_info[m].mode);
break;
}
}
}
fpairs.pop();
if (rf && rf != wf->rfcarrier())
qsy(rf, af);
else
active_modem->set_freq(af);
substitute(s, i, endbracket, "");
}
static void doQSY(std::string s)
{
int rf = 0;
int audio = 0;
float rfd = 0;
std::string sGoFreq;
sGoFreq = s.substr(6, s.length() - 7);
// no frequency(s) specified
if (sGoFreq.length() == 0) {
que_ok = true;
return;
}
// rf first value
sscanf(sGoFreq.c_str(), "%f", &rfd);
if (rfd > 0)
rf = (int)(1000*rfd);
size_t pos;
if ((pos = sGoFreq.find(":")) != std::string::npos) {
// af second value
sGoFreq.erase(0, pos+1);
if (sGoFreq.length())
sscanf(sGoFreq.c_str(), "%d", &audio);
if (audio < 0) audio = 0;
if (audio < progdefaults.LowFreqCutoff)
audio = progdefaults.LowFreqCutoff;
if (audio > progdefaults.HighFreqCutoff)
audio = progdefaults.HighFreqCutoff;
}
if (rf && rf != wf->rfcarrier())
qsy(rf, audio);
else
active_modem->set_freq(audio);
que_ok = true;
}
static void pTxQueQSY(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doQSY };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
float wait_after_mode_change = 0.0;
static std::string sFILWID;
static void delayedFILWID(void *)
{
qso_opBW->value(sFILWID.c_str());
cb_qso_opBW();
wait_after_mode_change = 0.0;
}
static void pFILWID(std::string& s, size_t& i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sWidth = s.substr(i+8, endbracket - i - 8);
sFILWID = sWidth;
Fl::add_timeout(wait_after_mode_change, delayedFILWID);
substitute(s, i, endbracket, "");
}
static void doFILWID(std::string s)
{
std::string sWID = s.substr(9, s.length() - 10);
qso_opBW->value(sWID.c_str());
cb_qso_opBW();
que_ok = true;
}
static void pTxQueFILWID(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doFILWID };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQueFILWID(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doFILWID };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pRIGMODE(std::string& s, size_t& i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sMode = s.substr(i+9, endbracket - i - 9);
qso_opMODE->value(sMode.c_str());
cb_qso_opMODE();
substitute(s, i, endbracket, "");
if ((s.find("FILWID") != std::string::npos) ||
(s.find("RIGLO") != std::string::npos) ||
(s.find("RIGHI") != std::string::npos) )
wait_after_mode_change = progdefaults.mbw;
else
wait_after_mode_change = 0;
}
static void doRIGMODE(std::string s)
{
std::string sMode = s.substr(10, s.length() - 11);
qso_opMODE->value(sMode.c_str());
cb_qso_opMODE();
que_ok = true;
}
static void pTxQueRIGMODE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRIGMODE };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQueRIGMODE(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRIGMODE };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static std::string sRIGLO;
static void delayedRIGLO(void *)
{
qso_opBW2->value(sRIGLO.c_str());
cb_qso_opBW2();
wait_after_mode_change = 0.0;
}
static void pRIGLO(std::string& s, size_t& i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sLO = s.substr(i+7, endbracket - i - 7);
sRIGLO = sLO;
if (wait_after_mode_change)
Fl::add_timeout(wait_after_mode_change, delayedRIGLO);
else {
qso_opBW2->value(sLO.c_str());
cb_qso_opBW2();
}
substitute(s, i, endbracket, "");
}
static void doRIGLO(std::string s)
{
std::string sLO = s.substr(8, s.length() - 9);
qso_opBW2->value(sLO.c_str());
cb_qso_opBW2();
que_ok = true;
}
static void pTxQueRIGLO(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRIGLO };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQueRIGLO(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRIGLO };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static std::string sRIGHI;
static void delayedRIGHI(void *)
{
qso_opBW1->value(sRIGHI.c_str());
cb_qso_opBW1();
wait_after_mode_change = 0.0;
}
static void pRIGHI(std::string& s, size_t& i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sHI = s.substr(i+7, endbracket - i - 7);
sRIGHI = sHI;
if (wait_after_mode_change)
Fl::add_timeout(wait_after_mode_change, delayedRIGHI);
else {
qso_opBW1->value(sHI.c_str());
cb_qso_opBW1();
}
substitute(s, i, endbracket, "");
}
static void doRIGHI(std::string s)
{
std::string sHI = s.substr(8, s.length() - 9);
qso_opBW1->value(sHI.c_str());
cb_qso_opBW1();
que_ok = true;
}
static void pTxQueRIGHI(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRIGHI };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pRxQueRIGHI(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i, endbracket - i + 1), doRIGHI };
push_rxcmd(cmd);
substitute(s, i, endbracket, "");
}
static void pWX(std::string &s, size_t &i, size_t endbracket)
{
std::string wx;
getwx(wx);
s.replace(i, 4, wx);
}
// <WX:metar>
static void pWX2(std::string &s, size_t &i, size_t endbracket)
{
std::string wx;
getwx(wx, s.substr(i+4, endbracket - i - 4).c_str());
substitute(s, i, endbracket, wx);
}
void set_macro_env(void)
{
enum {
#ifndef __WOE32__
pSKEDH, FLDIGI_RX_IPC_KEY, FLDIGI_TX_IPC_KEY,
#endif
FLDIGI_XMLRPC_ADDRESS,
FLDIGI_XMLRPC_PORT,
FLDIGI_ARQ_ADDRESS,
FLDIGI_ARQ_PORT,
FLDIGI_VERSION_ENVVAR,
FLDIGI_PID,
FLDIGI_CONFIG_DIR,
FLDIGI_MY_CALL,
FLDIGI_MY_NAME,
FLDIGI_MY_LOCATOR,
FLDIGI_MODEM,
FLDIGI_MODEM_LONG_NAME,
FLDIGI_MODEM_ADIF_NAME,
FLDIGI_DIAL_FREQUENCY,
FLDIGI_AUDIO_FREQUENCY,
FLDIGI_FREQUENCY,
FLDIGI_MACRO_FILE,
FLDIGI_LOG_FILE,
FLDIGI_LOG_FREQUENCY,
FLDIGI_LOG_DATE,
FLDIGI_LOG_DATE_OFF,
FLDIGI_LOG_TIME_ON,
FLDIGI_LOG_TIME_OFF,
FLDIGI_LOG_CALL,
FLDIGI_LOG_NAME,
FLDIGI_LOG_RST_IN,
FLDIGI_LOG_RST_OUT,
FLDIGI_LOG_QTH,
FLDIGI_LOG_LOCATOR,
FLDIGI_LOG_NOTES,
FLDIGI_LOG_STATE,
FLDIGI_LOG_COUNTRY,
FLDIGI_LOG_COUNTY,
FLDIGI_LOG_SERNO_IN,
FLDIGI_LOG_SERNO_OUT,
FLDIGI_XCHG_IN,
FLDIGI_XCGH_OUT,
FLDIGI_CLASS_IN,
FLDIGI_ARRL_SECTION_IN,
FLDIGI_VE_PROV,
FLDIGI_AZ,
FLDIGI_LOGBOOK_CALL,
FLDIGI_LOGBOOK_NAME,
FLDIGI_LOGBOOK_DATE,
FLDIGI_LOGBOOK_TIME_ON,
FLDIGI_LOGBOOK_DATE_OFF,
FLDIGI_LOGBOOK_TIME_OFF,
FLDIGI_LOGBOOK_RST_IN,
FLDIGI_LOGBOOK_RST_OUT,
FLDIGI_LOGBOOK_FREQUENCY,
FLDIGI_LOGBOOK_MODE,
FLDIGI_LOGBOOK_STATE,
FLDIGI_LOGBOOK_VE_PROV,
FLDIGI_LOGBOOK_COUNTRY,
FLDIGI_LOGBOOK_SERNO_IN,
FLDIGI_LOGBOOK_SERNO_OUT,
FLDIGI_LOGBOOK_XCHG_IN,
FLDIGI_LOGBOOK_XCHG_OUT,
FLDIGI_LOGBOOK_CLASS_IN,
FLDIGI_LOGBOOK_SECTION_IN,
FLDIGI_LOGBOOK_QTH,
FLDIGI_LOGBOOK_LOCATOR,
FLDIGI_LOGBOOK_QSL_R,
FLDIGI_LOGBOOK_QSL_S,
FLDIGI_LOGBOOK_NOTES,
FLDIGI_LOGBOOK_TX_PWR,
FLDIGI_LOGBOOK_COUNTY,
FLDIGI_LOGBOOK_IOTA,
FLDIGI_LOGBOOK_DXCC,
FLDIGI_LOGBOOK_QSL_VIA,
FLDIGI_LOGBOOK_CONTINENT,
FLDIGI_LOGBOOK_CQZ,
FLDIGI_LOGBOOK_ITUZ,
FLDIGI_LOGBOOK_SS_SERNO,
FLDIGI_LOGBOOK_SS_PREC,
FLDIGI_LOGBOOK_SS_CHK,
FLDIGI_LOGBOOK_SS_SEC,
ENV_SIZE
};
struct {
const char* var;
const char* val;
} env[] = {
#ifndef __WOE32__
{ "pSKEDH", "" },
{ "FLDIGI_RX_IPC_KEY", "" },
{ "FLDIGI_TX_IPC_KEY", "" },
#endif
{ "FLDIGI_XMLRPC_ADDRESS", progdefaults.xmlrpc_address.c_str() },
{ "FLDIGI_XMLRPC_PORT", progdefaults.xmlrpc_port.c_str() },
{ "FLDIGI_ARQ_ADDRESS", progdefaults.arq_address.c_str() },
{ "FLDIGI_ARQ_PORT", progdefaults.arq_port.c_str() },
{ "FLDIGI_VERSION", PACKAGE_VERSION },
{ "FLDIGI_PID", "" },
{ "FLDIGI_CONFIG_DIR", HomeDir.c_str() },
{ "FLDIGI_MY_CALL", progdefaults.myCall.c_str() },
{ "FLDIGI_MY_NAME", progdefaults.myName.c_str() },
{ "FLDIGI_MY_LOCATOR", progdefaults.myLocator.c_str() },
{ "FLDIGI_MODEM", mode_info[active_modem->get_mode()].sname },
{ "FLDIGI_MODEM_LONG_NAME", mode_info[active_modem->get_mode()].name },
{ "FLDIGI_MODEM_ADIF_NAME", mode_info[active_modem->get_mode()].adif_name },
{ "FLDIGI_DIAL_FREQUENCY", "" },
{ "FLDIGI_AUDIO_FREQUENCY", "" },
{ "FLDIGI_FREQUENCY", "" },
// logging frame
{ "FLDIGI_MACRO_FILE", progStatus.LastMacroFile.c_str() },
{ "FLDIGI_LOG_FILE", progdefaults.logbookfilename.c_str() },
{ "FLDIGI_LOG_FREQUENCY", inpFreq->value() },
{ "FLDIGI_LOG_DATE", inpDate_log->value() },
{ "FLDIGI_LOG_DATE_OFF", inpDateOff_log->value() },
{ "FLDIGI_LOG_TIME_ON", inpTimeOn->value() },
{ "FLDIGI_LOG_TIME_OFF", inpTimeOff->value() },
{ "FLDIGI_LOG_CALL", inpCall->value() },
{ "FLDIGI_LOG_NAME", inpName->value() },
{ "FLDIGI_LOG_RST_IN", inpRstIn->value() },
{ "FLDIGI_LOG_RST_OUT", inpRstOut->value() },
{ "FLDIGI_LOG_QTH", inpQth->value() },
{ "FLDIGI_LOG_LOCATOR", inpLoc->value() },
{ "FLDIGI_LOG_NOTES", inpNotes->value() },
{ "FLDIGI_LOG_STATE", inpState->value() },
{ "FLDIGI_LOG_COUNTRY", cboCountry->value() },
{ "FLDIGI_LOG_COUNTY", inpCounty->value() },
{ "FLDIGI_LOG_SERNO_IN", inpSerNo->value() },
{ "FLDIGI_LOG_SERNO_OUT", outSerNo->value() },
{ "FLDIGI_XCHG_IN", inpXchgIn->value() },
{ "FLDIGI_XCHG_OUT", inpSend1->value() },
{ "FLDIGI_CLASS_IN", inpClass->value() },
{ "FLDIGI_ARRL_SECTION_IN", inpSection->value() },
{ "FLDIGI_VE_PROV", inpVEprov->value() },
{ "FLDIGI_AZ", inpAZ->value() },
{ "FLDIGI_LOGBOOK_CALL", inpCall_log->value() },
{ "FLDIGI_LOGBOOK_NAME", inpName_log->value () },
{ "FLDIGI_LOGBOOK_DATE", inpDate_log->value() },
{ "FLDIGI_LOGBOOK_TIME_ON", inpTimeOn_log->value() },
{ "FLDIGI_LOGBOOK_DATE_OFF", inpDateOff_log->value() },
{ "FLDIGI_LOGBOOK_TIME_OFF", inpTimeOff_log->value() },
{ "FLDIGI_LOGBOOK_RST_IN", inpRstR_log->value() },
{ "FLDIGI_LOGBOOK_RST_OUT", inpRstS_log->value() },
{ "FLDIGI_LOGBOOK_FREQUENCY", inpFreq_log->value() },
{ "FLDIGI_LOGBOOK_BAND", inpBand_log->value() },
{ "FLDIGI_LOGBOOK_MODE", inpMode_log->value() },
{ "FLDIGI_LOGBOOK_STATE", inpState_log->value() },
{ "FLDIGI_LOGBOOK_VE_PROV", inpVE_Prov_log->value() },
{ "FLDIGI_LOGBOOK_COUNTRY", inpCountry_log->value() },
{ "FLDIGI_LOGBOOK_SERNO_IN", inpSerNoIn_log->value() },
{ "FLDIGI_LOGBOOK_SERNO_OUT", inpSerNoOut_log->value() },
{ "FLDIGI_LOGBOOK_XCHG_IN", inpXchgIn_log->value() },
{ "FLDIGI_LOGBOOK_XCHG_OUT", inpMyXchg_log->value() },
{ "FLDIGI_LOGBOOK_CLASS_IN", inpClass_log->value() },
{ "FLDIGI_LOGBOOK_ARRL_SECT_IN", inpSection_log->value() },
{ "FLDIGI_LOGBOOK_QTH", inpQth_log->value() },
{ "FLDIGI_LOGBOOK_LOCATOR", inpLoc_log->value() },
{ "FLDIGI_LOGBOOK_QSL_R", inpQSLrcvddate_log->value() },
{ "FLDIGI_LOGBOOK_QSL_S", inpQSLsentdate_log->value() },
{ "FLDIGI_LOGBOOK_TX_PWR", inpTX_pwr_log->value() },
{ "FLDIGI_LOGBOOK_COUNTY", inpCNTY_log->value() },
{ "FLDIGI_LOGBOOK_IOTA", inpIOTA_log->value() },
{ "FLDIGI_LOGBOOK_DXCC", inpDXCC_log->value() },
{ "FLDIGI_LOGBOOK_QSL_VIA", inpQSL_VIA_log->value() },
{ "FLDIGI_LOGBOOK_CONTINENT", inpCONT_log->value() },
{ "FLDIGI_LOGBOOK_CQZ", inpCQZ_log->value() },
{ "FLDIGI_LOGBOOK_ITUZ", inpITUZ_log->value() },
{ "FLDIGI_LOGBOOK_SS_SERNO", inp_log_cwss_serno->value() },
{ "FLDIGI_LOGBOOK_SS_PREC", inp_log_cwss_prec->value() },
{ "FLDIGI_LOGBOOK_SS_CHK", inp_log_cwss_chk->value() },
{ "FLDIGI_LOGBOOK_SS_SEC", inp_log_cwss_sec->value() },
{ "FLDIGI_LOGBOOK_NOTES", inpNotes_log->value() }
};
#ifndef __WOE32__
// pSKEDH
static std::string pSKEDh = ScriptsDir;
pSKEDh.erase(pSKEDh.length()-1,1);
const char* p;
if ((p = getenv("pSKEDH")))
pSKEDh.append(":").append(p);
env[pSKEDH].val = pSKEDh.c_str();
// IPC keys
char key[2][8];
snprintf(key[0], sizeof(key[0]), "%d", progdefaults.rx_msgid);
env[FLDIGI_RX_IPC_KEY].val = key[0];
snprintf(key[1], sizeof(key[1]), "%d", progdefaults.tx_msgid);
env[FLDIGI_TX_IPC_KEY].val = key[1];
#endif
// pid
char pid[6];
snprintf(pid, sizeof(pid), "%d", getpid());
env[FLDIGI_PID].val = pid;
// frequencies
char dial_freq[20];
snprintf(dial_freq, sizeof(dial_freq), "%ld", (long)wf->rfcarrier());
env[FLDIGI_DIAL_FREQUENCY].val = dial_freq;
char audio_freq[6];
snprintf(audio_freq, sizeof(audio_freq), "%d", active_modem->get_freq());
env[FLDIGI_AUDIO_FREQUENCY].val = audio_freq;
char freq[20];
snprintf(freq, sizeof(freq), "%ld", (long)(wf->rfcarrier() + (wf->USB()
? active_modem->get_freq()
: -active_modem->get_freq())));
env[FLDIGI_FREQUENCY].val = freq;
// debugging vars
#if !defined(NDEBUG) && !defined(__WOE32__)
unsetenv("FLDIGI_NO_EXEC");
unsetenv("MALLOC_CHECK_");
unsetenv("MALLOC_PERTURB_");
#endif
std::string temp;
size_t pch;
for (size_t j = 0; j < sizeof(env) / sizeof (*env); j++) {
temp = env[j].val;
while ((pch = temp.find("\n")) != std::string::npos) temp[pch] = ';';
setenv(env[j].var, temp.c_str(), 1);
}
std::string path = getenv("PATH");
std::string mypath = ScriptsDir;
if (mypath[mypath.length()-1] == '/')
mypath.erase(mypath.length()-1, 1);
mypath.append(":");
path.insert(0,mypath);
setenv("PATH", path.c_str(), 1);
}
// this is only for the case where the user tries to nest <EXEC>...
// as in
// <EXEC> ... <EXEC> ... </EXEC></EXEC>
// which is not permitted
static void pEND_EXEC(std::string &s, size_t &i, size_t endbracket)
{
substitute(s, i, endbracket, "");
return;
}
#ifndef __MINGW32__
static void pEXEC(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
size_t start = s.find(">", i);
size_t end = s.find("</EXEC>", start);
if (start == std::string::npos ||
end == std::string::npos) {
i++;
return;
}
std::string execstr = s.substr(start+1, end-start-1);
within_exec = true;
MACROTEXT m;
execstr = m.expandMacro(execstr, true);
// execstr.insert(0,ScriptsDir);
within_exec = false;
int pfd[2];
if (pipe(pfd) == -1) {
LOG_PERROR("pipe");
return;
}
pid_t pid;
switch (pid = fork()) {
case -1:
LOG_PERROR("fork");
return;
case 0: // child
close(pfd[0]);
if (dup2(pfd[1], STDOUT_FILENO) != STDOUT_FILENO) {
LOG_PERROR("dup2");
exit(EXIT_FAILURE);
}
close(pfd[1]);
set_macro_env();
execl("/bin/sh", "sh", "-c", execstr.c_str(), (char *)NULL);
perror("execl");
exit(EXIT_FAILURE);
}
// parent
close(pfd[1]);
// give child process time to complete
MilliSleep(50);
FILE* fp = fdopen(pfd[0], "r");
if (!fp) {
LOG_PERROR("fdopen");
close(pfd[0]);
return;
}
s.erase(i, end - i + strlen("</EXEC>"));
char ln[BUFSIZ];
std::string lnbuff = "";
while (fgets(ln, sizeof(ln), fp)) {
lnbuff.append(ln);
}
// remove all trailing end-of-lines
while (lnbuff[lnbuff.length()-1] == '\n')
lnbuff.erase(lnbuff.length()-1,1);
if (!lnbuff.empty()) {
lnbuff = m.expandMacro(lnbuff, false);
s.insert(i, lnbuff);
i += lnbuff.length();
} else
i++;
fclose(fp);
close(pfd[0]);
}
#else // !__MINGW32__
static void pEXEC(std::string& s, size_t& i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
size_t start, end;
if ((start = s.find('>', i)) == std::string::npos ||
(end = s.rfind("</EXEC>")) == std::string::npos) {
i++;
return;
}
start++;
std::string execstr = s.substr(start, end-start);
within_exec = true;
MACROTEXT m;
execstr = m.expandMacro(execstr, true);
within_exec = false;
char* cmd = strdup(execstr.c_str());
STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
memset(&pi, 0, sizeof(pi));
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
LOG_ERROR("CreateProcess failed with error code %ld", GetLastError());
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
free(cmd);
s.erase(i, end + strlen("</EXEC>") - i);
}
#endif // !__MINGW32__
static void pEQSL(std::string& s, size_t& i, size_t endbracket)
{
if (within_exec || progdefaults.eqsl_when_logged) {
substitute(s, i, endbracket, "");
return;
}
size_t start = s.find(':', i);
std::string msg = "";
if (start != std::string::npos)
msg = s.substr(start + 1, endbracket-start-1);
makeEQSL(msg.c_str());
substitute(s, i, endbracket, "");
return;
}
static void MAPIT(int how)
{
float lat = 0, lon = 0;
std::string sCALL = inpCall->value();
std::string sLOC = inpLoc->value();
std::string url = "http://maps.google.com/maps?q=";
if (how > 1 && !lookup_country.empty()) {
url.append(lookup_addr1).append(",").append(lookup_addr2).append(",");
url.append(lookup_state).append(",").append(lookup_country);
} else {
if (how > 0 && (!lookup_latd.empty() && !lookup_lond.empty())) {
size_t p = std::string::npos;
if ((p = lookup_latd.find(',')) !=std::string::npos)
lookup_latd[p] = '.';
if ((p = lookup_lond.find(',')) !=std::string::npos)
lookup_lond[p] = '.';
url.append(lookup_latd).append(",");
url.append(lookup_lond);
} else {
if (sLOC.empty()) return;
if (sLOC.length() < 4) return;
if (sLOC.length() < 6) sLOC.append("aa");
for (size_t i = 0; i < 6; i++) sLOC[i] = toupper(sLOC[i]);
if (sLOC[0] -'A' > 17 || sLOC[4] - 'A' > 23 ||
sLOC[1] -'A' > 17 || sLOC[5] - 'A' > 23 ||
!isdigit(sLOC[2]) || !isdigit(sLOC[3])) return;
lon = -180.0 +
(sLOC[0] - 'A') * 20 +
(sLOC[2] - '0') * 2 +
(sLOC[4] - 'A' + 0.5) / 12;
lat = -90.0 +
(sLOC[1] - 'A') * 10 +
(sLOC[3] - '0') +
(sLOC[5] - 'A' + 0.5) / 24;
char sdata[20];
size_t p = std::string::npos;
snprintf(sdata, sizeof(sdata),"%10.6f", lat);
std::string temp = sdata;
if ((p = temp.find(',')) !=std::string::npos)
temp[p] = '.';
url.append(temp).append(",");
snprintf(sdata, sizeof(sdata),"%10.6f", lon);
temp = sdata;
if ((p = temp.find(',')) !=std::string::npos)
temp[p] = '.';
url.append(temp);
}
}
if (!sCALL.empty()) url.append("(").append(sCALL).append(")");
else url.append("(nocall)");
url.append("&t=p&z=10");
cb_mnuVisitURL(NULL, (void*)url.c_str());
// examples
// <MAPIT> URL: http://maps.google.com/maps?q=30 Paradisou str.,Marousi,,Greece(SV1GRB)&t=p&z=10
// <MAPIT:adr> URL: http://maps.google.com/maps?q=30 Paradisou str.,Marousi,,Greece(SV1GRB)&t=p&z=10
// <MAPIT:latlon> URL: http://maps.google.com/maps?q=38.020000,23.790000(SV1GRB)&t=p&z=10
// <MAPIT:loc> URL: http://maps.google.com/maps?q= 38.020832, 23.791666(SV1GRB)&t=p&z=10
}
static void pMAPIT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string sVal = s.substr(i + 7, endbracket - i - 7);
if (sVal.length() > 0) {
if (sVal.compare(0,3,"adr") == 0)
REQ(MAPIT,2);
else if (sVal.compare(0,6,"latlon") == 0)
REQ(MAPIT,1);
else if (sVal.compare(0,3,"loc") == 0)
REQ(MAPIT,0);
else
REQ(MAPIT,2);
} else
REQ(MAPIT,2);
s.erase(i, s.find('>', i) + 1 - i);
expand = false;
}
static void pSTOP(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
s.erase(i, s.find('>', i) + 1 - i);
expand = false;
}
static void pCONT(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
s.erase(i, s.find('>', i) + 1 - i);
expand = true;
}
//----------------------------------------------------------------------
// macro scheduling
//----------------------------------------------------------------------
static long sk_xdt, sk_xtm;
static void pLOCAL(std::string &s, size_t &i, size_t endbracket)
{
local_timed_exec = true;
substitute(s, i, endbracket, "");
}
static void pSKED(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec || progStatus.skip_sked_macro) {
substitute(s, i, endbracket, "");
return;
}
std::string data = s.substr(i+6, endbracket - i - 6);
size_t p = data.find(":");
if (p == std::string::npos) {
exec_date = (local_timed_exec ? ldate() : zdate());
exec_time = data;
if (exec_time.empty()) exec_time = (local_timed_exec ? ltime() : ztime());
} else {
exec_time = data.substr(0, p);
exec_date = data.substr(p+1);
}
if (exec_time.length() == 4)
exec_time.append("00");
sk_xdt = atol(exec_date.c_str());
sk_xtm = atol(exec_time.c_str());
timed_exec = true;
substitute(s, i, endbracket, "");
}
int timed_ptt = -1;
void do_timed_execute(void *)
{
long dt, tm;
dt = atol( local_timed_exec ? ldate() : zdate() );
tm = atol( local_timed_exec ? ltime() : ztime() );
if (dt >= sk_xdt && tm >= sk_xtm) {
show_clock(false);
if (timed_ptt != 1) {
push2talk->set(true);
timed_ptt = 1;
}
Qwait_time = 0;
start_tx();
que_ok = true;
btnMacroTimer->label(0);
btnMacroTimer->color(FL_BACKGROUND_COLOR);
btnMacroTimer->set_output();
sk_xdt = sk_xtm = 0;
} else {
show_clock(true);
if (timed_ptt != 0) {
push2talk->set(false);
timed_ptt = 0;
}
Fl::repeat_timeout(1.0, do_timed_execute);
}
}
static void doSKED(std::string s)
{
size_t p = s.find(":");
if (p == std::string::npos) {
exec_date = (local_timed_exec ? ldate() : zdate());
exec_time = s;
if (exec_time.empty())
exec_time = (local_timed_exec ? ltime() : ztime());
} else {
exec_time = s.substr(0, p);
exec_date = s.substr(p+1);
}
if (exec_time.length() == 4)
exec_time.append("00");
std::string txt;
txt.assign("Next scheduled transmission at ").
append(exec_time.substr(0,2)).append(":").
append(exec_time.substr(2,2)).append(":").
append(exec_time.substr(4,2)).
append(", on ").
append(exec_date.substr(0,4)).append("/").
append(exec_date.substr(4,2)).append("/").
append(exec_date.substr(6,2)).append("\n");
btnMacroTimer->label("SKED");
btnMacroTimer->color(fl_rgb_color(240, 240, 0));
btnMacroTimer->redraw_label();
ReceiveText->addstr(txt, FTextBase::CTRL);
Qwait_time = 9999;
sk_xdt = atol(exec_date.c_str());
sk_xtm = atol(exec_time.c_str());
Fl::add_timeout(0.0, do_timed_execute);
}
static void pTxQueSKED(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
struct CMDS cmd = { s.substr(i + 7, endbracket - i - 7), doSKED };
push_txcmd(cmd);
substitute(s, i, endbracket, "^!");
}
static void pUNTIL(std::string &s, size_t &i, size_t endbracket)
{
if (within_exec) {
substitute(s, i, endbracket, "");
return;
}
std::string data = s.substr(i+7, endbracket - i - 7);
size_t p = data.find(":");
if (p == std::string::npos) {
until_date = (local_timed_exec ? ldate() : zdate());
until_time = data;
} else {
until_time = data.substr(0, p);
until_date = data.substr(p+1);
}
if (until_time.empty()) {
substitute(s, i, endbracket, "");
return;
}
if (until_time.length() == 4) until_time.append("00");
run_until = true;
substitute(s, i, endbracket, "");
}
void queue_reset()
{
if (!Tx_cmds.empty()) {
Fl::remove_timeout(post_queue_execute);
Fl::remove_timeout(queue_execute_after_rx);
Fl::remove_timeout(doneIDLE);
Fl::remove_timeout(doneWAIT);
while (!Tx_cmds.empty()) Tx_cmds.pop();
}
while (!Rx_cmds.empty()) Rx_cmds.pop();
while (!mf_stack.empty()) mf_stack.pop();
Qwait_time = 0;
Qidle_time = 0;
que_ok = true;
run_until = false;
tx_queue_done = true;
progStatus.skip_sked_macro = false;
}
// execute an in-line macro tag
// occurs during the Tx state
void Tx_queue_execute()
{
if (Tx_cmds.empty()) {
Qwait_time = 0;
Qidle_time = 0;
tx_queue_done = true;
return;
}
CMDS cmd = Tx_cmds.front();
Tx_cmds.pop();
LOG_INFO("%s", cmd.cmd.c_str());
REQ(postQueue, cmd.cmd);
cmd.fp(cmd.cmd);
return;
}
bool queue_must_rx()
{
// return true if current command is not a member 'must_rx'
static std::string must_rx = "<!MOD<!WAI<!GOH<!QSY<!GOF<!RIG<!FIL<!PUS<!POP";//<!DIG<!FRE";
if (Tx_cmds.empty()) return false;
CMDS cmd = Tx_cmds.front();
return (must_rx.find(cmd.cmd.substr(0,5)) != std::string::npos);
}
// execute all post Tx macros in the Rx_cmds queu
// occurs immediately after the ^r execution
// AND after TX_STATE returns to Rx
// ^r is the control string substitute for the <RX> macro tag
int time_out = 400;
void Rx_queue_execution(void *)
{
if (rx_tune_on) {
Fl::repeat_timeout( .050, Rx_queue_execution );
return;
}
if (!Tx_cmds.empty()) {
Fl::remove_timeout(post_queue_execute);
Fl::remove_timeout(queue_execute_after_rx);
Fl::remove_timeout(doneIDLE);
Fl::remove_timeout(doneWAIT);
while (!Tx_cmds.empty()) Tx_cmds.pop();
}
if (trx_state != STATE_RX) {
if (time_out-- == 0) {
while (!Rx_cmds.empty()) Rx_cmds.pop();
LOG_ERROR("%s", "failed");
time_out = 200;
return;
}
Fl::repeat_timeout( .050, Rx_queue_execution );
return;
}
LOG_INFO("action delayed by %4.2f seconds", (400 - time_out)*.050);
time_out = 400;
CMDS cmd;
while (!Rx_cmds.empty()) {
cmd = Rx_cmds.front();
Rx_cmds.pop();
LOG_INFO("%s", cmd.cmd.c_str());
REQ(postQueue, cmd.cmd);
cmd.cmd.erase(0,2);
cmd.cmd.insert(0,"<!");
cmd.fp(cmd.cmd);
Fl::awake();
if (rx_tune_on) {
Fl::repeat_timeout( .050, Rx_queue_execution );
return;
}
if (macro_rx_wait) return;
}
return;
}
void Rx_queue_execute()
{
if (Rx_cmds.empty()) return;
Fl::add_timeout(0, Rx_queue_execution);
}
void rx_que_continue(void *)
{
macro_rx_wait = false;
Rx_queue_execute();
}
struct MTAGS { const char *mTAG; void (*fp)(std::string &, size_t&, size_t );};
static const MTAGS mtags[] = {
{"<CPS_FILE:", pCPS_FILE},
{"<CPS_N:", pCPS_N},
{"<CPS_STRING:",pCPS_STRING},
{"<CPS_TEST", pCPS_TEST},
{"<WAV_FILE:", pWAV_FILE},
{"<WAV_N:", pWAV_N},
{"<WAV_STRING:",pWAV_STRING},
{"<WAV_TEST", pWAV_TEST},
{"<COMMENT:", pCOMMENT},
{"<#", pCOMMENT},
{"<CALL>", pCALL},
{"<FREQ>", pFREQ},
{"<BAND>", pBAND},
{"<LOC>", pLOC},
{"<MODE>", pMODE},
{"<NAME>", pNAME},
{"<QTH>", pQTH},
{"<RST>", pRST},
{"<ST>", pST},
{"<PR>", pPR},
{"<MYCALL>", pMYCALL},
{"<MYLOC>", pMYLOC},
{"<MYNAME>", pMYNAME},
{"<MYQTH>", pMYQTH},
{"<MYRST>", pMYRST},
{"<MYCLASS>", pMYCLASS},
{"<MYSECTION>", pMYSECTION},
{"<MYSTATE>", pMYSTATE},
{"<MYST>", pMYST},
{"<MYCOUNTY>", pMYCOUNTY},
{"<MYCNTY>", pMYCNTY},
{"<ANTENNA>", pANTENNA},
{"<QSOTIME>", pQSOTIME},
{"<QSONBR>", pQSONBR},
{"<NXTNBR>", pNXTNBR},
{"<INFO1>", pINFO1},
{"<INFO2>", pINFO2},
{"<LDT>", pLDT},
{"<LDT:", pLDT},
{"<ILDT", pILDT},
{"<ZDT>", pZDT},
{"<ZDT:", pZDT},
{"<IZDT", pIZDT},
{"<LT", pLT},
{"<ZT", pZT},
{"<LD>", pLD},
{"<LD:", pLD},
{"<ZD>", pZD},
{"<ZD:", pZD},
{"<ID>", p_ID},
{"<TEXT>", pTEXT},
{"<VIDEO:", pVIDEO},
{"<CWID>", pCWID},
{"<VER>", pVER},
{"<RIGCAT:", pRIGCAT},
{"<FLRIG:", pFLRIG},
{"<CNTR>", pCNTR},
{"<DECR>", pDECR},
{"<INCR>", pINCR},
{"<X1>", pXOUT},
{"<XIN>", pXIN},
{"<XOUT>", pXOUT},
{"<FDCLASS>", pFD_CLASS},
{"<FDSECT>", pFD_SECTION},
{"<CLASS>", pCLASS},
{"<SECTION>", pSECTION},
{"<XBEG>", pXBEG},
{"<XEND>", pXEND},
{"<SAVEXCHG>", pSAVEXCHG},
{"<SERNO>", pSERNO},
{"<LASTNO>", pLASTNO},
{"<LOG", pLOG},
{"<LNW", pLNW},
{"<CLRLOG>", pCLRLOG},
{"<EQSL", pEQSL},
{"<TIMER:", pTIMER},
{"<AFTER:", pAFTER},
{"<IDLE:", pIDLE},
{"<TUNE:", pTUNE},
{"<WAIT:", pWAIT},
{"<NRSID:", pNRSID},
{"<MODEM>", pMODEM_COMPSKED},
{"<MODEM:", pMODEM},
{"<EXEC>", pEXEC},
{"</EXEC>", pEND_EXEC},
{"<STOP>", pSTOP},
{"<CONT>", pCONT},
{"<PAUSE>", pPAUSE},
{"<GET>", pGET},
{"<CLRRX>", pCLRRX},
{"<CLRTX>", pCLRTX},
{"<CLRQSO>", pCLRQSO},
{"<FOCUS>", pFOCUS},
{"<QSY+:", pQSYPLUS},
{"<FILE:", pFILE},
{"<WPM:", pWPM},
{"<RISE:", pRISETIME},
{"<PRE:", pPRE},
{"<POST:", pPOST},
{"<AFC:", pAFC},
{"<LOCK:", pLOCK},
{"<REV:", pREV},
{"<HS:", pHS},
{"<RXRSID:", pRX_RSID},
{"<TXRSID:", pTX_RSID},
{"<DTMF:", pDTMF},
{"<SRCHUP>", pSRCHUP},
{"<SRCHDN>", pSRCHDN},
{"<GOHOME>", pGOHOME},
{"<GOFREQ:", pGOFREQ},
{"<QRG:", pQRG},
{"<QSY:", pQSY},
{"<QSYTO>", pQSYTO},
{"<QSYFM>", pQSYFM},
{"<RIGMODE:", pRIGMODE},
{"<FILWID:", pFILWID},
{"<RIGHI:", pRIGHI},
{"<RIGLO:", pRIGLO},
{"<MAPIT:", pMAPIT},
{"<MAPIT>", pMAPIT},
{"<REPEAT>", pREPEAT},
{"<SKED:", pSKED},
{"<UNTIL:", pUNTIL},
{"<LOCAL>", pLOCAL},
{"<TXATTEN:", pTXATTEN},
{"<POP>", pPOP},
{"<PUSH", pPUSH},
{"<DIGI>", pDIGI},
{"<ALERT:", pALERT},
{"<AUDIO:", pAUDIO},
{"<BUFFERED>", pBUFFERED},
#ifdef __WIN32__
{"<TALK:", pTALK},
#endif
{"<CSV:", pCSV},
{"<WX>", pWX},
{"<WX:", pWX2},
{"<IMAGE:", pTxQueIMAGE},
{"<AVATAR>", pTxQueAVATAR},
// Tx Delayed action
{"<!WPM:", pTxQueWPM},
{"<!RISE:", pTxQueRISETIME},
{"<!PRE:", pTxQuePRE},
{"<!POST:", pTxQuePOST},
{"<!GOHOME>", pTxQueGOHOME},
{"<!GOFREQ:", pTxQueGOFREQ},
{"<!QSY:", pTxQueQSY},
{"<!IDLE:", pTxQueIDLE},
{"<!WAIT:", pTxQueWAIT},
{"<!SKED:", pTxQueSKED},
{"<!MODEM:", pTxQueMODEM},
{"<!RIGMODE:", pTxQueRIGMODE},
{"<!FILWID:", pTxQueFILWID},
{"<!RIGHI:", pTxQueRIGHI},
{"<!RIGLO:", pTxQueRIGLO},
{"<!TXATTEN:", pTxQueTXATTEN},
{"<!RIGCAT:", pTxQueRIGCAT},
{"<!FLRIG:", pTxQueFLRIG},
{"<!PUSH", pTxQuePUSH},
{"<!POP>", pTxQuePOP},
{"<!DIGI>", pTxDIGI},
{"<!FREQ>", pTxFREQ},
{"<!TUNE:", pTxQueTUNE},
// Rx After action
{"<@MODEM:", pRxQueMODEM},
{"<@RIGCAT:", pRxQueRIGCAT},
{"<@FLRIG:", pRxQueFLRIG},
{"<@GOFREQ:", pRxQueGOFREQ},
{"<@GOHOME>", pRxQueGOHOME},
{"<@RIGMODE:", pRxQueRIGMODE},
{"<@FILWID:", pRxQueFILWID},
{"<@RIGHI:", pRxQueRIGHI},
{"<@RIGLO:", pRxQueRIGLO},
{"<@TXRSID:", pRxQueTXRSID},
{"<@LOCK:", pRxQueLOCK},
{"<@WAIT:", pRxQueWAIT},
{"<@TUNE:", pRxQueTUNE},
{"<@PUSH", pRxQuePUSH},
{"<@POP>", pRxQuePOP},
{"<RX>", pRX},
{"<TX>", pTX},
{"<TX/RX>", pTXRX},
{0, 0}
};
int MACROTEXT::loadMacros(const std::string& filename)
{
std::string mLine;
std::string mName;
std::string mDef;
int mNumber = 0;
size_t crlf, idx;
char szLine[4096];
bool convert = false;
std::ifstream mFile(filename.c_str());
if (!mFile) {
create_new_macros();
} else {
mFile.getline(szLine, 4095);
mLine = szLine;
if (mLine.find("//fldigi macro definition file") != 0) {
mFile.close();
return -2;
}
if (mLine.find("extended") == std::string::npos) {
convert = true;
changed = true;
}
// clear all of the macros
for (int i = 0; i < MAXMACROS; i++) {
name[i] = "";
text[i] = "";
}
while (!mFile.eof()) {
mFile.getline(szLine,4095);
mLine = szLine;
if (!mLine.length())
continue;
if (mLine.find("//") == 0) // skip over all comment lines
continue;
if (mLine.find("/$") == 0) {
idx = mLine.find(" ", 3);
if (idx != std::string::npos) {
mNumber = atoi(&mLine[3]);
if (mNumber < 0 || mNumber > (MAXMACROS - 1))
break;
if (convert && mNumber > 9) mNumber += 2;
name[mNumber] = mLine.substr(idx+1);
}
continue;
}
crlf = mLine.rfind("\\n");
if (crlf != std::string::npos) {
mLine.erase(crlf);
mLine.append("\n");
}
text[mNumber] = text[mNumber] + mLine;
}
mFile.close();
}
return 0;
}
void MACROTEXT::loadDefault()
{
int erc;
std::string Filename = MacrosDir;
Filename.append("macros.mdf");
LOG_INFO("macro file name: %s", progStatus.LastMacroFile.c_str());
if (progdefaults.UseLastMacro == true) {
if (progStatus.LastMacroFile.find("/") != std::string::npos ||
progStatus.LastMacroFile.find("\\") != std::string::npos)
Filename.assign(progStatus.LastMacroFile);
else
Filename.assign(MacrosDir).append(progStatus.LastMacroFile);
}
LOG_INFO("loading: %s", Filename.c_str());
progStatus.LastMacroFile = Filename;
if ((erc = loadMacros(Filename)) != 0)
#ifndef __WOE32__
LOG_ERROR("Error #%d loading %s\n", erc, Filename.c_str());
#else
;
#endif
showMacroSet();
if (progdefaults.DisplayMacroFilename) {
LOG_INFO("%s", progStatus.LastMacroFile.c_str());
std::string Macroset;
Macroset.assign("\
\n================================================\n\
Read macros from: ").append(progStatus.LastMacroFile).append("\
\n================================================\n");
#ifdef __WOE32__
size_t p = std::string::npos;
while ( (p = Macroset.find("/")) != std::string::npos)
Macroset[p] = '\\';
#endif
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->addstr(Macroset);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->addstr(Macroset);
else
ReceiveText->addstr(Macroset);
}
}
void MACROTEXT::openMacroFile()
{
std::string deffilename = MacrosDir;
if (progStatus.LastMacroFile.find("/") != std::string::npos ||
progStatus.LastMacroFile.find("\\") != std::string::npos)
deffilename.assign(progStatus.LastMacroFile);
else
deffilename.append(progStatus.LastMacroFile);
const char *p = FSEL::select(
_("Open macro file"),
_("Fldigi macro definition file\t*.{mdf}"),
deffilename.c_str());
if (p && *p) {
loadMacros(p);
progStatus.LastMacroFile = p;
showMacroSet();
if (progdefaults.DisplayMacroFilename) {
std::string Macroset;
Macroset.assign("\nLoaded macros: ").append(progStatus.LastMacroFile).append("\n");
if (active_modem->get_mode() == MODE_IFKP)
ifkp_rx_text->addstr(Macroset);
if (active_modem->get_mode() == MODE_FSQ)
fsq_rx_text->addstr(Macroset);
else
ReceiveText->addstr(Macroset);
}
}
}
void MACROTEXT::writeMacroFile()
{
std::string deffilename = MacrosDir;
if (progStatus.LastMacroFile.find("/") != std::string::npos ||
progStatus.LastMacroFile.find("\\") != std::string::npos)
deffilename.assign(progStatus.LastMacroFile);
else
deffilename.append(progStatus.LastMacroFile);
saveMacros(deffilename.c_str());
}
void MACROTEXT::saveMacroFile()
{
std::string deffilename = MacrosDir;
if (progStatus.LastMacroFile.find("/") != std::string::npos ||
progStatus.LastMacroFile.find("\\") != std::string::npos)
deffilename.assign(progStatus.LastMacroFile);
else
deffilename.append(progStatus.LastMacroFile);
const char *p = FSEL::saveas(
_("Save macro file"),
_("Fldigi macro definition file\t*.{mdf}"),
deffilename.c_str());
if (!p) return;
if (!*p) return;
std::string sp = p;
if (sp.empty()) return;
if (sp.rfind(".mdf") == std::string::npos) sp.append(".mdf");
saveMacros(sp.c_str());
progStatus.LastMacroFile = sp;
}
void MACROTEXT::savecurrentMACROS(std::string &s, size_t &i, size_t endbracket)
{
writeMacroFile();
substitute(s, i, endbracket, "");
}
void MACROTEXT::loadnewMACROS(std::string &s, size_t &i, size_t endbracket)
{
std::string fname = s.substr(i+8, endbracket - i - 8);
if (fname.length() > 0) {
loadMacros(fname);
progStatus.LastMacroFile = fl_filename_name(fname.c_str());
}
substitute(s, i, endbracket, "");
showMacroSet();
}
std::string MACROTEXT::expandMacro(std::string &s, bool recurse = false)
{
size_t idx = 0;
expand = true;
buffered = false;
if (!recurse || rx_only) {
TransmitON = false;
ToggleTXRX = false;
}
expanded = s;
const MTAGS *pMtags;
xbeg = xend = -1;
save_xchg = false;
progStatus.repeatMacro = -1;
text2repeat.clear();
idleTime = 0;
waitTime = 0;
// tuneTime = 0;
while ((idx = expanded.find('<', idx)) != std::string::npos) {
size_t endbracket = expanded.find('>',idx);
if (ufind(expanded, "<SAVE", idx) == idx) {
savecurrentMACROS(expanded, idx, endbracket);
idx++;
continue;
}
if (ufind(expanded, "<MACROS:",idx) == idx) {
loadnewMACROS(expanded, idx, endbracket);
idx++;
continue;
}
// we must handle this specially
if (ufind(expanded, "<CONT>", idx) == idx)
pCONT(expanded, idx, endbracket);
if (!expand) {
idx++;
continue;
}
pMtags = mtags;
while (pMtags->mTAG != 0) {
if (ufind(expanded, pMtags->mTAG, idx) == idx) {
pMtags->fp(expanded,idx, endbracket);
break;
}
pMtags++;
}
if (pMtags->mTAG == 0)
idx++;
}
if (GET) {
size_t pos1 = ufind(expanded, "$NAME");
size_t pos2 = ufind(expanded, "$QTH");
size_t pos3 = ufind(expanded, "$LOC");
if (pos1 != std::string::npos && pos2 != std::string::npos) {
pos1 += 5;
inpName->value(expanded.substr(pos1, pos2 - pos1).c_str());
}
if (pos2 != std::string::npos) {
pos2 += 4;
inpQth->value(expanded.substr(pos2, pos3 - pos2).c_str());
}
if (pos3 != std::string::npos) {
pos3 += 4;
inpLoc->value(expanded.substr(pos3).c_str());
}
GET = false;
return "";
}
if (xbeg != std::string::npos && xend != std::string::npos && xend > xbeg) {
qso_exchange = expanded.substr(xbeg, xend - xbeg);
} else if (save_xchg) {
qso_exchange = expanded;
save_xchg = false;
}
// force "^r" to be last tag in the expanded std::string
if ((idx = expanded.find("^r")) != std::string::npos) {
expanded.erase(idx, 2);
expanded.append("^r");
}
if (!TransmitON && !Rx_cmds.empty())
Fl::add_timeout(0, rx_que_continue);
return expanded;
}
void idleTimer(void *)
{
macro_idle_on = false;
}
static void finishWait(void *)
{
if (rx_only) {
TransmitON = false;
return;
}
if ( TransmitON ) {
active_modem->set_stopflag(false);
if (macro_idle_on && idleTime > 0)
Fl::add_timeout(idleTime, idleTimer);
start_tx();
TransmitON = false;
}
}
static void set_button(Fl_Button* button, bool value)
{
button->value(value);
button->do_callback();
}
void MACROTEXT::timed_execute()
{
queue_reset();
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->clear();
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->clear();
else
TransmitText->clear();
if (!rx_only) {
text2send = expandMacro(exec_string);
progStatus.skip_sked_macro = true;
if (active_modem->get_mode() == MODE_IFKP)
ifkp_tx_text->add_text(text2send);
else if (active_modem->get_mode() == MODE_FSQ)
fsq_tx_text->add_text( text2send );
else
add_text(text2send);
exec_string.clear();
active_modem->set_stopflag(false);
start_tx();
}
}
void MACROTEXT::execute(int n)
{
guard_lock exec(&exec_mutex);
std::string dd, dt;
dd = (local_timed_exec ? ldate() : zdate());
dt = (local_timed_exec ? ltime() : ldate());
if (run_until && dd >= until_date && dt >= until_time) {
stopMacroTimer();
queue_reset();
return;
}
mNbr = n;
text2send = expandMacro(text[n]);
if (timed_exec && !progStatus.skip_sked_macro) {
progStatus.repeatMacro = -1;
exec_string = text[n];
startTimedExecute(name[n]);
timed_exec = false;
return;
}
trx_mode mode = active_modem->get_mode();
if (!rx_only) {
if (progStatus.repeatMacro == -1) {
if (mode == MODE_IFKP)
ifkp_tx_text->add_text( text2send );
else if (mode == MODE_FSQ)
fsq_tx_text->add_text( text2send );
else
add_text( text2send );
} else {
size_t p = std::string::npos;
text2send = text[n];
while ((p = text2send.find('<')) != std::string::npos)
text2send[p] = '[';
while ((p = text2send.find('>')) != std::string::npos)
text2send[p] = ']';
if (mode == MODE_IFKP)
ifkp_tx_text->add_text( text2send );
else if (mode == MODE_FSQ)
fsq_tx_text->add_text( text2send );
else
add_text( text2send );
}
}
bool keep_tx = !text2send.empty();
text2send.clear();
if (tune_on) {
if (tune_timeout > 0) {
Fl::add_timeout(tune_timeout, end_tune, (void *)keep_tx);
tune_timeout = 0;
}
return;
}
if (ToggleTXRX) {
text2send.clear();
if (!wf->xmtrcv->value()) {
REQ(set_button, wf->xmtrcv, true);
if (macro_idle_on && idleTime > 0)
Fl::add_timeout(idleTime, idleTimer);
} else
REQ(set_button, wf->xmtrcv, false);
return;
}
if (useWait && waitTime > 0) {
Fl::add_timeout(waitTime, finishWait);
useWait = false;
return;
}
if ( TransmitON ) {
if (macro_idle_on && idleTime > 0)
Fl::add_timeout(idleTime, idleTimer);
active_modem->set_stopflag(false);
start_tx();
TransmitON = false;
}
}
void MACROTEXT::repeat(int n)
{
expandMacro(text[n]);
progStatus.skip_sked_macro = true;
LOG_WARN("%s",text2repeat.c_str());
macro_idle_on = false;
if (idleTime) progStatus.repeatIdleTime = idleTime;
}
MACROTEXT::MACROTEXT()
{
changed = false;
char szname[5];
for (int i = 0; i < MAXMACROS; i++) {
snprintf(szname, sizeof(szname), "F-%d", i+1);
name[i] = szname;//"";
text[i] = "";
}
}
static std::string mtext =
"//fldigi macro definition file extended\n\
// This file defines the macro structure(s) for the digital modem program, fldigi\n\
// It also serves as a basis for any macros that are written by the user\n\
//\n\
// The top line of this file should always be the first line in every macro \n\
// definition file (.mdf) for the fldigi program to recognize it as such.\n\
//\n\
";
void MACROTEXT::saveMacros(const std::string& fname) {
std::string work;
std::string output;
char temp[200];
output.assign(mtext);
for (int i = 0; i < MAXMACROS; i++) {
snprintf(temp, sizeof(temp), "\n//\n// Macro # %d\n/$ %d %s\n",
i+1, i, macros.name[i].c_str());
output.append(temp);
work = macros.text[i];
size_t pos;
pos = work.find('\n');
while (pos != std::string::npos) {
work.insert(pos, "\\n");
pos = work.find('\n', pos + 3);
}
output.append(work).append("\n");
}
UTF8_writefile(fname.c_str(), output);
changed = false;
}
| 133,852
|
C++
|
.cxx
| 4,804
| 25.176728
| 108
| 0.622119
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,171
|
charsetlist.cxx
|
w1hkj_fldigi/src/misc/charsetlist.cxx
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include "config.h"
#include "charsetlist.h"
#include "tiniconv.h"
const struct charset_info charset_list[] = {
{ "ASCII", TINICONV_CHARSET_ASCII },
{ "CP1250", TINICONV_CHARSET_CP1250 },
{ "CP1251", TINICONV_CHARSET_CP1251 },
{ "CP1252", TINICONV_CHARSET_CP1252 },
{ "CP1253", TINICONV_CHARSET_CP1253 },
{ "CP1254", TINICONV_CHARSET_CP1254 },
{ "CP1255", TINICONV_CHARSET_CP1255 },
{ "CP1256", TINICONV_CHARSET_CP1256 },
{ "CP1257", TINICONV_CHARSET_CP1257 },
{ "CP1258", TINICONV_CHARSET_CP1258 },
{ "CP936", TINICONV_CHARSET_CP936 },
{ "GB2312", TINICONV_CHARSET_GB2312 },
{ "GBK", TINICONV_CHARSET_GBK },
{ "ISO-2022-JP", TINICONV_CHARSET_ISO_2022_JP },
{ "ISO-8859-1", TINICONV_CHARSET_ISO_8859_1 },
{ "ISO-8859-2", TINICONV_CHARSET_ISO_8859_2 },
{ "ISO-8859-3", TINICONV_CHARSET_ISO_8859_3 },
{ "ISO-8859-4", TINICONV_CHARSET_ISO_8859_4 },
{ "ISO-8859-5", TINICONV_CHARSET_ISO_8859_5 },
{ "ISO-8859-6", TINICONV_CHARSET_ISO_8859_6 },
{ "ISO-8859-7", TINICONV_CHARSET_ISO_8859_7 },
{ "ISO-8859-8", TINICONV_CHARSET_ISO_8859_8 },
{ "ISO-8859-9", TINICONV_CHARSET_ISO_8859_9 },
{ "ISO-8859-10", TINICONV_CHARSET_ISO_8859_10 },
{ "ISO-8859-11", TINICONV_CHARSET_ISO_8859_11 },
{ "ISO-8859-13", TINICONV_CHARSET_ISO_8859_13 },
{ "ISO-8859-14", TINICONV_CHARSET_ISO_8859_14 },
{ "ISO-8859-15", TINICONV_CHARSET_ISO_8859_15 },
{ "ISO-8859-16", TINICONV_CHARSET_ISO_8859_16 },
{ "CP866", TINICONV_CHARSET_CP866 },
{ "KOI8-R", TINICONV_CHARSET_KOI8_R },
{ "KOI8-RU", TINICONV_CHARSET_KOI8_RU },
{ "KOI8-U", TINICONV_CHARSET_KOI8_U },
{ "MACCYRILLIC", TINICONV_CHARSET_MACCYRILLIC },
{ "UCS-2", TINICONV_CHARSET_UCS_2 },
{ "UTF-7", TINICONV_CHARSET_UTF_7 },
{ "UTF-8", TINICONV_CHARSET_UTF_8 },
{ "CHINESE", TINICONV_CHARSET_CHINESE },
{ "BIG5", TINICONV_CHARSET_BIG5 },
};
const unsigned int number_of_charsets = sizeof(charset_list)/sizeof(struct charset_info);
| 2,792
|
C++
|
.cxx
| 64
| 41.953125
| 89
| 0.658223
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,172
|
outputencoder.cxx
|
w1hkj_fldigi/src/misc/outputencoder.cxx
|
// ----------------------------------------------------------------------------
// outputencoder.cxx -- output charset conversion
//
// Copyright (C) 2012
// Andrej Lajovic, S57LN
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <cstring>
#include <iostream>
#include <string>
#include <tiniconv.h>
#include <outputencoder.h>
#include "config.h"
#include "debug.h"
/*
OutputEncoder accepts UTF-8 strings at input, converts them to the
selected encoding and outputs them one character at a time.
*/
/*
Constructor. Look up tiniconv.h for the list of possible values of
charset_in.
*/
OutputEncoder::OutputEncoder(const int charset_out, unsigned int buffer_size)
{
this->buffer_size = buffer_size;
buffer = new unsigned char[buffer_size];
encoding_ptr = buffer;
pop_ptr = buffer;
set_output_encoding(charset_out);
}
/*
Destructor.
*/
OutputEncoder::~OutputEncoder(void)
{
delete[] buffer;
}
/*
Set output encoding. Look up tiniconv.h for the list of possible values of
charset_in.
*/
void OutputEncoder::set_output_encoding(const int charset_out)
{
tiniconv_init(TINICONV_CHARSET_UTF_8, charset_out, TINICONV_OPTION_IGNORE_OUT_ILSEQ, &ctx);
}
/*
Push input data into the encoder.
*/
void OutputEncoder::push(std::string s)
{
int available = buffer_size - (encoding_ptr - buffer);
int consumed_in;
int consumed_out;
int status = tiniconv_convert(&ctx,
(unsigned char*)s.data(), s.length(), &consumed_in,
encoding_ptr, available, &consumed_out);
if (status != TINICONV_CONVERT_OK) {
LOG_ERROR("Error %s",
status == TINICONV_CONVERT_IN_TOO_SMALL ? "input too small" :
status == TINICONV_CONVERT_OUT_TOO_SMALL ? "output too small" :
status == TINICONV_CONVERT_IN_ILSEQ ? "input illegal sequence" :
status == TINICONV_CONVERT_OUT_ILSEQ ? "output illegal sequence" :
"unknown error");
return;
}
encoding_ptr += consumed_out;
if (consumed_in < (int)s.length())
{
// All input data was not consumed, possibly because the
// output buffer was too small. Try to vacuum the buffer,
// i.e., remove the data that was already pop()ed.
memmove(buffer, pop_ptr, buffer + buffer_size - pop_ptr);
encoding_ptr -= (pop_ptr - buffer);
pop_ptr = buffer;
// Now try again; fingers crossed. We don't check for
// success anymore, because there is nothing that we can do
// if the buffer is still too small.
int available = buffer_size - (encoding_ptr - buffer);
tiniconv_convert(&ctx,
(unsigned char*)s.data()+consumed_in, s.length()-consumed_in, &consumed_in,
encoding_ptr, available, &consumed_out);
encoding_ptr += consumed_out;
}
}
/*
Pop a single character of the encoded data.
Returns -1 in case there is no data available.
*/
const unsigned int OutputEncoder::pop(void)
{
if (pop_ptr == encoding_ptr)
return(-1);
unsigned int c = *pop_ptr++;
// Note that by only advancing pop_ptr, we leave stale data at the
// beginning of the buffer, so sooner or later it will clutter up.
// If there is no data left to send, both encoding_ptr and pop_ptr
// can be safely reset to the beginning of the buffer; we handle
// this trivial case here. More thorough vacuuming will be performed
// in push() if the need arises.
if (pop_ptr == encoding_ptr)
pop_ptr = encoding_ptr = buffer;
return(c);
}
// return next character to be pop'd, do not advance pointers;
const unsigned int OutputEncoder::peek(void)
{
if (pop_ptr == encoding_ptr) return -1;
return *pop_ptr;
}
| 4,167
|
C++
|
.cxx
| 123
| 31.902439
| 92
| 0.704229
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,173
|
dxcc.cxx
|
w1hkj_fldigi/src/misc/dxcc.cxx
|
// ----------------------------------------------------------------------------
// dxcc.cxx
//
// Copyright (C) 2008-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <fstream>
#include <sstream>
#include <string>
#include <list>
#include <map>
#include <algorithm>
#include <FL/filename.H>
#include "fileselect.h"
#include "gettext.h"
#include "dxcc.h"
#include "debug.h"
#include "configuration.h"
#include "confdialog.h"
#include "main.h"
#if HAVE_STD_HASH
# include <unordered_map>
using std::unordered_map;
typedef std::unordered_map<std::string, dxcc*> dxcc_map_t;
typedef std::unordered_map<std::string, unsigned char> qsl_map_t;
#elif HAVE_STD_TR1_HASH
# include <tr1/unordered_map>
using std::tr1::unordered_map;
typedef std::tr1::unordered_map<std::string, dxcc*> dxcc_map_t;
typedef std::tr1::unordered_map<std::string, unsigned char> qsl_map_t;
#else
# error "No std::hash or std::tr1::hash support"
#endif
dxcc::dxcc(const char* cn, int cq, int itu, const char* ct, float lat, float lon, float tz)
: country(cn), cq_zone(cq), itu_zone(itu), latitude(lat), longitude(lon), gmt_offset(tz)
{
if (*ct) {
continent[0] = ct[0];
continent[1] = ct[1];
}
continent[2] = '\0';
}
typedef std::vector<dxcc*> dxcc_list_t;
static dxcc_map_t* cmap = 0;
static dxcc_list_t* clist = 0;
static std::vector<std::string>* cnames = 0;
static std::list<std::string> lnames;
std::string cbolist;
static void add_prefix(std::string& prefix, dxcc* entry);
extern std::string s_ctydat;
// comparison, not case sensitive.
static bool compare_nocase (const std::string& first, const std::string& second)
{
unsigned int i=0;
while ( (i<first.length()) && (i<second.length()) )
{
if (tolower(first[i]) < tolower(second[i])) return true;
else if (tolower(first[i]) > tolower(second[i])) return false;
++i;
}
return ( first.length() < second.length() );
}
bool dxcc_internal_data()
{
std::string tempfname = HomeDir;
tempfname.append("/temp/ctydat.txt");
std::ofstream out(tempfname.c_str());
if (!out) {
LOG_INFO("Could not write temp file %s", tempfname.c_str());
return false;
}
out << s_ctydat;
out.close();
std::ifstream in(tempfname.c_str());
if (!in) {
LOG_INFO("Could not read temp file %s", tempfname.c_str());
return false;
}
LOG_INFO("Using internal cty.dat data");
cmap = new dxcc_map_t;
cnames = new std::vector<std::string>;
// this MUST be greater than the actual number of dcxx entities or
// the Windows gcc string library will move all of the strings and
// destroy the integrity of the cmap c_str() pointer to the country
// string in cnames
cnames->reserve(500); // approximate number of dxcc entities
clist = new dxcc_list_t;
clist->reserve(500);
dxcc* entry;
std::string record;
unsigned nrec = 0;
while (getline(in, record, ';')) {
std::istringstream is(record);
entry = new dxcc;
nrec++;
// read country name
cnames->resize(cnames->size() + 1);
clist->push_back(entry);
getline(is, cnames->back(), ':');
entry->country = cnames->back().c_str();
lnames.push_back(entry->country);
// cq zone
(is >> entry->cq_zone).ignore();
// itu zone
(is >> entry->itu_zone).ignore();
// continent
(is >> std::ws).get(entry->continent, 3).ignore();
// latitude
(is >> entry->latitude).ignore();
// longitude
(is >> entry->longitude).ignore();
// gmt offset
(is >> entry->gmt_offset).ignore(256, '\n');
// prefixes and exceptions
int c;
std::string prefix;
while ((c = is.peek()) == ' ' || c == '\n') {
is >> std::ws;
while (getline(is, prefix, ',')) {
add_prefix(prefix, entry);
if ((c = is.peek()) == '\n')
break;
}
}
if (cnames->back() == "United States") {
dxcc *usa_entry = new dxcc(
"USA",
entry->cq_zone,
entry->itu_zone,
entry->continent,
entry->latitude,
entry->longitude,
entry->gmt_offset );
nrec++;
cnames->resize(cnames->size() + 1);
clist->push_back(usa_entry);
lnames.push_back("USA");
}
in >> std::ws;
}
lnames.sort(compare_nocase);
cbolist.clear();
std::list<std::string>::iterator p = lnames.begin();
while (p != lnames.end()) {
cbolist.append(*p);
p++;
if (p != lnames.end()) cbolist.append("|");
}
std::stringstream info;
info << "\nLoaded " << cmap->size() << " prefixes for " << nrec
<< " countries from internal cty.dat\n"
<< "You should download the latest from http://www.country-files.com";
LOG_INFO("%s", info.str().c_str());
remove(tempfname.c_str());
return true;
}
bool dxcc_open(const char* filename)
{
if (cmap) {
LOG_INFO("cty.dat already loaded");
return true;
}
std::ifstream in(filename);
if (!in) {
LOG_INFO("Could not read contest country file \"%s\"", filename);
return dxcc_internal_data();
}
cmap = new dxcc_map_t;
cnames = new std::vector<std::string>;
// this MUST be greater than the actual number of dcxx entities or
// the Windows gcc string library will move all of the strings and
// destroy the integrity of the cmap c_str() pointer to the country
// string in cnames
cnames->reserve(500); // approximate number of dxcc entities
clist = new dxcc_list_t;
clist->reserve(500);
dxcc* entry;
std::string record;
unsigned nrec = 0;
while (getline(in, record, ';')) {
std::istringstream is(record);
entry = new dxcc;
nrec++;
// read country name
cnames->resize(cnames->size() + 1);
clist->push_back(entry);
getline(is, cnames->back(), ':');
entry->country = cnames->back().c_str();
lnames.push_back(entry->country);
// cq zone
(is >> entry->cq_zone).ignore();
// itu zone
(is >> entry->itu_zone).ignore();
// continent
(is >> std::ws).get(entry->continent, 3).ignore();
// latitude
(is >> entry->latitude).ignore();
// longitude
(is >> entry->longitude).ignore();
// gmt offset
(is >> entry->gmt_offset).ignore(256, '\n');
// prefixes and exceptions
int c;
std::string prefix;
while ((c = is.peek()) == ' ' || c == '\r' || c == '\n') {
is >> std::ws;
while (getline(is, prefix, ',')) {
add_prefix(prefix, entry);
if ((c = is.peek()) == '\r' || c == '\n')
break;
}
}
if (cnames->back() == "United States") {
dxcc *usa_entry = new dxcc(
"USA",
entry->cq_zone,
entry->itu_zone,
entry->continent,
entry->latitude,
entry->longitude,
entry->gmt_offset );
nrec++;
cnames->resize(cnames->size() + 1);
clist->push_back(usa_entry);
lnames.push_back("USA");
}
in >> std::ws;
}
lnames.sort(compare_nocase);
cbolist.clear();
std::list<std::string>::iterator p = lnames.begin();
while (p != lnames.end()) {
cbolist.append(*p);
p++;
if (p != lnames.end()) cbolist.append("|");
}
std::stringstream info;
info << "Loaded " << cmap->size() << " prefixes for " << nrec << " countries";
LOG_VERBOSE("%s", info.str().c_str());
return true;
}
bool dxcc_is_open(void)
{
return cmap;
}
void dxcc_close(void)
{
if (!cmap)
return;
delete cnames;
cnames = 0;
std::map<dxcc*, bool> rm;
for (dxcc_map_t::iterator i = cmap->begin(); i != cmap->end(); ++i)
if (rm.insert(std::make_pair(i->second, true)).second)
delete i->second;
delete cmap;
cmap = 0;
delete clist;
clist = 0;
}
const std::vector<dxcc*>* dxcc_entity_list(void)
{
return clist;
}
const dxcc* dxcc_lookup(const char* callsign)
{
if (!cmap || !callsign || !*callsign)
return NULL;
std::string sstr;
sstr.resize(strlen(callsign) + 1);
transform(callsign, callsign + sstr.length() - 1, sstr.begin() + 1, static_cast<int (*)(int)>(toupper));
// first look for a full callsign (prefixed with '=')
sstr[0] = '=';
dxcc_map_t::const_iterator entry = cmap->find(sstr);
if (entry != cmap->end()) {
entry->second->print();
return entry->second;
}
// erase the '=' and do a longest prefix search
sstr.erase(0, 1);
size_t len = sstr.length();
// accomodate special case for KG4... calls
// all two letter suffix KG4 calls are Guantanamo
// all others are US non Guantanamo
if (sstr.find("KG4") != std::string::npos) {
if (len == 4 || len == 6) {
sstr = "K";
len = 1;
}
}
do {
sstr.resize(len--);
if ((entry = cmap->find(sstr)) != cmap->end()) {
entry->second->print();
return entry->second;
}
} while (len);
return NULL;
}
static void add_prefix(std::string& prefix, dxcc* entry)
{
std::string::size_type i = prefix.find_first_of("([<{");
if (likely(i == std::string::npos)) {
(*cmap)[prefix] = entry;
return;
}
std::string::size_type j = i, first = i;
do {
entry = new struct dxcc(*entry);
switch (prefix[i++]) { // increment i past opening bracket
case '(':
if ((j = prefix.find(')', i)) == std::string::npos) {
delete entry;
return;
}
prefix[j] = '\0';
entry->cq_zone = atoi(prefix.data() + i);
break;
case '[':
if ((j = prefix.find(']', i)) == std::string::npos) {
delete entry;
return;
}
prefix[j] = '\0';
entry->itu_zone = atoi(prefix.data() + i);
break;
case '<':
if ((j = prefix.find('/', i)) == std::string::npos) {
delete entry;
return;
}
prefix[j] = '\0';
entry->latitude = atof(prefix.data() + i);
if ((j = prefix.find('>', j)) == std::string::npos) {
delete entry;
return;
}
prefix[j] = '\0';
entry->longitude = atof(prefix.data() + i);
break;
case '{':
if ((j = prefix.find('}', i)) == std::string::npos) {
delete entry;
return;
}
memcpy(entry->continent, prefix.data() + i, 2);
break;
}
} while ((i = prefix.find_first_of("([<{", j)) != std::string::npos);
prefix.erase(first);
(*cmap)[prefix] = entry;
}
static qsl_map_t* qsl_calls;
static unsigned char qsl_open_;
const char* qsl_names[] = { "LoTW", "eQSL" };
bool qsl_open(const char* filename, qsl_t qsl_type)
{
std::ifstream in(filename);
if (!in)
return false;
if (!qsl_calls)
qsl_calls = new qsl_map_t;
size_t n = qsl_calls->size();
std::string::size_type p;
std::string s;
s.reserve(32);
while (getline(in, s)) {
if ((p = s.rfind('\r')) != std::string::npos)
s.erase(p);
(*qsl_calls)[s] |= (1 << qsl_type);
}
std::stringstream info;
info << "Added " << qsl_calls->size() - n
<< " " << qsl_names[qsl_type]
<< " callsigns from \"" << filename << "\"";
LOG_VERBOSE("%s", info.str().c_str());
qsl_open_ |= (1 << qsl_type);
return true;
}
unsigned char qsl_is_open(void)
{
return qsl_open_;
}
void qsl_close(void)
{
delete qsl_calls;
qsl_calls = 0;
qsl_open_ = 0;
}
unsigned char qsl_lookup(const char* callsign)
{
if (qsl_calls == 0)
return 0;
std::string str;
str.resize(strlen(callsign));
transform(callsign, callsign + str.length(), str.begin(), static_cast<int (*)(int)>(toupper));
qsl_map_t::const_iterator i = qsl_calls->find(str);
return i == qsl_calls->end() ? 0 : i->second;
}
void reload_cty_dat()
{
dxcc_close();
dxcc_open(std::string(progdefaults.cty_dat_pathname).append("cty.dat").c_str());
qsl_close();
qsl_open(std::string(progdefaults.cty_dat_pathname).append("lotw1.txt").c_str(), QSL_LOTW);
if (!qsl_open(std::string(progdefaults.cty_dat_pathname).append("eqsl.txt").c_str(), QSL_EQSL))
qsl_open(std::string(progdefaults.cty_dat_pathname).append("AGMemberList.txt").c_str(), QSL_EQSL);
}
void default_cty_dat_pathname()
{
progdefaults.cty_dat_pathname = HomeDir;
txt_cty_dat_pathname->value(progdefaults.cty_dat_pathname.c_str());
}
void select_cty_dat_pathname()
{
std::string deffilename = progdefaults.cty_dat_pathname;
const char *p = FSEL::select(_("Locate cty.dat folder"), _("cty.dat\t*"), deffilename.c_str());
if (p) {
std::string nupath = p;
size_t ptr;
//crappy win32 again
ptr = nupath.find("\\");
while (ptr != std::string::npos) {
nupath[ptr] = '/';
ptr = nupath.find("\\");
}
size_t endslash = nupath.rfind("/");
if ((endslash != std::string::npos) && (endslash != (nupath.length()-1)))
nupath.erase(endslash + 1);
progdefaults.cty_dat_pathname = nupath;
progdefaults.changed = true;
txt_cty_dat_pathname->value(nupath.c_str());
}
}
| 12,826
|
C++
|
.cxx
| 453
| 25.717439
| 105
| 0.640667
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,174
|
coordinate.cxx
|
w1hkj_fldigi/src/misc/coordinate.cxx
|
// ----------------------------------------------------------------------------
// coordinate.cxx -- Handling of longitude and latitude.
//
// Copyright (C) 2012
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdexcept>
#include <iomanip>
#include <sstream>
#include "config.h"
#include "coordinate.h"
#include "locator.h"
void CoordinateT::Check(void) const
{
if( m_is_lon ) {
if( ( m_angle >= -180.0 ) && ( m_angle <= 180.0 ) ) return ;
} else {
if( ( m_angle >= -90.0 ) && ( m_angle <= 90.0 ) ) return ;
}
std::stringstream strm ;
strm << "Invalid m_angle=" << m_angle << " m_is_lon=" << m_is_lon ;
throw std::runtime_error(strm.str());
}
CoordinateT::CoordinateT( double degrees, bool is_lon )
: m_angle( fmod(degrees, 360.0 ) ), m_is_lon(is_lon)
{
if( m_angle > 180.0 ) m_angle -= 360.0 ;
Check();
};
// Longitude East and Latitude North are positive.
void CoordinateT::Init( char direction, double angle_degrees )
{
m_angle = angle_degrees ;
switch( direction )
{
case 'W':
case 'w':
m_angle = -m_angle ;
case 'E':
case 'e':
if( ( angle_degrees < -180 ) || ( angle_degrees > 180 ) )
throw std::runtime_error("Invalid longitude degree");
m_is_lon = true ;
break ;
case 'S':
case 's':
m_angle = -m_angle ;
case 'N':
case 'n':
if( ( angle_degrees < -90 ) || ( angle_degrees > 90 ) )
throw std::runtime_error("Invalid latitude degree");
m_is_lon = false ;
break ;
default:
throw std::runtime_error("Invalid direction");
}
Check();
}
CoordinateT::CoordinateT( char direction, double angle_degrees ) {
Init( direction, angle_degrees );
}
CoordinateT::CoordinateT( char direction, int degree, int minute, int second )
{
// std::cout << "ctor d=" << direction << " " << degree << " " << minute << " " << second << "\n";
if( ( degree < 0 ) || ( degree > 180 ) )
throw std::runtime_error("Invalid degree");
if( ( minute < 0 ) || ( minute >= 60 ) )
throw std::runtime_error("Invalid minute");
if( ( second < 0 ) || ( second >= 60 ) )
throw std::runtime_error("Invalid second");
double angle_degrees = (double)degree + (double)minute / 60.0 + (double)second / 3600.0 ;
Init( direction, angle_degrees );
}
// Specific for reading from the file of navtex or wmo stations.
// Navtex: "57 06 N"
// Wmo : "69-36N", "013-27E", "009-25E" ou floating-point degrees: "12.34 E".
// Station Latitude or Latitude :DD-MM-SSH where DD is degrees, MM is minutes, SS is seconds
// and H is N for northern hemisphere or S for southern hemisphere or
// E for eastern hemisphere or W for western hemisphere.
// The seconds value is omitted for those stations where the seconds value is unknown.
std::istream & operator>>( std::istream & istrm, CoordinateT & ref )
{
if( ! istrm ) return istrm ;
std::stringstream sstrm ;
char direction ;
while( true ) {
// istrm >> direction ;
direction = (char)istrm.get();
if( ! istrm ) return istrm ;
switch( direction ) {
case 'e':
case 'E':
case 'w':
case 'W':
case 's':
case 'S':
case 'n':
case 'N':
break;
case '0' ... '9' :
case '.' :
case '-' :
case '+' :
case ' ' :
case '\t' :
sstrm << direction ;
continue;
default:
istrm.setstate(std::ios::eofbit);
return istrm ;
}
break;
}
// TODO: Check that the direction is what we expect.
std::string tmpstr = sstrm.str();
// std::cout << "READ:" << tmpstr << ":" << direction << "\n";
const char * tmpPtr = tmpstr.c_str();
int i_degree, i_minute, i_second ;
if( ( 3 == sscanf( tmpPtr, "%d-%d-%d", &i_degree, &i_minute, &i_second ) )
|| ( 3 == sscanf( tmpPtr, "%d %d %d", &i_degree, &i_minute, &i_second ) ) ) {
ref = CoordinateT( direction, i_degree, i_minute, i_second );
return istrm;
}
if( ( 2 == sscanf( tmpPtr, "%d-%d", &i_degree, &i_minute ) )
|| ( 2 == sscanf( tmpPtr, "%d %d", &i_degree, &i_minute ) ) ) {
ref = CoordinateT( direction, i_degree, i_minute, 0 );
return istrm;
}
double d_degree ;
if( 1 == sscanf( tmpPtr, "%lf", &d_degree ) ) {
ref = CoordinateT( direction, d_degree );
return istrm;
}
istrm.setstate(std::ios::eofbit);
return istrm ;
}
std::ostream & operator<<( std::ostream & ostrm, const CoordinateT & ref )
{
bool sign = ref.m_angle > 0 ;
double ang = sign ? ref.m_angle : -ref.m_angle;
ostrm << std::setfill('0') << std::setw( ref.m_is_lon ? 3 : 2 ) << (int)ang << "°"
<< std::setfill('0') << std::setw(2) << ( (int)( 0.5 + ang * 60.0 ) % 60 ) << "'"
<< std::setfill('0') << std::setw(2) << (int)fmod( ang * 3600.0, 60 ) << "''"
<< " ";
ostrm << ( ref.m_is_lon ? sign ? 'E' : 'W' : sign ? 'N' : 'S' );
return ostrm;
}
CoordinateT::Pair::Pair( const CoordinateT & coo1, const CoordinateT & coo2 )
: m_lon( coo1.is_lon() ? coo1 : coo2 )
, m_lat( coo2.is_lon() ? coo1 : coo2 )
{
if( ! ( coo1.is_lon() ^ coo2.is_lon() ) )
{
throw std::runtime_error("Internal inconsistency");
}
}
CoordinateT::Pair::Pair( double lon, double lat )
: m_lon( CoordinateT( lon, true ) )
, m_lat( CoordinateT( lat, false ) ) {}
CoordinateT::Pair::Pair( const std::string & locator )
{
double lon, lat ;
int res = QRB::locator2longlat( &lon, &lat, locator.c_str() );
if( res != QRB::QRB_OK ) {
throw std::runtime_error("Cannot decode Maidenhead locator:" + locator );
};
m_lon = CoordinateT( lon, true );
m_lat = CoordinateT( lat, false );
}
double CoordinateT::Pair::distance( const Pair & a ) const
{
double dist, azimuth ;
int res = QRB::qrb(
longitude().angle(), latitude().angle(),
a.longitude().angle(), a.latitude().angle(),
&dist, &azimuth );
if( res != QRB::QRB_OK) {
std::stringstream sstrm ;
sstrm << "Bad qrb result:" << *this << " <-> " << a ;
throw std::runtime_error(sstrm.str());
}
return dist ;
}
std::string CoordinateT::Pair::locator(void) const
{
char buf[64];
int ret = QRB::longlat2locator(
longitude().angle(),
latitude().angle(),
buf,
3 );
if( ret == QRB::QRB_OK ) {
return buf ;
}
return std::string();
}
std::ostream & operator<<( std::ostream & ostrm, const CoordinateT::Pair & ref )
{
ostrm << ref.latitude() << "/" << ref.longitude();
return ostrm;
}
std::istream & operator>>( std::istream & istrm, CoordinateT::Pair & ref )
{
istrm >> ref.latitude() >> ref.longitude();
return istrm;
}
| 7,077
|
C++
|
.cxx
| 224
| 29.290179
| 99
| 0.618384
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,175
|
icons.cxx
|
w1hkj_fldigi/src/misc/icons.cxx
|
// ----------------------------------------------------------------------------
// icons.cxx
//
// Copyright (C) 2008
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include "icons.h"
#include <FL/Fl.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Widget.H>
#include <FL/Fl_Group.H>
#if USE_IMAGE_LABELS
# include <map>
# include <cassert>
# include <cstring>
# include <FL/Fl_Multi_Label.H>
# include <FL/Fl_Image.H>
# include <FL/Fl_Pixmap.H>
#endif
namespace icons {
#if USE_IMAGE_LABELS
typedef std::map<Fl_Multi_Label*, Fl_Image**> imap_t;
static imap_t* imap = 0;
#endif
#define FL_EMPTY_LABEL FL_FREE_LABELTYPE
static void draw_empty(const Fl_Label*, int, int, int, int, Fl_Align) { }
static void measure_empty(const Fl_Label*, int& w, int& h) { w = h = 0; }
// The following functions create image+text menu item labels.
// You've had too much FLTK if you already know how to do that.
// Return a multi_label pointer, cast to a string, for `text' and
// `pixmap'. This goes into the label pointer of a widget or menu
// item. The text label is copied if we are using multi labels. You must
// call set_icon_label on the widget or menu item before its draw()
// function is called for the first time.
//
// A NULL pixmap means that the caller wants an empty, transparent, icon.
const char* make_icon_label(const char* text, const char** pixmap)
{
#if USE_IMAGE_LABELS
static imap_t* imap_ = 0;
if (unlikely(!imap_)) {
imap = imap_ = new imap_t;
Fl::set_labeltype(FL_EMPTY_LABEL, draw_empty, measure_empty);
}
// Create a multi label and associate it with an Fl_Image* array
Fl_Multi_Label* mlabel = new Fl_Multi_Label;
Fl_Image** images = new Fl_Image*[2];
images[0] = new Fl_Pixmap(pixmap ? pixmap : clear_row_icon);
images[1] = 0; // we create this on demand
// set_icon_label_ will set mlabel->labela later
mlabel->typea = _FL_IMAGE_LABEL;
if (!text)
text = "";
size_t len = strlen(text);
char* s = new char[len + 2];
s[0] = ' ';
memcpy(s + 1, text, len + 1);
mlabel->labelb = s;
mlabel->typeb = FL_NORMAL_LABEL;
(*imap)[mlabel] = images;
return (const char*)mlabel;
#else
return text;
#endif
}
#if USE_IMAGE_LABELS
// Find the item's label, which should be something that was returned by
// make_icon_label, and set the active or inactive image.
template <typename T>
void set_icon_label_(T* item)
{
imap_t::iterator j = imap->find((Fl_Multi_Label*)(item->label()));
if (j == imap->end())
return;
Fl_Multi_Label* mlabel = j->first;
Fl_Image** images = j->second;
unsigned char i = !item->active();
if (!images[i]) { // create inactive version of other image
images[i] = images[!i]->copy();
images[i]->inactive();
}
if (mlabel->typea == _FL_IMAGE_LABEL)
mlabel->labela = (const char*)images[i];
else
mlabel->labelb = (const char*)images[i];
item->image(images[i]);
mlabel->label(item);
item->labeltype(_FL_MULTI_LABEL);
}
#endif
void set_icon_label(Fl_Menu_Item* item)
{
#if USE_IMAGE_LABELS
set_icon_label_(item);
#else
// this isn't needed but it simplifies fldigi's UI setup code
if (item->labeltype() == _FL_MULTI_LABEL)
item->labeltype(FL_NORMAL_LABEL);
#endif
}
void set_icon_label(Fl_Widget* w)
{
#if USE_IMAGE_LABELS
set_icon_label_(w);
w->image(0);
#else
if (w->labeltype() == _FL_MULTI_LABEL)
w->labeltype(FL_NORMAL_LABEL);
#endif
}
void toggle_icon_labels(void)
{
#if USE_IMAGE_LABELS
for (imap_t::iterator i = imap->begin(); i != imap->end(); ++i) {
// swap sublabels
const char* l = i->first->labela;
i->first->labela = i->first->labelb;
i->first->labelb = l;
if (i->first->typea == _FL_IMAGE_LABEL) {
i->first->typea = FL_NORMAL_LABEL;
i->first->typeb = FL_EMPTY_LABEL;
i->first->labela++;
}
else {
i->first->typea = _FL_IMAGE_LABEL;
i->first->typeb = FL_NORMAL_LABEL;
i->first->labelb--;
}
}
#endif
}
template <typename T>
const char* get_icon_label_text_(T* item)
{
#if USE_IMAGE_LABELS
if (item->labeltype() == _FL_MULTI_LABEL) {
imap_t::iterator i = imap->find((Fl_Multi_Label*)(item->label()));
if (i == imap->end())
return 0;
if (i->first->typeb == FL_NORMAL_LABEL)
return i->first->labelb + 1;
else // disabled icons
return i->first->labela;
}
else
#endif
return item->label();
}
const char* get_icon_label_text(Fl_Menu_Item* item)
{
return get_icon_label_text_(item);
}
const char* get_icon_label_text(Fl_Widget* w)
{
return get_icon_label_text_(w);
}
template <typename T>
void free_icon_label_(T* item)
{
#if USE_IMAGE_LABELS
if (item->labeltype() == FL_NORMAL_LABEL) {
delete [] item->label();
item->label(0);
return;
}
imap_t::iterator i = imap->find((Fl_Multi_Label*)item->label());
if (i == imap->end())
return;
item->label(0);
// delete the images
delete i->second[0];
delete i->second[1];
delete [] i->second;
// delete the multi label
delete [] ((i->first->typeb == FL_NORMAL_LABEL) ? i->first->labelb : i->first->labela-1);
delete i->first;
imap->erase(i);
#endif
}
void free_icon_label(Fl_Menu_Item* item) { free_icon_label_(item); }
void free_icon_label(Fl_Widget* w) { free_icon_label_(w); }
template <typename T>
void set_active_(T* t, bool v) {
if (v)
t->activate();
else
t->deactivate();
if (t->labeltype() == _FL_MULTI_LABEL)
set_icon_label(t);
}
void set_active(Fl_Menu_Item* item, bool v) { set_active_(item, v); }
void set_active(Fl_Widget* w, bool v) { set_active_(w, v); }
static Fl_Image* msg_icon;
void set_message_icon(const char** pixmap)
{
if (msg_icon && msg_icon->data() == pixmap)
return;
delete msg_icon;
Fl_Widget* msg = fl_message_icon();
msg->label("");
msg->align(FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE);
msg->color(msg->parent()->color());
msg->box(FL_NO_BOX);
msg->image(msg_icon = new Fl_Pixmap(pixmap));
}
} // icons
| 6,562
|
C++
|
.cxx
| 222
| 27.657658
| 90
| 0.66783
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,176
|
pixmaps_tango.cxx
|
w1hkj_fldigi/src/misc/pixmaps_tango.cxx
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
// This file contains pixmap versions of icons from the Tango Icon Library
// (version 0.8.90) at http://tango.freedesktop.org/Tango_Icon_Library
// which was released into the Public Domain. This file was prepared by
// Kamal Mostafa <kamal@whence.com>, and is likewise released into the
// Public Domain.
// These #define's map the (new) Tango icon names (named after their source
// files) to the pixmap identifier names used throughout the fldigi source:
#define tango_x_office_address_book address_book_icon
#define tango_applications_system applications_system_icon
#define tango_internet_group_chat chat_icon
#define tango_dialog_information dialog_information_icon
#define tango_edit_clear edit_clear_icon
#define tango_edit_copy edit_copy_icon
#define tango_edit_cut edit_cut_icon
#define tango_edit_paste edit_paste_icon
#define tango_edit_select_all edit_select_all_icon
#define tango_edit_undo edit_undo_icon
#define tango_emblem_system emblems_system_icon
#define tango_application_x_executable executable_icon
#define tango_document_open file_open_icon
#define tango_folder_open folder_open_icon
#define tango_help_browser help_browser_icon
#define tango_image_x_generic image_icon
#define tango_go_previous left_arrow_icon
#define tango_system_log_out log_out_icon
#define tango_list_remove minus_icon
#define tango_multimedia_player multimedia_player_icon
#define tango_internet_web_browser net_icon
#define tango_list_add plus_icon
#define tango_preferences_desktop_font preferences_desktop_font_icon
#define tango_process_stop process_stop_icon
#define tango_view_refresh refresh_icon
#define tango_go_next right_arrow_icon
#define tango_document_save_as save_as_icon
#define tango_document_save save_icon
#define tango_system_shutdown shutdown_icon
#define tango_start_here start_here_icon
#define tango_system_software_update system_software_update_icon
#define tango_system_users system_users_icon
#define tango_accessories_text_editor text_editor_icon
#define tango_text_x_generic text_icon
#define tango_x_office_calendar time_icon
#define tango_user_trash trash_icon
#define tango_utilities_system_monitor utilities_system_monitor_icon
#define tango_utilities_terminal utilities_terminal_icon
#define tango_weather_clear weather_clear_icon
#define tango48_dialog_information dialog_information_48_icon
#define tango48_dialog_warning dialog_warning_48_icon
// ---------------------------------------------------------------------
// Tango icons
// ---------------------------------------------------------------------
/* mimetypes/x-office-address-book.png */
/* XPM */
const char *tango_x_office_address_book[] = {
/* width height ncolors chars_per_pixel */
"16 16 125 2",
/* colors */
" c #000000",
" . c #C0D2E4",
" X c #ACC3DA",
" o c #A78AB1",
" O c #9DB029",
" + c #C3CFE0",
" @ c #9AA5C5",
" # c #D8E4F1",
" $ c #A7BFD8",
" % c #D7E4F0",
" & c #99A7C7",
" * c #A9B8D0",
" = c #D2DEEB",
" - c #ABB0BE",
" ; c #A887AE",
" : c #9CA2C3",
" > c #AC80A8",
" , c #CBD8E7",
" < c #A789B0",
" 1 c #617296",
" 2 c #AB82AA",
" 3 c #C3D0E2",
" 4 c #AA84AC",
" 5 c #B7CBE0",
" 6 c #A9B3CF",
" 7 c #8290AC",
" 8 c #7E8CA8",
" 9 c #ACB1BE",
" 0 c #95B1CF",
" q c #CEDBE9",
" w c #99A580",
" e c #7E8CAB",
" r c #AAACC9",
" t c #B5B5B6",
" y c #A491B6",
" u c #7B8AA8",
" i c #7A88A7",
" p c #9BA3C4",
" a c #727E0A",
" s c #DEDEDE",
" d c #AB92B6",
" f c #8F9FB8",
" g c #96AECC",
" h c #B1C0D6",
" j c #AA83AB",
" k c #A2AB7B",
" l c #FCE94F",
" z c #808DA9",
" x c #C7D7E8",
" c c #8F9E86",
" v c #95B0CE",
" b c #CC0000",
" n c #A5BDD7",
" m c #A8B8D0",
" M c #D1DEEB",
" N c #D0DCEA",
" B c #CFDCE9",
" V c #CEDAE8",
" C c #A8AEBC",
" Z c #A889AF",
" A c #AC80A9",
" S c #9BA2C3",
" D c #CFDCEC",
" F c #9DB7D2",
" G c #6F6384",
" H c #5A7AA4",
" J c #A78BB1",
" K c #67837F",
" L c #9AA4C5",
" P c #AFBAC9",
" I c #B9CBE0",
" U c #B4B9C4",
" Y c #9E9DBF",
" T c #BCC8D9",
" R c #828EAA",
" E c #95AFCD",
" W c #9FABC3",
" Q c #D7E3F0",
" ! c #D3DFEC",
" ~ c #A9B9D0",
" ^ c #9D9FC1",
" / c #B4C9DE",
" ( c #AFB5C2",
" ) c #ABB1BE",
" _ c #EDD400",
" ` c #C1C1C3",
" ' c #9CA1C3",
" ] c #698373",
" [ c #A7ADBD",
" { c #A9C1D9",
" } c #A8BFD8",
" | c #A9ACB8",
". c #AA85AC",
".. c #9D9EC0",
".X c #B7CAE0",
".o c #818FAB",
".O c #808DAA",
".+ c #AC8BB1",
".@ c #A987AE",
".# c #8B96AE",
".$ c #CFDCEA",
".% c #6C7CA0",
".& c #785977",
".* c #A889B0",
".= c #AC82AA",
".- c #DDDDDD",
".; c #CCDAEA",
".: c #9AA6C6",
".> c #BACDE2",
"., c #B8CBE0",
".< c #9E9DC0",
".1 c #8390AC",
".2 c #EF2929",
".3 c #C6D6E7",
".4 c #95AFCE",
".5 c #A58DB3",
".6 c #A986AD",
".7 c #BFCCE0",
".8 c #A9B9D1",
".9 c #CFDBE9",
".0 c #B9B9B9",
".q c #CEDBE8",
".w c #B7B7B7",
".e c #CBD7E5",
".r c None",
/* pixels */
".r H H H H H H H H H H H H H.r.r",
" H.% =.3.> / n n $ $ } } F c _.r",
" H T N 3 D { L < A. .< 0 X c l _",
" H +.$ h.; 6 4 p.4 & ; S X w l _",
" H.e B m.; d ^ Y 2 j & o X k l _",
" H M.9 m.;.= g 4...6 E A X ] O a",
" H Q q *.; A E A '.@ : Z X ] O a",
" H #.q ~.;.+ L y.*.5 4.: X K O a",
" H #.q.8.; r ; & v 0 0 0 X G.2 b",
" H % V.7.; { @ J >.6 0 0 X G.2 b",
" H Q ! D x ..X 5 5.,.,., I G.2 b",
" H , e R z 8 i u.o 7.1.O 1.& b.r",
" H W t.w.w.w.w.w.w.w.0 P H H.r.r",
" H f `.-.-.-.-.- s s s U H H.r.r",
" H H.# [ ( - - ) ) 9 9 C | H.r.r",
".r H H H H H H H H H H H H H.r.r"
};
/* categories/applications-system.png */
/* XPM */
const char *tango_applications_system[] = {
/* width height ncolors chars_per_pixel */
"16 16 19 1",
/* colors */
" c #000000",
". c #7CA1CF",
"X c #497CBA",
"o c #3F638F",
"O c #6490C7",
"+ c #467ABA",
"@ c #395578",
"# c #436FA5",
"$ c #BCCDE3",
"% c #5682B7",
"& c #86A7D2",
"* c #82A5D1",
"= c #4C7FBD",
"- c #426B9C",
"; c #5686C3",
": c #9DB8DA",
"> c #457ABE",
", c #8FAED5",
"< c None",
/* pixels */
"<<<<<<<<<<<<<<<<",
"<<<<<<>>><<<<<<<",
"<<<>><>$><>><<<<",
"<<>$&>O:O>&$><<<",
"<<>&:::::::&><<<",
"<<<>:.+;+*:><<<<",
"<>>O:+-<oX:O>><<",
"<>$::;<<<;::$><<",
"<>>O:=%<#+:O>><<",
"<<<>$.=;+,:><<<<",
"<<>&:::::::&><<<",
"<<>$&>O:O>&$><<<",
"<<<>><>$><>><<<<",
"<<<<<<>>><<<<<<<",
"<<<<<<<<<<<<<<<<",
"<<<<<<<<<<<<<<<<"
};
/* apps/internet-group-chat.png */
/* XPM */
const char *tango_internet_group_chat[] = {
/* width height ncolors chars_per_pixel */
"16 16 23 1",
/* colors */
" c #000000",
". c #9D9D9D",
"X c #F2F2F2",
"o c #F0F0F0",
"O c #EEEEEE",
"+ c #ECECEC",
"@ c #EAEAEA",
"# c #2D2D2D",
"$ c #767774",
"% c #888A85",
"& c #858682",
"* c #797A76",
"= c #C6C6C4",
"- c #FFFFFF",
"; c #F1F1F1",
": c #EFEFEF",
"> c #EDEDED",
", c #EBEBEB",
"< c #E9E9E9",
"1 c #343434",
"2 c #2A2A2A",
"3 c #868884",
"4 c None",
/* pixels */
"4444%%%%%%%%%%%4",
"444%-----------%",
"444%-,@<<<<<<<-%",
"4%%%%%%%%%%%=<-%",
"%-----------%<-%",
"%-<<<<<<<@,-%@-%",
"%-<<<<<@,++-%,-%",
"%-<<<<@,+>O-%--%",
"%-<<@,+>O::-%-%4",
"%-@,++>O:o;-%-%4",
"%-,+>O::o;X-%%%4",
"%--O:-------%4%4",
"4%-:-%%%%%%%.444",
"4%--%44444444444",
"4%%%444444444444",
"4%44444444444444"
};
/* status/dialog-information.png */
/* XPM */
const char *tango_dialog_information[] = {
/* width height ncolors chars_per_pixel */
"16 16 127 2",
/* colors */
" c #000000",
" . c #394B7A",
" X c #E8EFF4",
" o c #4A577A",
" O c #CBD9E8",
" + c #40507A",
" @ c #E3E6BA",
" # c #F5F8FA",
" $ c #80805C",
" % c #C8D7E8",
" & c #C5D5E5",
" * c #3B4C78",
" = c #3A4A77",
" - c #D4E0ED",
" ; c #C1CCD7",
" : c #E0E9F2",
" > c #546083",
" , c #394A79",
" < c #EBF0F6",
" 1 c #475780",
" 2 c #EBEDC1",
" 3 c #46557F",
" 4 c #F7F9FB",
" 5 c #C5D2E1",
" 6 c #5988B9",
" 7 c #3D4D76",
" 8 c #D9E3EE",
" 9 c #495985",
" 0 c #595942",
" q c #B5C7DB",
" w c #586383",
" e c #9BAEC8",
" r c #A9C0D9",
" t c #3C4D78",
" y c #F3F7FA",
" u c #3B4B77",
" i c #5382B6",
" p c #D3DFEB",
" a c #EDEFF4",
" s c #E2EAF3",
" d c #393936",
" f c #5E8DBA",
" g c #F5F8CA",
" h c #A5BED8",
" j c #616471",
" k c #384977",
" l c #EEF3F8",
" z c #D0DDEB",
" x c #CEDBE9",
" c c #4F5873",
" v c #FAFCFD",
" b c #779DC5",
" n c #485883",
" m c #E8EFF5",
" M c #ABB198",
" N c #B5C6DA",
" B c #E2E7EF",
" V c #AAC1D9",
" C c #3E4E79",
" Z c #E0E5ED",
" A c #DDDFAB",
" S c #435177",
" D c #8C9BB8",
" F c #C3D3E4",
" G c #98A4BD",
" H c #B5CAE0",
" J c #D0D5E0",
" K c #DFE7F2",
" L c #DEE7F1",
" P c #91AECD",
" I c #384A79",
" U c #41517B",
" Y c #8A8B66",
" T c #E0E6EC",
" R c #5E5E3E",
" E c #B9C4D6",
" W c #5E6880",
" Q c #8D9CB8",
" ! c #3A4B77",
" ~ c #EFF3F7",
" ^ c #9AA5BE",
" / c #FCFCFD",
" ( c #A6AC98",
" ) c #789DC4",
" _ c #C1D2E4",
" ` c #F3F6C9",
" ' c #3A4B7A",
" ] c #C0D0E3",
" [ c #384978",
" { c #87A8CC",
" } c #ECF1F7",
" | c #4B7EB2",
". c #45547E",
".. c #CCD9E8",
".X c #D3D5B0",
".o c #3D4C76",
".O c #D8E2ED",
".+ c #4A5A86",
".@ c #D4E0EC",
".# c #5281B5",
".$ c #7E90B2",
".% c #FFFFFF",
".& c #A7AD98",
".* c #608EBC",
".= c #C2D3E4",
".- c #464646",
".; c #4B5B83",
".: c #EBF0F5",
".> c #FAFBFD",
"., c #A4ADC3",
".< c #303030",
".1 c #C9D6E7",
".2 c #C7D6E5",
".3 c #F4F7FA",
".4 c #C2D0E0",
".5 c #D6E1ED",
".6 c #9DB9D6",
".7 c #7E91B1",
".8 c #B7C2D5",
".9 c #59627C",
".0 c #A6BED8",
".q c #A8AA84",
".w c #D2DAE2",
".e c #DFE8F2",
".r c #5C89BA",
".t c #5B89B9",
".y c None",
/* pixels */
".y.y.y.y.y u = [ I !.o.y.y.y.y.y",
".y.y.y.y *., a / 4 B ^ C.y.y.y.y",
".y.y.y t J # X s 8 p.O E U.y.y.y",
".y.y 7., # ~.3 <.e -.= & Q S.y.y",
".y.y + a m y v } K z _ ) 5 3.y.y",
".y.y ,.> : l.%.%.%.% ;.y x ..y.y",
".y.y '.3.5 L.%.: T.w P.y.1 ..y.y",
".y.y. Z O %.% ] H.6.y.* q n.y.y",
".y.y o G.@.0.% h {.y | V.7 >.y.y",
".y.y.y 1.8 F b.%.y f r e 9.y.y.y",
".y.y.y.y 1 D.4...2 N.$.+.y.y.y.y",
".y.y.y.y.y w.; (.& M W.y.y.y.y.y",
".y.y.y.y.y.y R 2 g A R.y.y.y.y.y",
".y.y.y.y.y.y R $.q Y R.y.y.y.y.y",
".y.y.y.y.y.y R @ `.X R.y.y.y.y.y",
".y.y.y.y.y.y.y d.-.<.y.y.y.y.y.y"
};
/* actions/edit-clear.png */
/* XPM */
const char *tango_edit_clear[] = {
/* width height ncolors chars_per_pixel */
"16 16 113 2",
/* colors */
" c #E7D75B",
" . c #EED723",
" X c #AB1B0D",
" o c #C86D33",
" O c #BBA529",
" + c #FDEC6D",
" @ c #C5B536",
" # c #DCC407",
" $ c #EDDA46",
" % c #A08E01",
" & c #9F8E00",
" * c #CDBD41",
" = c #E8DA6C",
" - c #D7B162",
" ; c #E6D656",
" : c #E1D35B",
" > c #CCBD43",
" , c #FDE952",
" < c #E7D018",
" 1 c #9C8800",
" 2 c #C6B633",
" 3 c #C5B432",
" 4 c #BC7A0F",
" 5 c #FDEA5F",
" 6 c #CFC149",
" 7 c #A29009",
" 8 c #A19008",
" 9 c #FDEB6C",
" 0 c #D2C34F",
" q c #DCC610",
" w c #AE9E1B",
" e c #F8EA88",
" r c #AB6D0B",
" t c #C17D10",
" y c #F3E365",
" u c #B2760B",
" i c #9E8D01",
" p c #E4D249",
" a c #ECDC68",
" s c #E7D96D",
" d c #BB4A28",
" f c #9F8F05",
" g c #F6D861",
" h c #9A8500",
" j c #FDEC6B",
" k c #FDEB61",
" l c #EBDD77",
" z c #804E01",
" x c #DAC203",
" c c #9F8E01",
" v c #AB9B1A",
" b c #E2D467",
" n c #9F8E04",
" m c #EADC72",
" M c #A12400",
" N c #B8381D",
" B c #876400",
" V c #FDEA63",
" C c #DDCF5E",
" Z c #FDEF84",
" A c #A08F01",
" S c #9F8D00",
" D c #D8C84F",
" F c #E3CB11",
" G c #A96B0A",
" H c #C6B530",
" J c #BEAE32",
" K c #FDEE7D",
" L c #B2720C",
" P c #9C8B00",
" I c #9C7F00",
" U c #A6690A",
" Y c #FDEF8A",
" T c #E5D44E",
" R c #B06917",
" E c #F3DB2A",
" W c #DCC510",
" Q c #FBED8B",
" ! c #A18801",
" ~ c #D6C856",
" ^ c #7B4A00",
" / c #FBEA84",
" ( c #FFFFFF",
" ) c #9D8C00",
" _ c #FCE53C",
" ` c #A03600",
" ' c #E4D34C",
" ] c #DCCD58",
" [ c #DFCA26",
" { c #784800",
" } c #EBDE77",
" | c #B1A01D",
". c #C0B02F",
".. c #DBC304",
".X c #F6DE2F",
".o c #AD4213",
".O c #E7D85F",
".+ c #A59411",
".@ c #FBE437",
".# c #7C4B00",
".$ c #9F8D01",
".% c #9E8D00",
".& c #E5CD14",
".* c #FBE544",
".= c #DCC615",
".- c #FDE63C",
".; c #865203",
".: c #845201",
".> c #A08F05",
"., c #CDBE45",
".< c #794900",
".1 c #8A6900",
".2 c None",
/* pixels */
".2.# ^.2.2.2.2.2.2.2.2.2.2.2.2.2",
" ^ U r ^.2.2.2.2.2.2.2.2.2.2.2.2",
" ^ L t G ^.2 P.2.2.2.2.2.2.2.2.2",
".2.; 4 t.: h P.2.2.2.2.2.2.2.2.2",
".2 ^ z u ! J |.2.2.2.2.2.2.2.2.2",
".2.2 B 1 * } R ` A.2.2.2.2.2.2.2",
".2.2 i D a o X - m > 7 c.2.2.2.2",
".2.2.% O d N g V 9 K e., f &.2.2",
".2.2.2 M.o / j Z + ,.* y l 6 w )",
".2.2.2.2. Y 5 k ,.- E < q p b.$",
".2.2.2.2.+ Q _.@.X ..&.. x ; 2 &",
".2.2.2.2 % C $ < F # x x ' ] n.2",
".2.2.2.2.2 v = W x x.= ~.>.2.2",
".2.2.2.2.2 & @.O [ T s 3.%.2.2.2",
".2.2.2.2.2.2.% 0 : H 8 S.2.2.2.2",
".2.2.2.2.2.2.2 ).%.%.2.2.2.2.2.2"
};
/* actions/edit-copy.png */
/* XPM */
const char *tango_edit_copy[] = {
/* width height ncolors chars_per_pixel */
"16 16 44 1",
/* colors */
" c #000000",
". c #E3E4E2",
"X c #9A9B97",
"o c #8D8F8A",
"O c #898B86",
"+ c #C8C8C7",
"@ c #C6C6C5",
"# c #C4C4C3",
"$ c #8F908B",
"% c #FEFEFE",
"& c #FAFAFA",
"* c #F4F4F4",
"= c #F2F2F2",
"- c #EEEEEE",
"; c #ECECEC",
": c #EAEAEA",
"> c #8E9189",
", c #D4D4D4",
"< c #C3C4C3",
"1 c #F7F7F6",
"2 c #F3F3F2",
"3 c #EFEFEE",
"4 c #EDEDEC",
"5 c #E3E3E2",
"6 c #989A95",
"7 c #8C8E89",
"8 c #8A8C87",
"9 c #888A85",
"0 c #C7C7C6",
"q c #FFFFFF",
"w c #FBFBFB",
"e c #F9F9F9",
"r c #F3F3F3",
"t c #EBEBEB",
"y c #989A96",
"u c #FEFEFD",
"i c #FCFCFB",
"p c #FAFAF9",
"a c #F8F8F7",
"s c #F6F6F5",
"d c #F4F4F3",
"f c #F0F0EF",
"g c #EEEEED",
"h c None",
/* pixels */
"hhhhhhhhhhhhhhhh",
"hhhhhhhhhhhhhhhh",
"hhhhhhhhhhhhhhhh",
"hhhhX9999999999o",
"hhhh8qqqqqqqqqq9",
"hhhhOqffffffffq9",
"hhhh8qf000000fq9",
"hhhhOqffffffffq9",
"hhhh8qf00000ffq9",
"hhhhOqfffffff&r9",
"hhhh8qf00000-1<9",
"hhhh8qfffff77779",
"hhhhOuffff&6&a.9",
"hhhhOpfff&&6&599",
"hhhhO*1siw,y.9hh",
"hhhh7O9999999hhh"
};
/* actions/edit-cut.png */
/* XPM */
const char *tango_edit_cut[] = {
/* width height ncolors chars_per_pixel */
"16 16 94 2",
/* colors */
" c #000000",
" . c #AA0909",
" X c #A80707",
" o c #959792",
" O c #939590",
" + c #91938E",
" @ c #AB0D0D",
" # c #90918D",
" $ c #8F918C",
" % c #A90B0B",
" & c #8D8F8A",
" * c #8B8D88",
" = c #CB1F1F",
" - c #9C2F2C",
" ; c #B3B2AF",
" : c #C01514",
" > c #A80403",
" , c #A70202",
" < c #AB1313",
" 1 c #AA0808",
" 2 c #A80606",
" 3 c #E1E1DF",
" 4 c #AE1919",
" 5 c #B70F0E",
" 6 c #CE1E1E",
" 7 c #A90A0A",
" 8 c #D2D3D0",
" 9 c #AA0E0E",
" 0 c #DB2727",
" q c #F5F6F5",
" w c #AE1818",
" e c #EFF0EF",
" r c #D01F1F",
" t c #CE1D1D",
" y c #CD1D1C",
" u c #898984",
" i c #CCCEC9",
" p c #C6C8C3",
" a c #AA0D0D",
" s c #B8BAB5",
" d c #AB1111",
" f c #B6B8B3",
" g c #B5B6B2",
" h c #F7F7F6",
" j c #D42222",
" k c #AAACA7",
" l c #A60202",
" z c #D22020",
" x c #B80D0D",
" c c #9FA09C",
" v c #A70606",
" b c #9A9C97",
" n c #92948F",
" m c #C91A1A",
" M c #AA0C0C",
" N c #8E908B",
" B c #8C8E89",
" V c #8A8C87",
" C c #AB1010",
" Z c #D62323",
" A c #A80303",
" S c #A60101",
" D c #A90707",
" F c #AF1A1A",
" G c #A40502",
" H c #AB1616",
" J c #DBDCD9",
" K c #CD1D1D",
" L c #CA1B1A",
" P c #AA0B0B",
" I c #D2D4D0",
" U c #CDCECB",
" Y c #C5C6C3",
" T c #C01513",
" R c #B5B6B3",
" E c #F7F7F7",
" W c #AD1717",
" Q c #D12020",
" ! c #A34A45",
" ~ c #B50B0B",
" ^ c #A60606",
" / c #A00A00",
" ( c #C71A19",
" ) c #BABBB7",
" _ c #B3B5B0",
" ` c #AEAFAB",
" ' c #D52323",
" ] c #D32121",
" [ c #A8A9A5",
" { c #D11F1F",
" } c #AB1414",
" | c #CF1D1D",
". c #E7E8E6",
".. c None",
/* pixels */
"........ * O........ * $........",
"...... N E *........ # 8 $......",
"...... * I e n...... k p &......",
"...... & _ h *.... N i ` *......",
"........ * J e + B f U *........",
"........ & g E * c R s *........",
".......... * 3 q b [ *..........",
".......... & ). k N V..........",
"............ u Y ; -............",
"........ w H ^ ! l ( W w........",
"...... D z 6 5 G > m Q = 7......",
".... 2 r A : S.... y T A K v....",
".. } '.... t 7.... A L.... Q }..",
".. @ |.. ~ ] M.... . Z x.. { d..",
".. < 0 r t X........ 1 j | t <..",
".... 9 C H............ a P %...."
};
/* actions/edit-paste.png */
/* XPM */
const char *tango_edit_paste[] = {
/* width height ncolors chars_per_pixel */
"16 16 79 1",
/* colors */
" c #000000",
". c #6A6C68",
"X c #666864",
"o c #C68827",
"O c #6E4602",
"+ c #6D4401",
"@ c #C08424",
"# c #7F7F7C",
"$ c #EFEFED",
"% c #EDEDEB",
"& c #EBEBE9",
"* c #E9E9E7",
"= c #E7E7E5",
"- c #676964",
"; c #DBDBD9",
": c #B2B4B4",
"> c #6E6C64",
", c #CCCDCA",
"< c #6B4301",
"1 c #FEFEFE",
"2 c #F2F2F2",
"3 c #EDEEED",
"4 c #BA7F23",
"5 c #D8D8D5",
"6 c #E0E0E0",
"7 c #A77D3B",
"8 c #5C5C5B",
"9 c #6C4401",
"0 c #C1C2BE",
"q c #B9BAB6",
"w c #6B4403",
"e c #B37B22",
"r c #EFEFEE",
"t c #EDEDEC",
"y c #EBEBEA",
"u c #C58726",
"i c #97978A",
"p c #6E4502",
"a c #80807D",
"s c #7E7E7B",
"d c #ECECEA",
"f c #EAEAE8",
"g c #716F64",
"h c #E8E8E6",
"j c #706D63",
"k c #DADAD8",
"l c #6F4602",
"z c #B97F23",
"x c #B3B5B5",
"c c #6E6D64",
"v c #CDCECB",
"b c #A17C40",
"n c #5E5E5E",
"m c #5C5C5C",
"M c #6A4200",
"N c #C28628",
"B c #FFFFFF",
"V c #E7E7E4",
"C c #F1F1F1",
"Z c #D9D9D6",
"A c #B1B2B2",
"S c #C58727",
"D c #5F5F5E",
"F c #959589",
"G c #6C4301",
"H c #6B4300",
"J c #B9B9B6",
"K c #B8B9B5",
"L c #FEFEFD",
"P c #B7B7B4",
"I c #736F64",
"U c #BBBBBB",
"Y c #F0F0EF",
"T c #EEEEED",
"R c #A47E3E",
"E c #A37C3D",
"W c #ECECEB",
"Q c #706D64",
"! c None",
/* pixels */
"!!!!!DmmmmD!!!!!",
"!!+9w8FiiF8w99!!",
"!+@RQn#aasn>bzG!",
"!logC6UUUU62cSM!",
"!loXBYYYYYYB-NM!",
"!luXBYxxxxrB-NM!",
"!luXBYYYY$%B-NM!",
"!OuXBYxx:AfB-NM!",
"!OuXBYrtyf;B-NM!",
"!OuXBTW&*k,B-NM!",
"!OuXBdfhvqKB-NM!",
"!puXB*=ZJBBB-NM!",
"!puXBV50PBB-SNM!",
"!puj3111rL-SSSM!",
"!G47I.....EEEe<!",
"!!G9999999999<!!"
};
/* actions/edit-select-all.png */
/* XPM */
const char *tango_edit_select_all[] = {
/* width height ncolors chars_per_pixel */
"16 16 38 1",
/* colors */
" c #000000",
". c #B3C9E1",
"X c #B1C7DF",
"o c #AFC5DD",
"O c #ADC3DB",
"+ c #ABC1D9",
"@ c #8D8F8A",
"# c #A9BFD7",
"$ c #8B8D88",
"% c #8197AF",
"& c #FEFEFE",
"* c #FCFCFC",
"= c #FAFAFA",
"- c #F8F8F8",
"; c #F6F6F6",
": c #F4F4F4",
"> c #F2F2F2",
", c #F0F0F0",
"< c #EEEEEE",
"1 c #ECECEC",
"2 c #8B8D89",
"3 c #B2C8E0",
"4 c #B0C6DE",
"5 c #AEC4DC",
"6 c #ACC2DA",
"7 c #AAC0D8",
"8 c #8C8E89",
"9 c #A8BED6",
"0 c #888A85",
"q c #8298B0",
"w c #FFFFFF",
"e c #FDFDFD",
"r c #FBFBFB",
"t c #F9F9F9",
"y c #F7F7F7",
"u c #F5F5F5",
"i c #EBEBEB",
"p c None",
/* pixels */
"p20000000000008p",
"p0e&&ee**rr==t$p",
"p0e9##77+++++-$p",
"p0&#%%%%6%%%6-$p",
"p0e7%%%%OOOOO-$p",
"p0e7%%%%O555i-$p",
"p0*+%%%%5%%o1-$p",
"p0*66O5oo444<-$p",
"p0*6O5oo44XX,-$p",
"p0r6%%%%%%%3>y$p",
"p0rO5o44 3 .:y$p",
"p0=O5o4X3 u;;y$p",
"p0tOqqqq3 y-yy$p",
"p0tO5o4X3 yt-y$p",
"p0------ - ---$p",
"p8000000000000@p"
};
/* actions/edit-undo.png */
/* XPM */
const char *tango_edit_undo[] = {
/* width height ncolors chars_per_pixel */
"16 16 70 1",
/* colors */
" c #000000",
". c #F3E56A",
"X c #F4DF2C",
"o c #F1DB29",
"O c #F9EA69",
"+ c #DFC80A",
"@ c #BB9F15",
"# c #F6E131",
"$ c #EBDC6F",
"% c #C4A000",
"& c #EFE276",
"* c #D6C004",
"= c #C19E00",
"- c #BBA11B",
"; c #EEE16E",
": c #FAEC73",
"> c #BCA015",
", c #F8E232",
"< c #DAC304",
"1 c #F5E02F",
"2 c #C1A313",
"3 c #7D7905",
"4 c #FAEB6F",
"5 c #DFC90F",
"6 c #BEA113",
"7 c #ECD936",
"8 c #E3CD16",
"9 c #BF9D00",
"0 c #C1A319",
"q c #DBC443",
"w c #C8AC02",
"e c #BCA114",
"r c #F7DD05",
"t c #FBED76",
"y c #DFC80B",
"u c #FBED79",
"i c #B99900",
"p c #7C7A06",
"a c #D8C207",
"s c #E9DA5D",
"d c #CBAA0E",
"f c #F7E86E",
"g c #F2E469",
"h c #E8D21D",
"j c #C0A41A",
"k c #F7E232",
"l c #FBF3AD",
"z c #C1A314",
"x c #F6E769",
"c c #FBE425",
"v c #C5AB1B",
"b c #C4A71A",
"n c #C0A623",
"m c #E1CD40",
"M c #C2A611",
"N c #BDA116",
"B c #C2A211",
"V c #FAE320",
"C c #BFA31B",
"Z c #EADB66",
"A c #C3A618",
"S c #F7E86C",
"D c #F2E788",
"F c #E3CE41",
"G c #F5E66D",
"H c #F6E02F",
"J c #D8C543",
"K c #7E7905",
"L c #C4A901",
"P c None",
/* pixels */
"PPPPPP%PPPPPPPPP",
"PPPPP%%PPPPPPPPP",
"PPPP%l%PPPPPPPPP",
"PPP%lc%%6@-PPPPP",
"PP%l#V:4fSezPPPP",
"P%lHko1o87xF2PPP",
"%lH,kk1ohhh7mNPP",
"P%u,X***hhhy.v>P",
"PP%t<tOOOOr+a$CP",
"PPP%tt%%%%L;5gjP",
"PPPP%t%PPPP%G&0P",
"PPPPP%%PPPPPwDBP",
"PPPPPP%PPPPPdsnP",
"PPPPPPPPPPPPqJPP",
"PPPPPPPPPPPPZMPP",
"PPPPPPPPPPPPPPPP"
};
/* emblems/emblem-system.png */
/* XPM */
const char *tango_emblem_system[] = {
/* width height ncolors chars_per_pixel */
"16 16 19 1",
/* colors */
" c #000000",
". c #C7CAC3",
"X c #8F918C",
"o c #8D8F8A",
"O c #B8BAB4",
"+ c #888A84",
"@ c #A2A3A0",
"# c #898B87",
"$ c #777975",
"% c #71736F",
"& c #D3D7CF",
"* c #676965",
"= c #555753",
"- c #888A85",
"; c #BDBFB9",
": c #EEEEEC",
"> c #979993",
", c #C0C0BE",
"< c None",
/* pixels */
"<<<<<<<<<<<<<<<<",
"<<<<<<---<<<<<<<",
"<<<--<-:-<--<<<<",
"<<-:,-@&@-,:-<<<",
"<<-,&&&&&&&,-<<<",
"<<<-&O+>+;&-<<<<",
"<--@&+%<*#&@--<<",
"<-:&&><<<>&&:-<<",
"<--@&oX<$+&@--<<",
"<<<-:Oo>+.&-<<<<",
"<<-,&&&&&&&,-<<<",
"<<-:,-@&@-,:-<<<",
"<<<--<-:-<--<<<<",
"<<<<<<---<<<<<<<",
"<<<<<<<<<<<<<<<<",
"<<<<<<<<<<<<<<<<"
};
/* mimetypes/application-x-executable.png */
/* XPM */
const char *tango_application_x_executable[] = {
/* width height ncolors chars_per_pixel */
"16 16 70 1",
/* colors */
" c #000000",
". c #9BABC3",
"X c #8790B6",
"o c #ADB8CE",
"O c #ABB6CC",
"+ c #5F7A9F",
"@ c #7F90B1",
"# c #A5B2C9",
"$ c #A4B2C8",
"% c #9197BC",
"& c #9FAEC6",
"* c #8991B7",
"= c #AFB9CF",
"- c #AEB9CE",
"; c #BFC4D8",
": c #7382AB",
"> c #95A2BF",
", c #949ABE",
"< c #7D89B1",
"1 c #7C89B0",
"2 c #8D9EBA",
"3 c #8E9CBB",
"4 c #A0AFC6",
"5 c #B0BACF",
"6 c #9D9FC3",
"7 c #C1C5D9",
"8 c #7483AB",
"9 c #99A3C2",
"0 c #858EB5",
"q c #AAB6CC",
"w c #8F9BBB",
"e c #9099BC",
"r c #A2AEC7",
"t c #A1AAC6",
"y c #7786AD",
"u c #8895B7",
"i c #ACB7CD",
"p c #7182AA",
"a c #566F99",
"s c #7A87AF",
"d c #ACB0CC",
"f c #8394B4",
"g c #A8B4CB",
"h c #A7B4CA",
"j c #A7B2CA",
"k c #50688F",
"l c #A5B0C8",
"z c #C8CADD",
"x c #546C96",
"c c #7C8EB0",
"v c #7C8CB0",
"b c #7B88AF",
"n c #8D9FBA",
"m c #7A88AE",
"M c #B2BBD1",
"N c #B1BBD0",
"B c #516A96",
"V c #7584AC",
"C c #364878",
"Z c #858FB5",
"A c #98A2C1",
"S c #ABB5CD",
"D c #A9B5CB",
"F c #A9B3CB",
"G c #A7B1C9",
"H c #486490",
"J c #A3B1C8",
"K c #B3BCD1",
"L c #C3C7DA",
"P c None",
/* pixels */
"PPPPPPPCPPPPPPPP",
"PPPPPPCLCPPPPPPP",
"PPPPPCL.+CPPPPPP",
"PPPPCL&4nHCPPPPP",
"PPPCLJ$#2BaCPPPP",
"PPCLhgDqcf@aCPPP",
"PCLOio-rv>FpaCPP",
"CL=5NMj3SKy:VaCP",
"PCLGlwu8t9b<aCPP",
"PPCLms1A;eZaCPPP",
"PPPCL0X*7,aCPPPP",
"PPPPCL%dzaCPPPPP",
"PPPPPCL6aCPPPPPP",
"PPPPPPCaCPPPPPPP",
"PPPPPPPCPPPPPPPP",
"PPPPPPPPPPPPPPPP"
};
/* actions/document-open.png */
/* XPM */
const char *tango_document_open[] = {
/* width height ncolors chars_per_pixel */
"16 16 139 2",
/* colors */
" c #85ABD5",
" . c #7E8896",
" X c #406CA5",
" o c #A9A9A9",
" O c #3767A6",
" + c #A5A5A5",
" @ c #3565A4",
" # c #C3D6EA",
" $ c #A2A3A2",
" % c #5B5C59",
" & c #A1A1A1",
" * c #5A5C58",
" = c #565854",
" - c #9C9D9C",
" ; c #9B9B9B",
" : c #999999",
" > c #969796",
" , c #BFD2E9",
" < c #7EA7D4",
" 1 c #98B9DD",
" 2 c #BBD2E8",
" 3 c #797979",
" 4 c #737373",
" 5 c #3768A5",
" 6 c #3666A4",
" 7 c #C5D7EB",
" 8 c #5689C0",
" 9 c #85ACD7",
" 0 c #9FA09E",
" q c #656565",
" w c #5F5F5F",
" e c #C1D5EA",
" r c #5B5B5B",
" t c #555555",
" y c #7FA8D4",
" u c #515151",
" i c #FEFEFE",
" p c #FCFCFC",
" a c #8AAFD8",
" s c #494949",
" d c #FAFAFA",
" f c #95B8DC",
" g c #EAEAEA",
" h c #E8E8E8",
" j c #E6E6E6",
" k c #E2E2E2",
" l c #E0E0E0",
" z c #DEDEDE",
" x c #77A2D2",
" c c #DCDCDC",
" v c #3667A6",
" b c #DADADA",
" n c #3465A4",
" m c #5B5E5A",
" M c #D2D2D2",
" N c #81A9D5",
" B c #D0D0D0",
" V c #4B7EB7",
" C c #3265A5",
" Z c #8BB0D8",
" A c #C4C4C4",
" S c #96B7DC",
" D c #3968A5",
" F c #B0B0B0",
" G c #B9D0E7",
" H c #AEAEAE",
" J c #ACACAC",
" K c #AAAAAA",
" L c #79A3D3",
" P c #92B5DB",
" I c #A6A6A6",
" U c #5F615D",
" Y c #3666A5",
" T c #3566A4",
" R c #5D5F5B",
" E c #5B5D59",
" W c #595B57",
" Q c #D5D5D4",
" ! c #575955",
" ~ c #83AAD6",
" ^ c #82AAD5",
" / c #555753",
" ( c #9BBADD",
" ) c #C0D5EA",
" _ c #C1C1C0",
" ` c #7A7A7A",
" ' c #787878",
" ] c #3767A5",
" [ c #A5A5A4",
" { c #6E6E6E",
" } c #5B5C58",
" | c #5588BF",
". c #6A6A6A",
".. c #9C9D9B",
".X c #3567A6",
".o c #8FB2DA",
".O c #8EB2D9",
".+ c #939392",
".@ c #3465A5",
".# c #C1D6EA",
".$ c #565656",
".% c #B1C9E4",
".& c #4C4C4C",
".* c #FDFDFD",
".= c #FBFBFB",
".- c #484848",
".; c #F9F9F9",
".: c #F7F7F7",
".> c #7BA5D3",
"., c #95B7DC",
".< c #94B5DB",
".1 c #3868A5",
".2 c #EBEBEB",
".3 c #E9E9E9",
".4 c #E7E7E7",
".5 c #E5E5E5",
".6 c #E3E3E3",
".7 c #B8CEE7",
".8 c #DFDFDF",
".9 c #DDDDDD",
".0 c #3566A5",
".q c #3466A4",
".w c #D9D9D9",
".e c #D3D3D3",
".r c #D0D1D0",
".t c #9ABADD",
".y c #CFCFCF",
".u c #CDCDCD",
".i c #C9C9C9",
".p c #C7C7C7",
".a c #C5C5C5",
".s c #A5C1E1",
".d c #7DA6D4",
".f c #BDBDBD",
".g c #95B6DB",
".h c #B7B7B7",
".j c #454A51",
".k c #B3B3B3",
".l c None",
/* pixels */
".l.l.l.l = ! = ! ! W * U.l.l.l.l",
" ` 3 3 3 =.:.; d.=.= p $ }.l.l.l",
" '.i.p A / b.e.e M.y.u i.+ m.l.l",
" 4.a F J / c - - - - Q i.* > E.l",
" { _ J K = k.8 z z.9 l.3.5 B R.l",
". .f o + = j 0.......9.6.6.r E.l",
" q.h I & !.2 g g.3.3 h h.4.w %.l",
" w.k X.1.1 5 Y Y.0 T T T n n n O",
" r H.0 ) ) ) ) ) ) e.#.#.#.# 2.@",
".$ o T # P P P P P P P P P f G.q",
" u [ 6 7 1 1 1 1 1 1 1 1 1.,.7.0",
".& & ] , (.t.t.t.t.t.t S.o Z.%.0",
".- ;.1.s.O a 9 ~ N < L x x.>.g.X",
" s : D.< ^.d.d.d.d.d.d.d.d y Y",
".- . D | 8 8 8 8 8 8 8 8 8 8 V v",
".j n n n n n n n n n n n n n @.l"
};
/* status/folder-open.png */
/* XPM */
const char *tango_folder_open[] = {
/* width height ncolors chars_per_pixel */
"16 16 123 2",
/* colors */
" c #000000",
" . c #ADADAD",
" X c #ABABAB",
" o c #A9A9A9",
" O c #92B6DB",
" + c #92B4DB",
" @ c #A7A7A7",
" # c #3667A5",
" $ c #A5A5A5",
" % c #A3A3A3",
" & c #A1A1A1",
" * c #9F9F9F",
" = c #9DBDDF",
" - c #9D9D9D",
" ; c #9B9B9B",
" : c #B5CDE6",
" > c #999999",
" , c #7EA7D4",
" < c #3968A4",
" 1 c #484849",
" 2 c #797979",
" 3 c #757575",
" 4 c #94B7DC",
" 5 c #737373",
" 6 c #93B5DB",
" 7 c #6D6D6D",
" 8 c #86AED8",
" 9 c #6B6B6B",
" 0 c #B7CEE7",
" q c #656565",
" w c #5F5F5F",
" e c #C1D5EA",
" r c #5B5B5B",
" t c #7FA8D4",
" y c #515151",
" u c #B1CAE4",
" i c #4779B4",
" p c #494949",
" a c #A2BFDF",
" s c #86ABD4",
" d c #95B8DC",
" f c #AEC8E4",
" g c #4971A5",
" h c #B8CFE7",
" j c #3567A5",
" k c #4F79AE",
" l c #3465A4",
" z c #81A9D5",
" x c #9BBBDE",
" c c #3C6AA5",
" v c #CACACA",
" b c #C8C8C8",
" n c #8CB0D9",
" m c #C4C4C4",
" M c #C0C0C0",
" N c #BABABA",
" B c #3968A5",
" V c #3766A3",
" C c #88AED8",
" Z c #B2B2B2",
" A c #B0B0B0",
" S c #AEAEAE",
" D c #ACACAC",
" F c #AAAAAA",
" G c #92B5DB",
" H c #3868A7",
" J c #A6A6A6",
" K c #3666A5",
" L c #A4A4A4",
" P c #C4D7EB",
" I c #A0A0A0",
" U c #9E9E9E",
" Y c #82AAD5",
" T c #9C9C9C",
" R c #9A9A9A",
" E c #406DA8",
" W c #6A7F99",
" Q c #8EB3DA",
" ! c #C1C1C0",
" ~ c #808080",
" ^ c #7A7A7A",
" / c #787878",
" ( c #454F5D",
" ) c #747474",
" _ c #94B6DC",
" ` c #93B6DB",
" ' c #A5A5A4",
" ] c #598CC3",
" [ c #6E6E6E",
" { c #3463A2",
" } c #6C6C6C",
" | c #6A6A6A",
". c #84ABD6",
".. c #B7CFE7",
".X c #606060",
".o c #608FC3",
".O c #3465A5",
".+ c #565656",
".@ c #B3CBE6",
".# c #8F949B",
".$ c #FFFFFF",
".% c #4C4C4C",
".& c #8BB0D9",
".* c #484848",
".= c #688FBD",
".- c #3868A5",
".; c #85ACD6",
".: c #B7CEE6",
".> c #68809F",
"., c #91B5DB",
".< c #3768A7",
".1 c #3566A5",
".2 c #B4CCE6",
".3 c #C9C9C9",
".4 c #8DB1DA",
".5 c #C7C7C7",
".6 c #C5C5C5",
".7 c #BED3E9",
".8 c #BDBDBD",
".9 c #5C8EC4",
".0 c #B7B7B7",
".q c #B3B3B3",
".w c None",
/* pixels */
".w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w",
" ^ 2 2 2 2 2 2.w.w.w.w.w.w.w.w.w",
" /.3.5.6 m m Z 3.w.w.w.w.w.w.w.w",
" 5.6 A . X F F ^ 7 } 9 9 | [.w.w",
" [ ! D F @ $ L o N.6 b v M q.w.w",
" |.8 o J % & I * * I & % % w.w.w",
" q.0 J % I - T ; R ; T U U r.w.w",
" w.q % g B B B B B B B B B V K.<",
" r S I.-.2 0 0...:.:.:.:.:.: u.O",
".+ o U <.7 O., G O O O O ` d.@.1",
" y ' T c e 4 4 4 4 4 4 4 Q 8 :.1",
".% & ; E P x x x x x _.& C.4 h.1",
".* ;.# k f 6 + n.; t , , , Y a #",
" p >.>.= =.& Y z z z z z z. s H",
" 1 W B.o.9 ] ] ] ] ] ] ] ] ] i j",
" ( l l l l l l l l l l l l l l.w"
};
/* apps/help-browser.png */
/* XPM */
const char *tango_help_browser[] = {
/* width height ncolors chars_per_pixel */
"16 16 153 2",
/* colors */
" c #7497C1",
" . c #D6DEE9",
" X c #466DA1",
" o c #8BA5C7",
" O c #2F5891",
" + c #E6EBF2",
" @ c #E4E9F0",
" # c #4B6E9F",
" $ c #8CA2C1",
" % c #6B8FBB",
" & c #567CAD",
" * c #5278A9",
" = c #829DC1",
" - c #AABAD1",
" ; c #EDF0F5",
" : c #FDFDFE",
" > c #6387B6",
" , c #4B72A5",
" < c #345D95",
" 1 c #6482AD",
" 2 c #335B94",
" 3 c #617EAA",
" 4 c #BAC9DD",
" 5 c #CDDAE9",
" 6 c #E8ECF3",
" 7 c #2E558F",
" 8 c #2D558E",
" 9 c #E6EAF1",
" 0 c #C8D4E4",
" q c #7296C1",
" w c #C2CEDE",
" e c #4D6FA0",
" r c #A0B9D7",
" t c #5A7FB0",
" y c #728FB7",
" u c #5B7AA7",
" i c #2A538E",
" p c #7999C1",
" a c #F2F5F9",
" s c #F0F3F7",
" d c #365C93",
" f c #BDCADC",
" g c #FEFEFE",
" h c #597AA8",
" j c #6D8BB5",
" k c #6B89B3",
" l c #6987B1",
" z c #6286B4",
" x c #4D73A6",
" c c #386098",
" v c #214B88",
" b c #6381AB",
" n c #EDF1F7",
" m c #315891",
" M c #E9EDF3",
" N c #6C8DB7",
" B c #2D5690",
" V c #86A1C3",
" C c #5C7BA7",
" Z c #9BB2D1",
" A c #C9D7E7",
" S c #6C88B0",
" D c #6587B3",
" F c #BDC9DB",
" G c #547AAC",
" H c #3B639A",
" J c #6B88B2",
" K c #244E8A",
" L c #234C89",
" P c #224C88",
" I c #8FA8C8",
" U c #6582AC",
" Y c #CBD6E5",
" T c #6085B4",
" R c #94A9C6",
" E c #5E83B2",
" W c #325B94",
" Q c #E5EAF1",
" ! c #3B6096",
" ~ c #C0CCDD",
" ^ c #8CA1C1",
" / c #6A8EBA",
" ( c #5978A6",
" ) c #5878A5",
" _ c #3C649A",
" ` c #264F8B",
" ' c #254F8A",
" ] c #94ADCC",
" [ c #6284B2",
" { c #F1F5F9",
" } c #F0F3F8",
" | c #EFF3F7",
". c #A9B9D0",
".. c #496FA3",
".X c #345C95",
".o c #335C94",
".O c #E8EDF3",
".+ c #B7C6DA",
".@ c #E7EBF2",
".# c #2C548D",
".$ c #A6B9D3",
".% c #7093BF",
".& c #42699F",
".* c #40679D",
".= c #5176A7",
".- c #27508B",
".; c #6A86AF",
".: c #ADBCD3",
".> c #F1F4F8",
"., c #7594BD",
".< c #EFF2F6",
".1 c #A0B5D0",
".2 c #FFFFFF",
".3 c #678BB9",
".4 c #9BAFCB",
".5 c #6589B7",
".6 c #4C72A5",
".7 c #204A87",
".8 c #6482AC",
".9 c #A7B8D0",
".0 c #E9EEF3",
".q c #2F578F",
".w c #2D558D",
".e c #CAD6E5",
".r c #F9FBFC",
".t c #C6D2E1",
".y c #7396C1",
".u c #90A5C3",
".i c #6F92BD",
".p c #456CA1",
".a c #9FB7D5",
".s c #436A9F",
".d c #5D7CA8",
".f c #718DB5",
".g c #E3E8F0",
".h c #385E94",
".j c #9DB7D6",
".k c #D1DBE8",
".l c #47699C",
".z c #A0B4CF",
".x c #3A6299",
".c c #254F8B",
".v c #386097",
".b c #234D89",
".n c #224B88",
".m c #EFF3F8",
".M c #7191BB",
".N c #EBEFF4",
".B c #89A1C2",
".V c #CCD7E6",
".C c #FBFCFD",
".Z c #789BC5",
".A c None",
/* pixels */
".A.A.A.A.A.7.7.7.7.7.7.A.A.A.A.A",
".A.A.A.A.# ^ F.N.N F $.#.A.A.A.A",
".A.A.7 u.g. U ! ! U - @ C.7.A.A",
".A.A 3.@ (.l w s 9.9 e 1.O.d.A.A",
".A 8 Q ).7 S : ..<.2 f c k +.w.A",
".7.u. .7.7 # e W h.2.C X.s.+ R.7",
".7 ~ U.7.- B.X.x.B.2 6 , x V.t L",
".7 ; d ' B < H j.r g = G & N | v",
".7 ;.h i 2.x.&.O.2.1 t E T., }.n",
".7 ~.; O.v.*.= 0.e z >.3 / Z.V K",
".7.u.:.o _.p * I ].5 %.%.y A.z v",
".A 8 + l.*.. [.2.2.i q.Z.j n.q.A",
".A.A b.0 y.6 D.2.2 .Z r { J.A.A",
".A.A.7.8 M 4 o.M p.a 5.m.f `.A.A",
".A.A.A.A 7.4 Y.> a.k.$ m.A.A.A.A",
".A.A.A.A.A.7.b P P.c v.A.A.A.A.A"
};
/* mimetypes/image-x-generic.png */
/* XPM */
const char *tango_image_x_generic[] = {
/* width height ncolors chars_per_pixel */
"16 16 87 1",
/* colors */
" c #6583AF",
". c #95A8C7",
"X c #6381AD",
"o c #617FAB",
"O c #A5B5D0",
"+ c #738EB6",
"@ c #3F516F",
"# c #384151",
"$ c #3D4F6D",
"% c #5B7BA8",
"& c #45546E",
"* c #7A8698",
"= c #5475A4",
"- c #98ABC9",
"; c #67758F",
": c #A8B8D2",
"> c #9CA7B9",
", c #839ABE",
"< c #6180AD",
"1 c #D1DCB1",
"2 c #8691A3",
"3 c #A4B8A9",
"4 c #515151",
"5 c #FEFEFE",
"6 c #485773",
"7 c #E2EBBE",
"8 c #5778A6",
"9 c #9AACCA",
"0 c #7D899D",
"q c #F6F6F6",
"w c #9EA8BA",
"e c #7892B9",
"r c #A8B7D1",
"t c #374762",
"y c #818A9A",
"u c #93A6C6",
"i c #A2B3CE",
"p c #8099BD",
"a c #FFFFFE",
"s c #405374",
"d c #889EC1",
"f c #869CBF",
"g c #455672",
"h c #435470",
"j c #96A9C8",
"k c #A6B6D1",
"l c #33476A",
"z c #FEFEF9",
"x c #3D4E6D",
"c c #888A85",
"v c #3B4C6B",
"b c #B6C5B2",
"n c #8CA1C1",
"m c #6D89B3",
"M c #415474",
"N c #C4D1AF",
"B c #EEF3CB",
"V c #475773",
"C c #818DA2",
"Z c #2F4262",
"A c #DCE5B9",
"S c #384C6E",
"D c #A7B7D1",
"F c #7590B7",
"G c #34486A",
"H c #9DAFC7",
"J c #5072A3",
"K c #6884AA",
"L c #233659",
"P c #8FA6AF",
"I c #FDFDFD",
"U c #6986B1",
"Y c #819AB8",
"T c #9FA9BB",
"R c #9EA9BA",
"E c #5F7EAA",
"W c #B3C2B7",
"Q c #728DB6",
"! c #A1B3C3",
"~ c #FCFDEE",
"^ c #8EA3C4",
"/ c #F7FADF",
"( c #495973",
") c #C5D1B1",
"_ c #3D5071",
"` c #718DA7",
"' c None",
/* pixels */
"cccccccccccccccc",
"c55555555555555c",
"cI*tttttttttt*qc",
"c5@oXK`E%8==Jtqc",
"cIh+PAB3mU <tqc",
"cIgpNza7YeFFQtqc",
"cIV^b/~1ndff,tqc",
"cI69HW)!-j0.utqc",
"cI(r::rDkO42itqc",
"cI&TTTTRw>44ytqc",
"cItx$$xvZL44#tqc",
"cItMs_SGl4444tqc",
"cItC;;;;;;;;;tqc",
"cI*tttttttttt*qc",
"c5qqqqqqqqqqqqIc",
"cccccccccccccccc"
};
/* actions/go-previous.png */
/* XPM */
const char *tango_go_previous[] = {
/* width height ncolors chars_per_pixel */
"16 16 99 2",
/* colors */
" c #65A827",
" . c #6EC915",
" X c #C6DEAE",
" o c #C2DCAA",
" O c #52891E",
" + c #3B7504",
" @ c #CAE0B5",
" # c #7CC833",
" $ c #67C111",
" % c #AACF88",
" & c #97DA54",
" * c #97BD72",
" = c #6BA236",
" - c #A0C37E",
" ; c #55A409",
" : c #61B70E",
" > c #A9D480",
" , c #60B50D",
" < c #87B65B",
" 1 c #3C7604",
" 2 c #C7DFB1",
" 3 c #9DC477",
" 4 c #87BB54",
" 5 c #3A7405",
" 6 c #82B74F",
" 7 c #A5DC6E",
" 8 c #457C13",
" 9 c #88BB58",
" 0 c #60A420",
" q c #B8D69B",
" w c #90BF63",
" e c #B3D296",
" r c #3D7904",
" t c #A6CF7F",
" y c #C5DEAE",
" u c #8DC459",
" i c #96CA65",
" p c #3A7304",
" a c #59AC0B",
" s c #598B29",
" d c #578927",
" f c #41790E",
" g c #ACD881",
" h c #5EA31D",
" j c #70AD35",
" k c #6EA23D",
" l c #7FB947",
" z c #C4DDAC",
" x c #7AB742",
" c c #4E9A06",
" v c #3B7604",
" b c #4D8419",
" n c #3B7404",
" m c #A5D576",
" M c #A3CA7E",
" N c #5AAD0B",
" B c #AEDB82",
" V c #65B519",
" C c #A9D77D",
" Z c #5A8C2C",
" A c #7DA855",
" S c #8BBD5C",
" D c #61B60E",
" F c #71B035",
" G c #7BB642",
" H c #66AF20",
" J c #BFDAA6",
" K c #75B23C",
" L c #B0DE83",
" P c #3F790A",
" I c #A7CD84",
" U c #FFFFFF",
" Y c #A5C982",
" T c #80B64D",
" R c #5D8D2E",
" E c #7FA956",
" W c #56A609",
" Q c #8ABC5A",
" ! c #89BC59",
" ~ c #87BA57",
" ^ c #91C064",
" / c #68A92B",
" ( c #BDD9A3",
" ) c #519E07",
" _ c #5EB30D",
" ` c #94C26A",
" ' c #C8DFB1",
" ] c #A3D572",
" [ c #69C211",
" { c #66AC22",
" } c #3A7404",
" | c #5CAD0E",
". c #7DB549",
".. c #58A90A",
".X c #437A10",
".o c #62AF17",
".O c #85B954",
".+ c #B5D497",
".@ c None",
/* pixels */
".@.@.@.@.@.@.@.@.@.@ +.@.@.@.@.@",
".@.@.@.@.@.@.@.@ n s p.@.@.@.@.@",
".@.@.@.@.@.@.@ } E ' p.@.@.@.@.@",
".@.@.@.@.@.@.X - ( @ p.@.@.@.@.@",
".@.@.@.@ n R e % ^ 2 v p p p p }",
".@.@.@ 5 A.+ ` ~ S z y X y z o p",
".@.@ 8 * I T. 6.O 9 ! Q ! 9 J p",
" + Z Y w j K G l x F h 0 / q p",
" + d 3 4 { H.o | a.. ; ) c c M p",
".@.@ f < i V , : D _ N W ) c M p",
".@.@.@ + k m # [ $ B g > t M M p",
".@.@.@.@ v O ] & . L r p p p p }",
".@.@.@.@.@.@ P u 7 L p.@.@.@.@.@",
".@.@.@.@.@.@.@ 1 = C p.@.@.@.@.@",
".@.@.@.@.@.@.@.@ v b p.@.@.@.@.@",
".@.@.@.@.@.@.@.@.@.@ +.@.@.@.@.@"
};
/* actions/system-log-out.png */
/* XPM */
const char *tango_system_log_out[] = {
/* width height ncolors chars_per_pixel */
"16 16 186 2",
/* colors */
" c #E26E6E",
" . c #D94141",
" X c #E5E6E4",
" o c #ECE3E1",
" O c #AFAFAF",
" + c #ADADAD",
" @ c #ABABAB",
" # c #A9A9A9",
" $ c #A7A7A7",
" % c #E88E8E",
" & c #A5A5A5",
" * c #A3A3A3",
" = c #5C5E5A",
" - c #A1A1A1",
" ; c #A20E0E",
" : c #585A56",
" > c #9D9D9D",
" , c #565854",
" < c #D23D3D",
" 1 c #999999",
" 2 c #979797",
" 3 c #959595",
" 4 c #939393",
" 5 c #AC1111",
" 6 c #919191",
" 7 c #8F8F8F",
" 8 c #8D8D8D",
" 9 c #8B8B8B",
" 0 c #898989",
" q c #EA9696",
" w c #E16969",
" e c #F1F1EF",
" r c #858585",
" t c #A50000",
" y c #EFEFED",
" u c #645F5E",
" i c #7F7F7F",
" p c #EB9A9A",
" a c #797979",
" s c #A60404",
" d c #757575",
" f c #A11616",
" g c #E88D8D",
" h c #6F6F6F",
" j c #D9DBD7",
" k c #A61111",
" l c #D7D9D5",
" z c #656565",
" x c #D23C3C",
" c c #989897",
" v c #DB4848",
" b c #D21B1B",
" n c #5D5D5D",
" m c #C7C9C5",
" M c #C6C9C4",
" N c #595959",
" B c #B02121",
" V c #898A88",
" C c #EA9595",
" Z c #CF0E0E",
" A c #878886",
" S c #EDD4D3",
" D c #FAFAFA",
" F c #E78888",
" G c #A60303",
" H c #CD6161",
" J c #686A67",
" K c #D32525",
" L c #9A9B98",
" P c #D73636",
" I c #D79292",
" U c #929390",
" Y c #8A6464",
" T c #C6C8C3",
" R c #B12221",
" E c #8D8F8B",
" W c #DD5656",
" Q c #B51B1B",
" ! c #C42D2D",
" ~ c #D0D2D0",
" ^ c #F3F1EF",
" / c #D63838",
" ( c #7F817D",
" ) c #FBFBFA",
" _ c #D52D2D",
" ` c #BEBEBE",
" ' c #F3F3F2",
" ] c #BABABA",
" [ c #737571",
" { c #EFEFEE",
" } c #DB4D4D",
" | c #AC1515",
". c #C46C6B",
".. c #E4E5E3",
".X c #686966",
".o c #656763",
".O c #DC5151",
".+ c #646562",
".@ c #AAAAAA",
".# c #C58886",
".$ c #61635F",
".% c #CE0808",
".& c #A6A6A6",
".* c #5F615D",
".= c #A4A4A4",
".- c #A2A2A2",
".; c #5B5D59",
".: c #C5C7C1",
".> c #A0A0A0",
"., c #595B57",
".< c #9E9E9E",
".1 c #575955",
".2 c #9C9C9C",
".3 c #555753",
".4 c #9A9A9A",
".5 c #989898",
".6 c #969696",
".7 c #949494",
".8 c #BC2424",
".9 c #929292",
".0 c #867979",
".q c #8C8C8C",
".w c #F4F4F2",
".e c #888888",
".r c #868686",
".t c #858685",
".y c #F0F0EE",
".u c #DB4C4C",
".i c #BC3E3E",
".p c #828282",
".a c #808080",
".s c #7E7E7E",
".d c #767676",
".f c #707070",
".g c #7E6A6A",
".h c #6E6E6E",
".j c #D8DAD6",
".k c #C53636",
".l c #A2A3A1",
".z c #6C6C6C",
".x c #AC2524",
".c c #D6D8D4",
".v c #AA0B0B",
".b c #D4D6D2",
".n c #B01E1E",
".m c #686868",
".M c #646464",
".N c #DA9696",
".B c #606060",
".V c #B72828",
".C c #A51413",
".Z c #D11A1A",
".A c #C3C6C1",
".S c #8B7373",
".D c #BC3030",
".F c #FFFFFF",
".G c #FBFBFB",
".H c #F9F9F9",
".J c #D43A3A",
".K c #ECA7A7",
".L c #C76565",
".P c #696B68",
".I c #C6C9C3",
".U c #A90C0C",
".Y c #BEC1BB",
".T c #CE0C0C",
".R c #D33535",
".E c #DB4A4A",
".W c #C45151",
".Q c #C3C3C3",
".! c #F8F8F7",
".~ c #F6F6F5",
".^ c #BB4948",
"./ c #CF1010",
".( c #F4F4F3",
".) c #BDBDBD",
"._ c #BBBBBB",
".` c #B64543",
".' c #A50101",
".] c #EDEEEC",
".[ c #D26565",
".{ c #B93C3C",
".} c #6D6E6B",
".| c #A28988",
"X c #D55E5E",
"X. c None",
/* pixels */
".;.3.3.3.3.3.3.3 , =.+.X J.o.}X.",
".3.& r a.h z n N y e.(.~.~.] (X.",
".3 +.q i d.z.M.B y '.! ).G.H LX.",
".3 ] 3 0.s d.h.m {.w.H I.i D.lX.",
".3._ >.7 0 i.d.f.y ^.L.W | S.|X.",
".3.).> 2 7.r.s.d o.{ H.K.D.V R.'",
".3 `.-.4 6.e.a.g B.[ F % C q p.'",
".3 `.=.2 4 9 Y kX w v.E.u } g G",
".3 ` $.<.6 8 f.k W _ K.Z./ b s",
".3 ` # -.5 7.S ; ! P.%.T.T Z.O.'",
".3 `.@ *.4.9 0.0.x.8 / ..J x < t",
".3 `.@ & > 3 7.p u.^ Q.R s.n.C.v",
".3 `.@ # - 1 h V ~... 5.U X AX.",
".3 ` @ O.t E m.b l.j j.#.`.c [X.",
".3.Q c U.Y.A T.I M M M M M.:.$X.",
".;.P ,.1 : : : :.,.,.,.,., :.*X."
};
/* actions/list-remove.png */
/* XPM */
const char *tango_list_remove[] = {
/* width height ncolors chars_per_pixel */
"16 16 20 1",
/* colors */
" c #000000",
". c #7DA6D7",
"X c #86ADD9",
"o c #9FBEE0",
"O c #B6CCE6",
"+ c #83AAD8",
"@ c #BBD1E7",
"# c #7FA8D7",
"$ c #94B6DB",
"% c #3465A4",
"& c #95B7DB",
"* c #B5CCE6",
"= c #B4CCE5",
"- c #92B4DA",
"; c #B6CDE6",
": c #B7CEE6",
"> c #90B3DA",
", c #C0D3E8",
"< c #BCD1E7",
"1 c None",
/* pixels */
"1111111111111111",
"1111111111111111",
"1111111111111111",
"1111111111111111",
"1111111111111111",
"1111111111111111",
"11%%%%%%%%%%%%11",
"11%,@<::::;*O%11",
"11%=&$->X+#.o%11",
"11%%%%%%%%%%%%11",
"1111111111111111",
"1111111111111111",
"1111111111111111",
"1111111111111111",
"1111111111111111",
"1111111111111111"
};
/* devices/multimedia-player.png */
/* XPM */
const char *tango_multimedia_player[] = {
/* width height ncolors chars_per_pixel */
"16 16 79 1",
/* colors */
" c #666864",
". c #626460",
"X c #858782",
"o c #80817D",
"O c #7E7F7B",
"+ c #7D7F7A",
"@ c #7C7D79",
"# c #7B7D78",
"$ c #CBCFAC",
"% c #7A7B77",
"& c #696B66",
"* c #CBD0A5",
"= c #676964",
"- c #C9D0A3",
"; c #A4A6A3",
": c #D1D6AE",
"> c #5B5B58",
", c #BDC58D",
"< c #B2B796",
"1 c #C3C996",
"2 c #8A8C89",
"3 c #B8B9B6",
"4 c #A5A7A3",
"5 c #989996",
"6 c #C3C79F",
"7 c #BFC59B",
"8 c #C5C9A4",
"9 c #838581",
"0 c #7C7D7A",
"q c #AEAEAB",
"w c #A8AAA5",
"e c #6E6F6C",
"r c #A2A49F",
"t c #BEC496",
"y c #969893",
"u c #92948F",
"i c #91928E",
"p c #BBC096",
"a c #555753",
"s c #535551",
"d c #888A85",
"f c #80827D",
"g c #B8BCAA",
"h c #CFD4B0",
"j c #7E807B",
"k c #7C7E79",
"l c #7A7C77",
"z c #787A75",
"x c #747671",
"c c #70726D",
"v c #6E706B",
"b c #6C6E69",
"n c #6A6C67",
"m c #686A65",
"M c #9B9D9A",
"N c #939592",
"B c #C3CA96",
"V c #B6B6B4",
"C c #B4B5A8",
"Z c #BBC291",
"A c #ADAEAB",
"S c #A5A6A3",
"D c #A4A6A2",
"F c #9FA09D",
"G c #696968",
"H c #B8BCA8",
"J c #B3BC78",
"K c #B6BAA6",
"L c #898A87",
"P c #C4CAA3",
"I c #C5CB9A",
"U c #B9B9B6",
"Y c #C9CEAB",
"T c #787A76",
"R c #767874",
"E c #BBC286",
"W c #747672",
"Q c #A6A7A3",
"! c None",
/* pixels */
"saaaaaaaaaaaaaaa",
"aRQQQ444444S;DRa",
"a5i%%%@@@@@Ood5a",
"a5N<68Y$P7tZh25a",
"a5rpBI-*1,EJ:y5a",
"a5uCgHHHHHHKKX5a",
"a5vbbnbvbnnbnn5a",
"a5&=m==&m==&=m5a",
"a5zqMwAWxWc>. 5a",
"a5L3DVU+++TG0e5a",
"a5+++++++++9fj5a",
"a5kkkkkkkkkkkk5a",
"a5#F#F########5a",
"a5llllllllllll5a",
"aR555555555555Ra",
"aaaaaaaaaaaaaaaa"
};
/* apps/internet-web-browser.png */
/* XPM */
const char *tango_internet_web_browser[] = {
/* width height ncolors chars_per_pixel */
"16 16 167 2",
/* colors */
" c #000000",
" . c #56719D",
" X c #6984A9",
" o c #DCE1E5",
" O c #F1F2F3",
" + c #8BA7C7",
" @ c #84A6CA",
" # c #DFEFFF",
" $ c #93B6DC",
" % c #EDEEEF",
" & c #5A79A4",
" * c #5979A3",
" = c #5877A2",
" - c #BCC4CC",
" ; c #B1C0D5",
" : c #E3E4E5",
" > c #5685B7",
" , c #B1CEEC",
" < c #627CA5",
" 1 c #B3C1D0",
" 2 c #F0F4F8",
" 3 c #B5BEC8",
" 4 c #CCDDEF",
" 5 c #DBDEE0",
" 6 c #7591B4",
" 7 c #759FCB",
" 8 c #BED4EB",
" 9 c #F8F9F9",
" 0 c #B7C2CD",
" q c #BECFE1",
" w c #BCCDDF",
" e c #5B7AA4",
" r c #B5C5D8",
" t c #5978A2",
" y c #93ABC7",
" u c #C6CFD8",
" i c #D4DDE9",
" p c #A3B8D0",
" a c #A0B4CD",
" s c #BEC7D0",
" d c #CAD5DF",
" f c #5988BC",
" g c #E0E3E4",
" h c #DFE1E3",
" j c #83A7CE",
" k c #637FA8",
" l c #617FA6",
" z c #FEFEFE",
" x c #D7D9DB",
" c c #DCE4ED",
" v c #F6F6F6",
" b c #5E7DA6",
" n c #628FC1",
" m c #CCD9E7",
" M c #E6EBF0",
" N c #C0C6CE",
" B c #57759F",
" V c #DBE4EF",
" C c #E2E2E2",
" Z c #80A7D1",
" A c #E0E0E0",
" S c #B7C8DC",
" D c #B1C2D6",
" F c #DCE3E9",
" G c #6B96C6",
" H c #7A95B7",
" J c #BABFC4",
" K c #A9BCD1",
" L c #D9E1E9",
" P c #CED0D1",
" I c #6983A6",
" U c #C8CFD5",
" Y c #7591B5",
" T c #9DA6AE",
" R c #6D90B7",
" E c #D2E5F9",
" W c #819ABA",
" Q c #DEE2E7",
" ! c #D6DFE9",
" ~ c #A3B6CE",
" ^ c #DAEAFA",
" / c #CFD9E2",
" ( c #5A7AA4",
" ) c #5C8ABD",
" _ c #A2BDDA",
" ` c #D5DFEB",
" ' c #A5B7C9",
" ] c #CCD7E2",
" [ c #C3D2E3",
" { c #5686BA",
" } c #E3F1FF",
" | c #C8CED4",
". c #E2EFFE",
".. c #7792B6",
".X c #516994",
".o c #9BB2CC",
".O c #9AB0CB",
".+ c #839BBB",
".@ c #C9E1F9",
".# c #F4F4F5",
".$ c #CED1D3",
".% c #E0EFFF",
".& c #4F80B6",
".* c #CEDBEA",
".= c #5D7DA6",
".- c #5A79A3",
".; c #5877A1",
".: c #E0E5EB",
".> c #94ACC8",
"., c #7E97B9",
".< c #6C96C5",
".1 c #BECBDA",
".2 c #E6EBF4",
".3 c #DAEBFC",
".4 c #D4E5F6",
".5 c #E4E6E8",
".6 c #E2E4E6",
".7 c #9CBDE0",
".8 c #6380A8",
".9 c #C7CDD2",
".0 c #ACCAE9",
".q c #BBC9DA",
".w c #9DB3CD",
".e c #5E7AA3",
".r c #FDFDFD",
".t c #BCD7F2",
".y c #FBFBFB",
".u c #5A769F",
".i c #F9F9F9",
".p c #58749D",
".a c #AABED3",
".s c #F5F5F5",
".d c #E1F0FF",
".f c #EFEFEF",
".g c #BECAD6",
".h c #BCC8D4",
".j c #5876A0",
".k c #719BC9",
".l c #B5D1EE",
".z c #B8BFC6",
".x c #576F95",
".c c #D5DFE9",
".v c #DEEEFF",
".b c #B8C9DD",
".n c #627BA3",
".m c #101221",
".M c #AEB5BC",
".N c #AFBFD4",
".B c #4B6189",
".V c #D3D3D3",
".C c #D1D1D1",
".Z c #7994B6",
".A c #DCDDDF",
".S c #B4C7DC",
".D c #9FB4CE",
".F c #A4B5C9",
".G c #9CB2CB",
".H c #708AAD",
".J c #CCE3FA",
".K c #ABBDD3",
".L c #B3CCE8",
".P c #E2F1FF",
".I c #617FA8",
".U c #DEEDFB",
".Y c #D5E8FC",
".T c #5977A0",
".R c None",
/* pixels */
".R.R.R.R.R.j e ( t =.R.R.R.R.R.R",
".R.R.R.e.+.q c.2 ` D., *.R.R.R.R",
".R.R l ;.: / J.1 8.g L ~.-.R.R.R",
".R X.N Q.$. .U.4.h N 5 M a (.R.R",
".n W 2 : d.P } ^ u x.#.y.c.Z.R.R",
".H r g 4.%.d.d.3.9 s.F 3.5 p (.R",
".8 i.a.J.v # #.*.r z.r.6.A w (.R",
" e V.0.t.@.Y E U z z z.i.M [ (.R",
" b m 0 |.L.l , K 9 O z.f P.b (.R",
" k.K o z h _.7 $ @ +.s C T.w (.R",
" < H ! z z % j Z 7.< A.V ' Y.R.R",
".R.I.G F v.z.k G n f.C -.> (.R.R",
".R.R.=.O ] R ) {.& > 1 y *.R.R.R",
".R.R.R I...D S q.S.o 6.T.R.R.R.R",
".R.R.R.R.x.u.- & t.p.R.R.R.R.R.R",
".R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R"
};
/* actions/list-add.png */
/* XPM */
const char *tango_list_add[] = {
/* width height ncolors chars_per_pixel */
"16 16 20 1",
/* colors */
" c #000000",
". c #7DA6D7",
"X c #86ADD9",
"o c #9FBEE0",
"O c #B6CCE6",
"+ c #83AAD8",
"@ c #BBD1E7",
"# c #7FA8D7",
"$ c #94B6DB",
"% c #3465A4",
"& c #95B7DB",
"* c #B5CCE6",
"= c #B4CCE5",
"- c #92B4DA",
"; c #B6CDE6",
": c #B7CEE6",
"> c #90B3DA",
", c #C0D3E8",
"< c #BCD1E7",
"1 c None",
/* pixels */
"1111111111111111",
"1111111111111111",
"111111%%%%111111",
"111111%::%111111",
"111111%::%111111",
"111111%::%111111",
"11%%%%%::%%%%%11",
"11%,@<::::;*O%11",
"11%=&$->X+#.o%11",
"11%%%%%XX%%%%%11",
"111111%:X%111111",
"111111%:X%111111",
"111111%::%111111",
"111111%%%%111111",
"1111111111111111",
"1111111111111111"
};
/* apps/preferences-desktop-font.png */
/* XPM */
const char *tango_preferences_desktop_font[] = {
/* width height ncolors chars_per_pixel */
"16 16 79 1",
/* colors */
" c #000000",
". c #B1B1B1",
"X c #ADADAD",
"o c #A7A7A7",
"O c #797979",
"+ c #EAEBEB",
"@ c #E9E9EA",
"# c #E8E9E9",
"$ c #5F5F5F",
"% c #4D4D4D",
"& c #4B4B4B",
"* c #FCFCFC",
"= c #494949",
"- c #FAFAFA",
"; c #474747",
": c #F8F8F8",
"> c #F6F6F6",
", c #F4F4F4",
"< c #F2F2F2",
"1 c #F0F0F0",
"2 c #EEEEEE",
"3 c #ECECEC",
"4 c #E8E8E8",
"5 c #E6E6E6",
"6 c #E5E6E5",
"7 c #E4E4E4",
"8 c #E2E2E2",
"9 c #2F2F2F",
"0 c #CECECE",
"q c #050505",
"w c #EAE9E9",
"e c #010101",
"r c #E8E7E7",
"t c #E7E7E6",
"y c #8A8C87",
"u c #888A85",
"i c #828282",
"p c #7C7C7C",
"a c #767676",
"s c #747474",
"d c #E4E4E5",
"f c #666666",
"g c #626262",
"h c #565656",
"j c #FFFFFF",
"k c #FDFDFD",
"l c #4A4A4A",
"z c #FBFBFB",
"x c #484848",
"c c #F9F9F9",
"v c #F7F7F7",
"b c #F5F5F5",
"n c #F3F3F3",
"m c #F1F1F1",
"M c #EFEFEF",
"N c #EDEDED",
"B c #ECEDEC",
"V c #ECEBEC",
"C c #EBEBEB",
"Z c #EAEBEA",
"A c #E9E9E9",
"S c #E6E7E6",
"D c #343434",
"F c #E4E5E4",
"G c #E4E3E4",
"H c #E3E3E3",
"J c #2E2E2E",
"K c #2C2C2C",
"L c #DBDBDB",
"P c #222222",
"I c #D3D3D3",
"U c #202020",
"Y c #BFBFBF",
"T c #B8B9B8",
"R c #060606",
"E c #ECECEB",
"W c #040404",
"Q c #EBEAEA",
"! c None",
/* pixels */
"!uuuuuuuuuuuuuu!",
"ujjjjjjjjjjjjjju",
"ujHoi99H5555HHku",
"ujH8L09H4A44HHku",
"ujH.9s95S56dGHku",
"ujH9IY9AAw#r5Fzu",
"uj7999T&9BV+Atzu",
"uj53N2M;K1M2E@:u",
"uj4NM1mxUD eg<>u",
"ujwM1<nx a<f .Mu",
"ujZ1<nb=qncL pMu",
"ujCmn,>=RmzI aMu",
"uj+<,>vl Ov$ XMu",
"ujQ<,>:hJPW %vMu",
"uj******--->>>Mu",
"!uuuuuuuuuuuuuu!"
};
/* actions/process-stop.png */
/* XPM */
const char *tango_process_stop[] = {
/* width height ncolors chars_per_pixel */
"16 16 136 2",
/* colors */
" c #000000",
" . c #BF0000",
" X c #EB4C4C",
" o c #F68888",
" O c #D89292",
" + c #E8BCBC",
" @ c #FCF7F7",
" # c #EF6A6A",
" $ c #DB3C3C",
" % c #ED4747",
" & c #DF2C2C",
" * c #B22424",
" = c #B82323",
" - c #D75F5F",
" ; c #D52F2F",
" : c #F58383",
" > c #C41B1B",
" , c #B41F1F",
" < c #F26969",
" 1 c #C10101",
" 2 c #CC0F0F",
" 3 c #E4AAAA",
" 4 c #E9A5A5",
" 5 c #F68787",
" 6 c #D22F2F",
" 7 c #C70000",
" 8 c #BF1919",
" 9 c #F78B8B",
" 0 c #E6A5A5",
" q c #D13131",
" w c #DF2B2B",
" e c #BF0505",
" r c #D85C5C",
" t c #CF2F2F",
" y c #BD0303",
" u c #E83737",
" i c #E6E0E0",
" p c #C92929",
" a c #FEFEFE",
" s c #880000",
" d c #CC2F2F",
" f c #DB4141",
" g c #C10000",
" h c #E6ABAB",
" j c #E6D9D9",
" k c #DA6464",
" l c #ECECEC",
" z c #EA3F3F",
" x c #E8E8E8",
" c c #D75757",
" v c #DACDCD",
" b c #EB4343",
" n c #D85B5B",
" m c #ED5252",
" M c #BD0202",
" N c #D31111",
" B c #BC1818",
" V c #E6DFDF",
" C c #E63434",
" Z c #B32626",
" A c #AF2222",
" S c #DB4040",
" D c #B41D1D",
" F c #EC6161",
" G c #EF5A5A",
" H c #890303",
" J c #D65F5F",
" K c #ED6565",
" L c #D85A5A",
" P c #D65858",
" I c #DA3B3B",
" U c #E39696",
" Y c #E5A5A5",
" T c #BE0505",
" R c #CE2F2F",
" E c #C30000",
" W c #D01010",
" Q c #E73737",
" ! c #B01818",
" ~ c #D21F1F",
" ^ c #890202",
" / c #CB0101",
" ( c #870000",
" ) c #E83B3B",
" _ c #CE2828",
" ` c #F17575",
" ' c #EE6868",
" ] c #BD0000",
" [ c #F3EDED",
" { c #F68A8A",
" } c #DB5F5F",
" | c #C70303",
". c #B12222",
".. c #BE0404",
".X c #D75B5B",
".o c #E5DFDF",
".O c #E94545",
".+ c #C71D1D",
".@ c #B72121",
".# c #F9F9F9",
".$ c #DC4242",
".% c #B11B1B",
".& c #F1F1F1",
".* c #9E3333",
".= c #EDEDED",
".- c #F58585",
".; c #F38383",
".: c #DFDFDF",
".> c #DA6767",
"., c #DBDBDB",
".< c #F68989",
".1 c #D23131",
".2 c #A43F3F",
".3 c #D02F2F",
".4 c #C50000",
".5 c #D93B3B",
".6 c #D53737",
".7 c #DE9292",
".8 c #DF2D2D",
".9 c #F06F6F",
".0 c #890000",
".q c #C51A1A",
".w c #B11A1A",
".e c #D63B3B",
".r c #D52323",
".t c #EC4A4A",
".y c #E2DEDE",
".u c #D89999",
".i c #DEACAC",
".p c #B82424",
".a c #D76060",
".s c #D53030",
".d c #DAD6D6",
".f c #880202",
".g c #860000",
".h c None",
/* pixels */
".h.h.h.h.0.g.g.g.g.g.g.0.h.h.h.h",
".h.h.h.0 A o 9 9 { 5 : =.0.h.h.h",
".h.h.0. .;.$ ; ; ; ; $ ` ,.0.h.h",
".h.0 *.;.$.6 ; ; ; ;.6 I.9.%.0.h",
".0 Z.; f c v - ; ; r j }.5 # !.0",
".f.< S ; O.,.d.a L i.= Y 6.e '.f",
" H o ; ;.s.u.:.y V l h.1.3 R K ^",
" H o ; ; ;.s.i x l + q t R d F ^",
" H o ; ; ; n V l.& [ k R d p.O ^",
" H.- ; ;.X.o l 3 0.# @.>.q M u ^",
".f <.r ~.7 l 3.3 _ 4 a U ] y C ^",
".0.p G N / P |.4 E 1 J M.. w.+ (",
".h.0.@ m W 7.4 E g . ] T & > s.h",
".h.h.0 D X 2 E g . ] e.8 8 s.h.h",
".h.h.h.0.w.t % b z ) Q B s.h.h.h",
".h.h.h.h.0.g.g.g.g.g.g s.h.h.h.h"
};
/* actions/view-refresh.png */
/* XPM */
const char *tango_view_refresh[] = {
/* width height ncolors chars_per_pixel */
"16 16 100 2",
/* colors */
" c #9DBDDC",
" . c #6990C0",
" X c #3767A6",
" o c #3667A5",
" O c #3565A4",
" + c #DDE8F3",
" @ c #8AACD3",
" # c #99B9DB",
" $ c #B4CBE5",
" % c #D8E4F1",
" & c #5783BB",
" * c #537FB7",
" = c #4B77AF",
" - c #A0BEDE",
" ; c #3868A6",
" : c #3768A5",
" > c #4C79B3",
" , c #769DCF",
" < c #5580B5",
" 1 c #97B6D8",
" 2 c #8FACD0",
" 3 c #E4ECF5",
" 4 c #4E7AB1",
" 5 c #C8D8EA",
" 6 c #4C78AF",
" 7 c #8FB0D3",
" 8 c #6D94C2",
" 9 c #6891C7",
" 0 c #3C6BA9",
" q c #3A69A7",
" w c #3969A6",
" e c #C6D8EB",
" r c #4774AD",
" t c #C1D2E6",
" y c #6890C0",
" u c #CDDBEB",
" i c #3465A4",
" p c #6188B9",
" a c #DBE6F2",
" s c #BFD2E7",
" d c #84A6CE",
" f c #E5EDF5",
" g c #C9D9EA",
" h c #8FADD2",
" j c #A1BEDD",
" k c #3A6AA6",
" l c #E2EBF5",
" z c #88A7CE",
" x c #3768A6",
" c c #95B2D4",
" v c #3566A4",
" b c #C4D7EB",
" n c #4371AB",
" m c #A1BBD9",
" M c #E7EEF6",
" N c #BFD3E9",
" B c #5F87B9",
" V c #7298C5",
" C c #5D85B7",
" Z c #6C95C9",
" A c #82A5CE",
" S c #9CB7D7",
" D c #C9DAEC",
" F c #E3ECF5",
" G c #4C78B0",
" H c #8EAED3",
" J c #4F7CB6",
" K c #3969A7",
" L c #3869A6",
" P c #3767A5",
" I c #A8C2DF",
" U c #93B1D4",
" Y c #4170AB",
" T c #CCDDEE",
" R c #B0C9E3",
" E c #E5EDF6",
" W c #E4EDF5",
" Q c #FFFFFF",
" ! c #4D79B0",
" ~ c #C7D7E9",
" ^ c #4C77AF",
" / c #5B84B7",
" ( c #D5E2F0",
" ) c #3C6CA9",
" _ c #3A6AA7",
" ` c #E0E9F4",
" ' c #A8C1DE",
" ] c #8CADD3",
" [ c #B4CAE3",
" { c #3566A5",
" } c #7299CD",
" | c #88ABD2",
". c #CCDCED",
".. c #E6EEF6",
".X c #BCD1E7",
".o c #7EA4D5",
".O c #3D6DA9",
".+ c #3C6BA8",
".@ c #3B6BA7",
".# c None",
/* pixels */
".#.#.#.# q _ o K _.#.#.#.#.#.#.#",
".#.#.# ; y 7 I ' U B P.#.#.# i.#",
".#.# w ] j $ N T ( s = o n v.#",
".# K . V.+ v _ C m % a + z 5 _.#",
".# ; Y ) _.#.#.# L p u l.... _.#",
".# O _ 9 P.#.#.#.#.# v ~ e F k.#",
".# i.#.#.#.#.#.#.# ; 2 M a.. k.#",
".#.#.#.#.#.#.#.# i i r ^ ^ 6 i.#",
".# i i i i i i i.#.#.#.#.#.#.#.#",
".# i f E 3 S x.#.#.#.#.#.#.# i.#",
".# v.. b g i.#.#.#.#.# { Z * i.#",
".# P.. F W t ! L.#.#.# 0 J _ :.#",
".# ; % c ` +. h G { w w.O G _.#",
".# P / o 4 [ D.X R - | A H ;.#.#",
".# i o.#.# X < d 1 # @ 8 ;.#.#.#",
".# i.#.#.#.#.# _ L v _.@.#.#.#.#"
};
/* actions/go-next.png */
/* XPM */
const char *tango_go_next[] = {
/* width height ncolors chars_per_pixel */
"16 16 101 2",
/* colors */
" c #8BBB5D",
" . c #78B63D",
" X c #9CD267",
" o c #A7D17F",
" O c #B7D49C",
" + c #6EAC33",
" @ c #C3DCAB",
" # c #9EC976",
" $ c #C2DCAA",
" % c #66B817",
" & c #8AC255",
" * c #CBE0B6",
" = c #3B7504",
" - c #5AAC0B",
" ; c #66BF10",
" : c #5F8F31",
" > c #5E8F30",
" , c #82AB5A",
" < c #6FBA26",
" 1 c #9CC37A",
" 2 c #54A408",
" 3 c #89C350",
" 4 c #61B70E",
" 5 c #BBD99F",
" 6 c #6CBF1C",
" 7 c #C0DBA7",
" 8 c #74AF3B",
" 9 c #4F9C06",
" 0 c #3C7804",
" q c #3C7604",
" w c #4D8418",
" e c #A4CC7E",
" r c #8BC158",
" t c #AFD48C",
" y c #CEE3BB",
" u c #3A7405",
" i c #598C2A",
" p c #467C14",
" a c #B1D291",
" s c #88BB58",
" d c #ABD781",
" f c #A4C684",
" g c #91C164",
" h c #5FB20E",
" j c #C7DEB0",
" k c #C6DEAF",
" l c #40790A",
" z c #3A7304",
" x c #568926",
" c c #9BCA6D",
" v c #81AB5A",
" b c #52A007",
" n c #A5D773",
" m c #C5DDAD",
" M c #4E9A06",
" N c #3B7604",
" B c #3B7404",
" V c #A3CA7E",
" C c #427A0E",
" Z c #80BE44",
" A c #8BBD5C",
" S c #64BA11",
" D c #AAD581",
" F c #82BE49",
" G c #92D352",
" H c #6BAC2F",
" J c #538B1E",
" K c #A8DA78",
" L c #5BAE0B",
" P c #6CBA1F",
" I c #8DC25A",
" U c #FFFFFF",
" Y c #8CBE5C",
" T c #8BBC5B",
" R c #ABD681",
" E c #62B90E",
" W c #B9D79C",
" Q c #71A63E",
" ! c #A0D56C",
" ~ c #68A92B",
" ^ c #9DC873",
" / c #BDD9A3",
" ( c #99C46F",
" ) c #5EB30D",
" _ c #7FCB34",
" ` c #8CC358",
" ' c #CBE1B7",
" ] c #3A7404",
" [ c #8DC15C",
" { c #57A709",
" } c #437A10",
" | c #64BC0F",
". c #88C44D",
".. c #AACE89",
".X c #85B954",
".o c #84C249",
".O c #A6D37B",
".+ c #8FC161",
".@ c #6AA136",
".# c #8DC655",
".$ c None",
/* pixels */
".$.$.$.$.$ =.$.$.$.$.$.$.$.$.$.$",
".$.$.$.$.$ z i ].$.$.$.$.$.$.$.$",
".$.$.$.$.$ z ' , ].$.$.$.$.$.$.$",
".$.$.$.$.$ z y @ f }.$.$.$.$.$.$",
" ] z z z z N * ( a O : B.$.$.$.$",
" z 7 $ m k j j g.+ ^ 5 v u.$.$.$",
" z /.X s T A Y [ I & ` t 1 p.$.$",
" z W 8 + ~ H . F 3. .o Z c.. > =",
" z V M M M b { L h % P <.# # x =",
" z V M M 9 2 - ) E | 6 X C.$.$",
" z V V V e o D 4 ; _ K Q N.$.$.$",
" ] z z z z 0 R S G n J q.$.$.$.$",
".$.$.$.$.$ z d ! r l.$.$.$.$.$.$",
".$.$.$.$.$ z.O.@ q.$.$.$.$.$.$.$",
".$.$.$.$.$ z w N.$.$.$.$.$.$.$.$",
".$.$.$.$.$ =.$.$.$.$.$.$.$.$.$.$"
};
/* actions/document-save-as.png */
/* XPM */
const char *tango_document_save_as[] = {
/* width height ncolors chars_per_pixel */
"16 16 101 2",
/* colors */
" c #000000",
" . c #739FC0",
" X c #6C8577",
" o c #81ADD1",
" O c #DFE2DE",
" + c #DCDCDB",
" @ c #8FB3CE",
" # c #96BBD8",
" $ c #4A7180",
" % c #95A9AF",
" & c #B7B8B6",
" * c #4E6A7D",
" = c #3D698A",
" - c #AFB0AE",
" ; c #AEB0AD",
" : c #ACCBE3",
" > c #ABCBE2",
" , c #EDEDEE",
" < c #E9E9EA",
" 1 c #A2A4A1",
" 2 c #6B716E",
" 3 c #9BC2DF",
" 4 c #38678B",
" 5 c #6E99B6",
" 6 c #FCFCFC",
" 7 c #FAFAFA",
" 8 c #6B7F88",
" 9 c #F4F4F4",
" 0 c #F3F4F3",
" q c #F2F2F2",
" w c #CED4C8",
" e c #F0F0F0",
" r c #EFEEEF",
" t c #EEEEEE",
" y c #EDEEED",
" u c #ECECEC",
" i c #627075",
" p c #3F6C8E",
" a c #719FBF",
" s c #E4E4E4",
" d c #79A7CA",
" f c #DCDCDC",
" g c #DBDCDB",
" h c #C9D6DD",
" j c #DDE1D6",
" k c #D5DFE5",
" l c #AEB0AE",
" z c #44789F",
" x c #5186AF",
" c c #7798B0",
" v c #ACBCC3",
" b c #DCDBDB",
" n c #C5DBEC",
" m c #3D6B8E",
" M c #58787A",
" N c #C1D9EB",
" B c #6A7F5A",
" V c #3B6B8F",
" C c #9EBFD9",
" Z c #E2E6DD",
" A c #9AAEB4",
" S c #ABC8DF",
" D c #6E706B",
" F c #92A6AC",
" G c #EEEEEF",
" H c #EDEEEE",
" J c #427092",
" K c #EBECEC",
" L c #688BA0",
" P c #D0DFEF",
" I c #6296BB",
" U c #DBDCDC",
" Y c #72756B",
" T c #92B7D3",
" R c #667173",
" E c #98BFDC",
" W c #FFFFFF",
" Q c #FDFDFD",
" ! c #FCFBFC",
" ~ c #F9F9F9",
" ^ c #F7F7F7",
" / c #AFB0AD",
" ( c #F3F3F3",
" ) c #F1F1F1",
" _ c #41749A",
" ` c #EFEFEF",
" ' c #EEEFEE",
" ] c #CACFC4",
" [ c #EDEDED",
" { c #EAE9EA",
" } c #A3A4A1",
" | c #C5CBBF",
". c #4A6D85",
".. c #436E88",
".X c #E3E3E3",
".o c #DCDBDC",
".O c #5892BD",
".+ c #B1CEE6",
".@ c #4D7991",
".# c #547D9B",
".$ c None",
/* pixels */
".$.$.$ 4 4 4 = $ M.$.$.$.$.$.$.$",
".$.$.$.+ P n 3 L...$.$.$.$.$.$.$",
" 8 R i. _ z C N x * D D D D D D",
" 2 Z W j h 5 4 > T.# k W W W 9 D",
" Y Q t [ O c 4 d @ m v , H y 0 D",
" D ! K 4 4 4 4 d.O 4 4 4 4 u ( D",
" D 7 < ] 4 E a a a . # 4 % { q D",
" D ~ 7 s | 4 E . . S 4 F s 9 ) D",
" D ~ t 7 s | 4 : E V F s 7 t ) D",
" D ^.X t 7 7 w p 4 A 7 6 t.X e D",
" D } 1 } } } } } } } } } } } } D",
" D f b + f.o +.o f g U + U f D",
" D ` / l - ; / / / / r ' G r D",
" D W & & & & & & & & W W W W D",
" D W W W W W W W W W W W W W D",
" D D D D D D D D D D D D D D D D"
};
/* actions/document-save.png */
/* XPM */
const char *tango_document_save[] = {
/* width height ncolors chars_per_pixel */
"16 16 114 2",
/* colors */
" c #000000",
" . c #739FC0",
" X c #AFAFAF",
" o c #6C8577",
" O c #81ADD1",
" + c #DFE2DE",
" @ c #A9A9A9",
" # c #A8A7A8",
" $ c #8FB3CE",
" % c #9F9F9F",
" & c #96BBD8",
" * c #4A7180",
" = c #95A9AF",
" - c #B7B6B6",
" ; c #4E6A7D",
" : c #3D698A",
" > c #AAAAA9",
" , c #ACCBE3",
" < c #ABCBE2",
" 1 c #EDEDEE",
" 2 c #E9E9EA",
" 3 c #6B716E",
" 4 c #9BC2DF",
" 5 c #38678B",
" 6 c #6E99B6",
" 7 c #FEFEFE",
" 8 c #FCFCFC",
" 9 c #FAFAFA",
" 0 c #6B7F88",
" q c #F4F4F4",
" w c #F3F4F3",
" e c #F2F2F2",
" r c #CED4C8",
" t c #F0F0F0",
" y c #EEEEEE",
" u c #EDEEED",
" i c #ECECEC",
" p c #627075",
" a c #3F6C8E",
" s c #719FBF",
" d c #E4E4E4",
" f c #79A7CA",
" g c #DCDCDC",
" h c #D6D6D6",
" j c #C9D6DD",
" k c #D2D2D2",
" l c #D0D0D0",
" z c #CECECE",
" x c #DDE1D6",
" c c #CACACA",
" v c #C8C8C8",
" b c #C4C4C4",
" n c #C2C2C2",
" m c #BCBCBC",
" M c #D5DFE5",
" N c #B4B4B4",
" B c #44789F",
" V c #5186AF",
" C c #7798B0",
" Z c #ACBCC3",
" A c #C5DBEC",
" S c #3D6B8E",
" D c #58787A",
" F c #C1D9EB",
" G c #6A7F5A",
" H c #3B6B8F",
" J c #9EBFD9",
" K c #E2E6DD",
" L c #9AAEB4",
" P c #ABC8DF",
" I c #6E706B",
" U c #92A6AC",
" Y c #A8A7A7",
" T c #EDEEEE",
" R c #427092",
" E c #EBECEC",
" W c #688BA0",
" Q c #D0DFEF",
" ! c #6296BB",
" ~ c #72756B",
" ^ c #92B7D3",
" / c #667173",
" ( c #98BFDC",
" ) c #FFFFFF",
" _ c #FDFDFD",
" ` c #FCFBFC",
" ' c #F9F9F9",
" ] c #F7F7F7",
" [ c #F3F3F3",
" { c #F1F1F1",
" } c #41749A",
" | c #CACFC4",
". c #EDEDED",
".. c #EBEBEB",
".X c #EAE9EA",
".o c #C5CBBF",
".O c #4A6D85",
".+ c #436E88",
".@ c #E3E3E3",
".# c #DDDDDD",
".$ c #D5D5D5",
".% c #D1D1D1",
".& c #CFCFCF",
".* c #CDCDCD",
".= c #CBCBCB",
".- c #C9C9C9",
".; c #5892BD",
".: c #C5C5C5",
".> c #C3C3C3",
"., c #B1CEE6",
".< c #4D7991",
".1 c #B9B9B9",
".2 c #547D9B",
".3 c None",
/* pixels */
".3.3.3 5 5 5 : * D.3.3.3.3.3.3.3",
".3.3.3., Q A 4 W.+.3.3.3.3.3.3.3",
" 0 / p.O } B J F V ; I I I I I I",
" 3 K ) x j 6 5 < ^.2 M ) ) ) q I",
" ~ _ y. + C 5 f $ S Z 1 T u w I",
" I ` E 5 5 5 5 f.; 5 5 5 5 i [ I",
" I 9 2 | 5 ( s s s . & 5 =.X e I",
" I ' 9 d.o 5 ( . . P 5 U d q { I",
" I ' y 9 d.o 5 , ( H U d 9 y { I",
" I ].@ y 9 9 r a 5 L 9 8 y.@ t I",
" I 7 ) ) ) ) ) ) ) q q.....@ t I",
" I z.-.-.-.-.:.-.-.:.:.:.:.: h I",
" I z.: % X m b v l @ k @ k.1 c I",
" I.*.> > N n b v.= #.% Y.% - c I",
" I.# g g g.$.$.&.&.&.&.&.&.& c I",
" I I I I I I I I I I I I I I I I"
};
/* actions/system-shutdown.png */
/* XPM */
const char *tango_system_shutdown[] = {
/* width height ncolors chars_per_pixel */
"16 16 66 1",
/* colors */
" c #ABABAB",
". c #A9A9A9",
"X c #8F8F8F",
"o c #858585",
"O c #7D7D7D",
"+ c #6F6F6F",
"@ c #6D6D6D",
"# c #656565",
"$ c #616161",
"% c #5F5F5F",
"& c #555555",
"* c #515151",
"= c #F6F6F6",
"- c #F4F4F4",
"; c #F0F0F0",
": c #EEEEEE",
"> c #ECECEC",
", c #EAEAEA",
"< c #E8E8E8",
"1 c #E6E6E6",
"2 c #E4E4E4",
"3 c #E2E2E2",
"4 c #E0E0E0",
"5 c #2D2D2D",
"6 c #DEDEDE",
"7 c #2B2B2B",
"8 c #272727",
"9 c #D8D8D8",
"0 c #D4D4D4",
"q c #D2D2D2",
"w c #CCCCCC",
"e c #C2C2C2",
"r c #BCBCBC",
"t c #A6A6A6",
"y c #A2A2A2",
"u c #A0A0A0",
"i c #888A85",
"p c #8E8E8E",
"a c #848484",
"s c #808080",
"d c #7A7A7A",
"f c #6C6C6C",
"g c #606060",
"h c #F7F7F7",
"j c #F5F5F5",
"k c #F3F3F3",
"l c #F1F1F1",
"z c #EFEFEF",
"x c #EDEDED",
"c c #EBEBEB",
"v c #E9E9E9",
"b c #E7E7E7",
"n c #E5E5E5",
"m c #E3E3E3",
"M c #E1E1E1",
"N c #DFDFDF",
"B c #282828",
"V c #C9C9C9",
"C c #C7C7C7",
"Z c #C5C5C5",
"A c #C3C3C3",
"S c #C1C1C1",
"D c #BBBBBB",
"F c #B9B9B9",
"G c #B3B3B3",
"H c None",
/* pixels */
"HiiiiiiiiiiiiiiH",
"immmmmmmmmmmmmmi",
"i3mz=hhhhhhh=1mi",
"imz=jjjjjjjjjk2i",
"in-kkwaooop;kkbi",
"i1-ll*****B3ll<i",
"i<kzz&OssX84z:vi",
"iv;xxgtuGr74xx,i",
"i,zcc#.FAV5Mc,>i",
"ix,22dC>>m%22m:i",
"i:<33O6jjj+63Mzi",
"iz144oyeeDO946;i",
"iz,66wf@$f q6Nli",
"izlcMM6rSZV0M;li",
"illlllllllllllli",
"HiiiiiiiiiiiiiiH"
};
/* places/start-here.png */
/* XPM */
const char *tango_start_here[] = {
/* width height ncolors chars_per_pixel */
"16 16 53 1",
/* colors */
" c #6593C6",
". c #5080B8",
"X c #3869A7",
"o c #3667A5",
"O c #2F5F9E",
"+ c #4474AF",
"@ c #4272AD",
"# c #234E8B",
"$ c #214C89",
"% c #204A88",
"& c #507FB7",
"* c #3A6AA8",
"= c #295694",
"- c #3868A6",
"; c #5E8CC1",
": c #214B88",
"> c #25518F",
", c #2C5B99",
"< c #3667A6",
"1 c #3465A4",
"2 c #4070AC",
"3 c #25508E",
"4 c #24508D",
"5 c #6492C5",
"6 c #2A5896",
"7 c #4E7DB6",
"8 c #3768A6",
"9 c #3566A4",
"0 c #3162A0",
"q c #30609F",
"w c #729FCF",
"e c #5B8ABF",
"r c #4575B0",
"t c #244F8C",
"y c #214B89",
"u c #204B88",
"i c #6895C8",
"p c #6795C7",
"a c #5180B8",
"s c #285593",
"d c #31619F",
"f c #2F5F9D",
"g c #5D8BC0",
"h c #FFFFFF",
"j c #6B98CA",
"k c #6996C8",
"l c #5483BA",
"z c #204A87",
"x c #3D6EAA",
"c c #2D5C9A",
"v c #3566A5",
"b c #234F8C",
"n c None",
/* pixels */
"nnnnnnnnnn%z:nnn",
"nno9-nnnnn#d6unn",
"nnxkl<nnnuq11bnn",
"nopww2nnnu111=zn",
"nowww.9nn4111cyn",
"n@www;Xnz=1110zn",
"1awwwjvnn=111qun",
"n&wwwionn3111,yn",
"n+wwweXnn$111snn",
"n*www7nnnzzzzznn",
"n11111nnnnnnnnnn",
"nnnnnnnnnzzzzznn",
"nv1111nnn:c1f:nn",
"n-gw58nnnntO>unn",
"nn2 ronnnnzzunnn",
"nnvv<nnnnnnnnnnn"
};
/* apps/system-software-update.png */
/* XPM */
const char *tango_system_software_update[] = {
/* width height ncolors chars_per_pixel */
"16 16 170 2",
/* colors */
" c #000000",
" . c #56719D",
" X c #DCE1E5",
" o c #F1F2F3",
" O c #8BA7C7",
" + c #84A6CA",
" @ c #DFEFFF",
" # c #93B6DC",
" $ c #EDEEEF",
" % c #774861",
" & c #5A79A4",
" * c #5979A3",
" = c #5877A2",
" - c #BCC4CC",
" ; c #E3E4E5",
" : c #5685B7",
" > c #B1CEEC",
" , c #607AA3",
" < c #B3C1D0",
" 1 c #B5BEC8",
" 2 c #5B6D94",
" 3 c #5A6B93",
" 4 c #CCDDEF",
" 5 c #DBDEE0",
" 6 c #7591B4",
" 7 c #759FCB",
" 8 c #BED4EB",
" 9 c #F8F9F9",
" 0 c #B7C2CD",
" q c #BECFE1",
" w c #BCCDDF",
" e c #506A96",
" r c #5978A2",
" t c #93ABC7",
" y c #B4BCCD",
" u c #C6CFD8",
" i c #A3B8D0",
" p c #843345",
" a c #A0B4CD",
" s c #516790",
" d c #BEC7D0",
" f c #CAD5DF",
" g c #5988BC",
" h c #DFE1E3",
" j c #83A7CE",
" k c #AFB8CB",
" l c #FEFEFE",
" z c #D7D9DB",
" x c #5C77A1",
" c c #DCE4ED",
" v c #F6F6F6",
" b c #6B7B9F",
" n c #628FC1",
" m c #E6EBF0",
" M c #C0C6CE",
" N c #768BAD",
" B c #E2E2E2",
" V c #80A7D1",
" C c #E0E0E0",
" Z c #B7C8DC",
" A c #B1C2D6",
" S c #DCE3E9",
" D c #6B96C6",
" F c #705472",
" G c #9E080B",
" H c #7A95B7",
" J c #656588",
" K c #4E648F",
" L c #6F5674",
" P c #BABFC4",
" I c #A9BCD1",
" U c #D9E1E9",
" Y c #CED0D1",
" T c #6983A6",
" R c #C8CFD5",
" E c #8593B1",
" W c #546E98",
" Q c #A40000",
" ! c #D9DCDF",
" ~ c #9DA6AE",
" ^ c #6D90B7",
" / c #686284",
" ( c #991116",
" ) c #D2E5F9",
" _ c #ADB9CE",
" ` c #D6DFE9",
" ' c #A3B6CE",
" ] c #DAEAFA",
" [ c #CFD9E2",
" { c #5A7AA4",
" } c #5C8ABD",
" | c #A2BDDA",
". c #597199",
".. c #D5DFEB",
".X c #A5B7C9",
".o c #CCD7E2",
".O c #C3D2E3",
".+ c #5686BA",
".@ c #E3F1FF",
".# c #C8CED4",
".$ c #E2EFFE",
".% c #7792B6",
".& c #516994",
".* c #9BB2CC",
".= c #9AB0CB",
".- c #9EADC5",
".; c #C9E1F9",
".: c #F4F4F5",
".> c #CED1D3",
"., c #E0EFFF",
".< c #4F80B6",
".1 c #CEDBEA",
".2 c #405583",
".3 c #5D7DA6",
".4 c #5A79A3",
".5 c #94ACC8",
".6 c #7E97B9",
".7 c #6C96C5",
".8 c #BECBDA",
".9 c #C4CAD6",
".0 c #E6EBF4",
".q c #DAEBFC",
".w c #D4E5F6",
".e c #E4E6E8",
".r c #E2E4E6",
".t c #9CBDE0",
".y c #6E5471",
".u c #95A7C2",
".i c #C7CDD2",
".p c #ACCAE9",
".a c #9DB3CD",
".s c #FDFDFD",
".d c #BCD7F2",
".f c #FBFBFB",
".g c #5A769F",
".h c #F9F9F9",
".j c #58749D",
".k c #AABED3",
".l c #F5F5F5",
".z c #E1F0FF",
".x c #EFEFEF",
".c c #BECAD6",
".v c #BCC8D4",
".b c #719BC9",
".n c #B5D1EE",
".m c #B8BFC6",
".M c #364878",
".N c #576F95",
".B c #D5DFE9",
".V c #DEEEFF",
".C c #B8C9DD",
".Z c #101221",
".A c #AEB5BC",
".S c #4B6189",
".D c #D3D3D3",
".F c #D1D1D1",
".G c #7994B6",
".H c #DCDDDF",
".J c #931821",
".K c #B4C7DC",
".L c #9FB4CE",
".P c #A4B5C9",
".I c #9CB2CB",
".U c #CCE3FA",
".Y c #B3CCE8",
".T c #E2F1FF",
".R c #617FA8",
".E c #DEEDFB",
".W c #D5E8FC",
".Q c None",
/* pixels */
".Q.M.M.M.M.M.M.M r =.Q.Q.Q.Q.Q.Q",
".Q.Q.M.M.M b c.0.. A.6 *.Q.Q.Q.Q",
".Q.Q W 3 y [ P.8 8.c U '.4.Q.Q.Q",
".Q. 3.9.>.$.E.w.v M 5 m a {.Q.Q",
" K.M k ; f.T.@ ] u z.:.f.B.G.Q.Q",
" s 2 ! 4.,.z.z.q.i d.P 1.e i {.Q",
".2 E.k.U.V @ @.1.s l.s.r.H w /.Q",
".M _.p.d.;.W ) R l l l.h.A.O F.Q",
" e.- 0.#.Y.n > I 9 o l.x Y.C L.Q",
" x.u X l h |.t # + O.l B ~.a p Q",
" , H ` l l $ j V 7.7 C.D.X N ( Q",
".Q.R.I S v.m.b D n g.F -.5 % Q.Q",
".Q.Q.3.=.o ^ }.+.< : < t J G.Q.Q",
".Q.Q.Q T.%.L Z q.K.* 6.y G.Q.Q.Q",
".Q.Q.Q.Q.N.g.4 & r.j.J Q Q Q.Q.Q",
".Q.Q.Q.Q.Q.Q.Q.Q Q Q Q Q Q Q Q.Q"
};
/* apps/system-users.png */
/* XPM */
const char *tango_system_users[] = {
/* width height ncolors chars_per_pixel */
"16 16 147 2",
/* colors */
" c #000000",
" . c #F3BE71",
" X c #ECBD74",
" o c #4071AF",
" O c #E6AA4D",
" + c #868F41",
" @ c #4A78B2",
" # c #7E6040",
" $ c #AF7D2E",
" % c #E3A340",
" & c #3263A1",
" * c #547FB5",
" = c #905841",
" - c #616519",
" ; c #797F37",
" : c #B99355",
" > c #6C3F3B",
" , c #E3A23C",
" < c #EBAA5B",
" 1 c #4172AF",
" 2 c #F6CB8A",
" 3 c #E5A255",
" 4 c #D1A55F",
" 5 c #C0934B",
" 6 c #6D4A0A",
" 7 c #9F5203",
" 8 c #6A692B",
" 9 c #8BA6C9",
" 0 c #D08F4A",
" q c #723C51",
" w c #3E558E",
" e c #E3A256",
" r c #F3C680",
" t c #5C3B59",
" y c #3466A5",
" u c #895443",
" i c #C2893C",
" p c #6087B9",
" a c #5A3464",
" s c #C16710",
" d c #3568A9",
" f c #DDA053",
" g c #AF8033",
" h c #BC8E43",
" j c #ECB868",
" k c #C29142",
" l c #8B6B58",
" z c #8E5105",
" x c #5A85B9",
" c c #614D7E",
" v c #687214",
" b c #90563F",
" n c #DAAE6D",
" m c #D8994A",
" M c #5F86B7",
" N c #E6A251",
" B c #645370",
" V c #E0992A",
" C c #D6DBE3",
" Z c #E5A746",
" A c #3467A7",
" S c #E09B2D",
" D c #BF6C10",
" F c #767B35",
" G c #829FC5",
" H c #32629E",
" J c #B78940",
" K c #616B09",
" L c #F1BD6F",
" P c #864F06",
" I c #5E83B2",
" U c #386DB1",
" Y c #3D538B",
" T c #C77D28",
" R c #485F99",
" E c #3364A2",
" W c #3264A1",
" Q c #E1A23E",
" ! c #6F7131",
" ~ c #955104",
" ^ c #6D712F",
" / c #E8AA5C",
" ( c #B88530",
" ) c #624F0D",
" _ c #C16404",
" ` c #BA5C11",
" ' c #E5AE5C",
" ] c #D9AC64",
" [ c #DDAB5E",
" { c #815107",
" } c #AA7722",
" | c #A9A3B9",
". c #F9C780",
".. c #A0B6D1",
".X c #C4680A",
".o c #6B8BB4",
".O c #8DA7C8",
".+ c #B68134",
".@ c #C38F44",
".# c #E2B369",
".$ c #596921",
".% c #465440",
".& c #CC5E01",
".* c #C49A52",
".= c #6A6A2B",
".- c #CC5E04",
".; c #B98633",
".: c #5C3566",
".> c #DCA552",
"., c #A35403",
".< c #55315F",
".1 c #4576B2",
".2 c #965435",
".3 c #B4C1D3",
".4 c #EFC075",
".5 c #885106",
".6 c #366BAD",
".7 c #BC7625",
".8 c #32629F",
".9 c #30609D",
".0 c #EBBC74",
".q c #5680B5",
".w c #DF8E3A",
".e c #D56402",
".r c #3466A4",
".t c #3364A3",
".y c #CB9A51",
".u c #685D14",
".i c #6E771D",
".p c #3B6EAE",
".a c #815330",
".s c #B0B6CB",
".d c #4F649A",
".f c #C99C66",
".g c #3568A8",
".h c #9E5807",
".j c #B85410",
".k c #E6AD54",
".l c #5981B4",
".z c #844240",
".x c #366AAC",
".c c #D16604",
".v c #A6ACC4",
".b c #CF9D51",
".n c #F0CE99",
".m c #CD5C00",
".M c None",
/* pixels */
".M.M.M.M P ~ z.,.M.M.M.M.M.M.M.M",
".M.M.M.c m 4.b.@ 7.M.M.M.M.M.M.M",
".M.M.h f.* 5.;.7 s.m.&.m.M.M.M.M",
".M.M.5.y h : T.X N 2 . /.m.M.M.M",
".M.M { k ( J D < r.0 O.4.w.m.M.M",
".M.M ) i g }.e. X.n.k , '.m.M.M",
".M.M >.a.+ $ _ L Z.# S Q.>.m.M.M",
".M.% ^ - # 6.u 3 j V % ] 0.j.M.M",
".% F.i + + 8 q = e [ n.f b.z.M.M",
".% F v +.=.: 9 B l.- `.2 u p.:.:",
".% F v v.:.O.x U.s c |.v.g W p.:",
".% F.$ K t p A.6.. C x G y.9.p.:",
".% F ; !.: M.t A d.3.l.r & &.p.:",
".M.%.%.%.: I.t w E.o & H Y.8.p.:",
".M.M.M.M.:.q *.d @ o o o R 1.1.:",
".M.M.M.M.<.:.:.:.:.:.:.:.:.:.: a"
};
/* apps/accessories-text-editor.png */
/* XPM */
const char *tango_accessories_text_editor[] = {
/* width height ncolors chars_per_pixel */
"16 16 52 1",
/* colors */
" c #000000",
". c #B1B1B1",
"X c #705B39",
"o c #9D9D9D",
"O c #C89F64",
"+ c #C4A000",
"@ c #8F8F8F",
"# c #A08457",
"$ c #CFAD71",
"% c #D2AC6A",
"& c #757575",
"* c #EBB13D",
"= c #717171",
"- c #A48757",
"; c #636363",
": c #A08356",
"> c #EEEEEE",
", c #ECECEC",
"< c #EAEAEA",
"1 c #EEEAC6",
"2 c #EDE6C5",
"3 c #DADADA",
"4 c #D6D6D6",
"5 c #CCCCCC",
"6 c #CACACA",
"7 c #C2AB8A",
"8 c #C4C4C4",
"9 c #BCBCBC",
"0 c #B8B8B8",
"q c #B2B2B2",
"w c #AEAEAE",
"e c #F9E8C6",
"r c #EDE5C4",
"t c #4C4226",
"y c #A18355",
"u c #888A85",
"i c #8C8C8C",
"p c #868686",
"a c #6B5736",
"s c #FFFFFF",
"d c #EBEBEB",
"f c #E9E9E9",
"g c #A38555",
"h c #CFAA69",
"j c #CEA668",
"k c #EFEBC7",
"l c #DBDBDB",
"z c #D3D3D3",
"x c #CBCBCB",
"c c #8F5902",
"v c #B7B7B7",
"b c None",
/* pixels */
"bbbbbbbbbbbbbbbb",
"bbb+b+b+b+b+bbbb",
"bb+e+e+e+e+e+bbb",
"bu+*+*+*+*+*+ccb",
"bud+9+0+0+0+c1$c",
"bus,,,,,,,zck%yc",
"busl55555vck%-cb",
"bus,,,,,zc1h:cbb",
"busl555vc2j#cubb",
"bus,,,dcrO-c=ubb",
"busl5x&X7gc@pubb",
"bus,,fctaco4wubb",
"buslx8 c;i63qubb",
"bus,d<<fd<d,qubb",
"bu>qqqqqqq.qqubb",
"buuuuuuuuuuuuubb"
};
/* mimetypes/text-x-generic.png */
/* XPM */
const char *tango_text_x_generic[] = {
/* width height ncolors chars_per_pixel */
"16 16 22 1",
/* colors */
" c #000000",
". c #EDEDE5",
"X c #999999",
"o c #959595",
"O c #818181",
"+ c #F2F2F2",
"@ c #F0F0F0",
"# c #EEEEEE",
"$ c #ECECEC",
"% c #EAEAEA",
"& c #EDEDE6",
"* c #C8C8C8",
"= c #C6C6C6",
"- c #C4C4C4",
"; c #FFFFFF",
": c #F1F1F1",
"> c #EFEFEF",
", c #EDEDED",
"< c #EBEBEB",
"1 c #C7C7C7",
"2 c #C5C5C5",
"3 c None",
/* pixels */
"XOOOOOOOOOOOO333",
"O;;;;;;;;;;;;O33",
"O;$%%<<<$$,@;O33",
"O;%-22====1@;O33",
"O;%<<$$$,,#@;O33",
"O;<2======1@;O33",
"O;<<$$,,.$#@;O33",
"O;<====##&#@;O33",
"O;$$,,##>>>@;O33",
"O;$===11***@;O33",
"O;$,##>>@:::;O33",
"O;,=11***::+;O33",
"O;,,#>>@@:++;O33",
"O;;;;;;;;;;;;O33",
"oOOOOOOOOOOOOo33",
"3333333333333333"
};
/* mimetypes/x-office-calendar.png */
/* XPM */
const char *tango_x_office_calendar[] = {
/* width height ncolors chars_per_pixel */
"16 16 61 1",
/* colors */
" c #000000",
". c #686A66",
"X c #646662",
"o c #818485",
"O c #CACAC9",
"+ c #C3C4C2",
"@ c #959798",
"# c #C2C4C4",
"$ c #9B9C9A",
"% c #4D5254",
"& c #3B4042",
"* c #393E40",
"= c #C9C9CA",
"- c #B0B1AE",
"; c #AAABA8",
": c #EEEEEE",
"> c #ECECEC",
", c #E6E6E6",
"< c #E4E4E4",
"1 c #E2E2E2",
"2 c #E0E0E0",
"3 c #939591",
"4 c #D6D6D6",
"5 c #D2D2D2",
"6 c #CDCECD",
"7 c #C8C8C8",
"8 c #FBFBFA",
"9 c #E3E3E2",
"0 c #636561",
"q c #61635F",
"w c #B0B2B3",
"e c #555753",
"r c #898C86",
"t c #888A85",
"y c #4A5052",
"u c #A0A2A3",
"i c #7C7E79",
"p c #C2C3C1",
"a c #404648",
"s c #383E40",
"d c #B8B9B7",
"f c #C8C9CA",
"g c #32383A",
"h c #2E3436",
"j c #4C5153",
"k c #414748",
"l c #FFFFFF",
"z c #FDFDFD",
"x c #C5C6C6",
"c c #F3F3F3",
"v c #F1F1F1",
"b c #E9E9E9",
"n c #E7E7E7",
"m c #E3E3E3",
"M c #E1E1E1",
"N c #DFDFDF",
"B c #D9D9D9",
"V c #CECFCE",
"C c #CACBCA",
"Z c #6E706C",
"A c None",
/* pixels */
"AAttAAAtAAAtAAAA",
"AtttttttttttttAA",
"tlt+llt4zzt4zltA",
"tlt3,,tt9,tt,ltA",
"tl4B,,44<,444ltA",
"il,<fo1jawnn,liA",
"il:,%hN@7y,,VliA",
"il:,NhN#ku,,OliA",
".l,,NhNg=x,6pl.A",
".l,,NhN&*s,6pl.A",
"0l,mm2mMMM5cz80A",
"Xl,b>:v,VCdc-$XA",
"Xlllllllllll;ZXA",
"0qqqqqqqqqqqqqXA",
"AhteeeeeeeeeehAA",
"AhhhhhhhhhhhhhAA"
};
/* places/user-trash.png */
/* XPM */
const char *tango_user_trash[] = {
/* width height ncolors chars_per_pixel */
"16 16 135 2",
/* colors */
" c #000000",
" . c #6A6C68",
" X c #D6DBC8",
" o c #686A66",
" O c #CCD29D",
" + c #D3D8BB",
" @ c #5E605C",
" # c #A9B260",
" $ c #959E49",
" % c #BCC662",
" & c #8A915C",
" * c #CDD2A1",
" = c #AAB264",
" - c #5D6329",
" ; c #BAC36D",
" : c #B1B4AD",
" > c #7F865E",
" , c #6B6D68",
" < c #545B23",
" 1 c #D4D9BB",
" 2 c #989A94",
" 3 c #D2D7B9",
" 4 c #61635E",
" 5 c #B5BB82",
" 6 c #C3CA89",
" 7 c #A0A956",
" 8 c #CCD19F",
" 9 c #C8CEA5",
" 0 c #A8AD75",
" q c #A1A76E",
" w c #BDC765",
" e c #909946",
" r c #D1D793",
" t c #98A247",
" y c #666D2D",
" u c #B8BE84",
" i c #BDC675",
" p c #939A59",
" a c #494D4C",
" s c #81893A",
" d c #8C9548",
" f c #646663",
" g c #4E541F",
" h c #B2B881",
" j c #B6BBA6",
" k c #9FA46B",
" l c #A5AE49",
" z c #D0D691",
" x c #788134",
" c c #9AA252",
" v c #8C9162",
" b c #929C4A",
" n c #ACB27E",
" m c #545B21",
" M c #797B77",
" N c #757773",
" B c #737571",
" V c #737B32",
" C c #6D6F6B",
" Z c #CAD184",
" A c #C7CC8B",
" S c #919A4C",
" D c #8A9259",
" F c #B8C065",
" G c #767B77",
" H c #D4D9BC",
" J c #636561",
" K c #D3D9BB",
" L c #61682A",
" P c #879042",
" I c #6F7731",
" U c #969F4A",
" Y c #BDC763",
" T c #BBC561",
" R c #9FA956",
" E c #7A8235",
" W c #B5C051",
" Q c #A9B259",
" ! c #ADB17E",
" ~ c #787A75",
" ^ c #798237",
" / c #BCC286",
" ( c #B8C257",
" ) c #CDD590",
" _ c #B7BE81",
" ` c #70726D",
" ' c #575E26",
" ] c #535A22",
" [ c #686A65",
" { c #666863",
" } c #62645F",
" | c #C4CB9E",
". c #A7AF67",
".. c #A9AD94",
".X c #5C5E59",
".o c #BCC661",
".O c #A8B154",
".+ c #8B9348",
".@ c #CBD09E",
".# c #4C521E",
".$ c #8B943E",
".% c #A5AC72",
".& c #AEB75D",
".* c #ADB75C",
".= c #AAB263",
".- c #565D21",
".; c #A6AF55",
".: c #B2BB64",
".> c #767F33",
"., c #CCD28E",
".< c #B2BD50",
".1 c #C3CA99",
".2 c #5B6129",
".3 c #96A04F",
".4 c #888E69",
".5 c #C9D181",
".6 c #BBC469",
".7 c #BBC55F",
".8 c #B9C35D",
".9 c #899245",
".0 c #6C732F",
".q c #BFC687",
".w c #B3BD5A",
".e c #A3AB72",
".r c #B3BE50",
".t c #98A150",
".y c #C7D07E",
".u c #9CA64D",
".i c #727470",
".p c #DBE0D7",
".a c #70726E",
".s c #C9D18D",
".d c #ADB757",
".f c #949D4F",
".g c None",
/* pixels */
".g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g",
".g.g < < < < < < < < < < < <.g.g",
".g >.p.p.p.p.p.p.p.p.p.p.p.p.4.g",
" <.p G.X @ 4 J { o , C `.i :.p <",
" <.p a } f [ . C.a B N ~ M 2.p <",
" < j.p.p.p.p.p.p.p.p.p.p.p.p.. <",
" < < p E x.> V I.0 y L -.2 ' < ]",
".g <.y W W.r l.; = t.$ s ^ D <.g",
".g <.y W W.< F X X.@ 7 $ d & <.g",
".g <.5 W W O ;.: 8 * R c.f k <.g",
".g < Z (.o 1 X.* Q # _.t S.% <.g",
".g < z w Y K i.& 9.= 3.3.+ 0 <.g",
".g < r % T.6 *.1 H +. b.9.e <.g",
".g < ).7.8.w.d.O |.u U e P q <.g",
".g < !.,.s A 6.q / u 5 h n v <.g",
".g.g < < < < < < < < < < < <.g.g"
};
/* apps/utilities-system-monitor.png */
/* XPM */
const char *tango_utilities_system_monitor[] = {
/* width height ncolors chars_per_pixel */
"16 16 116 2",
/* colors */
" c #000000",
" . c #8199BA",
" X c #DEE0DD",
" o c #EDEAB0",
" O c #F6F8FB",
" + c #F5F8FA",
" @ c #316696",
" # c #4280AD",
" $ c #407EAB",
" % c #316A99",
" & c #7D7D7A",
" * c #2F6697",
" = c #F1F6F9",
" - c #2C6294",
" ; c #3772A2",
" : c #BFCFA0",
" > c #97B893",
" , c #E7E8B0",
" < c #E4E5E2",
" 1 c #E2E3E0",
" 2 c #DFE1DD",
" 3 c #BBC774",
" 4 c #265987",
" 5 c #D7D9D5",
" 6 c #D5D7D3",
" 7 c #4D8DB7",
" 8 c #98C0D9",
" 9 c #CCCFCA",
" 0 c #EEE788",
" q c #4D8FBA",
" w c #D7E5EF",
" e c #3D79A7",
" r c #3D77A7",
" t c #4A8DB7",
" y c #7792B5",
" u c #FEFEFE",
" i c #F9FAF9",
" p c #B6C496",
" a c #829B7A",
" s c #90AF8B",
" d c #89A584",
" f c #85A180",
" g c #E9F1F6",
" h c #C9CCC6",
" j c #5294BE",
" k c #346A9A",
" l c #D8E6EF",
" z c #316697",
" x c #4D8EB9",
" c c #D6E4ED",
" v c #2C6292",
" b c #3A74A3",
" n c #4584B1",
" m c #346E9D",
" M c #B4B6B1",
" N c #316A9A",
" B c #F9F9F8",
" V c #EFF4F8",
" C c #F4F5F3",
" Z c #8CAA86",
" A c #89A483",
" S c #87A481",
" D c #E5E7E4",
" F c #829C7C",
" G c #2C5D8E",
" H c #DCDDDB",
" J c #5495BF",
" K c #BAD1E1",
" L c #4887B3",
" P c #7E7E7B",
" I c #3D7BA8",
" U c #F0F5F8",
" Y c #BECE9F",
" T c #DBDCD9",
" R c #DADCD8",
" E c #D3D6D1",
" W c #D0D2CE",
" Q c #2C6090",
" ! c #CBCEC9",
" ~ c #4280AC",
" ^ c #488AB5",
" / c #3772A1",
" ( c #FFFFFF",
" ) c #34709E",
" _ c #4284AF",
" ` c #346E9E",
" ' c #316C9B",
" ] c #FAFBFA",
" [ c #96B691",
" { c #F8F9F8",
" } c #3D7CAA",
" | c #94B48F",
". c #F6F7F6",
".. c #93B28E",
".X c #849E7C",
".o c #204A87",
".O c #91B08C",
".+ c #90AE8B",
".@ c #8EAC89",
".# c #8BAA86",
".$ c #D5DBA7",
".% c #D3D9A5",
".& c #85A280",
".* c #D6E3ED",
".= c #3D77A6",
".- c #4587B1",
".; c #4283AE",
".: c #B4B7B1",
".> c #96B590",
"., c #F0F5F9",
".< c #EEEEED",
".1 c #8BA785",
".2 c #BACA9C",
".3 c #E9EAE8",
".4 c #B7C699",
".5 c None",
/* pixels */
" P P P P P P P P P P P P P P P &",
" P B { ( ( ( ( ( ( ( ( u ] ] ] P",
" P B y.o.o.o.o.o.o.o.o.o.o y H P",
" P u.o 4 G - a F ' N % @ v.o D P",
" P u.o Q z.X o.& b b ; ) k.o 1 P",
" P u.o * ` p V.4.1 } I.= /.o X P",
" P u.o m S.% K c.@ n.; $ e.o T P",
" P u.o f d.*.2 w.O 3 s.@.#.o 5 P",
" P u.o + O.$.O l Y 0 =., U.o E P",
" P u.o A Z.+.. : g 8 |.O.@.o W P",
" P u.o r # L x [ , >.> 7 n.o 9 P",
" P u.o.= ~.- t | J j q ^ _.o h P",
" P B ..o.o.o.o.o.o.o.o.o.o y M P",
" P B. i C.<.3 < 2 R 6 W !.:.: P",
" P P P P P P P P P P P P P P P &",
".5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5"
};
/* apps/utilities-terminal.png */
/* XPM */
const char *tango_utilities_terminal[] = {
/* width height ncolors chars_per_pixel */
"16 16 163 2",
/* colors */
" c #000000",
" . c #A0A19D",
" X c #8E9F74",
" o c #8C9D72",
" O c #9A9B97",
" + c #989995",
" @ c #DDDEDC",
" # c #849074",
" $ c #939590",
" % c #D7D8D6",
" & c #8F918C",
" * c #374525",
" = c #8D8F8A",
" - c #CDCECC",
" ; c #81837E",
" : c #E0E3DB",
" > c #ACBC94",
" , c #0A0B09",
" < c #090908",
" 1 c #657C41",
" 2 c #AABA92",
" 3 c #192011",
" 4 c #070706",
" 5 c #4F6332",
" 6 c #ECEDEA",
" 7 c #A5B68D",
" 8 c #B2B4B1",
" 9 c #DBDBD9",
" 0 c #29331D",
" q c #26311A",
" w c #91928D",
" e c #D7D7D5",
" r c #364423",
" t c #555952",
" y c #46572C",
" u c #8B8C87",
" i c #7E807A",
" p c #7D8079",
" a c #6A7559",
" s c #0F100D",
" d c #C0C1BE",
" f c #787C74",
" g c #777A73",
" h c #747870",
" j c #A9B990",
" k c #6A6E66",
" l c #B0B1AE",
" z c #D3D6CD",
" x c #B1BF9B",
" c c #646860",
" v c #5F625B",
" b c #29341C",
" n c #28341B",
" m c #828E70",
" M c #92958D",
" N c #27321A",
" B c #374523",
" V c #8C8F87",
" C c #46562B",
" Z c #888B83",
" A c #989996",
" S c #DDDEDD",
" D c #4E5E36",
" F c #D7D8D7",
" G c #A8B88E",
" H c #A3A69D",
" J c #B4B6B1",
" K c #AFBE98",
" L c #F2F3F1",
" P c #747772",
" I c #768560",
" U c #536537",
" Y c #182011",
" T c #060706",
" R c #3C4C27",
" E c #4E6132",
" W c #3B4A26",
" Q c #4C5A3A",
" ! c #273119",
" ~ c #020302",
" ^ c #808D6D",
" / c #343633",
" ( c #90A076",
" ) c #CFD3CB",
" _ c #DDDDDC",
" ` c #969893",
" ' c #616A55",
" ] c #4C563D",
" [ c #94A27D",
" { c #D6D7D5",
" } c #8A8C87",
" | c #657152",
". c #647151",
".. c #CCCDCB",
".X c #848681",
".o c #131412",
".O c #A2B387",
".+ c #0D0E0C",
".@ c #0B0C0A",
".# c #080807",
".$ c #070806",
".% c #758954",
".& c #4F6232",
".* c #D9DED4",
".= c #7F8C6B",
".- c #2F312D",
".; c #636660",
".: c #73825F",
".> c #27321B",
"., c #5A5E57",
".< c #364523",
".1 c #364323",
".2 c #545851",
".3 c #878983",
".4 c #868782",
".5 c #616E4D",
".6 c #82857E",
".7 c #81837D",
".8 c #7E817A",
".9 c #7D7F79",
".0 c #797D75",
".q c #7A846C",
".w c #767972",
".e c #6F736B",
".r c #A3A69E",
".t c #7E8B69",
".y c #7C8967",
".u c #9DA098",
".i c #798764",
".p c #656961",
".a c #999C94",
".s c #CED1C8",
".d c #99A38A",
".f c #62655E",
".g c #979A92",
".h c #859869",
".j c #29351C",
".k c #3B4A27",
".l c #28331B",
".z c #27311A",
".x c #92A279",
".c c #8D9088",
".v c #878A82",
".b c #97A681",
".n c #83867E",
".m c #95A47F",
".M c #232423",
".N c #737D64",
".B c #B7B9B4",
".V c #A4B58A",
".C c #A2A59C",
".Z c #7B8865",
".A c #697850",
".S c #AEBD97",
".D c #CDD2C6",
".F c #181F11",
".G c #060606",
".H c #849071",
".J c #3C4B27",
".K c #28321A",
".L c #273019",
".P c #010201",
".I c None",
/* pixels */
".I.u.a M.c Z.n.8.0 h.e k.p.f.,.I",
" H J e S @ _ _ _ _ _ _ 9.. 8 P t",
" H { /.#.#.#.#.#.#.#.# 4 4.- A t",
".C F s x K.S > 2 j G 7.V.O O.2",
".C F.+ #.H m ^.=.t.y.Z.i I `.2",
".C F.@.b.m [.x ( X o.h.% 1 $.2",
".C F , a.*.q |. .5 D C C y w.2",
".C F <.:.d :.D.A U E.&.& 5 =.2",
".C F.$ ] ' ) z *.1 r r.< B }.2",
".C F 4 Q.s.N.k W W W.J.J R .3.2",
".C F 4 0.z.L ! L L L 6.K.K .X.2",
".C F T q N.>.>.l.l n b b.j .7.2",
".C F.G.F.F.F.F.F.F.F Y 3 3 i.2",
" H %.M ~.P.P.P.P.P.P.P.P.P.o.w t",
".r.B - d l . + $ & u.4 ;.9 g.; t",
".I.u.g M V.v.6 p f h.e k c v.,.I"
};
/* status/weather-clear.png */
/* XPM */
const char *tango_weather_clear[] = {
/* width height ncolors chars_per_pixel */
"16 16 82 1",
/* colors */
" c #000000",
". c #FBBD5B",
"X c #FDF4AC",
"o c #FCF4AB",
"O c #FDF3A2",
"+ c #FEFCEF",
"@ c #FCB23E",
"# c #FCB03E",
"$ c #FBAE3D",
"% c #FBB94A",
"& c #FCE34E",
"* c #FAB43F",
"= c #FCEB65",
"- c #FBBA57",
"; c #FCE768",
": c #FCEF82",
"> c #FEF8D0",
", c #FEFEFB",
"< c #FBB13F",
"1 c #FDCD83",
"2 c #FEF8E7",
"3 c #FDF5B1",
"4 c #FCED71",
"5 c #FDF6BE",
"6 c #FCE55D",
"7 c #FCD549",
"8 c #FDE6C1",
"9 c #FEF9CF",
"0 c #FDEAAD",
"q c #FEFCF0",
"w c #FCB43F",
"e c #FCB23F",
"r c #FDF4B0",
"t c #FCE459",
"y c #FCC66D",
"u c #FCC470",
"i c #FDF08B",
"p c #FEF8CE",
"a c #FDF0A2",
"s c #FBC168",
"d c #FCB33E",
"f c #FCB13E",
"g c #FCAF3E",
"h c #FBAF3D",
"j c #FBC16E",
"k c #FCEC68",
"l c #FDE6BF",
"z c #FDF3A1",
"x c #FAB545",
"c c #FBD349",
"v c #FCEA57",
"b c #FDF4AE",
"n c #FCF4AD",
"m c #FEF9D0",
"M c #FEFCF1",
"N c #FCE86E",
"B c #FBB43F",
"V c #FEF9E7",
"C c #FCCC82",
"Z c #FBAE3F",
"A c #FCEA5A",
"S c #FCBC57",
"D c #FCD964",
"F c #FDF089",
"G c #FDECB4",
"H c #FDF1AA",
"J c #FDF08C",
"K c #FEFAE3",
"L c #FCE956",
"P c #FCEF81",
"I c #FCB953",
"U c #FEFDF0",
"Y c #FCB33F",
"T c #FBB13E",
"R c #FBDB6C",
"E c #FCE959",
"W c #FCEF84",
"Q c #FCCD84",
"! c #FEF9DF",
"~ c #FCEF87",
"^ c #FCC570",
"/ c None",
/* pixels */
"////////////////",
"///////#f///////",
"///////ff///////",
"///ge/1CuI/@g///",
"///@ylVq!0-Ye///",
"////8,+prnax////",
"///12UU9XF~Dd///",
"/ffQM>m5zPk;Tf#/",
"/#f^K3bOJ4Et<ff/",
"///SGoi:4Avce///",
"////.HW=Lv&*////",
"///ew%RN67Bd@///",
"///g@/e<Td/eg///",
"///////ff///////",
"///////f#///////",
"////////////////"
};
/* XPM */
const char *tango48_dialog_information[] = {
/* width height ncolors chars_per_pixel */
"48 48 678 2",
/* colors */
" c #000000",
" . c #626674",
" X c #8C895B",
" o c #BACDE8",
" O c #7F8697",
" + c #B8CDE6",
" @ c #DCE1E5",
" # c #D1DFEE",
" $ c #9BB9DA",
" % c #ACAA77",
" & c #D0DDED",
" * c #F0F0F2",
" = c #B4CBE2",
" - c #CFDDEC",
" ; c #C9CDCF",
" : c #A9A9A9",
" > c #B4C9E2",
" , c #7DA3CD",
" < c #C5C7A0",
" 1 c #D8DAAC",
" 2 c #A7A472",
" 3 c #C6D6ED",
" 4 c #ABC2E3",
" 5 c #C5D4EC",
" 6 c #717168",
" 7 c #8EAED7",
" 8 c #C3D4EA",
" 9 c #BDC4CD",
" 0 c #BCBEA1",
" q c #F7FAFC",
" w c #DCE6F2",
" e c #DDE4F3",
" r c #A2AEC3",
" t c #626677",
" y c #505037",
" u c #C0D2E7",
" i c #616676",
" p c #DBE4F1",
" a c #BFD2E6",
" s c #868997",
" d c #89ACD2",
" f c #D9E4EF",
" g c #88ACD1",
" h c #85A7D8",
" j c #848795",
" k c #63636E",
" l c #A4A686",
" z c #4A4A31",
" x c #DFE0E1",
" c c #B4C9E5",
" v c #EEF0F3",
" b c #EAEDF9",
" n c #7EA3D1",
" m c #B3C9E4",
" M c #4B4B28",
" N c #C6CDCF",
" B c #CCDBEC",
" V c #CBDBEB",
" C c #CBD9EB",
" Z c #AFC7E0",
" A c #CAD9EA",
" S c #E4EDF3",
" D c #EBEDBB",
" F c #AEC5DF",
" G c #1A1A0F",
" H c #9EB1CC",
" J c #E9EBB9",
" K c #C4C698",
" L c #DBDC9E",
" P c #A7C0E2",
" I c #E7E9B7",
" U c #C2C496",
" Y c #686841",
" T c #A8A862",
" R c #8BACD7",
" E c #A0A499",
" W c #8D8D8D",
" Q c #F4F7C7",
" ! c #D7E4F0",
" ~ c #9EA497",
" ^ c #626570",
" / c #D7E2F0",
" ( c #E5E7E0",
" ) c #D6E2EF",
" _ c #F0F4F8",
" ` c #9FBCDA",
" ' c #9FBADA",
" ] c #B6C9EA",
" [ c #83A8CF",
" { c #4D4D2D",
" } c #73767A",
" | c #A7ABAD",
". c #799ED9",
".. c #DBDEE0",
".X c #ECEEF4",
".o c #B7BA8B",
".O c #E4EDF6",
".+ c #C8D9EB",
".@ c #84887A",
".# c #57573A",
".$ c #C7D9EA",
".% c #E2EBF4",
".& c #C7D7EA",
".* c #C6D7E9",
".= c #8FB1D4",
".- c #AAC3DE",
".; c #C5D5E8",
".: c #8FAFD4",
".> c #656976",
"., c #B9C4CF",
".< c #7098D0",
".1 c #636774",
".2 c #C0C2C2",
".3 c #616572",
".4 c #606371",
".5 c #D5E0F1",
".6 c #9EBADC",
".7 c #777777",
".8 c #D2E0EE",
".9 c #D1DEED",
".0 c #B6CAE3",
".q c #7FA4CE",
".w c #F8FADB",
".e c #B2B7BE",
".r c #727C93",
".t c #C8CDC3",
".y c #CBD6E7",
".u c #B5B782",
".i c #A7BEE8",
".p c #8FAFD7",
".a c #C4D5EA",
".s c #DEE9F3",
".d c #7098D3",
".f c #6D6D6D",
".g c #DDE7F2",
".h c #A7C1DE",
".j c #C2D3E8",
".k c #DDE5F2",
".l c #F7F9FB",
".z c #C1D3E7",
".x c #8BADD3",
".c c #616775",
".v c #3F3F22",
".b c #616575",
".n c #606574",
".m c #9C9C70",
".M c #A3A359",
".N c #4B4B31",
".B c #515123",
".V c #F0F1F4",
".C c #D5D7BF",
".Z c #CEDEED",
".A c #4C4C28",
".S c #CDDCEC",
".D c #CCDAEB",
".F c #ECEDF0",
".G c #B0C8E0",
".H c #CBDAEA",
".J c #7AA2CC",
".K c #95B4D6",
".L c #6B6E78",
".P c #98AED9",
".I c #C6D5EF",
".U c #79A0CB",
".Y c #B2C5D8",
".T c #6F98D5",
".R c #5B5B5B",
".E c #BABFA1",
".W c #ABAC5A",
".Q c #7099CC",
".! c #595959",
".~ c #DAE5F2",
".^ c #86A8DB",
"./ c #D9E5F1",
".( c #ABBCDB",
".) c #A3BFDD",
"._ c #BDD1E6",
".` c #D8E3F0",
".' c #A2BDDC",
".] c #80A3DF",
".[ c #D7E3EF",
".{ c #A1BDDB",
".} c #F1F5F8",
".| c #606042",
"X c #555555",
"X. c #D6E1EE",
"XX c #91927C",
"Xo c #F2F4C4",
"XO c #686A61",
"X+ c #F1F4C3",
"X@ c #535353",
"X# c #83A7CE",
"X$ c #555580",
"X% c #858459",
"X& c #7A9FD9",
"X* c #CDCE99",
"X= c #7D8290",
"X- c #D2D5BF",
"X; c #EBEEBD",
"X: c #84854E",
"X> c #C9DAEB",
"X, c #C9D8EB",
"X< c #929494",
"X1 c #C8D8EA",
"X2 c #696C79",
"X3 c #464625",
"X4 c #C7D8E9",
"X5 c #E2EAF3",
"X6 c #91B2D5",
"X7 c #ACC4DF",
"X8 c #C0C2A0",
"X9 c #C6D6E8",
"X0 c #759ECA",
"Xq c #474747",
"Xw c #636673",
"Xe c #626672",
"Xr c #96977A",
"Xt c #A8A85A",
"Xy c #616471",
"Xu c #EFF5F9",
"Xi c #BEBE8A",
"Xp c #9CB9D9",
"Xa c #B7CBE3",
"Xs c #D4D68F",
"Xd c #81A5CF",
"Xf c #9BB9D8",
"Xg c #80A5CE",
"Xh c #F0F0F0",
"Xj c #555744",
"Xk c #BFC3AC",
"Xl c #A4AFA2",
"Xz c #AFC6E5",
"Xx c #96AEDD",
"Xc c #686C7B",
"Xv c #676C7A",
"Xb c #A6AC9A",
"Xn c #DCDFCF",
"Xm c #C4D6E9",
"XM c #D9DBA1",
"XN c #DDE8F1",
"XB c #636876",
"XV c #C1D4E6",
"XC c #8BAED2",
"XZ c #C1D2E6",
"XA c #626675",
"XS c #9FB8E9",
"XD c #DBE4EF",
"XF c #A1A495",
"XG c #52512D",
"XH c #313131",
"XJ c #75744C",
"XK c #6C7282",
"XL c #EBF1F8",
"XP c #CFDFED",
"XI c #DADFE4",
"XU c #CFDDED",
"XY c #CEDDEC",
"XT c #98B7D8",
"XR c #B3C9E2",
"XE c #97B7D7",
"XW c #CDDBEB",
"XQ c #96B5D6",
"X! c #494924",
"X~ c #749CCF",
"X^ c #81837C",
"X/ c #BCC6CD",
"X( c #626878",
"X) c #DBE6F2",
"X_ c #C6CBB9",
"X` c #BFD2E7",
"X' c #DFE5EC",
"X] c #A4BEDD",
"X[ c #BED2E6",
"X{ c #A3BEDC",
"X} c #D8E4EF",
"X| c #51512F",
"o c #B9CBEB",
"o. c #828594",
"oX c #F1F3C2",
"oo c #EAEDFA",
"oO c #DDDFAB",
"o+ c #E6EDF6",
"o@ c #5D5E34",
"o# c #CBD9EC",
"o$ c #CAD9EB",
"o% c #EBEDBC",
"o& c #AEC7E0",
"o* c #B6B688",
"o= c #C9D9EA",
"o- c #8DABE4",
"o; c #AEC5E0",
"o: c #C8D9E9",
"o> c #E6EAEC",
"o, c #E5E8EB",
"o< c #C0C3CA",
"o1 c #646773",
"o2 c #9EB9E4",
"o3 c #626571",
"o4 c #BFC4BF",
"o5 c #C0C0C0",
"o6 c #60656F",
"o7 c #D5E2EF",
"o8 c #9FBCDB",
"o9 c #D4E0EE",
"o0 c #C9CFD6",
"oq c #C5CCDC",
"ow c #9EBADA",
"oe c #D7DFE7",
"or c #9BB8D7",
"ot c #848785",
"oy c #AEBCC2",
"ou c #7E8289",
"oi c #BAB985",
"op c #95ADDB",
"oa c #E3E9F6",
"os c #E2E9F5",
"od c #C6D7EA",
"of c #303018",
"og c #B2BAB2",
"oh c #E0E9F3",
"oj c #6C7995",
"ok c #AAC3DF",
"ol c #DFE9F2",
"oz c #879AC0",
"ox c #7D817E",
"oc c #C4D5E8",
"ov c #DEE9F1",
"ob c #AAB0BE",
"on c #C3D5E7",
"om c #DEE7F1",
"oM c #85A7DF",
"oN c #626774",
"oB c #B0B0B0",
"oV c #616573",
"oC c #616373",
"oZ c #D5E0F2",
"oA c #EDEECE",
"oS c #9AB5E3",
"oD c #D1E0EE",
"oF c #72747D",
"oG c #B6CCE4",
"oH c #D1DEEE",
"oJ c #D0DEED",
"oK c #CFDEEC",
"oL c #B3B595",
"oP c #CFDCEC",
"oI c #8F94A0",
"oU c #B3CAE1",
"oY c #B4B461",
"oT c #98B6D7",
"oR c #B2CAE0",
"oE c #B3C8E1",
"oW c #D8DCE1",
"oQ c #57573E",
"o! c #A1A276",
"o~ c #DEE9F4",
"o^ c #D5D7A9",
"o/ c #F3F4D7",
"o( c #DCE7F2",
"o) c #8999BB",
"o_ c #626777",
"o` c #BFD1E6",
"o' c #89ABD2",
"o] c #51522E",
"o[ c #64646F",
"o{ c #A2BDDA",
"o} c #DCE4E8",
"o| c #9C9C9C",
"O c #9FB6E1",
"O. c #ECEEFB",
"OX c #808491",
"Oo c #C4C7AC",
"OO c #EEF1F3",
"O+ c #4C4C29",
"O@ c #A0B3D8",
"O# c #D8DCE4",
"O$ c #C3C9D6",
"O% c #C9CB9D",
"O& c #CCDCEC",
"O* c #686D80",
"O= c #CCDAEC",
"O- c #CBDAEB",
"O; c #9B9E87",
"O: c #CADAEA",
"O> c #E5ECF4",
"O, c #94B4D6",
"O< c #AFC6E0",
"O1 c #919266",
"O2 c #94B2D6",
"O3 c #E4EAF3",
"O4 c #5B5B31",
"O5 c #78A0CB",
"O6 c #59592F",
"O7 c #E3E6F2",
"O8 c #E6E8B6",
"O9 c #C8CBB3",
"O0 c #F2F5FA",
"Oq c #61666F",
"Ow c #F1F5F9",
"Oe c #D6E1EF",
"Or c #9CB8E1",
"Ot c #D5E1EE",
"Oy c #9FBBDA",
"Ou c #CCD1CE",
"Oi c #E9EEFB",
"Op c #CDCE9A",
"Oa c #BDBC87",
"Os c #E8ECFA",
"Od c #878B7D",
"Of c #769DD6",
"Og c #CACA97",
"Oh c #C9D8EC",
"Oj c #C8D8EB",
"Ok c #C7D8EA",
"Ol c #949162",
"Oz c #C8C895",
"Ox c #E1EAF3",
"Oc c #595932",
"Ov c #C6D6E9",
"Ob c #E0EAF2",
"On c #9B9B80",
"Om c #BBC3D1",
"OM c #8FB0D4",
"ON c #666677",
"OB c #424222",
"OV c #646875",
"OC c #8DAED2",
"OZ c #919480",
"OA c #616472",
"OS c #D3E1EF",
"OD c #646436",
"OF c #D4DDF0",
"OG c #D2DFEE",
"OH c #EDF1F8",
"OJ c #D1DFED",
"OK c #99976A",
"OL c #B6CBE3",
"OP c #D0DDEC",
"OI c #9AB7D8",
"OU c #CFDDEB",
"OY c #7BA0D4",
"OT c #A8B09D",
"OR c #759BD8",
"OE c #8890A2",
"OW c #C6C9CB",
"OQ c #8EADE0",
"O! c #98ADD6",
"O~ c #9FA4A8",
"O^ c #7D8AAB",
"O/ c #F4F5D7",
"O( c #DEE8F3",
"O) c #ABBEE2",
"O_ c #DDE8F2",
"O` c #7E8BA2",
"O' c #F2F3D5",
"O] c #636877",
"O[ c #C1D4E7",
"O{ c #626876",
"O} c #F6FAFA",
"O| c #C1D2E7",
"+ c #626676",
"+. c #DBE6F0",
"+X c #9FB8EA",
"+o c #8AAED2",
"+O c #626276",
"++ c #686868",
"+@ c #8B895C",
"+# c #3C3C1F",
"+$ c #828592",
"+% c #888559",
"+& c #B1B9CA",
"+* c #EAF1F8",
"+= c #4D4D29",
"+- c #CEDDED",
"+; c #606035",
"+: c #B9C8DF",
"+> c #CDDBEC",
"+, c #CCDBEB",
"+< c #CBDBEA",
"+1 c #666C7D",
"+2 c #94B3D5",
"+3 c #6B6A43",
"+4 c #E8EAEC",
"+5 c #E2E9F0",
"+6 c #626879",
"+7 c #93A9D4",
"+8 c #DAE6F2",
"+9 c #535332",
"+0 c #8C8B60",
"+q c #585858",
"+w c #5D6874",
"+e c #292916",
"+r c #D8E4F0",
"+t c #F4F7C6",
"+y c #BDD0E6",
"+u c #9B9972",
"+i c #65643D",
"+p c #3C3C22",
"+a c #BCD0E5",
"+s c #565656",
"+d c #636370",
"+f c #61656E",
"+g c #D6E2EE",
"+h c #85A8D0",
"+j c #BACEE3",
"+k c #80A5D5",
"+l c #E8EDF9",
"+z c #B8BA8B",
"+x c #505050",
"+c c #CDD9EF",
"+v c #6C6F7C",
"+b c #8CA2C3",
"+n c #E7EBF8",
"+m c #B4B9BC",
"+M c #CAD9EC",
"+N c #FFFFFF",
"+B c #AFC5E2",
"+V c #C9D9EB",
"+C c #C8D9EA",
"+Z c #B1B38E",
"+A c #939460",
"+S c #E2EBF3",
"+D c #92B1D6",
"+F c #ACC5DF",
"+G c #C7D7E9",
"+H c #E2E9F3",
"+J c #B8C3D7",
"+K c #D6D8DA",
"+L c #90B1D4",
"+P c #80804A",
"+I c #CFD5DD",
"+U c #56562E",
"+Y c #464646",
"+T c #7A7D79",
"+R c #636373",
"+E c #616571",
"+W c #606370",
"+Q c #B9CEE5",
"+! c #D4E0EF",
"+~ c #DEE2E5",
"+^ c #83A8D1",
"+/ c #9EBADB",
"+( c #D3E0EE",
"+) c #EEF2F8",
"+_ c #798499",
"+` c #9DBADA",
"+' c #D2E0ED",
"+] c #96B2E7",
"+[ c #B6CCE2",
"+{ c #71747A",
"+} c #909074",
"+| c #80A4CE",
"@ c #7CA1D4",
"@. c #E6EBFA",
"@X c #B4B45F",
"@o c #474729",
"@O c #99B2D6",
"@+ c #ACC3E2",
"@@ c #E0E9F4",
"@# c #E5EAEF",
"@$ c #D6D9A8",
"@% c #C4D5E9",
"@& c #A1A074",
"@* c #F9FBFC",
"@= c #C3D5E8",
"@- c #646977",
"@; c #DDE7F1",
"@: c #A7C1DD",
"@> c #C2D3E7",
"@, c #636776",
"@< c #719BC9",
"@1 c #8CADD3",
"@2 c #626775",
"@3 c #8D9AB3",
"@4 c #C1CFE6",
"@5 c #A1BAE1",
"@6 c #F4F5F7",
"@7 c #64646D",
"@8 c #EDEECF",
"@9 c #9A9A6D",
"@0 c #B8CCE7",
"@q c #F2F3F5",
"@w c #D1DEEF",
"@e c #4E4E29",
"@r c #C7CBD8",
"@t c #D0DEEE",
"@y c #CFDEED",
"@u c #ACAFA3",
"@i c #99B6D9",
"@p c #6A6F80",
"@a c #CEDCEC",
"@s c #EAECF7",
"@d c #CDDCEB",
"@f c #2C2C2C",
"@g c #759CDA",
"@h c #7CA2CD",
"@j c #BCC6D7",
"@k c #B3B6B7",
"@l c #8199C8",
"@z c #BCC5CD",
"@x c #DEE5F5",
"@c c #C2C4C9",
"@v c #626778",
"@b c #DBE7F2",
"@n c #616777",
"@m c #DBE5F2",
"@M c #DAE5F1",
"@N c #AABED9",
"@B c #F5F8C6",
"@V c #BED1E6",
"@C c #D9E3F0",
"@Z c #646470",
"@A c #BDCFE5",
"@S c #B0C0CB",
"@D c #BBCFE3",
"@F c #F1F4C2",
"@G c #DFE1E2",
"@H c #D0DCF1",
"@J c #EFF1F5",
"@K c #E8F2F8",
"@L c #EFF2C0",
"@P c #1C1C1C",
"@I c #DDDFE0",
"@U c #DEE0AC",
"@Y c #E8EEF8",
"@T c #D6D8B8",
"@R c #CCDCED",
"@E c #1A1A1A",
"@W c #92A2BE",
"@Q c #B2C4E4",
"@! c #E6ECF6",
"@~ c #B0C6E2",
"@^ c #CADAEB",
"@/ c #CFDBE6",
"@( c #CAD8EB",
"@) c #AEC6E0",
"@_ c #C8D8E9",
"@` c #DCE5F6",
"@' c #6F778B",
"@] c #F2F7FB",
"@[ c #F3F6C7",
"@{ c #D6E3F0",
"@} c #626471",
"@| c #B2BCD0",
"# c #D6E1F0",
"#. c #626271",
"#X c #E0E3E6",
"#o c #D5E1EF",
"#O c #6B7387",
"#+ c #D4E1EE",
"#@ c #98B3E8",
"## c #EFF3F8",
"#$ c #515128",
"#% c #9EBBDA",
"#& c #B9CDE4",
"#* c #9B996A",
"#= c #B8CDE3",
"#- c #D3DFED",
"#; c #CED09C",
"#: c #CCCFCF",
"#> c #6B707D",
"#, c #ADC3EC",
"#< c #B9B9B9",
"#1 c #CAD8EE",
"#2 c #686C7A",
"#3 c #E2EAF5",
"#4 c #ACC4E1",
"#5 c #AFB28E",
"#6 c #C6D6EA",
"#7 c #C5D6E9",
"#8 c #B1C1DC",
"#9 c #C4D6E8",
"#0 c #DFE8F2",
"#q c #A9C2DE",
"#w c #8DAED3",
"#e c #C2D4E6",
"#r c #DDE6F0",
"#t c None",
/* pixels */
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.b+6o_oVoVo_+6.c#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@n#Oo)O@O) ]o @Q.(@W@'@n#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@2O*O!#,oS.^@ X~X~ n R P.I#8XK@2#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tXAO^.iOQ.d+k.p+/o;oG+F.'@1X0.6+c@3XA#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t+1+7XS. h c.*.&X1Ok.&+GOv.;o`.: [ 5+:@p#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t iopo-X& 4#6X4.$X1o=+CX1X1+GX9oc@AXdO5@+@4+ #t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t+ @l#@OR oodOk.&o=o= A@^o$@^o=Ok#7@=X7 ,.U 3 H+ #t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#toj+X@gXz.a.*+GX1 C@^ B B B VO:o=@_X9.z+h.q+h@`+_#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t .Xx.]Or 8Xm#7X4+VO-O=XW@a.S@d+>.D A.XQ+^+|owOF.1#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t.r+].T@0O[@%X4+C@^+,oPoK &.9XU+-@aO&X,Ok.{ d+h+|@HOE#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#tX(ozoMOYX`.j#9.*X>XWXY &oJoD.8OJ.9OP -.So: $OMXC+h@~+JO{#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t@v.POf 7@VO[#7X1.H@a@yOJ#-o9#+OtOtOGoJXU.*XTO,.=+o+D e@,#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#tXAO .<+Lo`@>#6+VO-@y ##-#o )@{ / /# .8 # u 'orO,OMo'OsoN#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t.1o2.QX# a@=.* A.S@t+(#o /@C@M./ fX}X.OU@).)OyOIO2OC@..>#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#toV@5@<O5+aonOv@^@a+'+!.`@M w@bo(@;@M+r@Do&.-.)#%oTX6OiXw#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t t@O@h.Jow@=.&O- &+(Oe./X)XN.sol.gO_O:#&oU Z#qX{XpX]@x@2#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#tX(+b.x ,+hXaX4 B.9+(.[+.O(Obos+H.~X,O[X[+joUo;@:o8 +.yO]#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#tO`@iXg gO,.Goc.l _Ox#r#0O(+8+'#t#toW x._#=oRX7.)#1+&Xe#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#tXc@No'XC+2XfX{##.}@*@6@#X'o}O# @+4 *o>@=+y+[O<ok@.o.#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t O+B#w.K+`.hoH+)XZXD vOO.VXh.F+~@qO>#tXV+QXRoZO$XB#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t@2 r#4XE `#q.0Xu+<#t#t#t#t#t#t#t q#t#tXmX[Oh+n#>#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#tXv@| mo{X7 =oh p#t#t#t#t#t#tOwO0#t#t#t@wooOX#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#2@joE FOLXP+5#t#t#t#t#t#t@J#t#t#t#tO.+$#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX=o#o;+[#e+I#t#t#t#t#t#t+K#t#t#toa@r#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@-oq >#&O[@z 9#t#t#t#t#t#t#t#t#t+l j#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tobO|#&XV.,O~#t#t#t#tX<#t#t#t#t b+v#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t s.5.Y@SoyoxXboL#5On 6#t#t#t#3O7o1#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tOVOmX/XlOT.@OZ.EX8Xr+}+Z l E@soI#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX2o0 Nog ~OdXkOoO; 0@T.C@Go<OV#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tXj.L.eXIOu.tX_O9X-Xn (.X |+f#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tOD T+Tou+m ;..o,@I#:@koFXO {#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t+U.MXs <XFot+{o1 }X^XX+u X+=#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.AX:XMO'XoX+o% IoOOpOaOK+3O+#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t+;@XoA+N.w@B@F J@UOz.m+0+i.A#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tO6Xt LO/@[+tX;o^ Uo*oi 2+@+=#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t M+PXMo/X+X+ DO8oOX*Oa#*XJO+#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#to@oY@8+N.w@BoX J@UOg@&@9Olo]#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tO4.W LO/ Q@B@L 1 K+zXi %+%XG#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX3Oc+A.u#;@$O%.oo!O1X% Y@e#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.v.NoQ.|+9X|.# y z+##t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.R#<o5oB W+s#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX@.7 :o|+++x#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tXq.!+q+Y#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t",
"#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t"
};
/* XPM */
const char *tango48_dialog_warning[] = {
/* width height ncolors chars_per_pixel */
"48 48 307 2",
/* colors */
" c #000000",
" . c #BB1D1D",
" X c #E6CECE",
" o c #D94141",
" O c #D01414",
" + c #CF2A2A",
" @ c #DBACAC",
" # c #DF6161",
" $ c #CD0707",
" % c #A5A5A5",
" & c #110000",
" * c #DA4545",
" = c #DCD1D1",
" - c #D55757",
" ; c #D46D6D",
" : c #A30505",
" > c #999999",
" , c #E06565",
" < c #D73838",
" 1 c #979797",
" 2 c #DBC6C6",
" 3 c #9F0101",
" 4 c #D21C1C",
" 5 c #DFD7D7",
" 6 c #CA3535",
" 7 c #940000",
" 8 c #DA5F5F",
" 9 c #D85D5D",
" 0 c #8D8D8D",
" q c #800000",
" w c #B31B1B",
" e c #D02727",
" r c #D83C3C",
" t c #CF0F0F",
" y c #C02B2B",
" u c #C84040",
" i c #D43838",
" p c #A50000",
" a c #7F7F7F",
" s c #910000",
" d c #DE5C5C",
" f c #D52F2F",
" g c #CC0202",
" h c #7D7D7D",
" j c #D94040",
" k c #D01313",
" l c #DCB6B6",
" z c #ECE0E0",
" x c #CE1111",
" c c #777777",
" v c #690000",
" b c #DFDDDD",
" n c #A20000",
" m c #DF6060",
" M c #D63333",
" N c #CD0606",
" B c #B72525",
" V c #B52323",
" C c #D02D2D",
" Z c #E16F6F",
" A c #D75858",
" S c #676767",
" D c #BE2F2F",
" F c #636363",
" G c #E4C4C4",
" H c #E06464",
" J c #D73737",
" K c #CE0A0A",
" L c #A10202",
" P c #D53535",
" I c #9F0000",
" U c #C53939",
" Y c #AC1010",
" T c #D13131",
" R c #5B5B5B",
" E c #A80C0C",
" W c #E1B7B7",
" Q c #C42E2E",
" ! c #DB5555",
" ~ c #A40808",
" ^ c #CF0E0E",
" / c #4F4F4F",
" ( c #BC2626",
" ) c #DB6262",
" _ c #9C0000",
" ` c #4B4B4B",
" ' c #DE5B5B",
" ] c #D52E2E",
" [ c #CC0101",
" { c #D78C8C",
" } c #474747",
" | c #B21C1C",
". c #434343",
".. c #D85555",
".X c #E06A6A",
".o c #D88383",
".O c #DF8080",
".+ c #E1DEDE",
".@ c #F0F0F0",
".# c #D56969",
".$ c #D45151",
".% c #DB4E4E",
".& c #AC1616",
".* c #EEEEEE",
".= c #D13737",
".- c #ECECEC",
".; c #990000",
".: c #CE1D1D",
".> c #DF5F5F",
"., c #D63232",
".< c #CD0505",
".1 c #DAC0C0",
".2 c #EAEAEA",
".3 c #E8E8E8",
".4 c #AB0B0B",
".5 c #DED1D1",
".6 c #850000",
".7 c #E6E6E6",
".8 c #E16E6E",
".9 c #E4E4E4",
".0 c #E2E2E2",
".q c #D9B5B5",
".w c #E0E0E0",
".e c #BC2C2C",
".r c #AA0000",
".t c #DEDEDE",
".y c #D03939",
".u c #D84E4E",
".i c #CE0909",
".p c #A10101",
".a c #B01313",
".s c #DCDCDC",
".d c #EEE7E7",
".f c #D01818",
".g c #CE1616",
".h c #A80B0B",
".j c #DD5656",
".k c #D83A3A",
".l c #CD0B0B",
".z c #A00303",
".x c #E9D8D8",
".c c #DD6363",
".v c #D34C4C",
".b c #171717",
".n c #C12020",
".m c #0D0000",
".M c #C6C6C6",
".N c #D52D2D",
".B c #CC0000",
".V c #D24141",
".C c #DA5656",
".Z c #E06969",
".A c #D65252",
".S c #E1DDDD",
".D c #DB4D4D",
".F c #D22020",
".G c #D24E4E",
".H c #AA1313",
".J c #DF5E5E",
".K c #CD0404",
".L c #CE4A4A",
".P c #010101",
".I c #DC7272",
".U c #B31F1F",
".Y c #DC5151",
".T c #D32424",
".R c #AD1919",
".E c #DFC7C7",
".W c #D23A3A",
".Q c #BA2929",
".! c #D15050",
".~ c #E06262",
".^ c #D73535",
"./ c #A10000",
".( c #CE1515",
".) c #DD5555",
"._ c #D42828",
".` c #FF0000",
".' c #D45656",
".] c #989898",
".[ c #CD0A0A",
".{ c #A00202",
".} c #CD3838",
".| c #9E0000",
"X c #D46363",
"X. c #DB6060",
"XX c #DA4848",
"Xo c #D11B1B",
"XO c #DDBEBE",
"X+ c #D14949",
"X@ c #A90E0E",
"X# c #C73232",
"X$ c #DE5959",
"X% c #A70C0C",
"X& c #8C8C8C",
"X* c #DD9D9D",
"X= c #DBC9C9",
"X- c #DB4C4C",
"X; c #D21F1F",
"X: c #AA1212",
"X> c #DA9090",
"X, c #808080",
"X< c #D04B4B",
"X1 c #DF5D5D",
"X2 c #D63030",
"X3 c #CD0303",
"X4 c #E16C6C",
"X5 c #DF6A6A",
"X6 c #CD1010",
"X7 c #E2E0E0",
"X8 c #DC5050",
"X9 c #747474",
"X0 c #D35151",
"Xq c #BA2828",
"Xw c #D96464",
"Xe c #CC0505",
"Xr c #6E6E6E",
"Xt c #D33030",
"Xy c #D35E5E",
"Xu c #D94343",
"Xi c #686868",
"Xp c #D65757",
"Xa c #DD5454",
"Xs c #D42727",
"Xd c #A60707",
"Xf c #D33D3D",
"Xg c #DB5252",
"Xh c #A40505",
"Xj c #B31717",
"Xk c #A20303",
"Xl c #A00101",
"Xz c #D11A1A",
"Xx c #5A5A5A",
"Xc c #DE5858",
"Xv c #D52B2B",
"Xb c #CF2525",
"Xn c #AE1515",
"Xm c #DFABAB",
"XM c #D44E4E",
"XN c #DC6363",
"XB c #FFFFFF",
"XV c #DB4B4B",
"XC c #D21E1E",
"XZ c #CF3232",
"XA c #B72121",
"XS c #DABDBD",
"XD c #BE1E1E",
"XF c #D83E3E",
"XG c #DCCCCC",
"XH c #424242",
"XJ c #D75454",
"XK c #DF6969",
"XL c #CD0F0F",
"XP c #D78282",
"XI c #D43A3A",
"XU c #DC4F4F",
"XY c #EFEFEF",
"XT c #A30000",
"XR c #EDEDED",
"XE c #EBEBEB",
"XW c #D53131",
"XQ c #E9E9E9",
"X! c #8F0000",
"X~ c #090000",
"X^ c #D67777",
"X/ c #B42121",
"X( c #E7E7E7",
"X) c #D94242",
"X_ c #D01515",
"X` c #E5E5E5",
"X' c #B71A1A",
"X] c #E3E3E3",
"X[ c #DD5353",
"X{ c #E1E1E1",
"X} c #DFDFDF",
"X| c #A20202",
"o c #DDDDDD",
"o. c #A00000",
"oX c #D54B4B",
"oo c #C31F1F",
"oO c #DA4646",
"o+ c #D11919",
"o@ c #D95C5C",
"o# c #C03333",
"o$ c #DAA2A2",
"o% c #D3D3D3",
"o& c #A50808",
"o* c #E06666",
"o= c #D99797",
"o- c #181818",
"o; c #9D0000",
"o: c #DB4A4A",
"o> c #C7C7C7",
"o, c #DDD6D6",
"o< c #CC4545",
"o1 c #D25858",
"o2 c #E16A6A",
"o3 c #D83D3D",
"o4 c #C02C2C",
"o5 c #DD6666",
"o6 c #D32121",
"o7 c #AD1616",
"o8 c #DEDADA",
"o9 c #CF1D1D",
"o0 c #CC0303",
"oq c #D67676",
"ow c None",
/* pixels */
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowow./././ nowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowow nX/ 8XNXq nowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowX% Z._X;X4X@owowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowXT.L o.B.B <X+./owowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowow.H.8 N.B.B.K HXnowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowow n.!.^.B.B.B.B.NXM./owowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowow.Ro2X3.BXZ.y.B [X1 wowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowow n - ].B g.q.1Xe.B.T.A./owowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowow.U , [.B.G.so Xy.B.BXaXAowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowo. 9Xs.Bo0XSo o X=.[.BXo...powowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowow B.>.B.Bo1o o o .t.#.B.Bo: (o.owowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowow.p ).F.B $ 2o o .t.t.5XL.B O.CX|owowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowow.eXc.B.BX o o .t.tX}X}oq.B.B j y./owowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowXko5Xz.B.lXGo .t.tX}X}X} 5.(.B ^ !Xhowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowo.o#.Y.B.B ;o .t.tX}X}X}.w.w.o.B.B < Q./owowowowowowowowowowowowowow",
"owowowowowowowowowowowowowow :XK O.BX6 =.t.t 1 h h.].wX{.So9.B.iXgo&owowowowowowowowowowowowowow",
"owowowowowowowowowowowowow./ Uo:.B.BX^.t.tX}XH . X{X{.0X>.B.B fX#./owowowowowowowowowowowowow",
"owowowowowowowowowowowowow ~X5 t.B.go,.tX}X} / /X{.0.0X7 e.B N.%.howowowowowowowowowowowowow",
"owowowowowowowowowowowow n uXu.B.BXP.tX}X}.wXx R.0.0.0X]X*.B.BXs 6./owowowowowowowowowowowow",
"owowowowowowowowowowowow E.X K.B.:o8X}X}.w.w S Xi.0.0X].9.9 T.BX3XX Yowowowowowowowowowowowow",
"owowowowowowowowowowow no< r.B.B {X}X}.w.w.wX9 X9X]X].9.9X`Xm.B.B.F.}./owowowowowowowowowowow",
"owowowowowowowowowowowX:.Z $.BXb bX}.w.w.wX{ a X,X].9.9X`X`.7Xf.B [X).aowowowowowowowowowowow",
"owowowowowowowowowow./X<.^.B.Bo=X}.w.w.wX{X{X& 0.9.9X`X`.7.7 W.B.Bo+.y./owowowowowowowowowow",
"owowowowowowowowowow.&o*.K.B CX}.w.w.wX{X{.0.] >.9X`X`.7.7X(X(oX.B.B.kXjowowowowowowowowowow",
"owowowowowowowowow./X0 ].B.Bo$.w.w.wX{X{.0.0 % %X`X`.7.7X(X(.3 Go0.B k.W.powowowowowowowowow",
"owowowowowowowowow | # g.B.=.w.w.wX{X{.0.0X].M F Fo>X`.7.7X(X(.3XQXQ A.B.B MX'o.owowowowowowowow",
"owowowowowowowow./XpXs.B.B @.w.wX{X{.0.0X]X].9.Mo>X`.7.7X(X(.3XQXQ.2 X N.B ^XI Lowowowowowowowow",
"owowowowowowowow V d [.B.V.w.wX{X{.0.0X]X].9Xr .PX9.7X(.3.3XQXQ.2.2XEXw.B.BXv ../owowowowowowow",
"owowowowowowow.po@o6.B [ l.wX{X{.0.0X]X].9.9.b o-X(.3.3XQXQ.2.2XEXE.x.[.B.i iXkowowowowowowow",
"owowowowowowow.Q.).B.B.v.wX{X{.0.0X]X].9.9X` ` }.3.3XQXQ.2.2XEXE.-.-.I.B.B.TXD nowowowowowow",
"owowowowowowX|X.Xo.Bo0XOX{X{.0.0X]X].9.9X`X`o% c co%.3XQXQ.2.2XEXE.-.-XR z x.B N P :owowowowowow",
"owowowowow./ DXU.B.B.'X{X{.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*.O.B.BXC.n./owowowowow",
"owowowowowXk.cX_.B N.EX{.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*XY.d.f.BX3XWXdowowowowow",
"owowowow 7o4X-.B.B C.+.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*XYXY.@.u.B.BXzooo.owowowow",
"owowowow.| A 4.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.KXto.owowowow",
"owowowow _.$ f.<.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B g t +o.owowowow",
"owowowow qo7XJ.~ , # m.JX1 'X$Xc.j.)X[.YX8XU.DXVo:XXoO *XuX) jXFo3 r.k < J.^ M.,X2 +.4 sowowowow",
"owowowowow.6o; I 3.z.z.z.z.z.z.z.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{XlXlXl 3 I IX!owowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow",
"owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow"
};
// ---------------------------------------------------------------------
// end of Tango icons
// ---------------------------------------------------------------------
| 109,905
|
C++
|
.cxx
| 5,697
| 18.275935
| 99
| 0.525394
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,177
|
nls.cxx
|
w1hkj_fldigi/src/misc/nls.cxx
|
// ----------------------------------------------------------------------------
// nls.cxx
//
// Copyright (C) 2008
// Stéphane Fillod, F8CFE
//
// Copyright (C) 2011
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <locale.h>
#include <cstdlib>
#include <cstdio>
#include <unistd.h>
#include <sys/stat.h>
#include <limits.h>
#include "nls.h"
#include "gettext.h"
#ifndef PATH_MAX
# define PATH_MAX 4096
#endif
#ifdef __WOE32__
# include <string>
# include <fstream>
// TODO: figure out the percentage automatically; hopefully not in a horribly kludgy way
struct lang_def_t ui_langs[] = {
{ "en", "en_US", "English"},
{ "de", "de_DE", "Deutsch (German)"},
{ "nl", "nl_NL", "Nederlands (Dutch)"},
{ "es", "es_ES", "Espa\361ol (Spanish)"},
{ "fr", "fr_FR", "Fran\347ais (French)"},
{ "it", "it_IT", "Italiano (Italian)"},
{ "pl", "pl_PL", "Język (Polish)"},
{ "ru", "ru_RU", "Pусский (Russian)"},
{ "el", "el_EL", "Ελληνικά (Greek)"},
{ NULL, NULL, NULL }
};
static std::string get_win32_lang_dir(const char* homedir = NULL)
{
std::string lang_fn;
if (!homedir) {
if (!(homedir = getenv("USERPROFILE")))
return lang_fn;
lang_fn.assign(homedir).append("\\fldigi.files\\");
}
return lang_fn.append("lang.txt");
}
int get_ui_lang(const char* homedir)
{
std::string lang = get_win32_lang_dir(homedir);
std::ifstream in(lang.c_str());
if (!in)
return 0;
std::string::size_type u = std::string::npos;
while (in >> lang) {
if ( (lang[0] != '\n') & (lang[0] != '#') && ( (u = lang.find('_')) != std::string::npos) )
break;
}
in.close();
if (u != std::string::npos)
for (lang_def_t* p = ui_langs; p->lang; p++)
if (lang == p->lang_region)
return (int)(p - ui_langs);
return 0;
}
void set_ui_lang(int lang, const char* homedir)
{
if ((size_t)lang >= sizeof(ui_langs)/sizeof(*ui_langs) - 1)
return;
std::string langfn = get_win32_lang_dir(homedir);
std::ofstream f(langfn.c_str());
if (f) {
f << "# Autogenerated file, do not edit\r\n"
<< ui_langs[lang].lang_region << "\r\n";
f.close();
}
}
#endif
int setup_nls(void)
{
static int nls_set_up = 0;
if (nls_set_up)
return nls_set_up;
setlocale (LC_MESSAGES, "");
setlocale (LC_CTYPE, "C");
setlocale (LC_TIME, "");
// setting LC_NUMERIC might break the config read/write routines
const char* ldir;
char buf[PATH_MAX];
if (!(ldir = getenv("FLDIGI_LOCALE_DIR"))) {
if (getcwd(buf, sizeof(buf) - strlen("/locale") - 1)) {
#ifdef __WOE32__
int lang = get_ui_lang();
setenv("LANGUAGE", ui_langs[lang].lang_region, 1);
#endif
strcpy(buf + strlen(buf), "/locale");
struct stat s;
if (stat(buf, &s) != -1 && S_ISDIR(s.st_mode))
ldir = buf;
else
ldir = LOCALEDIR;
}
}
bindtextdomain(PACKAGE, ldir);
bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE);
return nls_set_up = 1;
}
| 3,617
|
C++
|
.cxx
| 123
| 27.235772
| 93
| 0.627712
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,178
|
log.cxx
|
w1hkj_fldigi/src/misc/log.cxx
|
// ----------------------------------------------------------------------------
// log.cxx -- Received text logging for fldigi
//
// Copyright (C) 2007-2008
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#ifdef __MINGW32__
# include "compat.h"
#endif
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <sys/time.h>
#include <string>
#include <cstring>
#include "log.h"
#include "trx.h"
#include "fl_digi.h"
#include "timeops.h"
#include "ascii.h"
static const char *lognames[] = { "RX", "TX", "", "" };
cLogfile::cLogfile(const std::string& fname)
: retflag(true), logtype(LOG_RX)
{
if ((logfile = fl_fopen(fname.c_str(), "a"))) {
setvbuf(logfile, (char*)NULL, _IOLBF, 0);
set_cloexec(fileno(logfile), 1);
}
}
cLogfile::~cLogfile()
{
if (logfile)
fclose(logfile);
}
void cLogfile::log_to_file(log_t type, const std::string& s)
{
if (!logfile || ferror(logfile) || s.empty())
return;
char timestr[64];
struct tm tm;
time_t t;
if (type == LOG_RX || type == LOG_TX) {
if (retflag || type != logtype) {
if (type != logtype) fprintf(logfile, "\n");
time(&t);
gmtime_r(&t, &tm);
strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%MZ", &tm);
char freq[20];
snprintf(freq, sizeof(freq), "%d",
static_cast<int>( wf->rfcarrier() +
(wf->USB() ? active_modem->get_freq()
: -active_modem->get_freq() ) ) );
const char *logmode = mode_info[active_modem->get_mode()].adif_name;
fprintf(logfile, "%s %s : %s (%s): ", lognames[type], freq, logmode, timestr);
}
for (size_t i = 0; i < s.length(); i++)
fprintf(logfile, "%s", ascii3[s[i] & 0xFF]);
// if (s[i] == '\n' || (unsigned char)s[i] >= ' ') fprintf(logfile, "%c", s[i]);
retflag = *s.rbegin() == '\n';
if (!retflag)
fflush(logfile);
}
else {
time(&t);
gmtime_r(&t, &tm);
// Was %e (space padded month) but it's not available in the MS C
// runtime library, %d (zero-padded) is more portable.
strftime(timestr, sizeof(timestr), "%a %b %d %H:%M:%S %Y UTC", &tm);
fprintf(logfile, "\n--- Logging %s at %s ---\n", s.c_str(), timestr);
}
logtype = type;
}
void cLogfile::log_to_file_start()
{
log_to_file(LOG_START, "started");
}
void cLogfile::log_to_file_stop()
{
log_to_file(LOG_STOP, "stopped");
}
/* ---------------------------------------------------------------------- */
| 3,136
|
C++
|
.cxx
| 98
| 29.612245
| 82
| 0.597812
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,179
|
kiss_io.cxx
|
w1hkj_fldigi/src/misc/kiss_io.cxx
|
// ----------------------------------------------------------------------------
// kiss_io.cxx
//
// support for KISS interface
//
// Copyright (c) 2014, 2016
// Robert Stiles, KK5VD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <fstream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <ctime>
#include <errno.h>
#include <float.h>
#include <sys/types.h>
#if !defined(__MINGW32__) && !defined(__APPLE__)
# include <sys/ipc.h>
# include <sys/msg.h>
#endif
#include <signal.h>
#include "config.h"
#ifdef __MINGW32__
# include "compat.h"
#endif
#include "main.h"
#include "configuration.h"
#include "fl_digi.h"
#include "trx.h"
#include "kiss_io.h"
#include "globals.h"
#include "threads.h"
#include "socket.h"
#include "debug.h"
#include "qrunner.h"
#include "data_io.h"
#include "status.h"
#include "psm/psm.h"
#include <FL/Fl.H>
#include <FL/fl_ask.H>
#include <FL/Fl_Check_Button.H>
#include "confdialog.h"
#include "configuration.h"
#include "status.h"
LOG_FILE_SOURCE(debug::LOG_KISSCONTROL);
//#define EXTENED_DEBUG_INFO
//#undef EXTENED_DEBUG_INFO
//======================================================================
// Socket KISS i/o used on all platforms
//======================================================================
#define KISSLOOP_TIMING 100 // msec
#define KISSLOOP_FRACTION 10 // msec
static std::string errstring;
// =====================================================================
static pthread_t kiss_thread;
static pthread_t kiss_rx_socket_thread;
static pthread_t kiss_watchdog_thread;
static pthread_cond_t kiss_watchdog_cond = PTHREAD_COND_INITIALIZER;
static pthread_mutex_t from_host_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t from_radio_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t kiss_bc_frame_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t kiss_frame_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t to_host_arq_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t to_host_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t to_radio_mutex = PTHREAD_MUTEX_INITIALIZER;
//static pthread_mutex_t external_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t restart_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t kiss_encode_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t kiss_loop_exit_mutex = PTHREAD_MUTEX_INITIALIZER;
bool kiss_enabled = false;
bool kiss_exit = false;
bool kiss_rx_exit = false;
bool allow_kiss_socket_io = false;
bool kiss_loop_running = false;
bool kiss_rx_loop_running = false;
bool kiss_watchdog_exit = false;
bool kiss_watchdog_running = false;
bool kiss_tcp_ip_connected = false;
bool tcpip_reset_flag = false;
static bool smack_crc_enabled = false;
static int crc_mode = CRC16_CCITT;
static std::string default_kiss_modem = "BPSK250";
static std::string kiss_modem = "";
static unsigned int transmit_buffer_flush_timeout = 0;
unsigned int duplex = KISS_HALF_DUPLEX; // Default half duplex
unsigned int kiss_port_no = 0; // Default is 0
/// Any access to shared variables must be protected.
static std::string from_host = "";
static std::string from_radio = "";
static std::string from_radio_parsed = "";
static std::string kiss_bc_frame = "";
static std::string kiss_frame = "";
static std::string kiss_ip_address = "";
static std::string kiss_ip_io_port = "";
static std::string kiss_ip_out_port = "";
static std::string kiss_one_frame = "";
static std::string to_arq_host = "";
static std::string to_host = "";
static std::string to_radio = "";
static std::string translated_frame = "";
static int pText = 0;
bool bcast_tx_buffer_empty_flag = false;
bool kiss_bcast_rsid_reception = false;
bool kiss_bcast_trx_toggle = false;
bool kiss_text_available = false;
static bool kiss_reset_flag = false;
static int retry_count = KISS_CONNECT_RETRY_COUNT;
#define HISTO_COUNT 256
#define HISTO_THRESH_HOLD 48
// In seconds
#define HISTO_RESET_TX_TIME 3
static int histogram[HISTO_COUNT];
static bool init_hist_flag = true;
// static double threshold = 5.0;
// time_t inhibit_tx_seconds = 0;
time_t temp_disable_tx_inhibit = 0;
time_t temp_disable_tx_duration = DISABLE_TX_INHIBIT_DURATION;
static int kpsql_pl = 0;
static double kpsql_threshold = 0.0;
extern int IMAGE_WIDTH;
Socket *kiss_socket = 0;
int data_io_enabled = DISABLED_IO;
int data_io_type = DATA_IO_UDP;
//program_start_time
bool program_started_flag = 0;
extern const struct mode_info_t mode_info[];
extern void abort_tx();
// Storage for modem list allowed for KISS use.
static std::vector<std::string> availabe_kiss_modems;
static int kiss_raw_enabled = KISS_RAW_DISABLED;
std::string host_name_string;
inline std::string uppercase_string(std::string str);
inline void set_tx_timeout(void);
size_t hdlc_decode(char *src, size_t src_size, char **dst);
size_t hdlc_encode(char *src, size_t src_size, char **dst);
size_t kiss_decode(char *src, size_t src_size, char **dst);
size_t kiss_encode(char *src, size_t src_size, char **dst);
static bool kiss_queue_frame(KISS_QUEUE_FRAME * frame, std::string cmd);
static int calc_ccitt_crc(char *buf, int n);
static int calc_fcs_crc(char *buf, int n);
static int calc_xor_crc(char *buf, int n);
static KISS_QUEUE_FRAME * encap_kiss_frame(std::string data, int frame_type, int port);
static KISS_QUEUE_FRAME *encap_kiss_frame(char *buffer, size_t buffer_size, int frame_type, int port);
static size_t decap_hdlc_frame(char *buffer, size_t data_count);
static size_t encap_hdlc_frame(char *buffer, size_t data_count);
static void *kiss_loop(void *args);
static void *ReadFromHostSocket(void *args);
static void *tcpip_watchdog(void *args);
static void exec_hardware_command(std::string cmd, std::string arg);
static void host_name(char *arg);
static void kiss_tcp_disconnect(char *arg);
static void parse_hardware_frame(std::string frame);
static void parse_kiss_frame(std::string frame_segment);
static void ReadFromHostBuffered(void);
static void reply_active_modem_bw(char * arg);
static void reply_active_modem(char * arg);
static void reply_busy_channel_duration(char * arg);
static void reply_busy_channel_on_off(char * arg);
static void reply_busy_state(char * arg);
static void reply_crc_mode(char *arg);
static void reply_csma_mode(char *arg);
static void reply_fldigi_stat(char *arg);
static void reply_kiss_raw_mode(char * arg);
static void reply_kpsql_fraction_gain(char *arg);
static void reply_kpsql_on_off(char * arg);
static void reply_kpsql_pwr_level(char * arg);
static void reply_kpsql_squelch_level(char * arg);
static void reply_modem_list(char * arg);
static void reply_psm_on_off(char * arg);
static void reply_psm_pwr_level(char * arg);
static void reply_psm_squelch_level(char * arg);
static void reply_rsid_bc_mode(char * arg);
static void reply_rsid_mode_state(char * arg);
static void reply_rsid_rx_state(char * arg);
static void reply_rsid_tx_state(char * arg);
static void reply_sql_level(char * arg);
static void reply_sql_on_off(char * arg);
static void reply_sql_pwr_level(char * arg);
static void reply_tnc_name(char * arg);
static void reply_trx_state(char * arg);
static void reply_trxs_bc_mode(char * arg);
static void reply_tx_buffer_count(char * arg);
static void reply_txbe_bc_mode(char * arg);
static void reply_waterfall_bw(char * arg);
static void reply_wf_freq_pos(char * arg);
static void send_disconnect_msg(void);
static void set_busy_channel_duration(char * arg);
static void set_busy_channel_inhibit(char *arg);
static void set_busy_channel_on_off(char * arg);
static void set_button(Fl_Button * button, bool value);
static void set_counter(Fl_Counter * counter, int value);
static void set_crc_mode(char * arg);
static void set_csma_mode(char * arg);
static void set_default_kiss_modem(void);
static void set_kiss_modem(char * arg);
static void set_kiss_raw_mode(char * arg);
static void set_kpsql_on_off(char * arg);
static void set_kpsql_squelch_level(char * arg);
static void set_psm_fraction_gain(char *arg);
static void set_psm_on_off(char * arg);
static void set_psm_squelch_level(char * arg);
static void set_reply_tx_lock(char * arg);
static void set_rsid_bc_mode(char * arg);
static void set_rsid_mode(char *arg);
static void set_rsid_rx(char *arg);
static void set_rsid_tx(char * arg);
static void set_sql_level(char * arg);
static void set_sql_on_off(char * arg);
static void set_trxs_bc_mode(char * arg);
static void set_txbe_bc_mode(char * arg);
static void set_wf_cursor_pos(char * arg);
static void WriteToHostARQBuffered(void);
static void WriteToHostBuffered(const char *data, size_t size);
static void WriteToRadioBuffered(const char *data, size_t size);
std::string kiss_decode(std::string frame);
std::string kiss_encode(std::string frame);
std::string unencap_kiss_frame(char *buffer, size_t buffer_size, int *frame_type, int *kiss_port_no);
std::string unencap_kiss_frame(std::string package, int *frame_type, int *kiss_port_no);
void kiss_main_thread_close(void *ptr);
void kiss_main_thread_retry_open(void *ptr);
void kiss_reset_buffers(void);
void kiss_reset(void);
void ReadFromRadioBuffered(void);
void WriteKISS(const char *data, size_t size);
void WriteKISS(const char *data);
void WriteKISS(const char data);
void WriteKISS(std::string data);
void WriteToHostBCastFramesBuffered(void);
void WriteToHostSocket(void);
/**********************************************************************************
* Not all modems are created equal. Translate!
* There must be at least HDLC_CNT_OFFSET count offset (+/-, but still in range)
* between real values and translated values.
**********************************************************************************/
static int not_allowed[256] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 16
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 32
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 48
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 64
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 96
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 112
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, // 128
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 144
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 160
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 176
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 192
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 208
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 224
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 240
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 // 256
};
/**********************************************************************************
* KISS hardware frame commands strings and calling functions
**********************************************************************************/
EXEC_HARDWARE_CMD_MATCH exec_match[] = {
{ (char *) "BCHN", set_busy_channel_on_off },
{ (char *) "BCHNS", set_busy_channel_duration },
{ (char *) "BUSY", reply_busy_state },
{ (char *) "CSMA", set_csma_mode },
{ (char *) "DISC", kiss_tcp_disconnect },
{ (char *) "FLSTAT", reply_fldigi_stat },
{ (char *) "HOST", host_name },
{ (char *) "IBCHN", set_busy_channel_inhibit },
{ (char *) "KISSCRCM", set_crc_mode },
{ (char *) "KISSRAW", set_kiss_raw_mode },
{ (char *) "KPSATT", set_psm_fraction_gain }, // Depreciated
{ (char *) "PSMATT", set_psm_fraction_gain },
{ (char *) "PSM", set_psm_on_off },
{ (char *) "PSMP", reply_psm_pwr_level },
{ (char *) "PSMS", set_psm_squelch_level },
{ (char *) "KPSQL", set_kpsql_on_off }, // Depreciated
{ (char *) "KPSQLP", reply_kpsql_pwr_level }, // Depreciated
{ (char *) "KPSQLS", set_kpsql_squelch_level }, // Depreciated
{ (char *) "MODEM", set_kiss_modem },
{ (char *) "MODEMBW", reply_active_modem_bw },
{ (char *) "MODEML", reply_modem_list },
{ (char *) "RSIDBCAST", set_rsid_bc_mode },
{ (char *) "RSIDM", set_rsid_mode },
{ (char *) "RSIDRX", set_rsid_rx },
{ (char *) "RSIDTX", set_rsid_tx },
{ (char *) "SQL", set_sql_on_off },
{ (char *) "SQLP", reply_sql_pwr_level },
{ (char *) "SQLS", set_sql_level },
{ (char *) "TNC", reply_tnc_name },
{ (char *) "TRXS", reply_trx_state },
{ (char *) "TRXSBCAST", set_trxs_bc_mode },
{ (char *) "TXBEBCAST", set_txbe_bc_mode },
{ (char *) "TXBUF", reply_tx_buffer_count },
{ (char *) "TXLOCK", set_reply_tx_lock },
{ (char *) "WFBW", reply_waterfall_bw },
{ (char *) "WFF", set_wf_cursor_pos },
{ (char *) 0, 0 }
};
#ifdef USE_NOCTRL
static std::string noctrl(std::string src);
static const char *asc[128] = {
"<NUL>", "<SOH>", "<STX>", "<ETX>",
"<EOT>", "<ENQ>", "<ACK>", "<BEL>",
"<BS>", "<TAB>", "\n", "<VT>",
"<FF>", "", "<SO>", "<SI>",
"<DLE>", "<DC1>", "<DC2>", "<DC3>",
"<DC4>", "<NAK>", "<SYN>", "<ETB>",
"<CAN>", "<EM>", "<SUB>", "<ESC>",
"<FS>", "<GS>", "<RS>", "<US>",
" ", "!", "\"", "#",
"$", "%", "&", "\'",
"(", ")", "*", "+",
",", "-", ".", "/",
"0", "1", "2", "3",
"4", "5", "6", "7",
"8", "9", ":", ";",
"<", "=", ">", "?",
"@", "A", "B", "C",
"D", "E", "F", "G",
"H", "I", "J", "K",
"L", "M", "N", "O",
"P", "Q", "R", "S",
"T", "U", "V", "W",
"X", "Y", "Z", "[",
"\\", "]", "^", "_",
"`", "a", "b", "c",
"d", "e", "f", "g",
"h", "i", "j", "k",
"l", "m", "n", "o",
"p", "q", "r", "s",
"t", "u", "v", "w",
"x", "y", "z", "{",
"|", "}", "~", "<DEL>"
};
/**********************************************************************************
*
**********************************************************************************/
static std::string noctrl(std::string src)
{
static std::string retstr;
retstr.clear();
char hexstr[10];
int c;
for (size_t i = 0; i < src.length(); i++) {
c = src[i];
if ( c > 0 && c < 128)
retstr.append(asc[c]);
else {
snprintf(hexstr, sizeof(hexstr), "<%0X>", c & 0xFF);
retstr.append(hexstr);
}
}
return retstr;
}
#endif // USE_NOCTRL
/**********************************************************************************
* For SMACK CRC validation
**********************************************************************************/
static int calc_ccitt_crc(char *buf, int n)
{
static int crc_table[] = {
0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241,
0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440,
0xcc01, 0xcc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40,
0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841,
0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40,
0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41,
0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641,
0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040,
0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240,
0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441,
0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41,
0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840,
0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41,
0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40,
0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640,
0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041,
0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240,
0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441,
0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41,
0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840,
0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41,
0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40,
0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640,
0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041,
0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241,
0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440,
0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40,
0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841,
0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40,
0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41,
0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641,
0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040
};
int crc;
crc = 0;
while (--n >= 0)
crc = ((crc >> 8) & 0xff) ^ crc_table[(crc ^ *buf++) & 0xff];
return crc;
}
/**********************************************************************************
* For SMACK CRC validation (BPQ XOR CRC implimentation).
**********************************************************************************/
static int calc_xor_crc(char *buf, int n)
{
int crc;
crc = 0;
while (--n >= 0)
crc ^= (*buf++ & 0xff);
return crc;
}
/**********************************************************************************
* For FCS CRC.
**********************************************************************************/
static int calc_fcs_crc(char *buf, int n)
{
static int fcstab[256] = {
0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
int crc;
crc = 0xFFFF;
while (--n >= 0)
crc = ((crc >> 8) & 0xff) ^ fcstab[(crc ^ *buf++) & 0xff];
return crc;
}
/**********************************************************************************
*
**********************************************************************************/
static void set_button(Fl_Button * button, bool value)
{
button->value(value);
button->do_callback();
}
/**********************************************************************************
*
**********************************************************************************/
static void set_counter(Fl_Counter * counter, int value)
{
counter->value(value);
counter->do_callback();
}
/**********************************************************************************
*
**********************************************************************************/
static void set_slider2(Fl_Slider2 * sider, int value)
{
sider->value(value);
sider->do_callback();
}
/**********************************************************************************
*
**********************************************************************************/
bool valid_kiss_modem(std::string _modem)
{
if(_modem.empty()) return false;
int index = 0;
int count = availabe_kiss_modems.size();
std::string _tmp_str;
if(count < 1) {
for(index = 0; index < NUM_MODES; index++) {
if(mode_info[index].iface_io & KISS_IO) {
_tmp_str = uppercase_string(mode_info[index].sname);
availabe_kiss_modems.push_back(_tmp_str);
}
}
count = availabe_kiss_modems.size();
}
std::string cmp_str = "";
index = 0;
_modem = uppercase_string(_modem);
while(index < count) {
cmp_str = availabe_kiss_modems[index];
if(cmp_str.empty()) return false;
if(_modem.compare(cmp_str) == 0) {
return true;
}
index++;
}
return false;
}
/**********************************************************************************
*
**********************************************************************************/
void check_kiss_modem(void)
{
int mode = active_modem->get_mode();
std::string modem_name;
modem_name.assign(mode_info[mode].sname);
bool valid = valid_kiss_modem(modem_name);
if(!valid)
set_default_kiss_modem();
}
/**********************************************************************************
*
**********************************************************************************/
static void set_default_kiss_modem(void)
{
set_kiss_modem((char *) default_kiss_modem.c_str());
}
/**********************************************************************************
*
**********************************************************************************/
inline std::string uppercase_string(std::string str)
{
int index = 0;
int count = str.size();
std::string ret_str = "";
if(!count) return ret_str;
ret_str.reserve(count + 1);
ret_str.clear();
for(index = 0; index < count; index++)
ret_str += toupper(str[index]);
return ret_str;
}
/**********************************************************************************
* MODEM:<modem_id_string>
**********************************************************************************/
static void set_kiss_modem(char * arg)
{
if(!arg) return;
std::string _modem = "";
std::string _cmp_modem = "";
_modem.assign(arg);
if(_modem.empty()) {
return reply_active_modem(arg);
}
bool valid = valid_kiss_modem(_modem);
_modem = uppercase_string(_modem);
if(valid) {
for (size_t i = 0; i < NUM_MODES; i++) {
_cmp_modem = uppercase_string(mode_info[i].sname);
if (_modem == _cmp_modem) {
REQ_SYNC(init_modem_sync, i, 0);
kiss_modem.assign(_modem);
break;
}
}
return;
}
if(!valid)
LOG_INFO("Modem %s invalid for KISS use. Must support 8bit.", _modem.c_str());
return;
}
/**********************************************************************************
* DISC: Disconnect TCP/IP connection.
**********************************************************************************/
static void kiss_tcp_disconnect(char *arg)
{
if(kiss_socket && data_io_type == DATA_IO_TCP) {
Fl::awake(kiss_main_thread_close, (void *) 0);
}
}
/**********************************************************************************
* Send a Disconnect message to the HOST called from the main thread only.
**********************************************************************************/
static void send_disconnect_msg(void)
{
if(kiss_socket && data_io_type == DATA_IO_TCP) {
std::string package = "";
std::string cmd = "DISC:";
package.assign(cmd);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
}
/**********************************************************************************
* FLSTAT:<INIT|OK>,<HH:MM:SS>
**********************************************************************************/
static void reply_fldigi_stat(char *arg)
{
std::string package = "";
std::string cmd = "FLSTAT:";
unsigned int hours = 0;
unsigned int mins = 0;
unsigned int secs = 0;
time_t current_time = time(0);
time_t diff_time = 0;
char buffer[64];
package.assign(cmd);
if(program_started_flag) {
package.append("OK");
} else {
package.append("INIT");
program_started_flag = true;
}
if(program_start_time == 0)
program_start_time = time(0);
diff_time = current_time - program_start_time;
hours = (unsigned int) (diff_time / 3600);
diff_time -= (time_t) (hours * 3600);
mins = (unsigned int)(diff_time / 60);
diff_time -= (time_t) (mins * 60);
secs = (unsigned int) diff_time;
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, ",%02u:%02u:%02u", hours, mins, secs);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* CSMA:<ON|OFF>
**********************************************************************************/
static void set_csma_mode(char * arg)
{
if(!arg)
return;
std::string rsid_tx_state = "";
rsid_tx_state.assign(arg);
if(rsid_tx_state.empty())
return reply_csma_mode(arg);
std::string state = uppercase_string(rsid_tx_state);
if(state.find("ON") != std::string::npos) {
REQ(set_button, btnEnable_csma, 1);
return;
}
if(state.find("OFF") != std::string::npos) {
REQ(set_button, btnEnable_csma, 0);
return;
}
}
/**********************************************************************************
* CSMA:<ON|OFF>
**********************************************************************************/
static void reply_csma_mode(char *arg)
{
std::string package = "";
std::string cmd = "CSMA:";
package.assign(cmd);
if(progdefaults.csma_enabled)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* IBCHN:I // Inhibit busy channel temporarily. 'I' (character)
* IBCHN:<N> // Set Inhibit busy channel duration to N seconds
* IBCHN:0 // Resets temporary duration to default setting (5).
* IBCHN: // Returns IBCHN:<SECONDS>
**********************************************************************************/
static void set_busy_channel_inhibit(char *arg)
{
std::string argstr = "";
int temp = 0;
if(arg) {
argstr.assign(arg);
if(!argstr.empty()) {
if(argstr[0] == 'I' || argstr[0] == 'i') {
if(progdefaults.enableBusyChannel && inhibit_tx_seconds) {
temp_disable_tx_inhibit = time(0) + temp_disable_tx_duration;
}
} else if(isdigit(argstr[0])) {
sscanf(arg, "%d", &temp);
if(temp == 0)
temp_disable_tx_duration = DISABLE_TX_INHIBIT_DURATION;
else
temp_disable_tx_duration = temp;
}
return;
}
}
std::string cmd = "IBCHN:";
std::string package = "";
char buff[32];
package.assign(cmd);
memset(buff, 0, sizeof(buff));
snprintf(buff, sizeof(buff)-1, "%lu", temp_disable_tx_duration);
package.append(buff);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* KPSATT:<value> // Set the fractional ratio gain value (1/value)
**********************************************************************************/
static void set_psm_fraction_gain(char *arg)
{
if(!arg) return;
std::string args;
args.assign(arg);
if(args.empty())
return reply_kpsql_fraction_gain(arg);
unsigned int value = 0;
sscanf(args.c_str(), "%u", &value);
update_kpsql_fractional_gain(value);
REQ(set_counter, cntKPSQLAttenuation, progdefaults.kpsql_attenuation);
}
/**********************************************************************************
* KPSQLG: // Return the fractional ratio gain value (1/value)
**********************************************************************************/
static void reply_kpsql_fraction_gain(char *arg)
{
std::string package = "";
std::string cmd = "KPSATT:";
char buffer[128];
package.assign(cmd);
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "%u", progdefaults.kpsql_attenuation);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* WFF:<integer value> Move TXRX cursor to Frequency.
**********************************************************************************/
static void set_wf_cursor_pos(char * arg)
{
if(!arg) return;
std::string wf_cursor_pos = "";
wf_cursor_pos.assign(arg);
if(wf_cursor_pos.empty())
return reply_wf_freq_pos(arg);
int cursor = 0;
int mode_bw = active_modem->get_bandwidth();
sscanf(wf_cursor_pos.c_str(), "%d", &cursor);
mode_bw >>= 1;
if((cursor - mode_bw) < 0) cursor = mode_bw;
if((cursor + mode_bw) >= IMAGE_WIDTH) cursor = IMAGE_WIDTH - mode_bw;
active_modem->set_freq((double) cursor);
}
/**********************************************************************************
* RSIDTX:<ON|OFF>
**********************************************************************************/
static void set_rsid_tx(char * arg)
{
if(!arg)
return;
std::string rsid_tx_state = "";
rsid_tx_state.assign(arg);
if(rsid_tx_state.empty())
return reply_rsid_tx_state(arg);
std::string state = uppercase_string(rsid_tx_state);
if(state.find("ON") != std::string::npos) {
REQ(set_button, btnTxRSID, 1);
return;
}
if(state.find("OFF") != std::string::npos) {
REQ(set_button, btnTxRSID, 0);
return;
}
}
/**********************************************************************************
* RSIDRX:<ON|OFF>
**********************************************************************************/
static void set_rsid_rx(char *arg)
{
if(!arg)
return;
std::string rsid_rx_state = "";
rsid_rx_state.assign(arg);
if(rsid_rx_state.empty())
return reply_rsid_rx_state(arg);
std::string state = uppercase_string(rsid_rx_state);
if(state.find("ON") != std::string::npos) {
REQ(set_button, btnRSID, 1);
return;
}
if(state.find("OFF") != std::string::npos) {
REQ(set_button, btnRSID, 0);
return;
}
}
/**********************************************************************************
* RSIDM:<BANDPASS|MODEM> <ACTIVE|NOTIFY>
**********************************************************************************/
static void set_rsid_mode(char *arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_rsid_mode_state(arg);
std::string state = uppercase_string(strarg);
if(state.find("BANDPASS") != std::string::npos) {
REQ(set_button, chkRSidWideSearch, 1);
}
if(state.find("MODEM") != std::string::npos) {
REQ(set_button, chkRSidWideSearch, 0);
}
if(state.find("NOTIFY") != std::string::npos) {
REQ(set_button, chkRSidNotifyOnly, 1);
}
if(state.find("ACTIVE") != std::string::npos) {
REQ(set_button, chkRSidNotifyOnly, 0);
}
}
/**********************************************************************************
* RSIDBCAST:<ON|OFF>
**********************************************************************************/
static void set_rsid_bc_mode(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_rsid_bc_mode(arg);
std::string state = uppercase_string(strarg);
if(state.find("ON") != std::string::npos) {
kiss_bcast_rsid_reception = true;
return;
}
if(state.find("OFF") != std::string::npos) {
kiss_bcast_rsid_reception = false;
return;
}
}
/**********************************************************************************
* RSIDBCAST:<ON|OFF>
**********************************************************************************/
static void reply_rsid_bc_mode(char * arg)
{
std::string package = "";
std::string cmd = "RSIDBCAST:";
package.assign(cmd);
if(kiss_bcast_rsid_reception)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* TRXSBCAST:<ON|OFF>
**********************************************************************************/
static void set_trxs_bc_mode(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_trxs_bc_mode(arg);
std::string state = uppercase_string(strarg);
if(state.find("ON") != std::string::npos) {
kiss_bcast_trx_toggle = true;
return;
}
if(state.find("OFF") != std::string::npos) {
kiss_bcast_trx_toggle = false;
return;
}
}
/**********************************************************************************
* TRXSBCAST:<ON|OFF>
**********************************************************************************/
static void reply_trxs_bc_mode(char * arg)
{
std::string package = "";
std::string cmd = "TRXSBCAST:";
package.assign(cmd);
if(kiss_bcast_trx_toggle)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* SET TXBEBCAST:<ON|OFF>
**********************************************************************************/
static void set_txbe_bc_mode(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_txbe_bc_mode(arg);
std::string state = uppercase_string(strarg);
if(state.find("ON") != std::string::npos) {
bcast_tx_buffer_empty_flag = true;
return;
}
if(state.find("OFF") != std::string::npos) {
bcast_tx_buffer_empty_flag = false;
return;
}
}
/**********************************************************************************
* REPLY TXBEBCAST:<ON|OFF>
**********************************************************************************/
static void reply_txbe_bc_mode(char * arg)
{
std::string package = "";
std::string cmd = "TXBEBCAST:";
package.assign(cmd);
if(bcast_tx_buffer_empty_flag)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* TNC: FLDIGI returns TNC:FLDIGI <Version Number>
**********************************************************************************/
static void reply_tnc_name(char * arg)
{
std::string package = "";
std::string cmd = "TNC:";
package.assign(cmd).append("FLDIGI ").append(PACKAGE_VERSION);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* TRXS: FLDIGI returns TRXSQ:<TX|RX>
**********************************************************************************/
static void reply_trx_state(char * arg)
{
std::string package = "";
std::string cmd = "TRXS:";
package.assign(cmd);
if((trx_state == STATE_TX) || (trx_state == STATE_TUNE))
package.append("TX");
else
package.append("RX");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* RSIDRX: FLDIGI returns RSIDRXQ:<ON|OFF>
**********************************************************************************/
static void reply_rsid_rx_state(char * arg)
{
std::string package = "";
std::string cmd = "RSIDRX:";
package.assign(cmd);
if(progdefaults.rsid)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* RSIDTX: FLDIGI returns RSIDTXQ:<ON|OFF>
**********************************************************************************/
static void reply_rsid_tx_state(char * arg)
{
std::string package = "";
std::string cmd = "RSIDTX:";
package.assign(cmd);
if(progdefaults.TransmitRSid)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* TXLOCK: FLDIGI TXLOCK:<ON|OFF> or without arg return lock state.
**********************************************************************************/
static void set_reply_tx_lock(char * arg)
{
if(!arg) return;
std::string strarg = "";
std::string package = "";
std::string cmd = "TXLOCK:";
strarg.assign(arg);
if(strarg.empty()) {
package.assign(cmd);
if (!active_modem)
package.append("INOP");
else if(active_modem->freqlocked())
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
return;
}
if (!active_modem) return;
if(strarg.find("ON") != std::string::npos) {
active_modem->set_freqlock(true);
REQ(set_button, (Fl_Button *) wf->xmtlock, 1);
return;
}
if(strarg.find("OFF") != std::string::npos) {
active_modem->set_freqlock(false);
REQ(set_button, (Fl_Button *) wf->xmtlock, 0);
return;
}
}
/**********************************************************************************
* WFF: FLDIGI returns WFFQ:<integer value> (0-4000) Current waterfall limit
**********************************************************************************/
static void reply_wf_freq_pos(char * arg)
{
std::string package = "";
std::string cmd = "WFF:";
char buff[32];
package.assign(cmd);
memset(buff, 0, sizeof(buff));
snprintf(buff, sizeof(buff) - 1, "%d", (int) active_modem->get_txfreq());
package.append(buff);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* RSIDM: FLDIGI returns RSIDMQ:<BANDPASS|MODEM>,<ACTIVE|NOTIFY>
**********************************************************************************/
static void reply_rsid_mode_state(char * arg)
{
std::string package = "";
std::string cmd = "RSIDM:";
package.assign(cmd);
if(progdefaults.rsidWideSearch)
package.append("BANDPASS,");
else
package.append("MODEM,");
if(progdefaults.rsid_notify_only)
package.append("NOTIFY");
else
package.append("ACTIVE");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* MODEM: FLDIGI returns MODEMQ:<Modem ID String> // Current Modem
**********************************************************************************/
static void reply_active_modem(char * arg)
{
std::string package = "";
std::string cmd = "MODEM:";
int mode = active_modem->get_mode();
package.assign(cmd);
package.append(mode_info[mode].sname);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* HOST: Sent from FLDIGI to instuct the HOST program to return it's name and
* version number.
**********************************************************************************/
static void host_name(char *arg)
{
if(arg) {
if(*arg) {
host_name_string.assign(arg);
LOG_INFO("%s", host_name_string.c_str());
}
}
}
/**********************************************************************************
* MODEMBW: FLDIGI returns MODEMBWQ:<Bandwidth in Hz> // Current Modem Bandwidth
**********************************************************************************/
static void reply_active_modem_bw(char * arg)
{
std::string package = "";
std::string cmd = "MODEMBW:";
char buff[32];
memset(buff, 0, sizeof(buff));
snprintf(buff, sizeof(buff) - 1, "%d", (int) active_modem->get_bandwidth());
package.assign(cmd).append(buff);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* WFBW: FLDIGI returns WFBWQ:<LOWER HZ>,<UPPER HZ>
**********************************************************************************/
static void reply_waterfall_bw(char * arg)
{
std::string package = "";
std::string cmd = "WFBW:";
char buff[32];
memset(buff, 0, sizeof(buff));
snprintf(buff, sizeof(buff) - 1, "%d,%d", (int) progdefaults.LowFreqCutoff,
progdefaults.HighFreqCutoff );
package.assign(cmd).append(buff);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* MODEML: FLDIGI returns MODEML:Modem1,Modem2,...
* A List of comma delimited modem ID strings.
**********************************************************************************/
static void reply_modem_list(char * arg)
{
int index = 0;
int count = 0;
std::string package = "";
std::string cmd = "MODEML:";
package.assign(cmd);
count = availabe_kiss_modems.size();
for(index = 0; index < count - 1; index++)
package.append(availabe_kiss_modems[index]).append(",");
package.append(availabe_kiss_modems[index]);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* TXBUF: FLDIGI returns TXBUFQ:<number_of_bytes_in_the_tx_buffer>
**********************************************************************************/
static void reply_tx_buffer_count(char * arg)
{
char *buffer = (char *)0;
unsigned int buffer_size = 64;
unsigned tx_buffer_count = 0;
std::string package = "";
std::string cmd = "TXBUF:";
buffer = new char[buffer_size];
if(!buffer) {
LOG_DEBUG("%s", "Buffer allocation Error");
return;
}
{
guard_lock to_radio_lock(&to_radio_mutex);
tx_buffer_count = to_radio.size();
}
memset(buffer, 0, buffer_size);
snprintf(buffer, buffer_size - 1, "%u", tx_buffer_count);
package.assign(cmd).append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
if(buffer) delete [] buffer;
}
/**********************************************************************************
* SQL:<ON|OFF> // SQL On/Off
**********************************************************************************/
static void set_sql_on_off(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_sql_on_off(arg);
if(strarg.find("ON") != std::string::npos) {
REQ(set_button, btnSQL, 1);
return;
}
if(strarg.find("OFF") != std::string::npos) {
REQ(set_button, btnSQL, 0);
return;
}
}
/**********************************************************************************
* SQL: FLDIGI returns SQLQ:<ON|OFF>
**********************************************************************************/
static void reply_sql_on_off(char * arg)
{
std::string package = "";
std::string cmd = "SQL:";
package.assign(cmd);
if(progStatus.sqlonoff)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* SQLP:<0-100> // Current Symbol Quality Level
**********************************************************************************/
static void reply_sql_pwr_level(char * arg)
{
std::string package = "";
std::string cmd = "SQLP:";
char buffer[64];
package.assign(cmd);
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "%u", (unsigned int) progStatus.squelch_value);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* SQLS:<0-100> // Set SQL Level (percent)
**********************************************************************************/
static void set_sql_level(char * arg)
{
if(!arg)
return;
int value = 0;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_sql_level(arg);
sscanf(strarg.c_str(), "%d", &value);
if(value < 1) value = 1;
if(value > 100) value = 100;
progStatus.sldrSquelchValue = value;
if(!progStatus.kpsql_enabled)
REQ(set_slider2, sldrSquelch, value);
}
/**********************************************************************************
* SQLS: FLDIGI returns SQLSQ:<0-100> // Set SQL Level Query (percent)
**********************************************************************************/
static void reply_sql_level(char * arg)
{
std::string package = "";
std::string cmd = "SQLS:";
char buffer[64];
package.assign(cmd);
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "%u", (unsigned int) progStatus.sldrSquelchValue);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* BCHN:<ON|OFF> // Busy Channel On/Off
**********************************************************************************/
static void set_busy_channel_on_off(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_busy_channel_on_off(arg);
if(strarg.find("ON") != std::string::npos) {
REQ(set_button, btnEnableBusyChannel, 1);
return;
}
if(strarg.find("OFF") != std::string::npos) {
REQ(set_button, btnEnableBusyChannel, 0);
return;
}
}
/**********************************************************************************
* BCHN: FLDIGI returns BCHNQ:<ON|OFF> // Busy Channel State On/Off Query
**********************************************************************************/
static void reply_busy_channel_on_off(char * arg)
{
std::string package = "";
std::string cmd = "BCHN:";
package.assign(cmd);
if(progdefaults.enableBusyChannel)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* BCHNS<0-999> // Busy Channel Wait Duration (seconds)
**********************************************************************************/
static void set_busy_channel_duration(char * arg)
{
if(!arg)
return;
int value = 0;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_busy_channel_duration(arg);
sscanf(strarg.c_str(), "%d", &value);
if(value < 1) value = 1;
REQ(set_counter, cntBusyChannelSeconds, value);
}
/**********************************************************************************
* BCHNS: FLDIGI returns BCHNSQ:<0-999> // Busy Channel Wait Duration Query (seconds)
**********************************************************************************/
static void reply_busy_channel_duration(char * arg)
{
std::string package = "";
std::string cmd = "BCHNS:";
char buffer[64];
package.assign(cmd);
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "%d", progdefaults.busyChannelSeconds);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* BUSY: FLDIGI returns BUSY:<T|F> // Modem band pass signal presents
**********************************************************************************/
static void reply_busy_state(char * arg)
{
std::string package = "";
std::string cmd = "BUSY:";
package.assign(cmd);
if((trx_state == STATE_TX) || \
(kpsql_pl > kpsql_threshold) || \
(inhibit_tx_seconds)) {
package.append("T");
} else {
package.append("F");
}
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* KPSQL:<ON|OFF> Depreciated
**********************************************************************************/
static void set_kpsql_on_off(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_kpsql_on_off(arg);
if(strarg.find("ON") != std::string::npos) {
REQ(set_button, btnPSQL, 1);
return;
}
if(strarg.find("OFF") != std::string::npos) {
REQ(set_button, btnPSQL, 0);
return;
}
}
/**********************************************************************************
* PSM:<ON|OFF>
**********************************************************************************/
static void set_psm_on_off(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_psm_on_off(arg);
if(strarg.find("ON") != std::string::npos) {
REQ(set_button, btnPSQL, 1);
return;
}
if(strarg.find("OFF") != std::string::npos) {
REQ(set_button, btnPSQL, 0);
return;
}
}
/**********************************************************************************
* KPSQL:<ON|OFF> Depreciated
**********************************************************************************/
static void reply_kpsql_on_off(char * arg)
{
std::string package = "";
std::string cmd = "KPSQL:";
package.assign(cmd);
if(progStatus.kpsql_enabled)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* PSM:<ON|OFF>
**********************************************************************************/
static void reply_psm_on_off(char * arg)
{
std::string package = "";
std::string cmd = "PSM:";
package.assign(cmd);
if(progStatus.kpsql_enabled)
package.append("ON");
else
package.append("OFF");
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* KPSQLP:<0-100> Depreciated
**********************************************************************************/
static void reply_kpsql_pwr_level(char * arg)
{
std::string package = "";
std::string cmd = "KPSQLP:";
char buffer[64];
float plevel = 0;
float scale = 100.0 / ((float) HISTO_COUNT);
package.assign(cmd);
if(kpsql_pl > (double) HISTO_COUNT) {
plevel = HISTO_COUNT;
} else {
plevel = kpsql_pl;
}
plevel *= scale;
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "%u", (unsigned int) plevel);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* PSMP:<0-100>
**********************************************************************************/
static void reply_psm_pwr_level(char * arg)
{
std::string package = "";
std::string cmd = "PSMP:";
char buffer[64];
float plevel = 0;
float scale = 100.0 / ((float) HISTO_COUNT);
package.assign(cmd);
if(kpsql_pl > (double) HISTO_COUNT) {
plevel = HISTO_COUNT;
} else {
plevel = kpsql_pl;
}
plevel *= scale;
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "%u", (unsigned int) plevel);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* PSMS:<0-100>
**********************************************************************************/
static void set_psm_squelch_level(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_psm_squelch_level(arg);
int value = 0;
sscanf(strarg.c_str(), "%d", &value);
if(value < 1) value = 1;
if(value > 100) value = 100;
progStatus.sldrPwrSquelchValue = value;
if(progStatus.kpsql_enabled)
REQ(set_slider2, sldrSquelch, value);
}
/**********************************************************************************
* KPSQLS:<0-100> Depreciated
**********************************************************************************/
static void set_kpsql_squelch_level(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_kpsql_squelch_level(arg);
int value = 0;
sscanf(strarg.c_str(), "%d", &value);
if(value < 1) value = 1;
if(value > 100) value = 100;
progStatus.sldrPwrSquelchValue = value;
if(progStatus.kpsql_enabled)
REQ(set_slider2, sldrSquelch, value);
}
/**********************************************************************************
* KPSQLS: Depreciated
**********************************************************************************/
static void reply_kpsql_squelch_level(char * arg)
{
std::string package = "";
std::string cmd = "KPSQLS:";
char buffer[64];
package.assign(cmd);
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "%u", (unsigned int) progStatus.sldrPwrSquelchValue);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* PSMS:
**********************************************************************************/
static void reply_psm_squelch_level(char * arg)
{
std::string package = "";
std::string cmd = "PSMS:";
char buffer[64];
package.assign(cmd);
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "%u", (unsigned int) progStatus.sldrPwrSquelchValue);
package.append(buffer);
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* KISSRAW:<ON|OFF|ONLY> // Enable RAW unaltered data over KISS
**********************************************************************************/
static void set_kiss_raw_mode(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_kiss_raw_mode(arg);
// Longer compares first
if(strarg.find("ONLY") != std::string::npos) {
kiss_raw_enabled = KISS_RAW_ONLY;
return;
}
if(strarg.find("ON") != std::string::npos) {
kiss_raw_enabled = KISS_RAW_ON;
return;
}
if(strarg.find("OFF") != std::string::npos) {
kiss_raw_enabled = KISS_RAW_DISABLED;
return;
}
}
/**********************************************************************************
* KISSRAW:<ON|OFF|ONLY> // Enable RAW unaltered data over KISS
**********************************************************************************/
static void reply_kiss_raw_mode(char * arg)
{
std::string package = "";
std::string cmd = "KISSRAW:";
package.assign(cmd);
switch(kiss_raw_enabled) {
case KISS_RAW_ONLY:
package.append("ONLY");
break;
case KISS_RAW_ON:
package.append("ON");
break;
case KISS_RAW_DISABLED:
package.append("OFF");
break;
default:
return;
}
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* KISSCRCM:<NONE|SMACK|CCITT|XOR|FCS>
**********************************************************************************/
static void set_crc_mode(char * arg)
{
if(!arg)
return;
std::string strarg = "";
strarg.assign(arg);
if(strarg.empty())
return reply_crc_mode(arg);
if(strarg.find("SMACK") != std::string::npos) {
smack_crc_enabled = true;
crc_mode = CRC16_CCITT;
return;
}
if(strarg.find("CCITT") != std::string::npos) {
smack_crc_enabled = true;
crc_mode = CRC16_CCITT;
return;
}
if(strarg.find("FCS") != std::string::npos) {
smack_crc_enabled = true;
crc_mode = CRC16_FCS;
return;
}
if(strarg.find("XOR") != std::string::npos) {
smack_crc_enabled = true;
crc_mode = CRC8_XOR;
return;
}
if(strarg.find("NONE") != std::string::npos) {
smack_crc_enabled = false;
return;
}
}
/**********************************************************************************
* KISSCRCM:<NONE|SMACK>,<NONE|CCITT|XOR|FCS>
**********************************************************************************/
static void reply_crc_mode(char *arg)
{
std::string package = "";
std::string cmd = "KISSCRCM:";
package.assign(cmd);
if(smack_crc_enabled)
package.append("SMACK,");
else
package.append("NONE,");
switch(crc_mode) {
case CRC16_NONE:
package.append("NONE");
break;
case CRC16_CCITT:
package.append("CCITT");
break;
case CRC16_FCS:
package.append("FCS");
break;
case CRC8_XOR:
package.append("XOR");
break;
default:
package.append("UNDEFINED");
}
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
/**********************************************************************************
* RSIDN:NEW_WF_OFFSET,NEW_MODEM,OLD_WF_OFFSET,OLD_MODEM,<ACTIVE|NOTIFY>
**********************************************************************************/
bool bcast_rsid_kiss_frame(int new_wf_pos, int new_mode, int old_wf_pos, int old_mode, int notify)
{
guard_lock kiss_bc_frame_lock(&kiss_bc_frame_mutex);
char buffer[256];
char old_modem_name[64];
char new_modem_name[64];
char *notify_str = (char *) "";
KISS_QUEUE_FRAME *frame = (KISS_QUEUE_FRAME *)0;
std::string package = "";
if(new_mode >= NUM_MODES || old_mode >= NUM_MODES)
return false;
if(new_mode < 0 || old_mode < 0)
return false;
if(!(mode_info[new_mode].iface_io & KISS_IO))
return false;
if(old_mode != new_mode || new_wf_pos != old_wf_pos) {
psm_reset_histogram();
}
if(!kiss_bcast_rsid_reception) return true;
if(new_wf_pos == 0) {
new_wf_pos = old_wf_pos;
notify = RSID_KISS_USER;
}
switch(notify) {
case RSID_KISS_NOTIFY:
notify_str = (char *) "NOTIFY";
break;
case RSID_KISS_ACTIVE:
notify_str = (char *) "ACTIVE";
break;
case RSID_KISS_USER:
notify_str = (char *) "USER";
break;
default:
LOG_DEBUG("%s", "Unknown KISS frame RSID BC Source");
return false;
}
// Send all modem names in capital letters
memset(old_modem_name, 0, sizeof(old_modem_name));
strncpy(old_modem_name, mode_info[old_mode].sname, sizeof(old_modem_name) - 1);
for(size_t i = 0; i < sizeof(old_modem_name); i++) {
if(old_modem_name[i])
old_modem_name[i] = toupper(old_modem_name[i]);
else
break;
}
memset(new_modem_name, 0, sizeof(new_modem_name));
strncpy(new_modem_name, mode_info[new_mode].sname, sizeof(new_modem_name) - 1);
for(size_t i = 0; i < sizeof(new_modem_name); i++) {
if(new_modem_name[i])
new_modem_name[i] = toupper(new_modem_name[i]);
else
break;
}
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, sizeof(buffer)-1, "RSIDN:%d,%s,%d,%s,%s", new_wf_pos, new_modem_name, \
old_wf_pos, old_modem_name, notify_str);
package.assign(buffer);
frame = encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no);
if(!frame) {
LOG_DEBUG("%s", "Broadcast Hardware Frame Assembly Failure");
return true;
}
kiss_bc_frame.append((const char *) frame->data, (size_t) frame->size);
if(frame->data) delete [] frame->data;
if(frame) delete frame;
return true;
}
/**********************************************************************************
* TRXS:<RX|TX> // Transmit to HOST during a state change between RX/TX or TX/RX.
**********************************************************************************/
void bcast_trxs_kiss_frame(int state)
{
guard_lock kiss_bc_frame_lock(&kiss_bc_frame_mutex);
KISS_QUEUE_FRAME *frame = (KISS_QUEUE_FRAME *)0;
std::string package;
package.assign("TRXS:");
switch(state) {
case STATE_RX:
package.append("RX") ;
break;
case STATE_TUNE:
case STATE_TX:
package.append("TX") ;
break;
default:
LOG_DEBUG("%s", "Unknown Transmit State");
return;
}
frame = encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no);
if(!frame) {
LOG_DEBUG("%s", "Broadcast Hardware Frame Assembly Failure");
return;
}
kiss_bc_frame.append((const char *) frame->data, (size_t) frame->size);
if(frame->data) delete [] frame->data;
if(frame) delete frame;
}
/**********************************************************************************
* TXBE: // Broadcast empty transmit buffer state
**********************************************************************************/
void bcast_tx_buffer_empty_kiss_frame(void)
{
if(!bcast_tx_buffer_empty_flag) return;
guard_lock kiss_bc_frame_lock(&kiss_bc_frame_mutex);
KISS_QUEUE_FRAME *frame = (KISS_QUEUE_FRAME *)0;
std::string package;
package.assign("TXBE:");
frame = encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no);
if(!frame) {
LOG_DEBUG("%s", "Broadcast Hardware Frame Assembly Failure");
return;
}
kiss_bc_frame.append((const char *) frame->data, (size_t) frame->size);
if(frame->data) delete [] frame->data;
if(frame) delete frame;
}
/**********************************************************************************
*
**********************************************************************************/
static void exec_hardware_command(std::string cmd, std::string arg)
{
if(cmd.empty()) return;
if(kiss_reset_flag) return;
int pos = 0;
int a = 0;
int b = 0;
int comp_size = 0;
int index = 0;
int count = sizeof(exec_match) / sizeof(EXEC_HARDWARE_CMD_MATCH);
std::string cmp = "";
for(index = 0; index < count; index++) {
if(exec_match[index].cmd == (char *)0) return;
cmp.assign(exec_match[index].cmd);
if((pos = cmp.find(cmd)) != (int)(std::string::npos)) {
a = cmp.size();
b = cmd.size();
if(a > b)
comp_size = a;
else
comp_size = b;
if(cmd.compare(pos, comp_size, cmp) == 0) {
if(exec_match[index].cmd_func)
(*exec_match[index].cmd_func)((char *) arg.c_str());
return;
}
}
}
}
/**********************************************************************************
*
**********************************************************************************/
static bool kiss_queue_frame(KISS_QUEUE_FRAME * frame, std::string cmd)
{
if(!frame) {
LOG_DEBUG("Null frame (%s)", cmd.c_str());
return false;
}
if(frame->size == 0 || frame->data == (char *)0) {
LOG_DEBUG("Frame null content (%s)", cmd.c_str());
if(frame->data) delete[] frame->data;
delete frame;
return false;
}
WriteToHostBuffered((const char *) frame->data, (size_t) frame->size);
delete[] frame->data;
delete frame;
return true;
}
/**********************************************************************************
*
**********************************************************************************/
size_t kiss_encode(char *src, size_t src_size, char **dst)
{
if(!src || !dst || src_size < 1) return 0;
size_t index = 0;
int count = 0;
int buffer_size = 0;
int byte = 0;
char *buffer = (char *)0;
buffer_size = (src_size * KISS_BUFFER_FACTOR) + BUFFER_PADDING;
buffer = new char[buffer_size];
if(!buffer) {
LOG_DEBUG("Memory allocation error near line %d", __LINE__);
*dst = (char *)0;
return 0;
}
memset(buffer, 0, buffer_size);
count = 0;
buffer[count++] = KISS_FEND;
for(index = 0; index < src_size; index++) {
byte = (int) src[index] & 0xFF;
switch(byte) {
case KISS_FESC:
buffer[count++] = KISS_FESC;
buffer[count++] = KISS_TFESC;
break;
case KISS_FEND:
buffer[count++] = KISS_FESC;
buffer[count++] = KISS_TFEND;
break;
default:
buffer[count++] = byte;
}
}
buffer[count++] = KISS_FEND;
*dst = (char *) buffer;
return count;
}
/**********************************************************************************
*
**********************************************************************************/
size_t kiss_decode(char *src, size_t src_size, char **dst)
{
if(!src || !dst || src_size < 1) return 0;
size_t index = 0;
int count = 0;
int buffer_size = 0;
int byte = 0;
int last_byte = 0;
char *buffer = (char *)0;
buffer_size = src_size + BUFFER_PADDING;
buffer = new char[buffer_size];
if(!buffer) {
LOG_DEBUG("Memory allocation error near line %d", __LINE__);
*dst = (char *)0;
return 0;
}
memset(buffer, 0, buffer_size);
count = 0;
last_byte = KISS_INVALID;
for(index = 0; index < src_size; index++) {
byte = src[index] & 0xFF;
switch(byte) {
case KISS_FEND:
continue;
case KISS_FESC:
break;
case KISS_TFEND:
if(last_byte == KISS_FESC)
buffer[count++] = KISS_FEND;
else
buffer[count++] = byte;
break;
case KISS_TFESC:
if(last_byte == KISS_FESC)
buffer[count++] = KISS_FESC;
else
buffer[count++] = byte;
break;
default:
buffer[count++] = byte;
}
last_byte = byte;
}
*dst = (char *) buffer;
return count;
}
#if 0
/**********************************************************************************
*
**********************************************************************************/
std::string kiss_decode(std::string frame)
{
int count = 0;
int frame_size = 0;
char *dst = (char *)0;
static std::string ret_str = "";
if(frame.empty()) return frame;
frame_size = frame.size();
ret_str.clear();
ret_str.reserve(frame_size + BUFFER_PADDING);
count = kiss_decode((char *) frame.c_str(), frame.size(), &dst);
if(count && dst) {
ret_str.assign(dst, count);
dst[0] = 0;
delete [] dst;
}
return ret_str;
}
#endif // 0
/**********************************************************************************
*
**********************************************************************************/
std::string kiss_encode(std::string frame)
{
int count = 0;
int frame_size = 0;
char *dst = (char *)0;
static std::string ret_str = "";
if(frame.empty()) return frame;
frame_size = frame.size();
ret_str.clear();
ret_str.reserve((frame_size * 2) + BUFFER_PADDING);
count = kiss_encode((char *) frame.c_str(), frame.size(), &dst);
if(count && dst) {
ret_str.assign(dst, count);
dst[0] = 0;
delete [] dst;
}
return ret_str;
}
/**********************************************************************************
*
**********************************************************************************/
size_t hdlc_encode(char *src, size_t src_size, char **dst)
{
if(!src || !dst || src_size < 1) return 0;
size_t index = 0;
int count = 0;
int buffer_size = 0;
int byte = 0;
char *buffer = (char *)0;
buffer_size = (src_size * HDLC_BUFFER_FACTOR) + BUFFER_PADDING;
buffer = new char[buffer_size];
if(!buffer) {
LOG_DEBUG("Memory allocation error near line %d", __LINE__);
*dst = (char *)0;
return 0;
}
memset(buffer, 0, buffer_size);
count = 0;
buffer[count++] = ' ';
buffer[count++] = KISS_FEND;
for(index = 0; index < src_size; index++) {
byte = (int) src[index] & 0xFF;
if(not_allowed[byte]) {
buffer[count++] = HDLC_CNT;
if((byte + HDLC_CNT_OFFSET) > 255)
buffer[count++] = ((byte - HDLC_CNT_OFFSET) & 0xFF);
else
buffer[count++] = ((byte + HDLC_CNT_OFFSET) & 0xFF);
continue;
}
switch(byte) {
case KISS_FESC:
buffer[count++] = KISS_FESC;
buffer[count++] = KISS_TFESC;
break;
case KISS_FEND:
buffer[count++] = KISS_FESC;
buffer[count++] = KISS_TFEND;
break;
case HDLC_CNT:
buffer[count++] = KISS_FESC;
buffer[count++] = HDLC_TCNT;
break;
default:
buffer[count++] = byte;
}
}
buffer[count++] = KISS_FEND;
buffer[count++] = ' ';
*dst = (char *) buffer;
return count;
}
/**********************************************************************************
*
**********************************************************************************/
size_t hdlc_decode(char *src, size_t src_size, char **dst)
{
if(!src || !dst || src_size < 1) return 0;
size_t index = 0;
int count = 0;
int buffer_size = 0;
int byte = 0;
int last_byte = 0;
int check_byte = 0;
char *buffer = (char *)0;
buffer_size = src_size + BUFFER_PADDING;
buffer = new char[buffer_size];
if(!buffer) {
LOG_DEBUG("Memory allocation error near line %d", __LINE__);
*dst = (char *)0;
return 0;
}
memset(buffer, 0, buffer_size);
count = 0;
last_byte = KISS_INVALID;
for(index = 0; index < src_size; index++) {
byte = src[index] & 0xFF;
if(last_byte == HDLC_CNT) {
check_byte = byte - HDLC_CNT_OFFSET;
if((check_byte > -1) && (check_byte < 256) && not_allowed[check_byte]) {
buffer[count++] = check_byte;
last_byte = byte;
continue;
}
check_byte = byte + HDLC_CNT_OFFSET;
if((check_byte > -1) && (check_byte < 256) && not_allowed[check_byte]) {
buffer[count++] = check_byte;
}
last_byte = byte;
continue;
}
switch(byte) {
case KISS_FEND:
continue;
case KISS_FESC:
case HDLC_CNT:
last_byte = byte;
continue;
case KISS_TFEND:
if(last_byte == KISS_FESC)
byte = KISS_FEND;
break;
case KISS_TFESC:
if(last_byte == KISS_FESC)
byte = KISS_FESC;
break;
case HDLC_TCNT:
if(last_byte == KISS_FESC)
byte = HDLC_CNT;
break;
}
last_byte = buffer[count++] = byte;
}
*dst = (char *) buffer;
return count;
}
/**********************************************************************************
* Buffer must be at least twice the size of the data provided + BUFFER_PADDING
* data_count: Number of bytes in the buffer to be converted.
* Return is the converted byte count. Buffer is overwritten with converted data.
**********************************************************************************/
static size_t encap_hdlc_frame(char *buffer, size_t data_count)
{
if(!buffer || !data_count) {
LOG_DEBUG("%s", "Parameter Data Error [NULL]");
return false;
}
size_t count = 0;
unsigned int crc_value = 0;
char *kiss_encap = (char *)0;
if(progdefaults.ax25_decode_enabled) {
ax25_decode((unsigned char *) buffer, data_count, true, true);
}
crc_value = calc_fcs_crc(buffer, (int) data_count);
buffer[data_count++] = CRC_LOW(crc_value);
buffer[data_count++] = CRC_HIGH(crc_value);
count = hdlc_encode(buffer, data_count, &kiss_encap);
if(kiss_encap && count) {
memcpy(buffer, kiss_encap, count);
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(buffer, count);
#endif
delete [] kiss_encap;
} else {
LOG_DEBUG("%s", "Kiss Encode Memory Allocation Error");
return 0;
}
return count;
}
/*********************************************************************************
* Buffer is presently larger then what will be returned.
* data_count: Number of bytes in the buffer to process.
* Returns the converted byte count. Buffer is over written with converted data.
*********************************************************************************/
static size_t decap_hdlc_frame(char *buffer, size_t data_count)
{
if(!buffer || !data_count) {
LOG_DEBUG("%s", "Parameter Data Error/NULL");
return false;
}
size_t count = 0;
// size_t index = 0;
unsigned int crc_value = 0;
unsigned int calc_crc_value = 0;
char *kiss_decap = (char *)0;
count = hdlc_decode(buffer, data_count, &kiss_decap);
#ifdef EXTENED_DEBUG_INFO
if(data_count && buffer)
LOG_HEX(buffer, data_count);
if(count && kiss_decap)
LOG_HEX(kiss_decap, count);
#endif
do {
if(count > data_count || !kiss_decap) {
LOG_DEBUG("%s", "Kiss decode error");
count = 0;
break;
}
if(count > 2)
count -= 2;
if(count) {
calc_crc_value = calc_fcs_crc(kiss_decap, (int) count);
}
else {
LOG_DEBUG("%s", "Kiss decode error");
count = 0;
break;
}
crc_value = CRC_LOW_HIGH(kiss_decap[count], kiss_decap[count + 1]);
if(crc_value != calc_crc_value) {
count = 0;
break;
}
temp_disable_tx_inhibit = time(0) + DISABLE_TX_INHIBIT_DURATION; // valid packet, disable busy channel inhitbit for x duration.
kiss_decap[count] = kiss_decap[count + 1] = 0;
memcpy(buffer, kiss_decap, count);
if(progdefaults.ax25_decode_enabled) {
ax25_decode((unsigned char *) buffer, count, true, false);
}
break;
} while(1);
if(kiss_decap) {
kiss_decap[0] = 0;
delete [] kiss_decap;
}
return count;
}
/**********************************************************************************
*
**********************************************************************************/
static KISS_QUEUE_FRAME *encap_kiss_frame(char *buffer, size_t buffer_size, int frame_type, int port)
{
guard_lock kfenc(&kiss_encode_mutex);
if(!buffer || buffer_size < 1) {
LOG_DEBUG("%s", "KISS encap argument 'data' contains no data");
return (KISS_QUEUE_FRAME *)0;
}
if(port > 0xF || port < 0) {
LOG_DEBUG("Invalid KISS port number (%d)", port);
return (KISS_QUEUE_FRAME *)0;
}
switch(frame_type) {
case KISS_DATA:
case KISS_RAW:
case KISS_TXDELAY:
case KISS_PERSIST:
case KISS_SLOTTIME:
case KISS_TXTAIL:
case KISS_DUPLEX:
case KISS_HARDWARE:
break;
default:
LOG_DEBUG("Invalid KISS frame type (%d)", frame_type);
return (KISS_QUEUE_FRAME *)0;
}
int size = 0;
int index = 0;
unsigned int crc_value = 0;
KISS_QUEUE_FRAME *frame = (KISS_QUEUE_FRAME *)0;
frame = new KISS_QUEUE_FRAME;
if(!frame) {
LOG_DEBUG("%s", "KISS struct frame memory allocation error");
return (KISS_QUEUE_FRAME *)0;
}
size = (buffer_size * KISS_BUFFER_FACTOR) + BUFFER_PADDING; // Resulting data space could be 2 fold higher.
frame->data = (char *) new char[size];
if(!frame->data) {
delete frame;
LOG_DEBUG("%s", "KISS buffer frame memory allocation error");
return (KISS_QUEUE_FRAME *)0;
}
memset(frame->data, 0, size);
size = buffer_size;
frame->data[0] = SET_KISS_TYPE_PORT(frame_type, port);
memcpy(&frame->data[1], buffer, size);
size++;
if((frame_type == KISS_DATA) || (frame_type == KISS_RAW)) {
if(smack_crc_enabled) {
frame->data[0] = SMACK_CRC_ASSIGN(frame->data[0]);
switch(crc_mode) {
case CRC16_CCITT:
crc_value = calc_ccitt_crc((char *) frame->data, size);
frame->data[size++] = CRC_LOW(crc_value);
frame->data[size++] = CRC_HIGH(crc_value);
break;
case CRC16_FCS:
crc_value = calc_fcs_crc((char *) frame->data, size);
frame->data[size++] = CRC_LOW(crc_value);
frame->data[size++] = CRC_HIGH(crc_value);
break;
case CRC8_XOR:
crc_value = calc_xor_crc((char *) frame->data, size);
frame->data[size++] = CRC_LOW(crc_value);
break;
default:
break;
}
}
}
char *tmp = (char *)0;
index = kiss_encode((char *) frame->data, size, &tmp);
if(tmp) {
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(tmp, index);
#endif
frame->data[0] = 0;
delete [] frame->data;
frame->data = (char *) tmp;
frame->size = index;
} else {
LOG_DEBUG("KISS encode allocation error near line %d", __LINE__);
delete [] frame->data;
delete frame;
frame = (KISS_QUEUE_FRAME *)0;
}
return frame;
}
/**********************************************************************************
*
**********************************************************************************/
static KISS_QUEUE_FRAME * encap_kiss_frame(std::string data, int frame_type, int port)
{
if(data.empty()) return (KISS_QUEUE_FRAME *)0;
return encap_kiss_frame((char *) data.c_str(), (size_t) data.size(), frame_type, port);
}
/**********************************************************************************
*
**********************************************************************************/
std::string unencap_kiss_frame(char *buffer, size_t buffer_size, int *frame_type, int *kiss_port_no)
{
if(!buffer || buffer_size < 1 || !frame_type || !kiss_port_no)
return std::string("");
char *decoded_buffer = (char *)0;
size_t count = 0;
unsigned int crc_extracted = 0;
unsigned int crc_calc = 0;
unsigned int port = 0;
unsigned int ftype = 0;
static std::string ret_str = "";
ret_str.clear();
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(buffer, buffer_size);
#endif
count = kiss_decode(buffer, buffer_size, &decoded_buffer);
if(!count || !decoded_buffer) {
LOG_DEBUG("Kiss decoder memory allocation error near line %d", __LINE__);
return ret_str;
}
ftype = KISS_CMD(decoded_buffer[0]);
port = KISS_PORT(decoded_buffer[0]);
if((ftype == KISS_DATA) || (ftype == KISS_RAW)) {
smack_crc_enabled = SMACK_CRC(port);
port = SMACK_CRC_MASK(port);
if(smack_crc_enabled) {
switch(crc_mode) {
case CRC16_CCITT:
count -= 2;
if(count > 2) {
crc_calc = calc_ccitt_crc(decoded_buffer, count);
crc_extracted = CRC_LOW_HIGH(decoded_buffer[count], decoded_buffer[count + 1]);
} else {
crc_calc = crc_extracted + 1; // Force a fail
}
break;
case CRC16_FCS:
count -= 2;
if(count > 2) {
crc_calc = calc_fcs_crc(decoded_buffer, count);
crc_extracted = CRC_LOW_HIGH(decoded_buffer[count], decoded_buffer[count + 1]);
} else {
crc_calc = crc_extracted + 1;
}
break;
case CRC8_XOR:
count -= 1;
if(count > 1) {
crc_calc = CRC_LOW(calc_fcs_crc(decoded_buffer, count));
crc_extracted = CRC_LOW(decoded_buffer[count]);
} else {
crc_calc = crc_extracted + 1;
}
break;
default:
LOG_DEBUG("CRC type not found %d", crc_mode);
}
if(crc_calc != crc_extracted) {
if(frame_type) *frame_type = ftype;
if(kiss_port_no) *kiss_port_no = port;
if(decoded_buffer) delete [] decoded_buffer;
ret_str.clear();
return ret_str;
}
}
}
if(count > 0)
count--;
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(&decoded_buffer[1], count);
#endif
ret_str.assign(&decoded_buffer[1], count);
if(frame_type) *frame_type = ftype;
if(kiss_port_no) *kiss_port_no = port;
if(decoded_buffer) delete [] decoded_buffer;
return ret_str;
}
/**********************************************************************************
*
**********************************************************************************/
std::string unencap_kiss_frame(std::string package, int *frame_type, int *kiss_port_no)
{
if(package.empty() || !frame_type || !kiss_port_no)
return std::string("");
return unencap_kiss_frame((char *) package.c_str(), (size_t) package.size(), frame_type, kiss_port_no);
}
/**********************************************************************************
*
**********************************************************************************/
static void parse_hardware_frame(std::string frame)
{
if(frame.empty()) return;
std::string cmd = "";
std::string arg = "";
static char buffer[512];
std::string parse_frame = "";
char bofmsg[] = "Temp Buffer overflow";
size_t count = frame.size();
size_t index = 0;
size_t pos = 0;
size_t j = 0;
parse_frame.assign(frame);
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(frame.c_str(), frame.size());
#endif
do {
if(kiss_reset_flag) return;
pos = parse_frame.find(":");
if(pos == std::string::npos) return;
j = 0;
memset(buffer, 0, sizeof(buffer));
for(index = 0; index < pos; index++) {
if(parse_frame[index] <= ' ') continue;
buffer[j++] = toupper(parse_frame[index]);
if(j >= sizeof(buffer)) {
LOG_DEBUG("%s", bofmsg);
return;
}
}
cmd.assign(buffer);
j = 0;
memset(buffer, 0, sizeof(buffer));
for(index = pos + 1; index < count; index++) {
if(parse_frame[index] <= ' ') break;
buffer[j++] = parse_frame[index];
if(j >= sizeof(buffer)) {
LOG_DEBUG("%s", bofmsg);
return;
}
}
arg.assign(buffer);
if(cmd.empty()) return;
exec_hardware_command(cmd, arg);
if(index > count)
index = count;
parse_frame.erase(0, index);
count = parse_frame.size();
} while(count > 0);
}
/**********************************************************************************
*
**********************************************************************************/
static void parse_kiss_frame(std::string frame_segment)
{
guard_lock kiss_rx_lock(&kiss_frame_mutex);
unsigned int cur_byte = KISS_INVALID;
unsigned int frame_size = 0;
unsigned int index = 0;
unsigned int fend_count = 0;
unsigned int cmsa_data = 0;
int buffer_size = 0;
int port_no = KISS_INVALID;
int frame_type = KISS_INVALID;
int data_count = 0;
bool process_one_frame = false;
char *buffer = (char *)0;
kiss_frame.append(frame_segment);
while(1) {
if(kiss_frame.empty()) return;
frame_size = kiss_frame.size();
process_one_frame = false;
fend_count = 0;
kiss_one_frame.clear();
for(index = 0; index < frame_size; index++) {
cur_byte = kiss_frame[index] & 0xFF;
if(cur_byte == KISS_FEND) {
fend_count++;
}
if(fend_count) {
kiss_one_frame += cur_byte;
}
if(fend_count == 2) {
kiss_frame.erase(0, index);
process_one_frame = true;
break;
}
}
if(!process_one_frame)
return;
frame_size = kiss_one_frame.size();
if(frame_size < 3) {
continue; // Invalid Frame size
}
kiss_one_frame = unencap_kiss_frame(kiss_one_frame, &frame_type, &port_no);
if(kiss_one_frame.empty())
continue;
if(port_no != (int)kiss_port_no) {
continue;
}
switch(frame_type) {
case KISS_TXDELAY:
case KISS_PERSIST:
case KISS_SLOTTIME:
case KISS_TXTAIL:
case KISS_DUPLEX:
cmsa_data = kiss_one_frame[0] & 0xFF;
break;
case KISS_DATA:
if(kiss_raw_enabled == KISS_RAW_ONLY)
continue;
break;
case KISS_RAW:
if(kiss_raw_enabled == KISS_RAW_DISABLED)
continue;
break;
case KISS_HARDWARE:
break;
default:
continue; // Unreconized frame_type.
}
switch(frame_type) {
case KISS_DATA:
buffer_size = (frame_size * HDLC_BUFFER_FACTOR) + BUFFER_PADDING;
buffer = new char[buffer_size];
if(!buffer) {
LOG_DEBUG("%s", "Buffer Allocation Error");
return;
}
data_count = kiss_one_frame.size();
memset(buffer, 0, buffer_size);
memcpy(buffer, kiss_one_frame.c_str(), data_count);
data_count = encap_hdlc_frame(buffer, data_count);
WriteToRadioBuffered((const char *) buffer, (size_t) data_count);
buffer[0] = 0;
delete [] buffer;
buffer = 0;
break;
case KISS_RAW:
WriteToRadioBuffered((const char *) kiss_one_frame.c_str(), (size_t) kiss_one_frame.size());
break;
case KISS_TXDELAY:
progStatus.csma_transmit_delay = cmsa_data;
progdefaults.csma_transmit_delay = cmsa_data;
REQ(update_csma_io_config, (int) CSMA_TX_DELAY);
break;
case KISS_PERSIST:
progStatus.csma_persistance = cmsa_data;
progdefaults.csma_persistance = cmsa_data;
REQ(update_csma_io_config, (int) CSMA_PERSISTANCE);
break;
case KISS_SLOTTIME:
progStatus.csma_slot_time = cmsa_data;
progdefaults.csma_slot_time = cmsa_data;
REQ(update_csma_io_config, (int) CSMA_SLOT_TIME);
break;
case KISS_TXTAIL:
break;
case KISS_DUPLEX:
if(cmsa_data)
duplex = KISS_FULL_DUPLEX;
else
duplex = KISS_HALF_DUPLEX;
break;
case KISS_HARDWARE:
parse_hardware_frame(kiss_one_frame);
break;
}
} // while(1)
}
/**********************************************************************************
*
**********************************************************************************/
static void WriteToHostBuffered(const char *data, size_t size)
{
guard_lock to_host_lock(&to_host_mutex);
to_host.append(data, size);
}
/**********************************************************************************
*
**********************************************************************************/
static void WriteToRadioBuffered(const char *data, size_t size)
{
guard_lock to_radio_lock(&to_radio_mutex);
if(!data || size < 1) return;
set_tx_timeout();
to_radio.append(data, size);
}
/**********************************************************************************
* Must be call in WriteToRadioBuffered() and no other.
**********************************************************************************/
inline void set_tx_timeout(void)
{
if(to_radio.empty()) {
transmit_buffer_flush_timeout = time(0) + TX_BUFFER_TIMEOUT;
}
}
/**********************************************************************************
*
**********************************************************************************/
void flush_kiss_tx_buffer(void)
{
int data_count = 0;
{
guard_lock to_host_lock(&to_radio_mutex);
kiss_text_available = false;
pText = 0;
data_count = to_radio.size();
if(data_count)
to_radio.clear();
}
if(data_count)
bcast_tx_buffer_empty_kiss_frame();
}
/**********************************************************************************
*
**********************************************************************************/
static void WriteToHostARQBuffered(void)
{
std::string arq_data = "";
{
guard_lock to_host_arq_lock(&to_host_arq_mutex);
int data_available = to_arq_host.size();
if(kiss_raw_enabled == KISS_RAW_DISABLED) {
if(data_available) {
to_arq_host.clear();
}
return;
}
if(data_available < 1) return;
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(to_arq_host.c_str(), to_arq_host.size());
#endif
arq_data.assign(to_arq_host);
to_arq_host.clear();
}
kiss_queue_frame(encap_kiss_frame(arq_data, KISS_RAW, kiss_port_no), std::string("ARQ"));
}
/**********************************************************************************
*
**********************************************************************************/
static void *ReadFromHostSocket(void *args)
{
if(!kiss_socket) return (void *)0;
static char buffer[2048];
std::string str_buffer;
size_t count = 0;
Socket *tmp_socket = (Socket *)0;
memset(buffer, 0, sizeof(buffer));
str_buffer.reserve(sizeof(buffer));
if(progStatus.kiss_tcp_io && progStatus.kiss_tcp_listen) {
tmp_socket = kiss_socket->accept2();
kiss_socket->shut_down();
kiss_socket->close();
if(tmp_socket)
kiss_socket = tmp_socket;
tmp_socket = 0;
}
LOG_INFO("%s", "Kiss RX loop started. ");
kiss_rx_exit = false;
kiss_rx_loop_running = true;
while(!kiss_rx_exit) {
memset(buffer, 0, sizeof(buffer));
try {
if(progStatus.kiss_tcp_io)
count = kiss_socket->recv((void *) buffer, sizeof(buffer) - 1);
else
count = kiss_socket->recvFrom((void *) buffer, sizeof(buffer) - 1);
} catch (...) {
if (errno)
LOG_INFO("recv/recvFrom Socket Error %d", errno);
count = 0;
if(!tcpip_reset_flag) {
kiss_tcp_disconnect((char *)"");
}
break;
}
if(count && (data_io_enabled == KISS_IO)) {
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(buffer, count);
#endif
guard_lock from_host_lock(&from_host_mutex);
from_host.append(buffer, count);
}
}
LOG_INFO("%s", "Kiss RX loop exit. ");
kiss_rx_loop_running = false;
return (void *)0;
}
extern Fl_Slider2 *sldrSquelch;
extern Progress *pgrsSquelch;
/**********************************************************************************
*
**********************************************************************************/
static void *kiss_loop(void *args)
{
SET_THREAD_ID(KISS_TID);
int old_trx_state = STATE_TX;
LOG_INFO("%s", "Kiss loop started. ");
kiss_loop_running = true;
while(!kiss_exit){
MilliSleep(100);
if(data_io_enabled != KISS_IO) {
kiss_text_available = false;
kiss_reset_buffers();
continue;
}
if(old_trx_state != trx_state) {
if(kiss_bcast_trx_toggle) {
switch(trx_state) {
case STATE_TX:
case STATE_RX:
case STATE_TUNE:
bcast_trxs_kiss_frame(trx_state);
default :
break;
}
}
old_trx_state = trx_state;
}
ReadFromHostBuffered();
ReadFromRadioBuffered();
WriteToHostBCastFramesBuffered();
WriteToHostARQBuffered();
WriteToHostSocket();
if(!to_radio.empty()) {
kiss_text_available = true;
active_modem->set_stopflag(false);
trx_transmit();
}
}
kiss_loop_running = false;
// exit the kiss thread
return NULL;
}
/**********************************************************************************
*
**********************************************************************************/
void WriteKISS(const char data)
{
if (active_modem->get_mode() == MODE_FSQ) return;
if(kiss_reset_flag) return;
{
guard_lock from_radio_lock(&from_radio_mutex);
from_radio += data;
}
if(kiss_raw_enabled != KISS_RAW_DISABLED) {
guard_lock to_host_arq_lock(&to_host_arq_mutex);
to_arq_host += data;
}
}
/**********************************************************************************
*
**********************************************************************************/
void WriteKISS(const char *data)
{
if (active_modem->get_mode() == MODE_FSQ) return;
if(kiss_reset_flag) return;
{
guard_lock from_radio_lock(&from_radio_mutex);
if(data)
from_radio.append(data);
}
{
guard_lock to_host_arq_lock(&to_host_arq_mutex);
if(data && (kiss_raw_enabled != KISS_RAW_DISABLED))
to_arq_host.append(data);
}
}
/**********************************************************************************
*
**********************************************************************************/
void WriteKISS(const char *data, size_t size)
{
if (active_modem->get_mode() == MODE_FSQ) return;
if(kiss_reset_flag) return;
{
guard_lock from_radio_lock(&from_radio_mutex);
if(data && size) {
from_radio.append(data, size);
}
}
{
guard_lock to_host_arq_lock(&to_host_arq_mutex);
if(data && size && (kiss_raw_enabled != KISS_RAW_DISABLED)) {
to_arq_host.append(data, size);
}
}
}
/**********************************************************************************
*
**********************************************************************************/
void WriteKISS(std::string data)
{
if (active_modem->get_mode() == MODE_FSQ) return;
if(kiss_reset_flag) return;
{
guard_lock from_radio_lock(&from_radio_mutex);
if(!data.empty()) {
from_radio.append(data);
}
}
{
guard_lock to_host_arq_lock(&to_host_arq_mutex);
if(!data.empty() && (kiss_raw_enabled != KISS_RAW_DISABLED)) {
to_arq_host.append(data);
}
}
}
/**********************************************************************************
*
**********************************************************************************/
void WriteToHostSocket(void)
{
guard_lock to_host_lock(&to_host_mutex);
size_t count = 0;
if(to_host.empty()) return;
if(kiss_socket && data_io_enabled == KISS_IO) {
try {
if(progStatus.kiss_tcp_io)
count = kiss_socket->send(to_host.c_str(), to_host.size());
else
count = kiss_socket->sendTo(to_host.c_str(), to_host.size());
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(to_host.c_str(), to_host.size());
#endif
} catch (...) {
if(kiss_reset_flag == false) {
kiss_tcp_disconnect((char *)"");
}
LOG_INFO("Write error error to KISS socket: %d", static_cast<int>(count));
}
}
to_host.clear();
}
/**********************************************************************************
*
**********************************************************************************/
static void ReadFromHostBuffered(void)
{
if(!kiss_socket) return;
guard_lock from_host_lock(&from_host_mutex);
if(from_host.empty()) return;
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(from_host.c_str(), from_host.size());
#endif
parse_kiss_frame(from_host);
from_host.clear();
}
/**********************************************************************************
*
**********************************************************************************/
void ReadFromRadioBuffered(void)
{
if(kiss_reset_flag) return;
guard_lock from_radio_lock(&from_radio_mutex);
if(from_radio.empty()) return;
int pos = 0;
int pos2 = 0;
// unsigned int crc = 0;
KISS_QUEUE_FRAME *frame = (KISS_QUEUE_FRAME *)0;
static char frame_marker[2] = { (char)(KISS_FEND), 0 };
std::string one_frame = "";
pos = from_radio.find(frame_marker);
if(pos == (int)(std::string::npos)) {
from_radio.clear();
return;
}
if(pos != 0) {
from_radio.erase(0, pos);
pos = 0;
}
pos2 = from_radio.find(frame_marker, pos + 1);
if(pos2 != (int)(std::string::npos)) {
one_frame.assign(from_radio, pos, pos2 - pos + 1);
} else {
if(from_radio.size() > MAX_TEMP_BUFFER_SIZE)
from_radio.clear();
return;
}
char *buffer = (char *)0;
size_t buffer_size = one_frame.size() + BUFFER_PADDING;
buffer = new char [buffer_size];
if(!buffer) {
LOG_DEBUG("Memory Allocation Error Near Line No. %d", __LINE__);
goto EXIT;
}
memset(buffer, 0, buffer_size);
buffer_size = one_frame.size();
memcpy(buffer, one_frame.c_str(), buffer_size);
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(buffer, buffer_size);
#endif
buffer_size = decap_hdlc_frame(buffer, buffer_size);
if(buffer_size) {
from_radio.erase(pos, pos2 - pos + 1);
if(kiss_raw_enabled != KISS_RAW_ONLY) {
frame = encap_kiss_frame(buffer, buffer_size, KISS_DATA, kiss_port_no);
if(!frame || !frame->data) {
LOG_DEBUG("Frame Allocation Error Near Line %d", __LINE__);
goto EXIT;
}
WriteToHostBuffered((const char *) frame->data, (size_t) frame->size);
}
} else {
from_radio.erase(pos, pos + 1);
}
EXIT:;
if(frame) {
if(frame->data) {
frame->data[0] = 0;
delete [] frame->data;
}
delete frame;
}
if(buffer) {
buffer[0] = 0;
delete [] buffer;
}
}
/**********************************************************************************
*
**********************************************************************************/
void WriteToHostBCastFramesBuffered(void)
{
guard_lock kiss_bc_frame_lock(&kiss_bc_frame_mutex);
if(kiss_bc_frame.empty()) return;
WriteToHostBuffered((const char *) kiss_bc_frame.c_str(), (size_t) kiss_bc_frame.size());
#ifdef EXTENED_DEBUG_INFO
LOG_HEX(kiss_bc_frame.c_str(), (size_t) kiss_bc_frame.size());
#endif
kiss_bc_frame.clear();
}
/**********************************************************************************
*
**********************************************************************************/
bool tcp_init(bool connect_flag)
{
if(progdefaults.kiss_address.empty() || progdefaults.kiss_io_port.empty()) {
LOG_DEBUG("%s", "KISS IP Address or Port null");
return false;
}
kiss_ip_address.assign(progdefaults.kiss_address);
kiss_ip_io_port.assign(progdefaults.kiss_io_port);
kiss_ip_out_port.assign(progdefaults.kiss_out_port);
try {
kiss_socket = new Socket(Address(kiss_ip_address.c_str(), kiss_ip_io_port.c_str(), "tcp"));
kiss_socket->set_autoclose(true);
kiss_socket->set_nonblocking(false);
if(progdefaults.kiss_tcp_listen)
kiss_socket->bind();
}
catch (const SocketException& e) {
LOG_ERROR("Could not resolve %s: %s", kiss_ip_address.c_str(), e.what());
if(kiss_socket) {
kiss_socket->shut_down();
kiss_socket->close();
delete kiss_socket;
kiss_socket = 0;
kiss_enabled = 0;
}
return false;
}
if(connect_flag) {
if(kiss_socket->connect1() == false) {
LOG_INFO("Connection Failed: Host program present?");
kiss_socket->shut_down();
kiss_socket->close();
delete kiss_socket;
kiss_socket = 0;
kiss_enabled = 0;
return false;
}
}
return true;
}
/**********************************************************************************
*
**********************************************************************************/
bool udp_init(void)
{
if(progdefaults.kiss_address.empty() || progdefaults.kiss_io_port.empty()) {
LOG_DEBUG("%s", "KISS IP Address or Port null");
return false;
}
kiss_ip_address.assign(progdefaults.kiss_address);
kiss_ip_io_port.assign(progdefaults.kiss_io_port);
kiss_ip_out_port.assign(progdefaults.kiss_out_port);
try {
kiss_socket = new Socket(Address(kiss_ip_address.c_str(), kiss_ip_io_port.c_str(), "udp"));
kiss_socket->dual_port(&progdefaults.kiss_dual_port_enabled);
kiss_socket->set_dual_port_number(kiss_ip_out_port);
kiss_socket->set_autoclose(true);
kiss_socket->set_nonblocking(false);
if(progdefaults.kiss_tcp_listen) // Listen flag indcates server mode.
kiss_socket->bindUDP();
} catch (const SocketException& e) {
LOG_ERROR("Could not resolve %s: %s", kiss_ip_address.c_str(), e.what());
if(kiss_socket) {
kiss_socket->shut_down();
kiss_socket->close();
delete kiss_socket;
kiss_socket = 0;
kiss_enabled = 0;
}
return false;
}
return true;
}
/**********************************************************************************
*
**********************************************************************************/
void kiss_reset_buffers(void)
{
{
guard_lock to_host_lock(&to_host_mutex);
if(!to_host.empty())
to_host.clear();
}
{
guard_lock to_host_lock(&from_radio_mutex);
if(!from_radio.empty())
from_radio.clear();
}
{
guard_lock to_host_lock(&to_radio_mutex);
pText = 0;
kiss_text_available = false;
if(!to_radio.empty())
to_radio.clear();
}
{
guard_lock kiss_bc_frame_lock(&kiss_bc_frame_mutex);
if(!kiss_bc_frame.empty())
kiss_bc_frame.clear();
}
}
/**********************************************************************************
*
**********************************************************************************/
void kiss_reset(void)
{
kiss_reset_flag = true;
kiss_text_available = false;
duplex = KISS_HALF_DUPLEX;
crc_mode = CRC16_NONE;
smack_crc_enabled = false;
pText = 0;
if(data_io_enabled == KISS_IO)
data_io_enabled = DISABLED_IO;
MilliSleep(1000);
kiss_reset_buffers();
if (trx_state == STATE_TX || trx_state == STATE_TUNE) {
REQ(abort_tx);
}
kiss_reset_flag = false;
if(data_io_enabled == DISABLED_IO)
data_io_enabled = KISS_IO;
}
/**********************************************************************************
*
**********************************************************************************/
void kiss_init(bool connect_flag)
{
kiss_enabled = false;
kiss_exit = false;
tcpip_reset_flag = false;
// progStatus.data_io_enabled (widget state), data_io_enabled (program state)
if(progStatus.data_io_enabled == KISS_IO) {
if(!(active_modem->iface_io() & KISS_IO)) {
set_default_kiss_modem();
}
}
if(init_hist_flag) {
memset(histogram, 0, sizeof(histogram));
init_hist_flag = false;
}
srand(time(0)); // For CSMA persistance
update_kpsql_fractional_gain(progdefaults.kpsql_attenuation);
data_io_type = DATA_IO_NA;
if(progStatus.kiss_tcp_io) {
if(retry_count > KISS_CONNECT_RETRY_COUNT)
retry_count = KISS_CONNECT_RETRY_COUNT;
if(progStatus.kiss_tcp_listen)
connect_flag = false;
do {
if(tcp_init(connect_flag)) break;
if(progStatus.kiss_tcp_listen) return;
MilliSleep(KISS_RETRY_WAIT_TIME);
if(retry_count-- > 0) continue;
else return;
} while(1);
LOG_INFO("%s", "TCP Init - OK");
} else {
if(!udp_init()) return;
LOG_INFO("%s", "UDP Init - OK");
}
Fl::awake(kiss_io_set_button_state, (void *) IO_START_STR);
kiss_loop_running = false;
if (pthread_create(&kiss_thread, NULL, kiss_loop, NULL) < 0) {
LOG_ERROR("KISS kiss_thread: pthread_create failed");
return;
}
kiss_rx_loop_running = false;
if (pthread_create(&kiss_rx_socket_thread, NULL, ReadFromHostSocket, NULL) < 0) {
LOG_ERROR("KISS kiss_rx_socket_thread: pthread_create failed");
kiss_exit = true;
pthread_join(kiss_thread, NULL);
return;
}
if(progStatus.kiss_tcp_io) {
data_io_type = DATA_IO_TCP;
kiss_watchdog_running = false;
if (pthread_create(&kiss_watchdog_thread, NULL, tcpip_watchdog, NULL) < 0) {
LOG_ERROR("KISS kiss_watchdog_thread: pthread_create failed");
}
} else {
data_io_type = DATA_IO_UDP;
}
Fl::awake(kiss_io_set_button_state, (void *) IO_STOP_STR);
if(progdefaults.data_io_enabled == KISS_IO)
data_io_enabled = KISS_IO;
kiss_enabled = true;
allow_kiss_socket_io = true;
}
/**********************************************************************************
*
**********************************************************************************/
static void *tcpip_watchdog(void *args)
{
kiss_watchdog_running = true;
kiss_watchdog_exit = false;
struct timespec timeout;
struct timeval tp;
std::string package = "";
std::string cmd = "HOST:";
package.assign(cmd);
memset(&timeout, 0, sizeof(timeout));
LOG_INFO("%s", "TCP/IP watch dog started");
kiss_watchdog_running = true;
while(!kiss_watchdog_exit) {
gettimeofday(&tp, NULL);
timeout.tv_sec = tp.tv_sec + TEST_INTERVAL_SECONDS;
timeout.tv_nsec = tp.tv_usec * 1000;
pthread_mutex_lock(&kiss_loop_exit_mutex);
pthread_cond_timedwait(&kiss_watchdog_cond, &kiss_loop_exit_mutex, &timeout);
pthread_mutex_unlock(&kiss_loop_exit_mutex);
// Send somthing every once in awhile to check if other side is still connected.
// Data transfer fail handled by the data transfer routines.
if(kiss_socket && !tcpip_reset_flag)
if(kiss_socket->is_connected())
kiss_queue_frame(encap_kiss_frame(package, KISS_HARDWARE, kiss_port_no), cmd);
}
kiss_watchdog_running = false;
LOG_INFO("%s", "TCP/IP watch dog stopped");
return (void *)0;
}
/**********************************************************************************
*
**********************************************************************************/
void kiss_main_thread_close(void *ptr)
{
kiss_close(true);
}
/**********************************************************************************
* Only called from the main thread.
**********************************************************************************/
void kiss_close(bool override_flag)
{
int max_loops = 100;
int loop_delay_ms = 10;
if(tcpip_reset_flag && !override_flag) return;
if(kiss_socket) {
if(kiss_socket->is_connected()) {
kiss_reset_buffers();
send_disconnect_msg();
MilliSleep(500); // Wait a short period for outstanding
// messages to be sent.
}
} else {
return;
}
tcpip_reset_flag = true;
kiss_text_available = false;
allow_kiss_socket_io = false;
if(data_io_type == DATA_IO_TCP && kiss_watchdog_running) {
kiss_watchdog_exit = true;
pthread_cond_signal(&kiss_watchdog_cond);
for(int i = 0; i < max_loops; i++) {
if(kiss_watchdog_running == false) break;
MilliSleep(loop_delay_ms);
}
if(!kiss_watchdog_running) {
pthread_join(kiss_watchdog_thread, NULL);
LOG_INFO("%s", "kiss_watchdog_running - join");
} else {
CANCEL_THREAD(kiss_watchdog_thread);
LOG_INFO("%s", "kiss_watchdog_running - cancel");
}
}
if(data_io_enabled == KISS_IO) {
data_io_enabled = DISABLED_IO;
data_io_type = DATA_IO_NA;
}
kiss_rx_exit = true;
if(kiss_socket) {
kiss_socket->shut_down();
kiss_socket->close();
}
for(int i = 0; i < max_loops; i++) {
if(kiss_rx_loop_running == false) break;
MilliSleep(loop_delay_ms);
}
if(!kiss_rx_loop_running) {
pthread_join(kiss_rx_socket_thread, NULL);
LOG_INFO("%s", "kiss_rx_loop_running - join");
} else {
CANCEL_THREAD(kiss_rx_socket_thread);
LOG_INFO("%s", "kiss_rx_loop_running - cancel");
}
kiss_exit = 1;
for(int i = 0; i < max_loops; i++) {
if(kiss_loop_running == false) break;
MilliSleep(loop_delay_ms);
}
if(!kiss_loop_running) {
pthread_join(kiss_thread, NULL);
LOG_INFO("%s", "kiss_loop_running - join");
} else {
CANCEL_THREAD(kiss_thread);
LOG_INFO("%s", "kiss_loop_running - cancel");
}
LOG_INFO("%s", "Kiss loop terminated. ");
kiss_socket = 0;
kiss_enabled = false;
kiss_loop_running = false;
kiss_rx_loop_running = false;
kiss_watchdog_running = false;
Fl::awake(kiss_io_set_button_state, (void *) IO_START_STR);
tcpip_reset_flag = false;
if((retry_count > 0) && progStatus.kiss_tcp_io)
Fl::awake(kiss_main_thread_retry_open, (void *) 0);
}
/**********************************************************************************
*
**********************************************************************************/
void kiss_main_thread_retry_open(void *ptr)
{
if(!progStatus.kiss_tcp_listen)
MilliSleep(KISS_RETRY_WAIT_TIME);
connect_to_kiss_io(false);
}
/**********************************************************************************
*
**********************************************************************************/
void connect_to_kiss_io(bool user_requested)
{
guard_lock external_lock(&restart_mutex);
if(kiss_socket) {
if(user_requested)
retry_count = 0;
kiss_close(true);
if(user_requested)
return;
}
if(user_requested || progStatus.kiss_tcp_listen)
retry_count = KISS_CONNECT_RETRY_COUNT;
if(retry_count > 0) {
retry_count--;
kiss_init(progdefaults.kiss_tcp_listen ? false : true);
}
}
/**********************************************************************************
*
**********************************************************************************/
bool kiss_thread_running(void)
{
return (bool) kiss_enabled;
}
/**********************************************************************************
*
**********************************************************************************/
int kiss_get_char(void)
{
/// Mutex is unlocked when returning from function
guard_lock to_radio_lock(&to_radio_mutex);
int c = 0;
static bool toggle_flag = 0;
if (kiss_text_available) {
if (pText != (int)to_radio.length()) {
c = to_radio[pText++] & 0xFF;
toggle_flag = true;
} else {
kiss_text_available = false;
to_radio.clear();
pText = 0;
c = GET_TX_CHAR_ETX;
if(toggle_flag) {
bcast_tx_buffer_empty_kiss_frame();
toggle_flag = 0;
}
}
}
return c;
}
| 107,164
|
C++
|
.cxx
| 3,203
| 30.864814
| 129
| 0.543545
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,180
|
rx_extract.cxx
|
w1hkj_fldigi/src/logger/rx_extract.cxx
|
// ----------------------------------------------------------------------------
// rx_extract.cxx extract delineated data stream to file
//
// Copyright 2009 W1HKJ, Dave Freese
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <unistd.h>
#include <iostream>
#include <fstream>
#include <string>
#include <FL/filename.H>
#include "fileselect.h"
#include "gettext.h"
#include "rx_extract.h"
#include "main.h"
#include "status.h"
#include "fl_digi.h"
#include "configuration.h"
#include "confdialog.h"
#include "debug.h"
#include "icons.h"
#include "qrunner.h"
#include "timeops.h"
#include "xmlrpc.h"
#include "audio_alert.h"
static const char *wrap_beg = "[WRAP:beg]";
static const char *wrap_end = "[WRAP:end]";
static const char *flmsg = "<flmsg>";
static const char flamp_beg[] = ">FLAMP";
static const char flamp_end[] = ":EOT}";
#ifdef __WIN32__
const char *txtWrapInfo = _("\
Detect the occurance of [WRAP:beg] and [WRAP:end]\n\
Save tags and all enclosed text to date-time stamped file, ie:\n\
NBEMS.files\\WRAP\\recv\\extract-20090127-092515.wrap");
#else
const char *txtWrapInfo = _("\
Detect the occurance of [WRAP:beg] and [WRAP:end]\n\
Save tags and all enclosed text to date-time stamped file, ie:\n\
~/.nbems/WRAP/recv/extract-20090127-092515.wrap");
#endif
#define bufsize 64
std::string rx_extract_buff;
std::string rx_buff;
std::string rx_extract_msg;
bool extract_wrap = false;
bool extract_flamp = false;
bool extract_arq = false;
bool bInit = false;
char dttm[64];
void rx_extract_reset()
{
rx_buff.clear();
rx_extract_buff.assign(' ', bufsize);
extract_wrap = false;
extract_flamp = false;
extract_arq = false;
put_status("");
}
void rx_extract_timer(void *)
{
rx_extract_msg = "Extract timed out";
put_status(rx_extract_msg.c_str(), 20, STATUS_CLEAR);
rx_extract_reset();
if (trx_state != STATE_RX) return;
if (audio_alert && progdefaults.ENABLE_RX_EXTRACT_TIMED_OUT)
audio_alert->alert(progdefaults.RX_EXTRACT_TIMED_OUT);
}
void rx_add_timer()
{
Fl::add_timeout(progdefaults.extract_timeout, rx_extract_timer, NULL);
}
void rx_remove_timer()
{
Fl::remove_timeout(rx_extract_timer);
}
void invoke_flmsg()
{
std::string cmd = progdefaults.flmsg_pathname;
REQ(rx_remove_timer);
struct tm tim;
time_t t;
time(&t);
gmtime_r(&t, &tim);
strftime(dttm, sizeof(dttm), "%Y%m%d-%H%M%S", &tim);
std::string outfilename = FLMSG_WRAP_recv_dir;
outfilename.append("extract-");
outfilename.append(dttm);
outfilename.append(".wrap");
std::ofstream extractstream(outfilename.c_str(), std::ios::binary);
if (extractstream) {
extractstream << rx_buff;
extractstream.close();
}
rx_extract_msg = "File saved in ";
rx_extract_msg.append(FLMSG_WRAP_recv_dir);
put_status(rx_extract_msg.c_str(), 20, STATUS_CLEAR);
if (trx_state != STATE_RX) return;
if (audio_alert && progdefaults.ENABLE_RX_EXTRACT_MSG_RCVD)
audio_alert->alert(progdefaults.RX_EXTRACT_MSG_RCVD);
if (flmsg_is_online && progdefaults.flmsg_transfer_direct) {
guard_lock autolock(server_mutex);
flmsg_data.append(rx_buff);
return;
}
if (progdefaults.open_nbems_folder)
open_recv_folder(FLMSG_WRAP_recv_dir.c_str());
if ((progdefaults.open_flmsg || progdefaults.open_flmsg_print) &&
(rx_buff.find(flmsg) != std::string::npos) &&
!progdefaults.flmsg_pathname.empty()) {
#ifdef __MINGW32__
cmd.append(" -title ").append(dttm);
cmd.append(" --flmsg-dir ").append("\"").append(FLMSG_dir).append("\"");
if (progdefaults.open_flmsg_print && progdefaults.open_flmsg)
cmd.append(" --b");
else if (progdefaults.open_flmsg_print)
cmd.append(" --p");
cmd.append(" \"").append(outfilename).append("\"");
char *cmdstr = strdup(cmd.c_str());
STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
memset(&pi, 0, sizeof(pi));
if (!CreateProcess( NULL, cmdstr,
NULL, NULL, FALSE,
CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
LOG_ERROR("CreateProcess failed with error code %ld", GetLastError());
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
free (cmdstr);
#else
std::string params = "";
static std::string ap[10];// = cmd;//"";
std::string param = "";
size_t p = cmd.find(" -");
if (p != std::string::npos) {
param.assign(cmd.substr(p));
cmd = cmd.substr(0,p);
}
for (int i = 0; i < 10; i++) ap[i].clear();
int n = 0;
ap[n++] = "-title"; ap[n++] = dttm;
ap[n++] = "--flmsg-dir"; ap[n++] = FLMSG_dir;
if (progdefaults.open_flmsg_print && progdefaults.open_flmsg)
ap[n++] = " --b";//params = " --b";
else if (progdefaults.open_flmsg_print)
ap[n++] = " --p";//params = " --p";
ap[n++] = outfilename;
switch (fork()) {
case 0:
# ifndef NDEBUG
unsetenv("MALLOC_CHECK_");
unsetenv("MALLOC_PERTURB_");
# endif
switch (n) {
case 1:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(),
(char*)0);
break;
case 2:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)0);
break;
case 3:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)ap[2].c_str(),
(char*)0);
break;
case 4:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)ap[2].c_str(), (char*)ap[3].c_str(),
(char*)0);
break;
case 5:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)ap[2].c_str(), (char*)ap[3].c_str(),
(char*)ap[4].c_str(),
(char*)0);
break;
case 6:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)ap[2].c_str(), (char*)ap[3].c_str(),
(char*)ap[4].c_str(), (char*)ap[5].c_str(),
(char*)0);
break;
case 7:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)ap[2].c_str(), (char*)ap[3].c_str(),
(char*)ap[4].c_str(), (char*)ap[5].c_str(),
(char*)ap[6].c_str(),
(char*)0);
break;
case 8:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)ap[2].c_str(), (char*)ap[3].c_str(),
(char*)ap[4].c_str(), (char*)ap[5].c_str(),
(char*)ap[6].c_str(), (char*)ap[7].c_str(),
(char*)0);
break;
case 9:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)ap[2].c_str(), (char*)ap[3].c_str(),
(char*)ap[4].c_str(), (char*)ap[5].c_str(),
(char*)ap[6].c_str(), (char*)ap[7].c_str(),
(char*)ap[8].c_str(),
(char*)0);
break;
case 10:
execlp(
(char*)cmd.c_str(), (char*)cmd.c_str(),
(char*)ap[0].c_str(), (char*)ap[1].c_str(),
(char*)ap[2].c_str(), (char*)ap[3].c_str(),
(char*)ap[4].c_str(), (char*)ap[5].c_str(),
(char*)ap[6].c_str(), (char*)ap[7].c_str(),
(char*)ap[8].c_str(), (char*)ap[9].c_str(),
(char*)0);
break;
default : ;
}
exit(EXIT_FAILURE);
case -1:
fl_alert2(_("Could not start flmsg"));
}
#endif
}
}
void start_flmsg()
{
std::string cmd = progdefaults.flmsg_pathname;
#ifdef __MINGW32__
char *cmdstr = strdup(cmd.c_str());
STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
memset(&pi, 0, sizeof(pi));
if (!CreateProcess( NULL, cmdstr,
NULL, NULL, FALSE,
CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
LOG_ERROR("CreateProcess failed with error code %ld", GetLastError());
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
free (cmdstr);
#else
switch (fork()) {
case 0:
execlp((char*)cmd.c_str(), (char*)cmd.c_str(), (char*)0, (char*)0);
exit(EXIT_FAILURE);
case -1:
fl_alert2(_("Could not start flmsg"));
default: ;
}
#endif
}
void rx_extract_add(int c)
{
if (!c) return;
check_nbems_dirs();
if (!bInit) {
rx_extract_reset();
bInit = true;
}
char ch = (char)c;
rx_extract_buff = rx_extract_buff.substr(1);
rx_extract_buff += ch;
// rx_extract_buff must contain in order:
// ~1c - arq_soh + connect request
// ; - arq_dle character
// ~4 - arq_eoh
// before auto starting flmsg
size_t p1 = rx_extract_buff.find("~1c");
size_t p2 = rx_extract_buff.find(";");
size_t p3 = rx_extract_buff.find("~4");
if ( (p1 != std::string::npos) && (p2 != std::string::npos) && (p3 != std::string::npos) &&
(p1 < p2) && (p2 < p3)) {
if (!flmsg_is_online) start_flmsg();
rx_extract_buff.assign(' ', bufsize);
return;
}
if (!extract_arq &&
(rx_extract_buff.find("ARQ:FILE::FLMSG_XFR") != std::string::npos) ) {
extract_arq = true;
REQ(rx_remove_timer);
REQ(rx_add_timer);
rx_extract_buff.assign(' ', bufsize);
rx_extract_msg = "Extracting ARQ msg";
put_status(rx_extract_msg.c_str());
return;
} else if (extract_arq) {
REQ(rx_remove_timer);
REQ(rx_add_timer);
if (rx_extract_buff.find("ARQ::ETX"))
rx_extract_reset();
return;
} else if (!extract_flamp &&
(rx_extract_buff.find(flamp_beg) != std::string::npos) ) {
extract_flamp = true;
rx_extract_buff.assign(' ', bufsize);
rx_extract_msg = "Extracting FLAMP";
put_status(rx_extract_msg.c_str());
return;
} else if (extract_flamp) {
REQ(rx_remove_timer);
REQ(rx_add_timer);
if (rx_extract_buff.find(flamp_end) != std::string::npos)
rx_extract_reset();
return;
} else if (!extract_wrap &&
(rx_extract_buff.find(wrap_beg) != std::string::npos) ) {
rx_buff.assign(wrap_beg);
rx_extract_msg = "Extracting WRAP/FLMSG";
put_status(rx_extract_msg.c_str());
extract_wrap = true;
REQ(rx_remove_timer);
REQ(rx_add_timer);
return;
} else if (extract_wrap) {
rx_buff += ch;
REQ(rx_remove_timer);
REQ(rx_add_timer);
if (rx_extract_buff.find(wrap_end) != std::string::npos) {
invoke_flmsg();
rx_extract_reset();
}
}
}
void select_flmsg_pathname()
{
txt_flmsg_pathname->value(progdefaults.flmsg_pathname.c_str());
txt_flmsg_pathname->redraw();
#ifdef __APPLE__
open_recv_folder("/Applications/");
return;
#else
std::string deffilename = progdefaults.flmsg_pathname;
# ifdef __MINGW32__
if (deffilename.empty())
deffilename = "C:\\Program Files\\";
const char *p = FSEL::select(_("Locate flmsg executable"), _("flmsg.exe\t*.exe"), deffilename.c_str());
# else
if (deffilename.empty())
deffilename = "/usr/local/bin/";
const char *p = FSEL::select(_("Locate flmsg executable"), _("flmsg\t*"), deffilename.c_str());
# endif
if (!p) return;
if (!*p) return;
progdefaults.flmsg_pathname = p;
progdefaults.changed = true;
txt_flmsg_pathname->value(p);
#endif
}
// this only works on Linux and Unix
// not Windoze or
// OS X to find binaries in the /Applications/ directory structure
bool find_pathto_exectable(std::string &binpath, std::string executable)
{
size_t endindex = 0;
binpath.clear();
// Get the PATH environment variable as pointer to std::string
// The std::strings in the environment list are of the form name=value.
// As typically implemented, getenv() returns a pointer to a std::string within
// the environment list. The caller must take care not to modify this std::string,
// since that would change the environment of the process.
//
// The implementation of getenv() is not required to be reentrant. The std::string
// pointed to by the return value of getenv() may be statically allocated, and
// can be modified by a subsequent call to getenv(), putenv(3), setenv(3), or
// unsetenv(3).
char *environment = getenv("PATH");
if (environment == NULL) return false;
std::string env = environment;
std::string testpath = "";
char endchar = ':';
// Parse single PATH std::string into directories
while (!env.empty()) {
endindex = env.find(endchar);
testpath = env.substr(0, endindex);
testpath.append("/"); // insert linux, unix, osx OS-correct delimiter
testpath.append(executable); // append executable name
// Most portable way to check if a file exists: Try to open it.
FILE *checkexists = NULL;
checkexists = fl_fopen( testpath.c_str(), "r" ); // try to open file readonly
if (checkexists) { // if the file successfully opened, it exists.
fclose(checkexists);
binpath = testpath;
return true;
}
if (endindex == std::string::npos)
env.clear();
else
env.erase(0, endindex + 1);
}
return false;
}
std::string select_binary_pathname(std::string deffilename)
{
#ifdef __APPLE__
open_recv_folder("/Applications/");
return "";
#else
# ifdef __MINGW32__
deffilename = "C:\\Program Files\\";
const char *p = FSEL::select(_("Locate executable"), _("*.exe"), deffilename.c_str());
# else
deffilename = "/usr/local/bin/";
const char *p = FSEL::select(_("Locate binary"), _("*"), deffilename.c_str());
# endif
std::string executable = "";
if (p && *p) executable = p;
// do not allow recursion !!
if (executable.find("fldigi") != std::string::npos) return "";
return executable;
#endif
}
| 13,824
|
C++
|
.cxx
| 448
| 27.848214
| 104
| 0.637237
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,181
|
speak.cxx
|
w1hkj_fldigi/src/logger/speak.cxx
|
// ----------------------------------------------------------------------------
// speak.cxx rx text data stream to file
// rx text data stream to client socket on MS
//
// Copyright 2009 W1HKJ, Dave Freese
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <iostream>
#include <fstream>
#include <string>
#include "gettext.h"
#include "speak.h"
#include "main.h"
#include "status.h"
#include "fl_digi.h"
#include "configuration.h"
#include "debug.h"
#include "socket.h"
#include "icons.h"
const char *txtTalkInfo = _("\
Save all received text, one character at a time to the following file:\n\n\
fldigi.files\\talk\\textout.txt (Windows)\n\
~/.fldigi/talk/textout.txt (Linux, OS X, Free BSD)");
std::string speakfname = "";
std::ofstream speakout;
std::string speakbuffer = "";
#ifndef __WIN32__
void open_talker() {}
void close_talker() {}
void toggle_talker() {}
#endif
#ifdef __WIN32__
#include "confdialog.h"
std::string talkbuffer = "";
Socket *talker_tcpip = 0;
std::string talker_address = "127.0.0.1";
std::string talker_port = "1111";
bool can_talk = true;
void open_talker()
{
try {
talker_tcpip = new Socket(Address(talker_address.c_str(), talker_port.c_str()));
talker_tcpip->set_timeout(0.01);
talker_tcpip->connect();
btnConnectTalker->value(1);
btnConnectTalker->redraw();
can_talk = true;
}
catch (const SocketException& e) {
LOG_INFO("Talker Server not available");
btnConnectTalker->value(0);
btnConnectTalker->redraw();
can_talk = false;
}
}
void close_talker()
{
talker_tcpip->close();
btnConnectTalker->value(0);
btnConnectTalker->redraw();
can_talk = false;
}
void toggle_talker()
{
if (can_talk)
close_talker();
else
open_talker();
}
void speak(int c)
{
if (progdefaults.speak) {
if (speakfname.empty()) {
speakfname = TalkDir;
speakfname.append("textout.txt");
}
speakbuffer += (char)c;
// Windows is not able to handle continuously open/close of the append file
// the file might or might not be written to.
if (!speakout) speakout.open(speakfname.c_str(), std::ios::app);
if (speakout) {
for (size_t i = 0; i < speakbuffer.length(); i++)
speakout.put(speakbuffer[i]);
speakbuffer.clear();
}
}
if (can_talk && !talker_tcpip) open_talker();
if (!talker_tcpip)
return;
if (c < ' ' || c > 'z') c = ',';
talkbuffer += c;
try {
talker_tcpip->send(talkbuffer);
}
catch (const SocketException& e) {
LOG_INFO("Talker server not available");
delete talker_tcpip;
talker_tcpip = 0;
btnConnectTalker->labelcolor(FL_RED);
btnConnectTalker->redraw_label();
can_talk = false;
}
talkbuffer.clear();
}
#else
void speak(int c)
{
if (!progdefaults.speak)
return;
if (speakfname.empty()) {
speakfname = TalkDir;
speakfname.append("textout.txt");
}
speakbuffer += c;
speakout.open(speakfname.c_str(), std::ios::app);
if (!speakout) return;
for (size_t i = 0; i < speakbuffer.length(); i++)
speakout.put(speakbuffer[i]);
speakbuffer.clear();
speakout.flush();
speakout.close();
}
#endif
| 3,767
|
C++
|
.cxx
| 138
| 25.311594
| 82
| 0.676552
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,182
|
logger.cxx
|
w1hkj_fldigi/src/logger/logger.cxx
|
// ----------------------------------------------------------------------------
// logger.cxx Remote Log Interface for fldigi
//
// Copyright 2006-2009 W1HKJ, Dave Freese
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <sys/types.h>
#include <sys/stat.h>
#if !defined(__WOE32__) && !defined(__APPLE__)
# include <sys/ipc.h>
# include <sys/msg.h>
#endif
#include <errno.h>
#include <string>
#include <fstream>
#include <vector>
#include "icons.h"
#include "logger.h"
#include "lgbook.h"
#include "main.h"
#include "modem.h"
#include "waterfall.h"
#include "fl_digi.h"
#include "trx.h"
#include "debug.h"
#include "macros.h"
#include "status.h"
#include "spot.h"
#include "adif_io.h"
#include "date.h"
#include "configuration.h"
#include "flmisc.h"
#include "strutil.h"
#include "qrunner.h"
#include "logsupport.h"
#include "lookupcall.h"
#include "fd_logger.h"
#include "n3fjp_logger.h"
#include "dx_cluster.h"
#include "network.h"
#include <FL/fl_ask.H>
//---------------------------------------------------------------------
const char *logmode;
static std::string log_msg;
static std::string errmsg;
static std::string notes;
//======================================================================
// LoTW
static std::string lotw_fname;
static std::string lotw_logfname;
static std::string lotw_send_fname;
static std::string lotw_log_fname;
static int tracefile_timeout = 0;
std::string str_lotw;
//======================================================================
// eQSL
void submit_eQSL(cQsoRec &rec, std::string msg);
//======================================================================
static std::string adif;
void writeADIF () {
// open the adif file
FILE *adiFile;
std::string fname;
fname = TempDir;
fname.append("log.adif");
adiFile = fl_fopen (fname.c_str(), "a");
if (adiFile) {
// write the current record to the file
fprintf(adiFile,"%s<EOR>\n", adif.c_str());
fclose (adiFile);
}
}
void putadif(int num, const char *s, std::string &str = adif)
{
char tempstr[100];
int slen = strlen(s);
int n = snprintf(tempstr, sizeof(tempstr), "<%s:%d>", fields[num].name, slen);
if (n == -1) {
LOG_PERROR("snprintf");
return;
}
str.append(tempstr).append(s);
}
std::vector<int> lotw_recs_sent;
void clear_lotw_recs_sent()
{
lotw_recs_sent.clear();
}
void restore_lotwsdates()
{
extern int editNbr;
if (lotw_recs_sent.empty()) return;
int recnbr;
cQsoRec *rec;
for (size_t n = 0; n < lotw_recs_sent.size(); n++) {
recnbr = lotw_recs_sent[n];
rec = qsodb.getRec(recnbr);
rec->putField(LOTWSDATE, "");
if (recnbr == editNbr) {
inpLOTWsentdate_log->value("");
inpLOTWsentdate_log->redraw();
}
}
clear_lotw_recs_sent();
}
static notify_dialog *lotw_alert_window = 0;
void check_lotw_log(void *)
{
FILE * logfile = fl_fopen(lotw_log_fname.c_str(), "rb");
if (!logfile) {
tracefile_timeout--;
if (!tracefile_timeout) {
LOG_ERROR(_("NO tqsl log file in %d seconds!"), progdefaults.tracefile_timeout);
restore_lotwsdates();
clear_lotw_recs_sent();
return;
}
Fl::repeat_timeout(1.0, check_lotw_log);
return;
}
std::string trace_text;
fseek(logfile, 0, SEEK_END);
size_t logfile_size = ftell(logfile);
rewind(logfile);
if (logfile_size == 0) {
tracefile_timeout--;
if (!tracefile_timeout) {
LOG_ERROR(_("Tqsl log file empty! waited %d seconds!"), progdefaults.tracefile_timeout);
restore_lotwsdates();
clear_lotw_recs_sent();
return;
}
Fl::repeat_timeout(1.0, check_lotw_log);
return;
}
int ch;
for (size_t n = 0; n < logfile_size; n++) {
ch = fgetc(logfile);
if (ch >= 0x20 && ch <= 0x7F)
trace_text += char(ch);
else
trace_text.append(ascii3[ch & 0xFF]);
}
fclose(logfile);
size_t p1 = trace_text.find("UploadFile returns 0");
size_t p2 = trace_text.find("Final Status: Success");
if ((p1 == std::string::npos) && (p2 == std::string::npos)) {
tracefile_timeout--;
if (!tracefile_timeout) {
LOG_ERROR("%s", "TQSL trace file failed!");
if (progdefaults.lotw_quiet_mode) {
std::string alert;
alert.assign(_("LoTW upload error!"));
alert.append(_("\nView LoTW trace log:\n"));
alert.append(lotw_log_fname);
if (!lotw_alert_window) lotw_alert_window = new notify_dialog;
lotw_alert_window->notify(alert.c_str(), 15.0);
REQ(show_notifier, lotw_alert_window);
}
restore_lotwsdates();
clear_lotw_recs_sent();
return;
}
Fl::repeat_timeout(1.0, check_lotw_log);
return;
}
if (progdefaults.lotw_quiet_mode && progdefaults.lotw_show_delivery) {
if (!lotw_alert_window) lotw_alert_window = new notify_dialog;
std::string alert;
alert.assign(_("LoTW upload OK"));
if (p2 != std::string::npos) {
alert.append("\n").append(trace_text.substr(p2));
p1 = alert.find("<CR>");
if (p1 != std::string::npos) alert.erase(p1);
}
lotw_alert_window->notify(alert.c_str(), 5.0);
REQ(show_notifier, lotw_alert_window);
LOG_INFO("%s", alert.c_str());
}
if (progdefaults.xml_logbook)
xml_update_lotw();
clear_lotw_recs_sent();
return;
}
void send_to_lotw(void *)
{
if (progdefaults.lotw_pathname.empty())
return;
if (str_lotw.empty()) return;
lotw_send_fname = LoTWDir;
lotw_send_fname.append("fldigi_lotw_").append(zdate());
lotw_send_fname.append("_").append(ztime());
lotw_send_fname.append(".adi");
std::ofstream outfile(lotw_send_fname.c_str());
outfile << str_lotw;
outfile.close();
str_lotw.clear();
lotw_log_fname = LoTWDir;
lotw_log_fname.append("lotw_trace.txt"); // LoTW trace file
rotate_log(lotw_log_fname);
remove(lotw_log_fname.c_str());
std::string pstring;
pstring.assign("\"").append(progdefaults.lotw_pathname).append("\"");
pstring.append(" -d -u -a compliant");
if (progdefaults.submit_lotw_password)
pstring.append(" -p \"").append(progdefaults.lotw_pwd).append("\"");
if (!progdefaults.lotw_location.empty())
pstring.append(" -l \"").append(progdefaults.lotw_location).append("\"");
pstring.append(" -t \"").append(lotw_log_fname).append("\"");
pstring.append(" \"").append(lotw_send_fname).append("\"");
if (progdefaults.lotw_quiet_mode)
pstring.append(" -q");
LOG_DEBUG("LoTW command std::string: %s", pstring.c_str());
start_process(pstring);
tracefile_timeout = progdefaults.tracefile_timeout;
Fl::add_timeout(0, check_lotw_log);
}
std::string lotw_rec(cQsoRec &rec)
{
std::string temp;
std::string strrec;
putadif(CALL, rec.getField(CALL), strrec);
putadif(ADIF_MODE, adif2export(rec.getField(ADIF_MODE)).c_str(), strrec);
std::string sm = adif2submode(rec.getField(ADIF_MODE));
if (!sm.empty())
putadif(SUBMODE, sm.c_str(), strrec);
temp = rec.getField(FREQ);
temp.resize(7);
putadif(FREQ, temp.c_str(), strrec);
putadif(QSO_DATE, rec.getField(QSO_DATE), strrec);
putadif(BAND, rec.getField(BAND), strrec);
temp = rec.getField(TIME_ON);
if (temp.length() > 4) temp.erase(4);
putadif(TIME_ON, temp.c_str(), strrec);
strrec.append("<EOR>\n");
return strrec;
}
void submit_lotw(cQsoRec &rec)
{
std::string adifrec = lotw_rec(rec);
if (adifrec.empty()) return;
if (progdefaults.submit_lotw) {
if (str_lotw.empty())
str_lotw = "Fldigi LoTW upload file\n<ADIF_VER:5>2.2.7\n<EOH>\n";
str_lotw.append(adifrec);
Fl::awake(send_to_lotw);
}
}
void submit_ADIF(cQsoRec &rec)
{
adif.erase();
putadif(QSO_DATE, rec.getField(QSO_DATE));
putadif(TIME_ON, rec.getField(TIME_ON));
putadif(QSO_DATE_OFF, rec.getField(QSO_DATE_OFF));
putadif(TIME_OFF, rec.getField(TIME_OFF));
putadif(CALL, rec.getField(CALL));
putadif(FREQ, rec.getField(FREQ));
putadif(ADIF_MODE, adif2export(rec.getField(ADIF_MODE)).c_str());
std::string sm = adif2submode(rec.getField(ADIF_MODE));
if (!sm.empty())
putadif(SUBMODE, sm.c_str());
putadif(RST_SENT, rec.getField(RST_SENT));
putadif(RST_RCVD, rec.getField(RST_RCVD));
putadif(TX_PWR, rec.getField(TX_PWR));
putadif(NAME, rec.getField(NAME));
putadif(QTH, rec.getField(QTH));
putadif(STATE, rec.getField(STATE));
putadif(VE_PROV, rec.getField(VE_PROV));
putadif(COUNTRY, rec.getField(COUNTRY));
putadif(GRIDSQUARE, rec.getField(GRIDSQUARE));
putadif(STX, rec.getField(STX));
putadif(SRX, rec.getField(SRX));
putadif(XCHG1, rec.getField(XCHG1));
putadif(MYXCHG, rec.getField(MYXCHG));
notes = rec.getField(NOTES);
for (size_t i = 0; i < notes.length(); i++)
if (notes[i] == '\n') notes[i] = ';';
putadif(NOTES, notes.c_str());
// these fields will always be blank unless they are added to the main
// QSO log area.
putadif(IOTA, rec.getField(IOTA));
putadif(DXCC, rec.getField(DXCC));
putadif(QSL_VIA, rec.getField(QSL_VIA));
putadif(QSLRDATE, rec.getField(QSLRDATE));
putadif(QSLSDATE, rec.getField(QSLSDATE));
putadif(EQSLRDATE, rec.getField(EQSLRDATE));
putadif(EQSLSDATE, rec.getField(EQSLSDATE));
putadif(LOTWRDATE, rec.getField(LOTWRDATE));
putadif(LOTWSDATE, rec.getField(LOTWSDATE));
writeADIF();
}
//---------------------------------------------------------------------
// the following IPC message is compatible with xlog remote data spec.
//---------------------------------------------------------------------
#if !defined(__WOE32__) && !defined(__APPLE__)
#define addtomsg(x, y) log_msg = log_msg + (x) + (y) + LOG_MSEPARATOR
static void send_IPC_log(cQsoRec &rec)
{
msgtype msgbuf;
const char LOG_MSEPARATOR[2] = {1,0};
int msqid, len;
int mm, dd, yyyy;
char szdate[9];
char sztime[5];
strncpy(szdate, rec.getField(QSO_DATE), 8);
szdate[8] = 0;
sscanf(&szdate[6], "%d", &dd); szdate[6] = 0;
sscanf(&szdate[4], "%d", &mm); szdate[4] = 0;
sscanf(szdate, "%d", &yyyy);
Date logdate(mm, dd, yyyy);
log_msg.clear();
log_msg = std::string("program:") + PACKAGE_NAME + std::string(" v ") + PACKAGE_VERSION + LOG_MSEPARATOR;
addtomsg("version:", LOG_MVERSION);
addtomsg("date:", logdate.szDate(5));
memset(sztime, 0, sizeof(sztime) / sizeof(char));
strncpy(sztime, rec.getField(TIME_ON), (sizeof(sztime) / sizeof(char)) - 1);
addtomsg("TIME:", sztime);
memset(sztime, 0, 5);
strncpy(sztime, rec.getField(TIME_OFF), 4);
addtomsg("endtime:", sztime);
addtomsg("call:", rec.getField(CALL));
addtomsg("mhz:", rec.getField(FREQ));
addtomsg("mode:", adif2export(rec.getField(ADIF_MODE)));
std::string sm = adif2submode(rec.getField(ADIF_MODE));
if (!sm.empty())
addtomsg("submode:", sm.c_str());
addtomsg("tx:", rec.getField(RST_SENT));
addtomsg("rx:", rec.getField(RST_RCVD));
addtomsg("name:", rec.getField(NAME));
addtomsg("qth:", rec.getField(QTH));
addtomsg("state:", rec.getField(STATE));
addtomsg("province:", rec.getField(VE_PROV));
addtomsg("country:", rec.getField(COUNTRY));
addtomsg("locator:", rec.getField(GRIDSQUARE));
addtomsg("serialout:", rec.getField(STX));
addtomsg("serialin:", rec.getField(SRX));
addtomsg("free1:", rec.getField(XCHG1));
notes = rec.getField(NOTES);
for (size_t i = 0; i < notes.length(); i++)
if (notes[i] == '\n') notes[i] = ';';
addtomsg("notes:", notes.c_str());
addtomsg("power:", rec.getField(TX_PWR));
strncpy(msgbuf.mtext, log_msg.c_str(), sizeof(msgbuf.mtext));
msgbuf.mtext[sizeof(msgbuf.mtext) - 1] = '\0';
if ((msqid = msgget(LOG_MKEY, 0666 | IPC_CREAT)) == -1) {
LOG_PERROR("msgget");
return;
}
msgbuf.mtype = LOG_MTYPE;
len = strlen(msgbuf.mtext) + 1;
if (msgsnd(msqid, &msgbuf, len, IPC_NOWAIT) < 0)
LOG_PERROR("msgsnd");
}
#endif
void submit_record(cQsoRec &rec)
{
#if !defined(__WOE32__) && !defined(__APPLE__)
send_IPC_log(rec);
#endif
submit_ADIF(rec);
if (progdefaults.submit_lotw)
submit_lotw(rec);
if (progdefaults.eqsl_when_logged)
submit_eQSL(rec, "");
n3fjp_add_record(rec);
}
//---------------------------------------------------------------------
extern void xml_add_record();
void submit_log(void)
{
if (progdefaults.spot_when_logged) {
if (!dxcluster_viewer->visible()) dxcluster_viewer->show();
send_DXcluster_spot();
}
if (progdefaults.pskrep_log)
spot_log(
inpCall->value(),
inpLoc->value());
logmode = mode_info[active_modem->get_mode()].adif_name;
if (progdefaults.xml_logbook && qsodb.isdirty()) {
xml_add_record();
qsodb.isdirty(0);
} else
AddRecord();
if (FD_logged_on) FD_add_record();
// if (progdefaults.eqsl_when_logged)
// makeEQSL("");
}
//======================================================================
// thread to support sending log entry to eQSL
//======================================================================
pthread_t* EQSLthread = 0;
pthread_mutex_t EQSLmutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t EQSLcond = PTHREAD_COND_INITIALIZER;
static void *EQSL_loop(void *args);
static void EQSL_init(void);
void EQSL_close(void);
void EQSL_send();
static std::string EQSL_url = "";
static std::string SEND_url = "";
static std::string EQSL_xmlpage = "";
static bool EQSLEXIT = false;
static notify_dialog *eqsl_alert_window = 0;
void update_eQSL_fields(void *)
{
std::string call;
std::string date;
std::string mode = "MODE";
size_t p = EQSL_url.find("<CALL:");
if (p == std::string::npos) return;
p = EQSL_url.find(">", p);
if (p == std::string::npos) return;
p++;
size_t p2 = EQSL_url.find("<", p);
if (p2 == std::string::npos) return;
call = EQSL_url.substr(p, p2 - p);
p = EQSL_url.find("<QSO_DATE:");
if (p == std::string::npos) return;
p = EQSL_url.find(">", p);
if (p == std::string::npos) return;
p++;
p2 = EQSL_url.find("<", p);
if (p2 == std::string::npos) return;
date = EQSL_url.substr(p, p2 - p);
p = EQSL_url.find("<MODE:");
if (p != std::string::npos) {
p = EQSL_url.find(">", p);
if (p != std::string::npos) {
p2 = EQSL_url.find("<", ++p);
if (p2 != std::string::npos)
mode = EQSL_url.substr(p, p2 - p);
}
}
p = EQSL_url.find("<SUBMODE:");
if (p != std::string::npos) {
p = EQSL_url.find(">", p);
if (p != std::string::npos) {
p2 = EQSL_url.find("<", ++p);
if (p2 != std::string::npos) {
std::string submode = EQSL_url.substr(p, p2 - p);
if (!submode.empty()) mode = submode;
}
}
}
inpEQSLsentdate_log->value(date.c_str());
if (progdefaults.xml_logbook)
xml_update_eqsl();
else
updateRecord();
std::string qsl_logged = "eQSL logged: ";
qsl_logged.append(call).append(" on ").append(mode);
if (progdefaults.eqsl_show_delivery) {
if (!eqsl_alert_window) eqsl_alert_window = new notify_dialog;
eqsl_alert_window->notify(qsl_logged.c_str(), 5.0);
REQ(show_notifier, eqsl_alert_window);
}
LOG_INFO("%s", qsl_logged.c_str());
}
static void cannot_connect_to_eqsl(void *)
{
std::string msg = "Cannot connect to www.eQSL.cc";
if (!eqsl_alert_window) eqsl_alert_window = new notify_dialog;
eqsl_alert_window->notify(msg.c_str(), 5.0);
REQ(show_notifier, eqsl_alert_window);
}
static void eqsl_error(void *)
{
size_t p = EQSL_xmlpage.find("Error:");
size_t p2 = EQSL_xmlpage.find('\n', p);
std::string errstr = "eQSL error:";
errstr.append("testing 1.2.3");
errstr.append(EQSL_xmlpage.substr(p, p2 - p - 1));
errstr.append("\n").append(EQSL_url.substr(0,40));
if (!eqsl_alert_window) eqsl_alert_window = new notify_dialog;
eqsl_alert_window->notify(errstr.c_str(), 5.0);
REQ(show_notifier, eqsl_alert_window);
LOG_ERROR("%s", errstr.c_str());
}
static void *EQSL_loop(void *args)
{
SET_THREAD_ID(EQSL_TID);
SET_THREAD_CANCEL();
for (;;) {
TEST_THREAD_CANCEL();
pthread_mutex_lock(&EQSLmutex);
pthread_cond_wait(&EQSLcond, &EQSLmutex);
pthread_mutex_unlock(&EQSLmutex);
if (EQSLEXIT)
return NULL;
size_t p;
if (get_http(SEND_url, EQSL_xmlpage, 5.0) <= 0) {
REQ(cannot_connect_to_eqsl, (void *)0);
}
else if ((p = EQSL_xmlpage.find("Error:")) != std::string::npos) {
REQ(eqsl_error, (void *)0);
} else {
REQ(update_eQSL_fields, (void *)0);
}
}
return NULL;
}
void EQSL_close(void)
{
ENSURE_THREAD(FLMAIN_TID);
if (!EQSLthread)
return;
CANCEL_THREAD(*EQSLthread);
pthread_mutex_lock(&EQSLmutex);
EQSLEXIT = true;
pthread_cond_signal(&EQSLcond);
pthread_mutex_unlock(&EQSLmutex);
pthread_join(*EQSLthread, NULL);
delete EQSLthread;
EQSLthread = 0;
}
static void EQSL_init(void)
{
ENSURE_THREAD(FLMAIN_TID);
if (EQSLthread)
return;
EQSLthread = new pthread_t;
EQSLEXIT = false;
if (pthread_create(EQSLthread, NULL, EQSL_loop, NULL) != 0) {
LOG_PERROR("pthread_create");
return;
}
MilliSleep(10);
}
void submit_eQSL(cQsoRec &rec, std::string msg)
{
std::string eQSL_data;
std::string tempstr;
char sztemp[100];
eQSL_data = "upload <adIF_ver:4>4.0 ";
snprintf(sztemp, sizeof(sztemp),"<EQSL_USER:%d>%s<EQSL_PSWD:%d>%s",
static_cast<int>(progdefaults.eqsl_id.length()),
ucasestr(progdefaults.eqsl_id).c_str(),
static_cast<int>(progdefaults.eqsl_pwd.length()),
progdefaults.eqsl_pwd.c_str());
eQSL_data.append(sztemp);
eQSL_data.append("<PROGRAMID:6>FLDIGI<EOH>");
if (!progdefaults.eqsl_nick.empty()) {
snprintf(sztemp, sizeof(sztemp), "<APP_EQSL_QTH_NICKNAME:%d>%s",
static_cast<int>(progdefaults.eqsl_nick.length()),
progdefaults.eqsl_nick.c_str());
eQSL_data.append(sztemp);
}
putadif(CALL, rec.getField(CALL), eQSL_data);
putadif(ADIF_MODE, adif2export(rec.getField(ADIF_MODE)).c_str(), eQSL_data);
std::string sm = adif2submode(rec.getField(ADIF_MODE));
if (!sm.empty())
putadif(SUBMODE, sm.c_str(), eQSL_data);
tempstr = rec.getField(FREQ);
tempstr.resize(7);
putadif(FREQ, tempstr.c_str(), eQSL_data);
putadif(BAND, rec.getField(BAND), eQSL_data);
putadif(QSO_DATE, sDate_on.c_str(), eQSL_data);
tempstr = rec.getField(TIME_ON);
if (tempstr.length() > 4) tempstr.erase(4);
putadif(TIME_ON, tempstr.c_str(), eQSL_data);
putadif(RST_SENT, rec.getField(RST_SENT), eQSL_data);
size_t p = 0;
if (msg.empty()) msg = progdefaults.eqsl_default_message;
if (!msg.empty()) {
// replace message tags {CALL}, {NAME}, {MODE}
while ((p = msg.find("{CALL}")) != std::string::npos)
msg.replace(p, 6, inpCall->value());
while ((p = msg.find("{NAME}")) != std::string::npos)
msg.replace(p, 6, inpName->value());
while ((p = msg.find("{MODE}")) != std::string::npos) {
tempstr.assign(mode_info[active_modem->get_mode()].export_mode);
sm = mode_info[active_modem->get_mode()].export_submode;
if (!sm.empty())
tempstr.append("/").append(sm);
msg.replace(p, 6, tempstr);
}
snprintf(sztemp, sizeof(sztemp), "<QSLMSG:%d>%s",
static_cast<int>(msg.length()),
msg.c_str());
eQSL_data.append(sztemp);
}
eQSL_data.append("<EOR>\n");
std::string eQSL_header = progdefaults.eqsl_www_url;
EQSL_url.assign(eQSL_header).append(eQSL_data);
tempstr.clear();
for (size_t n = 0; n < eQSL_data.length(); n++) {
if (eQSL_data[n] == ' ' || eQSL_data[n] == '\n') tempstr.append("%20");
else if (eQSL_data[n] == '<') tempstr.append("%3C");
else if (eQSL_data[n] == '>') tempstr.append("%3E");
else if (eQSL_data[n] == '_') tempstr.append("%5F");
else if (eQSL_data[n] == ':') tempstr.append("%3A");
else if (eQSL_data[n] > ' ' && eQSL_data[n] <= '}')
tempstr += eQSL_data[n];
}
eQSL_data = eQSL_header;
eQSL_data.append(tempstr);
sendEQSL(eQSL_data.c_str());
}
void sendEQSL(const char *url)
{
ENSURE_THREAD(FLMAIN_TID);
if (!EQSLthread)
EQSL_init();
pthread_mutex_lock(&EQSLmutex);
SEND_url = url;
pthread_cond_signal(&EQSLcond);
pthread_mutex_unlock(&EQSLmutex);
}
// this function may be called from several places including macro
// expansion and execution
void makeEQSL(const char *message)
{
cQsoRec *rec;
if (qsodb.nbrRecs() <= 0) return;
rec = qsodb.getRec(qsodb.nbrRecs() - 1); // last record
submit_eQSL(*rec, message);
}
| 20,335
|
C++
|
.cxx
| 632
| 29.873418
| 106
| 0.654593
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,183
|
ttybell.cxx
|
w1hkj_fldigi/src/soundcard/ttybell.cxx
|
#define TTY_BELL 4763
int int_tty_bell[TTY_BELL] = {
11038,
10967,
6666,
-770,
-8105,
-12598,
-12110,
-5979,
3074,
10794,
14575,
13438,
6988,
-2753,
-11600,
-16188,
-14064,
-5320,
5905,
14556,
18027,
15203,
6142,
-5782,
-15665,
-19709,
-15366,
-3829,
9261,
18414,
21221,
16206,
4466,
-8909,
-18682,
-21268,
-14642,
-1500,
11613,
19576,
20761,
14413,
2009,
-10999,
-19616,
-20658,
-12646,
892,
13329,
20118,
19936,
12329,
-514,
-12962,
-20327,
-19632,
-10294,
3379,
14898,
20456,
18861,
9976,
-3104,
-14780,
-20794,
-18361,
-7802,
5782,
16237,
20543,
17605,
7557,
-5584,
-16352,
-20977,
-16907,
-5309,
8039,
17382,
20382,
16139,
5192,
-7850,
-17630,
-20742,
-15080,
-2680,
10225,
18377,
19957,
14381,
2774,
-9926,
-18625,
-20172,
-13068,
-273,
11945,
18971,
19278,
12384,
278,
-11888,
-19441,
-19361,
-10848,
2202,
13545,
19366,
18400,
10250,
-2252,
-13700,
-20011,
-18318,
-8545,
4578,
14968,
19539,
17302,
8083,
-4600,
-15251,
-20235,
-17048,
-6299,
6689,
16134,
19463,
15928,
5832,
-6789,
-16573,
-20123,
-15374,
-3875,
8713,
17095,
19169,
14229,
3319,
-8984,
-17751,
-19733,
-13380,
-1279,
10650,
17838,
18632,
12315,
732,
-11077,
-18682,
-19063,
-11229,
1293,
12433,
18368,
17909,
10478,
-1496,
-12710,
-19184,
-18164,
-9195,
3461,
13828,
18594,
16877,
8443,
-3719,
-14259,
-19437,
-16874,
-6917,
5616,
15040,
18619,
15533,
6108,
-6000,
-15685,
-19446,
-15246,
-4405,
7741,
16067,
18417,
13969,
3626,
-8226,
-16913,
-19205,
-13419,
-1866,
9728,
16878,
17970,
12249,
1196,
-10265,
-17829,
-18655,
-11493,
493,
11447,
17426,
17297,
10559,
-831,
-11816,
-18341,
-17858,
-9723,
2381,
12669,
17686,
16343,
8498,
-3140,
-13477,
-18747,
-16599,
-7290,
4745,
14031,
17821,
15087,
6100,
-5549,
-15001,
-18879,
-15064,
-4742,
7001,
15176,
17686,
13627,
3685,
-7796,
-16240,
-18683,
-13364,
-2295,
8993,
16046,
17292,
12098,
1610,
-9549,
-17020,
-18156,
-11710,
-314,
10441,
16532,
16606,
10213,
-723,
-11383,
-17715,
-17238,
-9431,
2156,
12058,
16944,
15713,
8162,
-2979,
-12946,
-18105,
-16069,
-7104,
4476,
13400,
17100,
14568,
5937,
-5299,
-14406,
-18277,
-14833,
-4986,
6380,
14390,
16967,
13350,
3965,
-7155,
-15443,
-18043,
-13276,
-2792,
8212,
15229,
16598,
11727,
1723,
-9078,
-16366,
-17503,
-11349,
-428,
9920,
15863,
15981,
9839,
-638,
-10891,
-17079,
-16697,
-9210,
1937,
11475,
16252,
15203,
7998,
-2734,
-12346,
-17465,
-15807,
-7354,
3824,
12586,
16362,
14216,
6092,
-4782,
-13675,
-17587,
-14547,
-5236,
5787,
13668,
16268,
12874,
3938,
-6800,
-14850,
-17389,
-12889,
-2889,
7693,
14556,
15978,
11345,
1804,
-8584,
-15713,
-16985,
-11221,
-800,
9214,
15101,
15440,
9614,
-483,
-10386,
-16450,
-16284,
-9205,
1541,
10816,
15545,
14709,
7905,
-2474,
-11781,
-16786,
-15325,
-7268,
3529,
12054,
15697,
13666,
5944,
-4506,
-13124,
-16919,
-14101,
-5263,
5324,
13011,
15633,
12440,
3945,
-6355,
-14193,
-16759,
-12514,
-2957,
7218,
13891,
15370,
10912,
1665,
-8305,
-15173,
-16435,
-10900,
-844,
8819,
14488,
14905,
9423,
-304,
-9872,
-15773,
-15777,
-9108,
1241,
10277,
14899,
14133,
7627,
-2375,
-11381,
-16180,
-14822,
-7213,
3139,
11435,
15064,
13134,
5722,
-4300,
-12633,
-16284,
-13509,
-4969,
5178,
12539,
15044,
11839,
3511,
-6378,
-13815,
-16223,
-12086,
-2850,
6936,
13340,
14789,
10513,
1546,
-8075,
-14635,
-15830,
-10457,
-725,
8586,
13982,
14301,
9031,
-326,
-9560,
-15188,
-15159,
-8804,
1122,
9844,
14327,
13519,
7180,
-2428,
-11078,
-15604,
-14101,
-6644,
3297,
11158,
14550,
12531,
5251,
-4384,
-12312,
-15746,
-12959,
-4646,
5101,
12119,
14481,
11334,
3200,
-6356,
-13423,
-15655,
-11617,
-2679,
6769,
12893,
14203,
10032,
1345,
-7945,
-14168,
-15164,
-9931,
-564,
8376,
13525,
13675,
8423,
-625,
-9453,
-14729,
-14458,
-8163,
1368,
9663,
13865,
12939,
6676,
-2573,
-10815,
-15066,
-13448,
-6101,
3458,
10911,
14038,
11932,
4694,
-4623,
-12086,
-15186,
-12309,
-4179,
5207,
11816,
13931,
10817,
2934,
-6260,
-12970,
-14979,
-11006,
-2362,
6704,
12509,
13613,
9457,
1079,
-7824,
-13712,
-14521,
-9405,
-398,
8137,
13046,
13093,
7876,
-888,
-9300,
-14262,
-13763,
-7472,
1754,
9564,
13430,
12358,
6156,
-2802,
-10602,
-14564,
-12896,
-5716,
3506,
10614,
13511,
11406,
4356,
-4660,
-11759,
-14620,
-11775,
-3925,
5121,
11455,
13382,
10251,
2615,
-6229,
-12616,
-14337,
-10281,
-1885,
6756,
12204,
13075,
8852,
730,
-7746,
-13299,
-13892,
-8754,
-32,
8073,
12649,
12531,
7273,
-1251,
-9238,
-13835,
-13241,
-7090,
1814,
9284,
12931,
11832,
5748,
-2952,
-10388,
-14035,
-12295,
-5315,
3582,
10352,
13014,
10875,
4094,
-4562,
-11365,
-13999,
-11139,
-3561,
5101,
11135,
12891,
9734,
2335,
-6128,
-12206,
-13756,
-9671,
-1529,
6709,
11841,
12562,
8301,
344,
-7739,
-12927,
-13317,
-8166,
310,
8012,
12265,
12044,
6904,
-1360,
-9000,
-13319,
-12671,
-6679,
1918,
9086,
12485,
11316,
5428,
-2951,
-10074,
-13492,
-11742,
-5022,
3498,
10014,
12536,
10360,
3744,
-4555,
-11052,
-13450,
-10478,
-3051,
5210,
10882,
12412,
9111,
1801,
-6269,
-11942,
-13232,
-9128,
-1214,
6658,
11476,
12081,
7855,
93,
-7643,
-12504,
-12776,
-7752,
434,
7854,
11852,
11514,
6468,
-1549,
-8874,
-12879,
-12036,
-6141,
2160,
8987,
12117,
10713,
4818,
-3282,
-10032,
-13062,
-10964,
-4220,
3970,
10022,
12169,
9693,
3011,
-4983,
-11030,
-13029,
-9781,
-2394,
5531,
10781,
11997,
8506,
1194,
-6580,
-11830,
-12739,
-8399,
-546,
6990,
11373,
11599,
7204,
-464,
-7903,
-12319,
-12161,
-6914,
1135,
8159,
11721,
10917,
5592,
-2287,
-9204,
-12684,
-11304,
-5170,
2894,
9234,
11894,
10050,
3901,
-3985,
-10256,
-12776,
-10257,
-3395,
4486,
10074,
11833,
9028,
2220,
-5509,
-11057,
-12619,
-9086,
-1719,
5886,
10706,
11567,
7888,
647,
-6817,
-11633,
-12155,
-7655,
44,
7207,
11199,
11069,
6498,
-993,
-8053,
-12049,
-11488,
-6112,
1678,
8268,
11449,
10382,
4985,
-2612,
-9138,
-12276,
-10632,
-4483,
3266,
9185,
11524,
9521,
3420,
-4164,
-10043,
-12277,
-9627,
-2870,
4694,
9912,
11399,
8549,
1916,
-5524,
-10741,
-12048,
-8498,
-1344,
5939,
10453,
11068,
7354,
355,
-6784,
-11272,
-11568,
-7093,
316,
7105,
10839,
10541,
5960,
-1284,
-7960,
-11656,
-10902,
-5570,
1928,
8140,
11071,
9875,
4483,
-2863,
-8999,
-11816,
-9987,
-3868,
3582,
9085,
11127,
9018,
3010,
-4296,
-9811,
-11751,
-9002,
-2397,
4862,
9722,
10919,
7912,
1398,
-5706,
-10531,
-11451,
-7735,
-754,
6121,
10252,
10544,
6630,
-228,
-6951,
-11021,
-10938,
-6299,
884,
7236,
10588,
10006,
5255,
-1810,
-8052,
-11328,
-10253,
-4829,
2435,
8203,
10745,
9295,
3850,
-3273,
-8975,
-11392,
-9392,
-3363,
3801,
8964,
10695,
8379,
2412,
-4616,
-9719,
-11250,
-8298,
-1819,
5081,
9581,
10471,
7260,
852,
-5891,
-10319,
-10887,
-6992,
-183,
6282,
10044,
10101,
6079,
-611,
-6971,
-10714,
-10376,
-5665,
1327,
7307,
10327,
9558,
4797,
-2069,
-7970,
-10926,
-9680,
-4304,
2714,
8157,
10409,
8811,
3464,
-3413,
-8794,
-10931,
-8759,
-2856,
4000,
8839,
10314,
7848,
1988,
-4713,
-9503,
-10743,
-7622,
-1271,
5255,
9400,
10053,
6736,
456,
-5928,
-10037,
-10381,
-6402,
238,
6353,
9791,
9617,
5466,
-1100,
-7083,
-10414,
-9839,
-5112,
1647,
7290,
10005,
9037,
4255,
-2405,
-7969,
-10540,
-9044,
-3674,
3046,
8132,
10043,
8188,
2845,
-3730,
-8721,
-10464,
-8056,
-2190,
4313,
8753,
9901,
7224,
1401,
-4963,
-9334,
-10244,
-6952,
-716,
5447,
9213,
9617,
6167,
-6,
-6068,
-9795,
-9900,
-5833,
647,
6429,
9528,
9194,
5092,
-1283,
-7006,
-10046,
-9288,
-4601,
1920,
7257,
9681,
8534,
3805,
-2585,
-7834,
-10141,
-8495,
-3235,
3186,
7976,
9707,
7737,
2449,
-3839,
-8549,
-10072,
-7540,
-1788,
4418,
8552,
9539,
6785,
1052,
-5025,
-9088,
-9818,
-6514,
-409,
5505,
9011,
9260,
5805,
-245,
-6046,
-9487,
-9406,
-5386,
876,
6420,
9266,
8733,
4615,
-1542,
-6956,
-9699,
-8745,
-4073,
2176,
7202,
9395,
8059,
3314,
-2835,
-7743,
-9750,
-7867,
-2578,
3569,
7962,
9393,
7228,
1948,
-4077,
-8395,
-9625,
-6923,
-1234,
4686,
8465,
9177,
6326,
688,
-5110,
-8845,
-9327,
-5923,
15,
5620,
8811,
8802,
5283,
-559,
-6044,
-9170,
-8817,
-4744,
1293,
6461,
9026,
8255,
4098,
-1824,
-6904,
-9359,
-8164,
-3465,
2551,
7216,
9112,
7588,
2830,
-3067,
-7634,
-9381,
-7373,
-2159,
3721,
7811,
9025,
6799,
1618,
-4156,
-8198,
-9214,
-6496,
-951,
4706,
8251,
8774,
5882,
411,
-5136,
-8612,
-8853,
-5418,
327,
5630,
8575,
8356,
4790,
-863,
-6054,
-8900,
-8325,
-4208,
1607,
6455,
8752,
7803,
3599,
-2119,
-6859,
-9030,
-7646,
-2963,
2811,
7139,
8780,
7135,
2423,
-3264,
-7516,
-9002,
-6887,
-1781,
3860,
7676,
8653,
6324,
1249,
-4290,
-8025,
-8770,
-5931,
-537,
4829,
8090,
8354,
5333,
-5,
-5245,
-8409,
-8367,
-4823,
745,
5717,
8366,
7921,
4232,
-1267,
-6121,
-8650,
-7829,
-3651,
1970,
6482,
8491,
7366,
3107,
-2428,
-6842,
-8716,
-7156,
-2489,
3068,
7088,
8453,
6658,
1997,
-3461,
-7410,
-8590,
-6329,
-1301,
4057,
7570,
8273,
5773,
786,
-4457,
-7876,
-8324,
-5332,
-58,
4996,
7937,
7956,
4766,
-464,
-5373,
-8198,
-7888,
-4223,
1190,
5821,
8151,
7498,
3704,
-1643,
-6167,
-8370,
-7342,
-3126,
2310,
6500,
8221,
6898,
2642,
-2705,
-6799,
-8354,
-6615,
-1989,
3327,
7051,
8136,
6130,
1478,
-3715,
-7337,
-8195,
-5715,
-760,
4304,
7487,
7903,
5201,
260,
-4672,
-7741,
-7872,
-4690,
472,
5182,
7785,
7544,
4209,
-919,
-5507,
-7995,
-7420,
-3648,
1597,
5913,
7932,
7083,
3303,
-1877,
-6127,
-8056,
-6833,
-2634,
2591,
6505,
7947,
6450,
2224,
-2890,
-6722,
-7995,
-6060,
-1471,
3566,
6996,
7826,
5653,
1072,
-3864,
-7195,
-7797,
-5159,
-282,
4486,
7365,
7573,
4767,
-95,
-4758,
-7545,
-7461,
-4201,
850,
5281,
7600,
7188,
3844,
-1154,
-5499,
-7715,
-6968,
-3215,
1859,
5926,
7683,
6638,
2818,
-2161,
-6132,
-7743,
-6298,
-2104,
2863,
6478,
7647,
5933,
1714,
-3153,
-6663,
-7667,
-5559,
-1045,
3742,
6881,
7489,
5139,
575,
-4085,
-7088,
-7430,
-4669,
101,
4593,
7200,
7195,
4280,
-489,
-4878,
-7352,
-7048,
-3743,
1141,
5315,
7380,
6778,
3409,
-1407,
-5498,
-7448,
-6498,
-2734,
2145,
5925,
7439,
6176,
2345,
-2434,
-6108,
-7455,
-5793,
-1613,
3119,
6435,
7368,
5477,
1249,
-3388,
-6584,
-7305,
-4992,
-494,
4012,
6815,
7159,
4687,
179,
-4241,
-6942,
-7034,
-4146,
544,
4787,
7081,
6819,
3808,
-837,
-4988,
-7150,
-6573,
-3158,
1579,
5464,
7209,
6299,
2783,
-1882,
-5655,
-7244,
-5959,
-2065,
2610,
6049,
7232,
5660,
1700,
-2886,
-6214,
-7202,
-5250,
-993,
3517,
6483,
7105,
4946,
668,
-3761,
-6615,
-7000,
-4449,
64,
4347,
6814,
6833,
4121,
-358,
-4548,
-6895,
-6649,
-3580,
1016,
5002,
6995,
6429,
3238,
-1311,
-5189,
-7031,
-6128,
-2574,
2022,
5605,
7075,
5872,
2223,
-2294,
-5765,
-7048,
-5493,
-1520,
2965,
6106,
7018,
5239,
1218,
-3183,
-6217,
-6930,
-4796,
-541,
3764,
6454,
6828,
4537,
294,
-3924,
-6516,
-6660,
-4004,
393,
4455,
6680,
6494,
3694,
-657,
-4609,
-6709,
-6232,
-3081,
1362,
5062,
6816,
6033,
2778,
-1618,
-5211,
-6807,
-5706,
-2113,
2283,
5593,
6828,
5498,
1831,
-2504,
-5709,
-6771,
-5100,
-1168,
3123,
6003,
6731,
4874,
925,
-3277,
-6071,
-6592,
-4401,
-258,
3837,
6311,
6492,
4130,
3,
-3985,
-6346,
-6279,
-3562,
690,
4499,
6509,
6133,
3274,
-946,
-4632,
-6526,
-5849,
-2655,
1645,
5083,
6616,
5684,
2375,
-1856,
-5196,
-6569,
-5329,
-1736,
2502,
5559,
6587,
5144,
1504,
-2667,
-5623,
-6483,
-4710,
-848,
3251,
5927,
6445,
4485,
608,
-3398,
-5955,
-6262,
-3956,
81,
3946,
6194,
6172,
3699,
-338,
-4084,
-6197,
-5914,
-3107,
1030,
4581,
6358,
5806,
2846,
-1251,
-4691,
-6322,
-5477,
-2231,
1906,
5100,
6404,
5336,
2004,
-2076,
-5162,
-6307,
-4948,
-1382,
2666,
5510,
6327,
4761,
1154,
-2814,
-5549,
-6165,
-4264,
-477,
3395,
5831,
6139,
4046,
239,
-3525,
-5848,
-5913,
-3495,
451,
4052,
6060,
5847,
3260,
-670,
-4174,
-6029,
-5556,
-2668,
1335,
4625,
6177,
5488,
2542,
-1427,
-4637,
-6076,
-5123,
-1902,
2083,
5069,
6174,
5011,
1747,
-2176,
-5074,
-6028,
-4547,
-1045,
2821,
5442,
6071,
4401,
876,
-2892,
-5425,
-5872,
-3865,
-151,
3503,
5723,
5867,
3696,
-9,
-3570,
-5679,
-5604,
-3110,
730,
4122,
5905,
5574,
2966,
-854,
-4148,
-5823,
-5243,
-2359,
1517,
4619,
5971,
5161,
2214,
-1612,
-4624,
-5845,
-4746,
-1556,
2261,
5032,
5938,
4626,
1383,
-2356,
-5017,
-5756,
-4129,
-686,
2966,
5361,
5806,
4003,
512,
-3047,
-5342,
-5572,
-3451,
192,
3620,
5602,
5578,
3322,
-314,
-3658,
-5536,
-5292,
-2750,
982,
4162,
5728,
5240,
2620,
-1065,
-4163,
-5617,
-4889,
-1998,
1724,
4621,
5770,
4792,
1845,
-1816,
-4612,
-5621,
-4354,
-1171,
2449,
5000,
5707,
4239,
1006,
-2528,
-4970,
-5503,
-3735,
-325,
3128,
5278,
5545,
3626,
193,
-3170,
-5236,
-5293,
-3094,
467,
3701,
5476,
5286,
2981,
-570,
-3720,
-5386,
-4968,
-2391,
1214,
4202,
5568,
4920,
2256,
-1307,
-4191,
-5439,
-4512,
-1613,
1951,
4611,
5568,
4421,
1454,
-2042,
-4594,
-5410,
-4013,
-859,
2587,
4917,
5480,
3930,
729,
-2636,
-4873,
-5263,
-3450,
-90,
3183,
5165,
5305,
3352,
-15,
-3217,
-5082,
-5027,
-2816,
641,
3709,
5314,
5013,
2683,
-748,
-3725,
-5206,
-4659,
-2084,
1385,
4171,
5385,
4600,
1931,
-1489,
-4171,
-5243,
-4197,
-1301,
2100,
4568,
5365,
4126,
1151,
-2185,
-4542,
-5177,
-3667,
-525,
2750,
4866,
5251,
3592,
418,
-2783,
-4799,
-5003,
-3101,
192,
3301,
5060,
5017,
2976,
-300,
-3316,
-4961,
-4707,
-2419,
923,
3782,
5176,
4679,
2288,
-1033,
-3785,
-5054,
-4316,
-1683,
1645,
4203,
5217,
4270,
1546,
-1732,
-4188,
-5045,
-3848,
-927,
2310,
4543,
5156,
3821,
885,
-2297,
-4451,
-4926,
-3347,
-258,
2862,
4778,
4999,
3294,
200,
-2838,
-4677,
-4703,
-2743,
460,
3363,
4939,
4736,
2650,
-516,
-3341,
-4817,
-4395,
-2054,
1169,
3824,
5031,
4396,
1969,
-1220,
-3777,
-4871,
-3997,
-1343,
1840,
4197,
5032,
3987,
1283,
-1859,
-4127,
-4837,
-3587,
-728,
2367,
4450,
4921,
3524,
627,
-2408,
-4386,
-4685,
-3044,
-40,
2908,
4661,
4734,
2936,
-88,
-2943,
-4583,
-4441,
-2411,
690,
3404,
4807,
4455,
2286,
-789,
-3411,
-4691,
-4121,
-1740,
1369,
3827,
4869,
4113,
1621,
-1446,
-3800,
-4703,
-3723,
-1077,
1971,
4148,
4827,
3720,
1041,
-1966,
-4069,
-4613,
-3254,
-441,
2512,
4393,
4707,
3199,
366,
-2510,
-4301,
-4433,
-2677,
263,
3021,
4583,
4490,
2607,
-330,
-3004,
-4457,
-4169,
-2050,
941,
3471,
4680,
4205,
1996,
-988,
-3423,
-4533,
-3837,
-1431,
1562,
3834,
4693,
3846,
1385,
-1572,
-3762,
-4509,
-3427,
-805,
2124,
4124,
4628,
3383,
726,
-2129,
-4041,
-4395,
-2948,
-174,
2602,
4323,
4465,
2850,
55,
-2646,
-4241,
-4204,
-2367,
506,
3091,
4474,
4236,
2272,
-607,
-3091,
-4360,
-3928,
-1773,
1141,
3486,
4533,
3933,
1682,
-1202,
-3462,
-4379,
-3566,
-1169,
1706,
3809,
4516,
3555,
1112,
-1708,
-3730,
-4306,
-3119,
-538,
2232,
4060,
4423,
3078,
459,
-2238,
-3976,
-4169,
-2595,
137,
2730,
4255,
4245,
2550,
-193,
-2703,
-4142,
-3953,
-2048,
760,
3158,
4363,
3998,
2000,
-786,
-3110,
-4213,
-3659,
-1490,
1320,
3499,
4381,
3655,
1419,
-1346,
-3439,
-4196,
-3264,
-869,
1867,
3792,
4331,
3232,
786,
-1882,
-3717,
-4116,
-2823,
-273,
2331,
3990,
4200,
2756,
155,
-2374,
-3918,
-3962,
-2303,
370,
2809,
4154,
4023,
2267,
-416,
-2785,
-4040,
-3726,
-1791,
941,
3195,
4239,
3743,
1716,
-999,
-3162,
-4091,
-3385,
-1189,
1513,
3528,
4243,
3373,
1110,
-1550,
-3471,
-4057,
-2966,
-551,
2054,
3806,
4177,
2935,
465,
-2078,
-3731,
-3946,
-2487,
86,
2550,
3998,
4031,
2443,
-151,
-2541,
-3894,
-3756,
-1977,
667,
2965,
4114,
3800,
1922,
-714,
-2938,
-3973,
-3463,
-1417,
1233,
3309,
4146,
3454,
1339,
-1275,
-3263,
-3975,
-3079,
-807,
1770,
3595,
4109,
3057,
722,
-1794,
-3527,
-3897,
-2639,
-197,
2267,
3808,
3991,
2607,
130,
-2259,
-3712,
-3754,
-2214,
317,
2640,
3925,
3818,
2186,
-346,
-2603,
-3801,
-3522,
-1728,
845,
2990,
3993,
3552,
1655,
-891,
-2953,
-3849,
-3205,
-1153,
1382,
3305,
4000,
3198,
1067,
-1424,
-3246,
-3821,
-2816,
-565,
1894,
3548,
3935,
2803,
491,
-1902,
-3471,
-3715,
-2394,
2,
2337,
3722,
3793,
2370,
-49,
-2310,
-3619,
-3530,
-1932,
531,
2706,
3825,
3567,
1865,
-583,
-2681,
-3701,
-3260,
-1397,
1070,
3041,
3881,
3289,
1364,
-1076,
-2969,
-3716,
-2957,
-896,
1528,
3283,
3849,
2953,
824,
-1562,
-3220,
-3670,
-2584,
-349,
1990,
3494,
3759,
2571,
300,
-1985,
-3403,
-3538,
-2169,
168,
2383,
3636,
3590,
2115,
-233,
-2366,
-3527,
-3314,
-1675,
706,
2736,
3723,
3340,
1598,
-763,
-2714,
-3586,
-3030,
-1141,
1220,
3039,
3740,
3033,
1063,
-1267,
-2995,
-3572,
-2694,
-609,
1694,
3276,
3694,
2717,
597,
-1665,
-3179,
-3482,
-2324,
-119,
2095,
3441,
3567,
2314,
88,
-2060,
-3336,
-3329,
-1914,
353,
2425,
3547,
3381,
1851,
-420,
-2421,
-3440,
-3106,
-1427,
867,
2761,
3615,
3133,
1349,
-929,
-2725,
-3466,
-2813,
-919,
1353,
3022,
3599,
2824,
849,
-1386,
-2967,
-3426,
-2493,
-444,
1767,
3232,
3521,
2481,
379,
-1772,
-3148,
-3311,
-2099,
47,
2140,
3364,
3376,
2053,
-117,
-2134,
-3275,
-3134,
-1657,
552,
2479,
3459,
3176,
1601,
-608,
-2455,
-3344,
-2908,
-1193,
1020,
2770,
3486,
2924,
1134,
-1054,
-2721,
-3338,
-2629,
-741,
1431,
2988,
3452,
2624,
679,
-1453,
-2925,
-3274,
-2287,
-276,
1819,
3161,
3365,
2255,
206,
-1829,
-3087,
-3148,
-1884,
218,
2174,
3289,
3201,
1827,
-286,
-2169,
-3189,
-2960,
-1451,
693,
2490,
3356,
2993,
1392,
-736,
-2453,
-3220,
-2729,
-1014,
1109,
2739,
3359,
2737,
964,
-1142,
-2692,
-3200,
-2435,
-580,
1501,
2944,
3301,
2405,
496,
-1530,
-2884,
-3119,
-2069,
-104,
1871,
3096,
3194,
2029,
26,
-1890,
-3025,
-2991,
-1683,
356,
2200,
3192,
3029,
1637,
-423,
-2188,
-3098,
-2794,
-1284,
788,
2482,
3240,
2824,
1229,
-832,
-2444,
-3108,
-2551,
-871,
1178,
2696,
3217,
2538,
789,
-1217,
-2658,
-3069,
-2233,
-407,
1567,
2895,
3165,
2201,
323,
-1602,
-2834,
-2979,
-1868,
57,
1924,
3029,
3040,
1828,
-129,
-1929,
-2947,
-2831,
-1502,
491,
2228,
3108,
2881,
1482,
-500,
-2172,
-2985,
-2632,
-1119,
871,
2463,
3124,
2646,
1077,
-890,
-2407,
-2983,
-2360,
-692,
1258,
2674,
3095,
2361,
631,
-1275,
-2614,
-2940,
-2047,
-246,
1627,
2831,
3028,
2035,
196,
-1623,
-2763,
-2840,
-1708,
182,
1954,
2941,
2906,
1683,
-213,
-1919,
-2845,
-2681,
-1349,
576,
2212,
3004,
2712,
1317,
-606,
-2179,
-2890,
-2463,
-950,
966,
2444,
3021,
2460,
894,
-996,
-2401,
-2885,
-2184,
-524,
1341,
2634,
2978,
2171,
459,
-1354,
-2579,
-2821,
-1880,
-103,
1677,
2776,
2893,
1863,
56,
-1665,
-2698,
-2705,
-1556,
281,
1950,
2864,
2736,
1523,
-328,
-1939,
-2771,
-2521,
-1185,
672,
2207,
2903,
2536,
1123,
-716,
-2182,
-2793,
-2291,
-783,
1047,
2420,
2907,
2290,
719,
-1085,
-2381,
-2778,
-2021,
-378,
1405,
2591,
2852,
2012,
314,
-1411,
-2537,
-2697,
-1735,
2,
1693,
2710,
2744,
1707,
-58,
-1694,
-2638,
-2558,
-1398,
386,
1962,
2782,
2577,
1340,
-441,
-1952,
-2690,
-2360,
-1015,
774,
2196,
2806,
2369,
943,
-819,
-2180,
-2706,
-2128,
-626,
1132,
2394,
2794,
2122,
559,
-1163,
-2357,
-2661,
-1873,
-254,
1444,
2533,
2717,
1847,
193,
-1462,
-2481,
-2566,
-1573,
121,
1719,
2638,
2588,
1518,
-189,
-1724,
-2560,
-2401,
-1221,
502,
1965,
2695,
2418,
1149,
-561,
-1968,
-2608,
-2211,
-852,
865,
2189,
2702,
2210,
778,
-912,
-2167,
-2601,
-1985,
-489,
1190,
2354,
2669,
1964,
427,
-1217,
-2314,
-2544,
-1719,
-139,
1474,
2480,
2578,
1670,
62,
-1499,
-2424,
-2422,
-1397,
241,
1741,
2564,
2441,
1336,
-323,
-1758,
-2503,
-2266,
-1050,
614,
1978,
2611,
2264,
987,
-674,
-1967,
-2525,
-2072,
-703,
939,
2170,
2604,
2060,
648,
-982,
-2143,
-2497,
-1843,
-365,
1237,
2314,
2547,
1794,
289,
-1275,
-2275,
-2416,
-1550,
-5,
1516,
2421,
2452,
1490,
-72,
-1539,
-2372,
-2290,
-1231,
360,
1761,
2493,
2303,
1166,
-435,
-1772,
-2430,
-2131,
-916,
699,
1966,
2521,
2131,
849,
-744,
-1961,
-2433,
-1938,
-597,
995,
2137,
2491,
1905,
512,
-1043,
-2118,
-2385,
-1689,
-237,
1277,
2273,
2423,
1634,
151,
-1320,
-2239,
-2295,
-1396,
130,
1547,
2370,
2314,
1322,
-216,
-1582,
-2325,
-2169,
-1076,
480,
1793,
2425,
2174,
1008,
-549,
-1801,
-2364,
-1998,
-765,
797,
1982,
2434,
1974,
677,
-860,
-1984,
-2346,
-1769,
-415,
1103,
2143,
2399,
1721,
323,
-1161,
-2129,
-2291,
-1500,
-52,
1386,
2268,
2318,
1440,
-48,
-1431,
-2239,
-2185,
-1204,
300,
1644,
2343,
2200,
1137,
-384,
-1667,
-2292,
-2046,
-899,
620,
1849,
2375,
2025,
834,
-688,
-1846,
-2304,
-1839,
-587,
917,
2008,
2356,
1808,
495,
-974,
-2004,
-2265,
-1607,
-245,
1198,
2139,
2302,
1553,
155,
-1242,
-2117,
-2188,
-1350,
93,
1446,
2236,
2210,
1283,
-173,
-1481,
-2195,
-2078,
-1073,
399,
1652,
2284,
2073,
999,
-473,
-1678,
-2224,
-1912,
-770,
691,
1837,
2287,
1884,
684,
-755,
-1845,
-2213,
-1704,
-448,
982,
1979,
2267,
1667,
382,
-1013,
-1963,
-2171,
-1472,
-132,
1236,
2095,
2201,
1433,
62,
-1262,
-2067,
-2092,
-1225,
174,
1462,
2170,
2098,
1176,
-234,
-1473,
-2129,
-1962,
-950,
464,
1653,
2204,
1945,
883,
-530,
-1660,
-2149,
-1789,
-647,
752,
1817,
2203,
1751,
568,
-807,
-1819,
-2132,
-1583,
-336,
1032,
1954,
2173,
1534,
254,
-1072,
-1936,
-2085,
-1370,
-59,
1237,
2035,
2091,
1308,
-29,
-1289,
-2017,
-1995,
-1125,
224,
1450,
2094,
1973,
1038,
-314,
-1483,
-2062,
-1845,
-845,
516,
1628,
2123,
1819,
746,
-598,
-1657,
-2084,
-1677,
-546,
794,
1788,
2118,
1627,
446,
-870,
-1798,
-2056,
-1474,
-254,
1051,
1906,
2074,
1418,
160,
-1105,
-1894,
-1991,
-1251,
23,
1266,
1989,
1985,
1179,
-120,
-1312,
-1966,
-1871,
-996,
316,
1456,
2034,
1848,
895,
-410,
-1498,
-2004,
-1730,
-714,
598,
1627,
2054,
1686,
612,
-686,
-1651,
-2003,
-1553,
-428,
856,
1764,
2033,
1505,
336,
-922,
-1771,
-1962,
-1356,
-157,
1080,
1865,
1969,
1289,
55,
-1139,
-1862,
-1879,
-1122,
126,
1286,
1932,
1863,
1030,
-229,
-1335,
-1917,
-1757,
-857,
410,
1469,
1974,
1726,
759,
-507,
-1506,
-1945,
-1610,
-585,
671,
1623,
1978,
1571,
495,
-755,
-1642,
-1927,
-1441,
-323,
901,
1740,
1935,
1380,
226,
-969,
-1745,
-1866,
-1231,
-56,
1111,
1825,
1862,
1148,
-46,
-1170,
-1822,
-1773,
-994,
219,
1304,
1882,
1754,
891,
-324,
-1363,
-1866,
-1656,
-729,
493,
1476,
1909,
1621,
640,
-581,
-1509,
-1874,
-1505,
-481,
720,
1604,
1894,
1452,
388,
-802,
-1623,
-1846,
-1320,
-229,
940,
1710,
1846,
1248,
123,
-1014,
-1721,
-1779,
-1107,
44,
1146,
1788,
1770,
1016,
-151,
-1211,
-1786,
-1680,
-865,
312,
1321,
1835,
1666,
794,
-381,
-1358,
-1808,
-1566,
-629,
550,
1467,
1846,
1525,
561,
-612,
-1487,
-1801,
-1407,
-388,
765,
1585,
1814,
1346,
300,
-827,
-1595,
-1758,
-1213,
-132,
969,
1674,
1766,
1134,
37,
-1032,
-1674,
-1690,
-989,
133,
1162,
1744,
1675,
912,
-221,
-1213,
-1729,
-1593,
-769,
372,
1325,
1767,
1564,
690,
-445,
-1355,
-1740,
-1463,
-540,
590,
1450,
1765,
1407,
446,
-667,
-1479,
-1727,
-1292,
-293,
803,
1559,
1732,
1223,
194,
-875,
-1578,
-1678,
-1096,
-31,
1008,
1641,
1671,
1015,
-59,
-1064,
-1644,
-1604,
-889,
208,
1178,
1689,
1582,
803,
-290,
-1224,
-1680,
-1500,
-673,
426,
1317,
1708,
1452,
585,
-508,
-1357,
-1682,
-1355,
-438,
641,
1433,
1693,
1289,
339,
-719,
-1470,
-1662,
-1194,
-209,
831,
1523,
1649,
1106,
94,
-916,
-1553,
-1611,
-1007,
30,
1012,
1590,
1580,
920,
-138,
-1081,
-1607,
-1523,
-813,
253,
1168,
1631,
1476,
710,
-362,
-1229,
-1623,
-1406,
-584,
465,
1301,
1637,
1346,
475,
-571,
-1355,
-1627,
-1256,
-351,
676,
1407,
1621,
1178,
241,
-768,
-1447,
-1597,
-1095,
-120,
861,
1495,
1574,
1012,
20,
-943,
-1517,
-1535,
-925,
96,
1026,
1553,
1494,
820,
-200,
-1093,
-1553,
-1432,
-714,
310,
1167,
1574,
1374,
601,
-414,
-1227,
-1569,
-1307,
-486,
520,
1295,
1576,
1244,
372,
-617,
-1345,
-1565,
-1158,
-259,
721,
1392,
1553,
1075,
147,
-812,
-1436,
-1523,
-1001,
-41,
896,
1468,
1504,
924,
-34,
-956,
-1476,
-1450,
-819,
161,
1041,
1521,
1418,
735,
-258,
-1100,
-1519,
-1347,
-607,
374,
1174,
1530,
1298,
514,
-467,
-1224,
-1522,
-1217,
-388,
577,
1285,
1517,
1154,
294,
-655,
-1326,
-1494,
-1083,
-182,
744,
1363,
1487,
1000,
97,
-821,
-1390,
-1450,
-919,
16,
907,
1427,
1419,
818,
-118,
-978,
-1440,
-1370,
-715,
228,
1054,
1466,
1324,
622,
-328,
-1111,
-1469,
-1259,
-509,
430,
1173,
1474,
1201,
414,
-520,
-1219,
-1462,
-1132,
-308,
612,
1261,
1448,
1063,
218,
-689,
-1303,
-1426,
-986,
-117,
778,
1333,
1412,
900,
19,
-859,
-1366,
-1372,
-805,
98,
929,
1385,
1322,
710,
-195,
-994,
-1407,
-1288,
-621,
298,
1056,
1415,
1227,
515,
-401,
-1121,
-1428,
-1173,
-419,
495,
1171,
1413,
1109,
328,
-581,
-1219,
-1412,
-1050,
-238,
653,
1260,
1394,
984,
142,
-740,
-1304,
-1373,
-884,
-24,
819,
1308,
1320,
793,
-78,
-886,
-1353,
-1307,
-721,
162,
940,
1344,
1246,
609,
-260,
-1002,
-1366,
-1220,
-554,
333,
1050,
1364,
1154,
444,
-437,
-1107,
-1376,
-1112,
-375,
508,
1143,
1351,
1020,
252,
-605,
-1194,
-1343,
-966,
-183,
663,
1211,
1310,
877,
59,
-754,
-1260,
-1296,
-810,
19,
803,
1269,
1247,
714,
-136,
-898,
-1312,
-1234,
-642,
213,
944,
1305,
1173,
538,
-320,
-1013,
-1331,
-1146,
-480,
380,
1046,
1308,
1070,
363,
-482,
-1107,
-1319,
-1020,
-292,
542,
1130,
1288,
940,
189,
-620,
-1171,
-1283,
-880,
-105,
692,
1186,
1249,
793,
-4,
-775,
-1230,
-1236,
-729,
86,
829,
1239,
1186,
640,
-185,
-893,
-1266,
-1159,
-573,
257,
937,
1255,
1098,
473,
-345,
-996,
-1271,
-1064,
-400,
413,
1036,
1253,
988,
296,
-509,
-1085,
-1260,
-939,
-214,
569,
1117,
1223,
862,
109,
-655,
-1158,
-1227,
-802,
-32,
716,
1167,
1189,
711,
-68,
-790,
-1207,
-1172,
-660,
137,
839,
1202,
1120,
564,
-235,
-904,
-1229,
-1090,
-494,
300,
942,
1217,
1019,
395,
-398,
-1000,
-1227,
-983,
-318,
464,
1028,
1208,
902,
214,
-553,
-1079,
-1213,
-861,
-140,
607,
1095,
1174,
777,
40,
-691,
-1137,
-1174,
-727,
30,
734,
1140,
1118,
644,
-121,
-803,
-1170,
-1104,
-585,
186,
840,
1167,
1040,
484,
-284,
-914,
-1189,
-1019,
-417,
348,
940,
1167,
944,
314,
-444,
-998,
-1185,
-909,
-243,
496,
1013,
1149,
829,
137,
-585,
-1069,
-1163,
-789,
-79,
632,
1071,
1115,
702,
-16,
-711,
-1112,
-1122,
-668,
60,
733,
1104,
1055,
565,
-172,
-816,
-1140,
-1047,
-515,
218,
840,
1119,
975,
404,
-331,
-911,
-1155,
-953,
-357,
376,
925,
1122,
877,
240,
-480,
-992,
-1143,
-846,
-190,
514,
994,
1101,
768,
84,
-608,
-1056,
-1111,
-734,
-41,
643,
1039,
1063,
642,
-51,
-715,
-1087,
-1052,
-597,
115,
742,
1075,
993,
497,
-215,
-816,
-1107,
-981,
-441,
265,
841,
1091,
909,
345,
-371,
-904,
-1113,
-891,
-288,
409,
916,
1075,
814,
190,
-495,
-974,
-1090,
-787,
-141,
535,
974,
1049,
701,
43,
-618,
-1019,
-1050,
-662,
17,
650,
1022,
999,
564,
-114,
-731,
-1057,
-993,
-520,
166,
755,
1042,
933,
420,
-267,
-822,
-1077,
-915,
-372,
315,
839,
1049,
844,
273,
-411,
-902,
-1070,
-823,
-230,
442,
908,
1032,
749,
132,
-524,
-959,
-1045,
-715,
-87,
560,
956,
992,
628,
-22,
-637,
-1006,
-999,
-587,
66,
668,
992,
940,
493,
-170,
-736,
-1029,
-933,
-451,
214,
756,
1009,
873,
349,
-305,
-827,
-1035,
-856,
-311,
346,
832,
1001,
785,
216,
-433,
-889,
-1023,
-760,
-172,
468,
888,
980,
672,
70,
-549,
-943,
-988,
-642,
-25,
574,
939,
937,
557,
-75,
-656,
-982,
-943,
-516,
121,
678,
962,
879,
424,
-218,
-750,
-998,
-881,
-388,
255,
758,
974,
808,
295,
-340,
-824,
-992,
-801,
-252,
374,
826,
960,
717,
155,
-463,
-883,
-982,
-701,
-129,
476,
873,
932,
614,
13,
-570,
-929,
-946,
-585,
19,
579,
913,
891,
502,
-113,
-659,
-951,
-900,
-470,
151,
673,
932,
838,
382,
-239,
-738,
-967,
-831,
-351,
268,
745,
931,
757,
251,
-360,
-810,
-958,
-745,
-212,
387,
807,
919,
660,
115,
-473,
-864,
-938,
-640,
-74,
501,
854,
887,
556,
-27,
-576,
-903,
-901,
-531,
62,
594,
885,
845,
444,
-147,
-668,
-925,
-856,
-417,
174,
675,
896,
782,
326,
-274,
-740,
-935,
-771,
-295,
303,
747,
895,
698,
189,
-392,
-806,
-925,
-679,
-157,
418,
793,
875,
599,
49,
-495,
-860,
-893,
-586,
-23,
516,
837,
844,
500,
-75,
-592,
-882,
-858,
-480,
95,
601,
857,
798,
385,
-188,
-675,
-897,
-796,
-357,
214,
676,
861,
722,
254,
-308,
-744,
-897,
-714,
-226,
332,
741,
861,
640,
130,
-422,
-799,
-885,
-632,
-102,
439,
789,
840,
547,
5,
-521,
-840,
-856,
-533,
16,
529,
814,
803,
441,
-110,
-603,
-860,
-806,
-422,
136,
611,
830,
740,
323,
-230,
-678,
-874,
-741,
-299,
254,
679,
836,
662,
201,
-352,
-740,
-870,
-660,
-174,
368,
728,
829,
577,
79,
-447,
-787,
-847,
-575,
-57,
456,
770,
799,
486,
-32,
-532,
-819,
-812,
-487,
48,
526,
797,
755,
392,
-134,
-609,
-831,
-766,
-374,
157,
606,
804,
698,
274,
-246,
-674,
-836,
-696,
-259,
271,
666,
807,
623,
161,
-356,
-728,
-825,
-621,
-138,
369,
713,
789,
539,
50,
-447,
-761,
-805,
-529,
-38,
459,
742,
758,
446,
-64,
-531,
-795,
-762,
-430,
82,
535,
768,
704,
339,
-180,
-604,
-814,
-710,
-320,
197,
609,
779,
647,
226,
-282,
-673,
-809,
-647,
-207,
298,
657,
771,
570,
116,
-383,
-718,
-791,
-569,
-98,
389,
692,
747,
497,
39,
-436,
-728,
-769,
-514,
-50,
402,
695,
713,
458,
-4,
-446,
-727,
-743,
-471,
-17,
424,
690,
698,
419,
-38,
-471,
-730,
-726,
-441,
14,
448,
694,
685,
393,
-65,
-495,
-735,
-713,
-421,
47,
466,
706,
668,
369,
-97,
-519,
-741,
-704,
-390,
80,
496,
714,
666,
334,
-133,
-554,
-754,
-702,
-358,
123,
530,
735,
663,
300,
-193,
-594,
-775,
-670,
-289,
213,
580,
746,
604,
198,
-290,
-650,
-774,
-611,
-185,
298,
637,
727,
535,
92,
-379,
-693,
-756,
-527,
-76,
386,
680,
706,
445,
-16,
-463,
-724,
-727,
-436,
35,
461,
703,
668,
350,
-126,
-536,
-746,
-684,
-343,
139,
529,
716,
622,
255,
-227,
-599,
-755,
-625,
-248,
237,
581,
714,
555,
151,
-316,
-647,
-744,
-556,
-142,
321,
631,
698,
480,
49,
-400,
-687,
-722,
-478,
-33,
401,
664,
672,
398,
-49,
-472,
-709,
-689,
-392,
70,
466,
684,
630,
312,
-152,
-532,
-728,
-647,
-313,
154,
522,
690,
589,
219,
-234,
-596,
-726,
-592,
-213,
242,
571,
683,
518,
120,
-321,
-639,
-710,
-525,
-106,
324,
618,
665,
440,
15,
-407,
-670,
-694,
-440,
-6,
403,
644,
638,
355,
-78,
-478,
-695,
-659,
-361,
88,
466,
662,
595,
275,
-175,
-535,
-704,
-609,
-268,
175,
524,
663,
537,
178,
-265,
-589,
-702,
-544,
-171,
266,
565,
657,
467,
73,
-344,
-635,
-687,
-477,
-63,
345,
607,
632,
398,
-21,
-421,
-659,
-664,
-398,
25,
413,
624,
602,
314,
-115,
-482,
-678,
-622,
-320,
116,
467,
640,
549,
226,
-203,
-538,
-681,
-563,
-220,
202,
520,
636,
491,
132,
-288,
-583,
-674,
-498,
-124,
287,
558,
620,
423,
37,
-364,
-617,
-654,
-431,
-30,
359,
590,
600,
356,
-55,
-430,
-644,
-621,
-356,
60,
415,
607,
560,
275,
-139,
-485,
-654,
-576,
-262,
141,
478,
609,
510,
180,
-226,
-536,
-653,
-522,
-171,
229,
518,
609,
447,
89,
-309,
-577,
-645,
-460,
-70,
1,
-3,
3,
-2,
1,
0,
-1,
0,
0,
1,
0,
0,
0,
-2,
3,
-3,
2,
0,
-2,
3,
-2,
1,
0,
0,
-2,
3,
-4,
5,
-5,
4,
-3,
3,
-3,
3,
-3,
3,
-3,
2,
-1,
1,
-1,
2,
-3,
2,
-1,
0,
1,
0,
-2,
3,
-3,
2,
0,
-2,
3,
-2,
0,
2,
-3,
3,
-3,
3,
-2,
1,
0,
-1,
0,
3,
-5,
5,
-4,
2,
0,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
-1,
1,
0,
-1,
1,
-1,
2,
-2,
1,
-1,
1,
0,
1,
-3,
3,
-3,
3,
-2,
2,
-3,
3,
-3,
3,
-3,
3,
-3,
3,
-3,
3,
-2,
1,
-1,
1,
0,
-1,
1,
0,
-1,
2,
-2,
1,
};
| 29,533
|
C++
|
.cxx
| 4,766
| 5.196391
| 30
| 0.71154
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,184
|
doesnot.cxx
|
w1hkj_fldigi/src/soundcard/doesnot.cxx
|
#define DOESNOT_SIZE 9927
int int_audio_doesnot[DOESNOT_SIZE] = {
14,
-241,
-5,
-258,
42,
-392,
-407,
-1046,
-825,
269,
-648,
178,
-355,
907,
59,
-37,
-472,
-353,
300,
1445,
3439,
2079,
2224,
-242,
-158,
499,
-196,
649,
1672,
2503,
988,
967,
1144,
-164,
1398,
894,
114,
674,
-163,
-1479,
-1924,
-248,
-585,
1087,
2381,
1989,
1095,
376,
520,
405,
2273,
1822,
1640,
2522,
2459,
1480,
540,
1235,
1166,
1269,
2486,
1911,
1667,
2252,
1997,
2669,
3137,
2966,
1354,
847,
329,
-481,
-375,
193,
0,
-871,
-350,
-525,
-772,
-584,
-1065,
-1670,
-844,
-904,
-1601,
-670,
-232,
-1413,
-1318,
-1240,
-1598,
-1304,
-589,
-222,
175,
217,
40,
-304,
-1641,
-1863,
-2343,
-2660,
-3049,
-2758,
-3211,
-3236,
-2722,
-2509,
-1628,
-1999,
-2667,
-2943,
-2782,
-2295,
-1572,
-761,
-268,
-493,
-629,
-776,
-376,
-99,
423,
1411,
883,
759,
577,
-421,
110,
432,
636,
2104,
2917,
3169,
3581,
2002,
-269,
441,
-502,
787,
2638,
1444,
3067,
1699,
121,
-278,
-308,
-53,
270,
2146,
569,
-268,
204,
-289,
-349,
72,
9,
-723,
8,
-1221,
-2370,
-1181,
-275,
76,
1105,
1911,
760,
-396,
-810,
-1880,
-1723,
-236,
-608,
-1970,
-3173,
-2514,
-3390,
-1731,
-9,
-648,
219,
-48,
-126,
-538,
678,
605,
627,
1077,
1200,
596,
-181,
738,
1063,
2000,
2538,
2195,
1350,
133,
732,
463,
709,
1606,
114,
1203,
1606,
2109,
1541,
2139,
1083,
-141,
1770,
-202,
1655,
1795,
998,
980,
113,
232,
-622,
-572,
-1708,
-1115,
432,
-78,
229,
144,
-267,
48,
838,
1430,
1204,
1543,
507,
-645,
-716,
-738,
-314,
-406,
-1332,
-1581,
-1432,
-1598,
-1660,
-919,
-941,
-1050,
-502,
102,
-545,
-276,
-24,
-541,
226,
497,
487,
-143,
464,
-679,
-634,
744,
1722,
2082,
2114,
1267,
-333,
125,
208,
943,
2506,
2101,
1341,
599,
-106,
377,
349,
1692,
156,
183,
-537,
-2332,
-1384,
-1044,
0,
-562,
-613,
-385,
236,
1100,
545,
310,
417,
-56,
147,
86,
-19,
-95,
-301,
73,
-81,
-90,
-182,
-35,
-365,
-805,
-339,
208,
541,
229,
-105,
-638,
-748,
-311,
-36,
317,
42,
-680,
-736,
367,
2191,
2396,
2214,
2532,
1635,
1590,
2025,
2356,
2541,
1747,
1043,
1333,
1861,
2333,
2507,
2317,
1824,
1323,
1395,
1367,
1363,
318,
-333,
-9,
40,
471,
229,
-94,
-490,
-718,
-885,
-1417,
-1599,
-1914,
-1823,
-1601,
-1500,
-1471,
-1657,
-1556,
-1537,
-1986,
-1438,
-855,
-517,
-340,
-998,
-930,
-1227,
-1543,
-1966,
-1996,
-2052,
-2383,
-1771,
-1527,
-758,
-1345,
-2683,
-2573,
-2809,
-1649,
-486,
295,
84,
216,
314,
-898,
-614,
468,
1258,
64,
2336,
717,
327,
3112,
1614,
2994,
3352,
2962,
1139,
469,
185,
-838,
1214,
2334,
1325,
1470,
1706,
590,
1160,
2825,
1985,
1322,
1331,
265,
-237,
118,
654,
-723,
-66,
-521,
-1453,
-489,
-535,
-495,
-613,
259,
-1250,
-869,
-224,
-496,
936,
281,
721,
-1618,
-1938,
-1673,
-1874,
-709,
-1025,
-180,
-1500,
-1177,
-1907,
-2547,
-1601,
-1544,
-359,
-792,
-309,
20,
-578,
-21,
320,
1672,
1399,
1135,
1074,
83,
868,
1342,
2047,
2326,
2995,
3058,
3192,
3214,
1318,
1461,
1238,
1520,
2909,
2171,
1381,
489,
227,
584,
799,
561,
315,
884,
235,
-59,
-279,
-566,
-471,
-767,
-181,
-187,
66,
199,
-173,
-729,
-1004,
-468,
-1369,
-1771,
-2291,
-2501,
-1162,
683,
956,
155,
146,
-1242,
-1676,
-1047,
-988,
-1010,
-1442,
-2108,
-2591,
-1250,
-739,
-67,
1673,
1574,
64,
-935,
-850,
-822,
133,
466,
1245,
651,
484,
1610,
1854,
3856,
4110,
3961,
2605,
833,
1872,
2302,
2941,
2966,
2003,
1490,
1082,
2148,
2563,
3356,
3199,
1302,
1192,
139,
199,
-24,
300,
848,
-208,
31,
-19,
-273,
-868,
-619,
-1354,
-2034,
-2015,
-1119,
-1195,
-1053,
-428,
-1455,
-536,
-391,
-500,
-602,
-756,
-1117,
-1945,
-2376,
-2804,
-2066,
-2793,
-3937,
-4006,
-3598,
-2261,
-1698,
-687,
-816,
-229,
-347,
678,
2198,
1841,
634,
442,
175,
-2530,
1964,
3751,
718,
642,
-46,
-385,
2683,
4954,
4092,
2657,
-1648,
-3250,
3952,
3954,
5638,
7496,
-2166,
-5170,
-8494,
-2713,
4267,
5633,
7805,
375,
-6580,
-5687,
-2189,
2730,
5129,
4103,
1906,
-8418,
-4940,
25,
1174,
6276,
1824,
-384,
-6553,
-6788,
-106,
-657,
1866,
1984,
-5395,
-6350,
-4077,
3657,
7037,
5750,
4852,
-8257,
-11716,
-8287,
336,
7368,
4454,
4912,
-5277,
-12082,
-2949,
2466,
7883,
9484,
1275,
-6813,
-6398,
909,
5919,
9649,
4765,
-3980,
-5343,
1084,
10784,
10157,
6169,
-2909,
-9191,
-1481,
6955,
12495,
4057,
3167,
-2337,
-7648,
5383,
4409,
5440,
1216,
-2250,
-643,
-1791,
1834,
-759,
-1580,
-2083,
-156,
29,
103,
1097,
734,
955,
4730,
5402,
-616,
819,
3000,
3668,
-25059,
-18042,
13013,
-6744,
24161,
21023,
-21063,
-22263,
-30351,
7375,
2614,
12302,
24724,
-23840,
-30082,
-15107,
11693,
30148,
24769,
9894,
-11316,
-31120,
15533,
12814,
8856,
9610,
-29809,
-25882,
-29114,
935,
5778,
-9150,
-1403,
-19016,
-13668,
21767,
29998,
29993,
5181,
624,
-12204,
-15536,
23619,
16640,
-9750,
-28730,
-25793,
-24874,
-4465,
25667,
16311,
1614,
5591,
15336,
9497,
19655,
28203,
-5231,
-3706,
1634,
-8008,
-13086,
-24997,
-14624,
-16574,
3122,
23905,
4541,
16274,
10268,
11216,
19875,
14988,
22091,
-14038,
-14804,
-13467,
-23728,
-3024,
-3199,
-6551,
-9312,
-5146,
10791,
14453,
29180,
24618,
-2208,
-24905,
-19045,
25479,
14274,
19016,
15384,
-30375,
-28417,
-26370,
8053,
27567,
4261,
4672,
-20913,
-18885,
24436,
27659,
25652,
4717,
-26073,
-28501,
-26585,
9635,
7650,
-29846,
-25335,
-26911,
-10533,
18593,
30359,
24883,
-4434,
3239,
19526,
7575,
15342,
-6011,
-29661,
-28235,
-26856,
-8022,
-809,
11325,
383,
-13493,
14841,
31958,
29467,
13940,
-12228,
-26213,
-30797,
-12935,
-1344,
-23255,
-13780,
9924,
20615,
31999,
24332,
-6036,
-23871,
-13790,
14454,
18718,
7223,
-1007,
-20557,
-7433,
13481,
10459,
976,
-6628,
-4223,
-3892,
13494,
21922,
8892,
7274,
-1309,
1395,
16453,
16815,
2690,
-20734,
-23642,
15257,
28923,
24481,
13126,
-21263,
-30688,
-26750,
-4446,
29693,
15169,
-10934,
-12676,
-11246,
15061,
31223,
8745,
-23421,
-29895,
-27756,
-12435,
12482,
7739,
-18388,
-28508,
6756,
28873,
30590,
20259,
-13768,
-30878,
-23637,
11560,
23389,
-5212,
-19182,
-26425,
-14607,
15870,
31589,
8903,
-17829,
-13628,
-10289,
8048,
27420,
10424,
-15625,
-25982,
-18472,
2051,
21373,
19399,
-4035,
-15055,
6437,
15954,
9674,
6044,
-8578,
-14375,
2712,
16936,
22250,
8768,
-6151,
-5544,
-8471,
4889,
8422,
-736,
3580,
5887,
9498,
3869,
-847,
1394,
-9773,
5760,
15445,
15207,
11185,
-17520,
-31236,
-3510,
27375,
27342,
20977,
-11457,
-31764,
-29043,
-10255,
26089,
21730,
-20864,
-26617,
-7739,
10032,
31999,
13761,
-23760,
-31040,
-27947,
-4505,
12224,
-1314,
-14967,
-29041,
1842,
29907,
22042,
5186,
-20706,
-27559,
-15144,
12589,
17641,
-9004,
-8645,
3175,
12015,
25219,
12942,
-10240,
-24151,
-12300,
1659,
7319,
17143,
11770,
5139,
1578,
2084,
3737,
6609,
11117,
-4365,
-20666,
-10116,
10200,
13287,
17146,
15078,
-2167,
-3666,
-3804,
547,
-2146,
-12874,
-5896,
5430,
13522,
20362,
6817,
-5759,
-3775,
-2378,
-470,
-12935,
-15004,
-6568,
18245,
27437,
-13249,
-28837,
17793,
26703,
13996,
16077,
-21728,
-31998,
-27012,
-4572,
30915,
-3998,
-18500,
7916,
-6087,
17564,
27884,
-18058,
-28968,
-28577,
-15598,
3776,
-483,
2547,
-15708,
-2331,
31999,
18597,
4615,
-12128,
-23497,
-14692,
6675,
21550,
-4780,
-21769,
515,
13356,
25845,
26462,
1340,
-20876,
-20668,
6862,
7755,
1769,
2879,
-13280,
-10517,
13688,
21210,
13932,
17191,
6830,
-19974,
-25469,
483,
7580,
6398,
16513,
-2651,
-13587,
-5265,
3078,
11227,
1822,
-2822,
2610,
1378,
17847,
7978,
-16101,
-17686,
-12562,
15443,
9695,
-24407,
-22440,
19952,
27688,
20056,
14406,
-24340,
-30956,
-20149,
11620,
27003,
-17399,
-18943,
4906,
3230,
28489,
18780,
-23053,
-28135,
-19856,
10333,
10960,
1418,
2952,
-21983,
4434,
30442,
7394,
-11592,
-17172,
-4278,
4986,
17058,
12687,
-18235,
-11222,
19404,
25900,
16881,
-887,
-16878,
-26477,
-6722,
26365,
14077,
-6869,
-2808,
-9392,
-5492,
10439,
2930,
-2508,
7356,
12315,
-10493,
-13256,
13963,
8052,
83,
-1590,
-17369,
-19064,
-16714,
-1620,
13185,
1875,
13205,
18579,
6314,
5657,
-17217,
-18194,
-5864,
-21493,
-26607,
11335,
25457,
15639,
29756,
-9899,
-30710,
-21355,
3942,
18598,
-24337,
-15356,
10927,
13360,
29174,
23053,
-11039,
-18859,
726,
14824,
-12376,
-27145,
-18931,
-18285,
11942,
29524,
17423,
-6304,
105,
21763,
13405,
5356,
-4809,
-21904,
-14322,
6503,
13932,
3375,
-7312,
-4102,
2755,
23401,
18692,
-11707,
-16331,
4880,
17575,
11178,
711,
-18551,
-18189,
8454,
20461,
-4233,
-25814,
-3385,
18141,
25075,
20423,
-7095,
-24621,
-26675,
-22646,
-9373,
-9151,
-4885,
8349,
20431,
30743,
14071,
-21147,
-27915,
12208,
11762,
5771,
-664,
-30408,
-23544,
665,
31700,
13696,
-20405,
-4599,
3805,
15964,
27551,
-6492,
-26446,
-17297,
16787,
24127,
-5525,
-9203,
-19230,
-8377,
23422,
21416,
-8709,
-20117,
4091,
14348,
14275,
12246,
-6149,
-15386,
5303,
16675,
-6543,
-22805,
-18516,
-2468,
19500,
31322,
18742,
-5235,
-16641,
-19638,
-11553,
7015,
5565,
3446,
16930,
15784,
-1968,
-28205,
-22725,
5662,
11923,
16075,
323,
-1852,
9673,
-5125,
-5090,
-17193,
-27830,
-13050,
11875,
26516,
-10503,
-17238,
27215,
19418,
25284,
10337,
-28689,
-27088,
-24177,
13570,
-1900,
-21160,
329,
13957,
27436,
28370,
14746,
-14358,
-23217,
-1999,
-7380,
-21698,
-11833,
-18369,
-6235,
12411,
21972,
6932,
5951,
21375,
11496,
-5226,
-7565,
-4889,
-13149,
3710,
15257,
-1634,
-8868,
953,
1450,
21,
6539,
11211,
-2689,
263,
8765,
-10469,
-20038,
-1704,
19806,
20282,
10229,
-2028,
-25427,
-20443,
4096,
5092,
-5934,
-7503,
9722,
16801,
13386,
8714,
-8299,
-20633,
-12929,
2679,
-7830,
-22550,
20859,
19220,
19987,
22906,
-12944,
-26705,
-15403,
13387,
-5007,
-23323,
-10260,
8688,
11007,
28836,
16417,
-5296,
5203,
19578,
13032,
-15248,
-21355,
-22746,
-22473,
-4094,
241,
-16686,
-4384,
18726,
27382,
15134,
6836,
-1518,
-4326,
16362,
13198,
-16303,
-24303,
-10938,
626,
-644,
-1154,
-9699,
-8886,
18710,
27791,
6165,
-11937,
-2833,
11809,
20578,
6912,
-8058,
-27685,
-22292,
5035,
3209,
-9538,
-20368,
-4668,
12946,
24773,
19879,
5211,
-7995,
-576,
12088,
1044,
-29118,
-21421,
4146,
14750,
27493,
1484,
-16990,
-24678,
11665,
21717,
-184,
-20599,
-14467,
2353,
11646,
23208,
-6821,
-14447,
5810,
28673,
11850,
-3906,
-12169,
-18267,
-3977,
4348,
-10135,
-25102,
-16644,
10045,
15443,
9002,
2840,
-678,
14101,
28655,
19083,
-13146,
-16889,
-1819,
3280,
3588,
-3784,
-22660,
-20970,
-2839,
13529,
-6000,
-10864,
9151,
22628,
27424,
20362,
-2459,
-19780,
-2421,
9347,
-2037,
-23834,
-23897,
-13485,
7205,
2301,
5205,
-633,
10412,
22060,
13882,
9715,
-6637,
-9071,
-18604,
9466,
7558,
-1565,
-6614,
-8228,
-3717,
7498,
11480,
-3051,
-1905,
1929,
3690,
-3188,
6314,
3019,
356,
-3838,
-2546,
-4247,
2939,
7997,
977,
-4575,
-9461,
-3056,
2590,
6099,
-2730,
-14027,
-10466,
9430,
14478,
3541,
-10512,
-6057,
8829,
10399,
9683,
-1798,
-17109,
-12943,
-1583,
4324,
-7563,
-13623,
-769,
12725,
14137,
5461,
-4594,
-10660,
-5506,
1432,
1974,
-8375,
-10710,
-6968,
5483,
8126,
4048,
-4725,
-3462,
14337,
13716,
5142,
-8280,
-6061,
-1503,
268,
3232,
-2247,
-8544,
213,
8829,
4347,
4537,
7675,
9456,
5208,
2365,
-4392,
-5136,
2189,
1679,
-4936,
-8271,
-8451,
-1024,
14687,
15386,
460,
997,
12693,
9505,
5198,
-2200,
-15941,
-19676,
-5238,
6458,
1189,
-11408,
-4356,
12094,
12067,
18748,
7377,
-10783,
-7970,
2192,
5431,
-8496,
-16433,
-14028,
-13182,
-554,
10761,
5252,
-2815,
-65,
11088,
8763,
2308,
-7249,
-13687,
-8885,
-2804,
-2693,
-8577,
-7844,
3532,
14153,
18194,
9568,
356,
4205,
5432,
3394,
-6167,
-14286,
-13308,
-4382,
3340,
2762,
3072,
9490,
10656,
7748,
9428,
3937,
-383,
-165,
-1081,
-5122,
-10535,
-5087,
69,
2594,
3575,
1779,
9447,
9925,
7609,
583,
-7284,
-4129,
-244,
-1989,
-6416,
-5622,
-4298,
1619,
3840,
6281,
2255,
1834,
6425,
5031,
58,
-11899,
-12236,
-10269,
-5606,
-3142,
-4967,
-4039,
-4833,
5823,
16292,
11928,
4834,
-2960,
-4224,
-1460,
-1475,
-7602,
-16630,
-13404,
-1300,
9328,
10730,
3942,
3219,
11314,
15260,
10936,
-3153,
-11702,
-11154,
-5648,
112,
-766,
-3300,
-3520,
2626,
12121,
8329,
2159,
2236,
1317,
5470,
2606,
-6020,
-9501,
-4596,
3810,
1417,
-4915,
-2516,
-1968,
3135,
6114,
2468,
1700,
2004,
1260,
-632,
-4667,
-6804,
-5769,
-3649,
304,
-2073,
-1975,
-1031,
7262,
7590,
-61,
-1625,
-2935,
-1590,
-6328,
-8575,
-9574,
-9400,
-2337,
6366,
6629,
4818,
7580,
6438,
4545,
2618,
-473,
-4942,
-7877,
-4450,
1041,
312,
-2765,
512,
6436,
12916,
15970,
7773,
1078,
-2147,
-3881,
-2409,
-1185,
-3126,
-7786,
-1772,
3589,
7063,
5793,
3661,
4453,
5390,
7570,
-675,
-6748,
-5729,
-3,
162,
-3518,
-3105,
-875,
1198,
5465,
4975,
1246,
-933,
-625,
1833,
277,
5,
-3435,
-1887,
-2750,
-2286,
1230,
-22,
1717,
-1063,
-2583,
-161,
986,
560,
-263,
-1583,
-3957,
-1148,
1476,
-1276,
-2996,
1758,
5174,
4677,
5645,
2986,
141,
307,
1302,
-810,
-3838,
-2764,
-1390,
-872,
730,
2779,
3191,
5445,
11788,
7733,
110,
-1058,
-215,
-1564,
-3473,
-2893,
-5297,
-7624,
-1727,
5290,
5738,
7676,
2197,
-1991,
-800,
2635,
524,
-9500,
-7117,
-4510,
-3028,
286,
402,
-71,
-989,
3486,
2809,
-1203,
-3027,
-6542,
-4555,
-1677,
-2771,
-6597,
-7026,
-1980,
1066,
921,
712,
-3942,
-2862,
2664,
1667,
-142,
-4044,
-4287,
-1739,
-271,
553,
-1017,
-2713,
-1009,
6165,
9484,
4601,
3452,
3985,
992,
689,
-1318,
-5503,
-7301,
-2948,
1743,
3612,
8029,
10377,
8521,
4455,
2299,
4410,
172,
-5062,
-5190,
-5328,
-2883,
-314,
3436,
4361,
5090,
3797,
3428,
2424,
1208,
-1093,
-5525,
-2630,
-1577,
-712,
-2547,
-3759,
-833,
990,
3462,
4893,
1655,
-1729,
-2511,
-978,
-229,
-2727,
-3723,
-5916,
-6115,
-1265,
477,
464,
-113,
-354,
1583,
4522,
6981,
354,
-2728,
-1625,
-334,
1750,
67,
-1670,
-5036,
-760,
4983,
5763,
6874,
6248,
4430,
3155,
3114,
1885,
-3082,
-5852,
-3080,
-965,
477,
5078,
5969,
2799,
4725,
8357,
5669,
2643,
1788,
-4451,
-7235,
-4015,
-1357,
-3761,
-3475,
-278,
99,
5366,
8471,
2295,
-1855,
-1014,
-27,
-374,
-3696,
-3702,
-6975,
-5508,
1975,
896,
-1136,
-2788,
-3601,
317,
2069,
-482,
-3550,
-6151,
-2797,
-435,
-782,
-1219,
-4460,
-2992,
146,
3048,
3699,
-58,
260,
2130,
4753,
3502,
-1696,
-2636,
-1351,
1466,
3227,
2128,
1066,
1465,
5737,
8617,
4278,
146,
-2540,
-1243,
1886,
1716,
-248,
997,
2061,
3901,
6260,
1738,
-30,
-392,
213,
1134,
-1413,
-1679,
-2078,
-561,
2252,
-716,
-2764,
-940,
3483,
3416,
-75,
-1344,
-758,
-368,
-880,
-466,
-4854,
-4968,
-661,
1281,
-373,
-4613,
-3519,
-1844,
-247,
1415,
-1191,
-3610,
-3112,
-241,
1740,
-378,
-4478,
-6216,
-3211,
1456,
2294,
82,
-1548,
-69,
4141,
6148,
2928,
-1537,
-3073,
-1186,
908,
608,
-449,
-245,
12,
4051,
6848,
3885,
411,
478,
2134,
265,
927,
-955,
-1788,
-1,
2256,
5271,
1313,
451,
1956,
-324,
1231,
-383,
-1706,
-3197,
-257,
2033,
-814,
2067,
-1880,
1398,
2190,
755,
1641,
-2496,
472,
-1566,
-3991,
-1948,
-1985,
-590,
-447,
394,
-391,
-2267,
362,
-1613,
-1854,
-862,
-2290,
518,
625,
-1588,
-1238,
-1389,
1265,
2168,
2293,
1315,
-1733,
3061,
4029,
1920,
1689,
260,
727,
1291,
2339,
1233,
-2057,
-1182,
375,
2917,
4470,
3251,
2877,
1704,
1566,
2574,
1135,
-1810,
-624,
-2200,
-2753,
890,
236,
-1394,
-1180,
710,
1703,
2241,
2044,
-220,
-1039,
-1208,
-1840,
-1957,
-1914,
-1558,
-668,
1388,
1135,
269,
544,
291,
269,
-1686,
-2783,
-3099,
-4036,
-3481,
-1644,
-317,
-264,
469,
-501,
-680,
-1120,
-654,
528,
-1159,
28,
409,
24,
933,
1007,
756,
-783,
736,
2618,
2,
1530,
3092,
1643,
1964,
3720,
5342,
1710,
-151,
449,
-1638,
-552,
-87,
-518,
-23,
1314,
4982,
4226,
3085,
1902,
-732,
-31,
-103,
-1495,
-2384,
-2987,
-767,
1662,
2527,
1706,
-230,
1525,
3342,
1568,
263,
-1668,
-4390,
-2594,
-289,
438,
-291,
-1473,
-1409,
-739,
786,
128,
-837,
-1901,
-2878,
-1398,
-780,
-2285,
-2113,
-1953,
-582,
270,
-836,
833,
-169,
-303,
1897,
2199,
1717,
573,
1304,
816,
-473,
617,
-465,
-405,
1069,
2500,
3015,
560,
2789,
3294,
557,
400,
-139,
342,
-459,
-186,
1133,
-847,
-420,
-262,
-6,
1802,
1179,
1451,
-20,
-542,
1060,
-1118,
-1885,
-907,
-2303,
-2672,
-1402,
-276,
-138,
45,
3018,
2619,
558,
537,
-294,
-1637,
-2635,
-2098,
-3127,
-3266,
-468,
265,
259,
899,
246,
-753,
178,
883,
-1358,
-1636,
-1840,
-122,
-2092,
-264,
208,
792,
6313,
62,
1290,
3658,
529,
597,
2743,
492,
-550,
436,
267,
1007,
1507,
1196,
-157,
2750,
3487,
-2204,
679,
1317,
-6033,
2208,
3434,
-839,
-15,
-2309,
-3883,
-1017,
-56,
106,
887,
1097,
1418,
-645,
-627,
-2438,
-3240,
-749,
2738,
-1799,
-2408,
840,
504,
464,
1206,
1875,
2654,
-50,
100,
1901,
-1933,
-333,
-3700,
-814,
-517,
-3481,
-700,
40,
1547,
234,
157,
994,
2318,
1633,
1638,
2544,
1192,
196,
1212,
4000,
3083,
506,
2356,
3576,
1041,
-54,
798,
-4926,
1433,
2964,
3042,
4239,
-330,
4972,
3585,
5539,
2595,
-222,
-4192,
-3265,
-1923,
-2272,
-611,
-3909,
-1998,
-29,
3364,
-944,
-1651,
9,
1555,
-713,
400,
-1136,
-4509,
-2553,
-4343,
1880,
-1059,
178,
-1336,
33,
958,
1872,
466,
-2562,
-12539,
-7432,
6957,
4375,
8101,
-6450,
-4631,
-15375,
-4008,
8122,
5052,
263,
-8438,
572,
-1357,
6747,
8876,
2877,
-5480,
-2749,
6405,
10046,
3666,
1868,
-3994,
-3715,
-1572,
5507,
1037,
-7743,
-3513,
-1080,
6291,
5710,
7122,
-2447,
-3017,
4064,
9112,
5036,
318,
333,
339,
2840,
1711,
-791,
-3428,
-6689,
-2667,
-3990,
-3120,
-1005,
854,
1106,
-5488,
1007,
-1989,
1112,
-1290,
25,
-2132,
-1736,
1176,
-2571,
-23346,
-930,
13500,
13752,
20702,
-10579,
-3579,
-29186,
-1935,
10159,
3312,
-9068,
-22375,
-5847,
-12833,
16743,
18257,
-1731,
-11875,
4764,
24417,
23256,
10821,
7998,
-16681,
-14019,
-1089,
7832,
-6720,
-26119,
-14691,
-15748,
5911,
14094,
20824,
1463,
236,
21333,
25034,
22371,
9937,
3487,
-4705,
63,
11897,
1239,
-12487,
-19242,
-17453,
-16624,
-7419,
1562,
-1254,
1005,
4757,
19866,
16997,
19002,
12373,
1722,
379,
-4963,
-1347,
-5500,
-10416,
-13581,
-16397,
-7988,
2119,
-10521,
-27129,
585,
12157,
24261,
25708,
182,
-10005,
-29004,
3511,
10277,
724,
-16440,
-29339,
-18997,
-13202,
19300,
23715,
-3486,
-14346,
4330,
20845,
26836,
17069,
7384,
-21511,
-21631,
-3433,
5721,
-7210,
-26804,
-20112,
-22282,
-1423,
18253,
22081,
1774,
520,
22015,
28059,
27286,
20938,
5572,
-10833,
-5314,
3839,
-6595,
-21074,
-24276,
-22507,
-10250,
11503,
19169,
15820,
4249,
6756,
24358,
22523,
27886,
7153,
-4554,
-4583,
-8353,
-4141,
-7349,
-7854,
-19575,
-18857,
-460,
526,
-22250,
15172,
15887,
23255,
25095,
725,
220,
-31596,
2701,
1452,
-2950,
-16844,
-29306,
-17991,
-15853,
17422,
26263,
4261,
-8848,
7900,
17318,
24304,
17555,
9643,
-22014,
-27262,
-15757,
-7554,
-11166,
-24910,
-19008,
-22079,
531,
21839,
27082,
10242,
5721,
16233,
20403,
22659,
17439,
-204,
-17264,
-14413,
-7340,
-12750,
-23564,
-26515,
-25839,
-13054,
13249,
20686,
21116,
6419,
1597,
19446,
17633,
25368,
1637,
-15079,
-12280,
-15651,
-7519,
-6847,
-8332,
-17834,
-20627,
-1984,
8597,
-13935,
-2178,
27777,
23044,
31359,
18410,
-5677,
-24041,
-26366,
1583,
-1247,
-10450,
-21206,
-22782,
-16348,
4768,
30576,
25565,
2165,
1477,
17895,
17742,
25619,
20760,
-2423,
-25990,
-23346,
-11428,
-7602,
-13614,
-19299,
-18318,
-10567,
14942,
30353,
25537,
13589,
13573,
22309,
24281,
23148,
14052,
-8258,
-18441,
-12877,
-10867,
-18744,
-25125,
-23734,
-17846,
-157,
20191,
23528,
23069,
7340,
13443,
22265,
18428,
17798,
-7652,
-13745,
-17264,
-16770,
-9860,
-8216,
-12752,
-18013,
-13970,
-2524,
9376,
818,
-13899,
19100,
26522,
22475,
27088,
-6120,
-15684,
-31130,
-8676,
1145,
-7629,
-14279,
-26566,
-17547,
-2085,
24868,
29248,
11420,
-4408,
8384,
12220,
22854,
20193,
1456,
-19634,
-28909,
-16256,
-10159,
-9319,
-18748,
-17779,
-18318,
1391,
22316,
28815,
22440,
14599,
17612,
15777,
17398,
15386,
884,
-13006,
-15706,
-17023,
-21596,
-25334,
-20549,
-18054,
-8970,
8991,
18875,
23268,
21329,
14389,
17064,
12386,
16349,
3455,
-9077,
-11041,
-18362,
-17873,
-13998,
-8560,
-14028,
-11803,
-4061,
3354,
6238,
1998,
-6674,
29737,
17107,
23980,
17972,
-9680,
-10019,
-29368,
1591,
-8323,
-3646,
-13554,
-15772,
-11033,
756,
23690,
24655,
13893,
2428,
13413,
4623,
18036,
13506,
3020,
-16915,
-22921,
-17538,
-15640,
-9221,
-7393,
-10484,
-17331,
-4662,
13625,
27298,
24640,
25626,
10676,
4606,
7211,
15078,
12958,
-6713,
-15062,
-25189,
-26506,
-19814,
-9529,
-6748,
-11930,
-779,
11976,
24586,
24916,
11546,
14119,
1278,
6888,
2831,
-1280,
-5194,
-21242,
-19748,
-17853,
-9200,
-9011,
-5940,
-6491,
70,
2732,
13689,
-11809,
12662,
22870,
6391,
31061,
-4187,
646,
-26446,
-12022,
-4089,
-4439,
7679,
-11563,
-6046,
-19392,
7930,
24801,
25849,
7493,
9672,
212,
3056,
15447,
16391,
1450,
-24356,
-17744,
-21652,
-10510,
-9375,
2556,
-13575,
-20358,
1386,
18233,
26510,
22547,
22994,
2315,
-5065,
10988,
14616,
444,
-8323,
-15748,
-24740,
-23752,
-9042,
-382,
-9232,
-5350,
3722,
6680,
19337,
10086,
11942,
3448,
-977,
8394,
488,
5141,
-7159,
-14766,
-12515,
-8681,
-3397,
-7241,
-5592,
-4749,
-1282,
8190,
15588,
-6118,
2461,
26685,
2862,
27951,
4382,
-2251,
-16362,
-22440,
2200,
-8154,
13947,
-7518,
597,
-15438,
-4934,
15291,
21247,
17128,
9296,
7923,
-9573,
3936,
8098,
10219,
-8997,
-9276,
-18623,
-21294,
-11381,
-574,
-364,
-7722,
4615,
3638,
10889,
17193,
23786,
11807,
3861,
4418,
-3416,
-2200,
-885,
-3740,
-20537,
-19496,
-12575,
-10625,
-8328,
2911,
2765,
-5775,
5605,
1118,
3660,
7863,
9658,
7899,
-5813,
3110,
-483,
-5111,
-5032,
-4940,
-8710,
-16477,
-2859,
-812,
1768,
-1643,
6317,
11043,
2557,
-10053,
18095,
6058,
5869,
24823,
-534,
2794,
-27900,
-4542,
-9407,
2022,
12186,
5520,
-527,
-21953,
-3794,
5559,
17315,
13397,
17226,
-6173,
-9267,
-1885,
12747,
6425,
-84,
-3890,
-17434,
-18858,
-13653,
5666,
-573,
2443,
798,
762,
3276,
14184,
18086,
12963,
4378,
-1027,
-2926,
-6314,
-1426,
-2104,
-1893,
-5536,
-11372,
-11288,
-9021,
-5949,
-497,
5573,
4936,
-4807,
2812,
5776,
15942,
13282,
7613,
7992,
-12985,
-6024,
-6547,
-3055,
-440,
-7151,
-2946,
-10353,
-4701,
5789,
5199,
12253,
8866,
5582,
-6652,
-3455,
8534,
4354,
16638,
5554,
610,
-11306,
-10353,
-5539,
-7031,
1409,
2270,
1179,
-8237,
-2387,
-3903,
1791,
5242,
11463,
7370,
2595,
5549,
4791,
5707,
-2542,
1269,
-6032,
-10601,
-11912,
-10012,
-5004,
-8034,
-4926,
-4763,
-5439,
579,
4634,
8935,
10582,
5439,
4546,
598,
3119,
-705,
2713,
-1757,
-12227,
-9050,
-14554,
-4791,
-4407,
2790,
7655,
-3362,
3976,
9429,
14297,
16264,
12777,
8353,
-6751,
-4550,
-4703,
-6464,
-1206,
-6640,
-3367,
-4166,
-3209,
5708,
6056,
8183,
10041,
6710,
10060,
2763,
155,
-569,
-1119,
1102,
530,
-321,
-10653,
-9413,
-12221,
-4750,
3276,
3646,
6041,
-3474,
2705,
-1449,
4627,
10617,
3689,
5669,
1992,
-756,
-4413,
-6295,
-3804,
-6762,
-6177,
25,
-8508,
-6306,
-4413,
-5996,
504,
7981,
7430,
4818,
1837,
1018,
-127,
-291,
486,
-3791,
-312,
-920,
1257,
131,
-574,
2227,
-2922,
4969,
1815,
5033,
5182,
-3659,
8470,
-1799,
2617,
4726,
-2390,
-456,
-5263,
36,
2181,
-7579,
277,
-1515,
-969,
8181,
6485,
7319,
-2518,
-3164,
-734,
1217,
2266,
5377,
-2260,
-4351,
-4827,
-2217,
-2882,
548,
5313,
-3370,
-5997,
-4925,
-1397,
4590,
5811,
962,
-877,
-8385,
-4819,
-851,
2898,
744,
-16,
-5781,
-4824,
-3461,
1052,
4167,
750,
4112,
-1128,
3015,
-401,
1423,
2046,
-765,
319,
1966,
-4196,
-1700,
-781,
2043,
6405,
2448,
4466,
-3984,
7229,
3048,
6243,
7514,
-3412,
-2868,
-6341,
940,
-1171,
5841,
-989,
-1711,
-1188,
-1811,
-379,
3805,
5291,
-5808,
2631,
-3869,
-875,
5490,
1990,
-957,
-5995,
-4640,
-1532,
368,
941,
-2689,
1552,
-4528,
-1067,
231,
-1316,
1435,
-3059,
432,
-3897,
2234,
-1561,
-2444,
-77,
-1760,
-4508,
806,
-2353,
-3312,
-1254,
562,
1832,
5419,
2314,
-2689,
9272,
-1123,
3325,
3507,
3284,
-2049,
-1377,
195,
-1036,
2954,
4761,
2916,
3138,
65,
1354,
9151,
-3446,
9158,
1518,
1610,
231,
2524,
7940,
-4325,
2239,
-2797,
-2599,
622,
-2100,
-1179,
-2797,
-3489,
1906,
-1306,
1967,
5139,
-978,
1097,
-502,
2206,
539,
-1015,
3897,
-3554,
-3496,
-2109,
1023,
-7873,
-575,
-8192,
-7991,
2451,
-7571,
6972,
-5309,
-1144,
200,
-953,
6520,
479,
215,
-2611,
-4964,
-2238,
980,
-2542,
3086,
-3266,
-375,
2839,
-401,
5998,
575,
7495,
1644,
-534,
2002,
348,
5005,
-2275,
2232,
1262,
2794,
507,
-66,
2520,
594,
2144,
530,
3152,
-2177,
1857,
1608,
11,
4393,
-3227,
2791,
847,
-2646,
697,
-3017,
-1359,
-3266,
-1942,
-1372,
-2956,
-800,
-1433,
-2171,
-761,
-1396,
1645,
-46,
-747,
-747,
-1286,
-194,
-818,
-463,
-2506,
-3006,
-4576,
-1317,
-1099,
1625,
-704,
83,
-88,
-1339,
5523,
1703,
1861,
2877,
-1187,
-121,
223,
2282,
1609,
564,
2672,
-675,
3540,
952,
3367,
5247,
916,
2806,
1193,
1673,
2555,
2542,
1386,
9,
-165,
-493,
-45,
256,
-333,
-245,
-1120,
-13,
-92,
2010,
561,
-356,
1306,
-837,
2454,
-1220,
-625,
-544,
-2333,
591,
-505,
471,
-1022,
-1697,
-1695,
-395,
-753,
-931,
-1806,
-927,
-686,
-926,
377,
-1453,
-1417,
-1743,
-2390,
-991,
-1221,
-503,
-1433,
-2213,
-500,
-320,
1158,
2585,
1552,
1096,
1090,
949,
2304,
988,
3332,
455,
1763,
990,
178,
2407,
1650,
2015,
-40,
1725,
2066,
2394,
1031,
933,
485,
654,
-6,
1895,
-1671,
-42,
127,
-971,
-505,
-1847,
1227,
-1931,
472,
-1674,
467,
-135,
81,
-797,
-320,
-898,
-869,
740,
-1468,
681,
-3420,
-725,
-1337,
-788,
549,
-1610,
-1960,
-778,
-3022,
-848,
-1263,
-24,
-642,
-1756,
-271,
-3417,
329,
-1347,
1148,
414,
346,
1513,
63,
1724,
1145,
1065,
1191,
2029,
2605,
1368,
832,
1002,
2077,
1945,
2514,
1478,
737,
1227,
2030,
2965,
2291,
961,
124,
998,
-268,
2451,
1307,
203,
823,
-502,
1053,
-142,
302,
-186,
-2343,
-921,
-742,
634,
-731,
-1113,
94,
-570,
640,
1393,
-509,
-923,
-808,
-2082,
-468,
-1676,
-1920,
-2633,
-1897,
-880,
-745,
-673,
-929,
-1321,
-1745,
-138,
-732,
303,
-1136,
-1312,
-841,
-862,
803,
749,
267,
113,
302,
1768,
1438,
606,
1233,
361,
1855,
2038,
2091,
1417,
991,
1129,
1790,
2066,
3186,
1679,
-297,
217,
-723,
1012,
146,
161,
77,
-92,
149,
799,
913,
276,
565,
1472,
1303,
568,
-220,
-924,
-532,
-2139,
-1050,
26,
-75,
-28,
318,
1048,
-1208,
-2050,
-1188,
-1307,
-503,
-1116,
-1681,
-1854,
-2915,
-2827,
-1523,
-671,
-703,
-1578,
-519,
-362,
220,
771,
-296,
612,
-40,
367,
389,
36,
-124,
-819,
-1291,
515,
1125,
1247,
1968,
1987,
2944,
2792,
2776,
2105,
1912,
2192,
2307,
1453,
1322,
1083,
135,
6,
780,
1188,
742,
-21,
-136,
-440,
-79,
1371,
458,
-654,
-869,
-769,
-404,
-272,
275,
-301,
-181,
411,
115,
1426,
-628,
-1582,
-428,
-95,
472,
232,
-639,
-3572,
-6429,
-3138,
598,
-708,
525,
1424,
-848,
-4368,
-2392,
244,
-2542,
-2353,
-864,
-1368,
-2877,
-576,
755,
-821,
2166,
4391,
3663,
2559,
2821,
2234,
219,
2461,
3965,
2110,
1233,
904,
-718,
-2492,
-210,
654,
1256,
1174,
1643,
1275,
116,
2933,
2511,
3111,
4505,
4458,
495,
-951,
-1311,
-2920,
-1457,
63,
-557,
-672,
2000,
-415,
-2017,
-130,
912,
341,
64,
1487,
73,
-754,
47,
-2107,
-2077,
288,
-692,
-1678,
-672,
-1100,
-1818,
-2609,
-734,
-6848,
-5018,
8109,
588,
2578,
9464,
3775,
-6105,
-8174,
1043,
-6816,
-2398,
3483,
-870,
-2476,
-1605,
2262,
-2832,
6138,
7748,
1004,
2287,
3890,
2739,
-259,
8300,
7573,
-1959,
-695,
-3143,
-6032,
-6521,
622,
1345,
-3124,
2322,
284,
1529,
4387,
7719,
3835,
3376,
1733,
-637,
-750,
-42,
324,
-4288,
-110,
-3500,
-261,
684,
1707,
-280,
-3728,
-1416,
-2543,
3392,
2204,
1141,
-520,
-3756,
-5651,
-5995,
-4290,
-2179,
-569,
-3393,
402,
584,
-6051,
-11682,
9980,
11509,
-464,
15567,
6972,
-5876,
-13860,
-1980,
-3024,
-2248,
8764,
-2333,
-2791,
336,
3398,
-2203,
8609,
15515,
-1789,
-1950,
3340,
-916,
981,
8565,
10825,
-1913,
-2313,
-5779,
-11215,
-5907,
-1054,
1853,
-4468,
3638,
-1361,
-2437,
5287,
7928,
6929,
3461,
2075,
-3700,
-346,
-1141,
1402,
1737,
-52,
-3808,
-3662,
-1414,
-49,
3477,
-907,
-799,
-4320,
-3958,
-2912,
-3136,
981,
-804,
-3465,
-3580,
-4399,
-2044,
2069,
1740,
834,
-5270,
-11894,
8288,
4805,
872,
17804,
5402,
-4874,
-14379,
-2291,
-4274,
-1912,
13026,
1171,
1066,
-620,
-1011,
-1791,
9422,
16103,
680,
2201,
1404,
-5836,
-1455,
6225,
10924,
431,
667,
-5872,
-14553,
-8404,
-4427,
1113,
2300,
7544,
-688,
-3050,
-396,
948,
6529,
7196,
5887,
191,
1245,
-3261,
-2195,
205,
2607,
1756,
-1171,
4389,
-5899,
-4697,
-3569,
-3574,
890,
2150,
-564,
-8201,
-6821,
-7666,
-1296,
3792,
5574,
756,
2176,
3262,
-13481,
-27482,
4612,
14088,
16882,
31997,
8548,
-11688,
-31996,
-21430,
-14114,
14745,
30417,
16147,
705,
-22193,
-18487,
-5890,
19508,
31999,
21105,
5084,
-15358,
-27516,
-19604,
4340,
27660,
12419,
-1521,
-20484,
-29327,
-17517,
8001,
27919,
27432,
20897,
-5501,
-15037,
-5100,
14467,
21679,
14142,
-2916,
-19744,
-27351,
-21245,
-1952,
14916,
14900,
2999,
-6640,
-1606,
9555,
20983,
14068,
-1562,
-7849,
-17747,
-6022,
-118,
8739,
291,
-13768,
-19614,
-19918,
4594,
27370,
12110,
-23346,
12683,
16241,
6310,
31999,
17508,
-12745,
-30266,
-29875,
-26285,
-6541,
27561,
22483,
6410,
730,
-20819,
-4920,
16970,
30322,
20811,
-2352,
-18474,
-28680,
-28963,
-14782,
9003,
4829,
-5296,
-16614,
-17242,
-2589,
21640,
29860,
24572,
12112,
-9827,
-22086,
-14464,
542,
7077,
4118,
-9253,
-21061,
-22921,
-7313,
11610,
22774,
24597,
10261,
-7510,
-5921,
7375,
17687,
13771,
-10140,
-19086,
-23124,
-18088,
1020,
9662,
18633,
-3508,
-17791,
-9815,
-1723,
22263,
30208,
22473,
-191,
-32000,
-13533,
3934,
9743,
31999,
16269,
-16359,
-29221,
-28680,
-22248,
9451,
29788,
29450,
-83,
-17293,
-22912,
-8371,
25031,
29806,
17123,
-17899,
-28731,
-27489,
-20769,
10699,
30541,
12848,
-4683,
-18076,
-13152,
6992,
23936,
30066,
10384,
-9833,
-18463,
-19349,
-5939,
9986,
11834,
944,
-9936,
-6086,
2565,
14031,
18406,
10110,
-5255,
-10866,
-8165,
9972,
21386,
17161,
1810,
-23632,
-24820,
-17102,
3725,
25985,
20947,
10055,
-12921,
-25430,
-10420,
4149,
23509,
23044,
6923,
-8590,
-30146,
-24601,
3210,
18837,
28668,
25782,
-7888,
-30332,
-28128,
-24869,
4511,
25536,
30906,
2927,
-26732,
-19086,
-8380,
20608,
29129,
11135,
-19427,
-28852,
-25111,
-8941,
16307,
30646,
12914,
-16590,
-19707,
-12858,
8054,
21067,
24106,
1269,
-18004,
-14350,
-7697,
8947,
21677,
9452,
-8192,
-12932,
-3576,
5280,
12948,
13918,
-5571,
-16909,
-14510,
-2060,
15632,
26114,
16484,
-7516,
-27769,
-26382,
-9540,
15488,
31401,
15867,
-2166,
-20021,
-29044,
-10394,
10506,
26999,
22019,
3156,
-12900,
-32000,
-11077,
16711,
18954,
30583,
15012,
-22936,
-29856,
-28283,
-11347,
18226,
26098,
28505,
-10860,
-27451,
-5705,
5413,
26596,
21978,
-7883,
-26812,
-28698,
-16224,
11916,
21911,
27561,
330,
-28291,
-19031,
-1574,
15255,
15385,
10131,
-7236,
-19177,
-8846,
8194,
12713,
12316,
-2125,
-14688,
-13581,
3472,
14519,
10577,
10132,
-8665,
-21515,
-14146,
3805,
20147,
24224,
17292,
-7412,
-29000,
-20989,
-5462,
14079,
26905,
12158,
-7143,
-19325,
-21969,
-1609,
12002,
21713,
24746,
-2332,
-25530,
-27841,
3740,
19076,
22402,
29873,
-6116,
-30637,
-28547,
-22992,
10487,
24925,
28811,
12717,
-29333,
-17260,
3159,
18895,
27453,
1655,
-23748,
-28666,
-24616,
5058,
23678,
20251,
11580,
-20455,
-25514,
-6141,
16026,
14842,
3041,
-7737,
-16738,
-12150,
7434,
20371,
8591,
-3500,
-13858,
-14262,
-2952,
17116,
14659,
1515,
-4705,
-17142,
-18994,
-6656,
10189,
20185,
15298,
4504,
-16792,
-24620,
-7045,
4576,
17817,
15018,
1250,
-7382,
-20169,
-8581,
8949,
16292,
25442,
5900,
-24594,
-24862,
9690,
24604,
23003,
29218,
-5834,
-29775,
-28351,
-19141,
16318,
23999,
27458,
10697,
-28496,
-15289,
15407,
27405,
21748,
-1318,
-25890,
-28249,
-23766,
8295,
25144,
13620,
4769,
-17975,
-15303,
338,
22081,
17482,
-8055,
-17416,
-19750,
-8203,
14942,
21022,
4774,
-11418,
-16681,
-7034,
5728,
16680,
10415,
-10777,
-20433,
-13354,
-9474,
-3166,
7896,
13033,
7494,
-1063,
-14274,
-20152,
-8082,
486,
15340,
11813,
896,
-6717,
-23862,
-13035,
8567,
20277,
21763,
-9878,
-29999,
485,
21761,
23145,
30681,
1415,
-27746,
-27746,
-21781,
11676,
20145,
22842,
9791,
-21059,
-5833,
20503,
29867,
12966,
-10427,
-21473,
-24262,
-17343,
14859,
12625,
-2591,
-7807,
-3854,
13000,
16628,
28296,
11457,
-13458,
-20236,
-8913,
815,
8515,
13238,
3015,
-17658,
-11387,
13842,
13983,
9939,
2121,
-9927,
-19168,
-10037,
5902,
32,
-14289,
7225,
18265,
8126,
-4103,
-18426,
-14077,
-11443,
10460,
25298,
11723,
-5707,
-22591,
-22528,
2257,
20252,
20027,
-12961,
-26331,
12553,
16869,
21872,
25278,
-13486,
-27768,
-29252,
-7250,
20685,
2371,
3427,
-6125,
-15697,
13128,
28998,
25726,
4334,
-26406,
-17606,
-15411,
-5655,
14224,
-9835,
-22518,
-22639,
3454,
26179,
23758,
13286,
5578,
-13742,
-4547,
11680,
1225,
-13286,
-22667,
-5891,
-953,
1851,
14719,
11160,
-6320,
6132,
14596,
4290,
-8884,
-12767,
-17488,
-16618,
10675,
30777,
19072,
-14570,
-21826,
-10757,
-2065,
13356,
16005,
6830,
-6455,
-11924,
6144,
17260,
5256,
-726,
-20748,
-18419,
22848,
19171,
25924,
8498,
-22886,
-24228,
-15474,
16616,
22100,
-7731,
-23355,
2074,
1981,
22535,
26305,
8299,
-3687,
-11016,
14125,
3062,
-13807,
-23348,
-16830,
-19416,
-8015,
8075,
3168,
-5425,
5589,
24633,
27288,
17321,
-1866,
-7181,
-23236,
-11874,
6938,
421,
-22356,
-21536,
-4424,
7857,
18809,
19873,
7558,
-8142,
-5160,
-860,
-5775,
-160,
11249,
5118,
-14897,
-19375,
-8010,
-5251,
1773,
8280,
3070,
273,
762,
15049,
24796,
6008,
-515,
-5090,
-24123,
-15142,
21298,
10449,
9499,
-5299,
-8625,
-4851,
-6645,
26410,
5331,
-13582,
-9364,
10995,
2166,
4434,
8970,
3832,
3796,
2034,
14338,
-5475,
-15094,
-6881,
95,
-2444,
-3793,
-8648,
-13560,
-9381,
1921,
16055,
11154,
7193,
5386,
-1262,
-1093,
1439,
6297,
753,
-7424,
-6030,
-4875,
-1425,
1423,
2126,
-2098,
-11352,
-14677,
-16396,
1495,
23914,
15668,
1885,
-17959,
-13188,
3588,
10197,
9632,
-5246,
-6208,
-3653,
1424,
1780,
1635,
-5997,
-11446,
-1477,
8478,
7552,
-381,
-1344,
6750,
12205,
4869,
4850,
-5453,
-11728,
-1541,
8478,
9239,
-1398,
-3721,
-1343,
1912,
5940,
8139,
3443,
-6297,
-5116,
1347,
126,
55,
4438,
7015,
-1035,
-8084,
-4690,
2762,
4388,
4704,
9506,
-1738,
-12977,
-6713,
3812,
2416,
611,
2735,
-4221,
-5994,
-1075,
5452,
3989,
-2062,
-1811,
-5473,
-6056,
202,
3439,
-3923,
-11079,
-5568,
998,
1882,
3177,
6177,
1658,
587,
4477,
2613,
-4376,
-6840,
-5132,
-1567,
3049,
5093,
2310,
1876,
7555,
4599,
4488,
-163,
-5737,
-5689,
-6744,
-564,
5377,
3437,
7086,
6622,
348,
2858,
2285,
3126,
-363,
-3563,
-830,
-2591,
-6654,
-2772,
2947,
3291,
-353,
-4969,
2353,
4629,
5392,
8191,
488,
-5420,
-8166,
-2529,
-1197,
-6096,
-6910,
-892,
5212,
3536,
3840,
2456,
-2578,
-2841,
4828,
4030,
-3837,
-13083,
-10283,
-5116,
-4398,
3411,
4706,
1536,
-194,
6567,
14364,
10380,
-142,
-5573,
-10594,
-8597,
-1492,
3482,
1021,
-5233,
99,
10213,
16228,
11323,
5873,
-2171,
-5933,
-2486,
-624,
-1511,
-7790,
-7508,
1966,
6995,
6170,
6821,
2856,
-1640,
14,
6513,
7469,
-2377,
-8594,
-6419,
-1471,
1702,
2449,
-712,
-2032,
-471,
4715,
8680,
1838,
-552,
-3159,
-2675,
-2867,
-3581,
-4388,
-4878,
-2495,
-2836,
3669,
926,
203,
958,
-449,
468,
-4043,
-6153,
-3240,
-1947,
-4038,
-3641,
-2000,
-3641,
-601,
8600,
13777,
5833,
-3158,
-812,
-2684,
-868,
1145,
61,
-6437,
-8588,
3824,
11225,
6696,
3774,
5579,
-283,
1678,
6549,
2220,
-8467,
-9159,
-1336,
2949,
5409,
2334,
1126,
-2262,
136,
5737,
7891,
5335,
-6162,
-5616,
539,
975,
2328,
-675,
-7251,
-10121,
-929,
7819,
4091,
1668,
-781,
-1211,
2571,
4511,
2776,
-6130,
-9839,
-6802,
-2457,
2390,
1880,
-736,
-3693,
-2551,
289,
2864,
4272,
1749,
-2625,
-5921,
-4448,
-2620,
-2088,
-715,
3376,
3252,
511,
1159,
2773,
3266,
416,
-347,
-625,
-4089,
1178,
6713,
4208,
-852,
-806,
4461,
3967,
3087,
2541,
-2634,
-4055,
1587,
5136,
6398,
1625,
-333,
157,
-1092,
329,
1204,
-1344,
-5192,
1035,
7356,
7088,
2733,
586,
234,
-2919,
-2022,
2030,
899,
-4672,
-4282,
264,
3182,
3354,
1312,
-1116,
-4746,
-6115,
-1842,
7,
-2906,
-3978,
-3144,
-1835,
1057,
3224,
2679,
-595,
-3248,
-3797,
-2900,
-1049,
-578,
1319,
1588,
1467,
893,
-622,
581,
1916,
1926,
2824,
924,
-276,
1167,
3707,
3850,
-1122,
-797,
-84,
-2237,
-369,
2561,
-2271,
-727,
2343,
3904,
5433,
4631,
5340,
-28,
-759,
-2204,
-3691,
-4993,
-7573,
-1449,
2981,
4561,
4399,
1454,
-227,
1278,
916,
540,
-1730,
-5944,
-3088,
-2449,
743,
1095,
338,
-1012,
-2171,
-2818,
-2128,
-1201,
-4329,
-1802,
-3280,
-958,
337,
412,
1735,
-1634,
-2827,
-2011,
-2121,
-803,
568,
-484,
1977,
1694,
1994,
1394,
-899,
-341,
1439,
812,
799,
2662,
2139,
5661,
1673,
3635,
624,
-67,
2970,
-2993,
-2586,
-4203,
-456,
2045,
5995,
7042,
3847,
4301,
5544,
1884,
667,
-2148,
-3821,
-6157,
-4037,
1681,
2113,
4215,
-64,
2556,
2041,
3857,
5284,
784,
-4428,
-3882,
521,
-691,
1515,
-530,
-2925,
-2332,
-21,
396,
-2372,
-2179,
-2890,
-1212,
2600,
2048,
36,
-1950,
-2553,
-1909,
-781,
125,
1,
315,
1785,
3635,
4281,
4270,
1647,
-1422,
-1759,
-1329,
2489,
314,
-1198,
761,
676,
3027,
3583,
6021,
4586,
74,
-1291,
-2694,
-5882,
-2055,
129,
-323,
1468,
527,
1861,
2013,
3069,
500,
-1394,
-2904,
-4014,
-1824,
-1552,
-2564,
-2623,
-1324,
-2958,
-1476,
1526,
543,
-1926,
-2600,
-963,
-1470,
-1410,
-431,
-2673,
-2137,
-3123,
-3652,
-1505,
-3259,
-4481,
-2557,
-169,
1538,
1785,
1133,
-98,
-1750,
-902,
-641,
-486,
-1804,
-1687,
-182,
2313,
5036,
5558,
4239,
584,
826,
1404,
4075,
3278,
1105,
1240,
55,
2000,
3340,
5869,
6038,
3722,
2594,
2067,
1046,
1590,
1638,
853,
2093,
2519,
3936,
1641,
1721,
2430,
-151,
75,
-371,
1885,
761,
-1490,
1243,
871,
-178,
-250,
43,
250,
-1687,
-2420,
704,
1199,
-110,
-321,
-2360,
-2567,
-2735,
-1462,
-1929,
-5890,
-5340,
-2970,
-2106,
1295,
1895,
-783,
-974,
-2465,
-666,
1164,
149,
-1512,
-5214,
-3703,
255,
2521,
5226,
2538,
-853,
-499,
553,
3295,
2669,
786,
-1791,
-2189,
-589,
166,
2358,
1597,
912,
440,
986,
577,
-260,
-67,
-1003,
-69,
869,
2215,
710,
-1674,
-1007,
-299,
-438,
-583,
-3,
-30,
-1817,
-946,
1699,
2502,
1152,
-1608,
-1610,
-1683,
-640,
475,
67,
-741,
-1609,
-408,
496,
522,
-53,
-2060,
-3765,
-2875,
-1425,
508,
-424,
-613,
948,
614,
465,
178,
171,
298,
805,
323,
-763,
49,
-752,
20,
3838,
2727,
1894,
1720,
1801,
3388,
1300,
327,
182,
-851,
1431,
2714,
3125,
2112,
1743,
2028,
1135,
998,
-209,
-405,
160,
12,
1422,
2147,
-709,
133,
242,
-455,
1858,
576,
705,
355,
-2316,
225,
757,
875,
-66,
-1576,
-2236,
-2390,
-764,
-919,
-2284,
-3435,
-902,
-92,
996,
-66,
-1276,
-2777,
-3896,
-2132,
-561,
-1301,
-2447,
-2414,
-820,
384,
-63,
1008,
28,
-462,
503,
1676,
928,
649,
-921,
-181,
429,
1285,
2719,
3298,
1979,
2391,
933,
2787,
-848,
762,
6334,
-2992,
3780,
4550,
840,
-3965,
380,
-643,
46,
2987,
-1202,
5107,
-1825,
115,
1851,
2333,
-1921,
-795,
1915,
-1419,
-4387,
-4461,
6045,
1408,
-4565,
607,
2998,
-1660,
-867,
3063,
1848,
-2359,
-1955,
-1725,
-2050,
-3597,
-2819,
2092,
-1546,
-1848,
-727,
611,
-137,
-2479,
-1373,
-2543,
2358,
1280,
-1965,
1916,
354,
-92,
-104,
3667,
2602,
-1667,
3227,
3078,
-166,
-1007,
-527,
-626,
2178,
3248,
3150,
3213,
-502,
-507,
610,
2428,
4957,
4734,
531,
-1535,
-3289,
-2458,
725,
-545,
-4695,
-980,
4090,
702,
-1986,
569,
4555,
1566,
2249,
-727,
-702,
-346,
-4939,
-3404,
-643,
583,
-3544,
-488,
364,
-98,
-1313,
-1930,
516,
-280,
-2416,
-1567,
-1215,
-4130,
-2571,
-2534,
2496,
-1883,
-6762,
594,
4837,
70,
-2936,
3053,
1984,
-847,
2831,
1106,
-1153,
1338,
-461,
445,
300,
1911,
5290,
1604,
1342,
3458,
5087,
5265,
-1162,
-704,
2699,
1971,
-294,
-1741,
3528,
2544,
-167,
-1715,
1727,
1309,
-1154,
699,
892,
1859,
76,
136,
-296,
624,
-2348,
-1422,
226,
-289,
-3308,
-1708,
-1294,
-2037,
1700,
-1250,
-932,
832,
-72,
-1987,
285,
-917,
-1686,
341,
1141,
-3591,
-5221,
-1432,
51,
-1541,
-4431,
-1657,
1066,
-389,
1477,
-1965,
1526,
5287,
2260,
392,
-6548,
812,
4000,
-584,
-2805,
830,
4747,
3245,
-1929,
3425,
5555,
1721,
5364,
3963,
1373,
-3417,
1750,
3974,
870,
998,
213,
-825,
1331,
2266,
2119,
2989,
-645,
1371,
3120,
-645,
-2038,
66,
2356,
-129,
-1119,
905,
4609,
4316,
1343,
-274,
-1257,
-1770,
-1836,
-3583,
-4971,
-2726,
-2563,
-529,
-2253,
-2743,
-328,
3021,
2445,
1206,
-420,
2590,
2453,
806,
-1150,
-3602,
-1991,
-5215,
-3664,
-850,
-4534,
-6869,
-186,
1451,
1690,
-2317,
1195,
7912,
4821,
7052,
4677,
-20100,
-3845,
12690,
15357,
11278,
-13359,
-3359,
3945,
-822,
117,
-3696,
-12632,
-1627,
-1875,
9701,
312,
-11892,
895,
9337,
13876,
6179,
-3378,
1892,
8554,
1344,
6571,
-7657,
-11932,
-12046,
-7866,
-4573,
-10269,
-11541,
-6260,
-2337,
2426,
7054,
6522,
10654,
8062,
11058,
11404,
6399,
1585,
-4129,
-6551,
-4499,
-7118,
-9163,
-13001,
-9907,
-6172,
-1088,
-3071,
-7817,
1094,
10193,
17926,
10249,
4297,
5889,
8527,
4063,
67,
-2550,
-1379,
4069,
-26438,
-13347,
16571,
23535,
24179,
-7707,
-11695,
-5344,
-8409,
12685,
24715,
-10969,
-16979,
-15103,
4632,
20419,
-3866,
-589,
1885,
2607,
13833,
19385,
15267,
4672,
-18977,
-10487,
-3063,
-8474,
-11432,
-19402,
-17142,
-11421,
-3625,
12583,
17613,
9178,
14865,
14208,
17208,
14313,
4580,
-953,
-11587,
-17073,
-14493,
-16210,
-17904,
-16118,
-15112,
-8349,
2521,
16566,
27054,
17921,
-2460,
2912,
13602,
17210,
3550,
-17286,
-15100,
-14128,
-19596,
-13542,
3234,
4000,
-1845,
6757,
23570,
-15515,
-5662,
27166,
22209,
30508,
7200,
-11240,
-22790,
-30326,
-16045,
16541,
2941,
-5693,
-15841,
-15613,
10471,
20722,
27740,
28683,
6850,
-8300,
-11121,
401,
7924,
-13244,
-12640,
-25411,
-29107,
-23538,
-3812,
16742,
21714,
3034,
12794,
12744,
15459,
24822,
13592,
6947,
-13543,
-20663,
-21556,
-12616,
-12180,
-5979,
-14692,
-10651,
-13174,
2002,
20367,
29741,
26660,
15097,
1347,
-16406,
-5883,
-2109,
6791,
-3230,
-15973,
-17542,
-12467,
-8738,
11027,
16609,
21226,
11952,
2270,
10974,
10098,
-21138,
-2337,
23437,
6572,
23835,
-7863,
-12180,
-19419,
-30970,
-7791,
13974,
13972,
9088,
804,
1006,
665,
5311,
27910,
22373,
1156,
-12338,
-20072,
-17905,
-15030,
-16806,
5816,
-7838,
-3428,
-9141,
-5306,
2906,
9496,
19513,
26222,
11794,
-5407,
-1793,
-12747,
892,
-12684,
-5951,
-6513,
-10766,
-14977,
-10260,
-6299,
2403,
4929,
10793,
16630,
2814,
4665,
499,
4282,
-9135,
284,
-1558,
1560,
-8880,
-12650,
4221,
1878,
610,
5500,
10363,
4683,
495,
3328,
14166,
7221,
-4959,
-28701,
3827,
11711,
12607,
28304,
5774,
-5910,
-26762,
-28487,
-13989,
5083,
19657,
24912,
17229,
-1609,
-21033,
-12682,
6132,
17347,
13548,
15720,
-4667,
-19939,
-25857,
-25325,
-7471,
-1255,
10880,
2154,
-215,
-9400,
-3708,
-6153,
7619,
22869,
25223,
18208,
-3852,
-13648,
-24029,
-18699,
-6975,
11484,
5165,
-2262,
-13403,
-13997,
-8094,
3720,
14254,
22542,
19943,
14128,
-833,
-15884,
-2893,
-2099,
10269,
5406,
1513,
-3752,
-16187,
-14152,
-227,
8043,
14368,
11949,
10929,
10404,
-1735,
-23515,
-6241,
18562,
8635,
27060,
14618,
-1089,
-18365,
-31876,
-23742,
-12600,
6051,
24449,
27800,
13167,
-7754,
-16629,
-12139,
122,
8204,
16565,
21933,
-1459,
-9952,
-23747,
-26558,
-22050,
-10426,
7691,
9889,
5684,
-2271,
-9445,
-12712,
2818,
14521,
18831,
15555,
6827,
-7452,
-15073,
-16925,
-9432,
-3496,
-3375,
-318,
-3195,
-3624,
-1392,
7098,
10313,
15702,
13218,
9867,
-3676,
-3793,
2095,
1374,
2344,
-2995,
2672,
-4654,
-10555,
-7010,
3993,
10564,
11867,
8528,
8657,
1637,
-2221,
-20111,
-368,
18781,
4328,
19250,
9855,
-273,
-18353,
-30820,
-17685,
-5456,
1822,
13289,
18959,
12489,
-2673,
-3756,
-8573,
-1247,
1237,
6242,
14324,
3054,
1410,
-13981,
-14880,
-20705,
-14324,
-10768,
-5811,
4369,
1208,
241,
-1335,
4697,
9134,
9599,
7953,
9371,
3842,
-4634,
-8564,
-7119,
-6497,
-5033,
-6303,
-3706,
-1040,
2979,
4757,
6471,
7313,
5356,
5693,
-5090,
-272,
1581,
3585,
5923,
5426,
6878,
2001,
-4327,
-3136,
-426,
-2365,
3962,
3794,
6575,
1666,
-3196,
-9539,
-5138,
-7876,
-571,
18801,
7573,
6059,
4165,
-34,
-7543,
-11901,
-288,
5718,
7294,
854,
-2073,
-3969,
-16636,
-10081,
-3091,
8352,
6657,
2870,
4450,
-2313,
-3222,
-8781,
-801,
-158,
-228,
-553,
-5034,
-6160,
-4236,
-1336,
-1821,
3550,
6269,
4324,
546,
-1184,
2165,
548,
922,
6907,
4828,
2496,
2960,
3473,
4006,
1081,
-163,
2880,
-498,
-5316,
-5555,
-4232,
579,
2049,
3473,
7930,
7616,
5828,
4073,
378,
-2886,
-5666,
-3041,
-1326,
-3791,
-4886,
-3416,
-2268,
-2773,
1921,
5470,
-1505,
4785,
11521,
6109,
4623,
3324,
3511,
-9093,
-12794,
-6102,
-3261,
-541,
-6955,
-5225,
632,
-2824,
-1924,
2266,
8052,
2915,
-2372,
-938,
-2957,
-1449,
-5198,
1490,
7379,
1004,
724,
737,
-3844,
-3391,
-4651,
1627,
5508,
1826,
3453,
105,
-1193,
1088,
3275,
3737,
9120,
6889,
6670,
7439,
-188,
-1861,
-3055,
-2457,
-1542,
-609,
200,
1275,
-2255,
-1823,
639,
261,
5692,
5182,
5371,
4140,
-2356,
-6650,
-7312,
-3465,
-2528,
559,
1937,
1209,
-2953,
-7405,
-1534,
4136,
5015,
-3406,
-2302,
5828,
652,
-5163,
-1150,
4405,
-4860,
-11998,
-5344,
-47,
906,
-4168,
-3117,
3352,
-4598,
-9414,
-5591,
1638,
4132,
-1251,
4703,
9676,
4570,
-640,
349,
5336,
2904,
-5317,
-5093,
-1338,
-2480,
-6223,
-4144,
3241,
4174,
2312,
5696,
10970,
7401,
6419,
4886,
3219,
666,
-3441,
-2687,
-3446,
-1808,
-105,
1837,
1377,
3837,
3467,
3734,
3438,
1534,
950,
1848,
-545,
-2198,
-1499,
-5291,
-3357,
-5746,
-3659,
-563,
-745,
-641,
521,
1415,
1320,
-461,
-878,
-117,
-1775,
-4562,
-6825,
-9924,
-7048,
681,
578,
3966,
4030,
3126,
-3274,
-5062,
-411,
3502,
2193,
-2508,
-2046,
-3310,
-3288,
-2300,
4162,
9558,
6901,
1322,
1145,
261,
-541,
374,
3570,
6790,
3731,
201,
-2952,
-4123,
137,
1625,
4538,
5693,
2038,
-1349,
-5777,
-4848,
-1736,
1404,
5927,
10047,
7880,
2757,
400,
922,
2999,
3560,
2959,
3264,
1001,
-3985,
-5296,
-2589,
-1470,
1743,
3184,
1529,
-158,
-2874,
-1677,
-22,
-2237,
-911,
260,
-480,
217,
-1082,
-645,
-1627,
-1407,
6,
3770,
3526,
4246,
3766,
1640,
-156,
-166,
3347,
4367,
2715,
-1561,
1469,
815,
-685,
-2294,
1990,
4475,
298,
-2059,
-2835,
-2629,
-3615,
-2454,
1051,
5637,
3481,
2084,
1541,
49,
-230,
-432,
-537,
385,
-3466,
-5674,
-5879,
-7424,
-5160,
-2951,
-598,
-546,
-691,
-342,
490,
-827,
-1453,
1501,
1116,
-1435,
-1615,
-1633,
-1597,
-2470,
-4252,
-2418,
-2605,
-4153,
-3815,
-2733,
-142,
-1739,
-2575,
-817,
-854,
-588,
-1378,
-935,
-1370,
-671,
-2036,
-1850,
2610,
1929,
3067,
1582,
2324,
3292,
168,
1856,
1442,
-449,
192,
-337,
2300,
8173,
7332,
3633,
2993,
4765,
4140,
1621,
385,
176,
-526,
-2270,
-3647,
-1537,
1942,
626,
1171,
4466,
2464,
950,
1449,
1144,
545,
-231,
942,
1146,
2285,
986,
333,
1156,
-570,
-943,
-787,
-157,
-184,
623,
-1173,
-3453,
-3208,
-2128,
-963,
-867,
128,
237,
-185,
-664,
-336,
829,
1193,
-978,
71,
2480,
1625,
127,
718,
1152,
92,
-86,
1698,
3338,
1850,
1089,
-460,
500,
-514,
-1550,
-243,
561,
-988,
125,
1115,
416,
1031,
425,
2587,
421,
1961,
1974,
-1134,
-903,
-535,
-1004,
-974,
1014,
545,
-736,
-1064,
-533,
-572,
-1134,
-170,
433,
692,
-1036,
-3125,
-2281,
-1896,
-1995,
-443,
2614,
1173,
-1646,
-3041,
-1650,
-419,
-734,
-405,
-109,
727,
-1171,
-1491,
-463,
1012,
1425,
1019,
2268,
2276,
-184,
-1269,
-47,
-752,
-51,
-378,
173,
2438,
1147,
-484,
-343,
1082,
1960,
3442,
3726,
5369,
4887,
1350,
628,
886,
1239,
-1247,
266,
1959,
1262,
2011,
591,
-985,
-699,
-80,
8,
126,
-193,
-753,
-2162,
-1138,
-294,
376,
598,
-664,
380,
814,
-196,
-212,
744,
619,
-296,
-768,
-892,
-643,
-859,
-2252,
-2798,
-404,
-1036,
-2316,
-1651,
-2473,
-2733,
-1829,
-425,
-200,
-634,
-584,
-538,
-614,
34,
-335,
70,
180,
-460,
-1346,
-21,
1310,
593,
1188,
1885,
1326,
1258,
2295,
2006,
2336,
1674,
961,
999,
1770,
968,
465,
426,
-1080,
-1573,
-878,
-59,
147,
1754,
1441,
1060,
713,
534,
179,
-940,
-638,
-1897,
-697,
-2015,
-1345,
96,
-1070,
-554,
-702,
1559,
107,
163,
-365,
971,
688,
-547,
387,
-1293,
-262,
-1972,
-568,
105,
-308,
-29,
-1872,
-640,
1168,
-1238,
-916,
208,
-141,
-327,
-363,
1616,
1594,
1048,
163,
1610,
1070,
923,
430,
1550,
2632,
1017,
2601,
2319,
2550,
2785,
1965,
1253,
2207,
2372,
1903,
2914,
2096,
1174,
591,
266,
-738,
-1397,
-889,
-1045,
-113,
774,
151,
1031,
1197,
-1460,
-1644,
-888,
-847,
-765,
-403,
-354,
-983,
-730,
535,
-129,
108,
881,
-205,
111,
-1380,
-1691,
-1606,
-1124,
-2000,
-2245,
-679,
-1458,
-844,
84,
-625,
-670,
33,
-491,
185,
187,
-164,
-132,
-418,
-158,
20,
1131,
1870,
910,
791,
2507,
2637,
1632,
1906,
1470,
1067,
590,
657,
1255,
1447,
6,
524,
2261,
1240,
1529,
860,
1719,
1483,
-214,
741,
117,
264,
-1008,
-259,
-1171,
-1923,
-436,
-1040,
1374,
-706,
-22,
-1675,
-1648,
-1786,
-3362,
-380,
-1833,
-999,
-1331,
-1622,
-874,
-899,
-566,
-699,
-2227,
-1330,
-2733,
-3406,
-3185,
-3772,
-3586,
-4422,
-3508,
-1644,
-955,
-1962,
-990,
-448,
129,
115,
946,
612,
-407,
127,
-633,
47,
1289,
793,
1089,
2000,
2774,
2008,
2283,
2542,
2744,
3400,
2082,
2190,
2206,
2069,
2322,
1929,
2745,
1902,
1283,
2183,
2149,
3444,
2126,
2317,
1512,
1365,
1637,
1225,
1440,
-196,
441,
1066,
2458,
2007,
2187,
1543,
-69,
-419,
846,
1045,
153,
256,
-236,
214,
18,
-476,
-807,
-477,
-1183,
-1559,
-863,
-1545,
-2378,
-1911,
-1484,
-1651,
-1238,
-223,
-515,
36,
-390,
-573,
354,
663,
1044,
627,
871,
222,
527,
79,
1169,
973,
870,
2094,
1192,
1102,
41,
228,
-500,
-75,
-474,
-692,
198,
-1613,
-113,
-575,
-445,
319,
636,
1060,
-398,
477,
-322,
-811,
11,
-254,
-1660,
-1510,
-2360,
-2104,
-1601,
13,
-77,
-199,
112,
-319,
-524,
488,
1316,
-4642,
103,
-441,
-2023,
2937,
-783,
-6629,
-2878,
2363,
-2502,
-1519,
1826,
-1623,
-701,
2916,
1652,
-541,
-2264,
-744,
309,
-558,
137,
3776,
2022,
-1820,
85,
3849,
1377,
-876,
4301,
2850,
850,
2181,
2607,
1294,
-323,
2298,
2471,
345,
23,
53,
-782,
1101,
3391,
-1066,
555,
3037,
-1293,
-97,
1950,
1898,
-3253,
2041,
2977,
-4279,
-304,
1167,
516,
-589,
-3449,
184,
2389,
-4724,
3375,
1463,
-3061,
-307,
-6,
2532,
-2384,
-2450,
-4,
-1836,
-1957,
-2750,
-268,
3902,
-4556,
-4122,
8821,
805,
-7225,
5259,
1478,
-6312,
-1695,
7265,
-1908,
98,
5801,
347,
-3125,
-165,
7081,
3338,
991,
1210,
6658,
-1985,
375,
1650,
1556,
642,
-2981,
4994,
731,
-2786,
6533,
-1257,
-3892,
2413,
1066,
1744,
-6072,
1343,
995,
-2896,
4643,
-538,
-2218,
1743,
-2333,
-720,
-2370,
-3135,
1035,
-3389,
-139,
-669,
-2424,
2870,
-1394,
1010,
1195,
-3136,
543,
276,
-3864,
-392,
-1861,
-1069,
-825,
-2864,
6,
-6174,
-2350,
112,
-1040,
652,
-384,
-2234,
195,
1318,
2375,
-2859,
-122,
4580,
-3839,
1082,
2746,
-2201,
2538,
2390,
1136,
1684,
4475,
2471,
-2947,
3623,
-118,
2199,
5647,
-1064,
1343,
1032,
2358,
1503,
-1105,
7719,
-5391,
-1967,
4394,
-1712,
4240,
-1413,
2178,
-1690,
-2994,
3644,
-986,
431,
3689,
-3815,
622,
325,
-1565,
408,
238,
825,
-6986,
646,
1976,
-6578,
485,
388,
-5948,
2333,
1503,
-3478,
-3785,
180,
1368,
-6750,
-2297,
1225,
-6000,
-801,
2894,
-1125,
-1189,
2755,
3166,
-5928,
3321,
4256,
-4553,
1813,
2916,
-1000,
1620,
4081,
1071,
1655,
2416,
163,
-1236,
5385,
77,
-637,
5648,
-1735,
3695,
4755,
401,
-189,
2676,
1443,
-1208,
1439,
-817,
1946,
1322,
-2356,
958,
1468,
-1363,
2927,
5072,
1587,
-2008,
1328,
-1945,
-1717,
4903,
-2109,
218,
2382,
-1309,
550,
-1156,
1501,
-2232,
-1198,
2792,
-7284,
3290,
-764,
-2353,
2579,
-4522,
2574,
-3500,
-225,
40,
-1680,
4176,
-2865,
647,
6875,
-3210,
806,
4699,
-557,
-1271,
1139,
3605,
-6349,
786,
3000,
-1545,
3977,
3583,
-1174,
637,
3888,
-306,
-2279,
4022,
90,
-4658,
5109,
-1488,
-2461,
2023,
-682,
-318,
-2139,
964,
-2665,
-3254,
1691,
-3187,
3385,
510,
-4149,
3322,
-451,
-2773,
542,
1093,
-2711,
791,
-177,
-3084,
-468,
-2200,
-2247,
1957,
-4780,
-4168,
1018,
-1512,
1918,
-2432,
268,
-2916,
-3233,
1533,
-3361,
2368,
-1694,
370,
2020,
-5041,
3454,
-640,
-877,
2612,
1776,
4286,
-2,
1363,
2219,
-311,
2548,
948,
1904,
5587,
-2506,
1849,
2291,
-2556,
910,
1420,
2192,
1833,
4448,
2617,
-2143,
3324,
277,
-4764,
756,
-2854,
-5559,
-631,
-954,
-1192,
1283,
1983,
496,
147,
1530,
-1081,
381,
447,
-2226,
-828,
-40,
-2114,
-670,
-854,
-2270,
-614,
-918,
-995,
-1226,
-693,
1777,
-2553,
-1612,
670,
-1439,
98,
-178,
3245,
1230,
-1346,
2514,
-598,
-3009,
2357,
-2119,
-446,
1666,
559,
2004,
2444,
4549,
1055,
3525,
6351,
-1840,
2163,
4416,
-2236,
1939,
6784,
4050,
2167,
5687,
1625,
-1683,
3372,
2115,
-3919,
8634,
-485,
99,
4959,
-3968,
1775,
-587,
-1543,
141,
163,
-646,
-760,
-1757,
1979,
-4536,
194,
3565,
-979,
1676,
1147,
2329,
-1119,
-311,
2211,
-3559,
-2520,
-376,
-5573,
-7268,
-2148,
-3671,
-8394,
-4379,
-2879,
250,
-1349,
-687,
259,
-1312,
1664,
-820,
-1378,
2507,
666,
514,
-259,
371,
1069,
-1181,
10,
814,
799,
-2750,
-1812,
1859,
-1072,
269,
895,
-3710,
242,
1206,
-1614,
-271,
277,
3615,
7925,
-952,
3984,
3396,
-7715,
8918,
19935,
-990,
-5474,
11039,
-2695,
-6536,
378,
-4831,
-8025,
-608,
4388,
-6199,
-5618,
5357,
1241,
-1050,
6146,
4038,
5751,
6684,
7064,
3908,
-1069,
2807,
127,
-6181,
-4576,
-5365,
-9442,
-7988,
-6211,
-3513,
-7939,
-863,
4632,
-5321,
2135,
11755,
8082,
2975,
6055,
7662,
2301,
1649,
3097,
-2482,
-7,
2770,
22,
-3063,
-2988,
-2027,
-7673,
-4488,
2252,
461,
-2920,
1785,
2529,
1143,
-3194,
2228,
1645,
-748,
7833,
5044,
-16609,
-17080,
22219,
-4546,
-4361,
23124,
-10468,
601,
10638,
-4722,
-2603,
-13748,
218,
12348,
-19833,
-12494,
12897,
-2118,
2336,
2686,
-2941,
9928,
229,
11562,
1610,
-14581,
6129,
4614,
-13261,
-14306,
-11240,
-6022,
-7270,
-15825,
-2968,
-5269,
-2975,
8685,
1565,
3665,
12193,
9357,
8437,
3307,
6041,
9900,
-1495,
3695,
4392,
-794,
-74,
3043,
-97,
595,
-5652,
-4848,
12680,
449,
1292,
3585,
1700,
12845,
4245,
-186,
11391,
6638,
7468,
16207,
-1300,
-21773,
16708,
14837,
-18643,
11528,
-9363,
-691,
13107,
-18566,
1950,
-6105,
-16094,
17493,
2674,
-26208,
883,
10163,
11285,
5458,
-15695,
15936,
11210,
-4329,
7156,
-7242,
-8145,
-1143,
-5050,
-12409,
-12876,
-21216,
-1026,
-481,
-17677,
-4258,
-1773,
7513,
4475,
-1180,
6410,
7877,
2199,
15735,
7458,
-5262,
2140,
3647,
991,
-11576,
-9175,
5023,
715,
-12819,
-4746,
-13126,
5186,
7471,
-10141,
-550,
-1932,
11554,
13929,
-6385,
1734,
18379,
3756,
7218,
6500,
-3199,
-23095,
-7357,
29367,
-7566,
-15140,
-11952,
-3067,
19760,
-16282,
-11703,
7914,
-11520,
-263,
17733,
-6160,
-16666,
4361,
14253,
24327,
-7705,
-16384,
20644,
11485,
1633,
-6636,
-12822,
-4058,
837,
-7946,
-7379,
-12864,
-21715,
7444,
3676,
-2067,
-3842,
-4452,
19341,
24413,
4896,
2274,
11200,
15364,
20804,
-2792,
-1388,
-1342,
-2798,
3626,
-3675,
-16062,
-9537,
-753,
2749,
-9393,
-16175,
17095,
15641,
325,
-5157,
8841,
24252,
7975,
-7667,
11931,
8576,
-6586,
2535,
2344,
-2273,
-19660,
-24679,
20781,
6789,
-18146,
-13960,
-12582,
26781,
5501,
-20474,
4450,
-182,
-11352,
20307,
5000,
-17457,
-8056,
-5924,
23791,
11505,
-26913,
-5979,
12234,
12514,
203,
-20502,
-13495,
-1342,
-4668,
-8198,
-5603,
-24896,
-5705,
6272,
7679,
7215,
-7142,
7672,
21126,
19187,
7145,
8799,
-452,
11765,
6493,
222,
-453,
-13208,
-2867,
-539,
-8842,
-6583,
-4042,
-602,
-41,
-4667,
20164,
13864,
9092,
3381,
1839,
21998,
10105,
-9659,
2514,
9561,
-26,
-8408,
-8553,
-426,
-16952,
-24014,
12435,
18482,
-4627,
-11670,
-15961,
15025,
17333,
-5523,
-16,
-965,
-10684,
6122,
5393,
-3632,
-10811,
-20214,
4392,
15777,
-8014,
-11005,
-2221,
3341,
10333,
-7282,
-10142,
-6158,
-11142,
-14643,
19,
-5706,
-6721,
-6501,
-7384,
16300,
14082,
4761,
6515,
8020,
9623,
19301,
5211,
-1589,
-2529,
-4385,
4657,
1483,
-6788,
-7046,
-5697,
-4202,
7519,
1863,
-979,
-6590,
9313,
28004,
16798,
1773,
-4590,
11847,
12006,
5119,
-2474,
53,
-2798,
-2845,
-873,
-1734,
-3650,
-16052,
-24466,
3044,
31295,
7096,
-191,
-15801,
-4410,
20783,
1988,
1537,
7564,
-16205,
-14569,
6306,
6343,
-914,
-17607,
-20484,
12877,
14263,
386,
3907,
-9974,
4331,
5590,
-2121,
-1507,
-4272,
-19232,
-7792,
977,
1304,
-1136,
-12168,
11572,
14673,
8418,
7142,
12115,
8614,
12170,
-2562,
375,
5569,
-9574,
-5037,
-5401,
-163,
-2763,
-7003,
-4693,
2056,
-5475,
-6536,
-1096,
16621,
17817,
551,
-2342,
3632,
9514,
1574,
-9008,
-4836,
6751,
-4576,
-9263,
-6147,
-4005,
-7092,
-16493,
-10449,
-214,
-13618,
13271,
17501,
4072,
10900,
-18385,
-9070,
1388,
-1191,
2253,
611,
-15570,
-13663,
-8570,
-14498,
1913,
7118,
2745,
3608,
-6836,
6555,
21021,
9704,
4276,
-8440,
-11870,
-8908,
5647,
-1900,
-10833,
-16344,
-7698,
7515,
6916,
11616,
6282,
6300,
10773,
18103,
14587,
11620,
964,
645,
-4547,
-9819,
553,
6931,
2518,
-8786,
-13443,
-4297,
5340,
-3395,
-2908,
-5053,
8254,
14094,
12804,
12297,
2720,
6434,
5314,
-218,
2510,
4554,
-1982,
-3750,
-6758,
-7468,
-4295,
-7675,
-8326,
241,
-7285,
-20691,
9972,
18538,
18235,
19250,
-14960,
-7451,
-8233,
-5547,
8633,
6473,
-4707,
-19415,
-21918,
-12349,
10458,
9826,
8182,
89,
-4165,
5473,
5132,
11207,
15959,
285,
-9603,
-15209,
-16073,
-2295,
2499,
-3165,
-3593,
-13331,
-10290,
5357,
12780,
21366,
12643,
4953,
2237,
4698,
6252,
12803,
5107,
80,
-7608,
-16090,
-1730,
-820,
-1221,
-4302,
-8421,
-9724,
-8164,
-9218,
13200,
21365,
16422,
10102,
-626,
6817,
6757,
1238,
446,
3807,
-6371,
-9430,
-13126,
-6513,
4359,
-5358,
-14445,
-5220,
2735,
2611,
-16438,
568,
24820,
18188,
27217,
341,
172,
-6453,
-22125,
-4488,
18443,
16920,
-10479,
-20673,
-22106,
-7109,
-1002,
12239,
24284,
11090,
-3556,
-8120,
12211,
27517,
14260,
1666,
-6278,
-11539,
-17931,
-13064,
-6496,
-2679,
-10805,
-17956,
-8923,
-1779,
8759,
10749,
19697,
16941,
7021,
-3208,
-548,
5878,
9150,
2356,
-10294,
-13885,
-20481,
-20526,
-10015,
7866,
2127,
-8306,
-19298,
-5775,
7435,
16990,
18714,
5760,
423,
-12717,
-13952,
2522,
10911,
2044,
-3916,
-11604,
-3445,
-1051,
-2510,
-4875,
1089,
992,
-652,
-1798,
-5481,
-11651,
1555,
23281,
21000,
29191,
4833,
-5820,
-14583,
-16219,
1261,
11197,
5402,
-4458,
-12341,
-20926,
-9368,
-4157,
12876,
25848,
20286,
12925,
-416,
-4904,
11666,
12459,
11538,
2528,
-12529,
-22903,
-26805,
-20532,
-272,
7634,
-111,
-978,
-5197,
7125,
10423,
13790,
15469,
13256,
4945,
6757,
78,
-5427,
-1870,
-6835,
-2902,
-7551,
-15795,
-13487,
-2395,
-1487,
4581,
-7613,
-2808,
4577,
1290,
5889,
3964,
5858,
4139,
-3108,
-4596,
7552,
4805,
4151,
4462,
-259,
-3291,
-2720,
-7199,
3574,
5919,
-3220,
-4448,
-1785,
4399,
6845,
-14269,
-2405,
21465,
9668,
25567,
1025,
198,
-7122,
-25995,
-11026,
9471,
12581,
-328,
-4892,
-17926,
-5632,
-5787,
3615,
18630,
19494,
12500,
260,
-4502,
-174,
-3872,
-165,
2829,
-23,
-11630,
-23122,
-23499,
-12557,
249,
-245,
8015,
6002,
3019,
-7105,
-1928,
14101,
23620,
14713,
7509,
-5733,
-13752,
-12490,
-13766,
3664,
7005,
-5977,
-16773,
-11503,
-2098,
11030,
1824,
4551,
7289,
-913,
-513,
-3669,
5045,
12622,
7648,
1051,
5195,
-423,
1083,
4088,
7068,
10230,
1439,
-11492,
-6853,
5071,
-1041,
-2381,
-3232,
-147,
-3200,
-6228,
950,
10229,
-7158,
-1,
11551,
8369,
26518,
-375,
-2907,
-10874,
-22676,
-7650,
4990,
11762,
936,
-9097,
-15177,
-4522,
-4127,
6068,
15047,
12359,
7958,
-8778,
-8829,
-2807,
-1344,
3685,
602,
-4903,
-16076,
-21292,
-16875,
1174,
7875,
6577,
7318,
-1622,
-652,
2338,
13221,
17965,
13529,
401,
-4404,
-9262,
-8579,
-2023,
5353,
11965,
3884,
-8204,
-9629,
-3831,
665,
15058,
8648,
6292,
-3889,
-10928,
-6595,
1190,
7107,
3840,
918,
-3984,
769,
-1972,
8076,
7606,
6597,
7055,
-2199,
-7396,
-221,
1866,
4976,
-2146,
-11484,
-11056,
-16058,
-6822,
357,
11293,
7894,
1407,
-3943,
-5239,
-14799,
10493,
13522,
13056,
18653,
-14139,
-15133,
-23253,
-9831,
5110,
14770,
5266,
-5506,
-15647,
-21316,
-2809,
10142,
20789,
14912,
1943,
-7574,
-7149,
2386,
14681,
16508,
10777,
-2995,
-15104,
-18784,
-7302,
439,
5488,
3308,
-2997,
-4528,
-2033,
3311,
9432,
17541,
7769,
2930,
2571,
4665,
4835,
4690,
6158,
2198,
-4569,
-8259,
-9548,
-3205,
1751,
-3486,
-9083,
-10628,
-4555,
320,
12794,
9695,
698,
-1347,
-9371,
-4578,
4260,
8456,
11400,
3336,
-4474,
-6219,
-2528,
1596,
-1658,
-1708,
-4726,
-9906,
-12941,
-6174,
-1849,
-2227,
-2750,
-3440,
-610,
-3524,
1052,
8572,
14260,
11855,
1885,
-3109,
-3029,
-10567,
938,
20808,
12141,
13036,
-9045,
-18459,
-8059,
-5678,
12107,
10671,
2144,
-9049,
-14034,
-9423,
7556,
14503,
12340,
8271,
-6220,
-3344,
1726,
9141,
15203,
5246,
-6362,
-14352,
-13220,
-6069,
4411,
6209,
-2765,
-11606,
-13607,
-718,
6136,
12705,
9163,
2200,
-1069,
-2625,
5028,
9064,
6294,
-1279,
-4679,
-5900,
-6923,
-5520,
-840,
-585,
-3021,
-6630,
-5774,
-4629,
260,
852,
1475,
7931,
4368,
2213,
121,
-2505,
-1457,
4723,
7550,
5437,
514,
-411,
-1819,
-975,
3473,
5183,
2335,
-4498,
-3791,
-4235,
-337,
370,
1253,
3080,
108,
-137,
-785,
3776,
3243,
2925,
2560,
1006,
3446,
2082,
-719,
1238,
4144,
-1846,
-7555,
-12267,
7629,
8162,
883,
5630,
-14386,
-5932,
-7971,
1404,
10712,
-4686,
-8081,
-9004,
271,
1940,
5008,
2177,
-2259,
-4295,
-808,
8740,
6721,
3006,
-2617,
-5189,
-3697,
-6834,
-3044,
-5366,
-6571,
-6488,
-3312,
3284,
1406,
3133,
4448,
8179,
7411,
9875,
7772,
4982,
2598,
927,
4000,
1924,
690,
-2499,
-3794,
-609,
-738,
1049,
368,
-2631,
-4659,
-3712,
8490,
5155,
6240,
597,
-3397,
4734,
1172,
5295,
6318,
2783,
-1398,
-3658,
-3289,
149,
-1126,
-5749,
-3544,
-1916,
-599,
1064,
-1211,
-289,
-3833,
-2258,
2389,
1151,
1436,
-1907,
-3606,
-4405,
-806,
-1442,
-3376,
-1523,
-672,
-471,
-2687,
-2708,
-177,
253,
-717,
766,
1488,
744,
590,
-1959,
3250,
4646,
989,
3502,
3553,
-3616,
-2953,
8150,
1147,
5687,
2548,
-9393,
-1817,
89,
3910,
1204,
-2253,
3721,
1330,
0,
3342,
657,
-584,
-3646,
2026,
6782,
2963,
1001,
-995,
389,
-1802,
-380,
717,
-1691,
-5038,
-2966,
254,
-976,
2087,
-416,
-1929,
-253,
2109,
3056,
1483,
-1474,
-2163,
-652,
-3078,
-514,
-1610,
-2433,
-3411,
-3711,
469,
-533,
1546,
165,
1041,
797,
3540,
3524,
58,
2237,
-2014,
2273,
-1499,
-1767,
896,
353,
3541,
1726,
-1812,
2251,
6811,
1794,
2549,
1619,
4021,
1219,
-1023,
-383,
-412,
472,
-1895,
-2346,
-30,
1886,
-671,
87,
16,
-476,
-377,
-181,
-517,
1787,
-1556,
-4387,
-895,
128,
1179,
-1532,
10,
2364,
1827,
1667,
1737,
148,
-519,
-1002,
-3546,
-2195,
-2474,
-2561,
-1626,
-1601,
-2876,
-776,
-756,
-1357,
1397,
1166,
641,
-661,
733,
333,
-406,
553,
851,
-1035,
2037,
2226,
823,
5359,
1327,
-496,
-31,
2223,
1049,
-447,
-831,
-2240,
456,
202,
238,
-706,
923,
340,
2704,
4812,
4750,
1568,
62,
831,
-674,
2983,
-354,
-821,
-1091,
-2683,
-649,
-98,
-1217,
-1076,
36,
-159,
-495,
1321,
1998,
740,
901,
317,
1358,
611,
391,
-555,
-131,
-635,
-4470,
-3683,
-826,
-2991,
-3578,
-1076,
-1713,
-690,
-1551,
-584,
542,
1279,
1779,
-20,
1577,
176,
-371,
1289,
627,
-556,
342,
214,
251,
1476,
1449,
1037,
1193,
1558,
-1033,
-694,
2336,
2556,
454,
786,
616,
1755,
2121,
264,
988,
2539,
-295,
-2222,
421,
-435,
-421,
-767,
-131,
-965,
-2057,
-1491,
-1260,
-291,
27,
-886,
-777,
-147,
-767,
-797,
-90,
1540,
605,
87,
-2181,
-2004,
1252,
1804,
1254,
-123,
-1958,
-2806,
-1763,
-179,
1144,
786,
-790,
-1768,
-883,
-353,
512,
-106,
365,
-83,
-1137,
274,
297,
1424,
2171,
2366,
1594,
3456,
2534,
2444,
3221,
4140,
4865,
3213,
3072,
-1218,
2208,
1798,
-964,
-164,
-480,
-1229,
-1062,
1911,
1545,
1259,
1575,
1734,
-119,
520,
39,
623,
1148,
56,
-1751,
-1480,
-1336,
-1941,
-461,
-292,
1044,
-881,
-441,
-1491,
-1401,
-641,
-717,
-310,
-1644,
-1535,
-2465,
-933,
-143,
-464,
-470,
-863,
-2684,
-2165,
-1670,
-2747,
-2306,
-1581,
-1069,
-515,
234,
-1532,
278,
765,
828,
567,
1365,
2201,
895,
2958,
2256,
1947,
377,
242,
42,
1514,
2982,
802,
2089,
1402,
500,
2000,
1551,
391,
486,
354,
185,
-104,
1712,
-204,
-507,
739,
147,
44,
-2099,
1427,
630,
-857,
-726,
-528,
-140,
-1688,
37,
-965,
600,
676,
-983,
-775,
-208,
-354,
-159,
387,
425,
-831,
27,
-167,
-2530,
-388,
-3283,
-2133,
-167,
-532,
-840,
-1740,
-1493,
173,
-765,
-317,
811,
-264,
-555,
2522,
1500,
-331,
1847,
-617,
930,
959,
6603,
516,
1856,
2995,
-4106,
4211,
1403,
-1964,
4864,
2408,
85,
5777,
1239,
-3311,
-475,
-3524,
3051,
97,
3581,
91,
-1005,
2190,
-5439,
2617,
-1813,
4017,
-4312,
3390,
-6675,
-2190,
-1790,
-1129,
2185,
12,
5518,
-4040,
2568,
-4619,
3191,
-1896,
3618,
-2958,
-2489,
-4519,
-1868,
-2947,
925,
833,
-4759,
-1213,
-4159,
972,
-1730,
2879,
94,
3643,
-780,
2333,
-3257,
2175,
499,
-1778,
4376,
599,
4289,
2193,
2085,
1973,
1700,
1112,
2671,
4208,
6919,
3429,
4801,
-1808,
1842,
-715,
1547,
2431,
2193,
2381,
-4079,
5855,
-3057,
2585,
-1330,
1390,
-3187,
-501,
1662,
-2752,
-83,
-877,
-195,
-2345,
232,
-2737,
-1167,
-3603,
1097,
-2708,
-34,
-1486,
-2172,
-2123,
-2154,
-3234,
-1935,
-931,
133,
-2014,
-1005,
-1014,
-4225,
-1766,
-2132,
-1556,
-791,
-4031,
-1057,
-1819,
-434,
1559,
-3687,
2542,
-2625,
2642,
-2133,
3365,
200,
750,
-129,
1673,
2632,
2006,
3718,
528,
2152,
3380,
3470,
3271,
2908,
2031,
3846,
-966,
6065,
1489,
6912,
75,
5476,
968,
2839,
1593,
2018,
224,
1889,
853,
624,
1556,
1756,
1996,
812,
3641,
-4172,
4212,
-6670,
3333,
-2450,
4685,
-3848,
3746,
402,
1057,
-767,
-1396,
521,
-6044,
1178,
-5173,
1971,
-8044,
3250,
-7779,
1041,
-5328,
298,
-3514,
-1982,
2426,
-5280,
3623,
-5504,
2562,
-3427,
3184,
-3534,
2293,
883,
1976,
-1215,
854,
-958,
-1111,
3330,
-3196,
4456,
-2524,
4608,
-3125,
3584,
-991,
965,
-218,
877,
1775,
250,
558,
-2086,
-202,
-2520,
346,
-2980,
3060,
-3270,
2315,
-2564,
2048,
-1996,
1433,
-3185,
616,
394,
-1944,
1879,
-2549,
1483,
-2673,
2244,
-4806,
3979,
-5369,
3111,
-1489,
151,
124,
-4257,
1680,
-2762,
128,
-2095,
-2190,
-2133,
-894,
-2591,
3400,
-3948,
4185,
-1655,
3761,
795,
1429,
2405,
-2206,
4010,
-242,
2620,
-262,
3725,
693,
4332,
1658,
3898,
1133,
3399,
2236,
2270,
3109,
1687,
2904,
2059,
1508,
924,
1956,
-349,
1472,
-504,
1070,
-1958,
3758,
-3226,
1440,
41,
-188,
969,
-1725,
2329,
-2753,
1648,
786,
-916,
-228,
1088,
2135,
1520,
-2004,
424,
-4215,
-308,
-1933,
-1809,
-2738,
-3779,
-1025,
-1267,
-706,
-2594,
-2208,
-3012,
1405,
-2346,
16,
-362,
-801,
-1358,
-166,
-702,
-577,
457,
-1110,
76,
1821,
580,
2900,
3784,
2176,
3141,
-101,
3096,
756,
965,
-646,
-812,
1545,
943,
343,
1318,
458,
723,
4378,
328,
561,
-37,
-2230,
382,
-110,
-1162,
-406,
1045,
-547,
-197,
121,
416,
347,
-1033,
-301,
-1731,
758,
-601,
-1082,
-412,
-1071,
-887,
-644,
166,
-258,
-1077,
621,
-1612,
-560,
-762,
-1743,
897,
-2666,
1358,
-2351,
-1174,
-176,
-1926,
1481,
-1908,
129,
-468,
667,
2210,
96,
1802,
-798,
3652,
3174,
1516,
2041,
1048,
1826,
525,
3664,
742,
558,
1866,
1882,
379,
2430,
-268,
-146,
509,
1022,
258,
655,
1375,
-1122,
1506,
516,
1123,
-377,
-64,
-2105,
430,
-126,
980,
930,
-150,
-201,
-1494,
-1280,
-2641,
307,
-276,
};
| 83,736
|
C++
|
.cxx
| 9,930
| 5.433132
| 39
| 0.530587
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,185
|
play.pa.cxx
|
w1hkj_fldigi/src/soundcard/play.pa.cxx
|
// Pulse Class
#include <queue>
#include <stack>
#include <string>
#include "play.pa.h"
#include "misc.h"
#include "debug.h"
#include "configuration.h"
#include "fl_digi.h"
#include "qrunner.h"
#include "confdialog.h"
#define DR_MP3_IMPLEMENTATION
#include "dr_mp3.h"
#define CHANNELS 2
#define SCRATE 44100 // 8000
#define FRAMES_PER_BUFFER 4096 // 1024 // lower than 1023 values causes audio distortion on pi3
#define RBUFF_SIZE 32768 // 16384 // 4096
static pthread_t alert_pthread;
static pthread_cond_t alert_cond;
static pthread_mutex_t alert_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t filter_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t rx_stream_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_t filelist_pthread;
static pthread_mutex_t filelist_mutex = PTHREAD_MUTEX_INITIALIZER;
static void start_alert_thread(void);
static void start_filelist_thread(void);
static void stop_alert_thread(void);
static void stop_filelist_thread(void);
static bool alert_thread_running = false;
static bool alert_terminate_flag = false;
//static bool stream_ready = false;
enum { NONE, START, OPEN, CLOSE, TERMINATE };
static int alert_process_flag = NONE;
struct PLAYLIST {
c_portaudio *cpa;
float *fbuff;
unsigned long int bufflen;
unsigned long int data_ptr;
unsigned long int frames;
int src;
};
std::queue<PLAYLIST *> playlist;
static PLAYLIST *plist = 0;
struct FILELIST {
c_portaudio *cpa;
std::string fn;
FILELIST() { cpa = 0; fn = ""; }
FILELIST( c_portaudio *_cpa, std::string _fn ) {
cpa = _cpa; fn = _fn;
}
~FILELIST() {};
};
std::stack<FILELIST> filelist;
/**********************************************************************************
* AUDIO_ALERT process event.
**********************************************************************************/
int csinc = 2;// 0 - best, 1 - medium, 2 - fastest, 3 - zoh, 4 - linear
static sf_count_t
rate_convert (float *inbuff, int len, float *outbuff, int outlen, double src_ratio, int channels)
{
SRC_DATA src_data ;
src_data.data_in = inbuff; // pointer to the input data samples.
src_data.input_frames = len / channels; // number of frames of data pointed to by data_in.
src_data.data_out = outbuff; // pointer to the output data samples.
src_data.output_frames = outlen / channels; // Maximum number of frames pointed to by data_out.
src_data.src_ratio = src_ratio; // output_sample_rate / input_sample_rate.
int error = src_simple (&src_data, csinc, channels) ;
return error;
}
int stream_process(
const void* in, void* out, unsigned long nframes,
const PaStreamCallbackTimeInfo *time_info,
PaStreamCallbackFlags flags, void* data)
{
float* outf = reinterpret_cast<float*>(out);
memset(outf, 0, nframes * 2 * sizeof(float));
if (!plist) {
if (playlist.empty()) {
guard_lock rx_lock(&rx_stream_mutex);
c_portaudio *cpa = (c_portaudio *)data;
unsigned long len = nframes * cpa->paStreamParameters.channelCount;
unsigned long available = cpa->monitor_rb->read_space();
if (progdefaults.mon_xcvr_audio && available >= len) {
cpa->monitor_rb->read((float *)out, len);
}
return paContinue;
}
guard_lock que_lock(&alert_mutex);
plist = playlist.front();
playlist.pop();
}
c_portaudio* cpa = plist->cpa;
int chcnt = cpa->paStreamParameters.channelCount;
unsigned long int nbr_frames = plist->bufflen / chcnt;
unsigned int ncopy = nbr_frames - plist->data_ptr;
if (ncopy > nframes) ncopy = nframes;
memcpy( outf,
plist->fbuff + plist->data_ptr * chcnt,
ncopy * chcnt * sizeof(float));
plist->data_ptr += ncopy;
float outvol = 0.01 * progdefaults.alert_volume;
for (unsigned int n = 0; n < ncopy * chcnt; n++) outf[n] *= outvol;
if (nbr_frames && plist->src == c_portaudio::ALERT) {
static char progress[20];
snprintf(progress, sizeof(progress), "%d %%", int(100.0 * plist->data_ptr / nbr_frames));
put_status(progress, 2.0, STATUS_CLEAR);
}
if (plist->data_ptr >= nbr_frames) {
plist = NULL;
}
return paContinue;
}
static int paStatus;
static void StreamFinished( void* userData )
{
paStatus = paComplete;
}
void process_alert()
{
return;
}
/**********************************************************************************
* AUDIO_ALERT processing loop.
* syncs to requests for audio alert output
**********************************************************************************/
static c_portaudio *requester = 0;
static void * alert_loop(void *args)
{
SET_THREAD_ID(AUDIO_ALERT_TID);
alert_thread_running = true;
alert_terminate_flag = false;
while(1) {
pthread_mutex_lock(&alert_mutex);
pthread_cond_wait(&alert_cond, &alert_mutex);
pthread_mutex_unlock(&alert_mutex);
if (alert_process_flag == OPEN) {
if (requester)
requester->open();
alert_process_flag = NONE;
requester = 0;
}
if (alert_process_flag == CLOSE) {
if (requester)
requester->close();
alert_process_flag = NONE;
requester = 0;
}
if (alert_process_flag == TERMINATE)
break;
}
return (void *)0;
}
void open_alert_port(c_portaudio *cpa)
{
alert_process_flag = OPEN;
requester = cpa;
pthread_cond_signal(&alert_cond);
}
void close_alert_port(c_portaudio *cpa)
{
alert_process_flag = CLOSE;
requester = cpa;
pthread_cond_signal(&alert_cond);
}
/**********************************************************************************
* Start AUDIO_ALERT Thread
**********************************************************************************/
static void start_alert_thread(void)
{
if(alert_thread_running) return;
memset((void *) &alert_pthread, 0, sizeof(alert_pthread));
memset((void *) &alert_mutex, 0, sizeof(alert_mutex));
memset((void *) &alert_cond, 0, sizeof(alert_cond));
if(pthread_cond_init(&alert_cond, NULL)) {
LOG_ERROR("Alert thread create fail (pthread_cond_init)");
return;
}
if(pthread_mutex_init(&alert_mutex, NULL)) {
LOG_ERROR("AUDIO_ALERT thread create fail (pthread_mutex_init)");
return;
}
if (pthread_create(&alert_pthread, NULL, alert_loop, NULL) < 0) {
pthread_mutex_destroy(&alert_mutex);
LOG_ERROR("AUDIO_ALERT thread create fail (pthread_create)");
}
LOG_VERBOSE("started audio alert thread");
MilliSleep(10); // Give the CPU time to set 'alert_thread_running'
}
/**********************************************************************************
* Stop AUDIO_ALERT Thread
**********************************************************************************/
static void stop_alert_thread(void)
{
if(!alert_thread_running) return;
struct PLAYLIST *plist = 0;
while (!playlist.empty()) {
plist = playlist.front();
delete [] plist->fbuff;
playlist.pop();
}
alert_process_flag = TERMINATE;
pthread_cond_signal(&alert_cond);
MilliSleep(10);
pthread_join(alert_pthread, NULL);
LOG_VERBOSE("%s", "audio alert thread - stopped");
pthread_mutex_destroy(&alert_mutex);
pthread_cond_destroy(&alert_cond);
memset((void *) &alert_pthread, 0, sizeof(alert_pthread));
memset((void *) &alert_mutex, 0, sizeof(alert_mutex));
alert_thread_running = false;
alert_terminate_flag = false;
}
static void add_alert(c_portaudio * _cpa, float *buffer, int len, int src)
{
if(alert_thread_running) {
if (_cpa->paStreamParameters.device == -1) return;
struct PLAYLIST *plist = new PLAYLIST;
plist->fbuff = buffer;
plist->bufflen = len;
plist->cpa = _cpa;
plist->data_ptr = 0;
plist->frames = len / _cpa->paStreamParameters.channelCount;
guard_lock que_lock(&alert_mutex);
playlist.push(plist);
LOG_VERBOSE("play list contains %d items", (int)(playlist.size()));
}
}
// Initialize the c_portaudio class
c_portaudio::c_portaudio()
{
PaError paError = Pa_Initialize();
if (paError != paNoError) {
LOG_ERROR("pa Error # %d, %s", paError, Pa_GetErrorText(paError));
throw cPA_exception(paError);
}
stream = 0;
fbuffer = new float[1024];
nubuffer = new float[1024 * 6];
data_frames = new float[ FRAMES_PER_BUFFER * CHANNELS ];
paStreamParameters.device = -1;
sr = 44100;
paStreamParameters.channelCount = 2;
paStreamParameters.sampleFormat = paFloat32;
paStreamParameters.hostApiSpecificStreamInfo = NULL;
sr = SCRATE;
b_sr = SCRATE;
b_len = 0;
rc = src_new (progdefaults.sample_converter, 1, &rc_error) ;
monitor_rb = new ringbuffer<float>(RBUFF_SIZE);
bpfilt = new C_FIR_filter();
start_alert_thread();
start_filelist_thread();
}
c_portaudio::~c_portaudio()
{
close();
stop_filelist_thread();
stop_alert_thread();
Pa_Terminate();
delete monitor_rb;
delete [] fbuffer;
delete [] nubuffer;
delete [] data_frames;
src_delete(rc);
delete bpfilt;
}
void c_portaudio::init_filter()
{
guard_lock filter_lock(&filter_mutex);
if (!bpfilt) bpfilt = new C_FIR_filter();
flo = 1.0 * progdefaults.RxFilt_low / sr;
fhi = 1.0 * progdefaults.RxFilt_high / sr;
double fmid = progdefaults.RxFilt_mid / sr;
bpfilt->init_bandpass (511, 1, flo, fhi);
{
C_FIR_filter *testfilt = new C_FIR_filter();
testfilt->init_bandpass(511, 1, flo, fhi);
double amp = 0;
double sum_in = 0, sum_out = 0;
double inp = 0;
for (int i = 0; i < 100 / fmid; i++) {
inp = cos (TWOPI * i * fmid);
if (testfilt->Irun( inp, amp ) ) {
sum_in += fabs(inp);
sum_out += fabs(amp);
}
}
gain = 0.98 * sum_in / sum_out;
delete testfilt;
}
// std::cout << "############################################" << std::endl;
// std::cout << "Sampling rate: " << sr << std::endl;
// std::cout << "BW : " << progdefaults.RxFilt_bw << " : [ " << progdefaults.RxFilt_low <<
// " | " << progdefaults.RxFilt_mid <<
// " | " << progdefaults.RxFilt_high << " ]" <<
// std::endl;
// std::cout << "bpfilt : " << flo << " | " << fhi << std::endl;
// std::cout << "gain : " << gain << std::endl;
// std::cout << "############################################" << std::endl;
}
int c_portaudio::open()//void *data)
{
paStreamParameters.device = progdefaults.AlertIndex;
sr = Pa_GetDeviceInfo(paStreamParameters.device)->defaultSampleRate;
paStreamParameters.channelCount = 2;
paStreamParameters.sampleFormat = paFloat32;
paStreamParameters.suggestedLatency = Pa_GetDeviceInfo(paStreamParameters.device)->defaultLowOutputLatency;
paStreamParameters.hostApiSpecificStreamInfo = NULL;
LOG_INFO("\n\
open pa stream:\n\
samplerate : %.0f\n\
device name : %s\n\
device number : %d\n\
# channels : %d\n\
latency : %f\n\
sample Format : paFloat32",
sr,
progdefaults.AlertDevice.c_str(),
paStreamParameters.device,
paStreamParameters.channelCount,
paStreamParameters.suggestedLatency);
state = paContinue;
paError = Pa_OpenStream(
&stream,
NULL, &paStreamParameters,
sr,
FRAMES_PER_BUFFER, paClipOff,
stream_process, this);
if (paError != paNoError) {
LOG_ERROR("pa Error # %d, %s", paError, Pa_GetErrorText(paError));
stream = 0;
return 0;
}
paError = Pa_SetStreamFinishedCallback( stream, StreamFinished );
if (paError != paNoError) {
LOG_ERROR("pa Error # %d, %s", paError, Pa_GetErrorText(paError));
paError = Pa_StopStream(stream );
paError = Pa_CloseStream(stream);
stream = 0;
return 0;
}
paError = Pa_StartStream(stream );
if (paError != paNoError) {
LOG_ERROR("pa Error # %d, %s", paError, Pa_GetErrorText(paError));
paError = Pa_StopStream(stream );
paError = Pa_CloseStream(stream);
stream = 0;
return 0;
}
LOG_INFO("OPENED pa stream %p @ %f samples/sec", stream, sr);
init_filter();
return 1;
}
void c_portaudio::close()
{
if (stream) {
paError = Pa_StopStream(stream );
paError = Pa_CloseStream(stream);
if (paError != paNoError) {
LOG_ERROR("pa Error # %d, %s", paError, Pa_GetErrorText(paError));
}
else
LOG_VERBOSE("closed stream %p", stream);
}
}
// Play 2 channel buffer
void c_portaudio::play_buffer(float *buffer, int len, int _sr, int src)
{
// do not delete [] nubuffer
// deleted after use
float *nubuffer = new float[len];
int nusize = len;
if (sr == _sr) { // do not resample if sample rate is default
for (int i = 0; i < len; i++)
nubuffer[i] = buffer[i];
} else {
double src_ratio = 1.0 * sr / _sr;
// resize nubuffer
nusize = len * src_ratio;
delete [] nubuffer;
nubuffer = new float[nusize];
int num = rate_convert(
buffer, len,
nubuffer, nusize,
src_ratio,
paStreamParameters.channelCount);
if (num != 0) {
LOG_ERROR("rate converter failed");
return;
}
}
data_ptr = 0;
add_alert(this, nubuffer, nusize, src);
return;
}
// play mono buffer
void c_portaudio::play_sound(int *buffer, int len, int _sr)
{
float *fbuff = new float[2];
try {
delete [] fbuff;
fbuff = new float[2*len];
for (int i = 0; i < len; i++)
fbuff[2*i] = fbuff[2*i+1] = buffer[i] / 33000.0; //32768.0;
play_buffer(fbuff, 2*len, _sr, ALERT);
} catch (...) {
delete [] fbuff;
throw;
}
delete [] fbuff;
return;
}
// play mono buffer
void c_portaudio::play_sound(float *buffer, int len, int _sr)
{
float *fbuff = new float[2];
try {
delete [] fbuff;
fbuff = new float[2*len];
for (int i = 0; i < len; i++) {
fbuff[2*i] = fbuff[2*i+1] = buffer[i];
}
play_buffer(fbuff, 2 * len, _sr, ALERT);
} catch (...) {
delete [] fbuff;
throw;
}
delete [] fbuff;
return;
}
void c_portaudio::silence(float secs, int _sr)
{
int len = secs * _sr;
int nosound[len];
memset(nosound, 0, sizeof(*nosound) * len);
play_sound(nosound, len, _sr);
}
void c_portaudio::play_mp3(std::string fname)
{
if (fname.empty()) return;
FILE* pFile;
pFile = fopen(fname.c_str(), "rb");
if (pFile == NULL) {
return;
}
fclose(pFile);
drmp3_config config;
drmp3_uint64 frame_count;
float* mp3_buffer = drmp3_open_file_and_read_f32(
fname.c_str(), &config, &frame_count );
if (!mp3_buffer) {
LOG_ERROR("File must be mp3 float 32 format");
return;
}
LOG_INFO("\n\
MP3 channels: %d\n\
sample rate: %d\n\
frame count: %ld\n",
config.outputChannels,
config.outputSampleRate,
long(frame_count));
if (config.outputChannels == 2)
play_buffer(mp3_buffer, config.outputChannels * frame_count, config.outputSampleRate);
else
play_sound(mp3_buffer, frame_count, config.outputSampleRate);
drmp3_free(mp3_buffer);
}
void c_portaudio::play_wav(std::string fname)
{
playinfo.frames = 0;
playinfo.samplerate = 0;
playinfo.channels = 0;
playinfo.format = 0;
playinfo.sections = 0;
playinfo.seekable = 0;
if ((playback = sf_open(fname.c_str(), SFM_READ, &playinfo)) == NULL)
return;
int ch = playinfo.channels;
int fsize = playinfo.frames * ch;
float *buffer = new float[fsize];
memset(buffer, 0, fsize * sizeof(*buffer));
if (sf_readf_float( playback, buffer, playinfo.frames )) {
if (ch == 2) {
play_buffer(buffer, fsize, playinfo.samplerate);
} else {
play_sound(buffer, fsize, playinfo.samplerate);
}
}
sf_close(playback);
delete [] buffer;
}
void c_portaudio::do_play_file(std::string fname)
{
if ((fname.find(".mp3") != std::string::npos) ||
(fname.find(".MP3") != std::string::npos)) {
//std::cout << "do_play_file(" << fname << ")" << std::endl;
return play_mp3(fname);
}
if ((fname.find(".wav") != std::string::npos) ||
(fname.find(".WAV") != std::string::npos)) {
return play_wav(fname);
}
LOG_ERROR("%s : Audio file format must be either wav or mp3", fname.c_str());
}
void c_portaudio::play_file(std::string fname)
{
guard_lock filelock(&filelist_mutex);
//std::cout << "filelist.push(this, " << fname << ")" << std::endl;
filelist.push( FILELIST(this, fname));
}
// write len elements from monophonic audio stream to ring buffer
// ring buffer is stereo; LRLRLR...
void c_portaudio::mon_write(double *buffer, int len, int mon_sr)
{
float vol = 0.01 * progdefaults.RxFilt_vol;
float *rsbuffer = 0;
if (!bpfilt) init_filter();
try {
// do not resample if alert samplerate == modem samplerate
if (sr == mon_sr) {
if (progdefaults.mon_dsp_audio) {
guard_lock filter_lock(&filter_mutex);
double out;
for (int n = 0; n < len; n++) {
if (bpfilt->Irun(buffer[n], out)) {
nubuffer[2*n] = nubuffer[2*n + 1] = vol * gain * out;
}
}
} else
for (int i = 0; i < len; i++)
nubuffer[2*i] = nubuffer[2*i+1] = vol * buffer[i];
monitor_rb->write(nubuffer, 2 * len);
return;
}
// sample rates not equal; resample monophonic
else {
for (int i = 0; i < len; i++) fbuffer[i] = vol * buffer[i];
double src_ratio = 1.0 * sr / mon_sr;
rcdata.data_in = fbuffer; // pointer to the input data samples.
rcdata.input_frames = len; // number of frames of data pointed to by data_in.
rcdata.data_out = nubuffer; // pointer to the output data samples.
rcdata.output_frames = 512 * 6; //nusize; // Maximum number of frames pointed to by data_out.
rcdata.src_ratio = src_ratio; // output_sample_rate / input_sample_rate.
rcdata.end_of_input = 0;
// resample before filtering
int erc;
if ((erc = src_process (rc, &rcdata)) != 0) {
LOG_ERROR("rate converter failed: %s", src_strerror (erc));
throw;
}
int flen = rcdata.output_frames_gen;
float *rsbuffer = new float[2*flen];
if (progdefaults.mon_dsp_audio) {
guard_lock filter_lock(&filter_mutex);
double out;
for (int n = 0; n < flen; n++) {
if (bpfilt->Irun(nubuffer[n], out)) {
rsbuffer[2*n] = rsbuffer[2*n+1] = gain * out;
}
}
monitor_rb->write(rsbuffer, 2*flen);
delete [] rsbuffer;
return;
}
else {
for (int n = 0; n < flen; n++) {
rsbuffer[2*n] = rsbuffer[2*n+1] = nubuffer[n];
}
monitor_rb->write(rsbuffer, 2*flen);
delete [] rsbuffer;
return;
}
}
} catch (...) {
if (rsbuffer) { delete [] rsbuffer; rsbuffer = 0;}
throw;
}
}
// read len elements of 2 channel audio from ring buffer
//size_t c_portaudio::mon_read(float *buffer, int len)
//{
// return monitor_rb->read(buffer, len);
//}
/**********************************************************************************
* AUDIO FILELIST processing loop.
* syncs to requests for file / clip playback
**********************************************************************************/
bool filelist_thread_running = false;
bool filelist_terminate_flag = false;
static void * filelist_loop(void *args)
{
// SET_THREAD_ID(AUDIO_ALERT_TID);
alert_thread_running = true;
alert_terminate_flag = false;
FILELIST fl;
while(1) {
MilliSleep(50);
if (filelist_terminate_flag) break;
{
guard_lock filelock(&filelist_mutex);
if (!filelist.empty()) {
fl = filelist.top();
filelist.pop();
fl.cpa->do_play_file(fl.fn);
}
}
}
return (void *)0;
}
/**********************************************************************************
* Start FILELIST Thread
**********************************************************************************/
static void start_filelist_thread(void)
{
if(filelist_thread_running) return;
memset((void *) &filelist_pthread, 0, sizeof(filelist_pthread));
memset((void *) &filelist_mutex, 0, sizeof(filelist_mutex));
if(pthread_mutex_init(&filelist_mutex, NULL)) {
LOG_ERROR("AUDIO_ALERT thread create fail (pthread_mutex_init)");
return;
}
memset((void *) &filelist_pthread, 0, sizeof(filelist_pthread));
if (pthread_create(&filelist_pthread, NULL, filelist_loop, NULL) < 0) {
pthread_mutex_destroy(&filelist_mutex);
LOG_ERROR("AUDIO_ALERT thread create fail (pthread_create)");
}
LOG_VERBOSE("started audio alert thread");
MilliSleep(10);
}
/**********************************************************************************
* Stop AUDIO_ALERT Thread
**********************************************************************************/
static void stop_filelist_thread(void)
{
if(!filelist_thread_running) return;
filelist_terminate_flag = true;
MilliSleep(10);
pthread_join(filelist_pthread, NULL);
LOG_VERBOSE("%s", "pa filelist thread - stopped");
pthread_mutex_destroy(&filelist_mutex);
memset((void *) &filelist_pthread, 0, sizeof(filelist_pthread));
memset((void *) &filelist_mutex, 0, sizeof(filelist_mutex));
filelist_thread_running = false;
filelist_terminate_flag = false;
}
| 20,318
|
C++
|
.cxx
| 645
| 28.894574
| 108
| 0.635056
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,186
|
bark.cxx
|
w1hkj_fldigi/src/soundcard/bark.cxx
|
#define BARK_SIZE 1501
int int_audio_bark[BARK_SIZE] = {
936,
1012,
-165,
-994,
-1724,
-1893,
-2394,
-2472,
-2530,
-2478,
-2377,
-1798,
-574,
240,
1147,
1832,
2081,
1781,
1121,
363,
-126,
-531,
-1056,
-1456,
-1930,
-2058,
-1772,
-1485,
-960,
-277,
73,
588,
1058,
1282,
1023,
828,
889,
712,
701,
287,
27,
497,
985,
1017,
854,
713,
338,
-410,
-1292,
-2121,
-3223,
-4354,
-4515,
-4051,
-3019,
-1229,
-117,
1009,
2652,
3638,
3629,
2928,
1942,
691,
-1293,
-3184,
-3935,
-4378,
-3328,
-41,
2266,
2492,
2523,
1577,
-44,
-45,
155,
-364,
-940,
-2107,
-4449,
-6415,
-5723,
-3739,
-2078,
56,
3138,
4747,
4378,
4291,
3015,
513,
-853,
-2185,
-3250,
-2605,
754,
4961,
3605,
209,
-275,
-1622,
-1733,
-40,
373,
-1272,
-3562,
-5569,
-8514,
-7745,
-2744,
184,
1580,
5788,
9343,
8273,
6635,
5903,
2383,
127,
1966,
1722,
-137,
-132,
-1861,
-7002,
-8002,
-5436,
-5412,
-3565,
2390,
4452,
1745,
479,
-1214,
-3168,
-402,
4158,
4354,
3759,
4258,
113,
-4875,
-2847,
-2208,
-3926,
3478,
11668,
7096,
225,
896,
-2384,
-6413,
-1740,
-794,
-5297,
-4708,
-4509,
-10118,
-9582,
-1133,
36,
-184,
7892,
12924,
8567,
6161,
6063,
593,
3687,
14336,
11291,
-1108,
-6415,
-9802,
-16218,
-14248,
-8233,
-9858,
-8053,
44,
1230,
1693,
9394,
10094,
3951,
5414,
10972,
6555,
-2876,
-6074,
-9317,
-9172,
3208,
11631,
2695,
-1550,
1974,
-3751,
-5942,
2407,
-542,
-8052,
-4900,
-5805,
-11478,
-6965,
-1141,
-4676,
-2477,
9446,
14724,
7207,
4214,
2972,
7579,
19004,
17455,
3588,
-6083,
-9614,
-18211,
-16633,
-11363,
-15225,
-14954,
-7853,
-2617,
3209,
11494,
14397,
10225,
12131,
18116,
10910,
-1454,
-7281,
-13869,
-13528,
4811,
10350,
-4212,
-8812,
-3876,
-5286,
-625,
5750,
-601,
-4767,
-1347,
-3984,
-9676,
-4969,
-1856,
-6471,
-1204,
11722,
12850,
4181,
1196,
15349,
25327,
18329,
7884,
-3696,
-19158,
-20968,
-10813,
-17773,
-22533,
-13301,
-10423,
-7369,
11890,
22983,
14818,
7810,
13141,
15361,
4242,
-4747,
-5864,
-241,
9446,
8563,
-10230,
-19311,
-13076,
-5681,
2472,
3607,
-5697,
-8606,
-7203,
-5532,
341,
2147,
-4430,
-6233,
1405,
13652,
13307,
4018,
19570,
28053,
16682,
4530,
-2067,
-17958,
-26346,
-7441,
-11308,
-29067,
-19319,
-7781,
-11919,
4714,
28605,
17228,
-785,
11447,
17924,
5243,
-4279,
1,
14107,
12187,
12,
-13253,
-24193,
-24268,
-4772,
8636,
-4916,
-7588,
2145,
-8046,
-17247,
-351,
2005,
-7647,
-5020,
10575,
18192,
19692,
30367,
28053,
16641,
-1468,
-1291,
-12838,
-31744,
-15404,
-10644,
-26448,
-21098,
-2201,
-5854,
1832,
27703,
20793,
-2394,
6293,
23145,
2787,
-12228,
11296,
19544,
-843,
-11725,
-9231,
-25238,
-19697,
12591,
8178,
-8909,
84,
-856,
-25659,
-19309,
-3978,
-6000,
-6666,
9349,
28970,
31926,
28975,
19534,
6011,
-18080,
-20029,
-9107,
-24414,
-30097,
-17450,
-9881,
-7682,
6749,
19759,
11986,
3548,
12223,
19381,
7266,
12289,
25661,
19256,
5822,
-10922,
-19256,
-31215,
-25296,
1660,
9553,
-968,
-6738,
-6500,
-18006,
-18714,
-10223,
-5107,
550,
19094,
31929,
31053,
26512,
13469,
3189,
-23024,
-30544,
-14481,
-21138,
-25954,
-7976,
-4223,
-14974,
-1883,
7719,
884,
6146,
22875,
31914,
29998,
24109,
4974,
-14461,
-22935,
-24797,
-17795,
-14789,
-13832,
-8670,
-432,
-3427,
-8542,
2048,
2661,
9237,
29075,
31261,
28236,
12400,
-11842,
-23705,
-24063,
-9716,
-6491,
-16594,
-12211,
1458,
-845,
-844,
-7539,
-12609,
-7329,
1884,
27862,
30684,
25842,
6831,
-10331,
-21275,
-26266,
2533,
7163,
-16739,
-17304,
1245,
-7152,
-5299,
-2555,
-10415,
-3468,
11662,
31026,
30442,
25922,
8034,
-10723,
-19631,
-18811,
-8916,
-10846,
-21045,
-19358,
-1723,
1366,
4668,
2668,
-3133,
3464,
19986,
31998,
28612,
22576,
132,
-18698,
-20657,
-15745,
-10566,
-8693,
-11602,
-14383,
-6920,
-9175,
-8875,
-1112,
4186,
21197,
31999,
30408,
24591,
2149,
-24948,
-30958,
-12877,
5521,
-2230,
-16516,
-12786,
-7488,
-6300,
-7181,
-9104,
-6620,
3578,
25174,
31999,
24941,
14499,
-13284,
-31931,
-28243,
-13763,
5311,
6285,
-4213,
-7190,
-9360,
-10081,
-12681,
-9851,
-2659,
15117,
31999,
29568,
23112,
796,
-25452,
-25582,
-8939,
-542,
4582,
2081,
-5272,
-6590,
-7479,
-14715,
-14488,
-6697,
3016,
25870,
31956,
29541,
19706,
-4835,
-24007,
-25261,
-10607,
3234,
-300,
-11045,
-3911,
-2982,
-12166,
-9990,
-5871,
4317,
24408,
31999,
28434,
20350,
-297,
-27436,
-29567,
-15817,
-12041,
-2307,
6562,
2102,
95,
2949,
-7426,
-14748,
-9580,
-1018,
23353,
31466,
24704,
13015,
-15850,
-29620,
-25941,
-7213,
16243,
10885,
-10456,
-8419,
-5971,
-16447,
-14369,
-9160,
-1455,
19822,
31999,
27930,
21652,
3394,
-24579,
-30074,
-12122,
-7596,
-6768,
3144,
197,
-8471,
-2829,
-8499,
-13842,
-7725,
2288,
24928,
31999,
27185,
18209,
-6668,
-29686,
-28663,
-13368,
9273,
8225,
-7642,
-4414,
-3833,
-9987,
-10276,
-6239,
1616,
22168,
31999,
27334,
20837,
1415,
-24768,
-31999,
-20551,
-4357,
4742,
5127,
356,
-4032,
-4844,
-12882,
-14038,
-8026,
10686,
30850,
29005,
21033,
9350,
-16203,
-32000,
-27891,
-13596,
6718,
13043,
8687,
-6282,
-12147,
-9561,
-11886,
-8304,
6969,
28295,
31521,
24043,
15132,
-6152,
-29848,
-31131,
-20039,
250,
13175,
11101,
-1625,
-10136,
-9616,
-12640,
-9990,
-2999,
18273,
31807,
29140,
21120,
8462,
-17648,
-32000,
-27791,
-11847,
9884,
9121,
1407,
-5398,
-10948,
-13920,
-11279,
-5213,
15793,
31795,
30110,
21766,
10917,
-11199,
-31633,
-31002,
-21127,
-1559,
9856,
17196,
382,
-11732,
-7953,
-13201,
-11726,
1561,
24800,
31999,
24889,
16271,
220,
-26090,
-32000,
-27284,
-10109,
17726,
19837,
4567,
-8426,
-15495,
-15754,
-11364,
-3298,
19691,
31999,
28403,
19775,
8253,
-16187,
-32000,
-30113,
-16680,
4045,
10444,
14000,
-2600,
-9931,
-6983,
-12484,
-10200,
5011,
27682,
31771,
23326,
14333,
-4539,
-28281,
-32000,
-24526,
-4585,
14968,
15942,
1665,
-11861,
-14263,
-13242,
-10450,
1270,
24450,
31997,
26465,
18127,
3850,
-21630,
-32000,
-28418,
-16430,
6721,
16318,
10995,
-5254,
-6544,
-10073,
-14134,
-9135,
7383,
29755,
30811,
22630,
13540,
-3071,
-28032,
-31389,
-23573,
-7034,
10361,
18960,
8887,
-11746,
-15475,
-14819,
-10901,
-2365,
20469,
31999,
27977,
20066,
8822,
-14329,
-31646,
-27428,
-11530,
2328,
12632,
13815,
-12001,
-12201,
-9347,
-14814,
-9289,
3251,
26002,
31999,
26700,
18407,
4157,
-20192,
-31998,
-22323,
-11358,
-537,
17947,
14265,
-6220,
-5075,
-11492,
-18331,
-11039,
-1724,
19946,
31999,
28516,
20518,
7250,
-14795,
-31999,
-26068,
-11016,
-629,
8037,
4099,
-4158,
-4015,
-12356,
-13103,
-8146,
5233,
27637,
31720,
25351,
17085,
2504,
-22742,
-31801,
-15273,
-11086,
-12292,
3868,
2549,
-6352,
1512,
-5507,
-13363,
-7965,
4842,
26479,
31999,
25523,
17976,
3371,
-21242,
-32000,
-17205,
-15026,
-12288,
12136,
13755,
-4516,
-3463,
-10561,
-17743,
-10117,
-2063,
19417,
31878,
30175,
23333,
11433,
-10541,
-31593,
-22008,
-9095,
-16697,
-3705,
18791,
6812,
-5435,
-9458,
-19052,
-19205,
-10210,
-1500,
6013,
23983,
31999,
30215,
23733,
7859,
2826,
-18765,
-32000,
-21540,
-20006,
-12581,
7719,
4250,
-18201,
-12457,
-7005,
-9744,
-1979,
11865,
7870,
11615,
29961,
31496,
26911,
16898,
5528,
-15805,
-31997,
-28977,
-18660,
-12119,
1840,
11757,
-39,
-8726,
-5670,
-9570,
-12239,
-3676,
9404,
10221,
14626,
31182,
29041,
20866,
9633,
-3001,
-21451,
-31998,
-22070,
-9348,
-10791,
-4152,
727,
-13144,
-14568,
-9153,
-6885,
-2215,
12700,
22125,
20075,
17814,
26993,
25058,
14259,
4335,
-7653,
-18061,
-29436,
-31498,
-24277,
-13427,
-4860,
3650,
3984,
4070,
5790,
2996,
-3240,
-731,
8178,
11136,
15931,
22771,
20807,
12398,
7522,
1971,
-10819,
-21067,
-16161,
-15357,
-19771,
-14101,
-5421,
-4959,
-929,
3026,
-4095,
-7006,
1087,
6354,
8738,
18065,
21681,
12249,
4183,
9509,
9421,
-4460,
-12737,
-2305,
8339,
1874,
-4743,
-5120,
-12055,
-17144,
-11378,
-4506,
-1654,
-1176,
-1206,
-3412,
-2590,
5685,
8281,
5652,
8619,
5930,
-1817,
-705,
4277,
4112,
651,
-4495,
-578,
8989,
7699,
-2156,
-3422,
-3827,
-12806,
-13564,
-8547,
-6887,
-7533,
-4058,
-5639,
-6669,
-1803,
-1224,
2741,
10322,
11616,
10276,
9867,
7733,
8644,
1999,
-11311,
-8064,
1854,
1894,
1770,
5169,
394,
-6014,
-5899,
-10927,
-12454,
-8572,
-7984,
-11217,
-6953,
-2204,
3472,
11824,
13147,
16342,
16156,
13183,
9500,
8509,
-826,
-9260,
-12127,
-10795,
-4719,
-1123,
3716,
3640,
2030,
-858,
-3266,
-5789,
-5418,
-6052,
-4763,
-4468,
-2729,
340,
15,
4738,
10496,
15512,
17715,
16331,
9072,
2200,
-7337,
-16003,
-17596,
-15856,
-8008,
2678,
5681,
8624,
10768,
6940,
3621,
-764,
-1542,
-1504,
-1520,
-5275,
-8908,
-9129,
-8268,
-6305,
1641,
8510,
8315,
11224,
8406,
3993,
4393,
-1455,
-8750,
-8807,
-7750,
-5796,
-4092,
1346,
7399,
9405,
8669,
6676,
6276,
5729,
2215,
-4138,
-6636,
-13179,
-17010,
-18096,
-18872,
-11305,
-835,
8367,
14494,
15900,
13728,
11562,
5132,
1460,
-2076,
-7508,
-7469,
-7680,
-5235,
-3153,
-4185,
-2915,
-913,
2620,
7081,
8780,
11201,
11205,
3817,
-4399,
-13065,
-19283,
-19323,
-17210,
-11000,
-2420,
5806,
12571,
13722,
11972,
9939,
5963,
1130,
-1873,
-4666,
-7041,
-7803,
-7526,
-5278,
-3846,
-1240,
-497,
730,
4982,
7551,
8964,
9399,
7217,
1681,
-2494,
-10218,
-14825,
-14814,
-12372,
-7528,
-3654,
2387,
6345,
9165,
11087,
11650,
7542,
2497,
-3454,
-7717,
-8043,
-6363,
-2586,
-1639,
-1783,
436,
1615,
968,
4580,
4333,
4053,
6327,
7140,
6070,
3511,
-286,
-5409,
-11013,
-13447,
-11203,
-10047,
-4833,
-580,
2712,
6713,
8770,
9068,
7257,
2668,
-33,
-1007,
-2742,
-831,
-838,
-1809,
-776,
-168,
-846,
-191,
-466,
315,
743,
1421,
3448,
1396,
1457,
3297,
3324,
2577,
1880,
-173,
-2415,
-5141,
-6259,
-4832,
-5202,
-3332,
-272,
1161,
1810,
1583,
1680,
1803,
1834,
2796,
2141,
145,
964,
1002,
-1651,
-2117,
-2399,
-3407,
-2426,
-1855,
1154,
3115,
1737,
2947,
2144,
-223,
557,
2386,
2584,
2853,
3387,
1178,
-2610,
-4853,
-5482,
-7643,
-7710,
-5138,
-3539,
-1142,
751,
1385,
2853,
2744,
3294,
5644,
3552,
2271,
2108,
-52,
-1746,
-2759,
-3103,
-3633,
-3469,
-2443,
-457,
-197,
-269,
13,
1637,
3952,
3354,
4365,
4915,
1627,
428,
-1217,
-4111,
-4566,
-6259,
-6458,
-4675,
-3812,
-2087,
-414,
-300,
740,
1367,
1172,
1694,
1678,
2983,
2179,
684,
1369,
-152,
-1562,
-1910,
-2983,
-2099,
-277,
-494,
-407,
-1549,
-3224,
-3460,
-2999,
-642,
861,
2495,
3523,
2934,
3613,
3332,
593,
-1052,
-2399,
-3148,
-3129,
-4482,
-4381,
-4066,
-4641,
-3228,
-1526,
-742,
1535,
1896,
1898,
3105,
3555,
3259,
2215,
801,
-74,
-698,
-1116,
-1784,
-3600,
-4257,
-4804,
-3776,
-2021,
-354,
1070,
1759,
898,
1668,
2141,
419,
958,
864,
1112,
549,
-535,
-848,
-828,
-1400,
-1375,
-1228,
-986,
-73,
-18,
-24,
-260,
-260,
-214,
-394,
-818,
352,
1004,
725,
332,
-281,
-206,
};
| 13,251
|
C++
|
.cxx
| 1,504
| 5.81383
| 33
| 0.546058
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,187
|
sound.cxx
|
w1hkj_fldigi/src/soundcard/sound.cxx
|
// ----------------------------------------------------------------------------
//
// sound.cxx
//
// Copyright (C) 2006-2013
// Dave Freese, W1HKJ
//
// Copyright (C) 2007-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <config.h>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <algorithm>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cerrno>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <semaphore.h>
#include <limits.h>
#if USE_OSS
# include <sys/ioctl.h>
# if defined(__OpenBSD__)
# include <soundcard.h>
# else
# include <sys/soundcard.h>
# endif
#endif
#include <math.h>
#if HAVE_DLOPEN
# include <dlfcn.h>
#endif
#include "gettext.h"
#include "sound.h"
#include "configuration.h"
#include "status.h"
#include "fileselect.h"
#include "trx.h"
#include "fl_digi.h"
#include "threads.h"
#include "timeops.h"
#include "ringbuffer.h"
#include "debug.h"
#include "qrunner.h"
#include "icons.h"
#include "macros.h"
#include "util.h"
#include "estrings.h"
#include "dr_mp3.h"
#define SND_BUF_LEN 65536
#define SND_RW_LEN (8 * SND_BUF_LEN)
#define SNDFILE_CHANNELS 2
int sndfile_samplerate[7] = {8000, 11025, 16000, 22050, 24000, 44100, 48000};
LOG_FILE_SOURCE(debug::LOG_AUDIO);
namespace SND_SUPPORT {
bool format_supported(int format) {
SF_INFO info = {
0,
sndfile_samplerate[progdefaults.wavSampleRate],
progdefaults.record_both_channels ? 2 : 1,
format, 0, 0 };
SNDFILE* sndf = sf_open("temp.audio", SFM_WRITE, &info);
sf_close(sndf);
remove("temp.audio");
if (sndf) return true;
return false;
}
void get_file_params(std::string def_fname, std::string &fname, int &format, bool check) {
bool isplayback = (def_fname.find("playback") != std::string::npos);
std::string filters;
if (isplayback)
filters = "Audio format\t*.{mp3,wav}\n";
else
filters = "Audio format\t*.wav\n";
format = SF_FORMAT_WAV | SF_FORMAT_PCM_16;
int fsel = 0;
const char *fn = 0;
if (isplayback)
fn = FSEL::select(_("Audio file"), filters.c_str(), def_fname.c_str(), &fsel);
else
fn = FSEL::saveas(_("Audio file"), filters.c_str(), def_fname.c_str(), &fsel);
if (!fn || !*fn) {
fname = "";
return;
}
fname = fn;
if (!isplayback && (fname.find(".wav") == std::string::npos))
fname.append(".wav");
if (check) {
FILE *f = fopen(fname.c_str(), "r");
if (f) {
fclose(f);
int ans = fl_choice("Replace %s?", "Yes", "No", 0, fname.c_str());
if ( ans == 1) fname = "";
}
}
}
void tag_file(SNDFILE *sndfile, const char *title) {
int err;
if ((err = sf_set_string(sndfile, SF_STR_TITLE, title)) != 0) {
LOG_VERBOSE("sf_set_string STR_TITLE: %s", sf_error_number(err));
return;
}
sf_set_string(sndfile, SF_STR_COPYRIGHT, progdefaults.myName.c_str());
sf_set_string(sndfile, SF_STR_SOFTWARE, PACKAGE_NAME "-" PACKAGE_VERSION);
sf_set_string(sndfile, SF_STR_ARTIST, progdefaults.myCall.c_str());
char s[64];
snprintf(s, sizeof(s), "%s freq=%s",
active_modem->get_mode_name(), inpFreq->value());
sf_set_string(sndfile, SF_STR_COMMENT, s);
time_t t = time(0);
struct tm zt;
(void)gmtime_r(&t, &zt);
if (strftime(s, sizeof(s), "%Y-%m-%dT%H:%M:%Sz", &zt) > 0)
sf_set_string(sndfile, SF_STR_DATE, s);
}
};
SoundBase::SoundBase()
: sample_frequency(0),
txppm(progdefaults.TX_corr), rxppm(progdefaults.RX_corr),
tx_src_state(0), rx_src_state(0),
wrt_buffer(new double[SND_BUF_LEN]),
ofCapture(0), ifPlayback(0), ofGenerate(0)
{
memset(wrt_buffer, 0, SND_BUF_LEN * sizeof(*wrt_buffer));
int err;
writ_src_data_left = new SRC_DATA;
writ_src_data_right = new SRC_DATA;
play_src_data = new SRC_DATA;
writ_src_state_left = src_new(progdefaults.sample_converter, 1, &err);
if (writ_src_state_left == 0)
throw SndException(src_strerror(err));
writ_src_state_right = src_new(progdefaults.sample_converter, 1, &err);
if (writ_src_state_right == 0)
throw SndException(src_strerror(err));
play_src_state = src_new(progdefaults.sample_converter, 1, &err);
if (play_src_state == 0)
throw SndException(src_strerror(err));
if (play_src_state == 0)
throw SndException(src_strerror(err));
src_write_buffer_left = new float [SND_RW_LEN];
if (!src_write_buffer_left)
throw SndException(src_strerror(err));
src_write_buffer_right = new float [SND_RW_LEN];
if (!src_write_buffer_right)
throw SndException(src_strerror(err));
src_rd_inp_buffer = new float [SND_RW_LEN];
if (!src_rd_inp_buffer)
throw SndException(src_strerror(err));
src_rd_out_buffer = new float [SND_RW_LEN];
if (!src_rd_out_buffer)
throw SndException(src_strerror(err));
modem_wr_sr = modem_play_sr = 0;
out_pointer = src_rd_out_buffer;
}
SoundBase::~SoundBase()
{
delete [] wrt_buffer;
if (ofGenerate)
sf_close(ofGenerate);
if (ofCapture)
sf_close(ofCapture);
if (ifPlayback)
sf_close(ifPlayback);
delete writ_src_data_left;
delete writ_src_data_right;
delete play_src_data;
delete [] src_write_buffer_left;
delete [] src_write_buffer_right;
delete [] src_rd_inp_buffer;
delete [] src_rd_out_buffer;
}
void SoundBase::stopCapture()
{
if (ofCapture) {
int err;
if ((err = sf_close(ofCapture)) != 0)
LOG_ERROR("sf_close error: %s", sf_error_number(err));
ofCapture = 0;
}
}
int SoundBase::startCapture(std::string fname, int format)
{
// frames (ignored), freq, channels, format, sections (ignored), seekable (ignored)
SF_INFO info = { 0, sndfile_samplerate[progdefaults.wavSampleRate],
progdefaults.record_both_channels ? 2 : 1,
// SNDFILE_CHANNELS,
format, 0, 0 };
if ((ofCapture = sf_open(fname.c_str(), SFM_WRITE, &info)) == NULL) {
LOG_ERROR("Could not write %s:%s", fname.c_str(), sf_strerror(NULL) );
return 0;
}
if (sf_command(ofCapture, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) != SF_TRUE)
LOG_ERROR("ofCapture update header command failed: %s", sf_strerror(ofCapture));
SND_SUPPORT::tag_file(ofCapture, "Captured audio");
return 1;
}
void SoundBase::stopGenerate()
{
if (ofGenerate) {
int err;
if ((err = sf_close(ofGenerate)) != 0)
LOG_ERROR("sf_close error: %s", sf_error_number(err));
ofGenerate = 0;
}
}
//int SoundBase::startGenerate(bool val, std::string fname, int format)
int SoundBase::startGenerate(std::string fname, int format)
{
SF_INFO info = { 0, sndfile_samplerate[progdefaults.wavSampleRate],
progdefaults.record_both_channels ? 2 : 1,
// SNDFILE_CHANNELS,
format, 0, 0 };
if ((ofGenerate = sf_open(fname.c_str(), SFM_WRITE, &info)) == NULL) {
LOG_ERROR("Could not write %s", fname.c_str());
return 0;
}
if (sf_command(ofGenerate, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) != SF_TRUE)
LOG_ERROR("ofGenerate update header command failed: %s", sf_strerror(ofGenerate));
SND_SUPPORT::tag_file(ofGenerate, "Generated audio");
modem_wr_sr = sample_frequency;
writ_src_data_left->src_ratio = 1.0 * sndfile_samplerate[progdefaults.wavSampleRate] / modem_wr_sr;
src_set_ratio(writ_src_state_left, writ_src_data_left->src_ratio);
writ_src_data_right->src_ratio = 1.0 * sndfile_samplerate[progdefaults.wavSampleRate] / modem_wr_sr;
src_set_ratio(writ_src_state_right, writ_src_data_right->src_ratio);
return 1;
}
void SoundBase::stopPlayback()
{
if (ifPlayback) {
int err;
if ((err = sf_close(ifPlayback)) != 0)
LOG_ERROR("sf_close error: %s", sf_error_number(err));
ifPlayback = 0;
}
progdefaults.loop_playback = false;
}
int SoundBase::startPlayback(std::string fname, int format)
{
play_info.frames = 0;
play_info.samplerate = 0;
play_info.channels = 0;
play_info.format = 0;
play_info.sections = 0;
play_info.seekable = 0;
if ((ifPlayback = sf_open(fname.c_str(), SFM_READ, &play_info)) == NULL) {
LOG_ERROR("Could not open %s:%s", fname.c_str(), sf_strerror(NULL) );
return 1;
}
LOG_VERBOSE
("wav file stats:\n\
frames : %d\n\
samplerate : %d\n\
channels : %d\n\
format : %d\n\
sections : %d\n\
seekable : %d",
static_cast<unsigned int>(play_info.frames),
play_info.samplerate,
play_info.channels,
play_info.format,
play_info.sections,
play_info.seekable);
modem_play_sr = sample_frequency;
play_src_data->src_ratio = 1.0 * modem_play_sr / play_info.samplerate;
src_set_ratio(play_src_state, play_src_data->src_ratio);
LOG_VERBOSE("src ratio %f", play_src_data->src_ratio);
new_playback = true;
return 0;
}
// ---------------------------------------------------------------------
// read_file
// can be simplified from the equivalent read audio stream
// source sr is arbitrary, requested is either 8000 or 11025 depending
// on the modem in use
// read from file and resample until a "count" number of converted samples
// is available, or until at the end of the input file
// ---------------------------------------------------------------------
extern int fmt_auto_record;
sf_count_t SoundBase::read_file(SNDFILE* file, float* buf, size_t count)
{
sf_count_t r = 0, rd_count = 0;
int err = 0;
if (new_playback || modem_play_sr != sample_frequency) {
modem_play_sr = sample_frequency;
play_src_data->src_ratio = 1.0 * modem_play_sr / play_info.samplerate;
src_set_ratio(play_src_state, play_src_data->src_ratio);
LOG_VERBOSE("src ratio %f", play_src_data->src_ratio);
new_playback = true;
}
if (new_playback) {
fmt_auto_record = 1;
}
#define RDBLKSIZE 1024
float rdbuf[2 * RDBLKSIZE];
int ch = play_info.channels;
while ( static_cast<size_t>(out_pointer - src_rd_out_buffer) < count) {
memset(src_rd_inp_buffer, 0, RDBLKSIZE * sizeof(float));
if (new_playback) {
new_playback = false;
rd_count = RDBLKSIZE;
}
else {
memset(rdbuf, 0, 2 * RDBLKSIZE * sizeof(float));
rd_count = sf_readf_float(file, rdbuf, RDBLKSIZE);
if (!rd_count) break;
for (int i = 0; i < rd_count; i++)
src_rd_inp_buffer[i] = rdbuf[i * ch];
}
play_src_data->data_in = src_rd_inp_buffer;
play_src_data->input_frames = rd_count;
play_src_data->data_out = out_pointer;
play_src_data->output_frames = SND_RW_LEN - (out_pointer - src_rd_out_buffer);
play_src_data->end_of_input = 0;
if ((err = src_process(play_src_state, play_src_data)) != 0)
throw SndException(src_strerror(err));
out_pointer += play_src_data->output_frames_gen;
}
if ( static_cast<size_t>(out_pointer - src_rd_out_buffer) >= count) {
memcpy(buf, src_rd_out_buffer, count * sizeof(float));
memmove(src_rd_out_buffer, src_rd_out_buffer + count, (SND_RW_LEN - count) * sizeof(float));
out_pointer -= count;
r = count;
}
if (r == 0) {
src_reset (play_src_state);
out_pointer = src_rd_out_buffer;
if (!progdefaults.loop_playback) {
stopPlayback();
bHighSpeed = false;
REQ(reset_mnuPlayback);
} else {
memset(buf, count, sizeof(*buf));
sf_seek(file, 0, SEEK_SET);
}
}
return r;
}
//----------------------------------------------------------------------
// Audio
// Adds ability to transmit an audio file using new macro tag:
// <AUDIO:path-filename>
// macro editor opens an OS select file dialog when the tag is
// selected from the pick list.
// suggested use:
// <MODEM:NULL><TX>
// <AUDIO:path-filename-1>
// <AUDIO:path-filename-2>
// <RX><@MODEM:BPSK31>
// or modem type of choice
// Audio file may be either wav or mp3 format, either mono or stereo
// any sample rate
// Returning to Rx stops current and any pending audio playback. Post
// Tx macro tags are then executed.
// T/R button or Escape key will abort the playback.
// Please use responsibly - know and understand your license limitations
// for transmitting audio files, especially music and/or copyrighted
// material.
//----------------------------------------------------------------------
int SoundBase::AudioMP3(std::string fname)
{
drmp3_config config;
drmp3_uint64 frame_count;
float* mp3_buffer = drmp3_open_file_and_read_f32(
fname.c_str(), &config, &frame_count );
if (!mp3_buffer) {
LOG_ERROR("File must be mp3 float format");
return 0;
}
LOG_INFO("\n\
MP3 parameters\n\
channels: %d\n\
sample rate: %d\n\
frame count: %ld\n",
config.outputChannels,
config.outputSampleRate,
long(frame_count));
float *buffer = new float[2 * frame_count];
if (!buffer) {
LOG_ERROR("Could not allocate audio buffer");
drmp3_free(mp3_buffer);
return 0;
}
if (config.outputChannels == 2) {
float maxval = 1.0;
for (unsigned int n = 0; n < frame_count; n++) {
buffer[2 * n] = mp3_buffer[2 * n] + mp3_buffer[2 * n + 1];
buffer[2 * n + 1] = 0;
if (fabs(buffer[2 * n]) > maxval) maxval = fabs(buffer[ 2 * n]);
}
for (unsigned int n = 0; n < frame_count; n++)
buffer[2 * n] /= maxval;
} else {
for (unsigned int n = frame_count - 1; n >= 0; n--) {
buffer[2 * n] = mp3_buffer[n];
buffer[2 * n + 1] = 0;
}
}
drmp3_free(mp3_buffer);
double save_sample_rate = req_sample_rate;
req_sample_rate = config.outputSampleRate;
unsigned int n = 0;
int incr = SCBLOCKSIZE;
while (n < frame_count) {
if (active_modem->get_stopflag()) {
Rx_queue_execute();
break;
}
if (n + incr < frame_count)
resample_write(&buffer[n*2], incr);
else
resample_write(&buffer[n*2], frame_count - n);
n += incr;
}
delete [] buffer;
req_sample_rate = save_sample_rate;
return n;
}
int SoundBase::AudioWAV(std::string fname)
{
SNDFILE *playback;
play_info.frames = 0;
play_info.samplerate = 0;
play_info.channels = 0;
play_info.format = 0;
play_info.sections = 0;
play_info.seekable = 0;
if ((playback = sf_open(fname.c_str(), SFM_READ, &play_info)) == NULL) {
LOG_ERROR("Could not open %s", fname.c_str());
return 0;
}
LOG_INFO("\
\nAudio file: %s\
\nframes: %ld\
\nsamplerate: %d\
\nchannels: %d",
fname.c_str(), (long)play_info.frames, play_info.samplerate, play_info.channels);
int ch = play_info.channels;
if (ch > 2) return 0;
int fsize = play_info.frames * 2;
float *buffer = new float[fsize];
if (!buffer)
return 0;
memset(buffer, 0, fsize * sizeof(*buffer));
int ret = sf_readf_float( playback, buffer, play_info.frames);
if (!ret) {
sf_close(playback);
delete [] buffer;
return 0;
}
double save_sample_rate = req_sample_rate;
req_sample_rate = play_info.samplerate;
if (ch == 1) {
for (long int n = play_info.frames - 1; n >= 0; n--) {
buffer[2 * n] = buffer[n];
buffer[2 * n + 1] = 0;
}
} else {
float maxval = 1.0;
for (long int n = play_info.frames - 1; n >= 0; n--) {
buffer[2 * n] = buffer[2 * n] + buffer[2 * n + 1];
buffer[2 * n + 1] = 0;
if (fabs(buffer[2*n] > maxval)) maxval = fabs(buffer[2*n]);
}
for (long int n = 0; n < play_info.frames; n++)
buffer[2*n] /= maxval;
}
unsigned int n = 0;
int incr = SCBLOCKSIZE;
while (n < play_info.frames) {
if (active_modem->get_stopflag()) {
Rx_queue_execute();
break;
}
if (n + incr < play_info.frames)
resample_write(&buffer[n*2], incr);
else
resample_write(&buffer[n*2], play_info.frames - n);
n += incr;
}
sf_close(playback);
delete [] buffer;
req_sample_rate = save_sample_rate;
return play_info.frames;
}
int SoundBase::Audio(std::string fname)
{
if (fname.empty())
return 0;
if ((fname.find("mp3") != std::string::npos) ||
(fname.find("MP3") != std::string::npos ))
return AudioMP3(fname);
else
return AudioWAV(fname);
}
// ---------------------------------------------------------------------
// write_file
// All sound buffer data is resampled to a specified sample rate
// progdefaults.wavSampleRate
// resultant data (left channel only) is written to a wav file
//----------------------------------------------------------------------
void SoundBase::write_file(SNDFILE* file, float* bufleft, float* bufright, size_t count)
{
bool must_delete = false;
if (bufright == NULL || !progdefaults.record_both_channels) {
bufright = new float[count];
memset(bufright, 0, count * sizeof(float));
must_delete = true;
}
int err;
size_t output_size = count;
float *bufl = bufleft;
float *bufr = bufright;
if (modem_wr_sr != sample_frequency) {
modem_wr_sr = sample_frequency;
writ_src_data_left->src_ratio = 1.0 * sndfile_samplerate[progdefaults.wavSampleRate] / modem_wr_sr;
writ_src_data_left->src_ratio = 1.0 * sndfile_samplerate[progdefaults.wavSampleRate] / modem_wr_sr;
src_set_ratio(writ_src_state_left, writ_src_data_left->src_ratio);
writ_src_data_right->src_ratio = 1.0 * sndfile_samplerate[progdefaults.wavSampleRate] / modem_wr_sr;
writ_src_data_right->src_ratio = 1.0 * sndfile_samplerate[progdefaults.wavSampleRate] / modem_wr_sr;
src_set_ratio(writ_src_state_right, writ_src_data_right->src_ratio);
}
writ_src_data_left->data_in = bufleft;
writ_src_data_left->input_frames = count;
writ_src_data_left->data_out = src_write_buffer_left;
writ_src_data_left->output_frames = SND_RW_LEN;
writ_src_data_left->end_of_input = 0;
writ_src_data_right->data_in = bufright;
writ_src_data_right->input_frames = count;
writ_src_data_right->data_out = src_write_buffer_right;
writ_src_data_right->output_frames = SND_RW_LEN;
writ_src_data_right->end_of_input = 0;
if ((err = src_process(writ_src_state_left, writ_src_data_left)) != 0) {
if (must_delete) {
delete [] bufright;
}
throw SndException(src_strerror(err));
}
if ((err = src_process(writ_src_state_right, writ_src_data_right)) != 0) {
if (must_delete) {
delete [] bufright;
}
throw SndException(src_strerror(err));
}
output_size = writ_src_data_left->output_frames_gen;
bufl = src_write_buffer_left;
bufr = src_write_buffer_right;
if (output_size) {
if (progdefaults.record_both_channels) {
float buffer[2*output_size];
memset(buffer, 0, 2 * output_size * sizeof(float));
for (size_t i = 0; i < output_size; i++) {
buffer[2*i] = bufl[i];//0.9 * bufl[i];
buffer[2*i + 1] = bufr[i];//0.9 * bufr[i];
}
sf_write_float(file, buffer, 2 * output_size);
} else {
sf_write_float(file, bufl, output_size);
}
}
if (must_delete) {
delete [] bufright;
}
return;
}
void SoundBase::write_file(SNDFILE* file, double* bufleft, double *bufright, size_t count)
{
float *outbuf_l = new float[count];
float *outbuf_r = new float[count];
for (size_t i = 0; i < count; i++) {
outbuf_l[i] = bufleft[i];
outbuf_r[i] = (bufright ? bufright[i] : 0);
}
write_file(file, outbuf_l, outbuf_r, count);
delete [] outbuf_l;
delete [] outbuf_r;
return;
}
#if USE_OSS
#define MAXSC 32767.0f
#define maxsc 32000.0
SoundOSS::SoundOSS(const char *dev ) {
device = dev;
cbuff = 0;
try {
Open(O_RDONLY);
getVersion();
getCapabilities();
getFormats();
Close();
}
catch (const SndException& e) {
LOG_ERROR("device %s error: %s", device.c_str(), e.what());
}
snd_buffer = new float [2 * SND_BUF_LEN];
src_buffer = new float [2 * SND_BUF_LEN];
cbuff = new unsigned char [4 * SND_BUF_LEN];
memset(snd_buffer, 0, 2 * SND_BUF_LEN * sizeof(*snd_buffer));
memset(src_buffer, 0, 2 * SND_BUF_LEN * sizeof(*src_buffer));
memset(cbuff, 0, 4 * SND_BUF_LEN * sizeof(*cbuff));
tx_src_data = new SRC_DATA;
rx_src_data = new SRC_DATA;
int err;
rx_src_state = src_new(progdefaults.sample_converter, 2, &err);
if (rx_src_state == 0)
throw SndException(src_strerror(err));
tx_src_state = src_new(progdefaults.sample_converter, 2, &err);
if (tx_src_state == 0)
throw SndException(src_strerror(err));
rx_src_data->src_ratio = 1.0/(1.0 + rxppm/1e6);
src_set_ratio ( rx_src_state, 1.0/(1.0 + rxppm/1e6));
tx_src_data->src_ratio = 1.0 + txppm/1e6;
src_set_ratio ( tx_src_state, 1.0 + txppm/1e6);
}
SoundOSS::~SoundOSS()
{
Close();
delete tx_src_data;
delete rx_src_data;
if (rx_src_state)
src_delete(rx_src_state);
if (tx_src_state)
src_delete(tx_src_state);
delete [] snd_buffer;
delete [] src_buffer;
delete [] cbuff;
}
void SoundOSS::setfragsize()
{
int sndparam;
// Try to get ~100ms worth of samples per fragment
sndparam = (int)log2(sample_frequency * 0.1);
// double since we are using 16 bit samples
sndparam += 1;
// Unlimited amount of buffers for RX, four for TX
if (mode == O_RDONLY)
sndparam |= 0x7FFF0000;
else
sndparam |= 0x00040000;
if (ioctl(device_fd, SNDCTL_DSP_SETFRAGMENT, &sndparam) < 0)
throw SndException(errno);
}
int SoundOSS::Open(int md, int freq)
{
Close();
mode = md;
try {
int oflags = md;
# ifdef HAVE_O_CLOEXEC
oflags = oflags | O_CLOEXEC;
# endif
#ifdef __FreeBSD__
/*
* In FreeBSD sound devices e.g. /dev/dsp0.0 can only be open once
* whereas /dev/dsp0 can be open multiple times. fldigi tries
* to open /dev/dsp0.0 multiple times which fails. Also see man 4 sound.
* "For specific sound card access, please instead use /dev/dsp or /dev/dsp%d"
* This is a hack. XXX - db VA3DB
*/
char *fixed_name;
char *p;
/* Look for a '.' if found, blow it away */
fixed_name = strdup(device.c_str());
p = strchr(fixed_name, '.');
if(p != NULL)
*p = '\0';
device_fd = fl_open(fixed_name, oflags, 0);
free(fixed_name);
#else
device_fd = fl_open(device.c_str(), oflags, 0);
#endif
if (device_fd == -1)
throw SndException(errno);
Format(AFMT_S16_LE); // default: 16 bit little endian
Channels(2); // 2 channels
Frequency(freq);
setfragsize();
}
catch (...) {
throw;
}
return 0;
}
void SoundOSS::Close(unsigned dir)
{
if (device_fd == -1)
return;
close(device_fd);
device_fd = -1;
}
void SoundOSS::getVersion()
{
version = 0;
if (ioctl(device_fd, OSS_GETVERSION, &version) == -1) {
version = -1;
throw SndException("OSS Version");
}
}
void SoundOSS::getCapabilities()
{
capability_mask = 0;
if (ioctl(device_fd, SNDCTL_DSP_GETCAPS, &capability_mask) == -1) {
capability_mask = 0;
throw SndException("OSS capabilities");
}
}
void SoundOSS::getFormats()
{
format_mask = 0;
if (ioctl(device_fd, SNDCTL_DSP_GETFMTS, &format_mask) == -1) {
format_mask = 0;
throw SndException("OSS formats");
}
}
void SoundOSS::Format(int format)
{
play_format = format;
if (ioctl(device_fd, SNDCTL_DSP_SETFMT, &play_format) == -1) {
device_fd = -1;
formatok = false;
throw SndException("Unsupported snd card format");
}
formatok = true;
}
void SoundOSS::Channels(int nuchannels)
{
channels = nuchannels;
if (ioctl(device_fd, SNDCTL_DSP_CHANNELS, &channels) == -1) {
device_fd = -1;
throw "Snd card channel request failed";
}
}
void SoundOSS::Frequency(int frequency)
{
sample_frequency = frequency;
if (ioctl(device_fd, SNDCTL_DSP_SPEED, &sample_frequency) == -1) {
device_fd = -1;
throw SndException("Cannot set frequency");
}
}
int SoundOSS::BufferSize( int seconds )
{
int bytes_per_channel = 0;
switch (play_format) {
case AFMT_MU_LAW:
case AFMT_A_LAW:
case AFMT_IMA_ADPCM:
bytes_per_channel = 0; /* format not supported by this program */
break;
case AFMT_S16_BE:
case AFMT_U16_LE:
case AFMT_U16_BE:
case AFMT_MPEG:
case AFMT_S16_LE:
bytes_per_channel = 2;
break;
case AFMT_U8:
case AFMT_S8:
bytes_per_channel = 1;
break;
}
return seconds * sample_frequency * bytes_per_channel * channels;
}
bool SoundOSS::wait_till_finished()
{
if (ioctl(device_fd, SNDCTL_DSP_POST, (void*)1) == -1 )
return false;
if (ioctl(device_fd, SNDCTL_DSP_SYNC, (void*)0) == -1)
return false; /* format (or ioctl()) not supported by device */
return true; /* all sound has been played */
}
bool SoundOSS::reset_device()
{
if (ioctl(device_fd, SNDCTL_DSP_RESET, 0) == -1) {
device_fd = -1;
return false; /* format (or ioctl()) not supported by device */
}
return 1; /* sounddevice has been reset */
}
size_t SoundOSS::Read(float *buffer, size_t buffersize)
{
short int *ibuff = (short int *)cbuff;
int numread;
numread = read(device_fd, cbuff, buffersize * 4);
if (numread == -1)
throw SndException(errno);
for (size_t i = 0; i < buffersize * 2; i++)
src_buffer[i] = ibuff[i] / MAXSC;
for (size_t i = 0; i < buffersize; i++)
buffer[i] = src_buffer[2*i + (progdefaults.ReverseRxAudio ? 1 : 0)];
if (ofCapture)
write_file(ofCapture, buffer, NULL, buffersize);
if (ifPlayback) {
read_file(ifPlayback, buffer, buffersize);
return buffersize;
}
if (rxppm != progdefaults.RX_corr) {
rxppm = progdefaults.RX_corr;
rx_src_data->src_ratio = 1.0/(1.0 + rxppm/1e6);
src_set_ratio ( rx_src_state, 1.0/(1.0 + rxppm/1e6));
}
if (rxppm == 0)
return buffersize;
// process using samplerate library
rx_src_data->data_in = src_buffer;
rx_src_data->input_frames = buffersize;
rx_src_data->data_out = snd_buffer;
rx_src_data->output_frames = SND_BUF_LEN;
rx_src_data->end_of_input = 0;
if ((numread = src_process(rx_src_state, rx_src_data)) != 0)
throw SndException(src_strerror(numread));
numread = rx_src_data->output_frames_gen;
for (int i = 0; i < numread; i++)
buffer[i] = snd_buffer[2*i + (progdefaults.sig_on_right_channel ? 1 : 0)];
return numread;
}
size_t SoundOSS::Write(double *buf, size_t count)
{
int retval;
short int *wbuff;
unsigned char *p;
if (ofGenerate)
write_file(ofGenerate, buf, NULL, count);
if (PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST) {
return count;
}
if (txppm != progdefaults.TX_corr) {
txppm = progdefaults.TX_corr;
tx_src_data->src_ratio = 1.0 + txppm/1e6;
src_set_ratio ( tx_src_state, 1.0 + txppm/1e6);
}
if (txppm == 0) {
wbuff = new short int[2*count];
p = (unsigned char *)wbuff;
for (size_t i = 0; i < count; i++) {
wbuff[2*i] = wbuff[2*i+1] = (short int)(buf[i] * maxsc);
}
count *= sizeof(short int);
retval = write(device_fd, p, 2*count);
delete [] wbuff;
if (retval == -1)
throw SndException(errno);
}
else {
float *inbuf;
inbuf = new float[2*count];
size_t bufsize;
for (size_t i = 0; i < count; i++)
inbuf[2*i] = inbuf[2*i+1] = buf[i];
tx_src_data->data_in = inbuf;
tx_src_data->input_frames = count;
tx_src_data->data_out = src_buffer;
tx_src_data->output_frames = SND_BUF_LEN;
tx_src_data->end_of_input = 0;
retval = src_process(tx_src_state, tx_src_data);
delete [] inbuf;
if (retval != 0)
throw SndException(src_strerror(retval));
bufsize = tx_src_data->output_frames_gen;
wbuff = new short int[2*bufsize];
p = (unsigned char *)wbuff;
for (size_t i = 0; i < 2*bufsize; i++)
wbuff[i] = (short int)(src_buffer[i] * maxsc);
int num2write = bufsize * 2 * sizeof(short int);
retval = write(device_fd, p, num2write);
delete [] wbuff;
if (retval != num2write)
throw SndException(errno);
retval = count;
}
return retval;
}
size_t SoundOSS::resample_write(float *buf, size_t count)
{
double *samples = new double[2*count];
Write(samples, count);
delete [] samples;
return 0;
}
size_t SoundOSS::Write_stereo(double *bufleft, double *bufright, size_t count)
{
int retval;
short int *wbuff;
unsigned char *p;
if (ofGenerate)
write_file(ofGenerate, bufleft, bufright, count);
if (PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST) {
return count;
}
if (txppm != progdefaults.TX_corr) {
txppm = progdefaults.TX_corr;
tx_src_data->src_ratio = 1.0 + txppm/1e6;
src_set_ratio ( tx_src_state, 1.0 + txppm/1e6);
}
if (txppm == 0) {
wbuff = new short int[2*count];
p = (unsigned char *)wbuff;
for (size_t i = 0; i < count; i++) {
if (progdefaults.ReverseAudio) {
wbuff[2*i+1] = (short int)(bufleft[i] * maxsc);
wbuff[2*i] = (short int)(bufright[i] * maxsc);
} else {
wbuff[2*i] = (short int)(bufleft[i] * maxsc);
wbuff[2*i+1] = (short int)(bufright[i] * maxsc);
}
}
count *= sizeof(short int);
retval = write(device_fd, p, 2*count);
delete [] wbuff;
if (retval == -1)
throw SndException(errno);
}
else {
float *inbuf;
inbuf = new float[2*count];
size_t bufsize;
for (size_t i = 0; i < count; i++) {
if (progdefaults.ReverseAudio) {
inbuf[2*i+1] = bufleft[i];
inbuf[2*i] = bufright[i];
} else {
inbuf[2*i] = bufleft[i];
inbuf[2*i+1] = bufright[i];
}
}
tx_src_data->data_in = inbuf;
tx_src_data->input_frames = count;
tx_src_data->data_out = src_buffer;
tx_src_data->output_frames = SND_BUF_LEN;
tx_src_data->end_of_input = 0;
retval = src_process(tx_src_state, tx_src_data);
delete [] inbuf;
if (retval != 0)
throw SndException(src_strerror(retval));
bufsize = tx_src_data->output_frames_gen;
wbuff = new short int[2*bufsize];
p = (unsigned char *)wbuff;
for (size_t i = 0; i < 2*bufsize; i++)
wbuff[i] = (short int)(src_buffer[i] * maxsc);
int num2write = bufsize * 2 * sizeof(short int);
retval = write(device_fd, p, num2write);
delete [] wbuff;
if (retval != num2write)
throw SndException(errno);
retval = count;
}
return retval;
}
#endif // USE_OSS
#if USE_PORTAUDIO
bool SoundPort::pa_init = false;
std::vector<const PaDeviceInfo*> SoundPort::devs;
static std::ostringstream device_text[2];
static pthread_mutex_t device_mutex = PTHREAD_MUTEX_INITIALIZER;
std::map<std::string, std::vector<double> > supported_rates[2];
void SoundPort::initialize(void)
{
if (pa_init)
return;
init_hostapi_ext();
int err;
if ((err = Pa_Initialize()) != paNoError) {
#if __WIN32__
LOG_PERROR(win_error_string(err).c_str());
#else
LOG_PERROR("Portaudio Initialize error");
#endif
throw SndPortException(err);
}
pa_init = true;
PaDeviceIndex ndev;
if ((ndev = Pa_GetDeviceCount()) < 0) {
LOG_PERROR("Portaudio device count error");
throw SndPortException(ndev);
}
if (ndev == 0) {
LOG_PERROR("Portaudio, no audio devices");
throw SndException(ENODEV, "No available audio devices");
}
devs.reserve(ndev);
for (PaDeviceIndex i = 0; i < ndev; i++)
devs.push_back(Pa_GetDeviceInfo(i));
}
void SoundPort::terminate(void)
{
if (!pa_init)
return;
static_cast<void>(Pa_Terminate());
pa_init = false;
devs.clear();
supported_rates[0].clear();
supported_rates[1].clear();
}
const std::vector<const PaDeviceInfo*>& SoundPort::devices(void)
{
return devs;
}
void SoundPort::devices_info(std::string& in, std::string& out)
{
guard_lock devices_lock(&device_mutex);
in = device_text[0].str();
out = device_text[1].str();
}
const std::vector<double>& SoundPort::get_supported_rates(const std::string& name, unsigned dir)
{
return supported_rates[dir][name];
}
SoundPort::SoundPort(const char *in_dev, const char *out_dev)
{
req_sample_rate = 0;
sd[0].device = in_dev;
sd[0].params.channelCount = 2; // init_stream can change this to 0 or 1
sd[0].stream = 0;
sd[0].frames_per_buffer = paFramesPerBufferUnspecified;
sd[0].dev_sample_rate = 0;
sd[0].state = spa_continue;
sd[0].rb = 0;
sd[0].advance = 0;
sd[1].device = out_dev;
sd[1].params.channelCount = 2;
sd[1].stream = 0;
sd[1].frames_per_buffer = paFramesPerBufferUnspecified;
sd[1].dev_sample_rate = 0;
sd[1].state = spa_continue;
sd[1].rb = 0;
sd[1].advance = 0;
sem_t** sems[] = { &sd[0].rwsem, &sd[1].rwsem };
#if USE_NAMED_SEMAPHORES
char sname[32];
#endif
for (size_t i = 0; i < sizeof(sems)/sizeof(*sems); i++) {
#if USE_NAMED_SEMAPHORES
unsigned int un = i;
snprintf(sname, sizeof(sname), "%u-%u-%s", un, getpid(), PACKAGE_TARNAME);
if ((*sems[i] = sem_open(sname, O_CREAT | O_EXCL, 0600, 0)) == (sem_t*)SEM_FAILED) {
pa_perror(errno, sname);
throw SndException(errno);
}
# if HAVE_SEM_UNLINK
if (sem_unlink(sname) == -1) {
pa_perror(errno, sname);
throw SndException(errno);
}
# endif
#else
*sems[i] = new sem_t;
if (sem_init(*sems[i], 0, 0) == -1) {
#if __WIN32__
int err = GetLastError();
LOG_PERROR(win_error_string(err).c_str());
#endif
pa_perror(errno, "sem_init error");
throw SndException(errno);
}
#endif // USE_NAMED_SEMAPHORES
}
for (size_t i = 0; i < 2; i++) {
sd[i].cmutex = new pthread_mutex_t;
pthread_mutex_init(sd[i].cmutex, NULL);
sd[i].ccond = new pthread_cond_t;
pthread_cond_init(sd[i].ccond, NULL);
}
tx_src_data = new SRC_DATA;
src_buffer = new float[sd[1].params.channelCount * SND_BUF_LEN];
fbuf = new float[2 * SND_BUF_LEN];
memset(src_buffer, 0, sd[1].params.channelCount * SND_BUF_LEN * sizeof(*src_buffer));
memset(fbuf, 0, 2 * SND_BUF_LEN * sizeof(*fbuf));
}
SoundPort::~SoundPort()
{
Close();
sem_t* sems[] = { sd[0].rwsem, sd[1].rwsem };
for (size_t i = 0; i < sizeof(sems)/sizeof(*sems); i++) {
#if USE_NAMED_SEMAPHORES
if (sem_close(sems[i]) == -1)
LOG_PERROR("sem_close");
#else
if (sem_destroy(sems[i]) == -1)
LOG_PERROR("sem_destroy");
delete sems[i];
#endif
}
for (size_t i = 0; i < 2; i++) {
if (pthread_mutex_destroy(sd[i].cmutex) == -1) {
pa_perror(errno, "pthread mutex destroy");
terminate(); //throw SndException(errno);
}
delete sd[i].cmutex;
if (pthread_cond_destroy(sd[i].ccond) == -1) {
pa_perror(errno, "pthread cond destroy");
terminate(); //throw SndException(errno);
}
delete sd[i].ccond;
}
delete sd[0].rb;
delete sd[1].rb;
if (rx_src_state)
src_delete(rx_src_state);
if (tx_src_state)
src_delete(tx_src_state);
delete tx_src_data;
delete [] src_buffer;
delete [] fbuf;
}
int SoundPort::Open(int mode, int freq)
{
int old_sample_rate = (int)req_sample_rate;
req_sample_rate = sample_frequency = freq;
// do we need to (re)initialise the streams?
int ret = 1;
int sr[2] = { progdefaults.in_sample_rate, progdefaults.out_sample_rate };
// initialize stream if it is a JACK device, regardless of mode
device_iterator idev;
int device_type = 0;
if (mode == O_WRONLY && (idev = name_to_device(sd[0].device, 0)) != devs.end() &&
(device_type = Pa_GetHostApiInfo((*idev)->hostApi)->type) == paJACK)
mode = O_RDWR;
if (mode == O_RDONLY && (idev = name_to_device(sd[1].device, 1)) != devs.end() &&
(device_type = Pa_GetHostApiInfo((*idev)->hostApi)->type) == paJACK)
mode = O_RDWR;
size_t start = (mode == O_RDONLY || mode == O_RDWR) ? 0 : 1,
end = (mode == O_WRONLY || mode == O_RDWR) ? 1 : 0;
for (size_t i = start; i <= end; i++) {
if ( !(stream_active(i) && (Pa_GetHostApiInfo((*sd[i].idev)->hostApi)->type == paJACK ||
old_sample_rate == freq ||
sr[i] != SAMPLE_RATE_AUTO)) ) {
Close(i);
try {
init_stream(i);
} catch (const SndException& e) {
LOG_ERROR("SndException: %s", e.what());
throw SndPortException(paDeviceUnavailable);
}
src_data_reset(i);
// reset the semaphore
while (sem_trywait(sd[i].rwsem) == 0);
if (errno && errno != EAGAIN) {
pa_perror(errno, "open failed");
throw SndException(errno);
}
start_stream(i);
ret = 0;
}
else {
pause_stream(i);
src_data_reset(i);
sd[i].state = spa_continue;
}
}
static char pa_open_str[500];
snprintf(pa_open_str, sizeof(pa_open_str),
"\
Port Audio open mode = %s\n\
device type = %s\n\
device name = %s\n\
# input channels %d\n\
# output channels %d",
mode == O_WRONLY ? "Write" :
mode == O_RDONLY ? "Read" :
mode == O_RDWR ? "Read/Write" : "unknown",
device_type == 0 ? "paInDevelopment" :
device_type == 1 ? "paDirectSound" :
device_type == 2 ? "paMME" :
device_type == 3 ? "paASIO" :
device_type == 4 ? "paSoundManager" :
device_type == 5 ? "paCoreAudio" :
device_type == 7 ? "paOSS" :
device_type == 8 ? "paALSA" :
device_type == 9 ? "paAL" :
device_type == 10 ? "paBeOS" :
device_type == 11 ? "paWDMKS" :
device_type == 12 ? "paJACK" :
device_type == 13 ? "paWASAPI" :
device_type == 14 ? "paAudioScienceHPI" : "unknown",
mode == O_WRONLY ? sd[1].device.c_str() :
mode == O_RDONLY ? sd[0].device.c_str() : "unknown",
sd[0].params.channelCount,
sd[1].params.channelCount );
LOG_INFO( "%s", pa_open_str);
return ret;
}
void SoundPort::pause_stream(unsigned dir)
{
if (sd[dir].stream == 0 || !stream_active(dir))
return;
pthread_mutex_lock(sd[dir].cmutex);
sd[dir].state = spa_pause;
if (pthread_cond_timedwait_rel(sd[dir].ccond, sd[dir].cmutex, 5.0) == -1 && errno == ETIMEDOUT)
LOG_ERROR("stream %u wedged", dir);
pthread_mutex_unlock(sd[dir].cmutex);
}
void SoundPort::Close(unsigned dir)
{
unsigned start, end;
if (dir == UINT_MAX) {
start = 0;
end = 1;
}
else
start = end = dir;
for (unsigned i = start; i <= end; i++) {
if (!stream_active(i))
continue;
pthread_mutex_lock(sd[i].cmutex);
sd[i].state = spa_complete;
// first wait for buffers to be drained and for the
// stop callback to signal us that the stream has
// been stopped
if (pthread_cond_timedwait_rel(sd[i].ccond, sd[i].cmutex, 5.0) == -1 &&
errno == ETIMEDOUT)
LOG_ERROR("stream %u wedged", i);
pthread_mutex_unlock(sd[i].cmutex);
sd[i].state = spa_continue;
int err;
if ((err = Pa_CloseStream(sd[i].stream)) != paNoError)
pa_perror(err, "Pa_CloseStream");
sd[i].stream = 0;
}
}
void SoundPort::Abort(unsigned dir)
{
unsigned start, end;
if (dir == UINT_MAX) {
start = 0;
end = 1;
}
else
start = end = dir;
int err;
for (unsigned i = start; i <= end; i++) {
if (!stream_active(i))
continue;
if ((err = Pa_AbortStream(sd[i].stream)) != paNoError)
#if __WIN32__
LOG_PERROR(win_error_string(err).c_str());
#endif
pa_perror(err, "Pa_AbortStream");
sd[i].stream = 0;
}
}
#define WAIT_FOR_COND(cond, s, t) \
do { \
while (!(cond)) { \
if (sem_timedwait_rel(s, t) == -1) { \
if (errno == ETIMEDOUT) { \
timeout = true; \
break; \
} else if (errno == EINTR) { \
continue; \
} \
LOG_PERROR("sem_timedwait"); \
throw SndException(errno); \
} \
} \
} while (0)
size_t SoundPort::Read(float *buf, size_t count)
{
if (ifPlayback) {
read_file(ifPlayback, buf, count);
if (!ofCapture) {
if (!bHighSpeed)
MilliSleep((long)ceil((1e3 * count) / req_sample_rate));
return count;
}
}
if (rxppm != progdefaults.RX_corr)
rxppm = progdefaults.RX_corr;
sd[0].src_ratio = req_sample_rate / (sd[0].dev_sample_rate * (1.0 + rxppm / 1e6));
src_set_ratio(rx_src_state, sd[0].src_ratio);
size_t maxframes = (size_t)floor(sd[0].rb->length() * sd[0].src_ratio / sd[0].params.channelCount);
if (unlikely(count > maxframes)) {
size_t n = 0;
#define PA_TIMEOUT_TRIES 10
int pa_timeout = PA_TIMEOUT_TRIES;
// possible to lock up in this while block if the Read(...) fails
while (count > maxframes) {
n += Read(buf, maxframes);
buf += maxframes * sd[0].params.channelCount;
count -= n;//maxframes;
pa_timeout--;
if (pa_timeout == 0) {
#if __WIN32__
int err = GetLastError();
LOG_PERROR(win_error_string(err).c_str());
#endif
pa_perror(1, "Portaudio read error #1");
throw SndException("Portaudio read error 1");
}
}
if (count > 0)
n += Read(buf, count);
return n;
}
float* rbuf = fbuf;
if (req_sample_rate != sd[0].dev_sample_rate || rxppm != 0) {
long r;
size_t n = 0;
sd[0].blocksize = SCBLOCKSIZE;
while (n < count) {
if ((r = src_callback_read(rx_src_state, sd[0].src_ratio,
count - n, rbuf + n * sd[0].params.channelCount)) == 0) {
pa_perror(2, "Portaudio read error #2");
throw SndException("Portaudio read error 2");
}
n += r;
}
}
else {
bool timeout = false;
WAIT_FOR_COND( (sd[0].rb->read_space() >= count * sd[0].params.channelCount / sd[0].src_ratio), sd[0].rwsem,
(MAX(1.0, 2 * count * sd[0].params.channelCount / sd->dev_sample_rate)) );
if (timeout) {
pa_perror(3, "Portaudio read error #3");
throw SndException("Portaudio read error 3");
}
ringbuffer<float>::vector_type vec[2];
sd[0].rb->get_rv(vec);
if (vec[0].len >= count * sd[0].params.channelCount) {
rbuf = vec[0].buf;
sd[0].advance = vec[0].len;
}
else
sd[0].rb->read(rbuf, count * sd[0].params.channelCount);
}
if (sd[0].advance) {
sd[0].rb->read_advance(sd[0].advance);
sd[0].advance = 0;
}
// transfer active input channel; left == 0, right == 1
size_t n;
for (size_t i = 0; i < count; i++) {
n = sd[0].params.channelCount * i;
if (sd[0].params.channelCount == 2)
n += progdefaults.ReverseRxAudio;
buf[i] = rbuf[n];
}
if (ofCapture)
write_file(ofCapture, buf, NULL, count);
return count;
}
size_t SoundPort::Write(double *buf, size_t count)
{
if (ofGenerate)
write_file(ofGenerate, buf, NULL, count);
if (PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST) {
return count;
}
// copy input to both channels if right channel enabled
for (size_t i = 0; i < count; i++)
if (progdefaults.sig_on_right_channel)
fbuf[sd[1].params.channelCount * i] = fbuf[sd[1].params.channelCount * i + 1] = buf[i];
else if (progdefaults.ReverseAudio) {
fbuf[sd[1].params.channelCount * i + 1] = buf[i];
fbuf[sd[1].params.channelCount * i] = 0;
} else {
fbuf[sd[1].params.channelCount * i] = buf[i];
fbuf[sd[1].params.channelCount * i + 1] = 0;
}
return resample_write(fbuf, count);
}
size_t SoundPort::Write_stereo(double *bufleft, double *bufright, size_t count)
{
if (sd[1].params.channelCount != 2)
return Write(bufleft, count);
if (ofGenerate)
write_file(ofCapture, bufleft, bufright, count);
if (PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST) {
return count;
}
// interleave into fbuf
for (size_t i = 0; i < count; i++) {
if (progdefaults.ReverseAudio) {
fbuf[sd[1].params.channelCount * i + 1] = bufleft[i];
fbuf[sd[1].params.channelCount * i] = bufright[i];
} else {
fbuf[sd[1].params.channelCount * i] = bufleft[i];
fbuf[sd[1].params.channelCount * i + 1] = bufright[i];
}
}
return resample_write(fbuf, count);
}
size_t SoundPort::resample_write(float* buf, size_t count)
{
size_t maxframes = (size_t)floor((sd[1].rb->length() / sd[1].params.channelCount) / tx_src_data->src_ratio);
maxframes /= 2; // don't fill the buffer
if (unlikely(count > maxframes)) {
size_t n = 0;
#define PA_TIMEOUT_TRIES 10
int pa_timeout = PA_TIMEOUT_TRIES;
// possible to lock up in this while block if the resample_write(...) fails
while (count > maxframes) {
n += resample_write(buf, maxframes);
buf += sd[1].params.channelCount * maxframes;
count -= maxframes;
pa_timeout--;
if (pa_timeout == 0) {
pa_perror(1, "Portaudio write error #1");
throw SndException("Portaudio write error 1");
}
}
if (count > 0)
n += resample_write(buf, count);
return n;
}
assert(count * sd[1].params.channelCount * tx_src_data->src_ratio <= sd[1].rb->length());
ringbuffer<float>::vector_type vec[2];
sd[1].rb->get_wv(vec);
float* wbuf = buf;
if (req_sample_rate != sd[1].dev_sample_rate || progdefaults.TX_corr != 0) {
if (vec[0].len >= sd[1].params.channelCount * (size_t)ceil(count * tx_src_data->src_ratio))
wbuf = vec[0].buf; // direct write in the rb
else
wbuf = src_buffer;
if (txppm != progdefaults.TX_corr)
txppm = progdefaults.TX_corr;
tx_src_data->src_ratio = sd[1].dev_sample_rate * (1.0 + txppm / 1e6) / req_sample_rate;
src_set_ratio(tx_src_state, tx_src_data->src_ratio);
tx_src_data->data_in = buf;
tx_src_data->input_frames = count;
tx_src_data->data_out = wbuf;
tx_src_data->output_frames = (wbuf == vec[0].buf ? vec[0].len : SND_BUF_LEN);
tx_src_data->end_of_input = 0;
int r;
if ((r = src_process(tx_src_state, tx_src_data)) != 0) {
pa_perror(2, "Portaudio write error #2");
throw SndException("Portaudio write error 2");
}
if (tx_src_data->output_frames_gen == 0) // input was too small
return count;
count = tx_src_data->output_frames_gen;
if (wbuf == vec[0].buf) { // advance write pointer and return
sd[1].rb->write_advance(sd[1].params.channelCount * count);
sem_trywait(sd[1].rwsem);
return count;
}
}
// if we didn't do a direct resample into the rb, or didn't resample at all,
// we must now copy buf into the ringbuffer, possibly waiting for space first
bool timeout = false;
WAIT_FOR_COND( (sd[1].rb->write_space() >= sd[1].params.channelCount * count), sd[1].rwsem,
(MAX(1.0, 2 * sd[1].params.channelCount * count / sd[1].dev_sample_rate)) );
if (timeout) {
pa_perror(3, "Portaudio write error #3");
throw SndException("Portaudio write error 3");
}
sd[1].rb->write(wbuf, sd[1].params.channelCount * count);
return count;
}
void SoundPort::flush(unsigned dir)
{
unsigned start, end;
if (dir == UINT_MAX) {
start = 0;
end = 1;
}
else
start = end = dir;
for (unsigned i = start; i <= end; i++) {
if (!stream_active(i))
continue;
pthread_mutex_lock(sd[i].cmutex);
sd[i].state = spa_drain;
if (pthread_cond_timedwait_rel(sd[i].ccond, sd[i].cmutex, 5.0) == -1
&& errno == ETIMEDOUT)
LOG_ERROR("stream %u wedged", i);
pthread_mutex_unlock(sd[i].cmutex);
sd[i].state = spa_continue;
}
}
void SoundPort::src_data_reset(unsigned dir)
{
size_t rbsize;
int err;
if (dir == 0) {
if (rx_src_state)
src_delete(rx_src_state);
rx_src_state = src_callback_new(src_read_cb, progdefaults.sample_converter,
sd[0].params.channelCount, &err, &sd[0]);
if (!rx_src_state) {
pa_perror(err, src_strerror(err));
throw SndException(src_strerror(err));
}
sd[0].src_ratio = req_sample_rate / (sd[0].dev_sample_rate * (1.0 + rxppm / 1e6));
}
else if (dir == 1) {
if (tx_src_state)
src_delete(tx_src_state);
tx_src_state = src_new(progdefaults.sample_converter, sd[1].params.channelCount, &err);
if (!tx_src_state) {
pa_perror(err, src_strerror(err));
throw SndException(src_strerror(err));
}
tx_src_data->src_ratio = sd[1].dev_sample_rate * (1.0 + txppm / 1e6) / req_sample_rate;
}
rbsize = 2 * MAX(ceil2(
(unsigned)(2 * sd[dir].params.channelCount * SCBLOCKSIZE *
MAX(req_sample_rate, sd[dir].dev_sample_rate) /
MIN(req_sample_rate, sd[dir].dev_sample_rate))),
8192);
std::stringstream info;
info << "rbsize = " << rbsize;
LOG_VERBOSE("%s", info.str().c_str());
if (sd[dir].rb) delete sd[dir].rb;
sd[dir].rb = new ringbuffer<float>(rbsize);
}
long SoundPort::src_read_cb(void* arg, float** data)
{
struct stream_data* sd = reinterpret_cast<stream_data*>(arg);
// advance read pointer for previous read
if (sd->advance) {
sd->rb->read_advance(sd->advance);
sd->advance = 0;
}
// wait for data
bool timeout = false;
WAIT_FOR_COND( (sd->rb->read_space() >= (size_t)sd[0].params.channelCount * SCBLOCKSIZE), sd->rwsem,
(MAX(1.0, 2 * sd[0].params.channelCount * SCBLOCKSIZE / sd->dev_sample_rate)) );
if (timeout) {
*data = 0;
return 0;
}
ringbuffer<float>::vector_type vec[2];
sd->rb->get_rv(vec);
*data = vec[0].buf;
sd->advance = vec[0].len;
return vec[0].len / sd[0].params.channelCount;
}
SoundPort::device_iterator SoundPort::name_to_device(std::string &name, unsigned dir)
{
device_iterator i;
for (i = devs.begin(); i != devs.end(); ++i)
if (name == (*i)->name && (dir ? (*i)->maxOutputChannels : (*i)->maxInputChannels))
break;
return i;
}
void SoundPort::init_stream(unsigned dir)
{
const char* dir_str[2] = { "input", "output" };
PaDeviceIndex idx = paNoDevice;
LOG_DEBUG("looking for device \"%s\"", sd[dir].device.c_str());
if ((sd[dir].idev = name_to_device(sd[dir].device, dir)) != devs.end())
idx = sd[dir].idev - devs.begin();
if (idx == paNoDevice) { // no match
LOG_ERROR("Could not find device \"%s\", using default device", sd[dir].device.c_str());
PaDeviceIndex def = (dir == 0 ? Pa_GetDefaultInputDevice() : Pa_GetDefaultOutputDevice());
if (def == paNoDevice) {
pa_perror(paDeviceUnavailable, "Portaudio device unavailable");
throw SndPortException(paDeviceUnavailable);
}
sd[dir].idev = devs.begin() + def;
idx = def;
}
else if (sd[dir].idev == devs.end()) // if we only found a near-match point the idev iterator to it
sd[dir].idev = devs.begin() + idx;
const PaHostApiInfo* host_api = Pa_GetHostApiInfo((*sd[dir].idev)->hostApi);
int max_channels = dir ? (*sd[dir].idev)->maxOutputChannels :
(*sd[dir].idev)->maxInputChannels;
if ((host_api->type == paALSA || host_api->type == paOSS) && max_channels == 0) {
pa_perror(EBUSY, "Portaudio device busy");
throw SndException(EBUSY);
}
if (dir == 0) {
sd[0].params.device = idx;
sd[0].params.sampleFormat = paFloat32;
sd[0].params.suggestedLatency = (*sd[dir].idev)->defaultHighInputLatency;
sd[0].params.hostApiSpecificStreamInfo = NULL;
if (max_channels < 2)
sd[0].params.channelCount = max_channels;
if (max_channels == 0) {
pa_perror(EBUSY, "Portaudio device cannot open for read");
throw SndException(EBUSY);
}
}
else {
sd[1].params.device = idx;
sd[1].params.sampleFormat = paFloat32;
if (host_api->type == paMME)
sd[1].params.suggestedLatency = (*sd[dir].idev)->defaultLowOutputLatency;
else
sd[1].params.suggestedLatency = (*sd[dir].idev)->defaultHighOutputLatency;
sd[1].params.hostApiSpecificStreamInfo = NULL;
if (max_channels < 2)
sd[1].params.channelCount = max_channels;
}
const std::vector<double>& rates = supported_rates[dir][(*sd[dir].idev)->name];
if (rates.size() <= 1)
probe_supported_rates(sd[dir].idev);
std::ostringstream ss;
if (rates.size() > 1)
copy(rates.begin() + 1, rates.end(), std::ostream_iterator<double>(ss, " "));
else
ss << "Unknown";
{
guard_lock devices_lock(&device_mutex);
device_text[dir].str("");
device_text[dir]
<< "index: " << idx
<< "\nname: " << (*sd[dir].idev)->name
<< "\nhost API: " << host_api->name
<< "\nmax input channels: " << (*sd[dir].idev)->maxInputChannels
<< "\nmax output channels: " << (*sd[dir].idev)->maxOutputChannels
<< "\ndefault sample rate: " << (*sd[dir].idev)->defaultSampleRate
<< "\nsupported sample rates: " << ss.str()
<< std::boolalpha
<< "\ninput only: " << ((*sd[dir].idev)->maxOutputChannels == 0)
<< "\noutput only: " << ((*sd[dir].idev)->maxInputChannels == 0)
<< "\nfull duplex: " << full_duplex_device(*sd[dir].idev)
<< "\nsystem default input: " << (idx == Pa_GetDefaultInputDevice())
<< "\nsystem default output: " << (idx == Pa_GetDefaultOutputDevice())
<< "\nhost API default input: " << (idx == host_api->defaultInputDevice)
<< "\nhost API default output: " << (idx == host_api->defaultOutputDevice)
<< "\ndefault low input latency: " << (*sd[dir].idev)->defaultLowInputLatency
<< "\ndefault high input latency: " << (*sd[dir].idev)->defaultHighInputLatency
<< "\ndefault low output latency: " << (*sd[dir].idev)->defaultLowOutputLatency
<< "\ndefault high output latency: " << (*sd[dir].idev)->defaultHighOutputLatency
<< "\n";
}
LOG_VERBOSE("using %s (%d ch) device \"%s\":\n%s", dir_str[dir], sd[dir].params.channelCount,
sd[dir].device.c_str(), device_text[dir].str().c_str());
sd[dir].dev_sample_rate = find_srate(dir);
if (sd[dir].dev_sample_rate != req_sample_rate)
LOG_DEBUG("%s: resampling %f <=> %f", dir_str[dir],
sd[dir].dev_sample_rate, req_sample_rate);
if (progdefaults.PortFramesPerBuffer > 0) {
sd[dir].frames_per_buffer = progdefaults.PortFramesPerBuffer;
LOG_DEBUG("%s: frames_per_buffer=%u", dir_str[dir], sd[dir].frames_per_buffer);
}
}
void SoundPort::start_stream(unsigned dir)
{
int err;
PaStreamParameters* sp[2];
sp[dir] = &sd[dir].params;
sp[!dir] = NULL;
LOG_INFO("\n\
open pa stream for %s:\n\
samplerate : %.0f\n\
device number : %d\n\
# channels : %d\n\
latency : %f\n\
sample Format : paFloat32",
(dir == 1 ? "write" : "read"),
sd[dir].dev_sample_rate,
sp[dir]->device,
sp[dir]->channelCount,
sp[dir]->suggestedLatency);
err = Pa_OpenStream(&sd[dir].stream, sp[0], sp[1],
sd[dir].dev_sample_rate, sd[dir].frames_per_buffer,
paNoFlag,
stream_process, &sd[dir]);
if (err != paNoError) {
throw SndPortException(err);
}
if ((err = Pa_SetStreamFinishedCallback(sd[dir].stream, stream_stopped)) != paNoError)
throw SndPortException(err);
if ((err = Pa_StartStream(sd[dir].stream)) != paNoError) {
pa_perror(err, "Portaudio stream start stream error");
Close();
throw SndPortException(err);
}
}
int SoundPort::stream_process(
const void* in, void* out, unsigned long nframes,
const PaStreamCallbackTimeInfo *time_info,
PaStreamCallbackFlags flags, void* data)
{
struct stream_data* sd = reinterpret_cast<struct stream_data*>(data);
#ifndef NDEBUG
struct {
PaStreamCallbackFlags f;
const char* s;
} fa[] = { { paInputUnderflow, "Input underflow" },
{ paInputOverflow, "Input overflow" },
{ paOutputUnderflow, "Output underflow" },
{ paOutputOverflow, "Output overflow" }
};
for (size_t i = 0; i < sizeof(fa)/sizeof(*fa); i++)
if (flags & fa[i].f)
LOG_DEBUG("%s", fa[i].s);
#endif
if (unlikely(sd->state == spa_abort || sd->state == spa_complete)) // finished
return sd->state;
if (in) {
switch (sd->state) {
case spa_continue: // write into the rb, post rwsem if we wrote anything
if (sd->rb->write(reinterpret_cast<const float*>(in), sd->params.channelCount * nframes))
sem_post(sd->rwsem);
break;
case spa_drain: case spa_pause: // signal the cv
pthread_mutex_lock(sd->cmutex);
pthread_cond_signal(sd->ccond);
pthread_mutex_unlock(sd->cmutex);
}
}
else if (out) {
float* outf = reinterpret_cast<float*>(out);
// if we are paused just pretend that the rb was empty
size_t nread = (sd->state == spa_pause) ? 0 : sd->rb->read(outf, sd->params.channelCount * nframes);
memset(outf + nread, 0, (sd->params.channelCount * nframes - nread) * sizeof(float)); // fill rest with 0
switch (sd->state) {
case spa_continue: // post rwsem if we read anything
if (nread > 0)
sem_post(sd->rwsem);
break;
case spa_drain: // signal the cv when we have emptied the buffer
if (nread > 0)
break;
// else fall through
case spa_pause:
pthread_mutex_lock(sd->cmutex);
pthread_cond_signal(sd->ccond);
pthread_mutex_unlock(sd->cmutex);
break;
}
}
return paContinue;
}
void SoundPort::stream_stopped(void* data)
{
struct stream_data* sd = reinterpret_cast<struct stream_data*>(data);
if (sd->rb)
sd->rb->reset();
pthread_mutex_lock(sd->cmutex);
pthread_cond_signal(sd->ccond);
pthread_mutex_unlock(sd->cmutex);
}
bool SoundPort::stream_active(unsigned dir)
{
if (!sd[dir].stream)
return false;
int err;
if ((err = Pa_IsStreamActive(sd[dir].stream)) < 0) {
pa_perror(err, "Portaudio stream active error");
throw SndPortException(err);
}
return err == 1;
}
bool SoundPort::full_duplex_device(const PaDeviceInfo* dev)
{
return dev->maxInputChannels > 0 && dev->maxOutputChannels > 0;
}
bool SoundPort::must_close(int dir)
{
return Pa_GetHostApiInfo((*sd[dir].idev)->hostApi)->type != paJACK;
}
double SoundPort::find_srate(unsigned dir)
{
int sr = (dir == 0 ? progdefaults.in_sample_rate : progdefaults.out_sample_rate);
switch (sr) {
case SAMPLE_RATE_UNSET: case SAMPLE_RATE_AUTO:
break;
case SAMPLE_RATE_NATIVE:
return (*sd[dir].idev)->defaultSampleRate;
default:
return sr;
}
const std::vector<double>& rates = supported_rates[dir][(*sd[dir].idev)->name];
for (std::vector<double>::const_iterator i = rates.begin(); i != rates.end(); i++)
if (req_sample_rate == *i || (*sd[dir].idev)->defaultSampleRate == *i)
return *i;
pa_perror(0, "Portaudio - no supported sample rate found");
throw SndException("No supported sample rate found");
}
void SoundPort::probe_supported_rates(const device_iterator& idev)
{
PaStreamParameters params[2];
params[0].device = params[1].device = idev - devs.begin();
params[0].channelCount = 2;
params[1].channelCount = 2;
params[0].sampleFormat = params[1].sampleFormat = paFloat32;
params[0].suggestedLatency = (*idev)->defaultHighInputLatency;
params[1].suggestedLatency = (*idev)->defaultHighOutputLatency;
params[0].hostApiSpecificStreamInfo = params[1].hostApiSpecificStreamInfo = NULL;
supported_rates[0][(*idev)->name].clear();
supported_rates[1][(*idev)->name].clear();
supported_rates[0][(*idev)->name].push_back((*idev)->defaultSampleRate);
supported_rates[1][(*idev)->name].push_back((*idev)->defaultSampleRate);
extern double std_sample_rates[];
for (const double* r = std_sample_rates; *r > 0.0; r++) {
if (Pa_IsFormatSupported(¶ms[0], NULL, *r) == paFormatIsSupported)
supported_rates[0][(*idev)->name].push_back(*r);
if (Pa_IsFormatSupported(NULL, ¶ms[1], *r) == paFormatIsSupported)
supported_rates[1][(*idev)->name].push_back(*r);
}
}
void SoundPort::pa_perror(int err, const char* str)
{
if (str)
LOG_ERROR("%s: %s", str, Pa_GetErrorText(err));
if (err == paUnanticipatedHostError) {
const PaHostErrorInfo* hosterr = Pa_GetLastHostErrorInfo();
PaHostApiIndex i = Pa_HostApiTypeIdToHostApiIndex(hosterr->hostApiType);
if (i < 0) { // PA failed without setting its "last host error" info. Sigh...
LOG_ERROR("Host API error info not available");
if ( ((sd[0].stream && Pa_GetHostApiInfo((*sd[0].idev)->hostApi)->type == paOSS) ||
(sd[1].stream && Pa_GetHostApiInfo((*sd[1].idev)->hostApi)->type == paOSS)) &&
errno )
LOG_ERROR("Possible OSS error %d: %s", errno, strerror(errno));
}
else
LOG_ERROR("%s error %ld: %s", Pa_GetHostApiInfo(i)->name,
hosterr->errorCode, hosterr->errorText);
}
}
void SoundPort::init_hostapi_ext(void)
{
#if HAVE_DLOPEN && !defined(__WOE32__)
void* handle = dlopen(NULL, RTLD_LAZY);
if (!handle)
return;
PaError (*set_jack_client_name)(const char*);
const char* err = dlerror();
set_jack_client_name = (PaError (*)(const char*))dlsym(handle, "PaJack_SetClientName");
if (!(err = dlerror()))
set_jack_client_name(main_window_title.c_str());
# ifndef NDEBUG
else
LOG_VERBOSE("dlsym(PaJack_SetClientName) error: %s", err);
# endif
#endif
}
#endif // USE_PORTAUDIO
#if USE_PULSEAUDIO
SoundPulse::SoundPulse(const char *dev)
{
sd[0].stream = 0;
sd[0].stream_params.channels = 2;
sd[0].dir = PA_STREAM_RECORD;
sd[0].stream_params.format = PA_SAMPLE_FLOAT32LE;
sd[0].buffer_attrs.maxlength = (uint32_t)-1;
sd[0].buffer_attrs.minreq = (uint32_t)-1;
sd[0].buffer_attrs.prebuf = (uint32_t)-1;
sd[0].buffer_attrs.fragsize = SCBLOCKSIZE * sizeof(float);
sd[0].buffer_attrs.tlength = (uint32_t)-1;
sd[1].stream = 0;
sd[1].dir = PA_STREAM_PLAYBACK;
sd[1].stream_params.format = PA_SAMPLE_FLOAT32LE;
sd[1].stream_params.channels = 2;
sd[1].buffer_attrs.maxlength = (uint32_t)-1;
sd[1].buffer_attrs.minreq = (uint32_t)-1;
sd[1].buffer_attrs.prebuf = (uint32_t)-1;
sd[1].buffer_attrs.fragsize = (uint32_t)-1;
sd[1].buffer_attrs.tlength = SCBLOCKSIZE * sizeof(float);
tx_src_data = new SRC_DATA;
snd_buffer = new float[sd[0].stream_params.channels * SND_BUF_LEN];
rbuf = new float[sd[0].stream_params.channels * SND_BUF_LEN];
src_buffer = new float[sd[1].stream_params.channels * SND_BUF_LEN];
fbuf = new float[sd[1].stream_params.channels * SND_BUF_LEN];
memset(snd_buffer, 0, sd[0].stream_params.channels * SND_BUF_LEN * sizeof(*snd_buffer));
memset(rbuf, 0, sd[0].stream_params.channels * SND_BUF_LEN * sizeof(*rbuf));
memset(src_buffer, 0, sd[1].stream_params.channels * SND_BUF_LEN * sizeof(*src_buffer));
memset(fbuf, 0, sd[1].stream_params.channels * SND_BUF_LEN * sizeof(*fbuf));
}
SoundPulse::~SoundPulse()
{
Close();
delete tx_src_data;
if (rx_src_state)
src_delete(rx_src_state);
if (tx_src_state)
src_delete(tx_src_state);
delete [] snd_buffer;
delete [] src_buffer;
delete [] fbuf;
delete [] rbuf;
}
int SoundPulse::Open(int dir, int freq)
{
const char* server = (progdefaults.PulseServer.length() ?
progdefaults.PulseServer.c_str() : NULL);
char sname[32];
int err;
sample_frequency = freq;
src_data_reset(1 << O_RDONLY | 1 << O_WRONLY);
if ((unsigned)freq != sd[dir].stream_params.rate)
Close(dir);
sd[dir].stream_params.rate = freq;
snprintf(sname, sizeof(sname), "%s (%u)", (dir ? "playback" : "capture"), getpid());
setenv("PULSE_PROP_application.icon_name", PACKAGE_TARNAME, 1);
sd[dir].stream = pa_simple_new(
server, // server address
main_window_title.c_str(), // application name
sd[dir].dir, // playback / record
NULL, // device (default)
sname, // system description
&sd[dir].stream_params, // sample format
NULL, // channel map (default)
&sd[dir].buffer_attrs, // buffering attributes
&err); // return address for error code
if (!sd[dir].stream)
throw SndPulseException(err);
return 0;
}
void SoundPulse::Close(unsigned dir)
{
if (dir == 1 || dir == UINT_MAX)
flush(1);
Abort(dir);
}
void SoundPulse::Abort(unsigned dir)
{
unsigned start, end;
if (dir == UINT_MAX) {
start = 0;
end = 1;
}
else
start = end = dir;
for (unsigned i = start; i <= end; i++) {
if (sd[i].stream) {
pa_simple_free(sd[i].stream);
sd[i].stream = 0;
}
}
}
void SoundPulse::flush(unsigned dir)
{
int err = PA_OK;
if ((dir == 1 || dir == UINT_MAX) && sd[1].stream) {
// wait for audio to finish playing
MilliSleep(SCBLOCKSIZE * 1000 / sd[1].stream_params.rate);
pa_simple_flush(sd[1].stream, &err);
}
if ((dir == 0 || dir == UINT_MAX) && sd[0].stream) {
// We need to flush the captured audio that PA has been
// buffering for us while we were transmitting. We will use
// pa_simple_get_latency() which, contrary to the docs, also
// works for capture streams. It tells us how much earlier the
// data that would be returned by pa_simple_read() was actually
// captured, and we read and discard all that data.
pa_usec_t t = pa_simple_get_latency(sd[0].stream, &err);
if (t && err == PA_OK) {
size_t bytes = pa_usec_to_bytes(t, &sd[0].stream_params);
while (bytes > SND_BUF_LEN) {
pa_simple_read(sd[0].stream, snd_buffer, SND_BUF_LEN, &err);
if (err != PA_OK)
break;
bytes -= SND_BUF_LEN;
}
if (bytes)
pa_simple_read(sd[0].stream, snd_buffer, bytes, &err);
}
}
}
size_t SoundPulse::Write(double* buf, size_t count)
{
if (ofGenerate)
write_file(ofGenerate, buf, NULL, count);
if (PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST) {
return count;
}
// copy input to both channels
for (size_t i = 0; i < count; i++)
if (progdefaults.sig_on_right_channel)
fbuf[sd[1].stream_params.channels * i] = fbuf[sd[1].stream_params.channels * i + 1] = buf[i];
else if (progdefaults.ReverseAudio) {
fbuf[sd[1].stream_params.channels * i + 1] = buf[i];
fbuf[sd[1].stream_params.channels * i] = 0;
} else {
fbuf[sd[1].stream_params.channels * i] = buf[i];
fbuf[sd[1].stream_params.channels * i + 1] = 0;
}
return resample_write(fbuf, count);
}
size_t SoundPulse::Write_stereo(double* bufleft, double* bufright, size_t count)
{
if (sd[1].stream_params.channels != 2)
return Write(bufleft, count);
if (ofGenerate)
write_file(ofGenerate, bufleft, bufright, count);
if (PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST) {
return count;
}
for (size_t i = 0; i < count; i++) {
if (progdefaults.ReverseAudio) {
fbuf[sd[1].stream_params.channels * i + 1] = bufleft[i];
fbuf[sd[1].stream_params.channels * i] = bufright[i];
} else {
fbuf[sd[1].stream_params.channels * i] = bufleft[i];
fbuf[sd[1].stream_params.channels * i + 1] = bufright[i];
}
}
return resample_write(fbuf, count);
}
size_t SoundPulse::resample_write(float* buf, size_t count)
{
int err;
float *wbuf = buf;
if (progdefaults.TX_corr != 0) {
if (txppm != progdefaults.TX_corr) {
txppm = progdefaults.TX_corr;
tx_src_data->src_ratio = 1.0 + txppm / 1e6;
src_set_ratio(tx_src_state, tx_src_data->src_ratio);
}
tx_src_data->data_in = wbuf;
tx_src_data->input_frames = count;
tx_src_data->data_out = src_buffer;
tx_src_data->output_frames = SND_BUF_LEN;
tx_src_data->end_of_input = 0;
if ((err = src_process(tx_src_state, tx_src_data)) != 0)
throw SndException(src_strerror(err));
if (tx_src_data->output_frames_gen == 0) // input was too small
return count;
wbuf = tx_src_data->data_out;
count = tx_src_data->output_frames_gen;
}
if (!active_modem) return count;
if (pa_simple_write(sd[1].stream, wbuf, count * sd[1].stream_params.channels * sizeof(float), &err) == -1)
throw SndPulseException(err);
return count;
}
long SoundPulse::src_read_cb(void* arg, float** data)
{
SoundPulse* p = reinterpret_cast<SoundPulse*>(arg);
int err;
int nread = 0;
if ((nread = pa_simple_read(p->sd[0].stream, p->snd_buffer,
p->sd[0].stream_params.channels * sizeof(float) * p->sd[0].blocksize, &err)) == -1) {
LOG_ERROR("%s", pa_strerror(err));
*data = 0;
return 0;
}
*data = p->snd_buffer;
return p->sd[0].blocksize;
}
size_t SoundPulse::Read(float *buf, size_t count)
{
if (ifPlayback) {
read_file(ifPlayback, buf, count);
if (!ofCapture) {
flush(0);
if (!bHighSpeed)
MilliSleep((long)ceil((1e3 * count) / sample_frequency));
return count;
}
}
size_t n = 0;
long r = 0;
if (progdefaults.RX_corr != 0) {
if (rxppm != progdefaults.RX_corr) {
rxppm = progdefaults.RX_corr;
sd[0].src_ratio = 1.0 / (1.0 + rxppm / 1e6);
src_set_ratio(rx_src_state, sd[0].src_ratio);
}
sd[0].blocksize = SCBLOCKSIZE;
while (n < count) {
if ((r = src_callback_read(rx_src_state, sd[0].src_ratio, count - n, rbuf + n)) == 0)
break;
n += r;
}
}
else {
int err;
if ((r = pa_simple_read(sd[0].stream, rbuf,
sd[0].stream_params.channels * sizeof(float) * count, &err)) == -1)
throw SndPulseException(err);
}
// transfer active input channel; left == 0, right == 1
size_t i = 0;
if (sd[0].stream_params.channels == 2) n = progdefaults.ReverseRxAudio;
else n = 0;
while (i < count) {
buf[i] = rbuf[n];
i++;
n += sd[0].stream_params.channels;
}
if (ofCapture)
write_file(ofCapture, buf, NULL, count);
return count;
}
void SoundPulse::src_data_reset(int mode)
{
int err;
if (mode & 1 << O_RDONLY) {
if (rx_src_state)
src_delete(rx_src_state);
rx_src_state = src_callback_new(src_read_cb, progdefaults.sample_converter,
sd[0].stream_params.channels, &err, this);
if (!rx_src_state)
throw SndException(src_strerror(err));
sd[0].src_ratio = 1.0 / (1.0 + rxppm / 1e6);
}
if (mode & 1 << O_WRONLY) {
if (tx_src_state)
src_delete(tx_src_state);
tx_src_state = src_new(progdefaults.sample_converter, sd[1].stream_params.channels, &err);
if (!tx_src_state)
throw SndException(src_strerror(err));
tx_src_data->src_ratio = 1.0 + txppm / 1e6;
}
}
#endif // USE_PULSEAUDIO
size_t SoundNull::Write(double* buf, size_t count)
{
if (ofGenerate)
write_file(ofGenerate, buf, NULL, count);
if (PERFORM_CPS_TEST || active_modem->XMLRPC_CPS_TEST) {
return count;
}
MilliSleep((long)ceil((1e3 * count) / sample_frequency));
return count;
}
size_t SoundNull::Write_stereo(double* bufleft, double* bufright, size_t count)
{
if (ofGenerate)
write_file(ofGenerate, bufleft, bufright, count);
MilliSleep((long)ceil((1e3 * count) / sample_frequency));
return count ? count : 1;
}
size_t SoundNull::Read(float *buf, size_t count)
{
if (ifPlayback)
read_file(ifPlayback, buf, count);
else
memset(buf, 0, count * sizeof(*buf));
if (ofCapture)
write_file(ofCapture, buf, NULL, count);
if (!bHighSpeed)
MilliSleep((long)ceil((1e3 * count) / sample_frequency));
return count;
}
void SoundNull::flush(unsigned)
{
if (ofGenerate)
sf_close(ofGenerate);
}
| 67,854
|
C++
|
.cxx
| 2,147
| 28.92734
| 110
| 0.661821
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,188
|
checkout.cxx
|
w1hkj_fldigi/src/soundcard/checkout.cxx
|
#define CHECKOUT_SIZE 11424
int int_audio_checkout[CHECKOUT_SIZE] = {
-2,
-1,
5,
-258,
-122,
-154,
-294,
-219,
-271,
-234,
-260,
-243,
-253,
-249,
-246,
-260,
-229,
-289,
-38,
-58,
-263,
-266,
-156,
10,
25,
-134,
-83,
-21,
-317,
-165,
-121,
-112,
-186,
-287,
-219,
-276,
-226,
-270,
-232,
-265,
-235,
-262,
-240,
-256,
-248,
-245,
-263,
-223,
-300,
-78,
-214,
-160,
-132,
-45,
-88,
-125,
53,
-34,
24,
-17,
12,
-8,
4,
0,
-1,
2,
-3,
4,
-5,
6,
-6,
3,
0,
-3,
7,
-12,
20,
-39,
148,
67,
41,
296,
222,
268,
233,
275,
125,
127,
63,
-66,
105,
107,
166,
278,
138,
-72,
139,
89,
13,
285,
215,
43,
-150,
-248,
17,
-11,
32,
301,
21,
85,
131,
-32,
9,
1,
-8,
8,
145,
62,
-65,
99,
120,
5,
-20,
26,
-29,
28,
-24,
18,
-7,
-15,
-163,
-115,
-92,
34,
-9,
-11,
38,
-204,
-21,
-361,
-106,
-444,
27,
-929,
218,
-2795,
-171,
4311,
-4495,
1126,
1644,
-2751,
268,
-2027,
2804,
-872,
-1618,
1728,
-1493,
-1131,
-1936,
3635,
-1361,
-1380,
-419,
-3253,
5219,
-2809,
-2438,
3322,
-2402,
-628,
1133,
-1437,
-69,
550,
-1577,
333,
38,
-1317,
-97,
-136,
-471,
40,
-1008,
545,
-768,
-102,
-1557,
-4310,
5340,
-1340,
-3339,
4159,
-3170,
-175,
2002,
-2386,
705,
730,
-1397,
245,
870,
-751,
-385,
1125,
286,
-2043,
2071,
1885,
-4422,
3781,
39,
-3190,
4409,
-2744,
446,
-338,
166,
1208,
-2306,
1083,
1086,
-1258,
-1102,
3602,
-4251,
2539,
26,
-7065,
8304,
-3004,
-10612,
9143,
-337,
-4857,
5161,
-3724,
573,
2304,
-3527,
3708,
2296,
-3069,
-157,
38,
3539,
-4162,
-986,
1727,
1384,
-1123,
-2017,
2752,
-324,
-5502,
5511,
1650,
-9192,
12584,
-7326,
-1704,
8610,
-4484,
1308,
3413,
-3318,
517,
-1165,
-4356,
14961,
-8006,
-1524,
5083,
-13042,
6390,
1851,
-4203,
-1337,
2287,
-2347,
-42,
658,
-3568,
6823,
-8757,
5522,
4054,
-9501,
5797,
4338,
-9747,
5894,
1517,
-5217,
3455,
-1034,
1688,
-5520,
8061,
-4997,
-608,
3061,
-3766,
6377,
-5458,
-2953,
10207,
-8512,
-1090,
9148,
-10271,
4762,
1225,
-6817,
7993,
-4667,
-1512,
8032,
-9284,
4364,
2400,
-7243,
7624,
-1223,
-6397,
8641,
-3416,
-2869,
5475,
-2791,
1736,
-1656,
-310,
6416,
-10303,
6621,
5633,
-14493,
12723,
72,
-4105,
9333,
-2986,
1115,
5807,
-7445,
5179,
575,
-3710,
6847,
-4550,
834,
2583,
421,
-2705,
1508,
5324,
-8496,
1714,
12352,
-16053,
8000,
1994,
-7300,
8698,
-8687,
8823,
-8239,
4383,
6166,
-12431,
8666,
413,
-7168,
4484,
2886,
-5014,
4604,
-944,
-6595,
9243,
-3550,
-5066,
5411,
1243,
-4750,
4468,
-3286,
-7320,
23124,
-23329,
12227,
17448,
-26505,
25613,
-5843,
-16284,
20760,
-6489,
-11542,
19320,
-12138,
-2358,
15409,
-19964,
8326,
7343,
-15287,
13652,
-5231,
-10805,
16796,
-6821,
-6716,
11103,
-9512,
-1277,
14375,
-14505,
-2913,
10951,
-3825,
-7593,
9879,
-4712,
-6323,
15625,
-16772,
13619,
-300,
-17095,
24445,
-15638,
-7647,
23657,
-17787,
-1049,
17515,
-21120,
8510,
12493,
-23727,
10250,
11994,
-23413,
13750,
7083,
-25561,
22862,
-3109,
-14125,
17173,
-14526,
2791,
13345,
-25442,
14916,
13032,
-30109,
26373,
-2302,
-16135,
24645,
-9372,
-15417,
23603,
-9891,
-16787,
30440,
-22114,
6850,
12562,
-21726,
21696,
-15706,
2367,
10770,
-18794,
18212,
-7891,
-7698,
12892,
-1867,
-5171,
-2535,
5019,
614,
-1997,
-9483,
15201,
-9755,
-4133,
16443,
-18574,
-487,
14889,
-5214,
-14003,
21165,
-3558,
-4722,
-2460,
1769,
6277,
-8853,
-2249,
9280,
-3658,
-11380,
19151,
-11722,
-9877,
17417,
-9048,
-9552,
17915,
-14217,
5404,
-851,
-1708,
7284,
-12601,
15204,
-8937,
-4020,
13842,
-9728,
-78,
5431,
-2160,
875,
-11308,
15825,
-10478,
-4045,
18381,
-23590,
13504,
1679,
-9297,
6572,
-7826,
13424,
-11626,
-1277,
16798,
-16810,
7508,
4845,
-6909,
3382,
-1861,
5577,
-8974,
4699,
7676,
-18217,
8958,
8501,
-13427,
3925,
3524,
-4463,
3647,
-2698,
973,
-402,
4528,
-4337,
-431,
5666,
-8707,
11928,
-11587,
2673,
7653,
-12050,
9801,
-6826,
5732,
-2133,
-3331,
6723,
-4119,
6266,
-3201,
-4417,
4198,
3350,
-2585,
-4151,
-2024,
16363,
-13523,
-1819,
9386,
-8661,
13445,
-14085,
6890,
1945,
-1697,
4312,
-11511,
8810,
2887,
-6693,
3130,
526,
-1629,
2970,
-3845,
2484,
-1876,
117,
2670,
-86,
-4296,
5275,
1529,
-7176,
3707,
833,
-821,
-2335,
-23,
3758,
-1520,
-96,
-666,
3610,
716,
-3503,
1996,
-3581,
1926,
600,
-598,
-4676,
9089,
-5003,
-3338,
4575,
-869,
4416,
-7755,
7447,
923,
-2498,
-1415,
3031,
4699,
-6142,
6268,
-2652,
-1419,
10250,
-8534,
3624,
-3630,
6665,
1620,
-10597,
8663,
-85,
4577,
-7970,
1860,
7912,
-6832,
1087,
672,
-1016,
2775,
-4908,
4443,
-5385,
7101,
-1455,
-8809,
14376,
-7259,
4170,
-3232,
-40,
1691,
3069,
5512,
-15918,
7173,
12540,
-6108,
-13814,
8278,
12616,
-14639,
3809,
4063,
-6496,
2129,
5156,
-5296,
-10679,
12796,
3844,
-19565,
5700,
18274,
-13348,
-8499,
9664,
8431,
-12771,
1510,
6040,
-13188,
13201,
1355,
-15269,
1201,
16068,
-955,
-21979,
11289,
15784,
-13974,
-1941,
5764,
-2135,
-1440,
1088,
-1363,
-2988,
7869,
2095,
-13552,
4789,
12430,
-8504,
-6164,
4336,
2423,
86,
-1537,
-4564,
51,
7723,
-2378,
-7168,
2845,
4084,
1016,
-7123,
4670,
4517,
-4293,
-23,
-1261,
6322,
-2195,
-1265,
246,
-2737,
7404,
-473,
-6627,
7623,
3153,
-4988,
1147,
-1097,
4386,
-2425,
-1603,
3742,
-5772,
8715,
-4476,
-10095,
13211,
-2929,
-4968,
-467,
2636,
3469,
-8666,
2643,
5164,
-6529,
381,
7649,
-5958,
-3209,
7426,
1722,
-2763,
-4122,
7175,
915,
-12840,
8097,
4723,
-8362,
368,
2851,
4408,
-3947,
1031,
5252,
-4494,
2729,
1915,
-3636,
1223,
1298,
638,
-2294,
-2349,
4879,
-2214,
-3115,
6033,
1649,
-3475,
3691,
3920,
-4183,
5013,
6651,
-1358,
-491,
5929,
4324,
-2416,
-640,
4125,
232,
-3997,
1982,
-929,
-2966,
1273,
409,
-3783,
295,
3350,
-137,
-489,
851,
4182,
203,
-1898,
2374,
2146,
1326,
1897,
1182,
3174,
1683,
1027,
629,
-1130,
3525,
-175,
-3333,
259,
-528,
-590,
-966,
-3899,
-1405,
205,
-2994,
-3742,
-2429,
-1469,
-3880,
-5717,
-3834,
-2679,
-4964,
-6916,
-5979,
-4062,
-4230,
-6618,
-6869,
-3430,
-2010,
-5250,
-4999,
-1990,
-447,
-1940,
-1939,
32,
-965,
-1082,
-2508,
-2289,
-1740,
-2669,
-5288,
-4041,
-1694,
-3885,
-3156,
-2209,
-529,
-254,
736,
1856,
3882,
3775,
4660,
6175,
5318,
7206,
7742,
7525,
7914,
9728,
9845,
10547,
12391,
14410,
11765,
13669,
22130,
24146,
23609,
24040,
591,
-2954,
29164,
7143,
-31925,
-13262,
3877,
-16063,
-31682,
-25506,
-7934,
-18260,
-25903,
-12233,
-7513,
896,
3395,
-1773,
4260,
15104,
15915,
4791,
-749,
9848,
6441,
-10303,
-13311,
-10291,
-12940,
-19941,
-26613,
-22012,
-16198,
-19514,
-21870,
-17629,
-7499,
-4386,
-10288,
-6762,
1530,
2487,
-2427,
-5423,
-1916,
-1314,
-7969,
-12069,
-10367,
-9915,
-11571,
-13621,
-12632,
-9973,
-7865,
-6674,
-5255,
-2049,
1300,
2514,
1125,
3374,
5554,
5896,
4458,
3035,
4578,
3338,
2775,
1921,
1083,
3381,
4909,
4355,
7651,
7962,
11537,
11780,
11473,
12866,
18510,
20337,
17759,
18547,
25035,
28574,
27427,
13741,
-32000,
9886,
29840,
-28056,
-30969,
38,
2414,
-25315,
-31906,
-4779,
9171,
-14170,
-2558,
5461,
9632,
22947,
14452,
4129,
6642,
17383,
14208,
-12687,
-17740,
-112,
-9447,
-23855,
-27194,
-17103,
-10521,
-16445,
-16695,
-7909,
548,
6528,
3129,
1607,
10203,
12650,
4854,
-1298,
-348,
-473,
-8526,
-14747,
-14179,
-15487,
-15991,
-16439,
-17793,
-13584,
-7416,
-5733,
-5278,
-1072,
3920,
3791,
2786,
3838,
2372,
-718,
-2503,
-5609,
-7034,
-6637,
-8437,
-8439,
-5367,
-2791,
-1343,
-159,
4803,
9471,
6876,
8667,
14314,
12871,
8965,
9786,
12813,
7299,
1290,
6162,
9293,
847,
1510,
9563,
7530,
3791,
6738,
9424,
10349,
12938,
17532,
20949,
17277,
20068,
1787,
-12369,
12917,
6541,
-24211,
-20262,
-4090,
-5653,
-17621,
-16025,
-228,
2809,
3008,
8003,
6653,
9965,
15703,
10062,
516,
-778,
3472,
-1810,
-14147,
-16334,
-11082,
-10397,
-12995,
-12531,
-6780,
-1114,
1336,
3754,
3867,
6041,
8823,
5257,
-1341,
-2133,
-1697,
-7351,
-10648,
-9851,
-10534,
-12377,
-10430,
-8694,
-8150,
-4660,
-907,
460,
-411,
1187,
3220,
1058,
-2839,
-1997,
-1710,
-5703,
-7734,
-8051,
-7759,
-7914,
-5745,
-5421,
-4508,
248,
5270,
6462,
6541,
9288,
10799,
11367,
9308,
8353,
8940,
6607,
4166,
3800,
2022,
1188,
916,
1557,
5236,
6300,
5586,
7347,
9268,
11416,
9625,
7821,
10164,
12903,
14884,
16150,
14689,
15947,
9157,
-14005,
-8892,
7894,
-4847,
-24261,
-16919,
606,
-2034,
-7098,
-1183,
6271,
10173,
14868,
10825,
3343,
6153,
8549,
59,
-11826,
-10981,
-6681,
-9892,
-14083,
-12667,
-7056,
-924,
2382,
686,
3357,
8083,
8616,
4379,
-868,
-1429,
-1336,
-5116,
-9538,
-10621,
-10001,
-7698,
-4743,
-4728,
-4563,
368,
3490,
764,
-2167,
-1167,
-1960,
-4154,
-5983,
-7634,
-7260,
-7020,
-6785,
-6559,
-2643,
-1471,
-991,
502,
-321,
-327,
1277,
157,
-1045,
2206,
3816,
1815,
1642,
6110,
7398,
6903,
7567,
8157,
6691,
9899,
7739,
2380,
3622,
8107,
6045,
113,
5500,
7903,
2977,
4004,
8371,
7821,
9109,
11999,
14080,
22062,
25951,
22051,
6333,
-25751,
-4480,
15168,
-19132,
-31681,
-12603,
3768,
-3453,
-170,
6125,
9043,
21013,
24151,
8574,
-4349,
3536,
4249,
-13147,
-22770,
-17129,
-10862,
-8204,
-6155,
-5205,
589,
13178,
12670,
4451,
6119,
7977,
948,
-8168,
-10448,
-11895,
-13055,
-11225,
-9553,
-6255,
-2756,
1079,
2216,
6215,
9003,
5367,
-2083,
-6121,
-5025,
-9669,
-15841,
-16575,
-12393,
-7456,
-4040,
-3573,
-558,
4494,
5363,
1908,
-1392,
-3058,
-3382,
-7066,
-9255,
-7269,
-2356,
405,
1104,
4524,
6989,
7650,
8423,
7451,
2766,
1029,
3024,
3464,
3406,
3891,
-208,
2372,
6811,
7936,
2695,
10227,
15055,
7176,
7875,
15221,
16637,
8822,
15033,
27260,
24658,
11864,
-24929,
-28161,
26071,
620,
-32000,
-13507,
9028,
10855,
9917,
12368,
-1013,
11242,
29358,
5626,
-24767,
-14217,
-640,
-9068,
-19735,
-14633,
-5776,
6958,
15458,
4558,
-3187,
9689,
15828,
-2519,
-20986,
-19852,
-7946,
-4704,
-9832,
-14258,
-6933,
9375,
15338,
3835,
-1875,
5741,
9003,
-3099,
-16692,
-20752,
-10248,
-2340,
-8591,
-14008,
-6823,
6402,
7255,
-673,
-7333,
-4816,
167,
-5731,
-15051,
-12630,
-5346,
-2280,
-4333,
-6550,
-3604,
5571,
7867,
-2125,
-7042,
330,
4351,
-2362,
-7992,
-4592,
-502,
1658,
2902,
2506,
7952,
15164,
15363,
7663,
10059,
13147,
10673,
3518,
1537,
3454,
5919,
4708,
9740,
16157,
15308,
23625,
29031,
31581,
17213,
-28237,
-25068,
26960,
-6475,
-32000,
-20223,
3365,
13161,
17238,
17653,
-4131,
18449,
30978,
5720,
-26340,
-19919,
-5353,
-14461,
-20583,
-19546,
-8716,
11575,
22817,
8875,
-521,
12142,
18127,
-7583,
-21699,
-21465,
-17613,
-9081,
-8205,
-11171,
-6967,
11295,
16108,
5115,
-250,
3669,
3370,
-7834,
-16987,
-19292,
-14914,
-5265,
-516,
-5079,
-3455,
5543,
6061,
-964,
-5435,
-7015,
-8261,
-9371,
-12098,
-11395,
-6934,
-1848,
289,
-2056,
774,
4856,
3031,
-732,
-3438,
-4580,
-2732,
-1025,
-3504,
-5041,
-3119,
2689,
2862,
3425,
8470,
13110,
14006,
9881,
9574,
7955,
13643,
12792,
6319,
4226,
10421,
16658,
9223,
11566,
21711,
21996,
26038,
31998,
8916,
-29107,
-22860,
15186,
-6862,
-31997,
-18771,
2735,
12487,
14918,
14996,
-669,
13110,
25573,
6872,
-21236,
-20925,
-8381,
-11925,
-16310,
-16250,
-9756,
5786,
15533,
8323,
-2068,
1609,
6360,
-6506,
-10812,
-17116,
-18389,
-9779,
-4188,
-8278,
-10006,
1110,
4983,
954,
-2738,
-1008,
-2611,
-6630,
-11080,
-14098,
-11639,
-4848,
-942,
-5244,
-5911,
860,
2083,
-2544,
-5962,
-7064,
-7032,
-6192,
-5189,
-7746,
-7872,
-3139,
-1312,
-2733,
-2740,
1269,
1343,
-625,
-2564,
-3107,
193,
968,
-757,
-1165,
461,
1353,
2349,
5341,
4798,
4961,
11195,
9126,
9348,
16221,
16306,
10018,
15442,
16009,
12778,
21943,
19711,
12277,
17011,
26395,
21983,
12084,
3192,
-13800,
-20401,
-1028,
-1699,
-19948,
-16389,
4106,
10697,
3515,
5741,
7817,
8657,
9176,
4185,
-8412,
-13464,
-7458,
-7023,
-14532,
-15380,
-4900,
1101,
-2455,
-1978,
-4779,
-3723,
3475,
-1408,
-10202,
-11436,
-5727,
-6054,
-10091,
-10810,
-9133,
-7094,
-3853,
-5117,
-9349,
-8200,
-4482,
-6166,
-10251,
-7225,
-2824,
-3779,
-6768,
-5279,
-5292,
-5034,
-3404,
-6023,
-8248,
-6072,
-2935,
-3390,
-4139,
-1575,
328,
-531,
-464,
64,
-1885,
-2860,
-827,
-1045,
-1843,
-458,
1888,
4041,
3694,
3937,
4799,
6444,
7197,
5884,
7291,
9666,
11277,
7283,
6889,
11737,
11673,
11570,
11066,
12410,
18667,
20346,
22833,
23363,
19524,
17889,
15142,
10486,
-249,
-5754,
-7098,
-9523,
-10710,
-8804,
-7082,
-6437,
-787,
3490,
2974,
2618,
4736,
4602,
771,
-1717,
-3274,
-6988,
-8081,
-7451,
-9526,
-10724,
-10398,
-9670,
-7492,
-6363,
-6293,
-7184,
-5254,
-3411,
-5135,
-8354,
-7483,
-4768,
-7308,
-10522,
-10021,
-8560,
-10230,
-12056,
-10507,
-6689,
-5895,
-6076,
-4740,
-2488,
-2782,
-3392,
-3153,
-4836,
-5671,
-6134,
-7058,
-8019,
-7563,
-6229,
-3890,
-2871,
-957,
462,
2124,
3493,
1947,
-41,
853,
3708,
2624,
-659,
484,
3922,
4749,
4914,
3857,
6985,
8040,
8409,
8354,
9398,
7964,
9971,
12120,
7907,
5296,
9660,
14207,
5540,
2707,
9214,
16475,
9344,
4652,
10232,
19730,
15421,
7912,
11501,
19898,
17945,
2296,
1750,
7580,
6607,
-7900,
-10464,
-4676,
-3235,
-9285,
-10398,
-5834,
-3759,
-3734,
-4017,
-2243,
-2045,
-24,
-2171,
-4616,
-7028,
-4375,
-5652,
-8827,
-11231,
-8183,
-6181,
-8113,
-8744,
-7611,
-3916,
-4187,
-5373,
-6847,
-5116,
-5715,
-7692,
-9088,
-7573,
-5622,
-6781,
-7721,
-5003,
-2573,
-3276,
-3383,
-1858,
-1112,
-1454,
-779,
-1865,
-2336,
-1482,
117,
-939,
-877,
1916,
3121,
2658,
3545,
4482,
3259,
4944,
4708,
3971,
4817,
4829,
4931,
4601,
4362,
4620,
5696,
5332,
3732,
2940,
3981,
4231,
2567,
1604,
2501,
2317,
645,
784,
2347,
2936,
2258,
1465,
1027,
1354,
1132,
1518,
92,
-812,
1370,
1720,
291,
-541,
938,
1336,
491,
583,
920,
785,
345,
237,
305,
534,
486,
439,
308,
706,
779,
90,
-263,
150,
-849,
-2025,
-2024,
-2388,
-2881,
-3323,
-3224,
-3148,
-2524,
-2949,
-3322,
-2653,
-2182,
-2524,
-3242,
-3395,
-3304,
-3365,
-4213,
-4460,
-4541,
-4280,
-4195,
-3916,
-3948,
-3933,
-3549,
-3895,
-3395,
-3305,
-3731,
-3794,
-3646,
-3647,
-3562,
-3516,
-3345,
-3246,
-2804,
-2458,
-2476,
-2211,
-2427,
-2294,
-2083,
-2207,
-2630,
-2628,
-2114,
-1747,
-1546,
-1555,
-1686,
-1122,
-916,
-1649,
-2032,
-1866,
-1548,
-1447,
-1810,
-1834,
-1233,
-962,
-773,
-737,
-758,
-750,
-621,
-426,
-661,
-563,
-245,
-144,
90,
133,
121,
354,
382,
373,
332,
55,
227,
169,
-46,
68,
256,
416,
232,
-91,
137,
384,
253,
405,
-179,
-53,
286,
222,
64,
-54,
203,
3,
11,
-22,
-314,
-562,
-375,
408,
334,
259,
577,
422,
646,
710,
625,
602,
520,
410,
256,
24,
19,
-169,
-40,
25,
-201,
-534,
-362,
19,
-189,
-434,
-582,
-542,
-631,
-553,
-463,
-125,
-246,
62,
77,
56,
345,
126,
-133,
-73,
445,
293,
-255,
-132,
233,
262,
100,
-257,
-242,
-246,
-307,
-529,
-677,
-796,
-698,
-612,
-704,
-983,
-283,
203,
-97,
143,
250,
487,
507,
326,
145,
109,
125,
-249,
-519,
-15,
-81,
-521,
-57,
267,
289,
503,
513,
177,
96,
485,
153,
100,
135,
-298,
-175,
112,
257,
65,
251,
238,
504,
385,
230,
514,
485,
514,
483,
521,
464,
634,
614,
646,
485,
508,
490,
515,
447,
216,
453,
517,
484,
518,
468,
698,
963,
603,
457,
609,
626,
446,
544,
443,
352,
490,
532,
386,
382,
541,
473,
521,
477,
530,
436,
348,
515,
514,
376,
398,
546,
468,
333,
561,
822,
656,
502,
657,
540,
467,
330,
114,
-7,
5,
-96,
-336,
-50,
276,
462,
511,
497,
497,
506,
491,
509,
490,
288,
225,
275,
221,
282,
207,
362,
510,
500,
501,
340,
457,
539,
422,
-22,
162,
286,
221,
274,
227,
271,
415,
258,
252,
194,
76,
325,
178,
444,
490,
519,
476,
525,
472,
533,
414,
94,
133,
125,
109,
-69,
179,
38,
66,
298,
414,
242,
266,
212,
416,
465,
334,
515,
324,
395,
389,
553,
461,
531,
469,
536,
424,
247,
235,
-15,
141,
89,
-149,
-89,
34,
-28,
43,
220,
413,
519,
493,
499,
507,
484,
531,
394,
251,
184,
107,
108,
-46,
31,
146,
100,
278,
19,
416,
319,
228,
263,
53,
281,
-62,
-142,
-118,
29,
-33,
157,
270,
245,
243,
268,
215,
319,
381,
275,
374,
412,
287,
91,
120,
1,
-104,
-112,
24,
0,
-14,
34,
-152,
-254,
97,
277,
248,
145,
140,
528,
7,
85,
119,
159,
226,
55,
338,
173,
324,
172,
333,
158,
359,
33,
73,
-156,
-74,
-3,
13,
-11,
5,
0,
0,
-62,
-67,
684,
212,
270,
15,
703,
-739,
686,
-2102,
-910,
-3050,
-7506,
4897,
5405,
-6833,
-2067,
6493,
-2903,
-4200,
4362,
2107,
-3913,
0,
2741,
-949,
-2765,
485,
1378,
-1852,
-1851,
850,
548,
-1098,
-384,
721,
-432,
-28,
72,
1193,
1130,
1007,
1651,
-3007,
-5893,
-3941,
7178,
3484,
3354,
-4968,
-9888,
9678,
-2081,
-19394,
6485,
12436,
-17638,
-165,
16802,
-5873,
-1492,
12820,
-16461,
-13779,
20416,
-28,
-21296,
-243,
5082,
-12290,
-2908,
8267,
-5705,
-7818,
5638,
-3318,
-13840,
3238,
5405,
-3996,
2833,
6230,
2431,
4827,
753,
-4806,
3089,
1686,
-2859,
2454,
333,
-7019,
-425,
-361,
-5635,
1380,
2651,
-2208,
2416,
3788,
24,
750,
2707,
3454,
1101,
1038,
2291,
1095,
-4066,
-1335,
239,
-3798,
-2409,
597,
-725,
-1077,
1806,
1469,
936,
1705,
2910,
1753,
1021,
2050,
1736,
445,
976,
1945,
-1291,
-555,
916,
-1083,
-1373,
-54,
-710,
-2142,
166,
-597,
-887,
93,
-345,
-679,
277,
213,
-179,
-183,
-791,
-741,
-144,
-882,
-1276,
-659,
-979,
-1666,
-824,
-519,
-2271,
339,
-913,
-1797,
1600,
1522,
-55,
3275,
3938,
2041,
4525,
4492,
4689,
5906,
6218,
6680,
8408,
7402,
8857,
11827,
10653,
12336,
13707,
13982,
14611,
15942,
14507,
18433,
19889,
18267,
20781,
19409,
16803,
10771,
14063,
8350,
1331,
-625,
-3067,
-6874,
-12464,
-13414,
-16774,
-14464,
-18063,
-16475,
-13738,
-11133,
-10321,
-7984,
-2570,
-958,
2877,
2251,
4602,
5623,
5750,
2768,
1812,
1208,
-2964,
-7062,
-12116,
-13400,
-15318,
-18981,
-23113,
-21145,
-19071,
-21080,
-20012,
-15914,
-11633,
-11125,
-9475,
-4639,
-1223,
-1650,
-1074,
1901,
2064,
151,
-1519,
-806,
-1267,
-3147,
-3355,
-1890,
-176,
1191,
3412,
6169,
11583,
14859,
17911,
22024,
27207,
29478,
29909,
29603,
29902,
29561,
30083,
27535,
17771,
17203,
6990,
-2528,
-8193,
-14132,
-20756,
-25227,
-26023,
-27291,
-22754,
-22535,
-15937,
-11259,
-3124,
1149,
6726,
12779,
15347,
18532,
17553,
16979,
13500,
10685,
1766,
-1121,
-9646,
-14173,
-18805,
-25118,
-26686,
-25660,
-24122,
-25938,
-18751,
-14347,
-9947,
-8622,
-2083,
-229,
507,
1574,
516,
1,
-2518,
-4868,
-9056,
-9525,
-13631,
-16361,
-17985,
-15946,
-16441,
-15823,
-11707,
-8615,
-5537,
-2687,
399,
2112,
6313,
6176,
6583,
8259,
10399,
9520,
8644,
12648,
13695,
13447,
14139,
20736,
21632,
23889,
28220,
30915,
26468,
23229,
25623,
17884,
8625,
162,
-2936,
-10030,
-16615,
-23431,
-22871,
-20511,
-21017,
-19825,
-13363,
-3940,
-1271,
3803,
8517,
15095,
15271,
14965,
12916,
11230,
7107,
-573,
-7700,
-11525,
-12715,
-22260,
-24339,
-21088,
-21518,
-20209,
-14427,
-11226,
-5747,
800,
2717,
4831,
8432,
8569,
4707,
2441,
893,
-5888,
-12043,
-11855,
-16354,
-21553,
-21526,
-19551,
-19098,
-17577,
-14105,
-10196,
-7199,
-4862,
-3714,
-2135,
182,
-956,
-3157,
-1641,
-1803,
-4571,
-4580,
-770,
231,
2449,
4825,
8856,
16249,
20636,
20913,
25597,
30407,
29100,
30468,
28892,
30849,
26223,
22854,
-419,
-34,
6462,
-22098,
-32000,
-19569,
-16883,
-31829,
-23733,
-11033,
119,
1959,
9484,
15170,
25096,
27952,
15763,
11794,
14174,
9050,
-9422,
-16661,
-18014,
-18683,
-28520,
-29250,
-21388,
-14079,
-12921,
-7811,
952,
9277,
14225,
10750,
13655,
17250,
11364,
352,
-1324,
-5791,
-12668,
-19516,
-23665,
-22270,
-19128,
-19073,
-18620,
-11032,
-4797,
-4356,
-3568,
1489,
1253,
-2190,
-5154,
-7068,
-9791,
-12283,
-15866,
-16167,
-13451,
-11444,
-11300,
-7161,
-529,
3506,
6800,
10878,
15344,
19428,
22210,
18867,
22607,
28471,
24272,
21112,
27689,
28661,
30955,
25409,
15005,
-5574,
-4587,
12072,
-12956,
-32000,
-15066,
-975,
-18887,
-20261,
-3948,
8645,
10666,
9822,
11631,
17999,
23213,
10257,
-2098,
1163,
3577,
-9889,
-19510,
-17400,
-11895,
-12849,
-15123,
-11680,
-1853,
4334,
2863,
1872,
8479,
10159,
4423,
-1333,
-1900,
-2737,
-8837,
-13365,
-13833,
-11201,
-10336,
-8315,
-6354,
-2380,
533,
3082,
1767,
-950,
-911,
-3375,
-10584,
-12955,
-11945,
-16913,
-20101,
-16533,
-13860,
-13988,
-10297,
-6776,
-3125,
88,
3242,
3153,
3884,
6255,
7300,
5471,
4678,
8450,
9808,
9361,
10793,
16470,
20443,
23164,
28020,
30302,
29181,
30605,
22107,
16365,
8203,
-12544,
-12482,
-13117,
-28059,
-27024,
-13961,
-8871,
-6179,
4373,
16752,
21782,
24948,
24708,
16762,
12213,
5752,
-7733,
-18134,
-19790,
-20352,
-23883,
-21617,
-12325,
-5442,
866,
8749,
11484,
13334,
15562,
10889,
-1004,
-3172,
-2133,
-11970,
-21216,
-17797,
-12569,
-12196,
-9624,
-4144,
3362,
9519,
10480,
6721,
5630,
3800,
-2685,
-12876,
-18613,
-20478,
-21785,
-22198,
-19996,
-15649,
-8963,
-3466,
-2171,
-356,
3047,
3962,
734,
-320,
485,
-775,
-3206,
-1727,
-510,
1980,
7727,
9665,
12071,
16964,
18864,
27976,
30108,
29584,
29858,
29680,
28924,
12962,
-272,
-12474,
-18299,
-16923,
-21180,
-25080,
-12867,
2503,
7021,
10789,
19249,
25372,
23667,
16512,
6018,
-3066,
-9874,
-16300,
-24487,
-23907,
-16481,
-9275,
-4776,
2133,
9827,
13878,
14422,
10298,
3536,
-1618,
-6819,
-18884,
-19032,
-13277,
-16158,
-13897,
-3848,
1241,
2853,
7688,
7678,
4845,
4878,
2642,
-3964,
-9046,
-12609,
-16582,
-14143,
-12704,
-17648,
-14349,
-7142,
-6508,
-7295,
-5021,
-5046,
-6499,
-5738,
-7933,
-8682,
-6128,
-4211,
-4048,
-3410,
2105,
3290,
3467,
5599,
6625,
9457,
13723,
15332,
11806,
17253,
24609,
27536,
30014,
29595,
29425,
19748,
7109,
-8600,
-25220,
-13317,
-9962,
-23803,
-17822,
2141,
12326,
11720,
17716,
17975,
16791,
15399,
5330,
-11790,
-18416,
-13964,
-18087,
-20998,
-12723,
-1605,
5105,
10476,
13023,
10389,
8916,
7201,
-2602,
-13330,
-13364,
-16871,
-21388,
-8830,
-1756,
-4969,
-112,
10240,
7591,
2234,
3050,
-1604,
-7907,
-7677,
-7980,
-12037,
-10601,
-7136,
-4830,
-3696,
-3646,
-9155,
-9274,
-8376,
-11154,
-12405,
-11746,
-9796,
-7211,
-3571,
-3316,
-3203,
-1208,
381,
-1798,
-2793,
-207,
1279,
2296,
4467,
6613,
11193,
13641,
19181,
18215,
22845,
29907,
29767,
29463,
30364,
16767,
-4524,
-9799,
-27802,
-22807,
-12625,
-17730,
-13457,
6032,
20365,
17144,
21397,
19605,
12453,
5731,
-1310,
-17993,
-26598,
-20670,
-16985,
-13408,
-3804,
7723,
11857,
16434,
16816,
9122,
36,
-4950,
-12023,
-19287,
-18722,
-20059,
-12423,
-1102,
4885,
5788,
6751,
9569,
4181,
-1146,
-8110,
-11559,
-13846,
-13247,
-10506,
-6758,
-1162,
1396,
3675,
2043,
-2313,
-7684,
-11864,
-16932,
-18410,
-13600,
-11059,
-9333,
-4114,
47,
-665,
-2289,
-3219,
-5249,
-3701,
-2040,
-327,
1441,
5246,
7044,
11732,
13231,
13850,
15379,
19888,
28559,
29642,
30031,
29316,
29585,
11356,
-39,
-21493,
-32000,
-13878,
-6480,
-11244,
-8654,
15750,
20094,
26025,
26170,
10033,
-2158,
-2311,
-7278,
-25184,
-27846,
-21764,
-11997,
729,
12905,
13143,
12340,
16617,
13260,
-245,
-11208,
-19145,
-26055,
-17873,
-19450,
-12699,
4567,
10318,
10071,
8667,
8071,
-2035,
-4700,
-9606,
-18478,
-18810,
-11153,
-6885,
-3830,
3055,
2264,
550,
3533,
-1243,
-12905,
-18458,
-19694,
-18078,
-12672,
-8665,
-9060,
-5596,
-126,
320,
-2299,
-4087,
-6539,
-5437,
-602,
1739,
240,
3455,
7977,
12651,
14275,
14447,
17041,
20313,
26810,
30347,
29260,
30355,
27443,
12497,
-6389,
-29763,
-27310,
-11775,
-3209,
-5356,
2531,
19430,
20699,
30892,
22750,
509,
-13570,
-11816,
-16100,
-24157,
-19881,
-18172,
-4325,
13066,
22168,
16114,
10041,
5954,
-2775,
-8623,
-15080,
-23722,
-24372,
-13019,
-8553,
3462,
13875,
10237,
6687,
4569,
258,
-8586,
-10427,
-15657,
-17868,
-9886,
-2684,
-582,
548,
3508,
1157,
1592,
-456,
-9733,
-19854,
-21571,
-14047,
-9386,
-6864,
-6993,
-7354,
-3656,
1155,
-102,
-5832,
-8052,
-6297,
-1329,
3450,
4983,
3653,
4796,
9545,
15138,
16428,
15978,
17661,
22999,
29721,
29400,
30127,
29392,
21432,
-1967,
-28522,
-29707,
-17752,
-4327,
1199,
7248,
13830,
15979,
29511,
27001,
5211,
-13791,
-20212,
-22359,
-18334,
-11251,
-15941,
-8196,
8897,
21623,
21309,
14737,
2067,
-10704,
-14028,
-14739,
-17057,
-18466,
-15382,
-13506,
4852,
16172,
12806,
6267,
-1189,
-5611,
-7972,
-7151,
-14612,
-17636,
-12099,
-2780,
3248,
5909,
2263,
-5184,
-3520,
-1175,
-7630,
-18044,
-20820,
-17397,
-10411,
-3281,
-4161,
-8929,
-7745,
-1720,
256,
-799,
-4930,
-9182,
-4638,
2584,
5640,
5725,
5765,
8396,
14917,
17638,
18427,
16899,
22046,
29056,
29583,
30044,
29364,
26463,
-3048,
-32000,
-27018,
-18125,
-5738,
10004,
13074,
9502,
9065,
28609,
26402,
7500,
-9699,
-26375,
-30473,
-18666,
-2658,
-7388,
-3752,
5618,
12780,
19883,
20934,
4327,
-16170,
-21719,
-19836,
-14335,
-9380,
-14370,
-10958,
4036,
11910,
15383,
9041,
-4301,
-13354,
-10308,
-10099,
-10860,
-10466,
-11318,
-7053,
498,
4855,
1907,
-2891,
-6002,
-9153,
-10723,
-13099,
-14553,
-14831,
-11602,
-6519,
-5023,
-4212,
-4260,
-4064,
-4662,
-3564,
-3218,
-2756,
-1959,
1588,
4294,
8153,
10194,
12741,
13934,
15726,
20425,
24286,
29018,
30001,
29623,
29804,
28359,
-694,
-31449,
-28487,
-25185,
-4251,
17084,
17355,
9091,
2212,
28556,
23875,
15040,
-2496,
-27472,
-30881,
-23974,
-2850,
-1921,
6192,
5353,
5137,
14535,
21366,
10553,
-10164,
-21799,
-29164,
-21267,
-10707,
-7466,
-2477,
2988,
6126,
10773,
11571,
3610,
-6488,
-11310,
-15766,
-14038,
-9993,
-7877,
-7562,
-4234,
-390,
1438,
3181,
62,
-5618,
-11609,
-13690,
-14489,
-12246,
-9244,
-8673,
-7959,
-6649,
-2393,
-1561,
-836,
-1254,
-2076,
-1549,
1444,
3999,
5693,
10554,
12525,
14864,
19953,
24268,
27996,
29109,
29662,
29970,
29391,
28631,
-6350,
-31997,
-28626,
-25901,
-776,
20530,
24620,
6040,
2846,
22163,
16500,
18737,
4785,
-23141,
-31542,
-25050,
-12207,
-1233,
14226,
10553,
2959,
9593,
18005,
11811,
-59,
-12642,
-29536,
-27761,
-20352,
-12873,
3264,
7076,
5297,
5461,
8688,
4215,
477,
-2034,
-14384,
-18510,
-16233,
-10848,
-8542,
-973,
-1815,
-4828,
-2717,
-942,
208,
-2840,
-6871,
-15194,
-16467,
-12599,
-8189,
-4583,
-2935,
-4757,
-5959,
-1748,
1586,
2941,
3950,
2292,
1891,
5736,
12633,
17867,
21865,
24679,
28305,
29890,
29801,
29516,
30253,
13000,
-24391,
-30327,
-30578,
-21978,
8328,
23893,
19322,
6764,
11649,
15357,
17898,
21072,
1178,
-24649,
-30576,
-28872,
-20234,
-740,
12463,
9401,
7570,
12410,
14793,
12935,
7284,
-8165,
-26266,
-28341,
-29918,
-15838,
-1304,
5768,
5488,
4100,
6158,
2718,
7568,
1913,
-8953,
-18686,
-20992,
-19168,
-11827,
-2425,
-2559,
-4407,
-5303,
-2893,
-309,
2533,
-974,
-9964,
-13913,
-15127,
-11986,
-5397,
-2555,
-4082,
-3505,
-1730,
-398,
4955,
7541,
6648,
8102,
11782,
14063,
21173,
26188,
28828,
29726,
29796,
29748,
28064,
5413,
-28071,
-29842,
-30498,
-18008,
4894,
17033,
15063,
7166,
13851,
16038,
21323,
20416,
4802,
-18117,
-30495,
-29787,
-26597,
-8631,
4826,
6923,
8557,
9841,
12567,
12811,
12833,
1245,
-15587,
-27166,
-30088,
-19819,
-7227,
3429,
5526,
2441,
-805,
2399,
7633,
4789,
-326,
-11478,
-20916,
-20750,
-15892,
-10055,
-7086,
-4750,
-6671,
-4554,
76,
1351,
1949,
-1282,
-6699,
-10548,
-10401,
-10202,
-6781,
-2876,
-2199,
-772,
2531,
6811,
11679,
18984,
22075,
22336,
23328,
25556,
28186,
28912,
30993,
19757,
-875,
-23729,
-31507,
-27517,
-13184,
6071,
8668,
11366,
4396,
7238,
16893,
24050,
24776,
10608,
-7138,
-25830,
-30124,
-24593,
-14198,
-4141,
-1409,
-699,
1913,
7260,
15009,
16988,
14359,
1165,
-11575,
-23411,
-27119,
-16147,
-9169,
-1806,
-1933,
-1946,
-3076,
2625,
8564,
6541,
4585,
-7729,
-14746,
-17521,
-15615,
-12610,
-10407,
-7992,
-10468,
-6574,
-3533,
-682,
2430,
2480,
511,
-2727,
-2806,
-3424,
-798,
2236,
3769,
7615,
10569,
15934,
21826,
28712,
29939,
29687,
29578,
18871,
1104,
-19538,
-29752,
-26572,
-17385,
-10794,
-3945,
-524,
-208,
7643,
18257,
25375,
26750,
21209,
6984,
-8263,
-15627,
-19147,
-19142,
-14973,
-13485,
-12748,
-8873,
-2281,
4677,
12066,
15918,
12869,
6764,
-947,
-6468,
-10297,
-15759,
-12179,
-12178,
-12850,
-9308,
-7768,
-3424,
-1053,
4512,
2186,
338,
-2073,
-7079,
-7236,
-9585,
-9807,
-11899,
-11824,
-10711,
-9992,
-6349,
-5156,
-2500,
-30,
2716,
6697,
9499,
13701,
14908,
15940,
15588,
16597,
20315,
25470,
27134,
20022,
11886,
-4200,
-16476,
-17440,
-16194,
-11513,
-7700,
-5414,
-7195,
-5308,
3401,
10500,
18782,
22860,
18488,
9354,
44,
-6000,
-10847,
-10496,
-9416,
-12246,
-14243,
-14332,
-11547,
-4856,
4710,
11647,
12602,
10125,
5753,
-329,
-3938,
-2731,
-4026,
-9052,
-8841,
-12460,
-15944,
-10544,
-7004,
-3551,
76,
2397,
877,
-2536,
-1209,
-2973,
-4299,
-2349,
-5060,
-7684,
-8706,
-8718,
-7779,
-5079,
-1334,
22,
889,
3686,
6471,
9931,
15227,
19302,
21333,
22717,
22304,
18389,
13066,
6210,
-3212,
-10649,
-12560,
-14421,
-13587,
-9607,
-7209,
-5892,
-2862,
1739,
5957,
10767,
14527,
14917,
10781,
6252,
2436,
-1568,
-3297,
-3319,
-5955,
-9489,
-11993,
-13404,
-12496,
-8572,
-2682,
1101,
2974,
4101,
3967,
2666,
3566,
4836,
3034,
712,
-1946,
-6550,
-9703,
-10459,
-10052,
-8125,
-6304,
-5152,
-4331,
-3448,
-2115,
-916,
-430,
-9,
36,
-1109,
-2319,
-2893,
-3689,
-4027,
-3779,
-2791,
-1170,
324,
1469,
3720,
6221,
7584,
10511,
14059,
16469,
18432,
18341,
16161,
12644,
5744,
-992,
-3758,
-5076,
-6930,
-8349,
-9669,
-11127,
-11109,
-8759,
-3701,
2064,
5897,
7418,
7483,
7102,
6366,
5937,
5781,
5005,
3582,
763,
-2363,
-3989,
-4163,
-3599,
-3140,
-3101,
-4173,
-5254,
-5016,
-4433,
-2719,
-1195,
-448,
152,
716,
883,
701,
846,
1235,
1708,
1914,
1572,
155,
-1319,
-2680,
-3259,
-3109,
-2500,
-1384,
-1267,
-2268,
-3290,
-3774,
-2735,
-1787,
-1508,
-2178,
-3448,
-3731,
-3103,
-1967,
-791,
-306,
-747,
-639,
-160,
680,
1561,
2318,
1979,
1524,
1459,
1797,
2329,
3345,
3828,
3750,
4076,
3944,
4398,
4464,
4565,
4274,
3462,
1848,
407,
-633,
-1785,
-2789,
-3282,
-3225,
-3429,
-3864,
-3863,
-3530,
-3027,
-2864,
-3291,
-3204,
-3628,
-3864,
-3893,
-3242,
-3002,
-2831,
-2222,
-1776,
-851,
-13,
721,
1178,
1209,
755,
775,
722,
789,
997,
991,
1036,
789,
428,
252,
-176,
-468,
-834,
-1312,
-1852,
-2375,
-2527,
-2190,
-1843,
-1715,
-1462,
-1697,
-1692,
-1599,
-1620,
-1388,
-1235,
-1276,
-1148,
-835,
-151,
364,
952,
1921,
3041,
3706,
4693,
5512,
5760,
6163,
5920,
5482,
4667,
4160,
3664,
3249,
2526,
1843,
973,
511,
212,
-86,
8,
-895,
-1320,
-2105,
-2615,
-2632,
-2734,
-2585,
-2734,
-2945,
-3332,
-3422,
-2719,
-2114,
-1170,
-233,
61,
-247,
-115,
432,
976,
1662,
1736,
1511,
962,
694,
506,
505,
481,
544,
133,
-316,
-640,
-758,
-82,
463,
480,
609,
780,
463,
658,
559,
505,
83,
-951,
-1573,
-2200,
-2747,
-2758,
-2718,
-2492,
-2380,
-1828,
-1220,
-908,
-625,
-496,
-526,
-769,
-739,
-747,
-846,
-1248,
-1174,
-962,
-833,
-532,
-179,
-57,
50,
83,
-35,
138,
159,
378,
690,
1350,
1936,
2179,
2359,
2642,
2844,
2965,
3202,
2989,
3042,
2532,
2234,
2248,
2264,
2154,
1611,
1367,
689,
200,
-353,
-672,
-1330,
-1889,
-2391,
-2583,
-2919,
-2986,
-2733,
-2598,
-1934,
-1655,
-1040,
-747,
-623,
-198,
-4,
17,
-61,
-281,
-55,
-250,
-250,
-244,
-265,
-74,
68,
394,
535,
472,
525,
475,
524,
458,
20,
-110,
-562,
-616,
-809,
-812,
-833,
-882,
-958,
-892,
-897,
-1063,
-952,
-1013,
-557,
-376,
-628,
-626,
-612,
-717,
-799,
-596,
-425,
-1101,
-1096,
-1179,
-1204,
-1022,
-771,
-605,
-497,
-208,
-120,
338,
228,
576,
423,
46,
-25,
-356,
-351,
-687,
-747,
-866,
-864,
-964,
-901,
-472,
-542,
-316,
-195,
36,
-53,
-151,
-110,
-328,
-557,
-988,
-1247,
-1688,
-1890,
-1876,
-1982,
-2044,
-1861,
-1754,
-1428,
-1254,
-1043,
-1751,
-2351,
-1732,
-1228,
-384,
-1672,
-3097,
-3348,
-2010,
732,
2223,
2480,
1782,
2207,
3636,
5189,
6562,
6582,
5694,
4637,
4714,
4970,
4341,
2907,
993,
-438,
-1157,
-1605,
-2875,
-4068,
-5158,
-5208,
-4543,
-3842,
-3731,
-3765,
-3352,
-2068,
-695,
-147,
254,
437,
1359,
1932,
2190,
2356,
2520,
2487,
2524,
2149,
1837,
1338,
821,
233,
-667,
-1250,
-1649,
-1786,
-2296,
-2675,
-2749,
-2389,
-2079,
-1646,
-1124,
-393,
114,
394,
544,
932,
1345,
1432,
1535,
1838,
1756,
1386,
1395,
968,
581,
403,
156,
-295,
-543,
-1887,
-3036,
-3349,
-3876,
-3827,
-4163,
-3847,
-3420,
-3565,
-3668,
-3831,
-3321,
-2953,
-2460,
-1516,
-494,
-218,
-277,
-126,
39,
294,
666,
1649,
2592,
3403,
3812,
4742,
6017,
7185,
8291,
9223,
9560,
9290,
8942,
8077,
7035,
5325,
3794,
2154,
530,
-1010,
-2714,
-3532,
-4460,
-5486,
-5649,
-5364,
-4911,
-4163,
-2974,
-1790,
-516,
805,
1797,
2590,
3241,
3775,
3975,
4027,
3735,
3041,
2387,
1313,
293,
-293,
-1325,
-1894,
-2542,
-3105,
-3465,
-3740,
-3756,
-3750,
-3696,
-3311,
-2750,
-2008,
-1195,
-585,
-101,
57,
555,
152,
-1,
-212,
-409,
-456,
-1083,
-1533,
-2071,
-2754,
-3595,
-4240,
-4912,
-5419,
-5781,
-5561,
-5300,
-4799,
-3887,
-3091,
-2228,
-1225,
-303,
828,
2143,
3411,
4517,
5515,
6775,
7862,
8888,
9895,
11087,
11774,
11656,
10841,
9818,
8828,
6765,
5037,
3372,
1448,
-1166,
-3285,
-4033,
-5630,
-6556,
-5856,
-5208,
-5086,
-3978,
-2882,
-2306,
-1766,
-339,
609,
880,
2201,
2889,
2280,
2291,
2404,
1059,
-140,
-615,
-1386,
-2818,
-3268,
-3535,
-4106,
-4632,
-4761,
-4868,
-5019,
-4318,
-3800,
-3500,
-3117,
-2816,
-2719,
-2683,
-2156,
-2214,
-2519,
-2765,
-3105,
-3506,
-3962,
-4255,
-5021,
-5233,
-5421,
-5515,
-5511,
-5128,
-4592,
-3941,
-3252,
-2456,
-1585,
-661,
395,
1640,
3308,
4648,
6234,
7413,
8645,
9840,
10949,
11730,
12734,
13637,
13771,
13678,
12934,
11169,
8632,
5229,
2256,
-233,
-3058,
-3814,
-3557,
-3794,
-4739,
-5265,
-5970,
-6144,
-4673,
-3221,
-2099,
-995,
256,
817,
1332,
1714,
1459,
1239,
1052,
346,
-302,
-1271,
-1772,
-2051,
-2891,
-2830,
-3133,
-3680,
-4192,
-4479,
-4500,
-4652,
-4276,
-3694,
-3262,
-3250,
-3248,
-3256,
-3230,
-3450,
-4055,
-4403,
-4710,
-4843,
-5032,
-4974,
-5102,
-5475,
-5491,
-5521,
-5260,
-4850,
-4067,
-3317,
-2512,
-1137,
18,
650,
1925,
2994,
3773,
4931,
6282,
7623,
8555,
9647,
10262,
11265,
12004,
13014,
14144,
15044,
15127,
15036,
14331,
11532,
8008,
3934,
702,
-2619,
-4593,
-5214,
-5708,
-6274,
-6524,
-6238,
-6258,
-6033,
-5151,
-3759,
-2596,
-1285,
332,
1134,
1844,
2201,
2015,
1680,
600,
-248,
-1343,
-2498,
-3473,
-4106,
-4580,
-4971,
-5531,
-5778,
-6109,
-6323,
-6192,
-6289,
-5750,
-5135,
-4330,
-4004,
-3414,
-3460,
-3517,
-3538,
-4186,
-4224,
-4904,
-5266,
-5492,
-6118,
-6285,
-6178,
-6012,
-5788,
-5152,
-4286,
-3679,
-3099,
-2194,
-1153,
-629,
99,
993,
1835,
2908,
3454,
4299,
5396,
6395,
7086,
7829,
8768,
9600,
11224,
12513,
14301,
16337,
17862,
18725,
18795,
17904,
15100,
10792,
6041,
1717,
-2579,
-5275,
-6722,
-7343,
-8089,
-8774,
-8787,
-8953,
-7988,
-6997,
-5777,
-4317,
-2640,
-865,
460,
2090,
3031,
3732,
4025,
3211,
1831,
170,
-1475,
-3197,
-4312,
-5272,
-6416,
-6936,
-7279,
-7725,
-7787,
-7571,
-7264,
-6770,
-6107,
-5072,
-4200,
-3530,
-3158,
-2958,
-2591,
-2931,
-3393,
-3622,
-4184,
-5437,
-6503,
-6915,
-7042,
-6977,
-6671,
-6052,
-5394,
-3905,
-3223,
-2407,
-1267,
-738,
257,
791,
1532,
2369,
3057,
3824,
4043,
4615,
5667,
5880,
6605,
7693,
8661,
10100,
11637,
13333,
15235,
17225,
19191,
20746,
21433,
21297,
18482,
13799,
7936,
1223,
-4587,
-8462,
-10316,
-12152,
-12560,
-11073,
-10661,
-10352,
-8763,
-7693,
-6292,
-4128,
-2510,
-716,
1458,
3457,
5138,
6489,
7277,
6749,
5493,
3295,
751,
-2378,
-5352,
-7673,
-10063,
-10613,
-11066,
-11036,
-10310,
-9513,
-8256,
-7004,
-5898,
-4759,
-3819,
-3003,
-2604,
-2058,
-1465,
-1541,
-1564,
-2112,
-2871,
-3835,
-5276,
-6426,
-7359,
-8122,
-7630,
-7328,
-6462,
-4476,
-2860,
-938,
529,
1298,
1569,
1438,
2043,
2067,
2370,
3217,
3421,
4341,
5265,
5455,
6469,
7445,
7889,
9512,
10750,
12850,
14919,
17173,
20245,
22748,
24710,
25499,
24329,
20574,
15051,
7814,
-13,
-6959,
-12044,
-15801,
-17274,
-17178,
-16483,
-15072,
-12627,
-10034,
-8123,
-5512,
-3342,
-1644,
754,
3841,
6151,
8479,
10234,
10898,
10044,
7832,
4595,
-189,
-4861,
-9308,
-13152,
-16579,
-17455,
-17703,
-16958,
-14250,
-12270,
-9944,
-7459,
-5569,
-4138,
-3273,
-2360,
-1676,
-1344,
-849,
-1402,
-2151,
-3077,
-4647,
-6497,
-8208,
-9826,
-10421,
-10606,
-9622,
-7791,
-5790,
-3035,
-927,
758,
1486,
1815,
1536,
1499,
1590,
1880,
2452,
2813,
3297,
3669,
4465,
5301,
6187,
7411,
8950,
10607,
12706,
14944,
17410,
20537,
23610,
26344,
28578,
28159,
24890,
19457,
11276,
1760,
-7209,
-14244,
-19652,
-22149,
-21961,
-20435,
-17292,
-13371,
-9548,
-6629,
-3582,
-461,
1875,
4478,
7410,
10229,
12513,
14131,
14273,
12264,
8237,
2939,
-3447,
-10049,
-15792,
-20671,
-22304,
-22708,
-21088,
-17265,
-13830,
-9230,
-5557,
-2950,
-657,
41,
785,
1073,
539,
787,
-429,
-1822,
-3199,
-5700,
-7848,
-10140,
-11491,
-12074,
-11505,
-9405,
-7372,
-4198,
-730,
1339,
2839,
3633,
3769,
3197,
2969,
3018,
2622,
2647,
2542,
2629,
3665,
4291,
5441,
7180,
8449,
10772,
12731,
14965,
17388,
19736,
22715,
26069,
28888,
29960,
29315,
24683,
17715,
7447,
-4365,
-13771,
-21124,
-25065,
-26004,
-23336,
-19318,
-14962,
-9568,
-5520,
-2661,
814,
3503,
6328,
9874,
13217,
15925,
16725,
16078,
12232,
5620,
-2174,
-9583,
-18153,
-23117,
-25852,
-26429,
-23315,
-20569,
-14562,
-10060,
-5893,
-1993,
-567,
1398,
2211,
2149,
2465,
1231,
319,
-1855,
-4792,
-7430,
-10871,
-12449,
-13285,
-12858,
-10916,
-8642,
-5593,
-2854,
-882,
1057,
1945,
2888,
3144,
2826,
2917,
2625,
2269,
2133,
1478,
1833,
2422,
3572,
5904,
8703,
11678,
14658,
17168,
19169,
20637,
22515,
24276,
27926,
29920,
29562,
29965,
21993,
13880,
-1395,
-16523,
-23563,
-29659,
-28928,
-24803,
-16281,
-10854,
-7401,
-1946,
-1026,
-352,
4639,
8378,
13167,
18400,
21171,
20094,
13416,
6574,
-4704,
-16347,
-22257,
-26527,
-27032,
-23670,
-19463,
-15891,
-12646,
-10457,
-8375,
-7139,
-3108,
961,
3223,
6340,
6207,
3816,
-1149,
-7244,
-12998,
-16349,
-16925,
-15913,
-12693,
-8923,
-6646,
-4891,
-3946,
-3749,
-3608,
-2777,
-1038,
60,
907,
955,
-978,
-2729,
-4454,
-5437,
-4603,
-1904,
1156,
4292,
7552,
10754,
12666,
15577,
18340,
20313,
23682,
26730,
29213,
29638,
29996,
29316,
30589,
17234,
4715,
-9645,
-27360,
-29571,
-29168,
-22250,
-16351,
-7614,
-3656,
-6706,
-3161,
630,
3964,
14816,
23746,
26874,
24289,
16670,
5115,
-10084,
-18541,
-21017,
-22326,
-18111,
-13286,
-13367,
-14376,
-16184,
-15023,
-14237,
-5714,
4104,
9731,
14617,
12683,
5555,
-3271,
-9402,
-13373,
-14324,
-10984,
-9506,
-10439,
-10904,
-13792,
-14644,
-12068,
-5958,
210,
5055,
7833,
4252,
-1675,
-6502,
-10510,
-10185,
-7363,
-4271,
-2867,
-3850,
-5424,
-7250,
-5015,
60,
6619,
13123,
18823,
20638,
19914,
19304,
19537,
20715,
26310,
29368,
30130,
29190,
30868,
23363,
14,
-11957,
-26462,
-30229,
-22378,
-13937,
-8639,
-10580,
-7170,
-11257,
-8391,
5689,
17570,
26496,
30062,
25639,
10509,
-5373,
-12762,
-16420,
-16355,
-9759,
-9209,
-15314,
-20229,
-21848,
-20576,
-11632,
3076,
11076,
12004,
8843,
1446,
-7750,
-7180,
-2895,
-676,
503,
-3180,
-13392,
-22253,
-23374,
-19500,
-11232,
-936,
4070,
998,
-2297,
-6462,
-7764,
-4733,
848,
1677,
-1859,
-7194,
-14479,
-18271,
-15014,
-7442,
-1898,
1648,
1315,
-1832,
-3165,
914,
7524,
15494,
20438,
22419,
18389,
16504,
16127,
20198,
27891,
30167,
29390,
30345,
22460,
-2653,
-13593,
-22144,
-20093,
-12716,
-8729,
-10879,
-21054,
-15850,
-10949,
2032,
19426,
27426,
25344,
14958,
6665,
-412,
-3637,
471,
-1278,
-10653,
-19135,
-25860,
-26293,
-18406,
-4487,
4458,
4383,
4889,
-1367,
-3186,
217,
6165,
7110,
-597,
-2772,
-13531,
-17345,
-14353,
-11449,
-8832,
-10299,
-7925,
-10402,
-8532,
-575,
1980,
3791,
1002,
-3083,
-7883,
-9411,
-5436,
-6855,
-7659,
-10166,
-13808,
-13870,
-9242,
-1957,
-161,
2187,
2719,
1263,
3967,
9955,
15298,
17274,
18736,
18137,
15915,
19814,
26951,
29865,
29597,
30058,
25461,
1156,
-9530,
-11745,
-15097,
-10365,
-11719,
-14473,
-22988,
-15305,
-800,
7293,
17796,
19011,
13802,
8087,
8858,
11145,
4969,
-861,
-9034,
-19299,
-21655,
-16390,
-11066,
-9861,
-8209,
-5450,
-5481,
2002,
7874,
7385,
4502,
-1154,
-626,
-7388,
-3485,
-1196,
-10738,
-13060,
-15394,
-13962,
-11732,
-5901,
-2132,
-7118,
-4443,
-1021,
-802,
1735,
907,
-1982,
-8022,
-7322,
-6053,
-9203,
-9334,
-10666,
-11839,
-8763,
-3790,
-564,
275,
2985,
5723,
8574,
13806,
17785,
19093,
18833,
20415,
22141,
27215,
29201,
29760,
29306,
22407,
3923,
-7434,
-7849,
-11249,
-10359,
-14017,
-15822,
-18360,
-11607,
2368,
7673,
10185,
11621,
11479,
12087,
14286,
12196,
3384,
-7136,
-9850,
-11108,
-11661,
-11246,
-14067,
-16381,
-13898,
-4858,
-67,
976,
3912,
-551,
290,
2887,
4441,
1358,
-6255,
-4240,
-9250,
-11618,
-9125,
-11432,
-14829,
-13702,
-8336,
-6350,
-5524,
-2979,
-2423,
-3687,
-71,
1269,
-2259,
-4799,
-5888,
-6728,
-7648,
-7193,
-7887,
-10024,
-8668,
-3943,
-1367,
1187,
5202,
7920,
11250,
15594,
20172,
21285,
22314,
26577,
28901,
29367,
29988,
24327,
9611,
-1415,
-3320,
-6938,
-12297,
-15806,
-19975,
-19676,
-12170,
-2592,
707,
614,
5101,
11667,
16169,
18012,
14092,
5406,
-522,
-1443,
-3073,
-8370,
-13563,
-16318,
-16461,
-13149,
-8582,
-8050,
-8541,
-3652,
2421,
2241,
1735,
2708,
2774,
1451,
696,
671,
-4749,
-9735,
-9231,
-10265,
-13765,
-12482,
-11071,
-11439,
-9006,
-5806,
-3937,
-2913,
-960,
445,
134,
-440,
-971,
-2503,
-4016,
-5151,
-6516,
-7711,
-8207,
-6773,
-3340,
-62,
2026,
5019,
9746,
14688,
17355,
20073,
23643,
27532,
29353,
29774,
29310,
22033,
11962,
6152,
1873,
-4857,
-10736,
-16507,
-19220,
-17785,
-14496,
-11562,
-8791,
-4814,
1367,
7913,
11408,
13118,
12836,
12486,
11255,
9069,
4308,
-978,
-4764,
-7316,
-10087,
-13447,
-15933,
-15247,
-12375,
-10777,
-9876,
-8761,
-5356,
-394,
2137,
1833,
2963,
3401,
3289,
2571,
-250,
-4277,
-6311,
-7086,
-8860,
-10506,
-11250,
-10992,
-9819,
-7160,
-5909,
-4379,
-2444,
-242,
947,
1253,
1585,
900,
709,
678,
-508,
-1647,
-792,
695,
1777,
2994,
4653,
5633,
7903,
11466,
14078,
15152,
16465,
19010,
19652,
18606,
17790,
15278,
11760,
9129,
6775,
3197,
-714,
-3187,
-5799,
-7149,
-7075,
-7434,
-7918,
-7378,
-6115,
-4648,
-3049,
-1493,
-524,
-154,
566,
1659,
2043,
1993,
1418,
529,
532,
423,
100,
-1104,
-2138,
-2690,
-3327,
-3473,
-3559,
-3399,
-3876,
-4165,
-4044,
-4054,
-4596,
-4483,
-3747,
-4583,
-4178,
-3248,
-3384,
-3339,
-2881,
-2310,
-2042,
-1259,
-992,
-1204,
-1371,
-1702,
-1759,
-1860,
-1881,
-1997,
-2546,
-2312,
-2236,
-2551,
-2486,
-2390,
-1941,
-1339,
-572,
-3,
432,
647,
1288,
1780,
2022,
2611,
3126,
3800,
4145,
4441,
4264,
4229,
4282,
4196,
4481,
4426,
4147,
3866,
3597,
2979,
2444,
1652,
659,
26,
-774,
-1755,
-2237,
-2573,
-3274,
-3213,
-3465,
-3765,
-3734,
-3773,
-3656,
-3448,
-3352,
-3389,
-3208,
-3278,
-3223,
-3286,
-3127,
-3133,
-3314,
-3181,
-3519,
-3362,
-3545,
-3571,
-3083,
-2997,
-2725,
-2232,
-1700,
-1199,
-666,
-158,
285,
385,
585,
299,
124,
36,
-273,
-286,
-596,
-1161,
-1305,
-1678,
-1933,
-1750,
-1884,
-1839,
-1589,
-1157,
-479,
285,
888,
1558,
2155,
3038,
3810,
4225,
4537,
4457,
4363,
4389,
4066,
3962,
4047,
3564,
3159,
2831,
2497,
2524,
2303,
2258,
2026,
1224,
1029,
825,
506,
501,
339,
-202,
-963,
-1195,
-1707,
-2202,
-2285,
-2645,
-2601,
-2712,
-2772,
-2924,
-2677,
-2433,
-2326,
-2087,
-1988,
-1724,
-1785,
-1705,
-1815,
-1507,
-1612,
-1500,
-1190,
-1284,
-1105,
-699,
-507,
-461,
-55,
166,
54,
-16,
128,
364,
369,
93,
135,
19,
-57,
-212,
-444,
-713,
-879,
-1028,
-1252,
-1234,
-1095,
-1157,
-811,
-247,
-287,
155,
591,
896,
1276,
1517,
1483,
1527,
1366,
1400,
1572,
1300,
1075,
1239,
1267,
1258,
1690,
1924,
2419,
2306,
2525,
2757,
2623,
2867,
2788,
2495,
2555,
2280,
1850,
1479,
1068,
836,
470,
479,
244,
105,
-562,
-733,
-992,
-1433,
-1340,
-1769,
-1799,
-2220,
-2291,
-2534,
-2635,
-2273,
-2240,
-2057,
-2296,
-1877,
-1446,
-1089,
-1007,
-910,
-737,
-275,
50,
-41,
57,
-277,
-388,
-438,
-678,
-812,
-981,
-1394,
-1700,
-1701,
-1595,
-1819,
-1666,
-1494,
-1195,
-1308,
-1141,
-711,
-305,
101,
-129,
127,
247,
318,
249,
402,
-70,
-216,
39,
-357,
82,
77,
-181,
239,
387,
597,
1009,
1119,
1272,
1366,
1487,
1368,
1154,
1116,
970,
783,
500,
665,
514,
623,
833,
574,
692,
759,
748,
766,
1042,
809,
751,
645,
445,
556,
319,
444,
151,
-179,
-45,
41,
-51,
116,
238,
305,
492,
528,
419,
247,
231,
338,
524,
54,
-108,
-458,
-800,
-1154,
-1628,
-1672,
-2087,
-1890,
-1872,
-2031,
-1929,
-1720,
-1376,
-1101,
-1011,
-951,
-641,
-260,
-282,
-87,
0,
-364,
-539,
-669,
-485,
-521,
-753,
-746,
-750,
-757,
-591,
-413,
-242,
-232,
365,
365,
236,
566,
437,
575,
309,
284,
133,
5,
-54,
-252,
-262,
-228,
-281,
-6,
343,
544,
450,
649,
581,
466,
526,
473,
527,
471,
506,
60,
28,
-44,
54,
-60,
65,
-66,
58,
37,
561,
420,
576,
432,
548,
618,
568,
473,
300,
272,
152,
293,
-95,
187,
-3519,
-134,
41,
66,
-958,
-2158,
1809,
-332,
309,
-51,
759,
181,
1083,
730,
-745,
626,
363,
-207,
-518,
-134,
-422,
-593,
-452,
-728,
-993,
-169,
-258,
-369,
-176,
-5,
-90,
94,
512,
191,
23,
405,
-43,
72,
12,
322,
-165,
-397,
148,
-446,
-30,
-955,
-468,
-776,
-523,
-168,
-718,
-458,
-520,
-492,
-591,
-201,
-929,
-742,
-1333,
-663,
-341,
-724,
-674,
-663,
-419,
-528,
136,
-595,
-228,
-230,
-540,
-332,
-510,
-513,
-1030,
75,
-762,
-858,
-327,
-2478,
-1177,
-121,
-747,
-385,
-1446,
-847,
666,
-1349,
-406,
870,
-340,
75,
-94,
441,
-667,
-595,
278,
217,
202,
-189,
-341,
36,
62,
-834,
285,
-1227,
1070,
-891,
-459,
879,
-1860,
381,
-615,
543,
-792,
-211,
316,
-1253,
1016,
-475,
-369,
242,
-487,
1323,
-1435,
1011,
-324,
-74,
156,
-140,
333,
-759,
346,
-926,
414,
-735,
402,
-1086,
717,
-1041,
113,
392,
-402,
272,
-405,
119,
-314,
354,
-238,
90,
-83,
302,
-618,
-2,
756,
-450,
990,
-362,
-211,
547,
-1372,
1488,
-1054,
374,
-249,
721,
-1761,
1587,
-661,
1426,
1289,
-1250,
573,
-291,
1809,
-1035,
1803,
-1134,
2229,
-2301,
2242,
-2444,
1880,
-645,
116,
977,
-2413,
1100,
-2553,
-362,
-2744,
1874,
-2264,
2005,
-1893,
1081,
-1842,
536,
-858,
-157,
715,
-1354,
796,
-1362,
420,
-1681,
1665,
-1509,
782,
-1600,
824,
-1163,
418,
-960,
402,
-698,
81,
-547,
-70,
404,
-2234,
2001,
-2291,
1597,
-662,
653,
-1286,
639,
-528,
1319,
-333,
584,
727,
-1437,
2399,
-1083,
1518,
-1301,
1954,
-1472,
792,
992,
-871,
855,
-717,
1493,
-1483,
2515,
-754,
-229,
1306,
-504,
539,
344,
501,
154,
739,
-1236,
2230,
-845,
248,
1684,
-1345,
1107,
262,
282,
1144,
-454,
360,
600,
-47,
893,
-355,
37,
1696,
-1092,
1208,
876,
-2182,
3160,
-2527,
2608,
-1093,
-975,
2361,
-3559,
3585,
-3267,
2503,
-1756,
364,
645,
-954,
583,
-2735,
3098,
-3891,
2923,
-2392,
165,
446,
-1752,
114,
747,
-1708,
-751,
754,
-1354,
447,
-112,
-41,
-1894,
3017,
-4733,
3146,
-3027,
-450,
489,
-2132,
1125,
-2589,
915,
-2851,
896,
-2230,
1027,
-1968,
838,
-587,
-2507,
3688,
-4748,
2982,
-3132,
939,
-522,
-468,
2,
-878,
1334,
-6219,
7620,
-8130,
5684,
-4854,
350,
2104,
-4173,
3261,
-4598,
4256,
-4285,
4050,
-4850,
2461,
-1916,
350,
914,
-1716,
1208,
-1452,
588,
-541,
-556,
-1013,
1787,
-2133,
160,
827,
-947,
517,
-511,
-1208,
2138,
-3276,
4642,
-6007,
4118,
-1856,
3402,
-1460,
-1791,
2583,
-6675,
7051,
-7606,
5476,
-7116,
6314,
-5636,
3253,
215,
-3086,
4750,
-6041,
6579,
-6082,
5636,
-4443,
3063,
-836,
-142,
202,
-155,
-1799,
3434,
-2475,
4052,
-1310,
712,
2076,
-5080,
5839,
-5430,
7259,
1831,
1055,
-10599,
4806,
-539,
2545,
-4515,
5860,
-2815,
1280,
2249,
-3770,
4191,
-4999,
8517,
-5328,
4292,
-3708,
2652,
-4015,
3940,
-2802,
1952,
-2360,
802,
271,
417,
-554,
-814,
1242,
-2313,
5598,
-7516,
7259,
-5683,
2953,
-368,
-63,
1045,
-1594,
1097,
-1389,
1687,
-2799,
3317,
-2759,
1350,
52,
-1281,
1778,
-3622,
1988,
-2448,
1647,
-2504,
2974,
-2668,
469,
-42,
-1634,
2948,
-3499,
2434,
-3156,
4519,
-3722,
2724,
-1068,
-1034,
515,
-447,
719,
-730,
1433,
-719,
1477,
-2820,
3742,
-1699,
-131,
691,
-439,
795,
-646,
1173,
-1180,
1054,
-1313,
2580,
-2795,
2994,
-1911,
136,
1053,
-994,
3533,
-5655,
4764,
-2328,
2360,
-2129,
576,
-629,
-1633,
3114,
-2601,
998,
-1244,
911,
241,
410,
-630,
-110,
-404,
983,
-717,
-1150,
679,
-923,
1083,
-1733,
712,
-268,
257,
-1113,
991,
-1119,
922,
-604,
304,
-148,
-2092,
3518,
-6937,
8073,
-7378,
6385,
-5848,
1741,
2247,
-5147,
6542,
-8180,
6747,
-7110,
5455,
-3455,
1794,
-461,
-2248,
2571,
-1360,
-300,
-1049,
-283,
582,
-151,
-1763,
2646,
-4233,
4621,
-2281,
1333,
915,
-3235,
3270,
-2003,
1115,
-1658,
818,
380,
-3157,
2337,
-2080,
740,
-96,
-333,
-211,
-1673,
1792,
-3644,
3729,
-4247,
1127,
480,
-3459,
5074,
-7944,
5121,
-2889,
1003,
-2043,
236,
-1141,
1413,
-1387,
-1245,
2291,
-4872,
5092,
-5841,
5740,
-5040,
4500,
-4820,
3809,
-794,
-1010,
1321,
-2208,
6387,
-6885,
6324,
-5440,
4656,
-4210,
2913,
-264,
-1336,
2084,
-2399,
3394,
-3566,
5804,
-6212,
6306,
-4161,
1805,
1498,
-2858,
5204,
-4825,
4881,
-5020,
5321,
-5790,
5701,
-4516,
2906,
-1733,
1176,
2918,
-5794,
8602,
-10465,
10667,
-9762,
9543,
-5909,
2709,
1639,
-2856,
5325,
-7661,
6179,
-6607,
4778,
-3169,
1254,
-2011,
2176,
573,
-788,
864,
-1037,
3496,
-2668,
2534,
1561,
-2308,
3490,
-1101,
3126,
-149,
454,
-1150,
2363,
-1842,
-330,
-108,
-3180,
2313,
-3732,
5802,
-6741,
5362,
-3429,
1161,
2354,
-3486,
2197,
-4567,
4130,
-4467,
3526,
-1784,
-1050,
1534,
-2903,
4950,
-4685,
1781,
-1603,
-59,
1687,
-2979,
1689,
-2123,
-103,
112,
-350,
-1793,
837,
-2707,
1646,
-1760,
1400,
-750,
-1059,
-71,
-917,
619,
-319,
-388,
-951,
1448,
-3423,
3508,
-4998,
2599,
-1922,
249,
-354,
-710,
-435,
-2015,
1526,
-1993,
1965,
-2452,
2494,
-2656,
1961,
-3382,
4820,
-5756,
5248,
-3338,
-98,
3485,
-7122,
9337,
-10427,
6925,
-4745,
1441,
-520,
-846,
1318,
-2659,
847,
361,
-1365,
-1429,
1428,
-3019,
3104,
-4541,
5106,
-4672,
3646,
-3183,
2192,
-1318,
-1001,
3600,
-4903,
3844,
-3223,
4505,
-5223,
5320,
-4035,
413,
166,
-678,
727,
-2844,
2911,
-3805,
3897,
-4036,
2823,
-644,
-1194,
2453,
-2315,
1198,
-544,
-28,
377,
-682,
231,
-1269,
925,
-954,
-702,
230,
-1428,
605,
-1184,
-576,
342,
-2597,
548,
-1429,
-3267,
-3061,
-2517,
-546,
-2697,
-202,
-1023,
726,
-3569,
932,
-3547,
-803,
-229,
-2912,
379,
-2542,
559,
-1737,
652,
-2378,
-744,
-2145,
786,
-1859,
-379,
-369,
-1259,
-574,
-2182,
582,
-3281,
2046,
-2614,
644,
-833,
-1719,
1126,
-3404,
2035,
-1584,
225,
-145,
-1474,
600,
-1962,
742,
-950,
986,
-301,
-220,
-158,
341,
100,
-899,
1313,
-906,
2317,
-212,
1153,
51,
-275,
448,
220,
1567,
374,
2293,
925,
1283,
160,
1366,
93,
264,
416,
926,
743,
288,
1357,
-42,
1359,
-250,
911,
95,
-197,
970,
961,
1545,
1366,
1501,
1148,
627,
18,
344,
851,
1667,
1171,
570,
491,
71,
-651,
-2053,
-1560,
-1650,
-2076,
-2229,
-2660,
-3401,
-4015,
-3646,
-4913,
-4610,
-4409,
-3968,
-3246,
-3133,
-3193,
-2644,
-3301,
-3234,
-2303,
-2262,
-1230,
-609,
439,
862,
970,
1295,
771,
1441,
1755,
2119,
3723,
3662,
4652,
5499,
5576,
5354,
6442,
7103,
7947,
8801,
10145,
12021,
12948,
14140,
15558,
14484,
11432,
10851,
9678,
7062,
4484,
4218,
3010,
-706,
-2507,
-4607,
-8592,
-10733,
-11295,
-11568,
-12657,
-11495,
-11251,
-11455,
-11149,
-9610,
-9518,
-9011,
-6938,
-6250,
-4456,
-3477,
-1796,
-2538,
-1448,
-1577,
-1976,
-2519,
-2617,
-3387,
-4552,
-4460,
-5325,
-6018,
-7130,
-7680,
-8638,
-8281,
-8517,
-7984,
-7842,
-6717,
-6473,
-5157,
-3798,
-3395,
-2461,
-1472,
-128,
370,
1565,
2111,
3177,
3849,
5178,
5347,
6754,
7683,
8645,
10516,
11656,
13659,
14717,
17700,
19833,
22257,
23870,
23912,
22583,
18193,
15951,
14876,
11260,
8443,
7815,
5448,
29,
-3676,
-6249,
-11754,
-14096,
-13215,
-13507,
-14582,
-13090,
-12803,
-14319,
-12771,
-10275,
-9215,
-7880,
-4539,
-3344,
-2786,
-1536,
-1241,
-1885,
-960,
631,
0,
353,
777,
-33,
-1046,
-1300,
-2179,
-3541,
-4054,
-4862,
-5340,
-5489,
-5759,
-7160,
-7726,
-8249,
-8845,
-9286,
-9030,
-9670,
-9258,
-8369,
-8409,
-7221,
-6640,
-5671,
-5081,
-3762,
-2894,
-1965,
-604,
1023,
1625,
3282,
4108,
5303,
7472,
9152,
10655,
11435,
13791,
15316,
17893,
21376,
25241,
28239,
30130,
28910,
22106,
19080,
20383,
15295,
11071,
12139,
10269,
2369,
-3541,
-6288,
-12708,
-17002,
-15377,
-14591,
-15835,
-15237,
-15845,
-17453,
-15530,
-12430,
-10463,
-7558,
-4646,
-3636,
-2751,
-364,
-325,
-119,
144,
899,
2291,
2440,
1658,
612,
592,
-1064,
-2003,
-1122,
-1821,
-3795,
-4381,
-5094,
-6881,
-8294,
-9272,
-10440,
-11002,
-10786,
-10396,
-10992,
-11940,
-12625,
-11625,
-10231,
-9304,
-8641,
-7124,
-5537,
-4748,
-2733,
-1462,
-256,
1306,
3747,
4881,
5586,
7179,
7835,
8900,
11791,
13660,
15778,
17935,
20848,
22933,
26657,
29815,
29965,
25979,
18018,
21397,
20283,
12242,
11760,
13030,
5704,
-3634,
-5162,
-9408,
-16329,
-16735,
-14049,
-15779,
-16950,
-16363,
-18508,
-18225,
-14151,
-10798,
-8321,
-6032,
-5306,
-5042,
-1853,
-18,
117,
1190,
1365,
1716,
3084,
3190,
1235,
875,
994,
-158,
-340,
-1258,
-3684,
-6256,
-6819,
-6708,
-7983,
-9482,
-11394,
-12607,
-11936,
-11907,
-12932,
-12710,
-12596,
-12252,
-10452,
-9247,
-9238,
-8407,
-6588,
-4852,
-3680,
-1590,
-914,
170,
1962,
3584,
5049,
5927,
6899,
7847,
10292,
12480,
14681,
17375,
19125,
21637,
26908,
29425,
30258,
26241,
21369,
20940,
19428,
16298,
13433,
11666,
6742,
-808,
-5332,
-8845,
-13624,
-15108,
-14578,
-14115,
-16321,
-18362,
-18088,
-16833,
-14316,
-10446,
-7292,
-6537,
-6476,
-4862,
-1957,
84,
1231,
1792,
1557,
1871,
3708,
2635,
1336,
1873,
1718,
182,
-308,
-1050,
-3891,
-6164,
-6614,
-6512,
-7931,
-9597,
-11545,
-11916,
-11327,
-11770,
-12125,
-11770,
-11813,
-11446,
-9601,
-8173,
-7909,
-7113,
-4999,
-3499,
-2125,
-498,
310,
867,
2830,
4253,
5655,
6547,
6468,
7981,
10301,
12709,
14382,
16213,
18927,
21866,
25335,
28961,
29929,
24861,
19368,
21185,
21244,
15719,
13256,
13080,
7036,
-898,
-4222,
-7842,
-12800,
-13964,
-12963,
-13721,
-15032,
-17315,
-18661,
-16396,
-12551,
-10486,
-8279,
-6504,
-7055,
-6321,
-2280,
416,
-318,
41,
781,
1606,
2863,
2127,
1101,
1227,
1086,
302,
-99,
-1551,
-3980,
-5385,
-5657,
-6103,
-7589,
-9476,
-11059,
-11392,
-10794,
-10861,
-11546,
-11422,
-11508,
-10529,
-9008,
-7955,
-7599,
-6315,
-4544,
-2703,
-1460,
-237,
89,
1383,
2920,
4750,
5455,
6040,
6859,
8304,
11295,
12527,
15414,
16322,
20341,
22322,
28370,
28441,
31831,
19517,
14455,
26617,
17290,
12676,
12302,
13833,
-500,
-2803,
-5275,
-12786,
-17073,
-17432,
-13128,
-14103,
-14865,
-20280,
-17942,
-14058,
-9016,
-6679,
-7160,
-7416,
-6005,
-1223,
3413,
198,
-1010,
-2807,
3425,
4722,
2208,
-1334,
-2562,
845,
-900,
561,
-5293,
-6917,
-9625,
-5857,
-8236,
-10125,
-15580,
-16065,
-10916,
-11012,
-10750,
-14692,
-9791,
-9209,
-5100,
-7619,
-7048,
-6697,
-3281,
380,
-1430,
-913,
-286,
3220,
4430,
5010,
3480,
6321,
9326,
13989,
15875,
18073,
22460,
28283,
29316,
30442,
28778,
31224,
15745,
9615,
20578,
11422,
82,
-12652,
-9543,
-13731,
-15920,
-24860,
-30972,
-24895,
-17434,
-7698,
-5860,
-5991,
-6755,
3881,
14762,
12374,
10660,
14247,
13952,
12022,
5620,
-1258,
-8627,
-7250,
-10435,
-17604,
-17884,
-19041,
-21326,
-16968,
-12452,
-12333,
-8872,
-2650,
-874,
-87,
2962,
2767,
4521,
3702,
45,
-4331,
-3575,
-7413,
-12726,
-14136,
-15654,
-16500,
-15374,
-14294,
-14583,
-10654,
-5669,
-3685,
-1408,
2231,
5039,
7996,
11462,
10607,
11416,
13263,
15307,
15576,
18195,
19761,
21125,
27337,
29971,
29622,
30100,
25649,
817,
12845,
15513,
-568,
-11867,
-18818,
-9599,
-16755,
-15673,
-29866,
-24954,
-9585,
-4313,
832,
-1687,
6120,
8546,
18978,
17763,
5304,
12738,
15646,
8523,
-3224,
-11744,
-13064,
-11574,
-14709,
-26959,
-25461,
-14375,
-14070,
-15750,
-12072,
-6029,
1578,
6454,
4026,
821,
6475,
7872,
4756,
-1583,
-6669,
-8696,
-7589,
-11972,
-21449,
-19644,
-15334,
-13116,
-15162,
-13377,
-10182,
-2794,
823,
-845,
963,
6255,
8659,
7452,
7575,
8903,
11576,
13454,
13185,
12095,
18770,
23062,
25490,
28335,
30713,
28506,
30472,
155,
590,
23485,
-3633,
-13807,
-24312,
-15127,
-14999,
-21606,
-24224,
-32000,
-5589,
118,
1437,
2067,
7554,
16443,
18355,
21965,
4961,
12496,
17571,
6596,
-9533,
-17746,
-13842,
-15452,
-19450,
-30690,
-24223,
-13149,
-9937,
-16009,
-10972,
648,
8291,
9504,
4741,
4306,
7784,
10276,
1333,
-5846,
-8824,
-8933,
-11820,
-17520,
-22708,
-20581,
-13958,
-13930,
-16044,
-10336,
-3571,
637,
1884,
3455,
5823,
10831,
12627,
8498,
10578,
16281,
16252,
15336,
17761,
20495,
26552,
29762,
30012,
29438,
26730,
-5583,
5712,
16590,
-11228,
-17983,
-22600,
-8554,
-19174,
-17724,
-24623,
-25078,
2239,
313,
2354,
2875,
16171,
16215,
13072,
14541,
4970,
12686,
9402,
-522,
-15985,
-18798,
-12312,
-21082,
-26375,
-25935,
-15576,
-9740,
-11567,
-11936,
-4453,
8022,
9911,
4706,
4607,
7971,
7517,
651,
-5657,
-8308,
-7646,
-9556,
-16677,
-19966,
-17551,
-14317,
-14453,
-14750,
-10411,
-3889,
1466,
1649,
2858,
8793,
13466,
13126,
12869,
14781,
16326,
20138,
19477,
20755,
26748,
31041,
28295,
31204,
-3935,
-593,
21529,
-9192,
-15182,
-26248,
-8689,
-13305,
-17458,
-20885,
-31093,
3224,
942,
1103,
2352,
12416,
20253,
10554,
13596,
4779,
7917,
11139,
-177,
-15087,
-16577,
-10551,
-20786,
-26338,
-24653,
-16972,
-11500,
-10522,
-12470,
-6151,
6962,
8620,
3011,
3096,
10253,
7264,
931,
-4906,
-6834,
-6558,
-7670,
-14358,
-17632,
-12957,
-10211,
-11214,
-10361,
-5423,
-224,
3455,
4841,
8068,
12825,
17284,
17416,
19756,
21392,
26725,
29204,
30498,
28590,
31733,
2353,
-4013,
22469,
-9360,
-17843,
-21587,
-13271,
-14630,
-17723,
-14588,
-29980,
1095,
3613,
65,
5582,
14585,
20769,
9923,
13889,
8925,
4766,
8393,
-797,
-17668,
-15414,
-16069,
-24138,
-31227,
-20485,
-13851,
-17765,
-8327,
-10342,
-3177,
3772,
4908,
2808,
5765,
11310,
1651,
-1446,
-3908,
-6751,
-9046,
-11879,
-13647,
-11841,
-8560,
-9676,
-9152,
-3359,
3577,
8600,
13194,
16300,
22861,
25767,
29634,
29194,
30591,
28506,
31586,
9267,
-5800,
17134,
-9054,
-23822,
-27980,
-22133,
-19144,
-23112,
-18091,
-30413,
-3072,
5139,
1733,
9660,
19499,
28541,
18763,
19229,
12515,
9557,
9411,
-1078,
-18399,
-19770,
-19850,
-30016,
-29813,
-28074,
-22998,
-17986,
-8064,
-10842,
-6109,
6514,
7122,
7884,
8932,
11158,
7970,
4492,
-2541,
-9196,
-9151,
-10997,
-15380,
-15267,
-13069,
-8153,
-2984,
3464,
9607,
19035,
28580,
29978,
29559,
30030,
28766,
21455,
23310,
14135,
-3901,
-12460,
-17910,
-20660,
-24134,
-26207,
-30196,
-22853,
-12695,
-11098,
-4734,
5963,
14303,
17058,
19116,
20048,
17779,
17586,
10251,
-1250,
-8054,
-12424,
-20778,
-28733,
-24240,
-26824,
-26177,
-17987,
-18375,
-14935,
-6962,
-669,
1162,
5608,
10416,
9809,
9827,
7210,
2286,
2130,
305,
-2740,
-3167,
3431,
9185,
8187,
12541,
20652,
28273,
23569,
15929,
12179,
11780,
9297,
-2133,
-10507,
-11416,
-9539,
-14857,
-20873,
-19241,
-13757,
-8458,
-4489,
-1506,
4972,
12627,
15599,
12988,
12805,
13937,
11708,
2101,
-5358,
-7561,
-12012,
-21643,
-26489,
-18280,
-21612,
-21386,
-15451,
-12115,
-6612,
-862,
974,
300,
7521,
9299,
4668,
4414,
3505,
1135,
1518,
1308,
2628,
8200,
14035,
13345,
18745,
23817,
20382,
14173,
11355,
10249,
4014,
1506,
-5895,
-11156,
-8955,
-11143,
-16214,
-17300,
-11218,
-7520,
-4716,
-768,
1978,
7012,
10923,
9761,
6746,
6754,
2633,
4566,
-4223,
-15669,
-13182,
-13547,
-14243,
-22041,
-18708,
-12724,
-9883,
-8240,
-9369,
-1836,
3010,
4500,
4056,
4666,
8468,
8676,
7276,
6660,
8478,
15802,
16625,
13950,
18041,
21098,
16936,
9424,
6893,
3664,
-1167,
-2369,
-8735,
-12837,
-10734,
-9078,
-12244,
-13324,
-7954,
-4749,
-228,
2135,
3486,
7673,
11059,
9504,
6812,
2964,
1447,
-2040,
-7857,
-11649,
-16189,
-11720,
-14291,
-17861,
-14423,
-11810,
-9006,
-8368,
-5293,
-3291,
1237,
4666,
2902,
4529,
5753,
7532,
9642,
10502,
14707,
15469,
17848,
20501,
16286,
11315,
8003,
7468,
282,
-3833,
-2602,
-9183,
-9342,
-8076,
-10736,
-10512,
-7603,
-5695,
-5590,
-375,
2900,
1924,
3828,
5653,
5086,
672,
-1576,
-733,
-8760,
-9351,
-8115,
-13861,
-13255,
-10979,
-10279,
-11066,
-7279,
-5856,
-5904,
-527,
98,
769,
4967,
6593,
7403,
9877,
13959,
15175,
15298,
17617,
19102,
15717,
9705,
5423,
2818,
466,
-5646,
-9568,
-9920,
-10060,
-9203,
-10182,
-9596,
-6829,
-2865,
-31,
544,
3687,
5553,
7716,
5158,
2977,
2715,
-1118,
-4402,
-8948,
-8665,
-11750,
-13724,
-11503,
-12158,
-10954,
-8514,
-6835,
-5081,
-2271,
576,
2400,
5263,
7600,
8300,
11260,
13494,
16081,
14883,
15861,
17549,
10866,
8071,
5279,
1267,
-1352,
-5748,
-6594,
-7786,
-7836,
-8433,
-9716,
-6842,
-5576,
-3217,
-1318,
-207,
2991,
2578,
3111,
4755,
-289,
-1544,
-2868,
-5613,
-4660,
-8776,
-11428,
-10433,
-9277,
-10409,
-10196,
-7172,
-6947,
-2743,
1408,
2558,
6971,
10208,
12778,
14800,
16794,
16431,
16341,
17969,
11955,
6627,
4360,
849,
-3482,
-7780,
-9385,
-11527,
-9842,
-8069,
-10279,
-8665,
-5034,
-3037,
-1669,
1031,
1012,
1890,
6309,
3410,
-1030,
-844,
-3796,
-5307,
-3824,
-8383,
-11540,
-7062,
-6004,
-8113,
-7146,
-6725,
-6357,
-1863,
590,
-276,
4711,
8895,
10303,
14033,
16275,
14931,
16206,
17824,
12885,
8348,
5822,
1812,
-2117,
-3851,
-7912,
-9480,
-7906,
-8083,
-7464,
-6761,
-5113,
-2876,
-207,
1403,
1490,
3574,
2506,
360,
763,
-4533,
-5662,
-3974,
-7741,
-9298,
-8325,
-8735,
-8696,
-6719,
-6839,
-6602,
-1619,
1676,
2633,
7124,
9062,
10846,
15080,
16375,
14902,
14309,
14433,
10514,
7277,
4179,
-2108,
-3746,
-4551,
-8043,
-9271,
-9820,
-8636,
-6789,
-4179,
-2319,
-2100,
946,
2721,
3601,
3356,
-238,
-1261,
-3527,
-6234,
-5840,
-8414,
-10568,
-9333,
-8330,
-8418,
-7722,
-6274,
-5451,
-2190,
1061,
3461,
7914,
10332,
12648,
15445,
18399,
17565,
15166,
14930,
9764,
6338,
3050,
-2646,
-5690,
-9055,
-10499,
-10763,
-10408,
-9059,
-8633,
-5761,
-3800,
-2236,
1202,
2514,
4163,
2883,
1736,
1617,
-3053,
-3476,
-4583,
-8504,
-9735,
-10078,
-10042,
-10574,
-8928,
-8416,
-7563,
-3044,
-830,
2738,
8046,
9634,
12322,
16134,
18449,
18735,
17213,
13554,
8657,
5948,
3653,
-1577,
-5299,
-6896,
-9907,
-9018,
-7844,
-9287,
-8505,
-6673,
-4639,
-1841,
295,
807,
-439,
1308,
1431,
-2930,
-2022,
-2753,
-6123,
-5116,
-5614,
-7336,
-7663,
-6648,
-6929,
-6455,
-2216,
-1394,
2288,
7762,
9284,
12858,
16920,
18050,
17178,
16090,
12273,
8618,
7225,
2662,
-3022,
-5149,
-8485,
-10682,
-9397,
-10545,
-11499,
-9479,
-7299,
-4632,
-1539,
932,
560,
816,
2958,
147,
-621,
340,
-3926,
-5454,
-4773,
-6363,
-7011,
-6987,
-7119,
-8197,
-5147,
-2739,
-570,
5375,
7999,
10735,
15210,
18271,
18851,
17403,
13117,
9299,
7572,
5136,
-255,
-5208,
-7808,
-9469,
-9610,
-10214,
-11525,
-11332,
-9608,
-6157,
-2711,
-1094,
-455,
-1884,
265,
368,
-2190,
-122,
-2959,
-5591,
-3391,
-4150,
-5393,
-6307,
-6096,
-5717,
-4229,
-1084,
513,
4584,
9216,
11365,
14530,
17156,
17691,
15120,
10806,
8375,
5278,
3790,
394,
-5024,
-6770,
-8761,
-8302,
-8151,
-10170,
-9852,
-9012,
-5366,
-2035,
-394,
-530,
-1642,
-917,
-1875,
-1438,
-1435,
-5263,
-6413,
-5299,
-4856,
-4859,
-5567,
-6168,
-5692,
-2026,
779,
4033,
8614,
10841,
14537,
17928,
19684,
17654,
11582,
8879,
5741,
4163,
1602,
-4292,
-7195,
-9399,
-7857,
-7510,
-9417,
-9957,
-10351,
-6400,
-1976,
-184,
-103,
-2212,
-1170,
-2019,
-1941,
-108,
-4956,
-6333,
-5042,
-4625,
-3096,
-3873,
-4931,
-5377,
-3264,
224,
2560,
6900,
9270,
11201,
15862,
18976,
18556,
12368,
6979,
5291,
3754,
3320,
-2123,
-8175,
-9437,
-9048,
-6414,
-7070,
-9702,
-10491,
-8846,
-3346,
20,
877,
-782,
-3770,
-2128,
-1817,
-2074,
-2168,
-6801,
-7841,
-5897,
-4744,
-3244,
-4774,
-5702,
-4681,
-2077,
2377,
4655,
6901,
9990,
13376,
17230,
20683,
18022,
9404,
5968,
4010,
2599,
1346,
-4462,
-9454,
-11091,
-8430,
-6761,
-7591,
-7964,
-10128,
-7647,
-999,
1317,
2177,
-689,
-2484,
-2261,
-3407,
-500,
-3964,
-8156,
-7062,
-7736,
-5085,
-2943,
-4169,
-4757,
-4346,
-853,
2417,
7242,
10610,
11020,
16182,
18306,
21043,
19316,
9471,
6225,
3569,
1417,
760,
-4351,
-8618,
-10797,
-9301,
-7079,
-7415,
-7615,
-9541,
-7613,
-1358,
1906,
3305,
1601,
-2227,
-1913,
-3104,
-2684,
-1900,
-7404,
-8583,
-6823,
-6541,
-4005,
-3786,
-5869,
-5253,
-2241,
1620,
4370,
8627,
10507,
12439,
17718,
20428,
20835,
14588,
7798,
4977,
2957,
2467,
-745,
-6411,
-10704,
-11350,
-8860,
-7125,
-7725,
-8844,
-9369,
-5729,
125,
2833,
3337,
1111,
-1955,
-793,
-912,
-3162,
-3451,
-6841,
-9479,
-7916,
-6379,
-5697,
-5139,
-5892,
-5754,
-3232,
73,
2513,
5740,
9068,
10606,
14958,
18892,
21259,
19747,
11700,
7296,
4240,
1634,
2185,
-3089,
-8229,
-11886,
-12773,
-8854,
-7548,
-7281,
-8146,
-8416,
-4278,
-292,
3287,
5822,
2566,
337,
-815,
-902,
-1729,
-5534,
-6097,
-8046,
-10338,
-7818,
-7322,
-7728,
-6363,
-6346,
-4316,
-1065,
1453,
3408,
6079,
8910,
11035,
14929,
18527,
20956,
21239,
14503,
8596,
6098,
2667,
746,
-2185,
-7063,
-10896,
-11880,
-10217,
-7992,
-6737,
-6622,
-7037,
-4476,
-910,
2355,
5219,
3886,
3089,
2478,
-89,
-25,
-2666,
-6958,
-7003,
-8670,
-9995,
-9168,
-8850,
-8492,
-7102,
-4232,
-3583,
-1791,
1161,
1635,
3913,
6812,
7613,
9286,
11856,
14144,
17478,
20226,
15757,
9083,
5694,
2333,
1152,
87,
-3632,
-9182,
-11782,
-10609,
-8500,
-5927,
-5266,
-7188,
-6187,
-2754,
219,
4548,
5468,
3397,
941,
990,
1583,
-1443,
-2358,
-5394,
-10625,
-10489,
-9248,
-9258,
-8351,
-7200,
-7736,
-6526,
-2622,
-428,
912,
2079,
764,
788,
2570,
3558,
4521,
5816,
7460,
7895,
10504,
14280,
15207,
12833,
10561,
6884,
3474,
3487,
1667,
-899,
-3047,
-5971,
-7724,
-7283,
-6842,
-6231,
-6526,
-5327,
-4144,
-2538,
1503,
3542,
4369,
4697,
3373,
1752,
678,
-1470,
-2830,
-4694,
-6635,
-8601,
-10596,
-9554,
-8317,
-8326,
-6389,
-5342,
-5116,
-2758,
-1096,
-147,
162,
-1094,
-2975,
-3495,
-2979,
-1596,
-382,
1596,
2639,
4454,
8534,
11779,
15452,
19305,
20242,
17950,
16286,
13141,
9917,
6139,
1925,
-2621,
-7843,
-9798,
-10773,
-11172,
-9933,
-8960,
-7805,
-5146,
-2270,
1878,
5003,
7055,
8380,
7603,
7483,
6025,
2776,
588,
-2716,
-8243,
-10138,
-11196,
-13436,
-12770,
-12697,
-12489,
-9692,
-7363,
-5660,
-3089,
-1462,
-559,
-154,
354,
0,
-697,
-1122,
-2891,
-3420,
-3609,
-4246,
-3688,
-2944,
-1917,
313,
2566,
5481,
8633,
11208,
14182,
16656,
19025,
21935,
21907,
20038,
15899,
8731,
3821,
-578,
-4500,
-5918,
-8598,
-10842,
-11300,
-11306,
-9124,
-6412,
-2941,
-40,
1384,
3561,
4853,
5649,
7213,
6630,
4688,
2250,
-1550,
-3729,
-5981,
-7133,
-6916,
-8173,
-9257,
-9232,
-8727,
-7789,
-6381,
-5106,
-4639,
-3626,
-2635,
-2605,
-1760,
-1589,
-2491,
-3038,
-3180,
-3699,
-4178,
-4552,
-4731,
-4961,
-4001,
-3155,
-2657,
-1794,
-1660,
-1814,
-1251,
8,
182,
1160,
1581,
2241,
3488,
4946,
6621,
8591,
10636,
12995,
16095,
19490,
21685,
20583,
19291,
16369,
11633,
7945,
4529,
-612,
-4760,
-7369,
-9067,
-10466,
-10557,
-9462,
-8149,
-5906,
-2791,
166,
2089,
4350,
5077,
5977,
6099,
5563,
3271,
706,
-1992,
-4624,
-6389,
-7413,
-8435,
-9496,
-8397,
-9833,
-7827,
-4938,
-3826,
-824,
1170,
986,
297,
-1065,
-2258,
-2659,
-2820,
-2253,
-3703,
-5996,
-7962,
-8458,
-7940,
-6668,
-4925,
-3540,
-3624,
-3481,
-2836,
-2459,
-872,
151,
-22,
-421,
-1934,
-3923,
-5208,
-5792,
-5606,
-4606,
-3446,
-3170,
-2425,
-805,
1017,
3307,
6664,
8825,
10531,
11732,
12619,
14329,
16181,
17128,
18469,
20033,
19250,
17411,
14772,
11129,
7132,
3561,
-408,
-4167,
-7667,
-9553,
-10841,
-10521,
-8717,
-6769,
-4638,
-2166,
-144,
1365,
3529,
4857,
6114,
6140,
5583,
3595,
1140,
-865,
-3336,
-5237,
-6366,
-7921,
-9019,
-9873,
-9496,
-7875,
-6173,
-3356,
-1102,
109,
620,
448,
-308,
481,
-365,
101,
-27,
-2332,
-3299,
-5402,
-6094,
-5722,
-5607,
-3493,
-3596,
-5299,
-4217,
-5386,
-4788,
-3529,
-1870,
-684,
-2098,
-1765,
-2493,
-4015,
-3448,
-3238,
-3047,
-2494,
-3386,
-3435,
-4670,
-4808,
-3766,
-3467,
-2147,
-1519,
-2007,
-1241,
-1150,
-330,
1552,
2441,
4175,
4538,
5236,
5868,
5436,
6212,
7038,
7275,
8237,
8509,
7968,
8936,
10102,
11070,
12494,
14116,
15158,
14463,
14175,
11736,
7768,
3748,
-1232,
-4736,
-7219,
-7859,
-7543,
-7291,
-6742,
-5821,
-5045,
-3007,
-767,
1391,
3747,
4830,
5574,
5133,
4052,
2510,
401,
-840,
-2499,
-3866,
-4999,
-6624,
-7135,
-7836,
-7638,
-6254,
-4870,
-3149,
-1604,
-633,
-109,
153,
-34,
-899,
-1171,
-2419,
-3642,
-4207,
-5434,
-4785,
-4041,
-3908,
-3341,
-3068,
-2533,
-1668,
-909,
541,
762,
503,
441,
-642,
-2354,
-4133,
-5241,
-6189,
-6884,
-6335,
-5957,
-6390,
-5563,
-5235,
-4672,
-3497,
-2180,
-665,
-176,
530,
234,
-489,
-279,
-651,
-732,
-580,
-654,
-247,
-579,
-123,
456,
872,
2656,
3255,
4089,
5473,
5861,
6027,
6254,
6659,
6924,
6444,
6204,
6047,
5654,
6009,
6701,
7406,
8817,
10766,
11715,
11776,
12368,
14935,
15703,
13848,
8011,
2306,
-2932,
-8959,
-10222,
-9925,
-9425,
-8088,
-7327,
-7716,
-7276,
-6884,
-3987,
-668,
3174,
6751,
7808,
7053,
5161,
2413,
59,
-1467,
-2799,
-3551,
-5286,
-6431,
-9339,
-10200,
-10163,
-9048,
-6280,
-3223,
-441,
1734,
2806,
3259,
2880,
2038,
2143,
1254,
46,
-1555,
-2305,
-4948,
-6678,
-6934,
-7040,
-6847,
-5403,
-3809,
-2888,
-1796,
-59,
805,
1017,
2132,
2069,
1471,
435,
-404,
-2841,
-4923,
-5490,
-6958,
-7443,
-5939,
-5630,
-4774,
-3288,
-3291,
-3067,
-2325,
-1141,
-159,
406,
1259,
1222,
212,
-462,
-1333,
-1833,
-1464,
-787,
-413,
71,
792,
1175,
2000,
3371,
4491,
5659,
6800,
6831,
6485,
6082,
6188,
5860,
4841,
4745,
3939,
3094,
2791,
3491,
3249,
4419,
6219,
7293,
8675,
9883,
10524,
11079,
12682,
14776,
12465,
5397,
2623,
-4743,
-10648,
-11532,
-11540,
-10213,
-8171,
-5629,
-4833,
-4952,
-3859,
-1461,
-475,
4652,
7349,
8121,
8255,
6487,
2410,
-1502,
-4260,
-6425,
-7774,
-7898,
-6782,
-8048,
-7690,
-7596,
-7798,
-6272,
-3222,
-407,
2788,
4965,
6472,
5613,
3896,
2675,
-77,
-1680,
-1978,
-3181,
-4045,
-4245,
-5771,
-6542,
-7511,
-7036,
-6360,
-5113,
-2200,
-207,
867,
2514,
2353,
1769,
1255,
112,
-304,
-1536,
-2061,
-2854,
-4260,
-4941,
-5647,
-6582,
-5873,
-5335,
-4267,
-2928,
-2274,
-1187,
-1313,
-904,
-174,
-475,
-138,
202,
-285,
-229,
-1041,
-1502,
-2065,
-2775,
-1842,
-834,
442,
1866,
2920,
3494,
4308,
4494,
4920,
5831,
6297,
6767,
6751,
6652,
5102,
3817,
3066,
2240,
2365,
3544,
4266,
4756,
5480,
5457,
5495,
5129,
5827,
6371,
7397,
8556,
9647,
9729,
9786,
4802,
-463,
-2740,
-9131,
-10304,
-9322,
-8708,
-6614,
-4811,
-4161,
-3301,
-4248,
-2654,
-1313,
-79,
4331,
5288,
6214,
6448,
4023,
1070,
-1460,
-4170,
-4596,
-5800,
-4888,
-3978,
-4515,
-3942,
-4263,
-5276,
-4478,
-3336,
-1629,
920,
2510,
4187,
3731,
3135,
1490,
-885,
-2667,
-2641,
-3263,
-2330,
-1869,
-2353,
-2357,
-3374,
-3387,
-3713,
-3289,
-1813,
-257,
908,
2362,
2297,
1982,
1124,
-1282,
-3474,
-5048,
-5992,
-5913,
-5317,
-3955,
-3117,
-3168,
-3080,
-3180,
-3242,
-2748,
-2041,
-1018,
-270,
-251,
-372,
-1533,
-2644,
-3666,
-4477,
-4100,
-3420,
-2846,
-1349,
-777,
-437,
-233,
-220,
333,
810,
1835,
2754,
3399,
3856,
3886,
3487,
3170,
2807,
2970,
3001,
3190,
3852,
4004,
3822,
3947,
3358,
3311,
3833,
3693,
4134,
4108,
3744,
3845,
4040,
3974,
4014,
4021,
4880,
4851,
5188,
6060,
6095,
6500,
6788,
4415,
727,
276,
-3896,
-6206,
-5802,
-6853,
-5887,
-4943,
-3791,
-3309,
-3167,
-1944,
-332,
-175,
2166,
3584,
3592,
4300,
3823,
1992,
291,
-1585,
-3022,
-4283,
-5206,
-4407,
-5120,
-4572,
-3847,
-3916,
-3481,
-2210,
-1226,
83,
1290,
2303,
3233,
2971,
2915,
1627,
208,
-520,
-1849,
-2987,
-2970,
-3094,
-3280,
-3206,
-2954,
-3229,
-3105,
-2024,
-1033,
-271,
1023,
2194,
2480,
2823,
2357,
1578,
450,
2,
-308,
-1115,
-1193,
-1694,
-2377,
-2991,
-3379,
-4545,
-4834,
-4333,
-4294,
-3333,
-2525,
-2386,
-2255,
-2126,
-2807,
-2663,
-2960,
-2538,
-1961,
-1894,
-967,
-1254,
-1359,
-1283,
-2126,
-2403,
-2007,
-1852,
-944,
-369,
156,
525,
597,
1262,
1881,
2000,
2806,
3296,
3597,
4106,
3779,
3799,
3553,
2872,
2133,
1695,
1990,
2207,
1918,
2313,
1997,
1742,
1660,
1727,
1927,
2282,
3367,
3413,
3548,
4142,
3802,
3489,
3500,
3066,
2816,
2912,
2867,
2244,
2019,
1763,
1486,
918,
1382,
398,
-1070,
-757,
-2922,
-3844,
-3338,
-3800,
-3547,
-2973,
-2066,
-1691,
-1698,
-693,
-330,
-655,
419,
873,
531,
1437,
1037,
121,
-351,
-1615,
-2589,
-3100,
-3260,
-3232,
-3296,
-2911,
-2071,
-2187,
-1730,
-1006,
-1021,
-553,
-157,
334,
593,
747,
903,
504,
-99,
-271,
-1137,
-2039,
-1720,
-1784,
-1693,
-1258,
-1247,
-1248,
-1264,
-1073,
-733,
-687,
15,
419,
346,
816,
510,
203,
-46,
-824,
-1635,
-2798,
-2800,
-3331,
-3993,
-3473,
-3555,
-3335,
-2852,
-2239,
-2156,
-1498,
-922,
-877,
-632,
-377,
-402,
-950,
-784,
-1351,
-2198,
-2240,
-2638,
-3086,
-2493,
-2176,
-1758,
-1037,
-446,
-48,
138,
836,
1297,
1566,
2012,
2137,
2137,
2244,
2001,
1859,
1454,
1241,
1084,
420,
810,
1196,
1073,
1427,
2024,
2262,
2418,
2893,
3323,
3168,
3484,
3622,
2996,
2921,
2494,
2209,
1927,
2083,
1766,
1465,
1765,
1549,
923,
1215,
1382,
596,
1215,
1568,
1474,
2062,
2290,
2158,
2088,
1961,
1641,
1158,
806,
634,
-233,
-1988,
-1872,
-3444,
-4404,
-3530,
-3735,
-3199,
-2497,
-1536,
-917,
-145,
366,
566,
443,
1297,
1214,
895,
1346,
857,
40,
-120,
-1184,
-2216,
-2730,
-3017,
-2888,
-2972,
-2085,
-1744,
-1208,
-528,
68,
-85,
423,
667,
714,
1295,
1163,
694,
368,
-99,
-469,
-1104,
-1689,
-1414,
-1644,
-1482,
-1249,
-860,
-717,
-790,
-590,
-301,
-515,
-340,
-212,
-272,
-405,
-929,
-1409,
-1559,
-1811,
-2228,
-1986,
-2038,
-1926,
-1875,
-1857,
-1503,
-1515,
-1176,
-896,
-1212,
-821,
-763,
-577,
-307,
-496,
-670,
-556,
-924,
-965,
-837,
-886,
-476,
-952,
-615,
-475,
-503,
-322,
-99,
-317,
-288,
83,
-239,
-195,
181,
215,
84,
132,
216,
586,
435,
891,
958,
1129,
1789,
1580,
1442,
1674,
1352,
930,
1187,
1017,
608,
490,
498,
514,
284,
258,
87,
-195,
420,
490,
552,
908,
1026,
978,
1029,
903,
449,
538,
461,
542,
442,
640,
724,
842,
876,
733,
743,
773,
689,
527,
293,
-482,
-1132,
-1837,
-2530,
-3088,
-3084,
-2876,
-2557,
-2204,
-1755,
-1173,
-781,
-584,
-229,
114,
455,
513,
490,
498,
152,
-162,
-810,
-1383,
-1875,
-2097,
-2280,
-2170,
-1764,
-1433,
-1154,
-907,
-510,
-181,
26,
409,
536,
483,
500,
525,
250,
-237,
-526,
-857,
-977,
-1016,
-1250,
-1133,
-783,
-1021,
-852,
-676,
-505,
-488,
-484,
-54,
157,
412,
308,
293,
0,
-276,
-621,
-1048,
-1188,
-1261,
-1394,
-1307,
-1221,
-1256,
-983,
-1016,
-981,
-1027,
-823,
-482,
-539,
-90,
-33,
-318,
4,
-411,
-458,
-394,
-774,
-920,
-715,
-291,
-55,
136,
105,
170,
-147,
100,
395,
492,
511,
489,
510,
487,
513,
487,
511,
489,
509,
489,
513,
476,
637,
800,
633,
487,
730,
852,
1078,
1145,
993,
992,
1024,
813,
498,
497,
510,
472,
663,
763,
759,
575,
474,
515,
488,
508,
493,
504,
502,
333,
206,
292,
194,
385,
345,
455,
518,
488,
508,
492,
507,
492,
506,
255,
259,
232,
283,
87,
182,
-97,
-274,
-523,
-794,
-552,
-746,
-753,
-743,
-758,
-744,
-1002,
-994,
-822,
-703,
-800,
-880,
-868,
-1178,
-1326,
-1630,
-1635,
-1984,
-1869,
-1702,
-1708,
-1221,
-1355,
-1487,
-1533,
-1398,
-1210,
-1331,
-1389,
-1381,
-1298,
-1216,
-1469,
-1589,
-1793,
-1959,
-2022,
-1977,
-1693,
-1445,
-1368,
-1377,
-1240,
-1214,
-858,
-530,
-495,
-499,
-507,
-478,
-681,
-506,
-623,
-600,
-430,
-694,
-527,
-486,
-668,
-837,
-1022,
-774,
-400,
-80,
295,
517,
490,
516,
371,
188,
385,
350,
453,
520,
490,
500,
509,
266,
334,
543,
471,
517,
663,
818,
550,
545,
744,
780,
655,
625,
585,
461,
525,
480,
519,
467,
322,
529,
477,
525,
463,
354,
384,
221,
266,
233,
464,
513,
487,
514,
482,
519,
146,
121,
499,
498,
496,
518,
375,
384,
295,
216,
278,
225,
274,
483,
404,
333,
83,
-210,
-223,
-291,
-184,
170,
437,
284,
261,
215,
112,
120,
-2,
-29,
159,
58,
-19,
7,
-234,
-255,
-244,
-258,
-238,
-70,
125,
251,
32,
-121,
-304,
-423,
-207,
-298,
-111,
-165,
-224,
-43,
-562,
-639,
-495,
-693,
-402,
-195,
-45,
37,
-37,
48,
-185,
-252,
-256,
-241,
-256,
-248,
-58,
41,
-171,
-288,
-119,
-140,
-53,
151,
293,
134,
-7,
-22,
134,
244,
26,
-177,
204,
67,
-162,
73,
-44,
22,
44,
314,
385,
289,
193,
115,
120,
152,
366,
513,
489,
518,
452,
103,
133,
-36,
7,
133,
107,
241,
109,
130,
122,
111,
-161,
-73,
-6,
116,
281,
235,
256,
248,
247,
260,
202,
-37,
40,
-98,
-257,
-261,
-214,
-457,
-182,
-119,
-85,
31,
-12,
1,
8,
-25,
86,
140,
-43,
28,
-26,
37,
-130,
-115,
-147,
15,
-210,
-259,
-253,
-206,
24,
-13,
8,
-7,
8,
-12,
23,
-73,
-153,
-117,
-389,
-479,
-338,
-491,
-367,
-383,
-267,
-214,
-7,
3,
1,
-10,
27,
-89,
-133,
-137,
-31,
10,
-184,
-76,
-319,
-452,
-537,
-465,
-534,
-460,
-319,
-175,
-510,
-377,
-412,
-456,
-357,
-353,
-257,
-554,
-299,
-493,
-506,
-476,
-150,
41,
-31,
28,
-27,
28,
-31,
35,
-41,
56,
142,
22,
-71,
-425,
-202,
-106,
-138,
28,
-13,
6,
-2,
0,
1,
0,
-4,
161,
41,
-37,
59,
227,
285,
172,
11,
-35,
106,
123,
146,
16,
-9,
5,
-2,
0,
0,
0,
1,
-1,
1,
-2,
3,
-3,
4,
-5,
5,
-4,
3,
-2,
1,
-1,
1,
0,
0,
0,
0,
0,
0,
0,
-1,
2,
-3,
4,
-5,
6,
-7,
10,
-17,
31,
-83,
-142,
37,
-20,
14,
-11,
8,
-6,
5,
-3,
2,
-3,
4,
-5,
7,
-11,
24,
-132,
-269,
49,
-177,
-41,
17,
-12,
11,
-11,
13,
-18,
23,
-257,
-218,
-302,
-124,
-158,
-214,
-86,
-271,
-264,
-117,
-171,
-215,
53,
-234,
-269,
-73,
-238,
-127,
-156,
-291,
-225,
-264,
-243,
-245,
-276,
-104,
-175,
-276,
-237,
-254,
-250,
-243,
-262,
-231,
-274,
-217,
-294,
-158,
-117,
-270,
-247,
-244,
-261,
-233,
-274,
-191,
22,
-181,
-6,
-121,
-309,
-132,
30,
-73,
-151,
-119,
-57,
41,
-38,
45,
-199,
-251,
-255,
-242,
-258,
-241,
-257,
-244,
-250,
-261,
-131,
-111,
-142,
};
| 96,752
|
C++
|
.cxx
| 11,427
| 5.467402
| 41
| 0.526335
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,189
|
dinnerbell.cxx
|
w1hkj_fldigi/src/soundcard/dinnerbell.cxx
|
#define DINNER_BELL 15287
int int_dinner_bell[DINNER_BELL] = {
5877,
6488,
2883,
-3586,
-9223,
-10177,
-4970,
4043,
11723,
13116,
6765,
-4037,
-13025,
-14654,
-7598,
4196,
13747,
15211,
7567,
-4771,
-14435,
-15610,
-7483,
5234,
15026,
16093,
7741,
-5217,
-15299,
-16721,
-8662,
4345,
14939,
17162,
9766,
-3068,
-14220,
-17478,
-10978,
1725,
13572,
17915,
12218,
-459,
-13041,
-18444,
-13472,
-750,
12653,
19107,
14852,
2143,
-11919,
-19363,
-15893,
-3413,
11070,
19347,
16679,
4576,
-10101,
-19034,
-17164,
-5598,
9056,
18497,
17435,
6564,
-7945,
-17930,
-17850,
-7814,
6501,
17048,
17998,
8846,
-5222,
-16312,
-18159,
-9789,
4021,
15464,
18087,
10472,
-3025,
-14786,
-18114,
-11116,
2224,
14265,
18141,
11675,
-1405,
-13628,
-18024,
-12124,
725,
13149,
18024,
12596,
18,
-12481,
-17788,
-12920,
-723,
11834,
17613,
13331,
1475,
-11158,
-17386,
-13650,
-2104,
10655,
17271,
13927,
2524,
-10408,
-17407,
-14355,
-2935,
10319,
17748,
14952,
3423,
-10275,
-18194,
-15664,
-3991,
10153,
18575,
16287,
4514,
-9980,
-18805,
-16746,
-4896,
9919,
19090,
17205,
5258,
-9869,
-19424,
-17768,
-5783,
9709,
19721,
18410,
6433,
-9359,
-19877,
-18995,
-7153,
8901,
19906,
19465,
7761,
-8533,
-20020,
-20012,
-8421,
8178,
20221,
20711,
9236,
-7719,
-20431,
-21547,
-10291,
6970,
20414,
22263,
11398,
-6086,
-20216,
-22894,
-12489,
5124,
19905,
23378,
13523,
-4121,
-19521,
-23889,
-14678,
2964,
19025,
24372,
15904,
-1627,
-18328,
-24718,
-17120,
234,
17534,
24955,
18251,
1126,
-16715,
-25188,
-19383,
-2516,
15909,
25411,
20554,
3970,
-15009,
-25639,
-21798,
-5544,
13982,
25705,
22907,
7046,
-12933,
-25688,
-23906,
-8482,
11879,
25587,
24763,
9801,
-10864,
-25457,
-25621,
-11140,
9792,
25249,
26391,
12462,
-8626,
-24891,
-27008,
-13687,
7479,
24472,
27536,
14891,
-6305,
-23977,
-28008,
-16060,
5116,
23440,
28469,
17281,
-3761,
-22690,
-28735,
-18414,
2380,
21828,
28848,
19442,
-1025,
-20870,
-28788,
-20261,
-163,
20024,
28791,
21127,
1438,
-19069,
-28726,
-22051,
-2841,
17965,
28569,
22990,
4433,
-16566,
-28128,
-23753,
-5978,
15074,
27500,
24325,
7423,
-13590,
-26830,
-24855,
-8812,
12151,
26187,
25384,
10249,
-10633,
-25472,
-25921,
-11739,
9027,
24638,
26287,
13122,
-7399,
-23660,
-26496,
-14339,
5885,
22731,
26634,
15463,
-4436,
-21772,
-26757,
-16579,
2965,
20809,
26874,
17761,
-1354,
-19672,
-26840,
-18864,
-257,
18450,
26724,
19908,
1912,
-17136,
-26468,
-20890,
-3534,
15759,
26147,
21798,
5186,
-14286,
-25674,
-22545,
-6722,
12850,
25095,
23126,
8094,
-11482,
-24496,
-23601,
-9302,
10260,
23983,
24078,
10484,
-9031,
-23408,
-24490,
-11656,
7780,
22764,
24771,
12715,
-6537,
-21981,
-24856,
-13533,
5482,
21287,
24880,
14217,
-4551,
-20669,
-24916,
-14865,
3710,
20152,
25053,
15609,
-2744,
-19524,
-25105,
-16305,
1815,
18857,
25089,
16928,
-899,
-18187,
-24997,
-17440,
132,
17647,
25016,
18042,
712,
-17029,
-25013,
-18661,
-1601,
16356,
24943,
19245,
2564,
-15538,
-24676,
-19633,
-3333,
14829,
24419,
19919,
3984,
-14214,
-24194,
-20217,
-4568,
13715,
24102,
20637,
5304,
-13067,
-23934,
-21036,
-6070,
12365,
23671,
21367,
6819,
-11595,
-23282,
-21562,
-7440,
10890,
22916,
21716,
8053,
-10193,
-22508,
-21843,
-8623,
9509,
22101,
21943,
9168,
-8819,
-21693,
-22038,
-9714,
8198,
21370,
22249,
10336,
-7532,
-21099,
-22589,
-11132,
6727,
20777,
22979,
12058,
-5750,
-20279,
-23255,
-12954,
4713,
19677,
23364,
13697,
-3786,
-19084,
-23440,
-14346,
2974,
18592,
23537,
14969,
-2188,
-18106,
-23666,
-15671,
1318,
17543,
23716,
16304,
-439,
-16935,
-23753,
-16996,
-511,
16264,
23738,
17655,
1474,
-15559,
-23768,
-18451,
-2621,
14679,
23645,
19147,
3810,
-13673,
-23358,
-19740,
-4900,
12659,
22938,
20053,
5734,
-11844,
-22588,
-20355,
-6427,
11182,
22353,
20694,
7123,
-10529,
-22159,
-21094,
-7921,
9768,
21830,
21367,
8662,
-8940,
-21390,
-21554,
-9382,
8107,
20887,
21653,
10026,
-7302,
-20411,
-21831,
-10792,
6361,
19839,
21934,
11532,
-5427,
-19244,
-22065,
-12290,
4448,
18596,
22065,
12888,
-3654,
-18113,
-22198,
-13567,
2839,
17615,
22312,
14210,
-2039,
-17165,
-22488,
-14967,
1108,
16536,
22459,
15524,
-296,
-15912,
-22395,
-16024,
-493,
15287,
22250,
16417,
1173,
-14729,
-22171,
-16889,
-1948,
14093,
22009,
17288,
2669,
-13452,
-21829,
-17679,
-3385,
12815,
21610,
17975,
3990,
-12285,
-21492,
-18360,
-4655,
11735,
21391,
18749,
5336,
-11146,
-21228,
-19123,
-6055,
10468,
20933,
19322,
6588,
-9885,
-20631,
-19449,
-7042,
9384,
20356,
19536,
7422,
-8984,
-20198,
-19733,
-7874,
8520,
19967,
19860,
8282,
-8070,
-19735,
-19981,
-8677,
7634,
19514,
20068,
8993,
-7295,
-19393,
-20294,
-9450,
6881,
19254,
20539,
9983,
-6327,
-19002,
-20729,
-10530,
5702,
18597,
20739,
10918,
-5147,
-18189,
-20677,
-11199,
4734,
17918,
20707,
11542,
-4300,
-17671,
-20873,
-12045,
3718,
17344,
21027,
12655,
-2942,
-16829,
-21067,
-13247,
2117,
16241,
21037,
13797,
-1299,
-15631,
-21019,
-14391,
464,
15058,
21061,
15040,
460,
-14384,
-21022,
-15682,
-1393,
13678,
20933,
16222,
2263,
-12962,
-20780,
-16686,
-3061,
12320,
20643,
17149,
3847,
-11650,
-20470,
-17588,
-4656,
10916,
20241,
17974,
5483,
-10104,
-19876,
-18285,
-6254,
9319,
19534,
18584,
7043,
-8490,
-19174,
-18938,
-7912,
7603,
18804,
19328,
8912,
-6536,
-18274,
-19620,
-9856,
5489,
17693,
19831,
10720,
-4455,
-17077,
-19978,
-11493,
3533,
16557,
20163,
12312,
-2542,
-15927,
-20251,
-13050,
1563,
15254,
20230,
13662,
-642,
-14537,
-20081,
-14121,
-93,
13963,
19981,
14535,
764,
-13435,
-19942,
-15014,
-1481,
12918,
19936,
15570,
2318,
-12246,
-19794,
-16042,
-3123,
11537,
19583,
16384,
3830,
-10890,
-19345,
-16686,
-4451,
10342,
19213,
17056,
5126,
-9748,
-19050,
-17449,
-5858,
9086,
18817,
17767,
6562,
-8360,
-18452,
-17957,
-7150,
7710,
18119,
18092,
7692,
-7096,
-17795,
-18265,
-8242,
6491,
17490,
18448,
8853,
-5795,
-17097,
-18578,
-9411,
5140,
16718,
18697,
9940,
-4501,
-16374,
-18846,
-10515,
3869,
16052,
19054,
11157,
-3132,
-15639,
-19226,
-11815,
2333,
15127,
19224,
12316,
-1609,
-14580,
-19128,
-12671,
1049,
14136,
19030,
12945,
-601,
-13790,
-19008,
-13260,
143,
13448,
19000,
13593,
373,
-13028,
-18900,
-13864,
-858,
12623,
18783,
14089,
1280,
-12238,
-18688,
-14325,
-1715,
11884,
18645,
14671,
2290,
-11405,
-18526,
-15013,
-2893,
10869,
18366,
15334,
3524,
-10268,
-18145,
-15592,
-4112,
9716,
17974,
15929,
4770,
-9107,
-17792,
-16301,
-5503,
8434,
17531,
16624,
6248,
-7660,
-17155,
-16811,
-6860,
6998,
16791,
16933,
7346,
-6444,
-16518,
-17094,
-7818,
5954,
16346,
17344,
8409,
-5335,
-16039,
-17528,
-8965,
4723,
15691,
17618,
9460,
-4096,
-15259,
-17613,
-9829,
3597,
14944,
17677,
10256,
-3054,
-14605,
-17752,
-10718,
2483,
14254,
17861,
11238,
-1798,
-13761,
-17812,
-11624,
1226,
13347,
17782,
11967,
-704,
-12974,
-17745,
-12286,
270,
12688,
17820,
12693,
249,
-12335,
-17838,
-13062,
-768,
11952,
17785,
13373,
1257,
-11546,
-17667,
-13582,
-1668,
11200,
17587,
13825,
2106,
-10819,
-17491,
-14082,
-2564,
10411,
17378,
14335,
3062,
-9919,
-17170,
-14503,
-3503,
9503,
16996,
14696,
3928,
-9077,
-16837,
-14894,
-4374,
8664,
16707,
15121,
4849,
-8197,
-16481,
-15245,
-5207,
7803,
16279,
15314,
5486,
-7512,
-16146,
-15413,
-5732,
7292,
16114,
15617,
6072,
-7004,
-16059,
-15848,
-6496,
6576,
15842,
15943,
6843,
-6152,
-15558,
-15927,
-7104,
5804,
15293,
15880,
7256,
-5565,
-15178,
-15987,
-7533,
5286,
15067,
16160,
7928,
-4886,
-14884,
-16319,
-8353,
4417,
14607,
16369,
8689,
-3966,
-14332,
-16394,
-8991,
3595,
14085,
16427,
9276,
-3209,
-13834,
-16454,
-9587,
2806,
13527,
16394,
9778,
-2481,
-13269,
-16345,
-9949,
2212,
13069,
16328,
10124,
-1980,
-12955,
-16464,
-10463,
1574,
12718,
16550,
10865,
-1063,
-12363,
-16548,
-11236,
487,
11879,
16386,
11450,
-61,
-11500,
-16290,
-11690,
-349,
11160,
16238,
11934,
747,
-10882,
-16286,
-12324,
-1300,
10471,
16213,
12637,
1811,
-10053,
-16125,
-12954,
-2342,
9569,
15961,
13167,
2805,
-9152,
-15857,
-13450,
-3351,
8627,
15623,
13642,
3842,
-8141,
-15436,
-13869,
-4362,
7600,
15158,
13986,
4770,
-7186,
-15035,
-14282,
-5330,
6668,
14870,
14581,
5954,
-6066,
-14652,
-14899,
-6682,
5308,
14243,
15029,
7264,
-4612,
-13817,
-15113,
-7767,
3979,
13411,
15148,
8202,
-3450,
-13115,
-15288,
-8705,
2855,
12781,
15392,
9204,
-2257,
-12417,
-15451,
-9646,
1671,
12017,
15432,
9977,
-1216,
-11723,
-15479,
-10345,
738,
11403,
15519,
10709,
-241,
-11062,
-15529,
-11084,
-302,
10622,
15416,
11341,
767,
-10206,
-15279,
-11523,
-1149,
9873,
15179,
11727,
1515,
-9565,
-15136,
-11976,
-1920,
9239,
15069,
12226,
2355,
-8840,
-14930,
-12396,
-2713,
8518,
14805,
12547,
3026,
-8227,
-14724,
-12714,
-3352,
7942,
14651,
12914,
3732,
-7565,
-14492,
-13051,
-4099,
7177,
14261,
13087,
4348,
-6877,
-14099,
-13144,
-4582,
6611,
13977,
13242,
4838,
-6379,
-13944,
-13481,
-5252,
5993,
13774,
13623,
5632,
-5581,
-13567,
-13723,
-5982,
5175,
13327,
13747,
6231,
-4892,
-13187,
-13887,
-6559,
4536,
13042,
14033,
6951,
-4130,
-12837,
-14166,
-7367,
3651,
12521,
14176,
7670,
-3229,
-12252,
-14182,
-7924,
2905,
12070,
14268,
8245,
-2544,
-11877,
-14415,
-8645,
2076,
11626,
14497,
9056,
-1567,
-11253,
-14453,
-9348,
1117,
10894,
14366,
9555,
-735,
-10578,
-14284,
-9750,
386,
10270,
14213,
9944,
-41,
-9983,
-14138,
-10138,
-311,
9676,
14056,
10331,
624,
-9426,
-14050,
-10571,
-980,
9180,
14099,
10921,
1483,
-8815,
-14078,
-11281,
-2019,
8369,
13962,
11554,
2560,
-7854,
-13711,
-11674,
-2929,
7466,
13529,
11791,
3262,
-7134,
-13411,
-11948,
-3609,
6829,
13352,
12212,
4070,
-6404,
-13200,
-12429,
-4509,
5970,
13038,
12623,
4968,
-5530,
-12850,
-12806,
-5419,
5097,
12704,
13054,
5954,
-4555,
-12448,
-13216,
-6446,
3993,
12110,
13285,
6863,
-3451,
-11729,
-13241,
-7132,
3053,
11468,
13265,
7436,
-2672,
-11247,
-13357,
-7793,
2252,
11012,
13490,
8246,
-1688,
-10645,
-13486,
-8604,
1189,
10274,
13448,
8905,
-746,
-9939,
-13407,
-9135,
387,
9704,
13457,
9474,
52,
-9406,
-13458,
-9775,
-493,
9065,
13394,
10030,
929,
-8652,
-13204,
-10121,
-1203,
8373,
13087,
10221,
1465,
-8133,
-13018,
-10369,
-1732,
7917,
13000,
10619,
2119,
-7585,
-12926,
-10818,
-2493,
7265,
12840,
11046,
2895,
-6912,
-12740,
-11228,
-3263,
6582,
12644,
11418,
3638,
-6228,
-12477,
-11529,
-3919,
5927,
12301,
11563,
4121,
-5672,
-12150,
-11552,
-4236,
5548,
12109,
11664,
4454,
-5347,
-12065,
-11814,
-4741,
5080,
11978,
11982,
5108,
-4688,
-11736,
-11987,
-5333,
4404,
11552,
12029,
5542,
-4149,
-11419,
-12096,
-5755,
3937,
11388,
12298,
6131,
-3561,
-11214,
-12427,
-6494,
3154,
10963,
12480,
6845,
-2693,
-10627,
-12416,
-7080,
2332,
10372,
12455,
7386,
-1906,
-10078,
-12467,
-7708,
1448,
9771,
12487,
8073,
-934,
-9378,
-12418,
-8341,
498,
9038,
12364,
8604,
-97,
-8739,
-12364,
-8890,
-308,
8461,
12401,
9274,
834,
-8049,
-12331,
-9579,
-1381,
7579,
12172,
9826,
1863,
-7107,
-11982,
-9992,
-2300,
6690,
11862,
10252,
2804,
-6261,
-11774,
-10602,
-3404,
5739,
11640,
10959,
4076,
-5123,
-11421,
-11243,
-4698,
4509,
11179,
11501,
5292,
-3935,
-10940,
-11753,
-5895,
3312,
10644,
11937,
6467,
-2660,
-10257,
-12023,
-6962,
2012,
9789,
11936,
7282,
-1519,
-9414,
-11899,
-7578,
1046,
9050,
11859,
7886,
-585,
-8736,
-11889,
-8296,
17,
8296,
11846,
8651,
543,
-7854,
-11788,
-8995,
-1092,
7426,
11702,
9290,
1577,
-7063,
-11685,
-9663,
-2135,
6622,
11592,
9966,
2643,
-6161,
-11440,
-10183,
-3118,
5686,
11207,
10262,
3444,
-5348,
-11033,
-10388,
-3759,
5008,
10903,
10532,
4119,
-4658,
-10774,
-10763,
-4613,
4134,
10506,
10878,
5051,
-3627,
-10197,
-10937,
-5434,
3144,
9897,
10959,
5732,
-2773,
-9708,
-11092,
-6130,
2338,
9475,
11177,
6483,
-1940,
-9253,
-11258,
-6812,
1517,
8954,
11217,
7030,
-1220,
-8761,
-11258,
-7290,
879,
8538,
11285,
7562,
-510,
-8301,
-11361,
-7935,
-1,
7909,
11285,
8221,
471,
-7520,
-11222,
-8519,
-973,
7110,
11130,
8775,
1419,
-6776,
-11124,
-9162,
-1995,
6315,
11015,
9451,
2502,
-5867,
-10888,
-9711,
-3025,
5356,
10643,
9812,
3362,
-5015,
-10530,
-10029,
-3807,
4584,
10337,
10211,
4256,
-4103,
-10135,
-10415,
-4819,
3446,
9709,
10420,
5245,
-2865,
-9296,
-10415,
-5618,
2336,
8912,
10387,
5932,
-1899,
-8666,
-10501,
-6370,
1401,
8398,
10644,
6853,
-858,
-8106,
-10768,
-7333,
285,
7752,
10830,
7754,
246,
-7423,
-10893,
-8182,
-804,
7028,
10889,
8574,
1395,
-6566,
-10781,
-8870,
-1939,
6066,
10581,
9051,
2380,
-5605,
-10346,
-9168,
-2741,
5222,
10176,
9304,
3115,
-4848,
-10037,
-9501,
-3536,
4431,
9863,
9683,
3995,
-3938,
-9621,
-9790,
-4397,
3503,
9390,
9909,
4780,
-3110,
-9217,
-10086,
-5199,
2678,
9044,
10283,
5678,
-2149,
-8775,
-10410,
-6139,
1619,
8414,
10400,
6452,
-1172,
-8093,
-10362,
-6689,
812,
7824,
10353,
6909,
-480,
-7619,
-10394,
-7211,
86,
7338,
10387,
7482,
305,
-7024,
-10309,
-7680,
-657,
6712,
10209,
7820,
946,
-6471,
-10169,
-8018,
-1264,
6216,
10132,
8231,
1630,
-5905,
-10026,
-8410,
-1975,
5567,
9883,
8507,
2254,
-5294,
-9782,
-8637,
-2524,
5056,
9717,
8808,
2808,
-4812,
-9701,
-9030,
-3194,
4465,
9560,
9163,
3520,
-4130,
-9386,
-9221,
-3758,
3855,
9212,
9239,
3913,
-3675,
-9148,
-9328,
-4136,
3459,
9064,
9462,
4408,
-3175,
-8929,
-9545,
-4702,
2838,
8724,
9597,
4971,
-2487,
-8487,
-9589,
-5204,
2164,
8287,
9648,
5499,
-1777,
-8007,
-9629,
-5739,
1428,
7749,
9628,
5982,
-1058,
-7455,
-9542,
-6133,
814,
7299,
9612,
6401,
-498,
-7124,
-9703,
-6731,
108,
6910,
9804,
7151,
457,
-6479,
-9723,
-7433,
-941,
6046,
9555,
7610,
1347,
-5646,
-9382,
-7731,
-1656,
5387,
9339,
7957,
2021,
-5086,
-9286,
-8197,
-2425,
4734,
9213,
8436,
2882,
-4325,
-9035,
-8609,
-3255,
3939,
8902,
8797,
3694,
-3496,
-8720,
-8991,
-4179,
2996,
8497,
9195,
4737,
-2370,
-8115,
-9275,
-5225,
1748,
7694,
9272,
5613,
-1193,
-7305,
-9265,
-5966,
695,
6974,
9316,
6375,
-172,
-6654,
-9365,
-6785,
-365,
6281,
9366,
7146,
876,
-5890,
-9316,
-7435,
-1333,
5531,
9241,
7686,
1758,
-5172,
-9149,
-7917,
-2185,
4774,
9014,
8111,
2593,
-4364,
-8812,
-8216,
-2930,
4009,
8645,
8350,
3280,
-3660,
-8514,
-8518,
-3658,
3298,
8403,
8749,
4145,
-2817,
-8172,
-8896,
-4587,
2300,
7863,
8928,
4906,
-1874,
-7561,
-8897,
-5135,
1570,
7362,
8922,
5369,
-1284,
-7203,
-9005,
-5656,
955,
6989,
9033,
5907,
-598,
-6733,
-8998,
-6100,
286,
6482,
8941,
6243,
-40,
-6317,
-8956,
-6457,
-236,
6141,
9026,
6767,
638,
-5865,
-9025,
-7042,
-1062,
5502,
8896,
7233,
1427,
-5131,
-8749,
-7322,
-1723,
4867,
8641,
7464,
1997,
-4624,
-8606,
-7669,
-2364,
4302,
8508,
7863,
2753,
-3920,
-8356,
-8018,
-3137,
3525,
8153,
8130,
3479,
-3159,
-7969,
-8261,
-3830,
2766,
7790,
8385,
4225,
-2310,
-7522,
-8454,
-4587,
1863,
7216,
8460,
4867,
-1475,
-6951,
-8457,
-5132,
1121,
6737,
8537,
5475,
-710,
-6495,
-8619,
-5864,
200,
6141,
8601,
6208,
322,
-5714,
-8509,
-6474,
-801,
5287,
8352,
6671,
1195,
-4958,
-8284,
-6920,
-1628,
4594,
8217,
7192,
2096,
-4198,
-8123,
-7471,
-2601,
3749,
7957,
7668,
3035,
-3330,
-7804,
-7872,
-3478,
2906,
7643,
8081,
3930,
-2442,
-7439,
-8233,
-4369,
1951,
7153,
8297,
4728,
-1493,
-6849,
-8265,
-4955,
1186,
6625,
8277,
5176,
-882,
-6451,
-8321,
-5455,
554,
6236,
8366,
5732,
-149,
-5937,
-8320,
-5965,
-231,
5600,
8205,
6115,
535,
-5314,
-8112,
-6261,
-840,
5066,
8087,
6482,
1187,
-4789,
-8061,
-6751,
-1614,
4424,
7947,
6951,
2001,
-4057,
-7804,
-7089,
-2320,
3758,
7686,
7201,
2599,
-3510,
-7628,
-7405,
-2943,
3187,
7521,
7564,
3316,
-2816,
-7351,
-7691,
-3681,
2400,
7071,
7704,
3945,
-2045,
-6850,
-7731,
-4219,
1690,
6616,
7772,
4500,
-1326,
-6388,
-7827,
-4815,
915,
6092,
7777,
5028,
-589,
-5850,
-7762,
-5218,
318,
5657,
7765,
5391,
-85,
-5554,
-7854,
-5665,
-235,
5342,
7870,
5886,
534,
-5124,
-7868,
-6114,
-887,
4833,
7748,
6206,
1094,
-4647,
-7723,
-6363,
-1369,
4408,
7653,
6495,
1634,
-4165,
-7584,
-6670,
-1964,
3827,
7397,
6709,
2181,
-3573,
-7249,
-6765,
-2394,
3328,
7122,
6816,
2577,
-3152,
-7093,
-7001,
-2910,
2838,
6977,
7142,
3259,
-2482,
-6801,
-7272,
-3602,
2094,
6582,
7307,
3876,
-1769,
-6420,
-7423,
-4207,
1399,
6218,
7505,
4540,
-1023,
-5994,
-7580,
-4874,
581,
5675,
7516,
5081,
-251,
-5402,
-7453,
-5242,
-38,
5181,
7416,
5398,
302,
-4991,
-7426,
-5643,
-652,
4709,
7388,
5887,
1050,
-4349,
-7282,
-6076,
-1434,
3996,
7158,
6242,
1797,
-3661,
-7062,
-6451,
-2184,
3329,
6964,
6687,
2627,
-2918,
-6803,
-6839,
-3018,
2506,
6590,
6919,
3315,
-2147,
-6370,
-6955,
-3556,
1861,
6212,
7010,
3819,
-1548,
-6040,
-7090,
-4114,
1186,
5794,
7107,
4393,
-805,
-5501,
-7074,
-4610,
452,
5244,
7029,
4810,
-149,
-5034,
-7056,
-5077,
-189,
4800,
7075,
5346,
573,
-4525,
-7051,
-5573,
-929,
4232,
6962,
5718,
1207,
-3990,
-6906,
-5856,
-1454,
3813,
6906,
6061,
1748,
-3592,
-6897,
-6290,
-2095,
3272,
6796,
6435,
2442,
-2933,
-6606,
-6502,
-2692,
2629,
6436,
6540,
2908,
-2384,
-6298,
-6613,
-3141,
2128,
6172,
6707,
3421,
-1800,
-5985,
-6731,
-3649,
1502,
5762,
6701,
3812,
-1265,
-5590,
-6694,
-3937,
1087,
5493,
6756,
4146,
-846,
-5373,
-6833,
-4392,
557,
5188,
6868,
4624,
-231,
-4953,
-6845,
-4814,
-47,
4736,
6803,
4983,
327,
-4532,
-6793,
-5195,
-641,
4275,
6750,
5391,
970,
-3970,
-6634,
-5511,
-1262,
3693,
6501,
5598,
1488,
-3456,
-6416,
-5694,
-1720,
3248,
6381,
5885,
2051,
-2952,
-6279,
-6047,
-2390,
2600,
6118,
6153,
2717,
-2245,
-5900,
-6186,
-2942,
1967,
5756,
6265,
3204,
-1717,
-5655,
-6409,
-3523,
1366,
5509,
6534,
3882,
-964,
-5269,
-6582,
-4185,
561,
4972,
6539,
4400,
-220,
-4710,
-6511,
-4614,
-107,
4477,
6505,
4865,
463,
-4196,
-6504,
-5143,
-886,
3859,
6430,
5391,
1325,
-3463,
-6282,
-5536,
-1684,
3122,
6154,
5722,
2067,
-2736,
-5987,
-5837,
-2389,
2405,
5832,
5965,
2738,
-2023,
-5600,
-5984,
-2938,
1783,
5507,
6098,
3210,
-1510,
-5390,
-6197,
-3479,
1261,
5311,
6375,
3846,
-845,
-5059,
-6388,
-4124,
481,
4762,
6332,
4292,
-161,
-4466,
-6189,
-4332,
-18,
4317,
6169,
4487,
246,
-4137,
-6150,
-4662,
-517,
3939,
6168,
4929,
915,
-3588,
-6026,
-5042,
-1201,
3319,
5936,
5183,
1500,
-3039,
-5824,
-5298,
-1731,
2839,
5824,
5529,
2072,
-2551,
-5747,
-5688,
-2389,
2256,
5638,
5812,
2690,
-1958,
-5480,
-5880,
-2902,
1722,
5386,
5978,
3171,
-1434,
-5214,
-6026,
-3415,
1136,
5018,
6044,
3638,
-801,
-4748,
-5950,
-3754,
571,
4541,
5899,
3862,
-379,
-4391,
-5883,
-3986,
200,
4283,
5939,
4200,
75,
-4097,
-5938,
-4388,
-346,
3904,
5908,
4548,
590,
-3686,
-5857,
-4657,
-790,
3543,
5861,
4816,
1024,
-3358,
-5850,
-4984,
-1286,
3149,
5791,
5127,
1553,
-2893,
-5685,
-5219,
-1781,
2657,
5576,
5302,
1993,
-2427,
-5488,
-5409,
-2267,
2145,
5328,
5495,
2547,
-1829,
-5150,
-5533,
-2796,
1511,
4918,
5511,
2942,
-1304,
-4805,
-5569,
-3158,
1061,
4708,
5678,
3417,
-800,
-4596,
-5823,
-3759,
397,
4342,
5797,
3996,
-65,
-4058,
-5735,
-4154,
-231,
3785,
5630,
4231,
420,
-3641,
-5641,
-4431,
-709,
3430,
5621,
4628,
1013,
-3202,
-5626,
-4907,
-1441,
2824,
5486,
5052,
1766,
-2518,
-5393,
-5247,
-2171,
2114,
5202,
5357,
2512,
-1760,
-5038,
-5503,
-2905,
1290,
4722,
5469,
3121,
-968,
-4495,
-5477,
-3354,
649,
4262,
5447,
3513,
-434,
-4158,
-5558,
-3843,
59,
3912,
5574,
4072,
286,
-3686,
-5566,
-4328,
-660,
3349,
5438,
4419,
890,
-3160,
-5407,
-4583,
-1153,
2926,
5351,
4734,
1417,
-2721,
-5336,
-4955,
-1789,
2359,
5156,
5044,
2073,
-2046,
-4999,
-5115,
-2350,
1724,
4784,
5112,
2533,
-1490,
-4664,
-5192,
-2769,
1200,
4492,
5216,
2976,
-941,
-4339,
-5258,
-3199,
678,
4164,
5263,
3368,
-452,
-4017,
-5312,
-3589,
180,
3852,
5344,
3816,
139,
-3614,
-5314,
-4002,
-437,
3343,
5196,
4081,
644,
-3146,
-5115,
-4154,
-801,
3000,
5085,
4242,
961,
-2900,
-5119,
-4439,
-1228,
2684,
5063,
4569,
1475,
-2451,
-4971,
-4646,
-1689,
2217,
4831,
4673,
1829,
-2052,
-4776,
-4776,
-2053,
1843,
4711,
4916,
2325,
-1584,
-4605,
-5030,
-2633,
1233,
4381,
5031,
2838,
-960,
-4194,
-5027,
-2991,
736,
4024,
5012,
3103,
-588,
-3953,
-5082,
-3294,
370,
3822,
5080,
3438,
-174,
-3693,
-5092,
-3582,
-24,
3531,
5061,
3698,
206,
-3404,
-5093,
-3875,
-465,
3215,
5066,
4054,
744,
-2976,
-5011,
-4223,
-1071,
2649,
4853,
4278,
1297,
-2403,
-4715,
-4328,
-1480,
2205,
4626,
4411,
1667,
-2013,
-4577,
-4527,
-1913,
1785,
4479,
4640,
2176,
-1507,
-4329,
-4684,
-2389,
1270,
4198,
4767,
2634,
-984,
-4041,
-4811,
-2874,
694,
3864,
4873,
3134,
-329,
-3591,
-4794,
-3301,
42,
3338,
4703,
3403,
166,
-3125,
-4632,
-3463,
-297,
3063,
4702,
3655,
520,
-2944,
-4753,
-3876,
-790,
2756,
4777,
4110,
1151,
-2451,
-4639,
-4202,
-1377,
2210,
4538,
4284,
1601,
-1970,
-4412,
-4319,
-1769,
1803,
4355,
4450,
2027,
-1540,
-4217,
-4509,
-2229,
1302,
4108,
4594,
2500,
-1008,
-3934,
-4635,
-2690,
768,
3811,
4719,
2973,
-437,
-3586,
-4696,
-3158,
157,
3368,
4659,
3310,
105,
-3135,
-4569,
-3377,
-260,
3020,
4571,
3544,
494,
-2856,
-4588,
-3728,
-748,
2680,
4608,
3961,
1097,
-2363,
-4491,
-4065,
-1350,
2112,
4370,
4122,
1546,
-1908,
-4238,
-4149,
-1662,
1787,
4224,
4265,
1862,
-1599,
-4164,
-4340,
-2057,
1396,
4052,
4399,
2261,
-1155,
-3885,
-4375,
-2366,
986,
3762,
4391,
2515,
-791,
-3634,
-4402,
-2661,
589,
3499,
4444,
2866,
-312,
-3286,
-4364,
-2956,
124,
3112,
4327,
3059,
56,
-2979,
-4305,
-3164,
-203,
2904,
4355,
3352,
429,
-2743,
-4367,
-3533,
-674,
2554,
4338,
3663,
906,
-2347,
-4263,
-3732,
-1067,
2220,
4246,
3867,
1276,
-2054,
-4217,
-3994,
-1501,
1853,
4158,
4122,
1770,
-1567,
-3988,
-4126,
-1935,
1349,
3831,
4130,
2054,
-1179,
-3719,
-4122,
-2174,
1035,
3654,
4206,
2373,
-823,
-3542,
-4273,
-2595,
554,
3381,
4300,
2804,
-273,
-3194,
-4312,
-2989,
11,
3008,
4307,
3172,
262,
-2814,
-4298,
-3376,
-567,
2546,
4222,
3529,
849,
-2284,
-4121,
-3613,
-1091,
2037,
3987,
3669,
1264,
-1862,
-3936,
-3788,
-1496,
1634,
3847,
3895,
1740,
-1397,
-3751,
-3989,
-1988,
1111,
3567,
3987,
2151,
-915,
-3460,
-4022,
-2310,
736,
3363,
4089,
2472,
-549,
-3289,
-4170,
-2702,
274,
3105,
4164,
2876,
-35,
-2909,
-4119,
-2977,
-178,
2714,
4012,
3027,
302,
-2589,
-3994,
-3123,
-459,
2453,
3977,
3232,
676,
-2277,
-3913,
-3328,
-860,
2095,
3843,
3406,
1027,
-1926,
-3760,
-3445,
-1150,
1806,
3744,
3541,
1313,
-1673,
-3713,
-3634,
-1485,
1524,
3652,
3702,
1628,
-1384,
-3569,
-3711,
-1701,
1293,
3537,
3731,
1759,
-1245,
-3537,
-3801,
-1871,
1134,
3487,
3841,
1996,
-980,
-3368,
-3815,
-2093,
825,
3218,
3745,
2109,
-729,
-3133,
-3703,
-2138,
671,
3105,
3751,
2241,
-557,
-3052,
-3817,
-2401,
374,
2945,
3834,
2537,
-201,
-2810,
-3802,
-2609,
74,
2719,
3800,
2681,
15,
-2676,
-3849,
-2823,
-184,
2574,
3880,
2981,
391,
-2419,
-3862,
-3116,
-620,
2206,
3747,
3158,
757,
-2049,
-3659,
-3185,
-865,
1936,
3628,
3236,
984,
-1846,
-3640,
-3351,
-1162,
1707,
3578,
3415,
1282,
-1582,
-3546,
-3487,
-1430,
1437,
3481,
3503,
1506,
-1367,
-3471,
-3602,
-1678,
1189,
3378,
3631,
1821,
-1029,
-3283,
-3670,
-1984,
805,
3107,
3623,
2073,
-652,
-2993,
-3624,
-2195,
456,
2838,
3603,
2314,
-282,
-2691,
-3602,
-2439,
70,
2534,
3532,
2504,
58,
-2433,
-3522,
-2595,
-161,
2377,
3582,
2726,
303,
-2332,
-3669,
-2929,
-518,
2187,
3679,
3075,
737,
-2015,
-3610,
-3153,
-898,
1845,
3522,
3158,
992,
-1737,
-3460,
-3198,
-1087,
1638,
3435,
3268,
1256,
-1476,
-3358,
-3327,
-1423,
1277,
3234,
3341,
1553,
-1101,
-3112,
-3324,
-1633,
998,
3056,
3379,
1761,
-866,
-3019,
-3453,
-1923,
712,
2947,
3519,
2097,
-510,
-2805,
-3502,
-2189,
352,
2696,
3483,
2273,
-244,
-2593,
-3473,
-2351,
121,
2527,
3509,
2488,
65,
-2389,
-3475,
-2603,
-238,
2237,
3436,
2686,
391,
-2104,
-3391,
-2732,
-503,
2036,
3405,
2846,
652,
-1924,
-3446,
-3014,
-874,
1765,
3414,
3147,
1104,
-1545,
-3312,
-3190,
-1282,
1343,
3179,
3198,
1381,
-1199,
-3093,
-3208,
-1488,
1079,
3028,
3231,
1599,
-946,
-2941,
-3245,
-1677,
840,
2875,
3254,
1758,
-747,
-2824,
-3261,
-1830,
674,
2808,
3357,
1987,
-516,
-2745,
-3419,
-2176,
286,
2588,
3432,
2350,
-21,
-2364,
-3341,
-2438,
-157,
2188,
3298,
2531,
333,
-2036,
-3251,
-2605,
-482,
1931,
3272,
2767,
705,
-1753,
-3232,
-2879,
-905,
1579,
3158,
2954,
1081,
-1401,
-3084,
-3001,
-1231,
1247,
3019,
3099,
1442,
-1020,
-2896,
-3152,
-1639,
767,
2723,
3162,
1822,
-511,
-2544,
-3126,
-1954,
315,
2403,
3141,
2092,
-141,
-2313,
-3215,
-2305,
-101,
2175,
3254,
2519,
370,
-1983,
-3240,
-2672,
-627,
1752,
3118,
2714,
765,
-1599,
-3049,
-2753,
-901,
1459,
2980,
2803,
1039,
-1322,
-2944,
-2912,
-1256,
1095,
2818,
2955,
1446,
-872,
-2685,
-2997,
-1618,
661,
2556,
3021,
1766,
-475,
-2467,
-3077,
-1971,
253,
2326,
3105,
2133,
-26,
-2181,
-3102,
-2270,
-168,
2017,
3039,
2326,
297,
-1915,
-3028,
-2417,
-432,
1809,
3030,
2541,
611,
-1669,
-3018,
-2675,
-846,
1449,
2926,
2763,
1057,
-1232,
-2817,
-2823,
-1246,
1038,
2719,
2885,
1423,
-856,
-2645,
-2962,
-1612,
643,
2524,
2991,
1773,
-440,
-2393,
-2985,
-1869,
303,
2302,
2984,
1946,
-213,
-2273,
-3044,
-2075,
91,
2236,
3139,
2267,
112,
-2113,
-3165,
-2447,
-353,
1913,
3097,
2534,
551,
-1705,
-2967,
-2537,
-664,
1576,
2914,
2584,
783,
-1451,
-2866,
-2651,
-928,
1326,
2831,
2746,
1123,
-1115,
-2704,
-2758,
-1245,
955,
2600,
2738,
1338,
-829,
-2514,
-2752,
-1416,
732,
2483,
2830,
1586,
-571,
-2405,
-2896,
-1757,
375,
2294,
2922,
1928,
-156,
-2129,
-2889,
-2007,
13,
2024,
2878,
2113,
142,
-1896,
-2858,
-2171,
-251,
1812,
2839,
2231,
357,
-1720,
-2788,
-2244,
-395,
1692,
2796,
2308,
467,
-1641,
-2826,
-2378,
-566,
1585,
2853,
2514,
763,
-1424,
-2779,
-2572,
-898,
1253,
2704,
2609,
1056,
-1084,
-2579,
-2593,
-1138,
979,
2533,
2663,
1276,
-807,
-2443,
-2677,
-1414,
659,
2355,
2710,
1552,
-477,
-2217,
-2683,
-1599,
389,
2177,
2718,
1696,
-303,
-2140,
-2781,
-1834,
172,
2109,
2868,
2030,
66,
-1936,
-2834,
-2144,
-261,
1739,
2731,
2166,
384,
-1587,
-2609,
-2135,
-430,
1518,
2580,
2156,
489,
-1465,
-2589,
-2220,
-578,
1402,
2593,
2322,
733,
-1274,
-2542,
-2367,
-851,
1158,
2507,
2420,
969,
-1049,
-2451,
-2478,
-1086,
941,
2430,
2561,
1241,
-786,
-2356,
-2585,
-1336,
679,
2299,
2609,
1412,
-598,
-2267,
-2640,
-1482,
546,
2279,
2710,
1589,
-467,
-2254,
-2765,
-1708,
333,
2184,
2786,
1822,
-172,
-2056,
-2750,
-1876,
60,
1942,
2723,
1942,
68,
-1831,
-2674,
-2008,
-208,
1706,
2642,
2077,
329,
-1583,
-2586,
-2113,
-441,
1497,
2569,
2168,
508,
-1447,
-2599,
-2258,
-623,
1391,
2622,
2369,
775,
-1270,
-2582,
-2438,
-902,
1108,
2460,
2377,
938,
-1025,
-2352,
-2304,
-898,
1018,
2334,
2276,
880,
-1050,
-2390,
-2371,
-989,
974,
2396,
2478,
1161,
-815,
-2322,
-2533,
-1325,
603,
2170,
2482,
1384,
-508,
-2088,
-2470,
-1425,
437,
2029,
2460,
1470,
-374,
-2023,
-2523,
-1586,
251,
1932,
2507,
1649,
-156,
-1867,
-2507,
-1724,
36,
1758,
2498,
1791,
68,
-1705,
-2509,
-1915,
-225,
1584,
2495,
2004,
357,
-1478,
-2481,
-2085,
-505,
1353,
2456,
2132,
604,
-1293,
-2470,
-2250,
-757,
1179,
2459,
2349,
904,
-1055,
-2440,
-2452,
-1106,
845,
2315,
2468,
1227,
-694,
-2223,
-2497,
-1353,
515,
2091,
2468,
1436,
-410,
-2029,
-2501,
-1576,
226,
1872,
2442,
1616,
-119,
-1780,
-2419,
-1664,
28,
1687,
2357,
1648,
-21,
-1707,
-2443,
-1773,
-111,
1653,
2476,
1919,
272,
-1522,
-2470,
-2054,
-500,
1302,
2353,
2066,
643,
-1131,
-2240,
-2068,
-732,
1001,
2150,
2065,
790,
-948,
-2148,
-2126,
-897,
864,
2131,
2199,
991,
-779,
-2128,
-2270,
-1105,
694,
2113,
2310,
1182,
-633,
-2127,
-2425,
-1356,
486,
2051,
2451,
1493,
-321,
-1920,
-2436,
-1581,
136,
1733,
2330,
1593,
-29,
-1596,
-2246,
-1579,
-29,
1533,
2219,
1627,
117,
-1472,
-2232,
-1727,
-264,
1362,
2217,
1831,
416,
-1224,
-2175,
-1897,
-546,
1103,
2135,
1938,
644,
-1026,
-2132,
-2024,
-765,
945,
2138,
2106,
902,
-838,
-2095,
-2170,
-1024,
720,
2025,
2175,
1076,
-649,
-2000,
-2187,
-1124,
624,
1999,
2262,
1208,
-538,
-1985,
-2300,
-1307,
431,
1933,
2343,
1422,
-295,
-1819,
-2300,
-1463,
187,
1742,
2290,
1532,
-79,
-1656,
-2284,
-1617,
-27,
1583,
2305,
1740,
196,
-1434,
-2253,
-1792,
-324,
1329,
2230,
1871,
452,
-1229,
-2222,
-1964,
-600,
1117,
2219,
2089,
793,
-934,
-2130,
-2134,
-942,
750,
2010,
2116,
1037,
-605,
-1880,
-2059,
-1052,
557,
1858,
2076,
1117,
-512,
-1850,
-2141,
-1221,
422,
1839,
2253,
1400,
-222,
-1715,
-2231,
-1489,
79,
1602,
2197,
1550,
25,
-1502,
-2165,
-1564,
-69,
1485,
2200,
1665,
186,
-1409,
-2186,
-1759,
-327,
1290,
2164,
1833,
479,
-1122,
-2065,
-1821,
-556,
1021,
1994,
1823,
604,
-951,
-1960,
-1837,
-652,
909,
1971,
1907,
762,
-834,
-1948,
-1964,
-837,
766,
1947,
2028,
946,
-671,
-1910,
-2071,
-1036,
581,
1879,
2123,
1158,
-450,
-1798,
-2129,
-1241,
332,
1716,
2112,
1297,
-249,
-1649,
-2105,
-1336,
200,
1612,
2123,
1407,
-87,
-1550,
-2106,
-1481,
-14,
1441,
2058,
1512,
115,
-1308,
-1953,
-1437,
-91,
1300,
1912,
1404,
55,
-1338,
-1956,
-1427,
-53,
1391,
2062,
1580,
177,
-1323,
-2091,
-1678,
-304,
1228,
2078,
1738,
425,
-1104,
-1985,
-1703,
-442,
1087,
2000,
1776,
528,
-1013,
-1973,
-1809,
-592,
951,
1985,
1890,
748,
-798,
-1885,
-1884,
-810,
721,
1811,
1877,
873,
-632,
-1749,
-1867,
-885,
614,
1771,
1925,
977,
-528,
-1735,
-1926,
-1023,
488,
1730,
1986,
1106,
-401,
-1674,
-1961,
-1110,
398,
1687,
2024,
1209,
-296,
-1624,
-2000,
-1245,
239,
1576,
2008,
1303,
-136,
-1478,
-1943,
-1272,
135,
1466,
1942,
1308,
-82,
-1433,
-1964,
-1372,
19,
1408,
2017,
1489,
136,
-1277,
-1969,
-1535,
-262,
1159,
1887,
1545,
328,
-1065,
-1839,
-1556,
-374,
1020,
1839,
1610,
465,
-959,
-1836,
-1698,
-585,
849,
1811,
1740,
691,
-755,
-1746,
-1750,
-744,
689,
1736,
1765,
770,
-683,
-1748,
-1815,
-817,
655,
1781,
1884,
914,
-585,
-1757,
-1927,
-998,
496,
1701,
1931,
1055,
-411,
-1650,
-1937,
-1126,
316,
1590,
1959,
1216,
-204,
-1503,
-1955,
-1314,
49,
1377,
1905,
1358,
40,
-1278,
-1856,
-1358,
-75,
1216,
1809,
1339,
83,
-1230,
-1854,
-1409,
-146,
1221,
1902,
1507,
238,
-1167,
-1927,
-1601,
-369,
1061,
1900,
1657,
465,
-993,
-1893,
-1720,
-581,
889,
1855,
1756,
678,
-796,
-1812,
-1805,
-777,
667,
1707,
1751,
788,
-612,
-1634,
-1712,
-795,
570,
1581,
1667,
780,
-560,
-1591,
-1724,
-877,
461,
1520,
1721,
944,
-369,
-1477,
-1770,
-1068,
226,
1384,
1745,
1105,
-181,
-1392,
-1836,
-1237,
75,
1347,
1854,
1309,
-8,
-1332,
-1913,
-1419,
-118,
1205,
1818,
1358,
109,
-1205,
-1813,
-1343,
-110,
1190,
1768,
1301,
57,
-1241,
-1850,
-1413,
-175,
1146,
1818,
1451,
280,
-1060,
-1798,
-1541,
-437,
890,
1691,
1530,
500,
-835,
-1697,
-1618,
-615,
733,
1682,
1674,
707,
-687,
-1696,
-1781,
-848,
560,
1639,
1782,
896,
-509,
-1617,
-1798,
-949,
443,
1569,
1777,
960,
-404,
-1538,
-1794,
-1036,
299,
1457,
1761,
1071,
-218,
-1365,
-1716,
-1090,
153,
1291,
1684,
1104,
-102,
-1266,
-1711,
-1181,
36,
1239,
1757,
1302,
105,
-1139,
-1751,
-1372,
-238,
1016,
1688,
1391,
321,
-912,
-1608,
-1367,
-337,
882,
1604,
1382,
384,
-860,
-1605,
-1431,
-443,
820,
1609,
1498,
534,
-729,
-1581,
-1538,
-628,
653,
1547,
1578,
710,
-555,
-1500,
-1594,
-792,
452,
1429,
1602,
878,
-314,
-1320,
-1559,
-935,
215,
1210,
1492,
927,
-159,
-1134,
-1456,
-925,
152,
1144,
1497,
974,
-102,
-1152,
-1555,
-1079,
33,
1138,
1634,
1191,
64,
-1108,
-1676,
-1289,
-160,
1077,
1716,
1381,
255,
-1041,
-1742,
-1484,
-378,
922,
1702,
1516,
482,
-789,
-1580,
-1471,
-538,
658,
1435,
1362,
502,
-639,
-1376,
-1318,
-484,
615,
1359,
1328,
536,
-584,
-1379,
-1431,
-675,
454,
1332,
1476,
796,
-345,
-1275,
-1501,
-864,
268,
1253,
1514,
898,
-247,
-1269,
-1564,
-956,
222,
1276,
1613,
1006,
-163,
-1256,
-1617,
-1057,
108,
1185,
1573,
1053,
-60,
-1117,
-1535,
-1066,
3,
1060,
1505,
1102,
91,
-960,
-1474,
-1166,
-205,
857,
1448,
1206,
297,
-796,
-1430,
-1260,
-343,
800,
1502,
1359,
411,
-814,
-1602,
-1478,
-495,
789,
1647,
1565,
593,
-689,
-1539,
-1482,
-578,
625,
1402,
1334,
481,
-604,
-1306,
-1210,
-425,
578,
1227,
1180,
489,
-456,
-1145,
-1243,
-699,
196,
995,
1283,
885,
-15,
-947,
-1383,
-1037,
-35,
1058,
1592,
1142,
-72,
-1375,
-1913,
-1306,
169,
1584,
2090,
1332,
-182,
-1457,
-1680,
-793,
448,
1019,
460,
-814,
-1613,
-901,
1271,
3552,
4163,
2055,
-2183,
-6368,
-7883,
-5290,
720,
7423,
11311,
10045,
3775,
-4830,
-11825,
-13920,
-10113,
-1970,
7335,
14189,
15786,
11238,
2007,
-8554,
-16458,
-18517,
-13462,
-2716,
9963,
19543,
21875,
15419,
2309,
-12365,
-22652,
-24231,
-16173,
-1376,
14319,
24508,
25067,
15919,
704,
-14705,
-24560,
-25182,
-16280,
-1187,
14419,
24621,
25651,
17132,
2141,
-13857,
-24817,
-26405,
-17888,
-2486,
13930,
25068,
26703,
18184,
2760,
-13717,
-24942,
-26593,
-18086,
-2765,
13421,
24322,
25913,
17763,
3033,
-12652,
-23264,
-24882,
-17180,
-3394,
11211,
21321,
23478,
17102,
4802,
-8872,
-19112,
-22466,
-17903,
-7061,
6299,
17538,
22666,
19699,
9514,
-4353,
-16857,
-23332,
-21233,
-11158,
3242,
16599,
23858,
22230,
12226,
-2397,
-16136,
-23829,
-22624,
-12974,
1536,
15400,
23399,
22628,
13535,
-484,
-14156,
-22432,
-22315,
-14038,
-826,
12421,
21006,
21999,
15227,
3107,
-10105,
-19807,
-22570,
-17244,
-5620,
8328,
19621,
24025,
19609,
7666,
-7535,
-20262,
-25590,
-21232,
-8666,
7470,
20952,
26562,
22034,
9066,
-7393,
-21025,
-26623,
-22129,
-9304,
6936,
20369,
25990,
21856,
9720,
-5798,
-18945,
-24910,
-21673,
-10572,
4143,
17106,
23673,
21614,
11773,
-2162,
-15123,
-22515,
-21768,
-13262,
-56,
13079,
21487,
22209,
14985,
2335,
-11249,
-20855,
-23007,
-16772,
-4271,
9997,
20712,
23812,
18022,
5401,
-9346,
-20590,
-24028,
-18359,
-5827,
8728,
19739,
23158,
17923,
6262,
-7335,
-17870,
-21640,
-17561,
-7365,
5128,
15475,
20165,
17741,
9168,
-2468,
-13131,
-19170,
-18520,
-11374,
-174,
11245,
18806,
19753,
13565,
2318,
-10003,
-18885,
-20928,
-15203,
-3711,
9311,
18932,
21479,
15994,
4541,
-8538,
-18339,
-21247,
-16258,
-5386,
7274,
17054,
20474,
16446,
6588,
-5454,
-15385,
-19721,
-16995,
-8232,
3403,
13742,
19154,
17721,
9958,
-1384,
-12277,
-18830,
-18681,
-11767,
-512,
11096,
18800,
19755,
13452,
2095,
-10242,
-18950,
-20717,
-14769,
-3222,
9654,
18976,
21229,
15531,
4042,
-8921,
-18509,
-21143,
-15929,
-4911,
7750,
17367,
20495,
16180,
6131,
-5914,
-15647,
-19700,
-16758,
-7955,
3554,
13742,
19097,
17766,
10157,
-1119,
-12157,
-19034,
-19209,
-12450,
-995,
11060,
19290,
20530,
14160,
2363,
-10505,
-19597,
-21438,
-15240,
-3290,
9873,
19299,
21444,
15585,
4004,
-8887,
-18323,
-20896,
-15822,
-5126,
7195,
16661,
19989,
16171,
6685,
-5036,
-14858,
-19386,
-17056,
-8711,
2730,
13228,
19101,
18186,
10722,
-740,
-12107,
-19264,
-19497,
-12573,
-862,
11370,
19579,
20591,
13891,
1884,
-10974,
-19812,
-21239,
-14667,
-2554,
10499,
19507,
21128,
14857,
3173,
-9505,
-18444,
-20492,
-15063,
-4339,
7716,
16776,
19732,
15673,
6126,
-5509,
-15140,
-19436,
-16874,
-8289,
3319,
13868,
19549,
18240,
10278,
-1578,
-13053,
-19918,
-19534,
-11911,
257,
12495,
20204,
20420,
12985,
624,
-12041,
-20210,
-20807,
-13616,
-1367,
11289,
19625,
20571,
13898,
2220,
-10081,
-18469,
-20013,
-14295,
-3566,
8257,
16920,
19437,
15031,
5340,
-6174,
-15479,
-19313,
-16296,
-7430,
4221,
14495,
19669,
17732,
9229,
-2850,
-14104,
-20283,
-18977,
-10502,
2071,
14009,
20743,
19646,
11109,
-1657,
-13774,
-20652,
-19702,
-11361,
1156,
13079,
19967,
19350,
11612,
-248,
-11787,
-18824,
-18932,
-12211,
-1207,
10076,
17617,
18802,
13292,
3047,
-8279,
-16679,
-19159,
-14744,
-4927,
6845,
16291,
19913,
16205,
6385,
-5997,
-16342,
-20682,
-17245,
-7226,
5647,
16450,
21034,
17627,
7553,
-5348,
-16131,
-20761,
-17553,
-7839,
4656,
15216,
19990,
17375,
8474,
-3347,
-13776,
-19106,
-17520,
-9662,
1606,
12259,
18506,
18134,
11224,
230,
-10973,
-18314,
-19055,
-12816,
-1749,
10140,
18439,
19984,
14087,
2835,
-9616,
-18572,
-20606,
-14869,
-3497,
9245,
18522,
20791,
15249,
4010,
-8652,
-17959,
-20452,
-15305,
-4550,
7709,
16944,
19831,
15452,
5544,
-6205,
-15549,
-19187,
-15924,
-6974,
4431,
14255,
18985,
16922,
8724,
-2720,
-13322,
-19202,
-18108,
-10287,
1505,
12938,
19705,
19178,
11422,
-747,
-12743,
-20006,
-19732,
-11978,
300,
12463,
19869,
19764,
12271,
284,
-11654,
-19105,
-19421,
-12603,
-1320,
10260,
17938,
19042,
13324,
2918,
-8410,
-16662,
-18958,
-14501,
-4876,
6553,
15708,
19305,
15974,
6793,
-5007,
-15161,
-19893,
-17327,
-8262,
4029,
14979,
20415,
18248,
9184,
-3387,
-14710,
-20504,
-18571,
-9659,
2853,
14215,
20145,
18535,
10048,
-2023,
-13182,
-19312,
-18265,
-10577,
828,
11759,
18296,
18190,
11586,
913,
-10005,
-17304,
-18436,
-12998,
-2873,
8367,
16735,
19166,
14682,
4758,
-7067,
-16499,
-19976,
-16074,
-6113,
6281,
16459,
20545,
16955,
7004,
-5578,
-16057,
-20488,
-17257,
-7635,
4709,
15167,
19892,
17270,
8390,
-3373,
-13718,
-18924,
-17265,
-9453,
1625,
11963,
17956,
17535,
10911,
444,
-10185,
-17227,
-18165,
-12592,
-2413,
8787,
16968,
19064,
14199,
3989,
-7884,
-16992,
-19877,
-15319,
-4957,
7391,
17024,
20290,
15890,
5523,
-6905,
-16671,
-20122,
-16035,
-6008,
6133,
15841,
19569,
16080,
6783,
-4814,
-14494,
-18802,
-16294,
-7990,
3077,
12951,
18177,
16942,
9685,
-1010,
-11420,
-17828,
-17909,
-11537,
-895,
10253,
17860,
19026,
13235,
2423,
-9440,
-17957,
-19872,
-14367,
-3432,
8848,
17845,
20164,
14943,
4177,
-8063,
-17202,
-19854,
-15174,
-4989,
6854,
16004,
19193,
15417,
6152,
-5170,
-14489,
-18540,
-15971,
-7754,
3188,
12959,
18129,
16860,
9570,
-1204,
-11660,
-18039,
-17983,
-11379,
-515,
10703,
18152,
19013,
12837,
1818,
-10035,
-18252,
-19744,
-13855,
-2763,
9392,
18009,
19875,
14325,
3483,
-8542,
-17277,
-19541,
-14624,
-4451,
7159,
15992,
18912,
15002,
5793,
-5369,
-14503,
-18412,
-15759,
-7541,
3372,
13087,
18169,
16775,
9336,
-1556,
-12015,
-18254,
-17911,
-10997,
66,
11260,
18407,
18803,
12173,
934,
-10766,
-18487,
-19322,
-12900,
-1639,
10204,
18151,
19253,
13169,
2255,
-9349,
-17342,
-18832,
-13435,
-3215,
7983,
16127,
18326,
13924,
4584,
-6324,
-14902,
-18145,
-14898,
-6311,
4583,
13897,
18279,
16074,
7974,
-3164,
-13312,
-18705,
-17258,
-9369,
2130,
12973,
19055,
18033,
10219,
-1483,
-12656,
-19076,
-18313,
-10673,
892,
12028,
18546,
18091,
10964,
-93,
-10933,
-17591,
-17742,
-11468,
-1169,
9405,
16464,
17571,
12382,
2817,
-7742,
-15530,
-17786,
-13668,
-4581,
6254,
14971,
18330,
15025,
6154,
-5141,
-14682,
-18906,
-16143,
-7313,
4341,
14480,
19239,
16827,
8094,
-3663,
-14027,
-19110,
-17048,
-8676,
2827,
13150,
18496,
16989,
9308,
-1635,
-11833,
-17608,
-16966,
-10249,
70,
10260,
16716,
17187,
11518,
1733,
-8711,
-16091,
-17736,
-12986,
-3462,
7456,
15793,
18453,
14340,
4869,
-6559,
-15697,
-19074,
-15347,
-5801,
6000,
15579,
19338,
15805,
6341,
-5472,
-15142,
-19053,
-15805,
-6719,
4736,
14245,
18347,
15668,
7328,
-3526,
-12913,
-17503,
-15717,
-8327,
1987,
11523,
16918,
16238,
9734,
-327,
-10356,
-16722,
-17074,
-11169,
-1045,
9645,
16924,
18020,
12389,
2022,
-9257,
-17156,
-18666,
-13106,
-2554,
9001,
17178,
18850,
13412,
2974,
-8499,
-16673,
-18520,
-13466,
-3510,
7595,
15737,
17995,
13688,
4486,
-6217,
-14550,
-17557,
-14240,
-5813,
4672,
13495,
17465,
15153,
7336,
-3228,
-12717,
-17673,
-16187,
-8734,
2046,
12201,
17943,
17088,
9845,
-1141,
-11805,
-18108,
-17674,
-10625,
430,
11331,
17971,
17885,
11131,
285,
-10564,
-17396,
-17707,
-11499,
-1157,
9446,
16466,
17412,
12053,
2444,
-7937,
-15365,
-17240,
-12931,
-4004,
6379,
14503,
17464,
14131,
5634,
-5006,
-13972,
-17897,
-15282,
-6957,
4056,
13699,
18334,
16172,
7941,
-3291,
-13355,
-18428,
-16601,
-8573,
2649,
12815,
18146,
16690,
9083,
-1798,
-11855,
-17422,
-16513,
-9611,
690,
10575,
16508,
16423,
10467,
825,
-9026,
-15613,
-16593,
-11658,
-2494,
7638,
15111,
17203,
13031,
4025,
-6634,
-15015,
-17944,
-14211,
-5084,
6089,
15101,
18497,
14912,
5680,
-5742,
-14981,
-18536,
-15102,
-6003,
5235,
14381,
18054,
14986,
6467,
-4276,
-13268,
-17285,
-15001,
-7353,
2817,
11864,
16593,
15369,
8659,
-1149,
-10571,
-16270,
-16140,
-10186,
-455,
9581,
16243,
17023,
11551,
1711,
-8904,
-16341,
-17777,
-12610,
-2685,
8291,
16215,
18110,
13257,
3482,
-7536,
-15716,
-18017,
-13689,
-4372,
6407,
14717,
17569,
14016,
5463,
-4931,
-13424,
-17010,
-14502,
-6864,
3171,
12020,
16553,
15199,
8409,
-1408,
-10789,
-16359,
-16081,
-9969,
-166,
9815,
16321,
16902,
11272,
1395,
-9099,
-16333,
-17546,
-12262,
-2369,
8439,
16124,
17797,
12867,
3169,
-7658,
-15579,
-17697,
-13299,
-4083,
6523,
14598,
17289,
13683,
5201,
-5057,
-13395,
-16863,
-14302,
-6645,
3343,
12132,
16579,
15105,
8215,
-1678,
-11045,
-16506,
-16048,
-9744,
179,
10164,
16517,
16881,
11024,
1032,
-9426,
-16478,
-17466,
-11993,
-2042,
8666,
16154,
17632,
12593,
2931,
-7731,
-15446,
-17427,
-13031,
-3961,
6410,
14303,
16934,
13452,
5212,
-4787,
-12988,
-16512,
-14153,
-6779,
3007,
11724,
16297,
15052,
8389,
-1383,
-10780,
-16379,
-16070,
-9856,
69,
10087,
16487,
16848,
10924,
900,
-9549,
-16462,
-17284,
-11685,
-1757,
8779,
15996,
17253,
12160,
2656,
-7702,
-15131,
-16989,
-12684,
-3883,
6195,
13912,
16579,
13304,
5303,
-4527,
-12711,
-16355,
-14187,
-6944,
2789,
11578,
16252,
15101,
8463,
-1338,
-10761,
-16368,
-16032,
-9782,
163,
10135,
16430,
16643,
10651,
661,
-9599,
-16275,
-16890,
-11242,
-1443,
8802,
15699,
16755,
11661,
2354,
-7681,
-14812,
-16486,
-12202,
-3575,
6247,
13730,
16247,
12929,
5012,
-4670,
-12674,
-16144,
-13840,
-6549,
3144,
11794,
16255,
14858,
8034,
-1822,
-11138,
-16467,
-15773,
-9202,
844,
10678,
16598,
16372,
10020,
-70,
-10115,
-16362,
-16483,
-10496,
-686,
9263,
15681,
16280,
10946,
1729,
-7970,
-14651,
-15976,
-11571,
-3078,
6423,
13581,
15858,
12486,
4650,
-4855,
-12658,
-15960,
-13531,
-6154,
3541,
12063,
16282,
14569,
7455,
-2507,
-11660,
-16558,
-15321,
-8333,
1818,
11360,
16674,
15763,
8976,
-1143,
-10776,
-16348,
-15818,
-9459,
321,
9881,
15710,
15757,
10095,
864,
-8582,
-14815,
-15688,
-10933,
-2294,
7124,
13970,
15811,
12009,
3883,
-5664,
-13245,
-16090,
-13130,
-5357,
4480,
12792,
16505,
14161,
6546,
-3592,
-12477,
-16777,
-14814,
-7293,
2980,
12139,
16741,
15083,
7812,
-2288,
-11436,
-16229,
-14999,
-8280,
1357,
10364,
15480,
14953,
9064,
-20,
-9010,
-14708,
-15104,
-10093,
-1456,
7721,
14161,
15529,
11293,
2913,
-6617,
-13817,
-16021,
-12364,
-4084,
5794,
13642,
16499,
13247,
5030,
-5109,
-13410,
-16728,
-13808,
-5705,
4539,
13081,
16721,
14129,
6305,
-3785,
-12374,
-16287,
-14176,
-6894,
2788,
11315,
15640,
14280,
7820,
-1348,
-9935,
-14924,
-14562,
-9022,
-252,
8630,
14487,
15177,
10387,
1771,
-7599,
-14315,
-15857,
-11546,
-2902,
6946,
14290,
16372,
12322,
3645,
-6449,
-14130,
-16518,
-12698,
-4145,
5928,
13704,
16324,
12861,
4685,
-5127,
-12919,
-15879,
-12989,
-5408,
4050,
11933,
15412,
13312,
6435,
-2705,
-10843,
-15045,
-13852,
-7651,
1333,
9895,
14938,
14605,
8936,
-69,
-9169,
-15007,
-15368,
-10029,
-870,
8699,
15119,
15936,
10783,
1556,
-8271,
-14997,
-16101,
-11177,
-2129,
7641,
14482,
15899,
11456,
2889,
-6621,
-13589,
-15549,
-11872,
-3967,
5258,
12528,
15247,
12516,
5307,
-3789,
-11544,
-15171,
-13357,
-6711,
2423,
10751,
15236,
14194,
7951,
-1312,
-10177,
-15359,
-14907,
-8905,
464,
9718,
15387,
15331,
9548,
185,
-9218,
-15174,
-15442,
-9973,
-839,
8518,
14644,
15306,
10354,
1679,
-7514,
-13859,
-15137,
-10931,
-2827,
6227,
12980,
15062,
11738,
4201,
-4859,
-12212,
-15211,
-12742,
-5633,
3592,
11600,
15451,
13696,
6875,
-2553,
-11127,
-15652,
-14421,
-7830,
1689,
10608,
15577,
14786,
8503,
-878,
-9878,
-15189,
-14869,
-9106,
-80,
8855,
14476,
14789,
9759,
1260,
-7599,
-13641,
-14755,
-10602,
-2678,
6172,
12791,
14833,
11580,
4155,
-4801,
-12109,
-15103,
-12663,
-5607,
3599,
11593,
15426,
13608,
6731,
-2732,
-11271,
-15683,
-14270,
-7529,
2018,
10807,
15536,
14458,
8042,
-1286,
-10038,
-15000,
-14433,
-8628,
200,
8835,
14167,
14352,
9411,
1155,
-7448,
-13340,
-14475,
-10465,
-2733,
5955,
12564,
14697,
11577,
4269,
-4651,
-11977,
-15051,
-12693,
-5690,
3468,
11458,
15305,
13545,
6736,
-2622,
-11084,
-15461,
-14113,
-7516,
1873,
10524,
15212,
14227,
7969,
-1183,
-9785,
-14710,
-14172,
-8501,
185,
8675,
13901,
14067,
9165,
1016,
-7434,
-13208,
-14234,
-10189,
-2481,
6148,
12612,
14569,
11258,
3820,
-5104,
-12281,
-15035,
-12317,
-5038,
4171,
11901,
15297,
13046,
5957,
-3355,
-11463,
-15334,
-13560,
-6792,
2448,
10734,
15039,
13793,
7512,
-1452,
-9793,
-14501,
-13907,
-8311,
198,
8544,
13735,
13979,
9238,
1237,
-7172,
-13022,
-14240,
-10376,
-2783,
5864,
12467,
14631,
11488,
4111,
-4845,
-12141,
-15026,
-12390,
-5134,
4084,
11826,
15193,
12909,
5813,
-3449,
-11395,
-15072,
-13126,
-6346,
2732,
10716,
14670,
13199,
6901,
-1843,
-9824,
-14152,
-13288,
-7613,
776,
8826,
13637,
13503,
8499,
424,
-7797,
-13213,
-13865,
-9516,
-1687,
6809,
12905,
14341,
10564,
2871,
-5966,
-12716,
-14846,
-11501,
-3847,
5308,
12561,
15146,
12095,
4496,
-4770,
-12241,
-15101,
-12326,
-5023,
4063,
11499,
14632,
12353,
5635,
-3027,
-10457,
-14043,
-12562,
-6590,
1695,
9352,
13631,
13025,
7723,
-406,
-8440,
-13471,
-13657,
-8831,
-717,
7768,
13451,
14213,
9724,
1578,
-7201,
-13365,
-14568,
-10359,
-2280,
6658,
13110,
14689,
10815,
2953,
-5977,
-12635,
-14577,
-11118,
-3605,
5179,
11967,
14301,
11406,
4379,
-4147,
-11086,
-13940,
-11741,
-5335,
2966,
10165,
13713,
12324,
6507,
-1704,
-9346,
-13664,
-13019,
-7599,
706,
8843,
13808,
13698,
8484,
66,
-8423,
-13780,
-14007,
-8993,
-620,
7955,
13546,
14065,
9376,
1276,
-7230,
-12958,
-13898,
-9700,
-1991,
6383,
12374,
13792,
10191,
2902,
-5389,
-11676,
-13681,
-10699,
-3819,
4449,
11104,
13744,
11380,
4868,
-3477,
-10595,
-13874,
-12065,
-5786,
2712,
10300,
14131,
12731,
6568,
-2108,
-10022,
-14220,
-13076,
-7021,
1659,
9694,
14061,
13160,
7375,
-1091,
-9052,
-13563,
-13041,
-7743,
337,
8182,
12976,
13007,
8325,
668,
-7186,
-12422,
-13144,
-9107,
-1762,
6254,
12041,
13471,
9994,
2813,
-5479,
-11812,
-13868,
-10799,
-3701,
4843,
11653,
14174,
11441,
4437,
-4250,
-11350,
-14240,
-11824,
-5021,
3601,
10847,
14026,
12030,
5625,
-2760,
-10046,
-13582,
-12165,
-6352,
1680,
9030,
13073,
12409,
7314,
-396,
-7968,
-12694,
-12870,
-8399,
-837,
7115,
12561,
13458,
9417,
1831,
-6505,
-12506,
-13885,
-10091,
-2518,
6033,
12340,
14051,
10542,
3129,
-5412,
-11891,
-13943,
-10829,
-3742,
4671,
11322,
13755,
11130,
4446,
-3821,
-10607,
-13456,
-11359,
-5143,
2897,
9827,
13153,
11701,
6026,
-1812,
-8976,
-12913,
-12194,
-7023,
744,
8318,
12931,
12844,
8015,
154,
-7848,
-12988,
-13340,
-8709,
-818,
7394,
12854,
13529,
9204,
1503,
-6697,
-12380,
-13474,
-9659,
-2353,
5745,
11700,
13374,
10190,
3356,
-4660,
-10946,
-13231,
-10754,
-4404,
3510,
10127,
13096,
11347,
5521,
-2301,
-9297,
-12984,
-12006,
-6680,
1107,
8573,
12975,
12698,
7749,
-93,
-7992,
-13016,
-13253,
-8589,
-712,
7444,
12836,
13466,
9107,
1420,
-6725,
-12325,
-13373,
-9539,
-2325,
5650,
11475,
13115,
10032,
3388,
-4419,
-10590,
-12957,
-10697,
-4611,
3124,
9739,
12874,
11380,
5766,
-1958,
-9032,
-12874,
-12070,
-6869,
879,
8377,
12875,
12680,
7808,
28,
-7843,
-12859,
-13140,
-8539,
-762,
7293,
12643,
13280,
9009,
1450,
-6567,
-12076,
-13127,
-9396,
-2335,
5498,
11230,
12884,
9925,
3444,
-4209,
-10336,
-12760,
-10640,
-4699,
2934,
9547,
12778,
11392,
5889,
-1826,
-8940,
-12855,
-12121,
-6931,
853,
8377,
12864,
12628,
7731,
-60,
-7828,
-12726,
-12922,
-8357,
-743,
7105,
12296,
12955,
8879,
1616,
-6165,
-11636,
-12858,
-9442,
-2658,
5030,
10863,
12760,
10080,
3794,
-3846,
-10105,
-12748,
-10805,
-4960,
2706,
9443,
12792,
11523,
6023,
-1715,
-8895,
-12868,
-12138,
-6931,
873,
8381,
12826,
12528,
7591,
-139,
-7812,
-12580,
-12693,
-8168,
-672,
6986,
12061,
12675,
8711,
1609,
-6009,
-11411,
-12641,
-9334,
-2683,
4888,
10642,
12557,
9949,
3773,
-3750,
-9937,
-12551,
-10670,
-4927,
2639,
9286,
12623,
11374,
5932,
-1756,
-8888,
-12793,
-11988,
-6706,
1115,
8543,
12799,
12254,
7142,
-615,
-8093,
-12526,
-12284,
-7529,
-77,
7327,
11950,
12203,
8018,
964,
-6379,
-11352,
-12211,
-8661,
-2000,
5361,
10766,
12276,
9354,
3043,
-4381,
-10237,
-12420,
-10098,
-4106,
3426,
9773,
12600,
10818,
5026,
-2666,
-9466,
-12784,
-11383,
-5730,
2062,
9097,
12751,
11666,
6264,
-1413,
-8512,
-12418,
-11747,
-6802,
565,
7653,
11928,
11850,
7501,
461,
-6715,
-11452,
-12040,
-8275,
-1509,
5809,
11034,
12253,
9022,
2488,
-4971,
-10640,
-12476,
-9740,
-3415,
4228,
10364,
12729,
10395,
4159,
-3673,
-10195,
-12922,
-10826,
-4655,
3261,
9945,
12876,
10983,
5021,
-2764,
-9426,
-12544,
-11018,
-5475,
1989,
8637,
12096,
11135,
6165,
-1012,
-7789,
-11733,
-11424,
-6970,
7,
7005,
11469,
11762,
7764,
900,
-6334,
-11286,
-12117,
-8487,
-1693,
5783,
11169,
12429,
9062,
2289,
-5371,
-11054,
-12594,
-9423,
-2721,
4965,
10758,
12499,
9595,
3153,
-4387,
-10236,
-12276,
-9803,
-3786,
3562,
9568,
12060,
10152,
4569,
-2691,
-8969,
-11985,
-10638,
-5390,
1845,
8437,
11950,
11090,
6129,
-1127,
-8005,
-11961,
-11511,
-6805,
470,
7607,
11952,
11846,
7306,
17,
-7301,
-11883,
-12016,
-7646,
-434,
6908,
11620,
11976,
7897,
918,
-6304,
-11136,
-11841,
-8212,
-1629,
5494,
10570,
11777,
8704,
2470,
-4649,
-10088,
-11858,
-9329,
-3361,
3853,
9718,
12034,
9928,
4108,
-3274,
-9513,
-12252,
-10435,
-4719,
2809,
9303,
12337,
10737,
5116,
-2434,
-9037,
-12245,
-10872,
-5468,
1925,
8542,
11940,
10910,
5892,
-1247,
-7855,
-11557,
-11026,
-6500,
346,
7053,
11173,
11242,
7230,
595,
-6284,
-10898,
-11573,
-8025,
-1509,
5608,
10722,
11917,
8706,
2230,
-5145,
-10656,
-12221,
-9217,
-2738,
4786,
10508,
12278,
9427,
3045,
-4435,
-10215,
-12127,
-9525,
-3410,
3893,
9676,
11831,
9617,
3916,
-3195,
-9082,
-11635,
-9928,
-4610,
2401,
8521,
11542,
10317,
5300,
-1707,
-8098,
-11547,
-10731,
-5951,
1050,
7691,
11487,
11045,
6481,
-497,
-7328,
-11449,
-11336,
-7001,
-46,
6942,
11355,
11522,
7378,
471,
-6596,
-11177,
-11572,
-7657,
-928,
6086,
10769,
11452,
7916,
1506,
-5387,
-10272,
-11402,
-8392,
-2356,
4529,
9774,
11472,
9005,
3213,
-3802,
-9472,
-11712,
-9632,
-3976,
3210,
9263,
11900,
10108,
4529,
-2777,
-9053,
-11947,
-10381,
-4941,
2352,
8723,
11833,
10509,
5280,
-1868,
-8278,
-11579,
-10573,
-5678,
1252,
7680,
11233,
10656,
6189,
-514,
-7016,
-10939,
-10866,
-6831,
-281,
6393,
10742,
11171,
7488,
994,
-5894,
-10658,
-11485,
-8031,
-1580,
5499,
10550,
11685,
8450,
2058,
-5112,
-10375,
-11747,
-8729,
-2462,
4710,
10110,
11723,
8964,
2876,
-4246,
-9732,
-11577,
-9126,
-3338,
3622,
9199,
11369,
9390,
3999,
-2806,
-8579,
-11235,
-9798,
-4824,
1959,
8056,
11266,
10373,
5653,
-1210,
-7684,
-11368,
-10828,
-6259,
689,
7408,
11383,
11103,
6681,
-223,
-7022,
-11181,
-11153,
-6983,
-234,
6552,
10869,
11129,
7272,
766,
-5971,
-10447,
-11035,
-7553,
-1336,
5334,
9991,
10974,
7962,
2062,
-4555,
-9501,
-10979,
-8467,
-2849,
3845,
9180,
11191,
9102,
3633,
-3236,
-8958,
-11406,
-9599,
-4181,
2849,
8852,
11559,
9949,
4626,
-2426,
-8545,
-11448,
-10062,
-4937,
1992,
8153,
11245,
10186,
5382,
-1353,
-7522,
-10900,
-10243,
-5843,
656,
6907,
10606,
10456,
6490,
179,
-6212,
-10349,
-10726,
-7180,
-965,
5655,
10259,
11124,
7873,
1672,
-5197,
-10188,
-11384,
-8318,
-2096,
4922,
10124,
11514,
8589,
2473,
-4524,
-9771,
-11334,
-8668,
-2828,
4000,
9298,
11117,
8865,
3397,
-3249,
-8670,
-10902,
-9158,
-4068,
2505,
8174,
10867,
9608,
4823,
-1748,
-7704,
-10875,
-10032,
-5503,
1103,
7335,
10894,
10445,
6133,
-480,
-6918,
-10822,
-10711,
-6631,
-84,
6486,
10659,
10871,
7059,
655,
-5966,
-10360,
-10918,
-7442,
-1265,
5341,
9939,
10867,
7827,
1948,
-4606,
-9463,
-10862,
-8305,
-2730,
3828,
8996,
10897,
8840,
3556,
-3039,
-8576,
-11002,
-9410,
-4340,
2366,
8253,
11128,
9900,
4985,
-1812,
-7962,
-11165,
-10202,
-5447,
1339,
7591,
10995,
10291,
5790,
-814,
-7043,
-10631,
-10257,
-6152,
153,
6353,
10178,
10281,
6645,
609,
-5621,
-9821,
-10449,
-7267,
-1417,
4993,
9609,
10723,
7869,
2070,
-4574,
-9557,
-11034,
-8387,
-2587,
4213,
9455,
11155,
8662,
2910,
-3921,
-9267,
-11127,
-8832,
-3275,
3447,
8828,
10896,
8920,
3675,
-2873,
-8308,
-10661,
-9105,
-4247,
2140,
7704,
10441,
9361,
4856,
-1421,
-7202,
-10356,
-9755,
-5557,
704,
6744,
10327,
10109,
6139,
-150,
-6431,
-10375,
-10461,
-6656,
-330,
6128,
10322,
10638,
6976,
686,
-5856,
-10185,
-10702,
-7234,
-1082,
5427,
9873,
10606,
7408,
1497,
-4934,
-9485,
-10519,
-7676,
-2043,
4314,
9045,
10440,
8002,
2642,
-3717,
-8713,
-10540,
-8489,
-3298,
3145,
8465,
10677,
8936,
3828,
-2740,
-8348,
-10864,
-9328,
-4299,
2349,
8113,
10844,
9506,
4629,
-1963,
-7784,
-10709,
-9637,
-5028,
1411,
7267,
10408,
9706,
5461,
-759,
-6661,
-10097,
-9843,
-5999,
-5,
5982,
9787,
10047,
6632,
803,
-5359,
-9606,
-10373,
-7323,
-1553,
4866,
9533,
10697,
7893,
2118,
-4484,
-9447,
-10898,
-8272,
-2577,
4066,
9178,
10869,
8548,
3072,
-3501,
-8746,
-10752,
-8817,
-3658,
2813,
8214,
10601,
9095,
4257,
-2112,
-7689,
-10425,
-9347,
-4860,
1365,
7082,
10191,
9593,
5503,
-601,
-6494,
-10040,
-9948,
-6194,
-159,
5997,
9967,
10292,
6788,
732,
-5645,
-9943,
-10551,
-7210,
-1170,
5291,
9754,
10552,
7426,
1566,
-4818,
-9353,
-10412,
-7627,
-2106,
4129,
8780,
10203,
7903,
2772,
-3343,
-8231,
-10120,
-8346,
-3549,
2560,
7763,
10160,
8847,
4262,
-1947,
-7479,
-10294,
-9313,
-4862,
1419,
7214,
10330,
9617,
5308,
-979,
-6910,
-10284,
-9838,
-5763,
445,
6474,
10094,
9984,
6170,
93,
-6009,
-9875,
-10085,
-6574,
-660,
5456,
9523,
10068,
6926,
1275,
-4792,
-9083,
-10044,
-7362,
-2017,
4052,
8639,
10123,
7907,
2799,
-3391,
-8407,
-10358,
-8488,
-3439,
2948,
8275,
10533,
8853,
3858,
-2594,
-8063,
-10498,
-9023,
-4203,
2122,
7611,
10259,
9121,
4651,
-1485,
-7035,
-9991,
-9292,
-5207,
763,
6444,
9756,
9496,
5769,
-50,
-5852,
-9509,
-9699,
-6325,
-647,
5287,
9294,
9915,
6887,
1320,
-4765,
-9127,
-10125,
-7389,
-1893,
4313,
8926,
10246,
7766,
2395,
-3851,
-8654,
-10242,
-8057,
-2906,
3277,
8219,
10138,
8331,
3490,
-2595,
-7715,
-9995,
-8629,
-4125,
1870,
7166,
9855,
8956,
4782,
-1144,
-6662,
-9764,
-9303,
-5429,
458,
6214,
9701,
9632,
5998,
139,
-5819,
-9622,
-9881,
-6489,
-673,
5374,
9437,
9992,
6881,
1231,
-4857,
-9132,
-10040,
-7278,
-1849,
4224,
8737,
10040,
7671,
2517,
-3539,
-8276,
-9987,
-8063,
-3228,
2759,
7732,
9888,
8460,
3978,
-1950,
-7177,
-9811,
-8889,
-4721,
1192,
6695,
9806,
9329,
5419,
-511,
-6292,
-9743,
-9619,
-5906,
-21,
5882,
9599,
9766,
6339,
597,
-5319,
-9250,
-9761,
-6711,
-1242,
4637,
8793,
9732,
7167,
2026,
-3822,
-8264,
-9703,
-7640,
-2806,
3054,
7827,
9779,
8188,
3596,
-2332,
-7446,
-9839,
-8622,
-4204,
1808,
7188,
9923,
8991,
4718,
-1336,
-6875,
-9849,
-9139,
-5014,
972,
6576,
9725,
9250,
5370,
-472,
-6099,
-9423,
-9248,
-5672,
-32,
5590,
9124,
9316,
6110,
675,
-4980,
-8801,
-9405,
-6565,
-1310,
4456,
8592,
9615,
7086,
1929,
-3981,
-8439,
-9779,
-7488,
-2375,
3652,
8367,
9952,
7828,
2743,
-3342,
-8184,
-9946,
-7992,
-3047,
2999,
7906,
9860,
8156,
3449,
-2512,
-7499,
-9719,
-8343,
-3914,
1963,
7114,
9625,
8619,
4415,
-1412,
-6711,
-9538,
-8822,
-4860,
901,
6322,
9410,
9013,
5306,
-356,
-5901,
-9269,
-9221,
-5769,
-162,
5518,
9177,
9431,
6166,
581,
-5239,
-9106,
-9570,
-6468,
-950,
4891,
8883,
9540,
6675,
1364,
-4402,
-8503,
-9469,
-6979,
-1965,
3733,
8058,
9439,
7410,
2686,
-3021,
-7644,
-9500,
-7910,
-3422,
2353,
7310,
9631,
8405,
4082,
-1798,
-7045,
-9715,
-8785,
-4572,
1357,
6800,
9697,
8985,
4929,
-939,
-6430,
-9488,
-9030,
-5235,
434,
5904,
9154,
9048,
5653,
232,
-5230,
-8778,
-9113,
-6163,
-949,
4610,
8516,
9320,
6718,
1661,
-4046,
-8272,
-9485,
-7184,
-2216,
3582,
8080,
9595,
7562,
2724,
-3156,
-7856,
-9656,
-7864,
-3121,
2790,
7665,
9671,
8058,
3446,
-2446,
-7399,
-9558,
-8148,
-3715,
2055,
7025,
9350,
8205,
4068,
-1544,
-6549,
-9134,
-8380,
-4565,
918,
6064,
8999,
8638,
5089,
-363,
-5710,
-8981,
-8948,
-5582,
-131,
5403,
8937,
9138,
5921,
474,
-5165,
-8888,
-9309,
-6256,
-872,
4815,
8687,
9315,
6447,
1205,
-4474,
-8471,
-9312,
-6729,
-1690,
3932,
8068,
9203,
6969,
2187,
-3393,
-7707,
-9224,
-7382,
-2854,
2706,
7289,
9197,
7746,
3434,
-2153,
-6993,
-9275,
-8156,
-4030,
1610,
6661,
9252,
8415,
4430,
-1215,
-6413,
-9231,
-8600,
-4780,
809,
6073,
9048,
8647,
5023,
-423,
-5696,
-8821,
-8697,
-5363,
-83,
5211,
8568,
8771,
5747,
609,
-4768,
-8406,
-8960,
-6222,
-1184,
4311,
8237,
9137,
6655,
1693,
-3908,
-8104,
-9310,
-7074,
-2202,
3497,
7932,
9414,
7410,
2640,
-3122,
-7738,
-9472,
-7670,
-3014,
2748,
7463,
9386,
7824,
3359,
-2287,
-7048,
-9174,
-7909,
-3784,
1699,
6511,
8939,
8111,
4343,
-1000,
-5982,
-8795,
-8405,
-4930,
380,
5586,
8762,
8710,
5423,
123,
-5251,
-8693,
-8900,
-5808,
-562,
4900,
8543,
9016,
6142,
987,
-4539,
-8371,
-9092,
-6432,
-1387,
4156,
8143,
9074,
6639,
1759,
-3735,
-7808,
-8987,
-6872,
-2264,
3137,
7365,
8905,
7219,
2903,
-2471,
-6985,
-8972,
-7709,
-3597,
1861,
6678,
9049,
8097,
4124,
-1388,
-6420,
-9073,
-8367,
-4577,
871,
5995,
8881,
8492,
4991,
-338,
-5534,
-8676,
-8647,
-5440,
-260,
5012,
8407,
8714,
5814,
797,
-4479,
-8089,
-8732,
-6200,
-1441,
3811,
7688,
8753,
6687,
2170,
-3122,
-7339,
-8907,
-7241,
-2907,
2546,
7096,
9075,
7698,
3473,
-2075,
-6878,
-9136,
-8021,
-3930,
1611,
6531,
9045,
8215,
4350,
-1103,
-6140,
-8899,
-8357,
-4747,
613,
5713,
8690,
8456,
5114,
-71,
-5193,
-8365,
-8465,
-5475,
-518,
4593,
8043,
8567,
5986,
1231,
-4001,
-7805,
-8779,
-6530,
-1837,
3583,
7718,
9007,
6945,
2249,
-3273,
-7575,
-9027,
-7108,
-2530,
2942,
7282,
8896,
7204,
2887,
-2450,
-6830,
-8666,
-7318,
-3290,
1932,
6423,
8553,
7531,
3754,
-1397,
-6031,
-8441,
-7733,
-4176,
920,
5703,
8389,
8005,
4654,
-430,
-5379,
-8369,
-8259,
-5081,
0,
5115,
8361,
8479,
5456,
380,
-4823,
-8224,
-8558,
-5719,
-780,
4427,
7969,
8562,
6018,
1279,
-3904,
-7638,
-8574,
-6382,
-1874,
3331,
7312,
8615,
6781,
2449,
-2796,
-7027,
-8683,
-7154,
-2993,
2257,
6694,
8680,
7483,
3552,
-1703,
-6332,
-8654,
-7804,
-4088,
1122,
5930,
8567,
8068,
4603,
-561,
-5516,
-8448,
-8263,
-5043,
19,
5059,
8232,
8382,
5459,
564,
-4529,
-7955,
-8445,
-5855,
-1130,
3990,
7679,
8541,
6302,
1754,
-3441,
-7375,
-8622,
-6705,
-2315,
2934,
7132,
8710,
7087,
2859,
-2423,
-6811,
-8678,
-7354,
-3315,
1940,
6473,
8631,
7599,
3806,
-1397,
-6054,
-8467,
-7762,
-4208,
901,
5652,
8323,
7916,
4611,
-372,
-5185,
-8072,
-7960,
-4934,
-93,
4754,
7845,
8072,
5347,
685,
-4221,
-7598,
-8175,
-5761,
-1208,
3824,
7493,
8426,
6252,
1726,
-3469,
-7413,
-8604,
-6572,
-2069,
3225,
7311,
8670,
6789,
2403,
-2850,
-6995,
-8533,
-6927,
-2784,
2320,
6571,
8382,
7155,
3313,
-1696,
-6094,
-8261,
-7423,
-3846,
1135,
5717,
8205,
7689,
4349,
-590,
-5317,
-8081,
-7880,
-4773,
80,
4914,
7949,
8049,
5204,
437,
-4495,
-7769,
-8176,
-5562,
-901,
4103,
7591,
8261,
5871,
1333,
-3693,
-7333,
-8258,
-6138,
-1756,
3263,
7051,
8233,
6372,
2154,
-2841,
-6788,
-8229,
-6626,
-2581,
2415,
6506,
8178,
6825,
2947,
-2026,
-6247,
-8177,
-7094,
-3398,
1575,
5963,
8166,
7343,
3797,
-1179,
-5748,
-8207,
-7616,
-4211,
772,
5477,
8152,
7795,
4536,
-398,
-5180,
-8016,
-7897,
-4861,
-53,
4728,
7766,
7933,
5203,
579,
-4242,
-7496,
-8019,
-5613,
-1150,
3736,
7239,
8095,
5983,
1662,
-3279,
-7029,
-8192,
-6338,
-2149,
2841,
6786,
8223,
6631,
2583,
-2413,
-6521,
-8224,
-6891,
-3026,
1955,
6203,
8160,
7092,
3418,
-1508,
-5849,
-8026,
-7254,
-3823,
989,
5420,
7840,
7383,
4251,
-437,
-4971,
-7677,
-7604,
-4738,
-132,
4531,
7553,
7814,
5180,
631,
-4188,
-7482,
-8012,
-5587,
-1083,
3817,
7309,
8104,
5890,
1504,
-3430,
-7101,
-8130,
-6208,
-1988,
2920,
6755,
8100,
6482,
2493,
-2389,
-6381,
-8028,
-6754,
-3028,
1774,
5919,
7900,
7004,
3577,
-1154,
-5463,
-7784,
-7267,
-4120,
555,
5028,
7677,
7510,
4615,
5,
-4619,
-7567,
-7741,
-5076,
-542,
4204,
7412,
7890,
5461,
1017,
-3820,
-7246,
-8003,
-5814,
-1490,
3373,
6981,
7999,
6067,
1921,
-2905,
-6648,
-7952,
-6363,
-2461,
2309,
6213,
7848,
6628,
2980,
-1762,
-5879,
-7858,
-6980,
-3525,
1239,
5553,
7829,
7216,
3917,
-842,
-5302,
-7793,
-7422,
-4299,
394,
4926,
7628,
7505,
4620,
36,
-4548,
-7460,
-7623,
-5002,
-559,
4083,
7226,
7702,
5368,
1066,
-3628,
-6991,
-7767,
-5724,
-1575,
3145,
6715,
7827,
6064,
2080,
-2661,
-6430,
-7843,
-6381,
-2588,
2169,
6134,
7853,
6699,
3079,
-1674,
-5812,
-7819,
-6949,
-3532,
1190,
5474,
7739,
7170,
3975,
-654,
-5032,
-7548,
-7301,
-4393,
93,
4530,
7301,
7407,
4851,
557,
-3930,
-6966,
-7488,
-5305,
-1209,
3326,
6665,
7609,
5802,
1878,
-2748,
-6398,
-7727,
-6213,
-2405,
2318,
6213,
7827,
6555,
2850,
-1914,
-5963,
-7797,
-6732,
-3192,
1513,
5632,
7669,
6897,
3616,
-954,
-5152,
-7451,
-7045,
-4079,
343,
4660,
7274,
7269,
4636,
323,
-4104,
-7052,
-7449,
-5144,
-955,
3585,
6828,
7617,
5645,
1614,
-3006,
-6551,
-7712,
-6076,
-2208,
2473,
6270,
7789,
6461,
2754,
-1963,
-5950,
-7750,
-6680,
-3175,
1483,
5566,
7608,
6846,
3615,
-912,
-5069,
-7355,
-6964,
-4050,
331,
4576,
7141,
7113,
4488,
222,
-4130,
-6981,
-7263,
-4862,
-675,
3778,
6834,
7370,
5175,
1054,
-3466,
-6700,
-7467,
-5434,
-1405,
3167,
6547,
7499,
5652,
1697,
-2884,
-6400,
-7530,
-5873,
-2033,
2538,
6151,
7476,
6044,
2383,
-2124,
-5828,
-7388,
-6247,
-2848,
1567,
5387,
7251,
6490,
3398,
-930,
-4932,
-7181,
-6835,
-4014,
293,
4525,
7145,
7165,
4533,
196,
-4245,
-7127,
-7360,
-4851,
-554,
3929,
6925,
7361,
5072,
941,
-3486,
-6623,
-7305,
-5341,
-1424,
2993,
6323,
7332,
5678,
1919,
-2549,
-6081,
-7386,
-5926,
-2297,
2194,
5858,
7347,
6129,
2659,
-1754,
-5520,
-7229,
-6297,
-3076,
1282,
5179,
7201,
6594,
3544,
-837,
-4962,
-7262,
-6862,
-3885,
571,
4824,
7282,
6996,
4087,
-320,
-4583,
-7097,
-6968,
-4269,
-18,
4188,
6836,
6972,
4572,
526,
-3702,
-6582,
-7063,
-4972,
-1061,
3256,
6384,
7183,
5334,
1500,
-2882,
-6221,
-7254,
-5617,
-1910,
2492,
5971,
7244,
5849,
2314,
-2083,
-5705,
-7245,
-6102,
-2740,
1673,
5458,
7243,
6344,
3089,
-1338,
-5247,
-7215,
-6506,
-3386,
985,
4957,
7087,
6595,
3682,
-552,
-4569,
-6899,
-6736,
-4109,
7,
4120,
6744,
6917,
4553,
507,
-3742,
-6645,
-7115,
-4955,
-968,
3371,
6470,
7187,
5247,
1373,
-2993,
-6262,
-7223,
-5545,
-1834,
2549,
5982,
7211,
5787,
2232,
-2126,
-5693,
-7173,
-6016,
-2657,
1643,
5313,
7027,
6184,
3097,
-1101,
-4875,
-6887,
-6412,
-3630,
490,
4428,
6780,
6666,
4136,
80,
-4033,
-6675,
-6875,
-4546,
-536,
3685,
6549,
7001,
4883,
973,
-3278,
-6314,
-7010,
-5125,
-1367,
2895,
6081,
7030,
5408,
1803,
-2455,
-5777,
-6978,
-5590,
-2180,
2039,
5499,
6950,
5849,
2644,
-1535,
-5158,
-6902,
-6120,
-3090,
1109,
4913,
6935,
6400,
3502,
-711,
-4661,
-6890,
-6558,
-3787,
380,
4402,
6776,
6643,
4079,
16,
-4039,
-6589,
-6717,
-4367,
-432,
3675,
6424,
6817,
4685,
819,
-3340,
-6270,
-6871,
-4945,
-1192,
2968,
6029,
6861,
5173,
1608,
-2543,
-5750,
-6875,
-5482,
-2093,
2071,
5492,
6917,
5788,
2526,
-1691,
-5311,
-6954,
-6043,
-2882,
1337,
5049,
6881,
6145,
3154,
-1010,
-4766,
-6782,
-6282,
-3478,
579,
4406,
6590,
6333,
3762,
-204,
-4065,
-6431,
-6434,
-4105,
-290,
3599,
6161,
6485,
4460,
807,
-3143,
-5983,
-6672,
-4935,
-1413,
2678,
5805,
6828,
5340,
1861,
-2334,
-5683,
-6941,
-5637,
-2261,
1938,
5387,
6849,
5780,
2611,
-1487,
-5004,
-6711,
-5967,
-3085,
895,
4540,
6542,
6178,
3580,
-309,
-4093,
-6403,
-6403,
-4094,
-287,
3627,
6249,
6623,
4597,
896,
-3165,
-6102,
-6826,
-5073,
-1440,
2736,
5925,
6965,
5422,
1909,
-2325,
-5680,
-6943,
-5658,
-2318,
1836,
5282,
6772,
5813,
2767,
-1223,
-4748,
-6529,
-5973,
-3289,
566,
4215,
6360,
6231,
3854,
87,
-3734,
-6212,
-6437,
-4327,
-632,
3318,
6071,
6616,
4747,
1155,
-2878,
-5857,
-6702,
-5109,
-1644,
2438,
5629,
6777,
5435,
2103,
-2020,
-5400,
-6792,
-5680,
-2467,
1616,
5120,
6700,
5802,
2787,
-1238,
-4766,
-6535,
-5923,
-3163,
702,
4280,
6300,
6034,
3578,
-175,
-3878,
-6184,
-6265,
-4059,
-370,
3472,
6061,
6428,
4443,
798,
-3147,
-5942,
-6571,
-4782,
-1248,
2740,
5715,
6591,
5036,
1662,
-2334,
-5465,
-6589,
-5320,
-2097,
1874,
5142,
6515,
5501,
2479,
-1437,
-4814,
-6424,
-5690,
-2881,
964,
4427,
6279,
5826,
3262,
-478,
-4046,
-6143,
-6017,
-3698,
-20,
3678,
6050,
6235,
4122,
495,
-3346,
-5978,
-6408,
-4463,
-870,
3060,
5860,
6499,
4744,
1248,
-2679,
-5610,
-6461,
-4944,
-1639,
2252,
5301,
6423,
5209,
2101,
-1753,
-4966,
-6350,
-5421,
-2497,
1316,
4668,
6316,
5655,
2954,
-828,
-4289,
-6192,
-5838,
-3367,
345,
3951,
6132,
6099,
3828,
152,
-3590,
-6016,
-6232,
-4154,
-535,
3279,
5883,
6338,
4473,
1009,
-2797,
-5563,
-6297,
-4729,
-1477,
2312,
5257,
6303,
5088,
2023,
-1759,
-4910,
-6262,
-5350,
-2476,
1286,
4572,
6206,
5600,
2971,
-706,
-4127,
-6055,
-5810,
-3476,
142,
3707,
5976,
6098,
3994,
433,
-3339,
-5900,
-6318,
-4398,
-865,
2995,
5740,
6351,
4655,
1247,
-2553,
-5399,
-6255,
-4866,
-1746,
1948,
4931,
6122,
5137,
2317,
-1328,
-4517,
-6085,
-5483,
-2891,
759,
4136,
6043,
5740,
3363,
-259,
-3793,
-5954,
-5954,
-3815,
-273,
3368,
5798,
6124,
4224,
773,
-2955,
-5632,
-6235,
-4580,
-1256,
2499,
5343,
6221,
4852,
1746,
-1972,
-4958,
-6144,
-5131,
-2295,
1365,
4532,
6071,
5422,
2822,
-824,
-4174,
-6012,
-5670,
-3259,
341,
3816,
5891,
5815,
3627,
125,
-3418,
-5723,
-5953,
-4015,
-609,
3038,
5595,
6113,
4383,
1020,
-2734,
-5488,
-6190,
-4602,
-1306,
2451,
5265,
6114,
4703,
1608,
-2026,
-4868,
-5916,
-4833,
-2034,
1460,
4418,
5793,
5101,
2577,
-878,
-4044,
-5771,
-5417,
-3076,
411,
3800,
5815,
5711,
3490,
-43,
-3576,
-5805,
-5899,
-3787,
-288,
3323,
5718,
5992,
4075,
675,
-2962,
-5482,
-5986,
-4315,
-1076,
2531,
5208,
5989,
4613,
1577,
-2007,
-4854,
-5936,
-4873,
-2059,
1501,
4512,
5896,
5148,
2544,
-968,
-4140,
-5821,
-5389,
-3018,
453,
3769,
5742,
5636,
3485,
50,
-3424,
-5671,
-5854,
-3886,
-490,
3118,
5569,
5977,
4180,
858,
-2769,
-5341,
-5944,
-4389,
-1251,
2287,
4965,
5832,
4608,
1752,
-1702,
-4547,
-5761,
-4933,
-2344,
1106,
4182,
5767,
5273,
2868,
-599,
-3885,
-5774,
-5565,
-3303,
188,
3618,
5741,
5754,
3671,
223,
-3278,
-5591,
-5858,
-3987,
-672,
2903,
5397,
5938,
4321,
1163,
-2427,
-5116,
-5953,
-4629,
-1643,
1936,
4812,
5949,
4937,
2156,
-1395,
-4433,
-5863,
-5182,
-2631,
883,
4073,
5788,
5418,
3081,
-359,
-3678,
-5645,
-5551,
-3425,
-63,
3338,
5520,
5683,
3780,
500,
-2958,
-5318,
-5728,
-4037,
-861,
2616,
5140,
5779,
4311,
1284,
-2193,
-4858,
-5735,
-4523,
-1656,
1796,
4604,
5743,
4807,
2132,
-1321,
-4278,
-5696,
-5022,
-2501,
936,
4052,
5686,
5251,
2898,
-514,
-3733,
-5584,
-5395,
-3229,
117,
3436,
5510,
5587,
3623,
317,
-3115,
-5412,
-5734,
-3915,
-661,
2867,
5320,
5815,
4145,
958,
-2561,
-5108,
-5744,
-4284,
-1275,
2168,
4782,
5635,
4440,
1648,
-1711,
-4442,
-5550,
-4658,
-2088,
1238,
4112,
5492,
4871,
2476,
-856,
-3886,
-5499,
-5107,
-2826,
519,
3680,
5483,
5263,
3071,
-266,
-3521,
-5463,
-5380,
-3299,
-4,
3278,
5323,
5411,
3508,
314,
-2961,
-5163,
-5465,
-3794,
-748,
2564,
4937,
5519,
4085,
1176,
-2189,
-4759,
-5612,
-4424,
-1614,
1801,
4549,
5652,
4663,
1956,
-1491,
-4383,
-5677,
-4887,
-2289,
1128,
4126,
5586,
4983,
2563,
-790,
-3847,
-5478,
-5099,
-2878,
385,
3493,
5309,
5187,
3168,
7,
-3157,
-5168,
-5288,
-3490,
-413,
2790,
4976,
5354,
3776,
818,
-2425,
-4805,
-5429,
-4071,
-1228,
2077,
4633,
5494,
4332,
1569,
-1780,
-4490,
-5551,
-4553,
-1884,
1483,
4300,
5528,
4702,
2149,
-1194,
-4096,
-5488,
-4863,
-2455,
832,
3813,
5362,
4975,
2744,
-448,
-3485,
-5247,
-5093,
-3121,
-20,
3078,
5061,
5209,
3487,
485,
-2709,
-4934,
-5372,
-3857,
-946,
2345,
4763,
5448,
4130,
1299,
-2017,
-4591,
-5490,
-4379,
-1684,
1608,
4314,
5419,
4568,
2045,
-1224,
-4047,
-5406,
-4799,
-2461,
768,
3713,
5299,
4943,
2800,
-366,
-3400,
-5212,
-5126,
-3192,
-118,
2999,
5024,
5235,
3531,
543,
-2660,
-4904,
-5380,
-3899,
-977,
2291,
4736,
5438,
4139,
1315,
-2003,
-4576,
-5459,
-4342,
-1631,
1670,
4329,
5391,
4461,
1916,
-1324,
-4058,
-5307,
-4628,
-2266,
891,
3720,
5182,
4759,
2594,
-510,
-3432,
-5112,
-4938,
-2962,
91,
3102,
4978,
5038,
3258,
267,
-2811,
-4884,
-5178,
-3584,
-678,
2496,
4764,
5281,
3834,
950,
-2318,
-4726,
-5378,
-4022,
-1178,
2087,
4543,
5296,
4077,
1366,
-1802,
-4284,
-5187,
-4214,
-1745,
1330,
3908,
5075,
4424,
2170,
-893,
-3663,
-5122,
-4726,
-2599,
486,
3410,
5076,
4892,
2917,
-134,
-3122,
-4972,
-4997,
-3216,
-287,
2747,
4774,
5080,
3541,
709,
-2386,
-4634,
-5200,
-3867,
-1116,
2059,
4454,
5237,
4090,
1440,
-1722,
-4245,
-5203,
-4277,
-1800,
1285,
3915,
5098,
4460,
2216,
-820,
-3568,
-5040,
-4709,
-2688,
332,
3225,
4985,
4926,
3071,
80,
-2952,
-4912,
-5069,
-3364,
-441,
2646,
4749,
5105,
3613,
812,
-2257,
-4496,
-5098,
-3853,
-1226,
1853,
4236,
5091,
4088,
1615,
-1458,
-3974,
-5053,
-4294,
-1989,
1019,
3657,
4964,
4498,
2416,
-521,
-3277,
-4858,
-4722,
-2885,
19,
2943,
4830,
4977,
3297,
410,
-2659,
-4748,
-5103,
-3566,
-730,
2358,
4577,
5109,
3799,
1132,
-1910,
-4241,
-5035,
-4010,
-1552,
1462,
3960,
5050,
4332,
2049,
-972,
-3660,
-5003,
-4533,
-2411,
604,
3402,
4972,
4736,
2801,
-143,
-3023,
-4798,
-4849,
-3140,
-296,
2660,
4660,
4990,
3525,
775,
-2251,
-4463,
-5041,
-3784,
-1138,
1929,
4298,
5093,
4052,
1523,
-1540,
-4028,
-5042,
-4204,
-1824,
1216,
3816,
5021,
4406,
2179,
-822,
-3501,
-4902,
-4499,
-2464,
473,
3245,
4837,
4688,
2848,
-23,
-2873,
-4692,
-4789,
-3133,
-332,
2624,
4628,
4968,
3495,
756,
-2264,
-4451,
-4998,
-3696,
-1035,
2036,
4347,
5078,
3948,
1386,
-1667,
-4063,
-4970,
-4025,
-1619,
1357,
3838,
4924,
4231,
2040,
-875,
-3463,
-4783,
-4393,
-2392,
488,
3223,
4802,
4656,
2811,
-61,
-2915,
-4700,
-4757,
-3060,
-237,
2682,
4619,
4873,
3367,
658,
-2280,
-4377,
-4885,
-3612,
-1020,
1959,
4231,
4967,
3893,
1391,
-1618,
-4038,
-4953,
-4045,
-1658,
1324,
3807,
4886,
4190,
1982,
-924,
-3487,
-4786,
-4338,
-2341,
518,
3179,
4721,
4552,
2726,
-85,
-2875,
-4634,
-4686,
-3045,
-278,
2577,
4502,
4787,
3353,
696,
-2195,
-4284,
-4820,
-3606,
-1099,
1825,
4077,
4854,
3872,
1488,
-1431,
-3830,
-4825,
-4059,
-1838,
1046,
3538,
4751,
4244,
2209,
-618,
-3228,
-4672,
-4422,
-2576,
209,
2926,
4579,
4578,
2891,
180,
-2622,
-4449,
-4674,
-3180,
-566,
2264,
4245,
4707,
3440,
950,
-1881,
-4025,
-4713,
-3704,
-1343,
1483,
3755,
4674,
3908,
1724,
-1062,
-3461,
-4601,
-4085,
-2117,
628,
3137,
4541,
4307,
2534,
-184,
-2844,
-4507,
-4530,
-2918,
-196,
2613,
4493,
4713,
3213,
507,
-2403,
-4425,
-4817,
-3432,
-787,
2152,
4270,
4811,
3580,
1040,
-1855,
-4053,
-4736,
-3690,
-1314,
1514,
3752,
4618,
3809,
1631,
-1118,
-3450,
-4541,
-3993,
-2005,
714,
3180,
4487,
4171,
2307,
-413,
-3013,
-4519,
-4369,
-2598,
119,
2800,
4441,
4439,
2802,
115,
-2595,
-4356,
-4532,
-3035,
-450,
2287,
4172,
4529,
3219,
726,
-2024,
-4036,
-4562,
-3438,
-1059,
1680,
3796,
4494,
3550,
1318,
-1393,
-3590,
-4493,
-3766,
-1696,
982,
3295,
4418,
3931,
1991,
-701,
-3166,
-4488,
-4183,
-2335,
383,
2961,
4446,
4273,
2505,
-183,
-2804,
-4388,
-4364,
-2758,
-172,
2447,
4141,
4353,
2979,
524,
-2117,
-4024,
-4482,
-3335,
-994,
1726,
3817,
4523,
3561,
1283,
-1479,
-3710,
-4584,
-3789,
-1629,
1112,
3414,
4470,
3893,
1917,
-742,
-3137,
-4411,
-4106,
-2331,
289,
2798,
4309,
4251,
2641,
61,
-2543,
-4224,
-4384,
-2957,
-468,
2181,
4019,
4407,
3205,
843,
-1815,
-3816,
-4435,
-3464,
-1244,
1424,
3574,
4440,
3694,
1602,
-1051,
-3350,
-4427,
-3898,
-1965,
691,
3104,
4400,
4088,
2294,
-351,
-2871,
-4348,
-4241,
-2588,
11,
2592,
4235,
4314,
2853,
356,
-2266,
-4059,
-4403,
-3154,
-790,
1869,
3851,
4448,
3446,
1194,
-1507,
-3669,
-4507,
-3707,
-1558,
1142,
3416,
4446,
3863,
1878,
-769,
-3135,
-4363,
-4036,
-2242,
341,
2814,
4281,
4194,
2585,
24,
-2553,
-4200,
-4329,
-2866,
-369,
2265,
4049,
4342,
3065,
684,
-1928,
-3825,
-4341,
-3295,
-1085,
1495,
3532,
4292,
3519,
1465,
-1114,
-3298,
-4294,
-3743,
-1846,
707,
3001,
4190,
3885,
2154,
-335,
-2704,
-4118,
-4039,
-2546,
-92,
2381,
4018,
4195,
2843,
430,
-2178,
-3994,
-4343,
-3097,
-706,
1933,
3851,
4326,
3229,
959,
-1636,
-3615,
-4274,
-3389,
-1301,
1246,
3324,
4218,
3582,
1661,
-863,
-3075,
-4174,
-3752,
-1962,
532,
2832,
4104,
3891,
2256,
-174,
-2557,
-3997,
-3989,
-2533,
-131,
2328,
3968,
4150,
2825,
443,
-2114,
-3884,
-4217,
-2977,
-645,
1933,
3785,
4250,
3177,
951,
-1595,
-3547,
-4193,
-3328,
-1252,
1280,
3362,
4226,
3576,
1626,
-901,
-3113,
-4185,
-3736,
-1908,
596,
2907,
4159,
3919,
2255,
-207,
-2590,
-4028,
-4009,
-2529,
-126,
2333,
3956,
4146,
2845,
508,
-2020,
-3816,
-4227,
-3103,
-832,
1744,
3696,
4301,
3348,
1178,
-1403,
-3466,
-4255,
-3501,
-1480,
1068,
3217,
4210,
3686,
1852,
-638,
-2890,
-4103,
-3838,
-2199,
245,
2616,
4065,
4041,
2545,
115,
-2366,
-3978,
-4138,
-2771,
-390,
2131,
3862,
4177,
2980,
702,
-1798,
-3637,
-4155,
-3187,
-1065,
1410,
3389,
4143,
3419,
1462,
-1011,
-3129,
-4109,
-3625,
-1831,
611,
2839,
4054,
3800,
2197,
-208,
-2522,
-3938,
-3924,
-2497,
-172,
2217,
3811,
4035,
2795,
549,
-1909,
-3669,
-4099,
-3026,
-841,
1664,
3551,
4153,
3229,
1132,
-1374,
-3355,
-4104,
-3353,
-1375,
1091,
3154,
4080,
3529,
1701,
-724,
-2898,
-4017,
-3685,
-2007,
425,
2709,
4032,
3881,
2323,
-105,
-2496,
-3960,
-3964,
-2491,
-113,
2322,
3882,
4020,
2683,
390,
-2032,
-3686,
-3978,
-2829,
-657,
1750,
3517,
4012,
3042,
986,
-1435,
-3329,
-4004,
-3210,
-1238,
1196,
3195,
4036,
3389,
1502,
-931,
-3005,
-3966,
-3466,
-1700,
678,
2809,
3895,
3579,
1947,
-369,
-2560,
-3819,
-3691,
-2211,
79,
2346,
3761,
3809,
2456,
189,
-2160,
-3731,
-3917,
-2667,
-414,
1972,
3647,
3969,
2823,
659,
-1755,
-3522,
-3999,
-3026,
-962,
1440,
3319,
3987,
3215,
1272,
-1119,
-3126,
-3994,
-3431,
-1630,
771,
2877,
3955,
3583,
1910,
-459,
-2667,
-3908,
-3730,
-2223,
95,
2363,
3763,
3807,
2445,
200,
-2138,
-3709,
-3922,
-2711,
-497,
1888,
3586,
3958,
2866,
709,
-1706,
-3494,
-3987,
-3012,
-949,
1447,
3292,
3918,
3128,
1191,
-1151,
-3084,
-3883,
-3292,
-1524,
797,
2831,
3848,
3468,
1845,
-454,
-2616,
-3826,
-3663,
-2153,
150,
2413,
3810,
3811,
2421,
129,
-2199,
-3736,
-3884,
-2609,
-380,
2001,
3632,
3928,
2777,
645,
-1715,
-3417,
-3885,
-2929,
-941,
1388,
3189,
3854,
3137,
1304,
-997,
-2948,
-3835,
-3326,
-1615,
696,
2766,
3842,
3520,
1914,
-397,
-2557,
-3779,
-3614,
-2117,
160,
2373,
3731,
3719,
2351,
124,
-2158,
-3646,
-3775,
-2514,
-311,
1994,
3572,
3824,
2675,
549,
-1753,
-3393,
-3795,
-2809,
-801,
1470,
3219,
3797,
3005,
1121,
-1179,
-3060,
-3841,
-3220,
-1427,
902,
2904,
3839,
3352,
1644,
-683,
-2741,
-3796,
-3460,
-1867,
396,
2488,
3689,
3531,
2098,
-109,
-2272,
-3634,
-3658,
-2344,
-163,
2087,
3565,
3716,
2478,
322,
-1948,
-3478,
-3730,
-2606,
-546,
1678,
3277,
3674,
2739,
837,
-1383,
-3091,
-3706,
-2971,
-1155,
1083,
2941,
3732,
3168,
1413,
-850,
-2819,
-3741,
-3309,
-1629,
630,
2663,
3711,
3394,
1847,
-385,
-2457,
-3626,
-3478,
-2049,
113,
2244,
3547,
3562,
2273,
165,
-1998,
-3435,
-3623,
-2502,
-469,
1744,
3338,
3709,
2749,
776,
-1477,
-3205,
-3767,
-2964,
-1080,
1202,
3061,
3793,
3146,
1352,
-923,
-2858,
-3749,
-3292,
-1630,
616,
2624,
3700,
3426,
1920,
-272,
-2355,
-3580,
-3505,
-2161,
-34,
2101,
3486,
3605,
2435,
405,
-1754,
-3275,
-3622,
-2670,
-773,
1404,
3090,
3695,
2974,
1192,
-1032,
-2890,
-3719,
-3194,
-1516,
742,
2720,
3722,
3371,
1810,
-391,
-2424,
-3569,
-3418,
-2049,
39,
2108,
3433,
3530,
2375,
361,
-1786,
-3296,
-3610,
-2604,
-651,
1562,
3193,
3665,
2778,
889,
-1298,
-2997,
-3591,
-2887,
-1153,
969,
2746,
3539,
3071,
1515,
-601,
-2527,
-3550,
-3303,
-1837,
324,
2387,
3584,
3467,
2056,
-111,
-2235,
-3524,
-3513,
-2232,
-153,
1949,
3331,
3507,
2428,
490,
-1613,
-3150,
-3560,
-2711,
-878,
1264,
2983,
3630,
2972,
1236,
-960,
-2816,
-3653,
-3179,
-1558,
629,
2578,
3616,
3346,
1883,
-238,
-2297,
-3523,
-3494,
-2206,
-123,
2037,
3463,
3643,
2477,
414,
-1819,
-3366,
-3670,
-2619,
-618,
1574,
3165,
3573,
2675,
840,
-1270,
-2893,
-3484,
-2815,
-1151,
917,
2663,
3467,
3023,
1472,
-642,
-2543,
-3532,
-3220,
-1706,
466,
2469,
3576,
3342,
1877,
-272,
-2311,
-3490,
-3382,
-2053,
19,
2068,
3369,
3458,
2300,
329,
-1762,
-3221,
-3525,
-2563,
-672,
1461,
3097,
3603,
2814,
990,
-1179,
-2924,
-3606,
-2986,
-1300,
847,
2675,
3534,
3144,
1618,
-454,
-2382,
-3460,
-3307,
-1972,
82,
2123,
3413,
3483,
2277,
243,
-1903,
-3346,
-3568,
-2484,
-497,
1646,
3168,
3531,
2607,
740,
-1370,
-2968,
-3490,
-2753,
-1041,
1040,
2737,
3431,
2874,
1265,
-801,
-2555,
-3384,
-2984,
-1517,
485,
2280,
3253,
3055,
1753,
-168,
-2054,
-3222,
-3252,
-2116,
-213,
1795,
3175,
3399,
2380,
473,
-1630,
-3152,
-3521,
-2605,
-742,
1363,
2966,
3467,
2725,
1002,
-1059,
-2736,
-3432,
-2907,
-1365,
664,
2428,
3336,
3046,
1672,
-284,
-2170,
-3276,
-3230,
-2012,
-89,
1885,
3175,
3328,
2272,
374,
-1666,
-3124,
-3454,
-2529,
-691,
1402,
2979,
3481,
2685,
934,
-1169,
-2835,
-3459,
-2839,
-1185,
880,
2628,
3413,
2967,
1427,
-605,
-2418,
-3352,
-3061,
-1672,
326,
2191,
3279,
3170,
1932,
-17,
-1973,
-3210,
-3285,
-2158,
-230,
1795,
3193,
3418,
2383,
465,
-1632,
-3112,
-3445,
-2497,
-638,
1457,
3004,
3462,
2645,
887,
-1193,
-2818,
-3414,
-2775,
-1110,
941,
2663,
3402,
2899,
1335,
-712,
-2492,
-3356,
-2982,
-1506,
505,
2324,
3295,
3043,
1680,
-296,
-2149,
-3219,
-3084,
-1822,
97,
1988,
3132,
3131,
1978,
104,
-1804,
-3070,
-3195,
-2168,
-343,
1620,
2997,
3273,
2345,
539,
-1480,
-2960,
-3355,
-2498,
-715,
1335,
2868,
3333,
2550,
846,
-1132,
-2680,
-3241,
-2631,
-1081,
821,
2425,
3157,
2753,
1371,
-507,
-2240,
-3163,
-2964,
-1666,
250,
2102,
3187,
3108,
1871,
-55,
-1974,
-3174,
-3202,
-2060,
-167,
1787,
3086,
3269,
2244,
400,
-1597,
-3018,
-3349,
-2438,
-637,
1401,
2913,
3356,
2550,
823,
-1188,
-2741,
-3287,
-2647,
-1064,
872,
2485,
3202,
2758,
1346,
-565,
-2279,
-3177,
-2937,
-1615,
290,
2100,
3139,
3031,
1812,
-58,
-1901,
-3039,
-3075,
-2011,
-228,
1622,
2905,
3154,
2271,
565,
-1349,
-2804,
-3245,
-2514,
-852,
1140,
2741,
3331,
2701,
1071,
-946,
-2602,
-3293,
-2778,
-1261,
706,
2403,
3233,
2897,
1548,
-361,
-2143,
-3159,
-3041,
-1809,
89,
1982,
3172,
3221,
2095,
192,
-1807,
-3141,
-3314,
-2260,
-371,
1661,
3076,
3364,
2413,
598,
-1422,
-2896,
-3290,
-2500,
-807,
1153,
2671,
3231,
2625,
1084,
-822,
-2429,
-3145,
-2746,
-1338,
536,
2213,
3103,
2874,
1588,
-265,
-2020,
-3039,
-2954,
-1797,
23,
1829,
2984,
3071,
2017,
237,
-1643,
-2935,
-3152,
-2217,
-446,
1486,
2888,
3223,
2375,
654,
-1295,
-2757,
-3190,
-2455,
-845,
1057,
2546,
3136,
2596,
1137,
-704,
-2309,
-3094,
-2769,
-1448,
417,
2158,
3127,
2956,
1670,
-237,
-2066,
-3111,
-3006,
-1779,
86,
1914,
3015,
3004,
1921,
155,
-1636,
-2832,
-2996,
-2088,
-427,
1406,
2750,
3117,
2336,
704,
-1224,
-2684,
-3173,
-2473,
-847,
1089,
2613,
3170,
2558,
1031,
-842,
-2391,
-3078,
-2637,
-1271,
555,
2193,
3062,
2830,
1574,
-261,
-2028,
-3050,
-2965,
-1777,
73,
1903,
3031,
3042,
1955,
180,
-1644,
-2852,
-3030,
-2126,
-479,
1349,
2699,
3104,
2410,
852,
-1029,
-2538,
-3132,
-2583,
-1083,
785,
2381,
3092,
2696,
1334,
-460,
-2068,
-2917,
-2727,
-1591,
90,
1755,
2827,
2897,
1948,
295,
-1479,
-2745,
-3009,
-2162,
-512,
1358,
2726,
3101,
2335,
709,
-1146,
-2577,
-3052,
-2426,
-918,
921,
2424,
3070,
2602,
1194,
-643,
-2263,
-3061,
-2737,
-1414,
445,
2147,
3053,
2849,
1584,
-233,
-1951,
-2951,
-2879,
-1758,
-18,
1712,
2811,
2894,
1933,
294,
-1457,
-2674,
-2943,
-2160,
-618,
1135,
2493,
2949,
2374,
935,
-846,
-2366,
-3043,
-2652,
-1295,
552,
2220,
3070,
2808,
1497,
-380,
-2103,
-3067,
-2900,
-1693,
112,
1851,
2892,
2897,
1868,
181,
-1572,
-2775,
-3001,
-2145,
-512,
1331,
2705,
3088,
2324,
692,
-1208,
-2667,
-3120,
-2427,
-840,
1037,
2512,
3039,
2449,
974,
-840,
-2352,
-3017,
-2585,
-1225,
580,
2189,
3011,
2715,
1416,
-433,
-2112,
-3018,
-2805,
-1556,
267,
1976,
2963,
2829,
1659,
-112,
-1827,
-2870,
-2853,
-1797,
-80,
1652,
2777,
2879,
1930,
273,
-1474,
-2676,
-2891,
-2042,
-460,
1299,
2566,
2904,
2178,
665,
-1086,
-2439,
-2900,
-2311,
-863,
892,
2330,
2919,
2440,
1073,
-683,
-2187,
-2889,
-2537,
-1269,
458,
2023,
2846,
2645,
1471,
-231,
-1852,
-2805,
-2733,
-1664,
14,
1697,
2754,
2808,
1828,
189,
-1529,
-2667,
-2847,
-1979,
-391,
1326,
2562,
2875,
2132,
626,
-1134,
-2482,
-2948,
-2342,
-878,
924,
2393,
2996,
2497,
1073,
-760,
-2317,
-3026,
-2634,
-1279,
541,
2160,
2977,
2710,
1459,
-321,
-1966,
-2902,
-2794,
-1684,
40,
1741,
2837,
2875,
1874,
189,
-1581,
-2777,
-2956,
-2058,
-405,
1378,
2645,
2926,
2149,
589,
-1144,
-2456,
-2868,
-2263,
-884,
818,
2212,
2826,
2460,
1218,
-475,
-2031,
-2881,
-2700,
-1520,
230,
1923,
2928,
2846,
1700,
-86,
-1832,
-2882,
-2871,
-1796,
-93,
1636,
2734,
2838,
1910,
305,
-1400,
-2594,
-2864,
-2081,
-571,
1154,
2451,
2860,
2246,
806,
-927,
-2320,
-2883,
-2398,
-1055,
688,
2193,
2904,
2575,
1305,
-447,
-2054,
-2904,
-2714,
-1521,
230,
1910,
2900,
2820,
1700,
-46,
-1760,
-2834,
-2849,
-1835,
-128,
1606,
2750,
2889,
1966,
348,
-1385,
-2590,
-2848,
-2077,
-554,
1165,
2455,
2860,
2254,
829,
-882,
-2287,
-2869,
-2423,
-1095,
642,
2171,
2924,
2618,
1369,
-398,
-2027,
-2933,
-2775,
-1593,
191,
1906,
2927,
2889,
1791,
42,
-1730,
-2860,
-2942,
-1960,
-262,
1511,
2731,
2961,
2123,
525,
-1252,
-2571,
-2967,
-2295,
-796,
991,
2424,
2994,
2475,
1069,
-741,
-2277,
-2991,
-2616,
-1287,
505,
2108,
2936,
2696,
1480,
-248,
-1884,
-2832,
-2754,
-1700,
-44,
1617,
2688,
2801,
1892,
303,
-1410,
-2611,
-2874,
-2074,
-550,
1175,
2442,
2825,
2162,
739,
-947,
-2286,
-2786,
-2304,
-998,
646,
2058,
2742,
2427,
1244,
-397,
-1910,
-2744,
-2603,
-1496,
145,
1745,
2707,
2691,
1693,
91,
-1560,
-2638,
-2760,
-1892,
-327,
1333,
2524,
2807,
2074,
596,
-1093,
-2380,
-2809,
-2219,
-845,
823,
2185,
2776,
2364,
1113,
-544,
-2003,
-2766,
-2532,
-1388,
270,
1840,
2750,
2670,
1616,
-8,
-1637,
-2676,
-2719,
-1799,
-228,
1412,
2549,
2783,
2028,
561,
-1110,
-2383,
-2816,
-2227,
-849,
866,
2263,
2860,
2420,
1110,
-596,
-2085,
-2794,
-2504,
-1315,
328,
1840,
2700,
2597,
1582,
16,
-1556,
-2582,
-2680,
-1833,
-306,
1337,
2516,
2785,
2049,
590,
-1099,
-2368,
-2790,
-2196,
-832,
839,
2199,
2784,
2380,
1120,
-526,
-1991,
-2756,
-2522,
-1379,
272,
1827,
2732,
2642,
1581,
-53,
-1660,
-2649,
-2646,
-1695,
-130,
1453,
2511,
2653,
1831,
372,
-1221,
-2365,
-2662,
-2002,
-600,
1004,
2258,
2685,
2116,
774,
-854,
-2178,
-2706,
-2248,
-967,
651,
2030,
2649,
2318,
1127,
-461,
-1889,
-2626,
-2428,
-1358,
212,
1692,
2573,
2519,
1548,
1,
-1528,
-2526,
-2604,
-1751,
-258,
1322,
2430,
2669,
1941,
499,
-1129,
-2371,
-2757,
-2142,
-737,
963,
2327,
2840,
2308,
918,
-808,
-2244,
-2828,
-2379,
-1050,
658,
2110,
2792,
2467,
1266,
-379,
-1874,
-2686,
-2512,
-1439,
150,
1685,
2633,
2645,
1707,
175,
-1435,
-2520,
-2695,
-1890,
-387,
1270,
2485,
2807,
2117,
649,
-1050,
-2369,
-2810,
-2233,
-815,
910,
2305,
2857,
2360,
1019,
-678,
-2110,
-2743,
-2395,
-1162,
460,
1912,
2672,
2478,
1410,
-150,
-1645,
-2531,
-2510,
-1581,
-102,
1424,
2426,
2565,
1780,
370,
-1151,
-2256,
-2541,
-1918,
-605,
930,
2135,
2567,
2071,
819,
-726,
-2020,
-2552,
-2165,
-980,
549,
1879,
2513,
2242,
1178,
-312,
-1686,
-2479,
-2373,
-1425,
57,
1556,
2506,
2553,
1646,
114,
-1493,
-2550,
-2662,
-1764,
-216,
1396,
2466,
2613,
1815,
385,
-1155,
-2272,
-2572,
-1983,
-689,
846,
2113,
2632,
2204,
951,
-667,
-2077,
-2714,
-2351,
-1105,
542,
1974,
2666,
2355,
1197,
-369,
-1785,
-2535,
-2378,
-1394,
91,
1535,
2454,
2493,
1619,
158,
-1400,
-2447,
-2606,
-1784,
-299,
1280,
2389,
2592,
1850,
451,
-1096,
-2230,
-2560,
-1968,
-697,
834,
2069,
2586,
2160,
961,
-623,
-1999,
-2667,
-2366,
-1163,
473,
1960,
2714,
2471,
1309,
-339,
-1845,
-2654,
-2505,
-1427,
149,
1652,
2560,
2545,
1621,
127,
-1394,
-2418,
-2585,
-1814,
-398,
1181,
2348,
2660,
2028,
644,
-961,
-2222,
-2656,
-2110,
-793,
817,
2129,
2654,
2213,
967,
-612,
-1964,
-2586,
-2270,
-1114,
440,
1850,
2579,
2376,
1295,
-244,
-1706,
-2529,
-2423,
-1423,
89,
1589,
2498,
2503,
1585,
104,
-1404,
-2402,
-2533,
-1737,
-311,
1231,
2325,
2576,
1896,
535,
-1022,
-2188,
-2563,
-2005,
-749,
773,
1991,
2516,
2139,
1010,
-468,
-1811,
-2512,
-2333,
-1316,
200,
1665,
2543,
2481,
1491,
-57,
-1586,
-2528,
-2521,
-1599,
-100,
1379,
2329,
2429,
1660,
338,
-1072,
-2086,
-2383,
-1851,
-696,
714,
1889,
2419,
2089,
1007,
-452,
-1767,
-2461,
-2271,
-1238,
234,
1642,
2446,
2384,
1453,
-6,
-1466,
-2405,
-2484,
-1663,
-231,
1309,
2384,
2594,
1854,
420,
-1166,
-2333,
-2638,
-1988,
-608,
979,
2188,
2606,
2090,
824,
-712,
-1983,
-2546,
-2208,
-1101,
403,
1768,
2507,
2364,
1361,
-120,
-1572,
-2464,
-2475,
-1571,
-109,
1399,
2388,
2513,
1718,
312,
-1189,
-2261,
-2496,
-1836,
-529,
966,
2102,
2482,
1983,
790,
-695,
-1924,
-2475,
-2120,
-1008,
468,
1787,
2461,
2250,
1221,
-248,
-1630,
-2422,
-2339,
-1401,
42,
1472,
2371,
2417,
1569,
166,
-1308,
-2298,
-2452,
-1704,
-332,
1148,
2221,
2463,
1799,
484,
-1000,
-2113,
-2438,
-1888,
-648,
794,
1958,
2389,
1963,
839,
-597,
-1817,
-2386,
-2104,
-1065,
365,
1661,
2362,
2205,
1243,
-189,
-1558,
-2385,
-2336,
-1445,
-29,
1375,
2283,
2350,
1549,
201,
-1246,
-2232,
-2436,
-1752,
-452,
1015,
2107,
2430,
1853,
594,
-892,
-2056,
-2465,
-1993,
-803,
665,
1867,
2389,
2042,
961,
-454,
-1712,
-2377,
-2185,
-1226,
174,
1500,
2292,
2258,
1406,
37,
-1349,
-2258,
-2354,
-1626,
-297,
1115,
2132,
2376,
1767,
507,
-931,
-2049,
-2438,
-1933,
-719,
765,
1954,
2436,
2006,
837,
-636,
-1860,
-2387,
-2047,
-975,
442,
1669,
2284,
2092,
1142,
-199,
-1470,
-2222,
-2172,
-1348,
-27,
1297,
2179,
2272,
1556,
286,
-1095,
-2085,
-2328,
-1742,
-510,
911,
2027,
2428,
1954,
762,
-726,
-1959,
-2461,
-2068,
-897,
606,
1875,
2456,
2129,
1044,
-414,
-1698,
-2350,
-2146,
-1168,
220,
1527,
2281,
2219,
1354,
11,
-1339,
-2205,
-2250,
-1487,
-179,
1193,
2124,
2290,
1621,
371,
-1006,
-2024,
-2303,
-1747,
-542,
857,
1942,
2326,
1844,
687,
-731,
-1862,
-2307,
-1902,
-801,
573,
1734,
2261,
1971,
975,
-372,
-1594,
-2265,
-2129,
-1225,
156,
1508,
2321,
2280,
1380,
-47,
-1486,
-2370,
-2363,
-1479,
-56,
1361,
2267,
2317,
1544,
236,
-1135,
-2092,
-2311,
-1726,
-529,
857,
1955,
2369,
1930,
775,
-684,
-1911,
-2437,
-2047,
-912,
567,
1814,
2373,
2048,
987,
-422,
-1646,
-2287,
-2100,
-1161,
185,
1462,
2222,
2159,
1321,
-39,
-1402,
-2257,
-2270,
-1447,
-82,
1307,
2199,
2270,
1499,
213,
-1151,
-2081,
-2263,
-1641,
-425,
941,
1994,
2339,
1832,
658,
-773,
-1934,
-2389,
-1958,
-786,
675,
1888,
2386,
2010,
902,
-497,
-1704,
-2276,
-2029,
-1062,
273,
1515,
2229,
2153,
1319,
-2,
-1345,
-2198,
-2257,
-1478,
-136,
1249,
2188,
2311,
1592,
298,
-1089,
-2064,
-2286,
-1679,
-484,
883,
1921,
2276,
1817,
703,
-667,
-1812,
-2297,
-1944,
-881,
513,
1729,
2318,
2050,
1021,
-366,
-1617,
-2269,
-2089,
-1139,
208,
1471,
2191,
2118,
1295,
8,
-1288,
-2111,
-2190,
-1491,
-240,
1099,
2052,
2284,
1676,
450,
-958,
-2019,
-2355,
-1814,
-600,
827,
1954,
2336,
1875,
726,
-672,
-1810,
-2273,
-1917,
-879,
462,
1640,
2209,
1982,
1060,
-255,
-1471,
-2167,
-2076,
-1238,
54,
1327,
2117,
2143,
1398,
142,
-1181,
-2066,
-2228,
-1585,
-355,
1006,
2015,
2305,
1731,
536,
-872,
-1959,
-2330,
-1846,
-683,
702,
1835,
2280,
1913,
878,
-473,
-1640,
-2220,
-2004,
-1074,
254,
1500,
2206,
2120,
1258,
-58,
-1369,
-2168,
-2171,
-1364,
-62,
1259,
2128,
2205,
1493,
231,
-1090,
-2029,
-2203,
-1592,
-371,
981,
1981,
2256,
1693,
525,
-834,
-1859,
-2202,
-1729,
-638,
692,
1760,
2198,
1853,
864,
-437,
-1594,
-2166,
-1960,
-1032,
293,
1527,
2226,
2108,
1229,
-126,
-1427,
-2188,
-2149,
-1307,
8,
1318,
2151,
2206,
1474,
208,
-1121,
-2065,
-2253,
-1620,
-389,
1004,
2038,
2328,
1760,
541,
-861,
-1942,
-2287,
-1788,
-649,
709,
1792,
2208,
1840,
841,
-459,
-1578,
-2141,
-1946,
-1055,
218,
1444,
2161,
2099,
1269,
-65,
-1383,
-2194,
-2195,
-1378,
-32,
1327,
2183,
2232,
1461,
163,
-1192,
-2092,
-2232,
-1569,
-336,
1004,
1989,
2259,
1705,
536,
-820,
-1908,
-2292,
-1843,
-731,
654,
1786,
2272,
1923,
882,
-471,
-1653,
-2226,
-2001,
-1070,
262,
1485,
2168,
2067,
1204,
-86,
-1366,
-2132,
-2126,
-1344,
-67,
1205,
2029,
2096,
1415,
219,
-1034,
-1916,
-2102,
-1547,
-440,
825,
1791,
2132,
1720,
672,
-639,
-1740,
-2217,
-1873,
-840,
515,
1683,
2238,
1962,
982,
-381,
-1591,
-2226,
-2048,
-1135,
205,
1470,
2201,
2142,
1289,
-41,
-1375,
-2203,
-2237,
-1447,
-103,
1263,
2161,
2272,
1528,
243,
-1140,
-2094,
-2291,
-1662,
-421,
939,
1967,
2261,
1738,
578,
-782,
-1856,
-2240,
-1820,
-753,
569,
1669,
2161,
1887,
945,
-336,
-1494,
-2119,
-2001,
-1147,
132,
1391,
2126,
2105,
1279,
-30,
-1326,
-2136,
-2120,
-1321,
-34,
1233,
2036,
2081,
1362,
170,
-1070,
-1920,
-2078,
-1499,
-381,
879,
1836,
2121,
1631,
527,
-784,
-1819,
-2164,
-1727,
-639,
650,
1695,
2111,
1735,
759,
-500,
-1566,
-2056,
-1829,
-945,
280,
1411,
2033,
1911,
1083,
-156,
-1350,
-2046,
-1994,
-1188,
49,
1254,
1993,
1995,
1259,
53,
-1170,
-1959,
-2038,
-1371,
-207,
1036,
1903,
2063,
1456,
293,
-976,
-1883,
-2079,
-1522,
-401,
866,
1796,
2064,
1573,
514,
-736,
-1714,
-2065,
-1686,
-676,
567,
1619,
2074,
1780,
832,
-444,
-1555,
-2121,
-1890,
-963,
323,
1501,
2126,
1969,
1091,
-196,
-1413,
-2116,
-2025,
-1193,
80,
1308,
2039,
2023,
1278,
74,
-1129,
-1909,
-2007,
-1389,
-290,
920,
1777,
2023,
1541,
508,
-724,
-1697,
-2065,
-1680,
-655,
597,
1654,
2087,
1769,
797,
-464,
-1547,
-2048,
-1787,
-885,
356,
1464,
2044,
1895,
1053,
-164,
-1315,
-1993,
-1931,
-1167,
42,
1239,
1983,
2025,
1319,
153,
-1061,
-1886,
-2026,
-1418,
-307,
930,
1824,
2073,
1571,
516,
-736,
-1723,
-2067,
-1678,
-668,
576,
1634,
2091,
1808,
856,
-394,
-1514,
-2059,
-1868,
-980,
278,
1425,
2056,
1925,
1111,
-98,
-1248,
-1932,
-1918,
-1205,
-81,
1064,
1826,
1963,
1405,
356,
-822,
-1734,
-2036,
-1591,
-567,
693,
1716,
2126,
1744,
713,
-606,
-1679,
-2136,
-1779,
-781,
499,
1570,
2058,
1788,
880,
-333,
-1420,
-1984,
-1844,
-1029,
140,
1266,
1927,
1890,
1162,
3,
-1164,
-1881,
-1931,
-1248,
-141,
1009,
1784,
1915,
1365,
318,
-833,
-1698,
-1965,
-1521,
-514,
678,
1641,
1998,
1624,
637,
-609,
-1634,
-2049,
-1713,
-745,
484,
1526,
2000,
1735,
837,
-374,
-1439,
-2008,
-1855,
-1028,
189,
1340,
2017,
1936,
1141,
-99,
-1300,
-2050,
-2029,
-1275,
-48,
1197,
1984,
2049,
1358,
168,
-1077,
-1915,
-2067,
-1472,
-346,
900,
1806,
2046,
1545,
493,
-734,
-1689,
-2026,
-1623,
-643,
570,
1556,
1968,
1675,
770,
-397,
-1416,
-1920,
-1730,
-924,
211,
1272,
1877,
1813,
1093,
-39,
-1173,
-1898,
-1940,
-1248,
-89,
1122,
1936,
2020,
1356,
163,
-1065,
-1904,
-2006,
-1391,
-259,
938,
1774,
1972,
1451,
432,
-741,
-1648,
-1971,
-1593,
-639,
548,
1533,
1978,
1692,
796,
-394,
-1452,
-1975,
-1775,
-953,
202,
1270,
1878,
1816,
1133,
21,
-1077,
-1826,
-1923,
-1346,
-276,
924,
1782,
2000,
1468,
400,
-831,
-1742,
-2028,
-1552,
-542,
663,
1603,
1946,
1580,
646,
-514,
-1483,
-1908,
-1666,
-808,
320,
1331,
1857,
1702,
935,
-189,
-1247,
-1860,
-1791,
-1083,
19,
1118,
1806,
1844,
1206,
122,
-1018,
-1776,
-1919,
-1343,
-299,
869,
1718,
1950,
1467,
468,
-724,
-1648,
-1980,
-1578,
-620,
587,
1559,
1976,
1682,
775,
-395,
-1423,
-1919,
-1707,
-886,
257,
1307,
1880,
1780,
1036,
-78,
-1155,
-1809,
-1778,
-1089,
-14,
1068,
1756,
1799,
1202,
173,
-900,
-1635,
-1771,
-1268,
-306,
785,
1582,
1827,
1422,
488,
-616,
-1506,
-1835,
-1495,
-585,
566,
1504,
1897,
1597,
715,
-415,
-1367,
-1802,
-1579,
-772,
306,
1291,
1811,
1705,
991,
-80,
-1135,
-1784,
-1791,
-1117,
-15,
1141,
1877,
1941,
1266,
116,
-1074,
-1842,
-1918,
-1265,
-151,
1012,
1795,
1927,
1367,
336,
-799,
-1634,
-1891,
-1447,
-493,
668,
1584,
1943,
1587,
650,
-533,
-1510,
-1926,
-1633,
-735,
427,
1414,
1891,
1667,
857,
-278,
-1304,
-1860,
-1748,
-974,
149,
1224,
1846,
1781,
1052,
-68,
-1146,
-1793,
-1777,
-1119,
-77,
966,
1631,
1734,
1218,
281,
-757,
-1542,
-1795,
-1430,
-540,
567,
1489,
1880,
1575,
660,
-521,
-1522,
-1949,
-1654,
-734,
429,
1421,
1862,
1629,
808,
-304,
-1291,
-1816,
-1698,
-983,
89,
1126,
1770,
1767,
1123,
33,
-1063,
-1788,
-1842,
-1228,
-156,
943,
1701,
1812,
1290,
313,
-761,
-1553,
-1799,
-1408,
-520,
554,
1447,
1828,
1563,
720,
-397,
-1386,
-1868,
-1632,
-808,
333,
1342,
1849,
1676,
896,
-194,
-1198,
-1748,
-1672,
-980,
47,
1063,
1712,
1748,
1161,
148,
-929,
-1672,
-1821,
-1280,
-261,
868,
1687,
1895,
1406,
415,
-733,
-1624,
-1912,
-1500,
-534,
628,
1566,
1935,
1598,
662,
-510,
-1507,
-1927,
-1645,
-768,
388,
1384,
1868,
1668,
867,
-231,
-1241,
-1801,
-1714,
-1029,
26,
1074,
1734,
1778,
1176,
142,
-962,
-1719,
-1855,
-1307,
-292,
844,
1654,
1857,
1371,
375,
-756,
-1615,
-1883,
-1452,
-517,
607,
1488,
1812,
1451,
576,
-522,
-1423,
-1796,
-1519,
-712,
350,
1267,
1709,
1542,
813,
-230,
-1200,
-1760,
-1668,
-993,
76,
1102,
1734,
1710,
1055,
-24,
-1065,
-1727,
-1738,
-1121,
-108,
914,
1587,
1695,
1200,
296,
-709,
-1477,
-1722,
-1371,
-532,
507,
1371,
1750,
1498,
685,
-384,
-1327,
-1772,
-1583,
-795,
265,
1217,
1703,
1577,
891,
-118,
-1068,
-1641,
-1627,
-1047,
-85,
912,
1598,
1711,
1222,
245,
-817,
-1595,
-1789,
-1303,
-328,
769,
1581,
1794,
1360,
428,
-622,
-1438,
-1719,
-1386,
-582,
437,
1298,
1712,
1535,
812,
-221,
-1185,
-1728,
-1626,
-923,
137,
1156,
1741,
1691,
1016,
-1,
-1018,
-1636,
-1655,
-1089,
-135,
853,
1525,
1664,
1225,
328,
-670,
-1449,
-1706,
-1346,
-486,
560,
1416,
1748,
1440,
590,
-472,
-1354,
-1725,
-1460,
-672,
358,
1245,
1668,
1496,
771,
-215,
-1136,
-1641,
-1554,
-907,
69,
1020,
1608,
1610,
1037,
46,
-950,
-1631,
-1722,
-1177,
-210,
856,
1605,
1759,
1255,
289,
-803,
-1602,
-1819,
-1375,
-436,
638,
1475,
1763,
1418,
564,
-505,
-1379,
-1778,
-1551,
-796,
246,
1193,
1720,
1624,
951,
-92,
-1109,
-1744,
-1758,
-1117,
-82,
1001,
1702,
1772,
1187,
161,
-928,
-1668,
-1787,
-1247,
-263,
792,
1544,
1722,
1276,
379,
-652,
-1438,
-1709,
-1359,
-547,
475,
1312,
1685,
1454,
687,
-338,
-1236,
-1699,
-1539,
-824,
204,
1173,
1714,
1638,
965,
-73,
-1088,
-1701,
-1689,
-1041,
-23,
1025,
1684,
1715,
1133,
127,
-917,
-1611,
-1711,
-1191,
-234,
791,
1524,
1703,
1284,
400,
-619,
-1416,
-1690,
-1358,
-548,
467,
1317,
1685,
1467,
721,
-285,
-1171,
-1649,
-1533,
-855,
133,
1079,
1638,
1621,
1006,
13,
-978,
-1616,
-1648,
-1080,
-117,
883,
1555,
1673,
1165,
252,
-772,
-1499,
-1688,
-1256,
-372,
651,
1447,
1715,
1357,
477,
-558,
-1421,
-1730,
-1408,
-576,
454,
1308,
1663,
1425,
672,
-304,
-1159,
-1604,
-1491,
-849,
85,
989,
1543,
1576,
1013,
99,
-881,
-1552,
-1653,
-1163,
-239,
775,
1499,
1664,
1244,
359,
-658,
-1425,
-1687,
-1333,
-508,
504,
1332,
1662,
1419,
639,
-377,
-1260,
-1673,
-1499,
-749,
252,
1151,
1625,
1508,
861,
-103,
-1002,
-1551,
-1542,
-991,
-83,
845,
1488,
1593,
1145,
265,
-723,
-1448,
-1645,
-1226,
-352,
666,
1430,
1667,
1288,
455,
-532,
-1301,
-1585,
-1292,
-523,
414,
1217,
1568,
1373,
684,
-235,
-1077,
-1516,
-1403,
-768,
153,
1031,
1527,
1485,
908,
20,
-855,
-1420,
-1458,
-974,
-124,
777,
1412,
1542,
1143,
316,
-638,
-1347,
-1572,
-1201,
-384,
592,
1346,
1616,
1307,
524,
-434,
-1223,
-1570,
-1345,
-630,
325,
1177,
1639,
1520,
844,
-169,
-1135,
-1689,
-1609,
-916,
147,
1159,
1722,
1638,
942,
-94,
-1062,
-1613,
-1550,
-940,
-18,
894,
1457,
1511,
1062,
239,
-668,
-1334,
-1558,
-1211,
-434,
529,
1306,
1620,
1345,
557,
-450,
-1307,
-1679,
-1421,
-623,
410,
1272,
1662,
1421,
667,
-318,
-1180,
-1591,
-1430,
-755,
165,
1007,
1486,
1434,
875,
23,
-861,
-1435,
-1524,
-1075,
-241,
695,
1378,
1582,
1196,
363,
-626,
-1387,
-1639,
-1299,
-473,
513,
1304,
1603,
1319,
558,
-402,
-1205,
-1579,
-1390,
-706,
234,
1095,
1564,
1471,
832,
-129,
-1058,
-1604,
-1548,
-916,
53,
982,
1549,
1537,
955,
41,
-882,
-1475,
-1528,
-1046,
-192,
731,
1386,
1555,
1169,
351,
-595,
-1340,
-1595,
-1265,
-470,
519,
1306,
1624,
1355,
589,
-389,
-1229,
-1606,
-1406,
-671,
307,
1193,
1632,
1477,
787,
-183,
-1086,
-1568,
-1478,
-854,
83,
957,
1507,
1500,
991,
127,
-776,
-1409,
-1549,
-1134,
-291,
674,
1406,
1635,
1258,
409,
-615,
-1410,
-1662,
-1288,
-421,
588,
1370,
1630,
1283,
481,
-487,
-1258,
-1563,
-1307,
-576,
362,
1152,
1529,
1353,
701,
-206,
-1042,
-1504,
-1417,
-823,
73,
950,
1489,
1481,
959,
61,
-852,
-1469,
-1550,
-1066,
-195,
748,
1416,
1556,
1132,
310,
-614,
-1319,
-1550,
-1235,
-479,
442,
1217,
1560,
1355,
652,
-306,
-1171,
-1603,
-1451,
-746,
228,
1131,
1582,
1464,
801,
-128,
-1006,
-1493,
-1453,
-905,
-47,
821,
1385,
1463,
1035,
209,
-697,
-1365,
-1549,
-1159,
-337,
611,
1316,
1546,
1178,
396,
-532,
-1250,
-1508,
-1217,
-490,
391,
1140,
1462,
1263,
613,
-262,
-1049,
-1475,
-1345,
-745,
129,
977,
1458,
1419,
858,
-31,
-912,
-1466,
-1473,
-945,
-67,
827,
1425,
1491,
1042,
207,
-688,
-1337,
-1496,
-1145,
-376,
507,
1231,
1518,
1277,
563,
-384,
-1206,
-1604,
-1400,
-668,
319,
1187,
1576,
1381,
672,
-265,
-1073,
-1480,
-1340,
-750,
82,
877,
1358,
1370,
914,
104,
-747,
-1359,
-1465,
-1039,
-196,
716,
1352,
1475,
1034,
236,
-634,
-1239,
-1395,
-1042,
-355,
444,
1078,
1337,
1155,
564,
-249,
-1004,
-1410,
-1320,
-722,
158,
1007,
1472,
1393,
801,
-113,
-963,
-1460,
-1414,
-862,
-3,
851,
1391,
1442,
989,
157,
-729,
-1384,
-1524,
-1113,
-297,
647,
1352,
1546,
1171,
377,
-546,
-1268,
-1523,
-1230,
-522,
381,
1127,
1470,
1299,
674,
-221,
-1033,
-1490,
-1408,
-811,
73,
939,
1465,
1435,
883,
0,
-879,
-1437,
-1465,
-974,
-140,
734,
1344,
1455,
1049,
259,
-625,
-1297,
-1503,
-1164,
-414,
488,
1202,
1461,
1199,
500,
-362,
-1099,
-1429,
-1273,
-668,
158,
933,
1375,
1344,
831,
8,
-837,
-1397,
-1454,
-973,
-122,
776,
1396,
1484,
1031,
183,
-716,
-1351,
-1479,
-1062,
-270,
603,
1246,
1438,
1119,
389,
-479,
-1181,
-1436,
-1180,
-470,
413,
1125,
1435,
1214,
562,
-305,
-1029,
-1372,
-1203,
-608,
201,
917,
1323,
1252,
753,
-24,
-802,
-1292,
-1323,
-865,
-69,
778,
1345,
1426,
968,
152,
-730,
-1330,
-1425,
-969,
-170,
693,
1290,
1410,
1040,
298,
-536,
-1164,
-1379,
-1089,
-419,
407,
1090,
1401,
1208,
587,
-243,
-972,
-1349,
-1239,
-670,
138,
891,
1336,
1302,
830,
62,
-708,
-1234,
-1307,
-919,
-195,
626,
1220,
1390,
1071,
351,
-502,
-1166,
-1402,
-1107,
-404,
468,
1156,
1420,
1165,
485,
-364,
-1064,
-1374,
-1174,
-552,
268,
968,
1338,
1203,
656,
-125,
-864,
-1287,
-1262,
-767,
-12,
765,
1257,
1307,
878,
126,
-683,
-1265,
-1378,
-1001,
-235,
602,
1227,
1388,
1051,
315,
-547,
-1213,
-1422,
-1118,
-397,
465,
1146,
1407,
1144,
484,
-364,
-1062,
-1381,
-1198,
-591,
211,
931,
1314,
1228,
724,
-57,
-814,
-1299,
-1317,
-856,
-78,
740,
1298,
1380,
948,
154,
-684,
-1279,
-1366,
-942,
-182,
640,
1204,
1332,
972,
280,
-489,
-1077,
-1267,
-999,
-374,
400,
1031,
1294,
1107,
506,
-278,
-957,
-1273,
-1117,
-547,
239,
935,
1297,
1191,
679,
-84,
-804,
-1233,
-1218,
-734,
8,
790,
1297,
1334,
890,
103,
-724,
-1272,
-1349,
-911,
-119,
717,
1280,
1373,
969,
222,
-591,
-1188,
-1342,
-1018,
-335,
480,
1125,
1378,
1143,
488,
-338,
-1062,
-1389,
-1213,
-593,
242,
985,
1378,
1259,
707,
-92,
-858,
-1317,
-1319,
-857,
-91,
719,
1276,
1383,
999,
239,
-639,
-1277,
-1458,
-1089,
-342,
556,
1217,
1423,
1108,
384,
-473,
-1143,
-1403,
-1156,
-514,
304,
1001,
1331,
1198,
624,
-185,
-924,
-1370,
-1303,
-781,
37,
836,
1335,
1332,
829,
15,
-827,
-1359,
-1402,
-940,
-136,
710,
1267,
1345,
922,
150,
-679,
-1253,
-1371,
-997,
-272,
523,
1100,
1274,
989,
355,
-407,
-1030,
-1299,
-1103,
-529,
239,
927,
1281,
1174,
632,
-157,
-908,
-1328,
-1269,
-736,
66,
839,
1301,
1279,
799,
5,
-770,
-1276,
-1299,
-852,
-100,
685,
1211,
1284,
904,
196,
-586,
-1139,
-1263,
-943,
-281,
487,
1062,
1245,
998,
387,
-337,
-944,
-1199,
-1037,
-493,
214,
859,
1207,
1130,
666,
-49,
-742,
-1193,
-1213,
-783,
-76,
696,
1219,
1306,
929,
197,
-626,
-1203,
-1351,
-982,
-252,
574,
1191,
1378,
1057,
353,
-484,
-1134,
-1356,
-1081,
-401,
428,
1093,
1342,
1118,
478,
-325,
-1002,
-1304,
-1136,
-564,
202,
888,
1262,
1186,
690,
-57,
-786,
-1247,
-1262,
-822,
-93,
685,
1220,
1307,
940,
211,
-594,
-1189,
-1352,
-1030,
-326,
481,
1117,
1345,
1092,
437,
-376,
-1054,
-1348,
-1147,
-529,
258,
953,
1272,
1147,
588,
-167,
-850,
-1233,
-1164,
-692,
12,
706,
1148,
1184,
796,
102,
-642,
-1166,
-1264,
-900,
-191,
594,
1150,
1279,
908,
213,
-570,
-1129,
-1270,
-945,
-296,
439,
1031,
1232,
1015,
420,
-314,
-962,
-1280,
-1130,
-572,
226,
958,
1341,
1240,
674,
-163,
-925,
-1360,
-1280,
-730,
94,
881,
1347,
1326,
838,
45,
-754,
-1296,
-1344,
-900,
-128,
692,
1258,
1373,
985,
244,
-562,
-1140,
-1287,
-963,
-302,
457,
1033,
1231,
997,
427,
-282,
-868,
-1155,
-1014,
-515,
167,
804,
1145,
1084,
627,
-53,
-725,
-1113,
-1102,
-666,
13,
703,
1143,
1166,
766,
84,
-636,
-1113,
-1176,
-802,
-120,
606,
1101,
1188,
861,
222,
-475,
-992,
-1146,
-894,
-328,
327,
896,
1141,
1016,
529,
-160,
-824,
-1194,
-1153,
-665,
77,
808,
1247,
1214,
732,
-42,
-807,
-1264,
-1248,
-766,
-35,
721,
1185,
1235,
821,
109,
-665,
-1189,
-1285,
-916,
-192,
582,
1140,
1252,
909,
226,
-540,
-1092,
-1247,
-968,
-349,
377,
966,
1205,
1029,
472,
-262,
-931,
-1300,
-1187,
-641,
162,
921,
1327,
1237,
680,
-147,
-909,
-1332,
-1260,
-729,
35,
781,
1243,
1255,
815,
97,
-669,
-1195,
-1282,
-909,
-197,
569,
1137,
1257,
936,
290,
-435,
-969,
-1161,
-926,
-402,
252,
807,
1109,
1028,
596,
-45,
-714,
-1106,
-1104,
-676,
37,
738,
1178,
1150,
680,
-29,
-717,
-1086,
-1041,
-603,
33,
647,
1015,
1030,
698,
122,
-487,
-931,
-1039,
-745,
-182,
489,
989,
1145,
880,
284,
-407,
-940,
-1110,
-867,
-308,
364,
909,
1133,
970,
469,
-199,
-801,
-1110,
-1023,
-569,
107,
753,
1141,
1118,
707,
26,
-657,
-1115,
-1163,
-780,
-120,
590,
1092,
1197,
885,
239,
-486,
-1041,
-1204,
-950,
-337,
380,
956,
1196,
1000,
451,
-268,
-906,
-1225,
-1090,
-562,
179,
856,
1216,
1101,
593,
-170,
-846,
-1212,
-1130,
-634,
71,
734,
1121,
1096,
692,
15,
-658,
-1139,
-1194,
-847,
-178,
565,
1092,
1212,
886,
215,
-542,
-1095,
-1260,
-979,
-359,
362,
957,
1194,
1035,
506,
-225,
-878,
-1250,
-1172,
-667,
84,
827,
1253,
1219,
724,
-39,
-780,
-1208,
-1194,
-735,
-32,
668,
1113,
1158,
787,
145,
-537,
-1026,
-1136,
-835,
-229,
451,
963,
1115,
867,
311,
-331,
-838,
-1046,
-888,
-433,
175,
735,
1050,
1027,
643,
19,
-643,
-1069,
-1130,
-751,
-85,
646,
1131,
1203,
827,
156,
-550,
-1047,
-1140,
-836,
-222,
474,
993,
1155,
905,
317,
-373,
-926,
-1088,
-825,
-230,
440,
901,
970,
637,
92,
-416,
-681,
-597,
};
| 99,071
|
C++
|
.cxx
| 15,290
| 5.479398
| 36
| 0.726152
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,190
|
steam_train.cxx
|
w1hkj_fldigi/src/soundcard/steam_train.cxx
|
#define STEAM_TRAIN_SIZE 50225
int int_steam_train[STEAM_TRAIN_SIZE] = {
-1,
2,
-2,
2,
-2,
1,
0,
-1,
3,
-3,
2,
-1,
1,
-1,
2,
-2,
0,
2,
-3,
3,
-4,
2,
-2,
1,
0,
0,
2,
-1,
0,
2,
-4,
6,
-3,
2,
-1,
-2,
2,
0,
0,
2,
0,
3,
3,
0,
4,
3,
4,
6,
2,
4,
1,
3,
0,
1,
-3,
-2,
0,
-1,
-1,
-6,
0,
-1,
10,
5,
5,
0,
5,
3,
3,
0,
-4,
0,
-4,
-9,
-7,
-12,
1,
3,
1,
-12,
-15,
-5,
0,
-5,
-16,
-18,
-11,
-13,
-9,
-9,
-10,
-4,
-6,
7,
-4,
-4,
-8,
4,
11,
5,
-4,
-2,
1,
-3,
-8,
-15,
-4,
3,
-1,
-8,
-14,
-2,
-3,
0,
-10,
-10,
-8,
-9,
-17,
-25,
-22,
-5,
4,
4,
-1,
3,
17,
22,
14,
4,
0,
-8,
-21,
-21,
-23,
-32,
-33,
-16,
-6,
-3,
-15,
-10,
9,
31,
34,
23,
29,
29,
14,
-12,
-11,
-20,
-44,
-55,
-68,
-56,
-29,
-7,
-25,
-34,
-33,
-14,
7,
28,
22,
37,
44,
75,
73,
56,
5,
-15,
-30,
-33,
-44,
-38,
-38,
-33,
-46,
-52,
-33,
-18,
16,
21,
29,
32,
26,
17,
5,
0,
3,
29,
40,
20,
-2,
-13,
-23,
-32,
-40,
-31,
-26,
-20,
-5,
-4,
-1,
14,
26,
26,
13,
0,
-1,
-34,
-60,
-57,
-49,
-60,
-43,
-32,
1,
15,
36,
26,
10,
13,
18,
-7,
-35,
-50,
-44,
-11,
17,
47,
69,
32,
0,
1,
42,
52,
69,
89,
75,
70,
106,
153,
204,
214,
149,
77,
-30,
-106,
-150,
-145,
-139,
-103,
-60,
24,
92,
145,
148,
161,
210,
248,
210,
155,
107,
64,
-7,
-80,
-101,
-114,
-152,
-240,
-257,
-211,
-149,
-93,
-17,
77,
140,
171,
191,
147,
120,
143,
141,
78,
47,
65,
25,
-11,
-39,
-52,
-120,
-187,
-232,
-259,
-306,
-305,
-254,
-153,
-41,
22,
148,
242,
299,
248,
143,
67,
28,
22,
-55,
-140,
-202,
-248,
-212,
-144,
-51,
106,
241,
302,
285,
257,
116,
-34,
-160,
-241,
-360,
-449,
-382,
-281,
-144,
-30,
147,
415,
581,
645,
596,
461,
266,
16,
-233,
-434,
-562,
-576,
-474,
-302,
-124,
-5,
152,
346,
462,
524,
490,
367,
339,
366,
355,
324,
232,
59,
-115,
-282,
-369,
-396,
-401,
-374,
-350,
-424,
-486,
-451,
-286,
-64,
103,
196,
267,
357,
421,
378,
321,
231,
157,
14,
-258,
-533,
-813,
-894,
-825,
-616,
-429,
-357,
-283,
-194,
-4,
251,
462,
483,
408,
306,
120,
-54,
-135,
-89,
-40,
52,
57,
-22,
-196,
-426,
-514,
-491,
-337,
-189,
-45,
119,
232,
320,
252,
160,
40,
-54,
-33,
3,
-79,
-192,
-214,
-119,
1,
43,
12,
95,
298,
480,
498,
352,
247,
113,
-76,
-382,
-656,
-707,
-660,
-513,
-360,
-164,
41,
295,
492,
635,
736,
819,
916,
859,
764,
478,
15,
-521,
-970,
-1242,
-1444,
-1396,
-1218,
-867,
-455,
-22,
520,
972,
1315,
1384,
1312,
1146,
826,
358,
-220,
-676,
-979,
-1005,
-752,
-475,
-181,
123,
358,
448,
374,
96,
-342,
-608,
-690,
-684,
-481,
40,
693,
1013,
1130,
1220,
1146,
992,
588,
-3,
-573,
-1216,
-1662,
-1752,
-1222,
-525,
62,
640,
1024,
1184,
1154,
1093,
853,
470,
27,
-461,
-732,
-866,
-935,
-724,
-388,
-99,
155,
321,
307,
474,
638,
504,
300,
9,
-230,
-344,
-402,
-553,
-671,
-639,
-556,
-314,
0,
284,
449,
459,
724,
969,
1219,
1317,
1089,
714,
315,
-90,
-764,
-1352,
-1806,
-1802,
-1518,
-1111,
-478,
95,
600,
876,
1084,
1334,
1462,
1273,
893,
413,
7,
-75,
-45,
-125,
-433,
-629,
-831,
-1021,
-1218,
-1377,
-1144,
-797,
-268,
274,
557,
813,
1063,
1369,
1606,
1535,
1148,
463,
-422,
-1141,
-1220,
-989,
-635,
-399,
-240,
-33,
149,
381,
337,
89,
-223,
-688,
-996,
-915,
-599,
3,
533,
1123,
1796,
2165,
2078,
1347,
521,
-528,
-1468,
-1857,
-2133,
-1917,
-1256,
-480,
266,
785,
1211,
1454,
1540,
1043,
114,
-925,
-1922,
-2439,
-2422,
-1904,
-937,
51,
1093,
1877,
2490,
2805,
2579,
1718,
227,
-1065,
-2216,
-2770,
-2873,
-2778,
-2225,
-1566,
-632,
252,
1055,
1743,
1922,
1892,
1505,
979,
515,
131,
-101,
-197,
-134,
-51,
-319,
-871,
-1377,
-1779,
-1707,
-1494,
-1173,
-731,
-193,
141,
517,
1218,
1590,
1697,
1554,
1034,
479,
-65,
-361,
-432,
-315,
-21,
227,
317,
184,
-343,
-969,
-1525,
-1784,
-1622,
-1336,
-789,
-51,
962,
1944,
2668,
3195,
2876,
2155,
836,
-597,
-1508,
-2208,
-2459,
-2326,
-1897,
-1319,
-490,
615,
1636,
2470,
2397,
1621,
756,
-100,
-679,
-1147,
-1355,
-1300,
-973,
-152,
631,
1213,
1505,
1223,
932,
413,
-69,
-438,
-764,
-739,
-675,
-574,
-582,
-411,
-158,
-163,
-446,
-896,
-1276,
-1283,
-1035,
-571,
48,
648,
1564,
2283,
2663,
2460,
1596,
523,
-682,
-1590,
-2138,
-2459,
-2539,
-2360,
-1678,
-612,
487,
1220,
1405,
1251,
1075,
1194,
1468,
1872,
1903,
1662,
1085,
482,
-226,
-870,
-1437,
-1938,
-2191,
-2305,
-1908,
-1263,
-447,
417,
1343,
2134,
2613,
2817,
1983,
685,
-159,
-684,
-735,
-112,
565,
897,
1070,
975,
407,
-320,
-1004,
-1851,
-2411,
-2677,
-2654,
-1890,
-827,
551,
1888,
3050,
3855,
3958,
3314,
1464,
-386,
-1936,
-3282,
-3776,
-3739,
-3029,
-1751,
17,
1819,
3091,
3637,
3172,
2074,
576,
-1180,
-2528,
-3259,
-3320,
-3139,
-2790,
-1852,
-473,
1449,
3008,
3635,
3335,
2538,
1408,
313,
-616,
-1520,
-1921,
-1900,
-1851,
-1473,
-1035,
-919,
-787,
-515,
-366,
-287,
-35,
111,
340,
717,
1332,
2340,
2977,
2845,
2225,
843,
-737,
-1981,
-2570,
-2311,
-1934,
-1683,
-1320,
-678,
211,
851,
828,
418,
107,
-285,
-419,
-198,
299,
1146,
2280,
2918,
2981,
2577,
1060,
-589,
-2123,
-3255,
-3787,
-4037,
-3546,
-2503,
-864,
703,
1741,
2845,
3155,
2558,
1791,
632,
-494,
-1350,
-1623,
-1234,
-709,
-21,
842,
1216,
719,
-272,
-885,
-1225,
-1315,
-1155,
-1081,
-971,
-657,
489,
1684,
2491,
2509,
1072,
-514,
-2165,
-3363,
-3555,
-2842,
-1651,
-355,
1495,
3201,
5012,
6505,
6049,
4399,
1016,
-3342,
-6548,
-8578,
-8974,
-8626,
-6710,
-3794,
-41,
5173,
8457,
9671,
9055,
6803,
4104,
1034,
-1156,
-3046,
-4408,
-3831,
-2435,
-463,
1203,
1277,
263,
-1028,
-2152,
-3300,
-3931,
-3594,
-2847,
-771,
2166,
5000,
6689,
6184,
4890,
3663,
2236,
554,
-690,
-2408,
-3842,
-3726,
-3031,
-2086,
-689,
-71,
-426,
-1098,
-1866,
-1455,
-73,
1161,
2355,
3930,
4841,
5000,
4303,
2085,
-767,
-2965,
-4660,
-5679,
-5286,
-4119,
-1737,
1784,
4559,
5757,
5133,
3034,
128,
-1859,
-3262,
-4643,
-5263,
-4870,
-2885,
-475,
1823,
3935,
5324,
5457,
3871,
2293,
643,
-674,
-989,
-2066,
-2363,
-2364,
-1528,
299,
970,
759,
-852,
-3444,
-5060,
-5135,
-4669,
-3259,
-1598,
1605,
5601,
9527,
12825,
12566,
9299,
4048,
-1797,
-7357,
-10709,
-12020,
-11747,
-10112,
-5862,
-555,
4614,
8328,
9051,
8228,
5958,
3920,
1224,
-1746,
-3889,
-4176,
-2432,
257,
3301,
3795,
1960,
708,
-535,
-1863,
-2485,
-3558,
-4566,
-4043,
-2323,
-752,
572,
947,
1052,
1904,
2142,
2364,
3117,
3160,
2692,
2001,
657,
-839,
-1896,
-4305,
-6631,
-6586,
-5456,
-3295,
-384,
1466,
3991,
7311,
8229,
6789,
3861,
-574,
-4345,
-6687,
-9877,
-10427,
-8418,
-3747,
3308,
8696,
12809,
13210,
10355,
5266,
231,
-3368,
-7512,
-10458,
-12119,
-11756,
-9633,
-5471,
635,
6249,
9302,
9037,
7009,
4002,
887,
-531,
-832,
-1375,
-1174,
667,
2133,
2803,
2609,
953,
-1124,
-3872,
-6152,
-8293,
-9157,
-7998,
-5431,
-665,
4813,
9598,
10944,
9612,
6425,
2962,
1413,
-141,
-3196,
-6331,
-7033,
-6732,
-4389,
117,
2411,
2965,
1669,
-441,
-1171,
-2047,
-3049,
-2910,
-1687,
234,
2399,
1954,
-29,
-510,
502,
2404,
3427,
2598,
1415,
2085,
1866,
1501,
710,
-1985,
-3806,
-5325,
-6618,
-5396,
-3142,
-241,
4357,
8283,
10334,
8352,
3844,
-1372,
-5200,
-5973,
-5790,
-5386,
-3006,
-576,
4047,
9001,
12307,
14704,
11332,
4566,
-4056,
-11269,
-15548,
-16607,
-15463,
-11984,
-4448,
4306,
11311,
15902,
16718,
15441,
12439,
6631,
-359,
-7843,
-12006,
-13221,
-11762,
-8430,
-4843,
-408,
3182,
5099,
5785,
3980,
359,
-1397,
-1705,
-1461,
-419,
168,
631,
1115,
2305,
3055,
2677,
1312,
-47,
-1231,
-1372,
345,
822,
49,
-2819,
-4728,
-5116,
-4903,
-2597,
967,
3471,
6182,
8648,
6993,
3452,
-391,
-3020,
-4005,
-5358,
-6073,
-5493,
-3606,
258,
5645,
9361,
10696,
8254,
1206,
-4677,
-8283,
-10596,
-9418,
-6484,
-3252,
609,
3417,
6560,
8056,
7694,
6810,
4345,
866,
-2531,
-5051,
-7010,
-7499,
-3745,
1784,
5171,
7482,
4231,
-81,
-1978,
-4392,
-4730,
-4829,
-4631,
-2502,
12,
1839,
3608,
6156,
7557,
8189,
6710,
3441,
65,
-4497,
-7884,
-8363,
-7014,
-5575,
-5170,
-6273,
-5122,
-1140,
3594,
9013,
11988,
10042,
7534,
3456,
-338,
-2052,
-5685,
-8734,
-10935,
-9977,
-5941,
-468,
4663,
10248,
14175,
12905,
8326,
-83,
-7806,
-12319,
-14083,
-11716,
-6939,
-2454,
1898,
6040,
8868,
11875,
13250,
8957,
1784,
-4476,
-9545,
-9892,
-9365,
-6795,
-1369,
3424,
8077,
8712,
7930,
3979,
-1584,
-5454,
-7987,
-7365,
-6400,
-6550,
-6148,
-3227,
4761,
13601,
14461,
10912,
6397,
1012,
-3470,
-6844,
-7771,
-7500,
-5982,
-5473,
-5403,
-3702,
-1198,
2387,
5339,
7831,
8659,
5754,
561,
-3651,
-3451,
383,
2722,
803,
-2267,
-3713,
-3398,
-1546,
570,
2129,
941,
-688,
-1952,
-1539,
83,
-1931,
-1640,
353,
1272,
3396,
2955,
1851,
3655,
3959,
3447,
432,
-5515,
-7268,
-9132,
-9007,
-3638,
2205,
7653,
10020,
10025,
7697,
5061,
1093,
-4314,
-7329,
-9244,
-10437,
-11256,
-8292,
-904,
8190,
16224,
19173,
15829,
6667,
-3510,
-10305,
-13474,
-11763,
-7854,
-5833,
-5488,
-4080,
149,
7090,
11867,
12970,
10061,
3856,
-2352,
-7724,
-9320,
-8043,
-4438,
-486,
2369,
5925,
7400,
7324,
5796,
2913,
294,
-4826,
-9043,
-11169,
-10699,
-6996,
-2339,
2897,
6130,
8412,
8878,
7122,
4697,
1833,
1199,
302,
-1697,
-3636,
-6638,
-8599,
-7089,
-3488,
2009,
7761,
8961,
8056,
5533,
2040,
-318,
-2646,
-4945,
-5532,
-7213,
-7494,
-5204,
-381,
8028,
14146,
15432,
10858,
2453,
-5165,
-8822,
-10870,
-9942,
-7862,
-5568,
-2168,
2940,
7953,
11005,
12919,
6760,
-125,
-7433,
-12347,
-12570,
-11612,
-4927,
2234,
10778,
15965,
15464,
12637,
4728,
-1675,
-5435,
-9753,
-12135,
-14323,
-15602,
-13511,
-4886,
6432,
15758,
20793,
18052,
11414,
2483,
-5521,
-9060,
-10118,
-9887,
-8659,
-6643,
-2639,
1404,
5839,
9074,
10817,
9177,
2233,
-4251,
-10078,
-10964,
-7050,
-3125,
2709,
5130,
5067,
5130,
5737,
8473,
8389,
4406,
-2462,
-8102,
-11210,
-11331,
-9816,
-6898,
-2306,
1645,
5623,
8501,
7763,
6731,
6178,
4841,
2337,
-2993,
-8376,
-14089,
-15071,
-9050,
-1392,
6862,
13245,
16142,
14390,
9588,
2637,
-4894,
-7750,
-10601,
-13018,
-12508,
-9809,
-5657,
825,
9658,
15661,
18441,
12806,
2079,
-5973,
-8753,
-8627,
-6406,
-5054,
-4730,
-2392,
311,
6159,
9125,
9599,
5773,
-1082,
-7324,
-11251,
-10782,
-9555,
-4718,
1974,
8660,
12619,
11160,
6862,
4555,
3908,
1625,
-2952,
-7893,
-11239,
-11354,
-8439,
-5624,
-1463,
1808,
3500,
5828,
7597,
7644,
4293,
1097,
-695,
-3074,
-5391,
-8252,
-8892,
-6529,
-14,
7800,
11898,
13147,
10921,
4981,
-462,
-5584,
-9476,
-13051,
-14098,
-12344,
-6857,
1178,
8687,
18265,
20294,
18266,
10455,
-1884,
-10062,
-16739,
-16854,
-12958,
-7507,
804,
7103,
11383,
13705,
13125,
9433,
1619,
-6641,
-13328,
-17645,
-17255,
-13333,
-6265,
3301,
11987,
17512,
18444,
15442,
8262,
1152,
-4050,
-8820,
-12399,
-13810,
-12986,
-8269,
-2460,
3818,
7398,
6702,
6667,
4482,
2043,
283,
-861,
-2072,
-1173,
-501,
-343,
716,
513,
2579,
2929,
2932,
3344,
-483,
-4263,
-5436,
-4116,
-2782,
-2918,
-3811,
-3469,
-741,
2443,
7266,
10072,
9108,
7823,
4408,
-81,
-2850,
-7275,
-9608,
-10403,
-8232,
-2414,
2071,
7268,
11175,
13239,
10962,
2997,
-5497,
-13045,
-15081,
-13212,
-10714,
-2122,
4294,
9702,
16524,
16475,
14737,
9050,
-647,
-8789,
-14736,
-16353,
-15432,
-11842,
-6104,
3559,
13105,
16512,
15412,
9143,
1284,
-5103,
-9459,
-11293,
-10751,
-8605,
-4524,
2548,
12027,
18815,
18853,
12736,
3322,
-4071,
-10726,
-14263,
-14925,
-14633,
-11066,
-6904,
-783,
6062,
11531,
13887,
14796,
13283,
8574,
3327,
-4183,
-10489,
-11091,
-6362,
-2469,
761,
1781,
838,
1952,
3477,
4189,
2799,
-637,
-4497,
-5171,
-3942,
-3123,
-2515,
133,
3840,
6782,
8891,
6952,
3944,
3314,
23,
-3340,
-6320,
-10836,
-12006,
-11031,
-7325,
19,
8260,
12778,
12129,
7480,
2228,
-1175,
-6236,
-10305,
-10382,
-10507,
-6782,
-1015,
5020,
14854,
17953,
15806,
11085,
1433,
-7951,
-15613,
-20691,
-20529,
-14517,
-5672,
2300,
9135,
14031,
16437,
14560,
8732,
1569,
-5767,
-11628,
-14330,
-13270,
-6792,
2655,
9851,
12689,
13288,
11082,
2660,
-3689,
-9959,
-14035,
-14093,
-13836,
-11981,
-8021,
-73,
8815,
17191,
20828,
17192,
9097,
888,
-4566,
-6885,
-8829,
-9223,
-8761,
-8091,
-5615,
-3794,
-982,
4346,
7818,
8132,
5888,
1983,
-1678,
-2316,
-1722,
-899,
-548,
-434,
-1120,
-1297,
1751,
3934,
5224,
4750,
3240,
686,
-2148,
-5657,
-8187,
-7255,
-4785,
-2922,
-1077,
1671,
4706,
8740,
9732,
8003,
4695,
-2313,
-7947,
-10590,
-9824,
-3513,
2542,
7338,
11812,
12072,
9220,
4249,
-3574,
-8695,
-10905,
-13455,
-13950,
-11672,
-6100,
2375,
11247,
19398,
22218,
16137,
6873,
-2042,
-7994,
-10183,
-11453,
-10985,
-9337,
-4708,
757,
7046,
12415,
11377,
7478,
896,
-7018,
-10593,
-11717,
-11738,
-6831,
1144,
9464,
13951,
14064,
12698,
9943,
4953,
-1139,
-7253,
-12437,
-15451,
-15429,
-10811,
-3410,
4601,
8802,
9443,
9776,
8599,
5154,
1489,
-2315,
-1527,
-511,
-1065,
-2679,
-5587,
-4087,
-2755,
580,
3915,
4132,
1722,
331,
1024,
1737,
2307,
-978,
-5926,
-9233,
-8573,
-4756,
1407,
6618,
10832,
11541,
8244,
6442,
3303,
-1177,
-4750,
-8505,
-11078,
-9062,
-6422,
-1110,
6113,
8906,
10995,
7137,
-2142,
-8365,
-12552,
-13498,
-8161,
-2038,
5326,
12056,
14923,
18165,
17693,
10428,
1053,
-9392,
-17544,
-19948,
-19914,
-16573,
-7722,
2249,
10572,
17005,
14676,
8327,
3695,
-2137,
-5357,
-6417,
-7133,
-6104,
-3869,
1343,
6745,
10218,
10090,
3901,
-2276,
-6646,
-10727,
-11516,
-10371,
-6211,
-1046,
2597,
6428,
6297,
6042,
6377,
6074,
5727,
3872,
218,
-2894,
-2406,
-818,
-1654,
-2916,
-4438,
-6536,
-4694,
-1788,
1477,
5112,
8264,
8639,
5416,
1569,
-3726,
-7462,
-8197,
-6383,
-3805,
156,
4204,
9042,
13060,
12210,
9315,
671,
-6975,
-13648,
-19340,
-17900,
-13217,
-4422,
5356,
13049,
14505,
14345,
10072,
1766,
-2852,
-8524,
-12567,
-13491,
-10318,
-2742,
9060,
17760,
20570,
15791,
5316,
-4891,
-14976,
-19060,
-20894,
-17384,
-12147,
-5535,
6171,
13765,
20088,
19714,
14628,
9846,
1155,
-6077,
-12480,
-13956,
-10994,
-5637,
1384,
5345,
4823,
3349,
649,
-2041,
-2377,
-4022,
-5331,
-6014,
-3055,
721,
5608,
8149,
7871,
6787,
4095,
2516,
-387,
-1422,
-2543,
-2307,
-800,
-2348,
-4260,
-7117,
-7953,
-4582,
251,
6405,
7800,
6435,
4653,
3753,
4399,
2535,
-429,
-5089,
-9238,
-11174,
-9465,
-1259,
7388,
14454,
17010,
12615,
5339,
-4381,
-10991,
-14867,
-16287,
-12008,
-7189,
-1946,
5843,
11940,
17746,
18946,
13845,
5025,
-6401,
-14106,
-18388,
-14633,
-6521,
1111,
8334,
10750,
11031,
9342,
4682,
-830,
-7088,
-11342,
-13740,
-14356,
-10608,
-3763,
4911,
13288,
18104,
17316,
12103,
3850,
-3644,
-8056,
-9934,
-9030,
-6578,
-4565,
-2129,
-547,
-85,
1968,
4748,
5140,
3373,
-15,
-3406,
-3601,
-1652,
2552,
3115,
2010,
1379,
-927,
-112,
2546,
3008,
2367,
1777,
-293,
-2651,
-5695,
-8623,
-7900,
-4328,
-1418,
2651,
6173,
6137,
7456,
8809,
8744,
6814,
82,
-7118,
-13681,
-15525,
-9704,
-1976,
5160,
11421,
14131,
12368,
8121,
987,
-6118,
-10701,
-13412,
-14235,
-11170,
-7300,
-1802,
7560,
16291,
22501,
19104,
9155,
-2410,
-11697,
-13283,
-12520,
-11350,
-8267,
-2851,
5404,
11640,
13670,
11356,
5287,
-2172,
-7810,
-10366,
-11057,
-10356,
-6967,
1201,
9911,
15789,
14390,
9730,
2046,
-1756,
-3640,
-6126,
-6415,
-7389,
-6091,
-4470,
-2104,
1182,
3436,
2494,
3306,
3379,
1499,
31,
1538,
1895,
2669,
1521,
-3015,
-5759,
-5444,
-2631,
749,
3749,
6272,
6806,
3878,
357,
-4791,
-6337,
-7419,
-8170,
-7256,
-4599,
-612,
7948,
15241,
16200,
13532,
4761,
-5946,
-12940,
-15763,
-14432,
-10618,
-3028,
7196,
12949,
16799,
14934,
9106,
1581,
-4941,
-9745,
-16325,
-18879,
-16789,
-9817,
2837,
14108,
21772,
22036,
14576,
7058,
-139,
-6704,
-12169,
-14306,
-15535,
-12905,
-5560,
1791,
8551,
11151,
11396,
6421,
839,
-4323,
-9611,
-10161,
-7516,
-1702,
3310,
6915,
6030,
4152,
4057,
3947,
3194,
559,
-3405,
-7261,
-7828,
-6325,
-3753,
-2544,
-3138,
-3639,
-3008,
-495,
2420,
6238,
9614,
11477,
11278,
5591,
-1722,
-8330,
-12536,
-12507,
-8249,
-2583,
2557,
7142,
9493,
10893,
10606,
5891,
-1080,
-9353,
-17495,
-17223,
-11812,
-2824,
8654,
17032,
20667,
17441,
9647,
740,
-7134,
-12194,
-15591,
-13785,
-8469,
-3317,
4700,
11038,
17263,
17956,
11638,
1628,
-12452,
-20061,
-21258,
-17061,
-7481,
1832,
11097,
16311,
18021,
18361,
12892,
5418,
-4884,
-14057,
-17318,
-19571,
-16666,
-9791,
826,
11436,
13876,
12104,
7047,
1666,
-1288,
-3748,
-6386,
-4954,
-1038,
1200,
1182,
1794,
4371,
6259,
7479,
5721,
1462,
-5291,
-8844,
-6132,
-2648,
-2280,
-4933,
-8844,
-9823,
-6269,
-548,
7769,
13704,
17290,
17138,
12311,
4078,
-4235,
-11231,
-17386,
-17888,
-15283,
-10023,
-4074,
7218,
17217,
20654,
19905,
9124,
-3110,
-12760,
-19353,
-17707,
-13315,
-8272,
2182,
10100,
18536,
23809,
20502,
11050,
-1953,
-10214,
-15815,
-18390,
-19266,
-14328,
-4430,
6324,
17560,
21165,
14432,
5702,
-2896,
-9105,
-10098,
-8949,
-7515,
-5386,
1210,
10579,
16858,
16074,
10902,
2569,
-4826,
-10676,
-13088,
-14125,
-11217,
-4046,
178,
3704,
2312,
2658,
3789,
3879,
5790,
6138,
3941,
823,
1035,
3588,
3161,
-332,
-2912,
-6673,
-6161,
-3583,
-1349,
1924,
3519,
4562,
1109,
-2683,
-6860,
-8757,
-9290,
-8368,
-1021,
5157,
12108,
17423,
19953,
16866,
7495,
-2393,
-11806,
-19158,
-23385,
-20735,
-13611,
-3023,
9910,
19169,
22662,
18979,
9888,
363,
-8706,
-14855,
-18770,
-17483,
-13042,
-4655,
9016,
19211,
25780,
25003,
14417,
1544,
-10149,
-18647,
-21807,
-21502,
-17098,
-7465,
3368,
12404,
16647,
15299,
11057,
4932,
-471,
-6240,
-9593,
-9017,
-4582,
1777,
7726,
11563,
8630,
2345,
-2338,
-5975,
-7088,
-6654,
-6631,
-4640,
-3211,
-985,
196,
1007,
2033,
1598,
3099,
5949,
5953,
6346,
7222,
5282,
4290,
-164,
-5345,
-10990,
-15030,
-14890,
-11329,
-3592,
5260,
9645,
10868,
9584,
3687,
-1181,
-6498,
-9910,
-10921,
-7021,
-1237,
7201,
15047,
16324,
15291,
6648,
-3714,
-11501,
-19674,
-23159,
-20173,
-11592,
1880,
13036,
20240,
21652,
16684,
10444,
2619,
-7170,
-15190,
-18820,
-17275,
-10406,
2721,
13593,
20404,
22945,
15583,
7501,
-4293,
-13714,
-17548,
-18479,
-16420,
-11819,
-3806,
3890,
11980,
15616,
16003,
12765,
6363,
-264,
-4798,
-6307,
-3687,
4,
1492,
1411,
-2052,
-5047,
-5215,
-4121,
-2041,
-812,
-305,
787,
2137,
4135,
3421,
567,
-2244,
-3694,
-1785,
-221,
3417,
8143,
10557,
11981,
9156,
2544,
-6086,
-13883,
-20102,
-20804,
-15635,
-6879,
1373,
10399,
17065,
20191,
18034,
9782,
2239,
-6575,
-12894,
-15965,
-14314,
-7449,
3191,
11569,
17505,
16422,
9462,
884,
-9992,
-15995,
-16045,
-14320,
-11162,
-4906,
2050,
10894,
17340,
18978,
14940,
6668,
-3686,
-11915,
-14529,
-11822,
-6530,
135,
6370,
10030,
10522,
7665,
2327,
-3291,
-7235,
-10080,
-11520,
-11566,
-7580,
-1817,
3305,
6350,
8057,
8005,
6753,
4409,
3600,
5616,
5236,
3178,
-884,
-7895,
-13595,
-15642,
-14226,
-7632,
-937,
6330,
10120,
10403,
9424,
7841,
5136,
-240,
-4451,
-10104,
-11460,
-7885,
-183,
9211,
17270,
19287,
16485,
6192,
-6226,
-15582,
-22710,
-21993,
-18659,
-11715,
-3877,
6235,
15337,
22220,
24560,
21206,
10955,
-440,
-11098,
-17510,
-17140,
-14900,
-6134,
1474,
7458,
10615,
9917,
7509,
3766,
-1993,
-4259,
-8192,
-10819,
-7802,
-6626,
1105,
8578,
11291,
10705,
5787,
568,
-2491,
-1570,
-583,
1270,
891,
-1128,
-3862,
-6991,
-4315,
-2872,
-1708,
-25,
-173,
751,
301,
1020,
5017,
4924,
2363,
-1539,
-4676,
-5724,
-3122,
3820,
9467,
11488,
7727,
3274,
-3132,
-9460,
-12920,
-14366,
-13257,
-10522,
-6811,
-2743,
4191,
12204,
17579,
17339,
10879,
2067,
-6093,
-13447,
-14968,
-10693,
-4256,
3417,
9440,
12771,
10606,
4749,
-1451,
-8840,
-13082,
-14693,
-14975,
-12467,
-5208,
7436,
17736,
25154,
24144,
15353,
6004,
-2904,
-7663,
-12354,
-14325,
-13415,
-10553,
-4654,
3270,
10559,
12792,
11547,
9299,
4607,
-1897,
-7280,
-11623,
-9931,
-4423,
2952,
6878,
6433,
5928,
3707,
4321,
5138,
3480,
1229,
-2444,
-4649,
-3013,
-4922,
-7019,
-7492,
-7552,
-4865,
-1594,
2579,
5786,
9407,
10552,
8685,
6067,
-38,
-6476,
-11154,
-9164,
-4389,
-1166,
3763,
6904,
9030,
9242,
6115,
-1039,
-6411,
-12319,
-17261,
-16385,
-12985,
-3390,
7895,
16101,
21236,
19581,
12659,
4518,
-4319,
-7839,
-11452,
-13600,
-12395,
-6701,
2662,
7504,
12158,
10976,
4695,
-1012,
-8236,
-12987,
-12063,
-8110,
-2280,
4556,
9955,
14297,
14190,
11391,
6975,
-535,
-7628,
-12475,
-14596,
-13161,
-7825,
-2287,
3605,
6709,
7821,
7827,
3439,
-164,
-2299,
-3575,
-2587,
95,
2372,
2583,
252,
-620,
-1472,
-701,
2439,
5251,
5921,
5163,
4936,
1427,
-2981,
-7424,
-13008,
-16206,
-14928,
-9464,
-896,
10078,
18061,
19652,
17087,
9525,
1511,
-3494,
-8841,
-11807,
-11537,
-10210,
-5751,
451,
8791,
13378,
11611,
6678,
-2838,
-10899,
-15435,
-15450,
-11406,
-5007,
2606,
9030,
14847,
17556,
16311,
11354,
2002,
-6386,
-13712,
-16848,
-14327,
-10129,
-2331,
3000,
6369,
7050,
4623,
2109,
-1556,
-3975,
-5317,
-3479,
314,
4064,
5883,
7243,
6897,
4082,
1908,
-608,
-3961,
-6978,
-6934,
-4896,
-1353,
477,
506,
-2318,
-3417,
-3716,
-3774,
113,
2707,
8292,
10589,
9194,
5419,
-622,
-5239,
-9169,
-9094,
-6548,
-4712,
-760,
6674,
12469,
14142,
8983,
-582,
-8498,
-13682,
-16165,
-15556,
-11091,
-4406,
5713,
15514,
20354,
20964,
15151,
7566,
516,
-6669,
-13519,
-18361,
-17894,
-12653,
-2789,
6079,
12449,
12359,
7578,
1411,
-6745,
-9226,
-9049,
-6501,
-3054,
2726,
8552,
13396,
16319,
14018,
7955,
-748,
-6591,
-12787,
-14046,
-11027,
-7720,
-2685,
1501,
2119,
1649,
980,
-89,
1828,
3631,
5123,
5764,
6065,
6639,
5189,
1967,
-2400,
-7348,
-8844,
-6855,
-3903,
-865,
2318,
4506,
4609,
2971,
-1207,
-4636,
-9182,
-9228,
-5550,
554,
8490,
12613,
14581,
14236,
10881,
2164,
-5278,
-12231,
-16719,
-15723,
-10696,
-2616,
7502,
13869,
15101,
12408,
4868,
-1871,
-8251,
-12985,
-14817,
-11861,
-7882,
1292,
10852,
18734,
24548,
19757,
11637,
1477,
-9246,
-15965,
-19502,
-19108,
-12762,
-4729,
4297,
10234,
9992,
8301,
2951,
-634,
-2432,
-4373,
-4711,
-2974,
1592,
7935,
12841,
10791,
5984,
154,
-3991,
-6890,
-9392,
-10247,
-8849,
-5284,
-518,
2004,
754,
-1308,
-2587,
299,
5128,
8921,
8762,
7232,
6408,
6949,
5647,
-93,
-6632,
-12302,
-14116,
-12995,
-6194,
2054,
5955,
9819,
8531,
5890,
1944,
-3571,
-7134,
-9018,
-6146,
-387,
4451,
9373,
14068,
14380,
12385,
4213,
-3565,
-12923,
-21064,
-20780,
-16412,
-5719,
4765,
13354,
15756,
14439,
10583,
2249,
-5299,
-11819,
-15978,
-15413,
-10717,
-2614,
8602,
17634,
22568,
18891,
9982,
-570,
-11257,
-17102,
-19742,
-16621,
-10709,
-4419,
512,
5339,
9050,
9436,
8963,
5783,
1155,
-1789,
-3715,
-4118,
965,
5195,
6742,
5514,
1465,
-2190,
-6592,
-8866,
-8177,
-6321,
-3518,
-278,
1464,
2835,
1805,
-1461,
-518,
1924,
3597,
6195,
4536,
3523,
6042,
7169,
8177,
2631,
-6387,
-14908,
-19456,
-16142,
-9557,
771,
8286,
11591,
12738,
11545,
6243,
-831,
-5717,
-10156,
-11827,
-8970,
-4851,
1710,
11338,
16712,
18063,
13048,
1512,
-8460,
-17523,
-21767,
-18525,
-11788,
-3741,
4349,
11869,
16355,
17030,
11574,
4524,
-2888,
-11214,
-13588,
-13619,
-9323,
1078,
9253,
16520,
18224,
12499,
5123,
-5648,
-13446,
-15674,
-14508,
-11331,
-8759,
-4166,
2440,
10349,
15439,
14737,
12322,
6233,
840,
-2469,
-3634,
-2443,
-1585,
781,
-612,
-3368,
-5905,
-8846,
-7979,
-5494,
-2120,
454,
2199,
2144,
4315,
4791,
3101,
1829,
-2799,
-5419,
-4214,
-1172,
4349,
11687,
12616,
11868,
4466,
-6001,
-11898,
-15256,
-15231,
-11207,
-4936,
1,
9124,
15334,
18166,
17229,
9922,
1335,
-5656,
-13441,
-15756,
-13395,
-7438,
2357,
9515,
15889,
16371,
11359,
4761,
-3634,
-9986,
-12825,
-13849,
-14731,
-11798,
-2818,
6839,
16774,
19837,
16112,
9247,
-552,
-5824,
-9875,
-8740,
-4158,
-1452,
3779,
6221,
6048,
3879,
1179,
-269,
-3781,
-4793,
-6751,
-8238,
-5670,
-1911,
3267,
5702,
5077,
2702,
1131,
1391,
3395,
4798,
5925,
6639,
4266,
2335,
-2774,
-9514,
-13480,
-15466,
-12984,
-5908,
979,
6938,
11255,
14199,
15789,
11173,
5096,
-3684,
-12626,
-14420,
-11731,
-4175,
3196,
10107,
13848,
11311,
5760,
-3276,
-9570,
-12860,
-14769,
-12881,
-10417,
-3276,
4758,
11291,
17862,
17304,
13477,
5534,
-6557,
-14646,
-17538,
-14659,
-7607,
-270,
7069,
11114,
12245,
10705,
3640,
-3636,
-8906,
-12730,
-15121,
-14252,
-9892,
-3553,
6940,
13348,
15056,
14049,
8456,
3067,
-1147,
-2300,
-3666,
-3249,
-2150,
-1883,
-4417,
-7226,
-5943,
-3993,
1618,
5682,
3613,
706,
-153,
-430,
2838,
3540,
878,
-1849,
-4170,
-3452,
-1087,
5426,
10474,
13272,
12761,
6375,
-2717,
-12183,
-19367,
-21760,
-19777,
-12163,
-4330,
3164,
13552,
19514,
22871,
18839,
11252,
1624,
-9082,
-15658,
-19547,
-17291,
-11005,
-1289,
6507,
11792,
13334,
9997,
4223,
-2030,
-6542,
-8524,
-10975,
-13606,
-11048,
-5571,
4153,
13741,
16338,
14421,
7971,
529,
-4298,
-5384,
-5260,
-4495,
-2204,
-1642,
-540,
178,
-1496,
-1945,
-329,
-918,
-444,
-2885,
-3745,
-2579,
1097,
5949,
5669,
4505,
1206,
80,
707,
4553,
7816,
9438,
7351,
2666,
-1919,
-7218,
-12203,
-14023,
-13048,
-7844,
-2943,
2142,
9737,
11961,
15150,
15006,
10405,
3780,
-4363,
-11670,
-15380,
-10907,
-2184,
6258,
12214,
12010,
9130,
2423,
-6054,
-10355,
-13279,
-13969,
-13256,
-9836,
-1479,
7627,
15723,
21808,
20890,
13599,
5475,
-6230,
-15513,
-18050,
-18138,
-12382,
-4777,
1887,
9050,
12052,
11834,
11127,
6399,
1636,
-6134,
-12156,
-14352,
-13409,
-6414,
577,
8250,
11252,
10128,
8587,
5104,
5350,
4942,
2027,
-221,
-3498,
-5550,
-7702,
-9962,
-9469,
-4961,
-1440,
1715,
2348,
2933,
5220,
7961,
10086,
8923,
4713,
-2205,
-6687,
-9484,
-5468,
-1217,
3286,
6883,
7075,
5789,
336,
-3907,
-8110,
-10029,
-11664,
-12751,
-9177,
-3913,
3701,
14068,
21291,
24141,
18502,
5539,
-5826,
-12583,
-15558,
-15387,
-13155,
-9863,
-3153,
3672,
9738,
13930,
10536,
5299,
798,
-6109,
-9374,
-11772,
-10262,
-5308,
2410,
12041,
15464,
15337,
10234,
3635,
-3097,
-7243,
-10591,
-12045,
-10035,
-8557,
-2335,
4756,
8595,
8492,
7510,
3971,
346,
-2809,
-7208,
-7577,
-5505,
-1632,
1311,
2485,
3626,
6576,
8063,
8859,
8353,
3005,
-2389,
-8910,
-11446,
-9163,
-8576,
-7955,
-8124,
-7461,
-3791,
2037,
9993,
14396,
16418,
16129,
11319,
3799,
-5901,
-11668,
-14601,
-14821,
-10166,
-5290,
741,
6525,
9330,
10982,
8782,
1627,
-3745,
-10624,
-14505,
-12071,
-7992,
202,
8074,
14925,
18784,
18324,
12849,
4109,
-5775,
-13583,
-17411,
-18860,
-14896,
-9748,
-1682,
7919,
14510,
18104,
14074,
7081,
-1604,
-9404,
-11172,
-9914,
-7739,
-4190,
313,
3601,
7992,
9266,
8140,
6387,
1592,
-3518,
-7325,
-10273,
-10178,
-6157,
-1580,
1511,
3073,
1508,
-747,
231,
2475,
3709,
2595,
1872,
2222,
3950,
5597,
3197,
589,
-1789,
-4175,
-3784,
-3218,
-2378,
-2084,
-1573,
-1571,
-1982,
-1509,
-4495,
-6821,
-5903,
-2355,
4856,
11410,
15560,
16169,
11917,
8508,
3498,
-5114,
-12970,
-18691,
-21430,
-16715,
-11280,
-1589,
12074,
18330,
21987,
16115,
5113,
-3904,
-11626,
-15135,
-13110,
-8906,
-4933,
2171,
8799,
15694,
18523,
13490,
5599,
-3438,
-13035,
-18450,
-18671,
-14159,
-5062,
2666,
8819,
12717,
11226,
8883,
5675,
958,
-2728,
-7396,
-9666,
-9349,
-5183,
3799,
8543,
9181,
7793,
3848,
916,
-2031,
-6417,
-6809,
-4425,
-1605,
360,
-301,
-4042,
-4430,
-2486,
667,
6577,
7542,
7051,
5863,
5471,
7757,
9026,
3673,
-4781,
-10846,
-12742,
-12385,
-9281,
-2857,
4086,
9849,
9984,
6754,
515,
-3701,
-5584,
-5468,
-1305,
1817,
3275,
5608,
10077,
14053,
14142,
7697,
-4180,
-12810,
-19428,
-21746,
-15777,
-8257,
1821,
11459,
15606,
16226,
13065,
6720,
443,
-5444,
-8084,
-11229,
-13756,
-11708,
-3797,
10234,
18412,
21722,
16862,
6341,
-2127,
-10481,
-13812,
-12700,
-11911,
-10937,
-8206,
-2738,
4974,
10412,
13591,
13517,
10462,
4524,
-2389,
-9413,
-10791,
-6156,
-265,
3066,
4332,
3139,
-1446,
-2761,
-1436,
1566,
903,
-2252,
-6049,
-7943,
-6714,
-2810,
-799,
927,
3436,
5048,
7881,
7770,
6320,
8183,
8141,
3066,
-958,
-9221,
-17476,
-20504,
-19148,
-11275,
-753,
6201,
9803,
11382,
11461,
11072,
7654,
3742,
-2848,
-10750,
-13665,
-13217,
-6984,
2647,
11298,
16198,
14359,
8857,
89,
-9133,
-14123,
-12445,
-9559,
-7737,
-5281,
-1447,
5820,
13115,
17237,
14163,
7787,
-1324,
-9004,
-13363,
-14409,
-9211,
-2827,
6074,
9744,
11589,
12209,
7247,
2441,
-2722,
-7836,
-11640,
-15242,
-15654,
-10555,
-3123,
7502,
14540,
17121,
15372,
8587,
3560,
-991,
-2368,
-2836,
-4683,
-6272,
-7798,
-7846,
-7382,
-3714,
1023,
5180,
5650,
1590,
-1847,
-3724,
-2447,
740,
2148,
2125,
636,
-1006,
539,
3775,
9439,
11820,
9641,
3965,
-3672,
-9981,
-16004,
-18107,
-15796,
-11172,
-5395,
1187,
7081,
14995,
19011,
19730,
17216,
7202,
-3373,
-12180,
-18746,
-19522,
-14622,
-6191,
4623,
11911,
16872,
15330,
10895,
5381,
-1813,
-6522,
-11810,
-15395,
-16761,
-14939,
-5464,
6270,
15679,
20437,
17368,
12399,
4556,
-2720,
-4339,
-6095,
-7597,
-6458,
-5863,
-2841,
1843,
3711,
5109,
5049,
1395,
-3337,
-8934,
-11728,
-9244,
-4574,
1118,
5992,
8488,
9204,
9704,
11141,
11176,
7154,
102,
-7887,
-11552,
-13148,
-11830,
-11955,
-9330,
-2683,
-17,
3898,
5777,
6805,
8011,
9497,
9183,
7212,
2198,
-6335,
-11277,
-11679,
-5602,
188,
5353,
8714,
7345,
6674,
2864,
-3768,
-7444,
-9375,
-11381,
-9855,
-8281,
-3479,
3909,
12570,
20302,
21060,
14836,
3116,
-6003,
-12473,
-15519,
-15167,
-11750,
-6561,
2289,
9450,
15020,
19118,
15196,
6877,
-3037,
-11369,
-16679,
-18193,
-17474,
-12125,
-1469,
10299,
18736,
22427,
19553,
15837,
9742,
2269,
-4039,
-11268,
-15548,
-18960,
-15306,
-8629,
-2055,
4598,
6188,
5790,
4645,
2750,
606,
-283,
249,
2582,
3879,
4585,
4763,
3824,
4407,
2103,
384,
-1702,
-6266,
-9969,
-9461,
-6891,
-4305,
-957,
-2321,
-2379,
-2316,
-1297,
3551,
8502,
11177,
11144,
8935,
3800,
510,
-4637,
-8011,
-9832,
-11635,
-9624,
-6318,
-1305,
4849,
9575,
11043,
9746,
3329,
-5021,
-11545,
-15548,
-14407,
-8733,
-1169,
6893,
14500,
18457,
18454,
13930,
3947,
-5942,
-14072,
-19125,
-18734,
-15444,
-8384,
1914,
11356,
17235,
18060,
12259,
2378,
-6986,
-13340,
-14099,
-12155,
-9789,
-3130,
5849,
16352,
23560,
23404,
17584,
5698,
-6685,
-14951,
-19629,
-21057,
-19366,
-14248,
-6396,
1479,
9990,
12914,
13150,
12031,
11168,
9150,
3784,
-949,
-5313,
-4332,
-5827,
-4435,
-3111,
-5274,
-5321,
-3916,
-1530,
2212,
4562,
2549,
614,
-2161,
-1805,
-3466,
-5323,
-3863,
-2311,
1574,
5633,
8863,
11662,
13173,
10072,
4254,
-1902,
-11539,
-19284,
-21865,
-18471,
-8943,
-259,
8701,
14891,
16283,
15365,
8253,
397,
-5166,
-9547,
-13058,
-13401,
-11514,
-4466,
8828,
17119,
22119,
18973,
8631,
-2046,
-11455,
-16491,
-16587,
-14266,
-8582,
-3236,
642,
5706,
10451,
13679,
10926,
6691,
-430,
-5833,
-7285,
-6468,
-1970,
4425,
9194,
9991,
6538,
2280,
998,
-3040,
-5937,
-9037,
-12671,
-13508,
-12133,
-5048,
3819,
11555,
16789,
16971,
14003,
8874,
2502,
-882,
-3035,
-4723,
-4419,
-7294,
-8906,
-8496,
-8724,
-3167,
3692,
9185,
11481,
8000,
4161,
864,
-887,
-256,
-2117,
-6070,
-8037,
-9236,
-7143,
520,
8162,
13902,
18040,
14356,
6058,
-1477,
-11054,
-15227,
-16499,
-16318,
-12177,
-8479,
-857,
8007,
15591,
19499,
18213,
11556,
1112,
-7940,
-14703,
-15337,
-9621,
-2012,
5625,
10007,
10580,
9719,
5168,
-271,
-4638,
-10201,
-13375,
-15455,
-16335,
-12932,
-5043,
6783,
17269,
23583,
19122,
11117,
3722,
-3638,
-4081,
-4673,
-6984,
-7758,
-6477,
-4830,
-1750,
18,
1788,
2588,
594,
-1848,
-3618,
-4084,
-2566,
3012,
8343,
9200,
5542,
2043,
-1098,
-72,
417,
-352,
-366,
-2371,
-2676,
-2386,
-2970,
-3540,
-3239,
-2916,
-3083,
-2420,
-357,
2130,
5252,
8869,
10986,
6895,
-1713,
-9323,
-13811,
-13372,
-6056,
1979,
9698,
16482,
17503,
14228,
6840,
-1866,
-9847,
-16368,
-21475,
-25294,
-21995,
-13158,
574,
16170,
26205,
30853,
23098,
11750,
1181,
-6711,
-9599,
-13483,
-13646,
-13328,
-8892,
-1365,
4848,
11161,
11538,
6136,
-1926,
-10454,
-15533,
-14934,
-10354,
-1956,
7124,
14966,
18470,
16957,
12173,
7502,
3910,
-3856,
-9856,
-15270,
-15378,
-10369,
-7213,
-2476,
782,
2873,
1968,
926,
2451,
3425,
5950,
9204,
10014,
9972,
4644,
-3328,
-10884,
-13967,
-10746,
-5954,
-608,
3713,
8909,
10401,
9995,
6079,
1382,
-3839,
-12641,
-18251,
-18093,
-13183,
-2972,
8416,
17377,
20893,
15298,
7624,
-874,
-5817,
-7704,
-9115,
-8637,
-5558,
383,
4799,
9385,
11953,
8063,
1882,
-7800,
-17729,
-19439,
-17951,
-11113,
1075,
11771,
21438,
24241,
22514,
17174,
10011,
2101,
-7860,
-16025,
-21983,
-20656,
-15404,
-7367,
3775,
9437,
10748,
10422,
6080,
1704,
-2248,
-4223,
-2228,
1631,
5133,
6971,
5477,
2379,
1673,
768,
-16,
-1456,
-6664,
-7780,
-5535,
-3357,
543,
46,
-2465,
-5293,
-6196,
-5401,
-506,
6888,
12793,
17054,
15308,
10106,
1740,
-6861,
-11201,
-15051,
-14902,
-10955,
-6758,
1333,
9325,
15285,
16079,
10622,
1607,
-7576,
-14953,
-19057,
-18847,
-13344,
-5921,
4561,
15593,
21525,
25327,
21517,
14689,
5211,
-5979,
-15347,
-22045,
-25231,
-23043,
-12950,
-779,
9744,
12995,
10687,
7911,
3718,
937,
-1598,
-2235,
-1477,
917,
3413,
6854,
11128,
9817,
5926,
-909,
-6480,
-11643,
-14288,
-15273,
-11021,
-2937,
2610,
5599,
4413,
2307,
1891,
5357,
7672,
8398,
6117,
4273,
1611,
1372,
953,
-4802,
-9208,
-11847,
-12633,
-9195,
-3366,
2555,
10366,
12947,
12198,
6483,
-2875,
-8301,
-12370,
-11878,
-7321,
-1069,
5221,
11778,
15360,
17168,
16536,
8897,
-1327,
-11300,
-20660,
-23931,
-18370,
-9578,
-252,
9737,
16143,
18064,
13755,
3087,
-4852,
-11582,
-14641,
-14815,
-12643,
-7253,
3095,
16954,
25529,
28997,
21134,
6927,
-6776,
-18771,
-24250,
-26520,
-25145,
-18091,
-7681,
2948,
10811,
18313,
19253,
18254,
14107,
6838,
1227,
-5998,
-9726,
-7591,
-3394,
910,
2791,
-1741,
-5577,
-7233,
-4964,
-1284,
2733,
2889,
583,
489,
-606,
108,
-480,
-1047,
108,
1961,
5778,
7434,
7757,
9258,
7319,
5526,
905,
-7985,
-16619,
-20164,
-17869,
-9352,
2423,
9337,
13920,
13667,
9991,
7232,
2063,
-3940,
-9150,
-12206,
-12753,
-9529,
-2239,
7500,
18764,
22958,
19905,
10723,
-3269,
-13728,
-20314,
-23499,
-19642,
-11919,
-3666,
4526,
10295,
15663,
17814,
12437,
5244,
-2451,
-10468,
-11662,
-8642,
-2049,
5766,
11176,
13251,
9720,
5111,
-3311,
-11508,
-14547,
-15092,
-12596,
-10384,
-6866,
-1218,
6605,
14505,
18425,
17711,
11379,
4204,
-1469,
-4388,
-4456,
-5880,
-5602,
-6376,
-8226,
-6584,
-5071,
-1056,
2886,
3830,
5664,
5668,
3502,
1845,
2029,
3663,
2273,
-2189,
-5964,
-8998,
-5505,
1778,
9233,
14174,
13582,
10583,
2964,
-3426,
-8636,
-13354,
-15786,
-15663,
-12023,
-5812,
1650,
11818,
20126,
22334,
18459,
8664,
-2057,
-12003,
-17297,
-16435,
-8497,
508,
8085,
12728,
13915,
11200,
5494,
-1060,
-7421,
-13172,
-17474,
-18284,
-16415,
-8700,
1119,
10724,
19159,
20813,
16398,
10116,
2647,
-2197,
-5278,
-8974,
-11959,
-11078,
-8312,
-5451,
-2590,
-1545,
870,
191,
429,
-777,
-2433,
-1545,
-1836,
2565,
6317,
6091,
2958,
114,
-614,
-1089,
55,
605,
-477,
-2670,
-2829,
-1728,
-1380,
-1974,
-4140,
-3984,
-3872,
-3914,
-1486,
947,
3980,
8732,
11487,
9225,
4719,
-3020,
-8700,
-9590,
-6816,
-604,
3487,
7363,
10836,
10523,
8726,
3040,
-6165,
-12336,
-17269,
-18405,
-16566,
-9436,
1102,
10005,
21079,
24392,
22514,
13970,
1730,
-6589,
-11972,
-13997,
-13345,
-11664,
-8081,
-214,
7321,
13872,
15213,
7964,
-2644,
-10866,
-16040,
-16404,
-13712,
-7095,
2750,
12923,
19232,
21179,
18086,
12173,
5811,
-2178,
-10183,
-17130,
-18028,
-18141,
-13501,
-4752,
4891,
11817,
12137,
9730,
5551,
2847,
-234,
-2172,
-2610,
-1300,
1377,
2018,
1267,
-513,
-276,
174,
263,
1071,
762,
-1207,
-1281,
1,
971,
441,
-4245,
-8561,
-10309,
-7913,
-2387,
3061,
7895,
10698,
12703,
9002,
4218,
489,
-4496,
-5651,
-7721,
-6784,
-2901,
-868,
1999,
6374,
8593,
6826,
598,
-9066,
-14976,
-15331,
-12515,
-5044,
4041,
11408,
17441,
19894,
19222,
17077,
9747,
-2314,
-12556,
-19122,
-21415,
-18920,
-12741,
-4651,
6550,
12279,
13795,
12097,
5749,
-1353,
-5762,
-7355,
-4956,
-2033,
-1331,
841,
4766,
12522,
16645,
13587,
3529,
-7260,
-14833,
-17609,
-17040,
-12182,
-5870,
-1572,
3213,
6644,
10542,
12534,
11113,
9027,
5489,
208,
-5840,
-11218,
-13123,
-8088,
-2365,
1195,
5210,
5905,
6230,
6377,
5355,
2321,
-193,
-5179,
-9182,
-10399,
-9198,
-6061,
-3830,
-85,
4118,
7772,
10041,
10472,
9040,
9147,
6712,
4231,
952,
-7958,
-14825,
-16838,
-15635,
-8199,
-608,
2907,
6168,
5931,
5093,
5037,
1660,
-667,
-2381,
-4265,
-2833,
-407,
2522,
6914,
11166,
11130,
8459,
1378,
-8365,
-14054,
-16924,
-15738,
-10501,
-5034,
-172,
4985,
10253,
14758,
16465,
12767,
5585,
-3051,
-9761,
-12361,
-12756,
-7627,
-208,
6904,
8870,
9331,
8890,
2003,
-1870,
-4349,
-7855,
-9225,
-8954,
-9875,
-7628,
-1409,
6985,
14734,
16152,
12610,
6319,
-2431,
-6850,
-6839,
-5911,
-5636,
-4833,
-2108,
961,
4397,
4350,
5365,
4420,
1203,
-2397,
-7904,
-12647,
-13395,
-8518,
-2537,
4197,
7613,
7330,
7388,
7548,
10479,
11433,
6597,
557,
-5488,
-9668,
-11504,
-13415,
-12525,
-10556,
-6222,
-123,
3577,
7135,
8912,
12710,
13268,
10806,
5861,
-3138,
-8602,
-12499,
-11084,
-2303,
2983,
7020,
8714,
6637,
5016,
775,
-4176,
-7554,
-10376,
-13288,
-12023,
-6366,
1171,
10793,
18346,
19829,
16689,
7872,
-2893,
-9700,
-12346,
-11875,
-9540,
-7283,
-2933,
2581,
8795,
14032,
12838,
9080,
-414,
-9960,
-14766,
-16009,
-12993,
-7237,
1768,
8831,
14985,
16013,
10834,
6633,
2104,
-1807,
-5366,
-8172,
-11370,
-12310,
-7046,
-585,
7232,
11655,
9234,
3110,
-4585,
-8817,
-9848,
-10023,
-6552,
-659,
3284,
6720,
9041,
11726,
13060,
12407,
7888,
1764,
-4891,
-12427,
-15337,
-14040,
-9028,
-5450,
-2946,
-2085,
-1044,
2583,
7955,
11275,
11483,
10859,
7059,
3347,
-1840,
-5882,
-7178,
-9209,
-7801,
-5718,
-3165,
914,
5118,
9419,
9877,
8436,
2095,
-6095,
-10570,
-13343,
-10472,
-4814,
887,
8025,
12608,
14651,
14445,
10579,
3505,
-2751,
-8179,
-13192,
-14620,
-12906,
-7052,
2758,
10787,
15096,
12676,
4993,
-1588,
-7154,
-9066,
-8483,
-7328,
-4863,
-2944,
892,
8472,
14738,
17685,
14446,
7535,
-2169,
-10127,
-14475,
-16574,
-13407,
-10366,
-4084,
1700,
5173,
7768,
7456,
5573,
3471,
1286,
-870,
-3879,
-4615,
-2442,
2785,
6635,
6650,
5845,
2152,
-1266,
-4558,
-7745,
-9708,
-8487,
-7131,
-5937,
-5484,
-3727,
1190,
6260,
9948,
12589,
13919,
9617,
4013,
192,
-1516,
-2937,
-4340,
-10088,
-14647,
-13012,
-9060,
-186,
8899,
13232,
13734,
11459,
6834,
975,
-6417,
-10079,
-10812,
-10098,
-7926,
-4556,
553,
9370,
17741,
18921,
16401,
6107,
-5700,
-12125,
-17804,
-17144,
-11946,
-7593,
-863,
4679,
9909,
13173,
12359,
7768,
1385,
-4755,
-8728,
-9988,
-9088,
-3768,
2171,
9249,
13408,
14250,
8877,
638,
-4804,
-10005,
-11337,
-11118,
-10121,
-9632,
-7233,
-2334,
4099,
10506,
10917,
9483,
6647,
3374,
2250,
758,
-440,
-1838,
-1275,
-2858,
-6528,
-7731,
-8790,
-6437,
-3335,
138,
1836,
1303,
1494,
2666,
5734,
5002,
1722,
-1043,
-3203,
-3493,
-64,
4013,
5227,
6168,
5127,
-172,
-4903,
-9408,
-12666,
-12900,
-9749,
-2103,
4141,
8912,
12589,
11202,
9265,
7039,
217,
-5061,
-12201,
-16752,
-15447,
-9121,
3455,
12371,
19277,
21033,
17010,
9692,
-924,
-9729,
-14851,
-17886,
-16300,
-13567,
-8968,
389,
8639,
16792,
19533,
17628,
11807,
3214,
-4785,
-9714,
-8135,
-6546,
-4991,
-3888,
-3209,
1162,
4138,
5131,
5391,
1916,
-2043,
-5995,
-7739,
-7781,
-6104,
-876,
4364,
9297,
10730,
8531,
5459,
2837,
3514,
2270,
-2575,
-7534,
-10991,
-11610,
-10084,
-6400,
-371,
2557,
3112,
4398,
6161,
7349,
4308,
2865,
1710,
1316,
560,
-3393,
-6183,
-5181,
-866,
3746,
6188,
4972,
3158,
719,
-2577,
-3087,
-2031,
-2790,
-3898,
-5265,
-3631,
-144,
5283,
10561,
11140,
9274,
5204,
-1242,
-7079,
-9108,
-7351,
-5052,
-2167,
2654,
5610,
8148,
8744,
6580,
4709,
358,
-6658,
-12308,
-16360,
-16395,
-10307,
-2027,
5719,
12704,
17130,
17066,
13189,
6760,
2135,
-3755,
-9717,
-13818,
-15634,
-12860,
-9850,
-2558,
4701,
7737,
10130,
7541,
2077,
-1353,
-3944,
-4769,
-2032,
-812,
-822,
1230,
2832,
8225,
11829,
9974,
7110,
-151,
-6946,
-10839,
-15392,
-14498,
-10200,
-6500,
-1373,
2246,
6262,
9684,
12017,
12262,
10033,
5453,
-2030,
-7775,
-9242,
-8047,
-5127,
-1345,
-82,
173,
1000,
-122,
-1328,
520,
1239,
2249,
1861,
-943,
-1766,
-4312,
-3992,
-2218,
283,
3510,
3478,
2614,
2109,
4795,
5653,
6311,
3795,
-1795,
-5063,
-8710,
-9410,
-6979,
-3667,
301,
3051,
2290,
2303,
2059,
129,
772,
1371,
-998,
-2152,
-2323,
-1258,
5222,
12121,
12645,
8614,
825,
-6295,
-10047,
-12608,
-12725,
-12041,
-10030,
-6657,
-1482,
5226,
11550,
13994,
12775,
10356,
5927,
-14,
-5556,
-8191,
-7785,
-4735,
-723,
3692,
5512,
5554,
3789,
-878,
-3922,
-5698,
-7824,
-8309,
-9657,
-7368,
-1597,
3990,
11244,
14269,
13391,
9778,
5353,
357,
-3451,
-7973,
-10129,
-9008,
-8219,
-5414,
-2676,
1154,
5861,
9370,
9187,
5348,
1145,
-3158,
-5603,
-3314,
-746,
-691,
-2229,
-1839,
-1360,
2204,
6411,
8204,
8395,
5521,
1600,
-2643,
-6178,
-8656,
-8813,
-6816,
-4879,
-4511,
-3082,
-1274,
1348,
5588,
9613,
10401,
8071,
3960,
332,
-2546,
-3232,
-3618,
-3975,
-3130,
-1928,
516,
2145,
2495,
1244,
-1251,
-4300,
-6142,
-6816,
-5784,
-3180,
-1184,
1784,
8631,
14021,
16202,
12862,
4494,
-769,
-4741,
-7907,
-9899,
-12438,
-13116,
-10555,
-5617,
694,
8243,
11882,
10601,
7903,
2504,
-2092,
-5216,
-7224,
-5816,
-3174,
102,
3198,
6307,
8909,
8189,
6685,
2413,
-2809,
-6447,
-10214,
-10593,
-8298,
-3813,
1324,
4219,
5422,
6060,
5740,
4357,
3115,
422,
-3030,
-4518,
-3324,
-1740,
425,
2226,
2527,
2784,
2002,
1613,
836,
-999,
-3214,
-3083,
-1816,
-313,
1098,
-853,
-2208,
-3017,
-2476,
196,
3331,
5219,
6215,
6252,
5421,
6311,
4279,
119,
-3246,
-6353,
-7540,
-8929,
-9317,
-6682,
-2882,
3431,
7211,
8105,
6854,
3460,
301,
-1986,
-2862,
-3801,
-3566,
-3161,
-1442,
2014,
5716,
7538,
6466,
2082,
-2652,
-5878,
-8420,
-9134,
-8410,
-4780,
-188,
4638,
8760,
10305,
8328,
3768,
475,
-1321,
-2804,
-4435,
-6195,
-6380,
-5062,
-1021,
4009,
7451,
8793,
7311,
3584,
-1022,
-3997,
-6679,
-6642,
-5297,
-3542,
-464,
2789,
5068,
5473,
5617,
4383,
2590,
-356,
-3090,
-6320,
-7187,
-4728,
-1325,
909,
1560,
1180,
1311,
2574,
2801,
2431,
-511,
-3175,
-4460,
-4419,
-3335,
-1700,
-760,
-1354,
-1202,
422,
2534,
4447,
4822,
4212,
4489,
3770,
1976,
-646,
-4324,
-6825,
-8325,
-9323,
-8245,
-5431,
-976,
3041,
7304,
9333,
9513,
7934,
3529,
-37,
-3594,
-5305,
-5598,
-5914,
-5215,
-3017,
-299,
2352,
4103,
3935,
3130,
1076,
-1342,
-2594,
-4129,
-4474,
-3264,
-1463,
1633,
4744,
6325,
6768,
5397,
3192,
508,
-2692,
-5043,
-7498,
-7313,
-5153,
-2670,
918,
4617,
7056,
7453,
6509,
3717,
-80,
-3592,
-5639,
-6274,
-5234,
-3191,
-1094,
1908,
4393,
6158,
6910,
5953,
3090,
-790,
-4139,
-6306,
-5873,
-4948,
-2556,
750,
2923,
4903,
5125,
4117,
2003,
-538,
-2079,
-3537,
-3998,
-2928,
-1520,
1241,
3383,
4267,
4146,
2760,
1791,
1068,
227,
-1104,
-3005,
-5763,
-6483,
-5015,
-2803,
431,
2051,
2668,
2340,
1889,
2725,
3314,
4020,
4440,
3048,
1242,
440,
-797,
-2085,
-3976,
-5979,
-5994,
-5555,
-3635,
-603,
2243,
5170,
6535,
6613,
6187,
3458,
-536,
-2864,
-4465,
-4871,
-4429,
-3675,
-2137,
-494,
1198,
2862,
3564,
2711,
1308,
-368,
-2157,
-2879,
-3303,
-2582,
-1267,
24,
1986,
2311,
2687,
2644,
1401,
-519,
-2312,
-2824,
-2299,
-1776,
-652,
535,
910,
1605,
1414,
1331,
1029,
573,
-621,
-1483,
-2093,
-2435,
-1581,
-1327,
-812,
-425,
541,
1845,
2186,
2677,
2022,
1306,
549,
-689,
-1181,
-1579,
-1175,
-455,
541,
587,
676,
1148,
1577,
1432,
1053,
690,
79,
-532,
-1503,
-1988,
-1789,
-278,
1222,
2888,
3361,
3259,
2973,
1545,
289,
-1256,
-2619,
-3402,
-3647,
-3365,
-2638,
-1762,
-747,
1081,
2265,
3284,
3795,
3645,
3466,
2033,
801,
-443,
-1625,
-2676,
-4108,
-4368,
-3805,
-3141,
-1994,
-666,
1152,
2952,
3916,
3026,
2461,
1918,
420,
-1343,
-3176,
-3617,
-3545,
-2646,
-1000,
757,
2082,
2239,
1667,
1172,
505,
-98,
-734,
-711,
-174,
-267,
-256,
-193,
-361,
-435,
-355,
-348,
-490,
-809,
-1508,
-1168,
-628,
-536,
442,
953,
1683,
2417,
1907,
987,
433,
202,
-44,
-465,
-1198,
-1953,
-1608,
-1566,
-2018,
-1247,
-581,
-567,
96,
1193,
2008,
2243,
1975,
2047,
1668,
904,
90,
-970,
-1421,
-1437,
-1642,
-1405,
-822,
114,
575,
601,
639,
352,
-44,
-1083,
-1562,
-1218,
-547,
368,
1743,
2421,
2744,
2846,
2752,
1747,
114,
-1024,
-1902,
-2397,
-2653,
-2929,
-2998,
-2284,
-639,
840,
1678,
2252,
1843,
1888,
1502,
677,
-384,
-1400,
-1822,
-1677,
-1361,
-1269,
-735,
-177,
776,
1214,
1261,
1486,
1398,
1141,
890,
263,
20,
-283,
-1002,
-1395,
-1337,
-1447,
-1396,
-957,
-583,
60,
641,
857,
1085,
1806,
2039,
2280,
2271,
1680,
964,
293,
-212,
-712,
-952,
-1594,
-2265,
-1969,
-1411,
-935,
-352,
24,
233,
612,
1120,
1518,
1956,
1599,
1075,
439,
-223,
-397,
-647,
-645,
-751,
-791,
-904,
-1100,
-1187,
-1119,
-1076,
-944,
-506,
-487,
-659,
-205,
714,
1418,
1832,
1770,
1815,
1590,
1110,
928,
485,
-494,
-1268,
-2040,
-2408,
-2424,
-1991,
-1095,
-669,
-188,
716,
1200,
1459,
1960,
1422,
556,
-50,
-573,
-653,
-336,
196,
910,
1094,
893,
548,
410,
518,
516,
341,
263,
8,
-112,
-280,
-299,
219,
376,
195,
-130,
-316,
-356,
-334,
-380,
43,
279,
219,
345,
528,
415,
-79,
-390,
-266,
81,
313,
251,
-120,
-72,
79,
-641,
-1530,
-1678,
-1380,
-800,
-317,
258,
741,
1009,
1269,
1723,
2063,
1280,
182,
-393,
-512,
-329,
-497,
-574,
-362,
-368,
-441,
-751,
-673,
-550,
-690,
-586,
-424,
-90,
19,
-4,
203,
669,
898,
843,
418,
-54,
-42,
-270,
-390,
-364,
-182,
-259,
-841,
-1502,
-1587,
-1162,
-461,
232,
-188,
-896,
-941,
166,
1420,
2093,
2053,
1146,
254,
-162,
-184,
-84,
-266,
-695,
-796,
-723,
-641,
-368,
-190,
-364,
-482,
-241,
166,
752,
1326,
1165,
656,
261,
345,
345,
121,
-185,
-380,
-209,
106,
409,
697,
712,
163,
-361,
-893,
-943,
-795,
-627,
-296,
-134,
-66,
182,
626,
991,
1178,
813,
153,
-191,
-289,
-233,
-10,
229,
312,
167,
159,
186,
128,
-135,
-626,
-893,
-757,
-430,
-44,
244,
594,
1179,
1359,
1088,
835,
443,
233,
-28,
-187,
-355,
-422,
-287,
-136,
-224,
-635,
-1033,
-1017,
-297,
104,
346,
342,
127,
292,
533,
623,
585,
367,
162,
53,
-14,
-98,
-146,
-280,
-424,
-241,
-151,
-211,
-314,
-331,
-472,
-555,
-202,
-9,
56,
147,
72,
-131,
-79,
127,
284,
118,
-48,
-332,
-575,
-513,
-199,
277,
283,
-52,
-254,
-392,
-340,
-131,
249,
411,
438,
331,
266,
381,
472,
451,
322,
253,
87,
-18,
3,
31,
4,
20,
91,
52,
-28,
-180,
-324,
-360,
-123,
113,
152,
-89,
-382,
-451,
-152,
-7,
-15,
16,
-156,
-351,
-393,
-355,
-203,
-114,
86,
261,
191,
67,
-127,
-235,
-106,
114,
181,
31,
21,
128,
185,
130,
100,
201,
37,
-288,
-548,
-442,
-190,
-108,
5,
179,
405,
328,
134,
122,
251,
332,
180,
-61,
-11,
145,
95,
-206,
-321,
-254,
-313,
-297,
-360,
-331,
-203,
-166,
-138,
-200,
-284,
-311,
-84,
182,
307,
329,
337,
227,
62,
-286,
-422,
-408,
-381,
-258,
-148,
-112,
-127,
-51,
55,
84,
83,
140,
147,
122,
134,
213,
308,
389,
363,
279,
153,
24,
-112,
-177,
-147,
-44,
60,
15,
-83,
-208,
-233,
-164,
-79,
17,
28,
22,
16,
28,
48,
62,
204,
261,
216,
104,
27,
17,
92,
212,
186,
101,
110,
100,
199,
214,
150,
111,
21,
52,
224,
303,
273,
192,
203,
187,
154,
126,
144,
66,
-58,
-142,
-89,
12,
74,
105,
104,
190,
265,
252,
191,
53,
-17,
53,
95,
134,
96,
13,
-122,
-178,
-186,
-139,
-187,
-210,
-128,
-102,
-99,
-62,
-42,
-42,
-31,
-84,
-19,
41,
61,
58,
24,
-59,
-108,
-137,
-145,
-103,
-69,
-46,
7,
31,
8,
-67,
-68,
15,
94,
78,
41,
80,
153,
194,
199,
229,
233,
198,
175,
149,
172,
238,
289,
228,
198,
134,
33,
3,
20,
102,
183,
168,
206,
144,
83,
14,
20,
74,
90,
51,
44,
102,
173,
147,
73,
27,
-22,
-119,
-147,
-157,
-93,
-110,
-152,
-143,
-109,
-29,
40,
65,
39,
-11,
-67,
-5,
-8,
-2,
6,
-94,
-183,
-191,
-181,
-161,
-208,
-202,
-251,
-208,
-180,
-128,
-68,
-138,
-92,
-34,
-2,
-10,
-4,
-31,
-108,
-82,
19,
64,
90,
55,
-6,
-6,
59,
52,
-60,
-156,
-159,
-89,
-60,
-149,
-307,
-184,
-1,
-57,
45,
2,
-46,
-14,
-197,
-354,
-254,
-104,
-87,
98,
52,
-326,
-477,
-401,
-265,
-172,
-215,
-162,
-31,
30,
195,
194,
40,
57,
59,
104,
158,
56,
-4,
-7,
-16,
42,
80,
211,
164,
8,
201,
340,
408,
420,
405,
288,
211,
45,
-245,
-292,
-240,
-140,
-56,
3,
78,
-8,
22,
73,
165,
219,
133,
90,
62,
-120,
-345,
-354,
-254,
-111,
-123,
-203,
-242,
-265,
-100,
138,
155,
111,
-101,
-281,
-135,
-24,
77,
155,
138,
177,
195,
292,
286,
215,
47,
-176,
-65,
109,
203,
164,
13,
-132,
-233,
-166,
-83,
-142,
-61,
-74,
-11,
171,
173,
111,
-22,
-30,
73,
225,
243,
211,
223,
74,
-11,
-21,
-71,
-151,
-116,
-63,
-34,
-49,
-155,
-132,
0,
167,
195,
78,
67,
46,
150,
242,
175,
6,
-65,
-39,
-43,
-74,
-145,
-73,
18,
7,
49,
1,
-62,
-50,
-129,
-102,
-35,
-5,
101,
243,
207,
82,
95,
116,
147,
89,
59,
65,
43,
63,
69,
126,
199,
153,
139,
135,
266,
311,
338,
342,
244,
152,
119,
154,
165,
173,
174,
138,
85,
129,
120,
54,
74,
31,
33,
130,
117,
101,
110,
53,
50,
-1,
-58,
-121,
-113,
-135,
-112,
-67,
5,
-38,
-196,
-229,
-222,
-52,
55,
43,
-19,
-165,
-227,
-198,
-117,
-8,
8,
-56,
-138,
-140,
-178,
-187,
-142,
-158,
-122,
-136,
-219,
-246,
-152,
-28,
106,
181,
134,
37,
-25,
-72,
-125,
-110,
-96,
-117,
-117,
-208,
-93,
1,
27,
-9,
-19,
40,
38,
61,
32,
14,
-5,
24,
62,
33,
-18,
-7,
33,
28,
-4,
-38,
-98,
-65,
-80,
-42,
-1,
19,
70,
17,
-101,
-202,
-110,
14,
61,
42,
-44,
-15,
61,
194,
266,
202,
125,
188,
196,
138,
45,
-66,
-72,
-52,
-39,
-9,
44,
-54,
-140,
-138,
11,
181,
259,
223,
108,
-38,
-78,
-76,
7,
-21,
-69,
-119,
-124,
-65,
-63,
-107,
-133,
-103,
-112,
-179,
-232,
-255,
-229,
-193,
-124,
-134,
-114,
-90,
-46,
36,
106,
149,
81,
-25,
-102,
-144,
-132,
-69,
-32,
-11,
-37,
-27,
33,
128,
132,
105,
118,
106,
131,
182,
147,
80,
19,
-89,
-83,
-47,
26,
114,
145,
158,
224,
235,
207,
168,
146,
116,
91,
1,
-5,
-35,
-91,
-25,
76,
186,
229,
213,
127,
117,
120,
117,
133,
45,
37,
21,
-8,
4,
-3,
-6,
82,
111,
103,
120,
151,
140,
130,
111,
52,
-15,
25,
46,
73,
26,
4,
-38,
-23,
-14,
11,
-39,
-77,
-110,
-106,
-54,
-56,
-6,
-10,
-43,
-51,
-37,
-43,
4,
116,
77,
-2,
-3,
32,
77,
27,
-120,
-151,
-153,
-112,
-29,
53,
183,
191,
175,
139,
-28,
-84,
-147,
-153,
-180,
-250,
-319,
-249,
-179,
-89,
116,
174,
218,
282,
315,
298,
293,
223,
-12,
-281,
-390,
-423,
-336,
-235,
-8,
241,
400,
463,
425,
333,
260,
165,
1,
-99,
-112,
-88,
-17,
34,
38,
-11,
-41,
-115,
-178,
-151,
-63,
-92,
-75,
-59,
7,
64,
28,
-106,
-284,
-423,
-487,
-361,
-259,
-45,
106,
145,
228,
187,
156,
113,
41,
23,
66,
229,
321,
260,
162,
52,
-92,
-155,
-183,
-190,
-245,
-249,
-201,
-121,
12,
89,
9,
-216,
-400,
-490,
-479,
-367,
-172,
44,
49,
-72,
-124,
-134,
-186,
-156,
-29,
91,
108,
79,
61,
32,
-34,
-59,
50,
210,
343,
464,
429,
319,
195,
177,
123,
34,
-73,
-133,
-103,
64,
261,
417,
358,
193,
26,
-45,
-21,
63,
70,
104,
163,
236,
272,
310,
271,
133,
64,
2,
14,
40,
-71,
-158,
-276,
-303,
-197,
-118,
-75,
-57,
-32,
-25,
1,
64,
97,
10,
-116,
-188,
-239,
-159,
-155,
-164,
-181,
-34,
37,
23,
16,
15,
-41,
-123,
-165,
-131,
24,
89,
79,
51,
38,
24,
-20,
-41,
-42,
20,
17,
-111,
-104,
15,
80,
172,
234,
208,
115,
71,
-8,
21,
93,
107,
146,
195,
249,
250,
165,
55,
-6,
-10,
36,
69,
57,
71,
60,
77,
116,
139,
145,
191,
207,
142,
124,
99,
9,
-10,
3,
4,
-13,
-40,
-36,
-21,
-23,
82,
124,
97,
43,
17,
11,
30,
-20,
-98,
-162,
-174,
-164,
-111,
-77,
-120,
-128,
-78,
2,
68,
60,
60,
91,
122,
69,
28,
-34,
-77,
-111,
-54,
-41,
-64,
-140,
-145,
-59,
69,
92,
106,
75,
8,
-4,
-33,
-19,
17,
48,
40,
-20,
-34,
-88,
-64,
-75,
-44,
-26,
11,
12,
53,
50,
71,
64,
-21,
-58,
-71,
-41,
-9,
-24,
-57,
-72,
-19,
41,
65,
43,
21,
-3,
-30,
-51,
-52,
-53,
-38,
-20,
-21,
-28,
4,
-11,
-9,
-56,
-78,
-67,
-59,
-70,
-91,
-99,
-93,
-85,
-27,
-3,
-3,
-64,
-72,
-66,
-58,
-56,
-27,
47,
47,
7,
23,
35,
-10,
-112,
-134,
-147,
-110,
-108,
-42,
-52,
-59,
6,
51,
26,
-20,
-49,
-22,
-19,
-14,
13,
12,
19,
46,
71,
87,
68,
94,
121,
141,
89,
5,
-23,
-47,
-63,
-28,
12,
87,
130,
174,
142,
155,
132,
81,
57,
52,
28,
16,
-16,
-17,
-60,
-65,
-95,
-80,
-13,
-14,
2,
3,
-7,
-29,
-31,
-31,
-64,
-141,
-200,
-172,
-103,
-33,
12,
0,
-9,
35,
67,
50,
26,
28,
39,
63,
52,
67,
40,
9,
1,
65,
140,
202,
229,
214,
133,
113,
104,
72,
59,
54,
65,
58,
54,
90,
98,
138,
139,
158,
133,
112,
114,
147,
112,
62,
28,
70,
50,
38,
-51,
-70,
-97,
-54,
-14,
76,
79,
46,
31,
5,
2,
32,
44,
23,
5,
-31,
-22,
-28,
-25,
15,
9,
38,
72,
88,
25,
10,
38,
53,
60,
19,
-43,
-56,
-39,
17,
55,
56,
-11,
-59,
-74,
-26,
-14,
49,
58,
62,
56,
38,
5,
-3,
7,
19,
-18,
-47,
-61,
-59,
-26,
47,
84,
83,
25,
-14,
23,
7,
15,
-27,
-70,
-105,
-82,
-73,
-83,
-98,
-84,
-101,
-104,
-117,
-129,
-87,
-94,
-20,
3,
-9,
-30,
-63,
-24,
-10,
35,
65,
15,
-20,
-82,
-61,
-97,
-75,
-19,
-31,
-28,
-33,
-38,
-1,
-30,
-20,
-33,
-18,
32,
43,
50,
-17,
14,
1,
17,
9,
16,
79,
71,
89,
30,
103,
88,
69,
23,
-20,
-48,
-62,
-52,
-10,
-11,
-45,
-76,
-82,
-67,
-58,
-61,
-79,
-68,
-45,
-12,
-5,
8,
31,
1,
11,
-31,
-11,
1,
12,
20,
42,
39,
15,
25,
32,
68,
84,
84,
41,
1,
-33,
-33,
-15,
-20,
-30,
-24,
-32,
-1,
47,
98,
49,
17,
0,
28,
28,
23,
-17,
-29,
17,
13,
44,
53,
97,
58,
40,
21,
27,
20,
7,
-20,
-16,
-28,
-26,
-25,
-45,
-25,
0,
39,
39,
-13,
14,
-4,
-6,
14,
46,
57,
73,
110,
51,
-20,
-59,
-70,
3,
-3,
38,
12,
-2,
-33,
-11,
-14,
-26,
-80,
-90,
-75,
-32,
-50,
-3,
-15,
1,
16,
53,
58,
78,
58,
-2,
5,
24,
9,
-26,
-58,
-15,
0,
-18,
-11,
-16,
-17,
-53,
-15,
46,
55,
72,
45,
37,
21,
80,
84,
82,
85,
96,
62,
25,
18,
10,
8,
48,
62,
77,
63,
99,
86,
61,
55,
100,
142,
111,
120,
87,
68,
48,
29,
16,
-15,
-36,
-66,
-98,
-94,
-58,
-63,
-28,
-1,
14,
12,
-5,
-2,
38,
18,
42,
55,
13,
13,
2,
42,
79,
78,
77,
75,
79,
77,
72,
82,
86,
-5,
-59,
-73,
-24,
42,
59,
-13,
8,
-1,
-14,
-24,
-60,
-61,
38,
40,
42,
12,
-21,
27,
0,
57,
54,
56,
60,
50,
44,
49,
75,
42,
40,
25,
-12,
-64,
-56,
-51,
-85,
-19,
-4,
-45,
-22,
-79,
-113,
-111,
-57,
-12,
-73,
-75,
-82,
-60,
-64,
2,
101,
24,
54,
19,
36,
1,
63,
-1,
-79,
-68,
-69,
-67,
-113,
-132,
-105,
-68,
32,
55,
92,
24,
0,
4,
-19,
7,
-30,
-60,
-85,
-74,
-42,
22,
105,
64,
-17,
-97,
-63,
-9,
59,
59,
17,
-47,
-20,
-16,
-25,
-48,
-5,
49,
115,
167,
155,
100,
-5,
-57,
-86,
-87,
-73,
-104,
-124,
-150,
-106,
-65,
-29,
-13,
38,
27,
47,
27,
28,
-13,
-14,
-31,
-65,
-80,
-79,
-90,
-77,
-14,
86,
124,
129,
114,
118,
113,
155,
117,
22,
-56,
-130,
-204,
-264,
-261,
-239,
-167,
-100,
-36,
77,
161,
238,
276,
350,
398,
344,
272,
148,
-34,
-170,
-329,
-384,
-416,
-392,
-356,
-267,
-154,
-37,
68,
176,
258,
346,
342,
300,
167,
77,
-5,
-38,
-65,
-101,
-115,
-113,
-76,
-45,
-6,
24,
62,
67,
23,
-44,
-88,
-112,
-128,
-101,
-25,
59,
133,
229,
347,
454,
482,
467,
352,
242,
94,
-77,
-216,
-301,
-315,
-313,
-207,
-132,
-49,
62,
136,
222,
284,
264,
190,
56,
-51,
-94,
-45,
6,
73,
71,
43,
44,
103,
184,
278,
289,
205,
73,
-38,
-178,
-252,
-296,
-334,
-341,
-321,
-236,
-108,
29,
116,
201,
237,
263,
288,
305,
307,
292,
248,
154,
9,
-126,
-261,
-322,
-359,
-353,
-405,
-416,
-457,
-396,
-267,
-118,
94,
305,
532,
651,
667,
607,
428,
256,
0,
-158,
-315,
-383,
-435,
-395,
-295,
-165,
0,
115,
126,
93,
40,
12,
-2,
-5,
7,
1,
10,
94,
165,
269,
338,
382,
299,
136,
-65,
-239,
-341,
-371,
-401,
-347,
-274,
-106,
14,
136,
180,
164,
112,
101,
59,
50,
39,
5,
-36,
-70,
-86,
-79,
-88,
-72,
-75,
-79,
-50,
45,
180,
197,
158,
50,
-82,
-178,
-250,
-242,
-286,
-321,
-355,
-248,
-71,
189,
450,
641,
791,
804,
610,
325,
-56,
-433,
-757,
-936,
-956,
-874,
-649,
-402,
-89,
253,
524,
691,
712,
584,
313,
33,
-124,
-176,
-152,
-145,
-148,
-169,
-97,
1,
100,
119,
49,
-103,
-304,
-455,
-520,
-425,
-249,
-53,
125,
279,
428,
576,
693,
670,
531,
346,
101,
-157,
-349,
-503,
-596,
-546,
-435,
-258,
-96,
46,
95,
113,
139,
181,
231,
182,
58,
-15,
-20,
85,
196,
275,
160,
-65,
-300,
-368,
-353,
-184,
11,
120,
275,
350,
343,
271,
47,
-205,
-478,
-593,
-645,
-566,
-384,
-235,
37,
325,
607,
879,
908,
770,
491,
185,
-172,
-369,
-445,
-425,
-347,
-254,
-136,
-49,
6,
-29,
-160,
-219,
-174,
-16,
162,
292,
446,
548,
750,
955,
934,
623,
153,
-455,
-838,
-996,
-967,
-846,
-620,
-281,
9,
385,
664,
820,
843,
661,
339,
15,
-251,
-365,
-323,
-249,
-144,
77,
321,
547,
682,
529,
175,
-226,
-581,
-751,
-822,
-775,
-601,
-317,
25,
459,
803,
1023,
1031,
770,
313,
-166,
-554,
-680,
-758,
-715,
-504,
-243,
120,
514,
755,
820,
648,
419,
26,
-335,
-646,
-868,
-906,
-820,
-558,
-204,
197,
445,
604,
685,
619,
494,
403,
331,
206,
10,
-125,
-218,
-312,
-407,
-568,
-615,
-652,
-608,
-386,
-129,
50,
234,
416,
545,
691,
722,
593,
443,
241,
-50,
-281,
-452,
-471,
-375,
-260,
-210,
-156,
-132,
-200,
-270,
-315,
-295,
-220,
-12,
220,
357,
483,
596,
608,
571,
392,
38,
-234,
-411,
-604,
-621,
-573,
-334,
36,
349,
494,
480,
247,
5,
-217,
-346,
-399,
-340,
-209,
-166,
-103,
-1,
290,
503,
681,
611,
213,
-161,
-448,
-561,
-403,
-328,
-224,
-110,
297,
1063,
1651,
1967,
890,
-1108,
-2988,
-4760,
-5483,
-5295,
-4244,
-1956,
1007,
6015,
10645,
12955,
11279,
6893,
1417,
-4474,
-8404,
-10894,
-11430,
-11277,
-10847,
-7939,
-3023,
2462,
7478,
9581,
8972,
7397,
4934,
1659,
-973,
-3067,
-3802,
-2137,
-178,
1129,
2582,
2708,
1209,
-97,
-1454,
-2422,
-3367,
-4538,
-5384,
-5261,
-3576,
-680,
2797,
5542,
5913,
5113,
4231,
2136,
1570,
2008,
470,
-840,
-1616,
-2380,
-1633,
18,
247,
-9,
400,
648,
956,
1351,
1016,
336,
-234,
-78,
-153,
335,
723,
-927,
-2161,
-2654,
-1892,
778,
3452,
5412,
6741,
6939,
4881,
2772,
390,
-2538,
-3774,
-5252,
-6214,
-5769,
-4368,
-2791,
-1603,
1242,
3909,
5317,
4667,
1293,
-803,
-1024,
-590,
602,
1375,
2231,
2981,
3611,
3482,
2238,
764,
-3180,
-7056,
-9086,
-10724,
-9512,
-6867,
-3504,
251,
5387,
11079,
14504,
15810,
11534,
4470,
-1389,
-6070,
-8968,
-10805,
-10878,
-9801,
-6844,
-1185,
4684,
9815,
10809,
8279,
4642,
-796,
-4761,
-7312,
-8406,
-8170,
-5592,
-741,
3445,
7587,
9244,
7759,
6516,
3922,
681,
-2112,
-5170,
-7379,
-7567,
-5539,
-2452,
1443,
3711,
4648,
4589,
2853,
1540,
-141,
-2305,
-3551,
-3376,
-2162,
-307,
534,
-657,
5,
2788,
4877,
6310,
5462,
3537,
1763,
46,
-939,
-1302,
-2643,
-5139,
-7945,
-10185,
-10673,
-7747,
-2294,
4007,
9896,
13313,
13906,
11599,
7317,
2008,
-1219,
-3996,
-7811,
-9055,
-8912,
-6383,
-2645,
555,
4189,
6229,
5798,
2700,
-1795,
-5433,
-7178,
-6816,
-4902,
-1612,
1904,
5129,
7017,
7397,
7882,
7099,
3679,
-1100,
-7043,
-10124,
-10244,
-8823,
-4578,
229,
6237,
9831,
9196,
6710,
1700,
-2594,
-6249,
-8797,
-8619,
-6961,
-4896,
-2273,
1378,
6128,
10368,
11250,
8956,
5679,
1408,
-3051,
-6250,
-8398,
-8166,
-6092,
-3014,
-204,
1870,
2551,
1382,
341,
-204,
122,
775,
-1167,
-2146,
-1459,
34,
5411,
6891,
4684,
3684,
2665,
1186,
-94,
-307,
-926,
-2158,
-3251,
-4881,
-6065,
-7181,
-8080,
-7279,
-3967,
920,
5606,
8991,
10074,
11025,
10387,
10307,
7265,
-842,
-7498,
-13648,
-16373,
-16326,
-12757,
-5927,
713,
7748,
11921,
13354,
11481,
4983,
-1154,
-5639,
-8657,
-9568,
-9399,
-7610,
-4805,
1041,
7753,
13426,
15978,
11407,
5401,
-898,
-6619,
-8839,
-9640,
-8688,
-6897,
-3271,
1449,
5078,
7580,
5433,
3447,
1741,
-2215,
-5091,
-7855,
-8134,
-5529,
307,
8105,
12473,
14364,
11026,
5428,
1192,
-4025,
-7326,
-9775,
-11526,
-10896,
-8172,
-3518,
1429,
5431,
7736,
8246,
7571,
5571,
2657,
-656,
-3201,
-2915,
291,
2514,
4087,
2517,
-710,
-1482,
-2150,
-2419,
-2489,
-2961,
-4206,
-3573,
-2733,
-2104,
451,
1735,
2322,
2752,
1070,
626,
1930,
4163,
6823,
7815,
6678,
3276,
-1570,
-5988,
-8946,
-10270,
-9261,
-7081,
-4021,
-859,
4478,
10539,
12383,
11622,
7730,
2215,
-2466,
-8230,
-12463,
-14555,
-11321,
-3442,
4586,
12606,
15969,
15789,
12168,
5903,
672,
-3967,
-8282,
-12813,
-15306,
-15096,
-11816,
-5011,
2964,
11984,
16306,
14928,
10418,
3018,
-2278,
-4614,
-4822,
-4376,
-3765,
-2113,
-6,
2792,
5324,
4380,
3890,
1556,
-4248,
-7707,
-10994,
-11117,
-8627,
-3161,
3694,
9711,
12751,
10865,
7587,
3349,
2058,
1103,
-2297,
-4960,
-6917,
-7685,
-5105,
-1464,
1277,
2867,
2670,
1905,
313,
-1122,
-2050,
-2984,
-1503,
147,
2539,
2990,
-243,
-1548,
-2027,
295,
3378,
4217,
4215,
3025,
1273,
-263,
-1005,
-597,
-1543,
-4099,
-6659,
-8675,
-8001,
-4514,
174,
6507,
10300,
10713,
7939,
1009,
-4749,
-8300,
-8215,
-6063,
-4807,
-2251,
2406,
7647,
11085,
13104,
13081,
6827,
-1334,
-9148,
-15404,
-18952,
-20151,
-15310,
-7981,
3221,
12716,
17381,
19018,
14414,
9007,
4948,
-113,
-6123,
-11565,
-13994,
-14323,
-11917,
-5337,
3641,
10622,
10430,
7245,
2673,
-2553,
-5692,
-8001,
-7404,
-5406,
-2588,
1202,
4753,
7399,
8756,
9938,
7330,
1681,
-2903,
-7622,
-10822,
-9987,
-6285,
-622,
4216,
4540,
4146,
3105,
-52,
-839,
-1389,
-2133,
-2899,
-3560,
-2827,
-1210,
1774,
3679,
5488,
5631,
4642,
4446,
2946,
337,
-1756,
-1395,
-1441,
-2556,
-3758,
-5730,
-6014,
-5554,
-4368,
-490,
4446,
7428,
7896,
6613,
4730,
4212,
4356,
1451,
-3035,
-5935,
-6719,
-5451,
-3297,
257,
5432,
8745,
7571,
5129,
-169,
-6358,
-10999,
-13772,
-11449,
-6407,
-451,
5270,
10325,
14752,
18605,
18841,
11735,
1974,
-5749,
-11774,
-15835,
-19012,
-16344,
-8898,
-230,
8317,
12928,
13490,
9572,
4769,
934,
-3179,
-6177,
-7532,
-9733,
-9358,
-5665,
2227,
10816,
12772,
12026,
8786,
3888,
-1601,
-6216,
-8208,
-8740,
-7307,
-4126,
-1735,
937,
2130,
916,
1142,
1179,
1022,
925,
-1957,
-4309,
-1984,
3487,
7939,
8250,
5808,
1922,
-1535,
-4151,
-4614,
-4499,
-3204,
-353,
-86,
-584,
-2211,
-5057,
-5424,
-3665,
136,
3741,
4740,
4853,
4952,
7246,
9341,
8112,
3151,
-2015,
-6774,
-10894,
-12381,
-10118,
-4309,
1875,
8427,
10667,
9979,
6664,
-349,
-5162,
-7869,
-8370,
-8448,
-7478,
-3785,
1661,
9272,
16685,
18851,
14727,
6639,
-1978,
-8650,
-14087,
-17440,
-15609,
-9631,
-3487,
4081,
9660,
13936,
14802,
8864,
4330,
-914,
-6396,
-10316,
-14047,
-13957,
-10204,
-308,
9989,
14887,
16655,
12697,
7647,
1665,
-4898,
-6962,
-8739,
-10154,
-8960,
-7502,
-5034,
-2077,
-272,
3657,
7493,
7497,
6040,
2885,
-1324,
-1514,
1640,
2636,
2344,
1568,
-796,
-3085,
-5730,
-7918,
-5191,
-1714,
-1457,
-461,
-267,
378,
552,
-889,
-75,
359,
-592,
-668,
-125,
729,
4433,
9398,
9964,
6935,
809,
-4640,
-8865,
-12398,
-11138,
-7060,
-2179,
909,
4769,
8147,
7986,
5235,
1190,
-1681,
-3266,
-5700,
-7813,
-7840,
-6242,
1070,
10034,
15608,
16902,
12115,
4846,
-2950,
-10420,
-12165,
-12109,
-10698,
-8085,
-5158,
594,
5178,
10182,
11221,
9984,
7912,
2216,
-4313,
-10276,
-12165,
-8174,
-2042,
3795,
7635,
8430,
8144,
6487,
4242,
-397,
-4677,
-9544,
-12983,
-13515,
-12293,
-7958,
-2791,
4931,
11490,
13909,
12083,
8329,
2911,
152,
-1532,
-2511,
-1777,
-3943,
-4666,
-6199,
-7798,
-5586,
195,
4067,
5440,
4090,
1914,
1500,
1024,
320,
-1411,
-780,
-2611,
-3963,
-2321,
-1958,
2889,
9166,
12406,
12537,
6679,
-425,
-6603,
-10814,
-10272,
-7603,
-4613,
-2689,
-689,
2298,
5428,
8517,
8562,
6033,
2300,
-2288,
-6572,
-8701,
-8194,
-4215,
4241,
11575,
14183,
13267,
7231,
-1709,
-7048,
-9283,
-9069,
-8038,
-6859,
-7074,
-6622,
-3807,
798,
10591,
14405,
12684,
9633,
2405,
-2509,
-6080,
-6479,
-2273,
286,
1049,
566,
-1058,
-603,
205,
1409,
2656,
1822,
-193,
-4791,
-9026,
-7796,
-2902,
2082,
5448,
4823,
4227,
3896,
3512,
4170,
4293,
3992,
1746,
-1670,
-5153,
-7897,
-8376,
-6645,
-2467,
2748,
5990,
5685,
1978,
352,
-36,
1279,
819,
-2988,
-6186,
-10261,
-10460,
-7148,
-4,
10351,
18062,
18263,
13064,
5637,
-3000,
-8857,
-12269,
-13031,
-10885,
-8312,
-5796,
-2543,
2244,
7429,
12882,
14003,
8880,
2942,
-4885,
-10208,
-11062,
-7516,
-762,
4457,
6660,
8191,
9153,
6435,
1387,
-4439,
-7034,
-8639,
-10315,
-10130,
-8989,
-4470,
226,
6492,
13661,
14384,
12060,
5510,
-1908,
-4454,
-4227,
-2561,
-3210,
-3536,
-4256,
-5333,
-3594,
-1684,
-5,
3067,
5092,
3783,
333,
-3542,
-5131,
-3898,
-615,
2292,
2476,
311,
-2143,
-2276,
1366,
4915,
6171,
5613,
4183,
912,
-2394,
-5478,
-8350,
-6930,
-6068,
-4129,
-1633,
-190,
3036,
5736,
6343,
6005,
4089,
210,
-4377,
-8762,
-8236,
-4048,
1739,
8443,
11738,
11016,
7788,
2789,
-3701,
-8939,
-11928,
-14892,
-15049,
-13565,
-6944,
1913,
9266,
16932,
20091,
18977,
10147,
7,
-7216,
-11764,
-11983,
-9836,
-5148,
-1278,
1192,
3780,
5925,
6298,
4696,
1786,
-2912,
-7929,
-9364,
-8530,
-5661,
-1717,
3028,
9551,
13892,
12228,
8358,
4027,
548,
-2511,
-6515,
-8247,
-9825,
-6890,
-4345,
-2737,
1612,
4919,
7119,
6949,
5288,
1603,
-2587,
-4041,
-3588,
-1403,
2209,
3333,
610,
-1528,
-746,
1499,
4211,
5462,
4681,
1491,
-2190,
-5412,
-4975,
-3703,
-2641,
-1735,
-4045,
-3312,
-1841,
-21,
4099,
8442,
10314,
8956,
4721,
-1225,
-4494,
-4613,
-5533,
-7222,
-5653,
-1300,
2464,
4747,
5657,
6393,
3544,
-2545,
-6096,
-9630,
-11229,
-10418,
-6344,
3428,
12325,
18724,
19034,
12489,
4390,
-4468,
-7168,
-9073,
-12286,
-11761,
-11218,
-9911,
-5131,
4775,
13536,
17769,
15035,
6987,
-295,
-6263,
-11623,
-12206,
-9447,
-5893,
-202,
2985,
7256,
10884,
11379,
10950,
7456,
1094,
-5404,
-9332,
-12511,
-10761,
-5838,
-1338,
3820,
7848,
9034,
8825,
7432,
3267,
-26,
-2817,
-4024,
-4283,
-4251,
-3408,
-198,
3457,
5902,
7350,
5306,
2797,
-2144,
-6586,
-5886,
-3749,
-1016,
717,
-75,
-1257,
-3253,
-4123,
-973,
3465,
7002,
7896,
4700,
1575,
-207,
-411,
-853,
-4295,
-7415,
-8836,
-9100,
-7939,
-4943,
-1015,
5813,
12031,
11357,
7382,
1543,
-5064,
-7291,
-6631,
-5095,
-1467,
626,
3017,
6134,
8337,
10212,
4933,
-1789,
-7139,
-10487,
-10759,
-11901,
-9995,
-4799,
2985,
11036,
15957,
13771,
6191,
-1058,
-6416,
-8320,
-7663,
-7531,
-8618,
-8965,
-5110,
3657,
12230,
15013,
10930,
5203,
-1035,
-7630,
-12182,
-13040,
-11522,
-7673,
-1817,
3731,
9001,
10200,
10470,
10342,
8522,
4320,
-1543,
-7132,
-13077,
-13650,
-9028,
-3033,
2220,
4160,
4217,
3489,
2697,
2007,
610,
-1132,
-3864,
-3581,
-2038,
124,
1765,
3021,
8332,
10285,
8527,
5606,
950,
-3635,
-6024,
-5006,
-4145,
-4103,
-6450,
-8088,
-6796,
-5314,
-665,
4318,
8291,
10884,
12084,
11091,
6918,
1562,
-1688,
-2479,
-5276,
-7579,
-8388,
-8071,
-6426,
-1353,
4498,
7412,
6956,
2376,
-1537,
-4713,
-5862,
-6316,
-5119,
-2016,
820,
6076,
9779,
12590,
12747,
7188,
1921,
-3530,
-7381,
-9816,
-13351,
-12824,
-8391,
535,
7245,
10618,
9487,
4125,
921,
-1723,
-2578,
-2755,
-3538,
-5166,
-4253,
-735,
6407,
12779,
14328,
11068,
5496,
-733,
-8542,
-13358,
-15387,
-13441,
-7657,
-1690,
3827,
7317,
7694,
7850,
7471,
6102,
3124,
-2632,
-8513,
-9633,
-5359,
1211,
6147,
6718,
5977,
4583,
2774,
706,
-3110,
-6309,
-8770,
-9983,
-8184,
-5493,
-1266,
1921,
4768,
8350,
10005,
10950,
7826,
1420,
-2047,
-1840,
-449,
63,
-2310,
-6985,
-9530,
-9257,
-6012,
35,
5259,
7035,
7444,
5759,
3170,
1234,
-1785,
-3769,
-4569,
-3995,
-3217,
-2167,
-122,
4165,
8184,
9743,
9111,
3258,
-3684,
-8436,
-10370,
-9335,
-7028,
-4612,
-3915,
122,
5844,
9898,
12021,
8772,
2466,
-2498,
-5674,
-7446,
-8197,
-6045,
-1556,
3250,
10144,
13021,
11639,
5947,
-1578,
-6787,
-9018,
-10357,
-10461,
-11791,
-10969,
-4955,
3152,
12938,
15680,
14798,
11055,
6117,
419,
-4057,
-6245,
-7777,
-6179,
-4123,
-2093,
-656,
-249,
1317,
3274,
2992,
653,
-4057,
-8779,
-9389,
-5492,
1405,
7317,
7992,
6831,
4267,
3613,
5386,
6265,
1890,
-3077,
-6781,
-10276,
-9523,
-8675,
-5954,
-2267,
1142,
4304,
6886,
6883,
5139,
3594,
1994,
1945,
1369,
-4889,
-9073,
-11067,
-11825,
-5497,
2000,
8430,
10885,
11748,
8914,
4761,
101,
-4220,
-6719,
-10065,
-11091,
-11486,
-8891,
-4629,
1011,
9283,
15327,
16098,
9867,
949,
-6099,
-9320,
-5623,
-2338,
-2950,
-3735,
-2411,
2536,
7795,
11052,
10468,
4403,
-2705,
-9821,
-13917,
-13061,
-12616,
-7435,
374,
7506,
14710,
15281,
11940,
7387,
3939,
2236,
-1700,
-6275,
-11306,
-12032,
-10891,
-7475,
-1165,
3598,
6474,
5590,
5548,
5447,
2162,
-1361,
-816,
352,
1568,
341,
-4082,
-5711,
-3180,
2526,
7351,
8362,
4362,
1152,
-2115,
-3148,
-673,
-1090,
-2449,
-5293,
-6565,
-4174,
-801,
3436,
7551,
9387,
7791,
4390,
-1734,
-7996,
-8654,
-7070,
-3328,
1779,
4954,
8945,
10643,
9049,
8355,
4897,
-822,
-7981,
-14461,
-16907,
-16759,
-13120,
-6509,
4771,
14587,
20083,
19485,
10655,
3140,
-2155,
-5618,
-7283,
-8966,
-9240,
-9862,
-8438,
-3797,
3601,
9810,
9872,
6654,
1401,
-4129,
-8212,
-10276,
-8791,
-4298,
-445,
2188,
4234,
5370,
8159,
11110,
9423,
4513,
-1633,
-7178,
-10710,
-10481,
-5785,
-2509,
-428,
847,
1505,
2439,
3613,
5937,
6094,
3279,
2309,
394,
-1165,
-2320,
-5898,
-5648,
-3209,
25,
2558,
4101,
5216,
6954,
8047,
6237,
4340,
-1446,
-8270,
-10668,
-11190,
-9327,
-5482,
-731,
5357,
9965,
12349,
11838,
9665,
5294,
1686,
-2312,
-7490,
-9964,
-10493,
-9093,
-3643,
4648,
9673,
10845,
5514,
-2166,
-6638,
-7982,
-7175,
-5920,
-3956,
-919,
4318,
10257,
15032,
15214,
8585,
2312,
-4217,
-10731,
-13023,
-15931,
-15472,
-10153,
-2282,
5960,
11261,
12440,
11125,
8677,
4310,
360,
-3264,
-7617,
-9852,
-8607,
-3725,
2273,
6394,
6969,
6412,
5910,
3956,
661,
-3112,
-6039,
-6827,
-5850,
-3934,
-1955,
-1794,
-580,
385,
3759,
7340,
7305,
3388,
-977,
-2175,
-1546,
-865,
-3567,
-6545,
-6157,
-4031,
-1544,
3044,
5657,
7462,
6793,
3137,
141,
-4276,
-9889,
-12113,
-11799,
-8331,
-3295,
598,
6611,
13917,
18977,
17725,
12981,
2344,
-7425,
-13329,
-17794,
-18255,
-14765,
-9188,
-4586,
2265,
8469,
13678,
15264,
10915,
5236,
-96,
-5027,
-6700,
-7171,
-6672,
-3924,
3,
5729,
8214,
7127,
4331,
-780,
-4228,
-6473,
-7541,
-7500,
-6814,
-2958,
359,
6405,
10104,
9903,
9019,
4559,
112,
-4416,
-6173,
-5444,
-4774,
-2978,
-1653,
-219,
472,
-225,
1996,
5559,
6696,
4168,
307,
-3662,
-5635,
-4028,
-2144,
-2013,
-535,
-1702,
-2931,
-106,
4000,
7323,
8891,
9222,
5674,
2770,
-2963,
-7907,
-9502,
-9357,
-6191,
-2657,
1039,
4187,
5919,
6342,
7217,
5396,
903,
-3264,
-7818,
-11867,
-9626,
-3261,
4384,
12567,
17408,
17293,
11314,
1058,
-7129,
-11943,
-15069,
-16658,
-14440,
-10166,
-4956,
4149,
12608,
20275,
23686,
19201,
9277,
-3498,
-13022,
-15069,
-12768,
-10079,
-7977,
-3750,
-104,
2663,
7324,
9445,
10212,
5957,
238,
-4418,
-8080,
-9650,
-9469,
-3683,
1280,
6409,
8308,
4770,
626,
-1134,
454,
255,
-26,
-310,
-302,
-1553,
-1193,
931,
2520,
2320,
73,
-1296,
-3114,
-4090,
-4421,
-1713,
2959,
6751,
5829,
661,
-4792,
-7564,
-3638,
2690,
8019,
11278,
9539,
5090,
18,
-3946,
-4712,
-5837,
-8159,
-11510,
-12952,
-11321,
-5275,
6386,
15989,
20388,
17607,
8447,
-948,
-9529,
-12542,
-11890,
-9794,
-4348,
1862,
7154,
9745,
12085,
9621,
3659,
-1690,
-8880,
-14648,
-16732,
-14336,
-7691,
482,
10810,
17917,
19723,
16141,
6538,
-355,
-6145,
-9811,
-11314,
-11638,
-10191,
-8048,
-2091,
6333,
12435,
12747,
10599,
4963,
-2655,
-7793,
-9960,
-9577,
-7215,
-2823,
59,
2773,
3075,
3868,
6600,
7514,
8562,
6280,
489,
-4933,
-7831,
-7032,
-3062,
-1331,
-2101,
-3267,
-4395,
-4159,
-2763,
-544,
2259,
5645,
7175,
7006,
4843,
707,
-1612,
-1412,
-1454,
-483,
-127,
-296,
-90,
664,
2602,
2825,
519,
-4889,
-8717,
-10354,
-11363,
-7653,
-244,
6868,
16290,
18497,
15779,
9545,
-997,
-4150,
-8620,
-10707,
-12134,
-10672,
-5983,
-1467,
6749,
12221,
15674,
12311,
2879,
-6403,
-12871,
-15367,
-13221,
-9675,
-4966,
2262,
7970,
12282,
15504,
14461,
9092,
2396,
-5180,
-8856,
-12003,
-15070,
-12407,
-5185,
2340,
6413,
8470,
6599,
4227,
1291,
-2215,
-2808,
-2300,
-2793,
-4560,
-5224,
-3359,
2666,
7538,
8693,
8115,
6871,
4652,
-663,
-6005,
-6784,
-4325,
-2152,
-3502,
-7927,
-10175,
-9191,
-5289,
2415,
9554,
12238,
12906,
10615,
6688,
5731,
1790,
-4492,
-8145,
-11667,
-11011,
-7416,
-4965,
272,
6660,
9663,
10353,
6128,
-1112,
-5277,
-8289,
-7995,
-4889,
-1026,
2322,
5650,
9540,
11890,
12396,
8355,
-270,
-7657,
-12620,
-13473,
-10940,
-8027,
-916,
6046,
11218,
14346,
11800,
4676,
-3337,
-8864,
-9375,
-7655,
-6081,
-4689,
-2344,
2739,
8748,
14491,
14613,
9229,
3594,
-2883,
-8166,
-11182,
-11595,
-9024,
-5912,
-838,
2139,
2611,
2712,
3285,
4421,
4448,
3835,
2129,
-505,
-3562,
-1922,
2245,
3991,
2347,
-968,
-2834,
-2736,
-641,
239,
-1416,
-2440,
-2089,
-2178,
-2356,
-4494,
-6512,
-4654,
732,
6451,
10652,
11049,
7915,
7458,
5992,
4522,
-253,
-8653,
-13444,
-18370,
-16822,
-11303,
-3341,
6699,
12724,
15098,
13801,
9288,
1829,
-2767,
-6289,
-9551,
-10305,
-7560,
-5694,
709,
9913,
13205,
16823,
11854,
2883,
-4784,
-11352,
-12705,
-9765,
-6204,
-4586,
-1977,
511,
4940,
7403,
6689,
6646,
4038,
-1318,
-4971,
-7976,
-7630,
-2223,
4052,
8158,
8840,
7334,
2942,
-1071,
-4223,
-5341,
-5107,
-5208,
-5272,
-5599,
-5619,
-3539,
-1757,
1493,
5381,
6973,
8343,
6490,
3005,
1804,
3305,
2212,
-26,
-1832,
-5468,
-8026,
-9196,
-5968,
-566,
3994,
4666,
2293,
1129,
-443,
-210,
-1416,
-1379,
-2026,
-3048,
-1212,
-306,
4178,
10407,
13188,
9952,
3623,
-4102,
-10811,
-16674,
-18353,
-13022,
-6121,
530,
5978,
11528,
15081,
14639,
11473,
4539,
-2036,
-8773,
-14467,
-16705,
-15483,
-6291,
6037,
14465,
17059,
16036,
10682,
1995,
-4415,
-7975,
-9422,
-10132,
-12267,
-11451,
-7209,
-3836,
5790,
12550,
13714,
13752,
6872,
1042,
-3718,
-4094,
-1583,
24,
261,
-2279,
-3335,
-4726,
-2644,
478,
2240,
3385,
2343,
-2377,
-6466,
-7669,
-4576,
1004,
3352,
4163,
2738,
2079,
1730,
4452,
8806,
9892,
8023,
2997,
-3203,
-9885,
-15060,
-16123,
-12877,
-6408,
-448,
4493,
6795,
8427,
10760,
9468,
7241,
1585,
-3438,
-7939,
-11903,
-10906,
-5278,
1787,
6783,
10599,
11248,
8696,
3060,
-3051,
-5620,
-5976,
-7194,
-8023,
-8053,
-5724,
-2067,
6346,
14786,
18047,
13856,
2936,
-6167,
-13362,
-11831,
-5909,
-2425,
771,
3629,
6256,
9154,
9533,
6995,
3193,
-901,
-7746,
-13003,
-16592,
-18383,
-13573,
-4998,
7934,
15475,
16782,
15062,
10685,
7936,
6702,
1902,
-4706,
-9503,
-12530,
-13738,
-12169,
-7068,
-1159,
2530,
4517,
7158,
6913,
3925,
-770,
-1407,
1533,
5540,
5409,
-513,
-4528,
-3617,
700,
5133,
7668,
5693,
1751,
-2598,
-5696,
-4846,
-3858,
-5340,
-5362,
-3202,
-947,
1382,
2881,
6013,
9859,
12985,
11236,
2110,
-5422,
-9036,
-10415,
-8691,
-5913,
-3090,
-126,
2972,
8788,
12511,
12865,
7459,
-2366,
-8560,
-13935,
-16943,
-16333,
-12626,
-3757,
6275,
13954,
16314,
13748,
10067,
7154,
2755,
-2474,
-5279,
-9594,
-13063,
-12440,
-8232,
-363,
5453,
5346,
4319,
1093,
-2839,
-5887,
-6657,
-4380,
-331,
5764,
9855,
9435,
6842,
6703,
6442,
4582,
2773,
-2377,
-9067,
-12192,
-13912,
-10754,
-6056,
-1576,
1093,
1852,
3820,
4695,
7462,
8084,
5507,
3194,
-628,
-1650,
-2498,
-5287,
-5198,
-3797,
-810,
619,
1782,
2909,
3034,
4468,
5292,
4079,
-774,
-7590,
-10795,
-11402,
-8039,
-2951,
2875,
7455,
11401,
12097,
9416,
6288,
993,
-3153,
-7578,
-9932,
-10667,
-7514,
-4556,
1871,
9815,
13964,
11890,
3594,
-5009,
-11156,
-12558,
-13088,
-10330,
-4648,
472,
7475,
14864,
19322,
20213,
13620,
4735,
-4976,
-11711,
-15655,
-18579,
-16905,
-10739,
-4027,
2752,
7962,
11136,
11554,
8011,
3636,
-545,
-2338,
-4916,
-6380,
-6901,
-2803,
3749,
7445,
6486,
4685,
2235,
-1069,
-3567,
-5946,
-5694,
-5916,
-4665,
-1825,
1786,
1522,
-247,
182,
2696,
5597,
6819,
4539,
-624,
-606,
1142,
530,
-561,
-3117,
-4393,
-4217,
-3268,
415,
5007,
7244,
6478,
2773,
-810,
-4330,
-7696,
-9289,
-8993,
-4315,
990,
4279,
6819,
10977,
13738,
15987,
11724,
2614,
-5102,
-13223,
-16825,
-16995,
-11715,
-3800,
5015,
10704,
11796,
9900,
5260,
-1873,
-5346,
-5861,
-6349,
-5183,
-4792,
-2907,
2467,
11193,
17091,
16686,
10343,
3342,
-5270,
-12593,
-15966,
-14830,
-10172,
-6433,
-2248,
2924,
7860,
9515,
10961,
10951,
7816,
2242,
-3976,
-8242,
-11293,
-8530,
-695,
3806,
6519,
5532,
3277,
1881,
478,
1659,
1182,
-1808,
-4426,
-5891,
-6726,
-5786,
-4527,
-1056,
2695,
4193,
5196,
3233,
-317,
238,
3882,
6571,
6148,
3009,
-1935,
-6906,
-9001,
-6914,
-1720,
1186,
1503,
19,
-2847,
-3426,
-1696,
-2055,
-1495,
125,
801,
1528,
1733,
4436,
11137,
14851,
13982,
9070,
-1910,
-10946,
-15417,
-16771,
-13602,
-8761,
-5420,
-679,
3772,
9374,
13949,
12634,
7046,
2638,
-893,
-6195,
-9874,
-10996,
-7050,
-461,
7789,
10777,
11473,
9153,
2125,
-3697,
-8895,
-10099,
-9909,
-10771,
-10754,
-6743,
-942,
6334,
13133,
14102,
12008,
6582,
-1484,
-6675,
-8257,
-7940,
-6113,
-4438,
-2723,
814,
4017,
4968,
6976,
8454,
5358,
551,
-7052,
-11231,
-10706,
-8744,
-3825,
760,
3204,
3552,
3638,
4084,
6294,
8337,
7281,
5358,
3640,
1058,
-1279,
-7809,
-10267,
-8099,
-6544,
-4241,
-3255,
-1389,
-1429,
-447,
2433,
6107,
8151,
6071,
2928,
-192,
-2442,
-131,
2749,
3580,
4845,
2832,
-882,
-3543,
-7013,
-8235,
-9155,
-9457,
-7556,
-4948,
-1503,
3144,
11844,
16421,
18304,
12660,
3280,
-3772,
-10627,
-10861,
-10340,
-7979,
-4371,
-1363,
2053,
7335,
11870,
10625,
7590,
1876,
-5076,
-7876,
-11442,
-13285,
-9614,
-3271,
6053,
13581,
14999,
12176,
6808,
2342,
-643,
-2745,
-5553,
-9513,
-9728,
-7428,
-812,
5152,
7669,
8616,
6936,
2736,
-2484,
-8095,
-9900,
-9713,
-7593,
-1816,
1788,
5924,
8646,
12202,
13535,
12209,
7691,
108,
-7835,
-13036,
-11805,
-8020,
-3594,
-2832,
-3469,
-4612,
-3084,
1467,
6434,
7270,
7694,
8600,
6881,
5916,
2439,
-1355,
-2923,
-4248,
-3763,
-3016,
-4980,
-4554,
-2741,
195,
3404,
4907,
3046,
-302,
-4046,
-6665,
-4246,
-1905,
1079,
5060,
8547,
9266,
9130,
6005,
-317,
-2743,
-7058,
-10514,
-10636,
-10581,
-6742,
36,
9055,
14578,
13818,
8620,
-67,
-8119,
-11248,
-11769,
-11576,
-9663,
-6253,
242,
7383,
14076,
17696,
15828,
9365,
1208,
-5359,
-11506,
-14947,
-15576,
-11328,
-3261,
2570,
7350,
8941,
6443,
4009,
647,
-1871,
-4204,
-5956,
-5934,
-4437,
2360,
8909,
13325,
13200,
8858,
4776,
-1821,
-7190,
-12066,
-14261,
-10952,
-7979,
-4724,
570,
3818,
6242,
9193,
9194,
8868,
6011,
406,
-4266,
-5422,
-1984,
510,
-1406,
-3927,
-4381,
-5898,
-4186,
-2147,
1354,
5680,
5141,
2881,
2658,
2144,
-2583,
-5468,
-6948,
-6836,
-4415,
-2040,
504,
5462,
10149,
13140,
11548,
5280,
700,
-4104,
-10987,
-13887,
-10271,
-6666,
-2058,
1177,
4788,
9914,
9487,
6061,
2800,
-935,
-5595,
-11040,
-11477,
-9368,
-2609,
7192,
12185,
16433,
15380,
9841,
1376,
-8643,
-12708,
-13061,
-13346,
-12936,
-9921,
-4237,
2880,
10068,
13026,
14121,
11255,
4008,
-530,
-5821,
-7684,
-5322,
-3495,
109,
2505,
2398,
1922,
320,
-299,
-1288,
-3386,
-5399,
-8461,
-7567,
-3847,
1926,
7440,
8462,
8429,
5442,
3370,
1843,
-1176,
-2301,
-786,
-1263,
-2192,
-2130,
-3708,
-3978,
-3105,
-513,
2428,
4949,
3960,
3406,
1354,
208,
1796,
-311,
-2626,
-5317,
-6986,
-7311,
-3677,
2853,
11914,
16880,
14326,
10566,
2070,
-5899,
-9747,
-13267,
-13936,
-13077,
-10730,
-5380,
1048,
7542,
14591,
17077,
12993,
7685,
1101,
-6677,
-10918,
-9036,
-4723,
-416,
2854,
6032,
7654,
7941,
5937,
2389,
-904,
-7477,
-11178,
-13247,
-13672,
-9645,
-3847,
5196,
14509,
18863,
18255,
11992,
3733,
-364,
-3068,
-6311,
-9439,
-10477,
-9600,
-6954,
-1463,
3402,
7478,
8036,
5256,
1554,
-2375,
-5712,
-6120,
-3378,
-1040,
2261,
3799,
3617,
3304,
1988,
3466,
5447,
3062,
-151,
-2247,
-4809,
-4888,
-3721,
-2788,
-1554,
-2450,
-3145,
-2459,
-1333,
2068,
5467,
6805,
6731,
3345,
-606,
-3891,
-7549,
-5607,
-1528,
1281,
5704,
8757,
8110,
5697,
2318,
-779,
-3849,
-8601,
-13849,
-14673,
-12812,
-7825,
2023,
11031,
18960,
21797,
16953,
10521,
2477,
-3946,
-7856,
-11814,
-14078,
-13592,
-10144,
-4950,
3371,
11999,
14154,
10446,
4415,
-2998,
-8525,
-11582,
-12085,
-8766,
-3325,
2944,
8110,
11066,
12733,
12868,
7797,
1510,
-4863,
-12410,
-16072,
-16203,
-11344,
-3452,
2276,
4339,
5780,
7567,
7289,
5485,
2543,
-738,
-3252,
-3450,
-3304,
-1583,
-1415,
-1930,
279,
2811,
5102,
6238,
3246,
-262,
-559,
-1375,
-927,
-3110,
-6423,
-7577,
-9299,
-8378,
-3896,
1030,
5808,
9246,
11923,
11207,
8364,
4713,
997,
-2334,
-7909,
-10414,
-12454,
-11302,
-5824,
2781,
8523,
9577,
7519,
849,
-5258,
-8778,
-9133,
-8687,
-5971,
-2016,
5332,
12337,
17834,
21038,
15039,
6661,
-3360,
-12482,
-17315,
-19807,
-18490,
-14115,
-5706,
4051,
11443,
17001,
15094,
11269,
7059,
386,
-3449,
-7059,
-10084,
-11190,
-7953,
-92,
7000,
11585,
11241,
7803,
3369,
-3257,
-8432,
-11073,
-11459,
-8823,
-5812,
-2476,
1248,
3644,
6909,
10113,
10702,
8117,
1981,
-5688,
-8637,
-5800,
-1738,
-26,
-233,
-324,
-243,
213,
1671,
3452,
2131,
1101,
-1395,
-2687,
-2608,
-5701,
-7508,
-7576,
-3777,
1799,
6488,
10044,
12207,
14813,
14608,
11311,
4024,
-4776,
-11458,
-16249,
-17777,
-14717,
-8575,
-2143,
4429,
9742,
13330,
13951,
9468,
4929,
728,
-3509,
-6263,
-7555,
-7719,
-3974,
6488,
14362,
17679,
14344,
4616,
-5383,
-12648,
-14236,
-11945,
-11847,
-10521,
-5976,
-109,
9199,
14957,
15823,
12790,
7810,
2001,
-3696,
-9500,
-11401,
-9216,
-5121,
-723,
3234,
7517,
7104,
6026,
4964,
2816,
88,
-6440,
-12370,
-12782,
-8662,
-3206,
1696,
4914,
7057,
10756,
10531,
7350,
2663,
-324,
-318,
-1070,
-1420,
-2868,
-5417,
-9562,
-8386,
-2876,
3460,
6322,
2817,
-881,
-3084,
-1890,
83,
-246,
-1230,
-3291,
-2662,
721,
3776,
9056,
13328,
12300,
8482,
1693,
-6735,
-13207,
-17621,
-17104,
-14947,
-9379,
-2750,
3241,
12035,
14844,
18119,
15672,
8940,
1827,
-7541,
-13320,
-16721,
-12900,
-6427,
1550,
8964,
12509,
11980,
8211,
2162,
-2183,
-6747,
-9764,
-9326,
-12509,
-11503,
-6232,
1362,
11231,
19162,
18855,
13350,
5692,
-3046,
-7171,
-8413,
-9158,
-6759,
-4931,
-4592,
75,
3152,
5390,
6061,
3681,
440,
-4474,
-8202,
-9382,
-6904,
-2399,
3320,
5572,
4793,
4281,
2142,
2664,
6711,
7536,
4612,
14,
-5418,
-7518,
-8266,
-9280,
-6671,
-4182,
-2971,
-1087,
-790,
-289,
1425,
3621,
7257,
9503,
5453,
-519,
-5287,
-7430,
-3620,
1433,
4810,
4151,
798,
-1615,
-4457,
-4963,
-4109,
-3859,
-5763,
-8697,
-7503,
-2097,
4028,
9600,
15031,
15868,
12881,
6511,
-1343,
-8789,
-13846,
-13213,
-9886,
-6560,
-1408,
3079,
8028,
11342,
11283,
8954,
2087,
-5458,
-11091,
-14182,
-13970,
-10003,
-496,
10312,
17702,
21861,
16030,
8447,
2351,
-2849,
-4277,
-8718,
-12728,
-13930,
-12736,
-7387,
797,
9368,
13684,
11568,
4909,
-1709,
-6927,
-11072,
-9081,
-5705,
-1103,
2494,
5567,
7512,
8939,
12982,
12751,
7458,
614,
-7019,
-12826,
-13661,
-11566,
-5424,
-1531,
-1350,
-1541,
-896,
1405,
3364,
6759,
9350,
10617,
8846,
5256,
-1526,
-7779,
-5944,
-6770,
-7327,
-4385,
-3467,
-2013,
-607,
3767,
6677,
6755,
4061,
-2807,
-5480,
-6956,
-6491,
-2568,
1723,
8541,
12837,
12688,
11123,
7714,
2393,
-2162,
-5747,
-9767,
-12465,
-11978,
-10330,
-1673,
9583,
16682,
18232,
10555,
1882,
-4343,
-10157,
-12177,
-10720,
-7173,
-2359,
1765,
8286,
13170,
16516,
14641,
8836,
1580,
-8090,
-14224,
-19379,
-19820,
-14470,
-3867,
6329,
13217,
17112,
14349,
6820,
936,
-2346,
-4783,
-7354,
-9211,
-8307,
-4676,
2960,
9597,
12808,
12124,
6764,
-778,
-7307,
-14716,
-16571,
-14245,
-10554,
-4459,
-2107,
2668,
6130,
9909,
15525,
15853,
11185,
2807,
-5896,
-11309,
-10834,
-6511,
-2340,
-976,
-2575,
-2459,
-883,
1407,
3150,
4564,
5311,
3093,
-33,
-1229,
-2370,
-4557,
-2471,
-1066,
685,
2612,
2520,
1614,
2086,
6047,
7254,
4807,
-1196,
-6738,
-10683,
-11698,
-9543,
-5551,
466,
5802,
8582,
9646,
9893,
4912,
143,
-3506,
-7374,
-8096,
-8016,
-6921,
-313,
7971,
13558,
14972,
10204,
3932,
-4586,
-11511,
-14027,
-12815,
-8247,
-4411,
-1871,
311,
5866,
12928,
12211,
7893,
2999,
-1699,
-4482,
-9173,
-9010,
-4297,
1827,
7765,
8110,
6447,
2265,
-4043,
-7643,
-8478,
-7860,
-7388,
-8861,
-8035,
-2681,
4912,
12036,
13886,
12508,
8168,
2387,
-3920,
-8578,
-11263,
-10061,
-5687,
-2674,
1308,
3215,
3634,
4883,
6234,
6052,
4065,
-1584,
-6804,
-8191,
-5527,
-92,
1390,
798,
526,
-1614,
-912,
1872,
4211,
6483,
8710,
7486,
2829,
-1595,
-7337,
-10586,
-9741,
-6254,
-2588,
876,
2167,
2249,
3437,
6042,
7524,
4771,
1707,
-3159,
-6247,
-6543,
-2968,
3380,
9020,
10519,
8579,
4698,
-2400,
-7756,
-9995,
-8853,
-9198,
-8414,
-6820,
-1560,
6924,
13110,
17549,
15955,
9792,
1673,
-7260,
-13614,
-14059,
-8796,
-2231,
3364,
7871,
9507,
8679,
2788,
-737,
-2451,
-4111,
-5911,
-8143,
-7241,
-5222,
864,
7736,
14725,
15958,
9097,
2442,
-5166,
-10204,
-9365,
-8475,
-6756,
-3999,
-322,
4432,
9108,
12410,
11709,
6602,
-461,
-6809,
-11380,
-12329,
-11837,
-8566,
-2170,
3757,
8967,
10662,
8847,
5752,
4596,
4576,
1945,
-2168,
-5259,
-6144,
-5901,
-3933,
-1523,
782,
1781,
-22,
-2021,
-3512,
-5445,
-4599,
2,
5714,
10031,
9372,
5378,
1017,
-310,
3161,
4268,
-172,
-3265,
-6802,
-8779,
-5322,
-3247,
-2390,
-2112,
-3130,
-1717,
1815,
5394,
6118,
6691,
7195,
6005,
2582,
-6054,
-10648,
-10977,
-8594,
-1807,
1818,
4289,
6214,
5525,
3736,
2515,
-458,
-3928,
-7156,
-9762,
-9485,
-6251,
-1157,
5942,
13447,
15381,
14490,
6079,
-3534,
-8428,
-11168,
-10287,
-9079,
-6749,
-2015,
3430,
7971,
11654,
11609,
6945,
293,
-6247,
-11331,
-14160,
-14050,
-9750,
-1662,
8008,
13955,
16940,
13984,
9520,
6372,
2153,
-3013,
-7309,
-10806,
-14520,
-14753,
-9544,
538,
8000,
10063,
6852,
3203,
-303,
-2573,
-2897,
-778,
-60,
2621,
4248,
2784,
3831,
3888,
4894,
1710,
-1539,
-4572,
-8635,
-11897,
-10904,
-4500,
1582,
4157,
2742,
1484,
2114,
2777,
2784,
3766,
2360,
-455,
-1258,
-3554,
-4741,
-3024,
-1991,
-1233,
-697,
1346,
2602,
580,
-502,
2468,
3483,
2666,
-63,
-6677,
-9689,
-9851,
-6539,
725,
9148,
12140,
11773,
7650,
2509,
2091,
-794,
-4867,
-9065,
-10283,
-9098,
-6496,
-1131,
5590,
12618,
14656,
11813,
3856,
-4774,
-10038,
-14395,
-13168,
-7377,
501,
7208,
13035,
15215,
15218,
14919,
7213,
-1645,
-10170,
-14696,
-17404,
-19280,
-14254,
-5369,
3922,
13375,
17279,
15290,
10348,
2103,
-2796,
-4469,
-5255,
-6844,
-8692,
-8557,
-3407,
8098,
15847,
15273,
9286,
638,
-6875,
-12782,
-14343,
-12442,
-8586,
-2592,
2504,
8345,
11500,
9859,
7813,
5798,
3109,
-881,
-5527,
-11641,
-12514,
-7211,
-353,
8315,
11234,
10668,
7471,
1660,
-1627,
-3822,
-6873,
-8283,
-9025,
-8039,
-4994,
-728,
5101,
9339,
12747,
13492,
9210,
1505,
-5230,
-8580,
-5924,
-2585,
-680,
-1535,
-4350,
-5323,
-3720,
2655,
8644,
8533,
5783,
-610,
-4688,
-4401,
-6234,
-3983,
-2881,
1191,
5495,
5220,
3716,
3969,
6935,
8797,
6868,
392,
-7913,
-15074,
-17481,
-14389,
-5939,
1481,
8469,
10646,
9330,
9481,
7530,
4481,
2614,
-972,
-6344,
-10552,
-12077,
-5675,
3052,
11068,
14027,
10167,
3489,
-3796,
-7680,
-9418,
-8770,
-7047,
-4185,
-1419,
1923,
6130,
10476,
11944,
10209,
7356,
-855,
-9032,
-16481,
-17731,
-12073,
-1440,
7138,
10062,
10973,
7020,
4189,
384,
-1644,
-4270,
-7739,
-10600,
-13671,
-12029,
-6167,
4180,
12294,
16369,
15238,
6952,
-1185,
-6637,
-7458,
-4289,
-3492,
-4033,
-4842,
-5154,
-2628,
898,
5309,
9880,
7767,
3721,
-4180,
-10397,
-9378,
-5822,
-93,
1963,
4112,
3927,
3011,
3160,
2339,
5298,
8882,
5487,
803,
-3488,
-10628,
-15946,
-15023,
-9720,
-3020,
5783,
7876,
9152,
11762,
10832,
8649,
2209,
-3059,
-9166,
-14166,
-13304,
-11247,
-3683,
8140,
15977,
16584,
11802,
4602,
-3522,
-9268,
-9598,
-8170,
-5231,
-5380,
-3528,
2840,
8631,
13094,
12599,
9328,
2106,
-7062,
-15470,
-18723,
-15504,
-5020,
9168,
16064,
17299,
14337,
7083,
940,
-3426,
-4380,
-6776,
-10837,
-14024,
-15499,
-11180,
-1377,
10485,
18905,
19778,
13070,
4795,
-4596,
-8951,
-9602,
-6613,
-2762,
-1230,
-1000,
-253,
46,
306,
5034,
6688,
5587,
1109,
-5395,
-8027,
-6092,
-1690,
1154,
2930,
3674,
-488,
-652,
639,
2655,
8285,
9108,
5716,
-1420,
-8824,
-12794,
-13204,
-10040,
-1911,
4674,
9251,
10121,
8286,
8601,
6483,
3333,
-1017,
-6325,
-13304,
-17034,
-15190,
-9917,
2932,
18723,
25248,
22714,
12372,
309,
-6943,
-12626,
-12591,
-12927,
-10386,
-7416,
-3913,
4279,
11184,
15230,
14462,
9073,
-1372,
-9880,
-15212,
-17478,
-12282,
2091,
13508,
17477,
17341,
12044,
5665,
-1832,
-8564,
-12028,
-14107,
-15586,
-15436,
-10081,
-206,
10924,
19961,
20242,
15596,
7550,
-661,
-7749,
-12049,
-8931,
-4366,
-1812,
-2713,
-1087,
2313,
4233,
6590,
6731,
5286,
-247,
-7328,
-9807,
-7113,
-2409,
3063,
3215,
863,
-348,
164,
2123,
1578,
3215,
5366,
4957,
2104,
-1987,
-7330,
-10319,
-9222,
-4755,
2111,
6680,
6881,
6434,
6649,
6199,
3174,
-407,
-5102,
-11444,
-13798,
-13262,
-8988,
205,
13427,
22639,
23016,
17263,
5303,
-7029,
-15403,
-21116,
-17294,
-13179,
-10356,
-4573,
1057,
9918,
16929,
17718,
13274,
4953,
-4636,
-10224,
-14014,
-13453,
-7866,
905,
8329,
12827,
15208,
10106,
2462,
-4456,
-10584,
-12933,
-12737,
-12717,
-10265,
-2607,
5776,
14130,
19636,
17161,
8870,
-411,
-6805,
-11151,
-10332,
-7660,
-1944,
160,
67,
3339,
1751,
1416,
3955,
4840,
2420,
-2932,
-9234,
-10565,
-8007,
-3713,
2359,
6065,
4960,
2515,
2035,
1077,
-25,
1366,
2786,
2178,
531,
-1536,
-4574,
-7804,
-5461,
-1669,
3610,
6615,
4521,
2007,
-1157,
-1581,
-991,
-2483,
-3166,
-5591,
-7584,
-5976,
-3786,
6173,
15771,
19384,
17270,
8699,
-596,
-11104,
-16103,
-16434,
-14683,
-9806,
-6338,
-2116,
6066,
12444,
18017,
19704,
13585,
4370,
-5712,
-14062,
-17210,
-12937,
-3372,
5100,
10738,
13612,
12241,
7099,
-575,
-3678,
-5374,
-8238,
-10239,
-11501,
-8113,
-2140,
6482,
13940,
17550,
14545,
6023,
-1075,
-9600,
-12417,
-9315,
-6667,
-4753,
-1187,
3381,
5503,
9035,
9898,
9407,
5698,
-2755,
-9321,
-15158,
-17668,
-13669,
-4959,
6074,
13326,
15480,
12220,
5388,
539,
-1026,
-885,
-3363,
-6352,
-8636,
-8261,
-4177,
1488,
8442,
12686,
10775,
4212,
-2698,
-9300,
-12186,
-10829,
-5716,
404,
5007,
7032,
6080,
7184,
9779,
10610,
7695,
1968,
-3112,
-8416,
-12394,
-12433,
-9325,
-5752,
-4261,
-375,
3023,
6379,
7223,
5602,
8582,
9509,
9045,
2734,
-8726,
-13661,
-12237,
-4507,
4406,
6853,
6741,
5130,
2729,
1703,
976,
-1919,
-6802,
-11847,
-12961,
-9985,
-5084,
1450,
10171,
17012,
17509,
14618,
3479,
-5156,
-9793,
-12936,
-11196,
-8673,
-3562,
1000,
6729,
10305,
11353,
9603,
2563,
-5981,
-13116,
-16028,
-14322,
-10488,
-3384,
8100,
14693,
17621,
14370,
5259,
-573,
-6260,
-7480,
-7928,
-7878,
-6926,
-5055,
-621,
4432,
12199,
12282,
5095,
-2703,
-9629,
-12020,
-11209,
-7705,
-943,
4290,
7996,
11519,
9647,
9009,
6752,
3061,
-693,
-7456,
-8143,
-8820,
-8069,
-6413,
-3444,
-448,
8,
1488,
3000,
5927,
5471,
5526,
4828,
4257,
3903,
3311,
-1001,
-7312,
-9172,
-7335,
-3161,
-18,
2811,
2931,
4933,
4897,
5185,
4145,
-2032,
-6327,
-9989,
-10179,
-7137,
-578,
6445,
10980,
12968,
12197,
7085,
-939,
-7089,
-10546,
-11596,
-10579,
-6297,
-189,
4989,
9204,
10449,
8006,
1587,
-5908,
-10425,
-12918,
-12505,
-8782,
-3446,
3877,
13424,
18643,
17749,
12208,
2982,
-4311,
-10418,
-14972,
-15541,
-13626,
-9530,
-2452,
7689,
14611,
15353,
9148,
-1334,
-6921,
-9423,
-11087,
-10019,
-6240,
727,
9680,
15329,
19042,
16803,
9207,
940,
-7958,
-13992,
-16569,
-16141,
-14641,
-10226,
-817,
7608,
12813,
15911,
13606,
9901,
3938,
-1354,
-4689,
-7494,
-9055,
-7296,
-1505,
2016,
3787,
4310,
3875,
2299,
1486,
-1571,
-4157,
-5440,
-3166,
-11,
-363,
1185,
729,
169,
2471,
5861,
7631,
5159,
374,
-2854,
-1236,
821,
113,
-2279,
-4451,
-4787,
-2990,
22,
2320,
2854,
1930,
1422,
-916,
-692,
-1616,
-4653,
-3954,
-2198,
1578,
6109,
7154,
7085,
8132,
7996,
6732,
937,
-6285,
-12128,
-15265,
-13054,
-7568,
228,
7831,
11156,
9545,
5558,
1915,
-2817,
-5674,
-8015,
-7859,
-2994,
1101,
5506,
11162,
15276,
16908,
11407,
-128,
-9390,
-16864,
-20066,
-19356,
-14147,
-6031,
2520,
9927,
14011,
18590,
16299,
9147,
2665,
-4353,
-6338,
-8377,
-10695,
-9890,
-6873,
1714,
8560,
9831,
8318,
2770,
-2566,
-6257,
-7599,
-4137,
-2112,
-1997,
-2804,
-964,
2890,
4177,
5721,
5583,
3571,
866,
-2418,
-4001,
-2516,
1400,
3287,
2259,
-1785,
-4216,
-4309,
-3410,
-103,
2496,
2659,
551,
-2357,
-2554,
-1433,
-3416,
-3680,
-2218,
168,
3873,
7084,
6487,
6935,
9792,
5821,
1037,
-5505,
-11981,
-14390,
-13747,
-8436,
-603,
6225,
7788,
6363,
4094,
2378,
-856,
-2981,
-3968,
-4479,
-2124,
8,
2534,
7875,
14364,
13238,
7970,
-64,
-9115,
-14539,
-18870,
-19076,
-11166,
-3270,
3562,
10140,
14958,
19245,
15175,
8145,
397,
-7555,
-10960,
-13068,
-14178,
-12440,
-5515,
4376,
11423,
14996,
12106,
4430,
-3345,
-7985,
-7046,
-6392,
-7330,
-9219,
-7916,
-3142,
2944,
7579,
8350,
6477,
3199,
987,
-722,
-2917,
-2033,
937,
2581,
2625,
2602,
1970,
187,
266,
2155,
2428,
997,
-2764,
-7104,
-6526,
-5699,
-3222,
-675,
2993,
5572,
7232,
8866,
6403,
5494,
4283,
2040,
-2366,
-5207,
-8196,
-11527,
-12209,
-8973,
-4346,
499,
3453,
3332,
4052,
3777,
3503,
2599,
1450,
357,
-1358,
-2128,
-1582,
3800,
8057,
8140,
5646,
285,
-5087,
-11323,
-14143,
-13543,
-10726,
-4511,
1944,
8119,
14057,
14378,
13215,
8997,
1578,
-3125,
-8076,
-12182,
-12775,
-8586,
-2622,
6268,
15023,
16671,
13120,
6051,
-4033,
-7768,
-7968,
-9519,
-11379,
-11764,
-7452,
-316,
7273,
14558,
17436,
14143,
6727,
-1221,
-8628,
-10044,
-4860,
-3704,
-331,
3005,
3467,
3989,
1560,
1224,
2387,
2336,
-416,
-4235,
-7175,
-8984,
-5950,
1428,
8029,
9744,
9658,
7137,
2574,
58,
15,
-972,
-2592,
-1286,
-1395,
-1665,
-4388,
-6496,
-4440,
-2169,
897,
3032,
-947,
-3830,
-4057,
-987,
6271,
7785,
4982,
1769,
-2951,
-3610,
2031,
5748,
5982,
3434,
-463,
-3695,
-6176,
-8351,
-6916,
-4885,
-2756,
191,
994,
2854,
5624,
7294,
9648,
8612,
2560,
-3464,
-12822,
-17186,
-12033,
-4201,
3968,
11902,
14556,
12680,
7785,
-138,
-4141,
-7503,
-11246,
-12427,
-13632,
-12416,
-6862,
955,
9252,
16927,
18648,
13524,
4417,
-4684,
-8166,
-6874,
-5320,
-5674,
-3832,
-1891,
1321,
5583,
7669,
9023,
5501,
-962,
-7036,
-11452,
-12262,
-9680,
-3693,
4170,
10937,
13598,
10344,
6695,
3601,
2376,
2528,
-1712,
-5329,
-7509,
-8667,
-9084,
-5881,
-397,
2083,
3670,
3381,
1929,
-155,
-3130,
-1770,
3380,
4303,
3168,
-1540,
-3242,
-3773,
-919,
5671,
5957,
1846,
-1978,
-2846,
-6217,
-5712,
-4711,
-4675,
-3563,
-2849,
-2305,
-435,
1777,
4997,
8640,
8992,
7134,
-1388,
-7863,
-12725,
-11990,
-4290,
1171,
4730,
7322,
9274,
8178,
5361,
2017,
-2841,
-6991,
-10231,
-13860,
-14164,
-10753,
-3221,
7721,
16932,
20696,
17567,
7452,
-1311,
-4649,
-6949,
-9064,
-9314,
-8581,
-6502,
-228,
4233,
9587,
10184,
3778,
-849,
-5992,
-9390,
-10159,
-10165,
-5251,
2043,
9903,
15657,
12812,
7742,
3829,
2018,
1008,
-2105,
-6332,
-10382,
-12202,
-9072,
-3597,
1789,
4196,
2182,
3109,
3804,
4162,
4869,
4295,
4666,
4757,
3932,
233,
-4106,
-5722,
-5194,
-2387,
51,
1074,
979,
543,
636,
3929,
5283,
780,
-3998,
-8206,
-8814,
-5703,
1,
5807,
9043,
9119,
8586,
4378,
-2294,
-6077,
-9605,
-7164,
-3161,
-1677,
690,
2845,
4670,
7597,
7475,
1871,
-3972,
-10249,
-15974,
-14931,
-8832,
264,
10648,
16638,
17337,
14603,
9624,
3233,
-3712,
-10024,
-14776,
-15088,
-12459,
-9146,
-1711,
7928,
14608,
14801,
8866,
1664,
-4602,
-8919,
-9369,
-7477,
-3331,
1561,
7557,
12120,
14605,
14331,
8350,
2737,
-5420,
-10912,
-13762,
-16032,
-12988,
-5057,
3180,
9661,
12173,
10923,
8533,
3519,
1074,
-604,
-1886,
-1889,
-1484,
-1935,
-604,
1474,
1550,
2403,
2612,
381,
-1739,
-6290,
-8510,
-4050,
902,
4308,
3100,
-547,
-3888,
-2695,
135,
3301,
3720,
1550,
369,
-115,
1581,
3454,
483,
-4042,
-4866,
-4492,
-2443,
-2001,
-3077,
-883,
3379,
4400,
4588,
-1325,
-8305,
-9914,
-9346,
-3401,
3574,
9903,
13509,
12189,
9264,
6790,
387,
-4503,
-10812,
-15250,
-14888,
-13153,
-7656,
-1129,
7901,
12814,
14707,
11475,
3163,
-2652,
-7282,
-8660,
-6440,
-3325,
-852,
3198,
7395,
11256,
11749,
7014,
-149,
-8871,
-13959,
-16710,
-15989,
-10268,
-2426,
8024,
15970,
17072,
12284,
5841,
-867,
-5191,
-5437,
-7666,
-9137,
-8344,
-4704,
1762,
8085,
11925,
8535,
3244,
-3551,
-7960,
-10646,
-10092,
-7099,
-2890,
2703,
5953,
9600,
9533,
7177,
2953,
254,
-2015,
-3055,
-5025,
-6742,
-5339,
-2332,
2212,
2392,
1931,
369,
-2702,
-5128,
-5276,
-4369,
-1667,
1619,
3433,
3972,
1541,
2145,
3999,
5120,
5072,
2918,
1830,
352,
-499,
-1273,
-3998,
-8916,
-10876,
-12122,
-11543,
-6302,
-655,
5407,
11048,
14107,
13091,
8928,
3024,
1110,
-657,
-2704,
-4040,
-4650,
-2259,
1093,
2488,
1865,
441,
-3064,
-4762,
-7858,
-11451,
-10194,
-5690,
151,
10274,
17605,
19951,
18054,
9333,
2370,
-3165,
-8865,
-11420,
-13810,
-11268,
-6095,
-2188,
5375,
9036,
9130,
5815,
813,
-4103,
-7443,
-8121,
-7396,
-3346,
2135,
7998,
14022,
16043,
11526,
7531,
-234,
-7043,
-9394,
-9473,
-11393,
-11771,
-7139,
-3158,
3355,
6279,
6470,
4559,
592,
-705,
510,
1289,
1314,
1196,
662,
2217,
3356,
3608,
2510,
1219,
1175,
862,
-2665,
-7369,
-6834,
-5527,
-1593,
-57,
-1642,
-2043,
-3656,
-1368,
2106,
6719,
8682,
10412,
9252,
8095,
5453,
-952,
-4929,
-10526,
-10238,
-7788,
-5339,
-1845,
1639,
5105,
5442,
3151,
-786,
-4177,
-6965,
-7093,
-3401,
1934,
7601,
10939,
12016,
11457,
11396,
5781,
-2906,
-10857,
-16772,
-17479,
-15917,
-9698,
361,
10527,
13056,
12532,
8969,
1508,
-4671,
-8515,
-8731,
-5125,
-2532,
1403,
6042,
8928,
13116,
10826,
4301,
-1831,
-8020,
-12358,
-13870,
-12834,
-6139,
1919,
6979,
11555,
11344,
6241,
3105,
-60,
-2948,
-3873,
-5739,
-6783,
-3882,
1114,
7382,
12510,
9867,
5361,
641,
-4801,
-8930,
-11813,
-10290,
-5978,
-91,
3764,
3594,
1979,
-1234,
-447,
2470,
2964,
1777,
-1476,
-4480,
-2080,
4019,
7717,
5820,
-144,
-4823,
-5901,
-4766,
-4315,
-4663,
-5468,
-3767,
-1965,
-216,
608,
-1815,
-2219,
-680,
2818,
6936,
6556,
3630,
2142,
3361,
5573,
4393,
-1988,
-8559,
-12282,
-14856,
-10662,
-2574,
3205,
7609,
9561,
9416,
8272,
3384,
-1277,
-4818,
-7798,
-8270,
-7548,
-4414,
1160,
8848,
12436,
12653,
7818,
-450,
-6790,
-12433,
-13859,
-10780,
-4935,
-455,
4119,
8264,
9565,
9564,
5870,
1473,
-2634,
-6735,
-10738,
-10439,
-6812,
256,
8771,
12440,
14728,
10775,
4529,
-2368,
-9407,
-11067,
-10186,
-8900,
-7557,
-5559,
-1347,
4144,
10051,
11926,
9598,
5059,
-244,
-3833,
-5800,
-3444,
-616,
1816,
3825,
5014,
5554,
3243,
-1081,
-3445,
-5466,
-6889,
-7945,
-8692,
-4946,
-1734,
2993,
7921,
9134,
9886,
8746,
4223,
970,
-1078,
-1307,
932,
-605,
-3263,
-4971,
-8885,
-8465,
-4461,
-262,
5139,
4788,
4150,
4084,
3678,
5374,
2124,
-1458,
-3245,
-5194,
-4907,
-3661,
714,
5948,
9738,
9884,
6527,
351,
-7812,
-12283,
-12072,
-8346,
-4111,
-2664,
-44,
6487,
9817,
12973,
9366,
1766,
-2425,
-8912,
-11789,
-12256,
-8350,
1056,
9384,
15960,
17517,
12333,
4843,
-4267,
-10686,
-10944,
-11033,
-12677,
-12719,
-9726,
-2477,
7132,
15219,
16874,
13624,
7635,
868,
-3907,
-5663,
-4825,
-4135,
-1497,
263,
2170,
3527,
1969,
1675,
-315,
-2934,
-5711,
-7285,
-6424,
-5749,
-2754,
3457,
10297,
10763,
9586,
6991,
2637,
2631,
1488,
123,
-1748,
-4154,
-5879,
-8109,
-7000,
-2170,
505,
3504,
4530,
4089,
3307,
550,
13,
1680,
4139,
1253,
-2969,
-6402,
-5632,
-1630,
3499,
7725,
8537,
9099,
5110,
122,
-4972,
-10230,
-11158,
-11046,
-10273,
-6697,
-2849,
3794,
11114,
14720,
13936,
8553,
-224,
-7382,
-13224,
-14203,
-9739,
-3960,
3175,
9832,
14428,
14453,
8602,
334,
-6088,
-11858,
-14660,
-16013,
-15805,
-12768,
-4509,
5585,
13580,
20179,
17410,
11376,
3509,
-4137,
-5245,
-6446,
-7967,
-8065,
-5926,
-3296,
427,
2400,
3246,
2574,
405,
-1786,
-4317,
-5358,
-5242,
-783,
2114,
5264,
6953,
5500,
4243,
3949,
3235,
1294,
-666,
-4593,
-7243,
-6058,
-5722,
-3438,
-1661,
-1194,
1080,
2162,
4262,
3792,
1263,
679,
2035,
4042,
2245,
-3055,
-5991,
-6266,
-3377,
2006,
7563,
8602,
8159,
6291,
2402,
-2009,
-8009,
-11098,
-13307,
-12566,
-7714,
-3480,
3206,
11209,
14080,
15566,
11599,
3103,
-3481,
-8420,
-11285,
-10605,
-7006,
-2364,
2554,
7320,
10294,
10714,
6433,
712,
-6282,
-13154,
-15977,
-16162,
-11204,
-4132,
4300,
12923,
18530,
20757,
17345,
9541,
1203,
-5395,
-9303,
-13121,
-14550,
-14834,
-10523,
-4100,
2533,
7954,
8843,
8444,
3752,
1371,
826,
464,
-1681,
-1948,
-1168,
1125,
5614,
5458,
3377,
2100,
-181,
-2841,
-5463,
-8059,
-8160,
-6680,
-2611,
1553,
5920,
6497,
4772,
3608,
3336,
4266,
3205,
1,
-2623,
-1320,
-255,
617,
-318,
-1136,
-776,
-1319,
517,
2854,
838,
272,
-915,
-1943,
599,
-1797,
-4145,
-3636,
-1649,
2273,
4545,
5548,
6749,
8171,
7839,
5439,
798,
-4669,
-8665,
-12063,
-11196,
-7988,
-3533,
4365,
8891,
9764,
8155,
2225,
-3980,
-7282,
-8742,
-9187,
-6616,
-1784,
4132,
11942,
17469,
18858,
15334,
5423,
-5094,
-12528,
-17594,
-19067,
-18223,
-13737,
-6597,
2631,
11606,
17171,
18372,
16384,
11870,
4023,
-1982,
-7111,
-11965,
-12961,
-10663,
-4405,
5019,
7866,
7991,
6002,
1121,
-710,
-2155,
-3050,
-6904,
-8630,
-7990,
-5534,
1275,
5789,
8600,
9401,
6533,
3442,
-398,
-2808,
-4464,
-4567,
-1826,
-2248,
-1437,
-395,
344,
3444,
4225,
3480,
-375,
-5718,
-8016,
-8080,
-5694,
-296,
2091,
2348,
2842,
2526,
4632,
7215,
6737,
5085,
4147,
402,
-3011,
-6782,
-10875,
-10696,
-8312,
-4519,
-809,
1754,
1798,
3109,
4408,
6925,
6929,
2012,
-2657,
-6264,
-5668,
-2122,
2180,
5544,
9544,
8702,
6194,
1669,
-5709,
-10112,
-13044,
-12534,
-11272,
-8649,
-4903,
1919,
10437,
17425,
20950,
17229,
7652,
-2297,
-9085,
-12782,
-14006,
-11914,
-9749,
-6779,
1073,
8172,
13670,
13272,
9571,
6730,
298,
-4614,
-9389,
-12962,
-12817,
-8995,
-534,
7704,
10877,
10768,
7867,
4343,
1814,
-5,
-2825,
-5829,
-7127,
-7556,
-5340,
-2078,
3558,
6737,
5281,
3537,
-67,
-3964,
-5630,
-8090,
-5439,
32,
3766,
7746,
4948,
2387,
4542,
6669,
7741,
3545,
-1512,
-4504,
-7863,
-6156,
-4514,
-3963,
-4638,
-6455,
-5664,
-1258,
2221,
4668,
7894,
8857,
9684,
7883,
2966,
-3829,
-7910,
-7523,
-4598,
-2404,
-1372,
402,
732,
984,
2286,
1173,
-2442,
-6348,
-9504,
-9025,
-5086,
581,
6216,
12805,
15259,
15497,
10701,
304,
-6921,
-12102,
-14724,
-14358,
-11519,
-6433,
-249,
7589,
15851,
18741,
14035,
5861,
-4037,
-12701,
-15364,
-14748,
-10940,
-5154,
2618,
9033,
14032,
18124,
14500,
8785,
1669,
-4697,
-8965,
-11961,
-11846,
-8959,
-4520,
1232,
7094,
8017,
6511,
3652,
617,
-1039,
-2956,
-3387,
-3816,
-2010,
-163,
3589,
7934,
6441,
4941,
1736,
560,
-379,
-2379,
-3670,
-4481,
-3033,
-3859,
-3885,
-3945,
-2669,
-1588,
663,
5120,
8841,
9256,
7582,
5125,
2632,
4075,
1172,
-4756,
-7828,
-10195,
-7933,
-4555,
-528,
3796,
5063,
5975,
3464,
1961,
-19,
-3707,
-5736,
-5474,
-2233,
1735,
4425,
6388,
6756,
7057,
6413,
-754,
-5915,
-10053,
-12175,
-10298,
-5371,
1989,
7325,
11141,
9766,
6856,
3514,
-2971,
-7668,
-10126,
-12226,
-9919,
-6036,
-1813,
6264,
14524,
19810,
17396,
10048,
831,
-6987,
-12450,
-15607,
-15472,
-11611,
-5067,
2071,
6359,
9302,
10683,
7140,
4594,
302,
-2438,
-3894,
-6670,
-9001,
-8709,
-2134,
4641,
10157,
11916,
8940,
5009,
-1570,
-6894,
-8233,
-9597,
-9671,
-7577,
-4519,
-233,
3517,
5496,
7529,
7379,
6008,
3684,
-1033,
-6251,
-4840,
-2084,
-1326,
-1050,
-3047,
-3114,
-3319,
-672,
3171,
4719,
3962,
2108,
-585,
-1064,
-859,
-4213,
-4320,
-4016,
-2633,
846,
2555,
2280,
3567,
6213,
6498,
4151,
188,
-4519,
-8236,
-9543,
-6188,
1243,
5655,
8226,
6502,
4353,
3463,
-2393,
-6259,
-7725,
-9623,
-8467,
-4921,
-1943,
7854,
17702,
20538,
17860,
9932,
335,
-9639,
-16903,
-20171,
-18102,
-12402,
-6268,
473,
6889,
13929,
16561,
13899,
9636,
2349,
-2726,
-8019,
-12842,
-12067,
-7339,
1731,
8877,
12077,
13194,
7393,
-734,
-6311,
-9947,
-9153,
-7877,
-9202,
-7172,
-2340,
2283,
8781,
11901,
11119,
8411,
3175,
-3078,
-6557,
-7255,
-6509,
-3756,
-1707,
-1077,
576,
-146,
946,
6455,
8849,
6856,
2468,
-2824,
-5645,
-5373,
-4175,
-3464,
-2727,
-2876,
-2475,
-229,
2206,
6522,
11308,
12407,
11222,
7725,
259,
-8032,
-13965,
-13343,
-8168,
-2452,
2664,
3189,
3033,
2187,
2028,
3035,
1614,
-618,
-3021,
-4562,
-3931,
738,
8100,
14272,
14236,
10305,
2909,
-5252,
-11800,
-15770,
-16842,
-16026,
-8798,
-3521,
4046,
11812,
15614,
18031,
13315,
6221,
-743,
-8532,
-14103,
-15997,
-10790,
-2750,
5131,
11646,
11874,
9181,
3819,
-1425,
-4630,
-7553,
-9728,
-11025,
-11592,
-7245,
-278,
8121,
15511,
16430,
12212,
4424,
-3431,
-10527,
-11462,
-8423,
-6245,
-2816,
237,
3068,
6213,
7711,
10296,
7553,
1705,
-3349,
-9550,
-12497,
-13261,
-8749,
-3371,
2881,
6868,
5922,
6446,
7640,
11481,
10432,
5549,
708,
-3657,
-6611,
-9370,
-9241,
-7290,
-4401,
-2297,
-1492,
-249,
1242,
689,
2955,
6200,
7609,
7643,
2715,
-1416,
-4425,
-1882,
2643,
1949,
2464,
1424,
-474,
-1371,
-2145,
-3311,
-3795,
-4250,
-7006,
-5635,
-3060,
552,
6735,
10892,
12334,
9116,
3234,
-1894,
-4954,
-6254,
-7892,
-6037,
-4478,
-1887,
4086,
6227,
7429,
8232,
3834,
-488,
-5041,
-10281,
-11953,
-12381,
-6922,
951,
9736,
14878,
15298,
12390,
3548,
-2154,
-5511,
-7973,
-8641,
-11426,
-10285,
-4949,
452,
7037,
11765,
12492,
6436,
-190,
-8596,
-11936,
-11712,
-10231,
-6341,
-2762,
2858,
8640,
14419,
15587,
14406,
8598,
606,
-6899,
-12404,
-15897,
-16195,
-12598,
-6197,
290,
4453,
5989,
6559,
7313,
7563,
7162,
4902,
1727,
-1839,
-3615,
-4503,
-681,
2334,
4007,
2825,
688,
-570,
-3463,
-5023,
-4109,
-1694,
875,
2573,
1160,
-830,
-346,
907,
4077,
7229,
6370,
3727,
-1113,
-3613,
-3819,
-1827,
-1701,
-4324,
-4669,
-2608,
83,
3410,
7070,
9059,
6340,
2325,
-2259,
-8358,
-11172,
-11894,
-9146,
-3697,
1590,
3094,
6221,
8872,
11278,
11964,
6733,
-309,
-6437,
-11521,
-13671,
-12515,
-6981,
915,
6751,
10022,
9098,
6619,
203,
-4731,
-5432,
-4652,
-3638,
-4234,
-3593,
414,
8781,
16371,
17133,
13109,
4077,
-4724,
-10260,
-14864,
-14975,
-12606,
-10776,
-7356,
-961,
5852,
12223,
15013,
15312,
12120,
6896,
1459,
-4137,
-9518,
-10530,
-7762,
-4722,
-1116,
1647,
2649,
3588,
3592,
3069,
3006,
-1128,
-4761,
-7553,
-5443,
-2891,
-12,
3004,
3959,
6565,
6034,
4509,
663,
-2819,
-5288,
-3900,
-2997,
-2455,
-2562,
-3627,
-1489,
2679,
7654,
8836,
5357,
-940,
-3608,
-4792,
-4087,
-2973,
-4840,
-5351,
-3596,
-499,
2528,
7375,
11380,
12339,
12785,
6991,
788,
-5982,
-12842,
-13741,
-12598,
-8434,
-4689,
-1408,
862,
3998,
7004,
9575,
8463,
5364,
249,
-4904,
-7608,
-6988,
-1022,
2172,
6801,
9014,
7723,
6302,
-199,
-7416,
-10270,
-12020,
-12866,
-12036,
-9517,
-4376,
5463,
14220,
18326,
19366,
12645,
4335,
-2026,
-7961,
-9299,
-9965,
-11723,
-9713,
-5971,
-407,
5561,
10572,
10282,
8641,
5515,
-1135,
-5554,
-9204,
-11209,
-10320,
-4592,
3332,
10000,
11499,
7617,
5038,
2831,
1010,
-555,
-4289,
-8120,
-7276,
-4980,
-1859,
1720,
3722,
6173,
6018,
3033,
-1532,
-5299,
-8009,
-6470,
-325,
3710,
3986,
1925,
-70,
2794,
7969,
9156,
7087,
2412,
-3062,
-7646,
-8379,
-7574,
-5918,
-5155,
-6475,
-6181,
-1935,
2578,
6619,
10169,
12599,
12194,
7539,
-98,
-8493,
-10931,
-10339,
-6042,
-2659,
1490,
6966,
5363,
4061,
2504,
201,
-2631,
-5616,
-9097,
-10034,
-7124,
-3036,
4269,
12681,
16391,
16002,
11424,
1922,
-4586,
-9187,
-11274,
-12263,
-11785,
-8728,
-5073,
2032,
9783,
16808,
18568,
11535,
3413,
-4564,
-11072,
-12530,
-12102,
-8720,
-4090,
1338,
6276,
9605,
11808,
13227,
13146,
8248,
1237,
-5192,
-11767,
-14503,
-12453,
-7574,
-1472,
3606,
5610,
4662,
4097,
2717,
70,
-74,
-1212,
-202,
1166,
-511,
288,
2014,
4907,
5804,
4389,
2705,
-768,
-5256,
-9398,
-8956,
-6163,
-3036,
-508,
-2259,
-1748,
10,
1021,
4671,
8721,
9452,
7632,
3041,
-3703,
-3671,
-4203,
-6631,
-6074,
-5019,
-3235,
-1960,
23,
4572,
8108,
8448,
6114,
1506,
-2886,
-7791,
-10869,
-9084,
-3810,
2428,
5882,
8497,
8499,
8296,
7479,
1961,
-1955,
-5790,
-9632,
-12448,
-12699,
-6444,
2009,
10225,
14151,
11912,
7849,
461,
-5980,
-9001,
-10778,
-9261,
-7423,
-5029,
-877,
5897,
14333,
19164,
17536,
12044,
2185,
-7799,
-16218,
-20267,
-18306,
-13417,
-5144,
1440,
5860,
9636,
10884,
9287,
8321,
5269,
1647,
-3083,
-7468,
-10572,
-9433,
-3292,
3989,
10380,
10537,
8269,
1899,
-4338,
-8378,
-8913,
-7057,
-6615,
-5894,
-4244,
-1133,
4206,
8101,
13084,
14591,
9524,
2854,
-6647,
-11958,
-10743,
-5539,
-1535,
134,
-81,
-715,
351,
4017,
6835,
6963,
4090,
-171,
-4268,
-6383,
-6078,
-7789,
-5206,
-1084,
2161,
4393,
5337,
4221,
2402,
5092,
7339,
4894,
951,
-4782,
-9271,
-10009,
-8545,
-3600,
2033,
5649,
6892,
5366,
2864,
-1342,
-4595,
-5033,
-5784,
-6603,
-6473,
-4516,
-441,
11102,
19471,
20474,
16123,
4004,
-4663,
-11662,
-15601,
-15375,
-13694,
-10357,
-7237,
-1666,
5992,
12725,
15437,
13473,
9262,
3122,
-2849,
-8765,
-12820,
-10276,
-3298,
6025,
11908,
11342,
8378,
3327,
-1340,
-4356,
-5639,
-7720,
-11349,
-12144,
-9193,
-3861,
4887,
10926,
13781,
14216,
9961,
4442,
-2580,
-7895,
-9204,
-7052,
-4119,
-2486,
994,
2831,
2437,
7121,
11373,
9647,
3546,
-4635,
-11180,
-12662,
-8533,
-2599,
1278,
2888,
3406,
3743,
6217,
7876,
9301,
9226,
5074,
917,
-2506,
-6559,
-10120,
-11395,
-6926,
-2922,
-326,
2553,
1557,
1123,
1766,
4681,
6128,
2736,
-1931,
-7280,
-8968,
-5290,
769,
8014,
12117,
10876,
8856,
4972,
-1206,
-7127,
-10768,
-14354,
-16091,
-12221,
-8746,
-3367,
5487,
13148,
20330,
19039,
12024,
4108,
-5186,
-10960,
-12509,
-9182,
-5465,
-546,
3536,
5775,
8100,
7471,
4798,
984,
-3863,
-7101,
-9032,
-10555,
-8492,
-4105,
3178,
12459,
16612,
14357,
8157,
1221,
-3878,
-7778,
-9356,
-9572,
-8208,
-5939,
-1623,
3132,
7379,
10057,
9132,
5832,
-1367,
-8596,
-12553,
-14728,
-12418,
-6061,
131,
5718,
8208,
9614,
10980,
10473,
8571,
4871,
-516,
-5889,
-8981,
-9507,
-8075,
-5991,
-3082,
-638,
2037,
2682,
1756,
1267,
281,
2212,
4964,
5885,
3700,
-1198,
-2537,
-1655,
341,
4134,
4635,
2873,
-121,
-2783,
-4835,
-7031,
-8113,
-9138,
-9337,
-7136,
-3915,
-264,
7244,
13273,
17050,
15836,
7905,
-152,
-4911,
-7143,
-9975,
-9959,
-8789,
-5334,
2454,
7219,
11311,
13519,
9096,
4459,
-456,
-6003,
-9152,
-11358,
-10042,
-5918,
734,
7380,
10393,
10236,
6515,
3057,
-1634,
-5693,
-8771,
-11703,
-11825,
-9499,
-3759,
3111,
9717,
11734,
9069,
2429,
-4608,
-8909,
-11098,
-9402,
-6063,
-2831,
2554,
7337,
11385,
14341,
13818,
11644,
6229,
-1402,
-8224,
-15075,
-18679,
-15629,
-10530,
-2025,
4441,
6379,
6335,
5945,
5911,
5029,
2593,
-343,
-1487,
-3503,
-2340,
980,
5309,
6507,
6268,
3946,
424,
-2414,
-7084,
-8112,
-6459,
-3876,
-1588,
-1435,
-1844,
408,
5021,
8577,
9944,
8401,
4728,
2269,
873,
2218,
1967,
-1239,
-4890,
-7947,
-8456,
-7488,
-3853,
342,
5898,
10070,
9678,
6757,
473,
-4396,
-6895,
-9051,
-5706,
-2654,
963,
4613,
6741,
11007,
11935,
7873,
1042,
-5105,
-10273,
-14397,
-14822,
-10309,
-3823,
3095,
7823,
10164,
9874,
5294,
-1211,
-5586,
-6777,
-7119,
-7293,
-5705,
-1391,
6281,
14924,
16948,
14086,
7693,
-577,
-8465,
-13756,
-16063,
-14244,
-10160,
-5469,
819,
6661,
11512,
11738,
9563,
7788,
3846,
-901,
-3332,
-6794,
-8244,
-3562,
1420,
5970,
9926,
9017,
4161,
-1716,
-5097,
-6487,
-5920,
-7052,
-7816,
-5313,
-3115,
1130,
6618,
11791,
13266,
11607,
6920,
909,
-4516,
-6477,
-4728,
-3225,
-3132,
-3454,
-3911,
-3387,
-1897,
1432,
4968,
3555,
843,
-3361,
-4743,
-3475,
-1934,
-226,
-1103,
-285,
26,
-45,
1473,
3203,
5759,
7308,
6431,
2804,
-2522,
-7390,
-10824,
-10990,
-8363,
-4592,
937,
4066,
4274,
4940,
4238,
3986,
2086,
-259,
-3401,
-8444,
-9701,
-7756,
1112,
11635,
16250,
15491,
11155,
2189,
-5706,
-9705,
-12651,
-13604,
-13643,
-11055,
-7183,
756,
9013,
15471,
17497,
14252,
7767,
599,
-6065,
-11596,
-11927,
-7304,
-2095,
3246,
8223,
8601,
6880,
2638,
-1308,
-4495,
-6349,
-8365,
-11930,
-13235,
-11107,
-3606,
7228,
16339,
19863,
15195,
8452,
-164,
-5792,
-4973,
-6243,
-8310,
-9298,
-8789,
-4980,
677,
6283,
10921,
10907,
6952,
-156,
-5651,
-9355,
-9690,
-5019,
-140,
4094,
7461,
7384,
4556,
2601,
3090,
5037,
3078,
-2397,
-5680,
-5842,
-5398,
-3256,
107,
2316,
3912,
3374,
1184,
-2291,
-5195,
-4926,
-3981,
-51,
2125,
1205,
-928,
-2979,
-1258,
5403,
10630,
10078,
7033,
2596,
-1489,
-5179,
-7419,
-8925,
-10514,
-12739,
-11508,
-8721,
-703,
8858,
15216,
19256,
18058,
13020,
5084,
-2424,
-10108,
-11686,
-9493,
-6809,
-2043,
2169,
4375,
5898,
6886,
4472,
1579,
-3147,
-9087,
-12647,
-12056,
-8271,
-1964,
7057,
15167,
18698,
14420,
7105,
1037,
-3991,
-6671,
-9734,
-12100,
-12434,
-9853,
-5506,
1117,
9294,
13139,
11964,
6008,
-2110,
-7261,
-8916,
-9404,
-5784,
-1897,
967,
3049,
3886,
4991,
5670,
7586,
6524,
3024,
-2104,
-6590,
-8999,
-9318,
-5469,
-1286,
994,
1941,
1936,
2799,
2345,
859,
13,
1262,
3915,
3964,
1985,
-2271,
-4533,
-1267,
4032,
8472,
8606,
5231,
2498,
-1272,
-3151,
-3862,
-7107,
-10150,
-11359,
-9340,
-5251,
2074,
8272,
13025,
17326,
15511,
11842,
4365,
-4418,
-9475,
-11697,
-9964,
-8020,
-4533,
-576,
3333,
7725,
9996,
10918,
5385,
-3722,
-8681,
-12637,
-12253,
-8456,
-4718,
3397,
11344,
15874,
16099,
11005,
3731,
-3476,
-8953,
-10827,
-11506,
-11340,
-10694,
-5891,
2368,
11373,
16854,
11698,
5156,
-1633,
-5877,
-7242,
-7828,
-7458,
-5574,
-44,
4677,
8608,
9852,
9071,
6798,
3074,
-1800,
-5486,
-8989,
-11405,
-9190,
-4539,
1022,
5727,
6873,
4963,
2646,
50,
-1653,
-1875,
-2854,
-2377,
-2000,
-697,
1215,
2075,
4350,
4792,
4819,
4366,
-387,
-7004,
-10793,
-13560,
-10412,
-5857,
-1759,
697,
-306,
-375,
2420,
9314,
11653,
10024,
5374,
1805,
-2016,
-1911,
-3007,
-8725,
-9587,
-9325,
-6916,
-1663,
2285,
4139,
6515,
6756,
7729,
5941,
-424,
-6407,
-10293,
-8891,
-3065,
3524,
8022,
9919,
9725,
7291,
4366,
47,
-4458,
-7395,
-10619,
-10920,
-9363,
-6212,
-1627,
4317,
9783,
11587,
9619,
4075,
-788,
-4458,
-7247,
-7128,
-4941,
-1863,
1737,
5192,
9073,
10869,
7230,
1044,
-5563,
-10500,
-10525,
-8829,
-7578,
-5568,
-2163,
2795,
8238,
11833,
11494,
8595,
4747,
214,
-2870,
-2802,
-3249,
-5731,
-3985,
-1252,
1233,
4926,
4611,
2425,
-613,
-3608,
-6825,
-8764,
-8660,
-7059,
-2669,
2860,
9354,
13192,
12784,
11605,
8025,
4103,
-144,
-6207,
-9848,
-12649,
-12482,
-10451,
-7516,
-2655,
2169,
6060,
8260,
7177,
4430,
1411,
-1569,
-72,
509,
-179,
-627,
-2335,
-2278,
564,
2060,
2761,
3227,
810,
-454,
-1745,
-3399,
-5486,
-6512,
-3836,
-1228,
-766,
-211,
1282,
2596,
6195,
8791,
8371,
4202,
-1730,
-5147,
-6519,
-4192,
-248,
2572,
4151,
6919,
7969,
5072,
2317,
-2698,
-6492,
-6632,
-8252,
-8617,
-7533,
-4749,
-153,
7598,
16336,
17914,
14564,
6567,
-494,
-3587,
-6608,
-8837,
-10673,
-10349,
-6562,
-1903,
3747,
8076,
8540,
4855,
435,
-4432,
-8544,
-9316,
-8503,
-4567,
1529,
8338,
12862,
15178,
13386,
7997,
1131,
-4705,
-9154,
-12803,
-15015,
-16552,
-12234,
-4499,
3656,
11033,
13272,
11589,
9560,
5177,
662,
-2090,
-2827,
-3584,
-4238,
-3209,
-1289,
3359,
6201,
7743,
7001,
2743,
-3169,
-8782,
-10317,
-10360,
-7116,
-2315,
172,
2519,
3266,
3714,
5053,
6743,
6989,
2399,
-3681,
-8275,
-7474,
-2774,
1003,
3548,
2419,
1840,
1104,
-980,
-882,
-1309,
-2964,
-2445,
-3114,
-4261,
-1762,
-2511,
-2646,
991,
4111,
7175,
8040,
4370,
2605,
3706,
4315,
2862,
-875,
-4090,
-7390,
-8364,
-5780,
-2574,
1155,
3894,
4202,
3621,
2263,
-51,
-4166,
-5502,
-4078,
-3600,
-116,
1730,
2787,
8105,
12937,
14222,
10911,
3140,
-6484,
-13910,
-16796,
-16068,
-10887,
-4208,
-20,
5361,
10275,
11609,
10689,
6659,
1920,
-906,
-4645,
-7747,
-10225,
-10032,
-3782,
2956,
10433,
12866,
9362,
3158,
-4645,
-8503,
-8405,
-7782,
-8185,
-8091,
-5671,
-422,
5977,
11329,
12953,
11392,
6186,
-213,
-7239,
-11683,
-11195,
-8477,
-3705,
369,
5106,
8774,
7989,
5366,
2987,
305,
-2581,
-6198,
-10684,
-13756,
-11168,
-6138,
1125,
9498,
12115,
12398,
9369,
3973,
1088,
-1466,
-4336,
-5457,
-4907,
-4028,
-1388,
-114,
1149,
2997,
3138,
3050,
-765,
-5902,
-8947,
-8698,
-5248,
914,
5073,
4961,
4502,
4169,
5535,
8697,
9199,
4611,
910,
-3102,
-5843,
-7568,
-10646,
-9440,
-5682,
-2446,
865,
3372,
4496,
5069,
5954,
7229,
7678,
5271,
1173,
-3904,
-8433,
-8802,
-5506,
-479,
3653,
7061,
6803,
3935,
1208,
-1457,
-2787,
-3551,
-5694,
-8460,
-7501,
-6145,
-1342,
4674,
9746,
14441,
12389,
5653,
-602,
-5546,
-7100,
-6921,
-7314,
-4584,
-1719,
718,
4521,
8275,
8987,
6856,
1509,
-5654,
-9862,
-11693,
-11421,
-9307,
-3384,
5186,
12314,
15232,
13537,
10017,
5785,
931,
-3135,
-6204,
-8820,
-10060,
-8332,
-4193,
-232,
3507,
6776,
6699,
5504,
2109,
-2957,
-5342,
-5075,
-2618,
550,
2742,
6764,
9197,
7958,
7864,
4564,
137,
-4777,
-11459,
-14029,
-12195,
-8040,
-2430,
2081,
4505,
5605,
5276,
5272,
4181,
2811,
1589,
252,
407,
-453,
-1752,
-3179,
-4358,
-2911,
-1114,
889,
2531,
1766,
222,
1639,
2988,
2326,
1561,
-2588,
-7041,
-7594,
-7756,
-4201,
1972,
5762,
9425,
10102,
8763,
5827,
1052,
-2520,
-5671,
-7748,
-9610,
-10283,
-7998,
-1675,
7828,
12996,
13195,
9344,
-323,
-6328,
-10288,
-12775,
-10735,
-8591,
-4026,
1882,
8303,
14352,
16694,
14364,
6706,
-1661,
-7153,
-10854,
-13166,
-13640,
-11038,
-4844,
2693,
8398,
11113,
10246,
5163,
-303,
-2900,
-3599,
-3624,
-4734,
-4709,
-1868,
3100,
8481,
10115,
8206,
5160,
-423,
-7455,
-11644,
-12105,
-10312,
-6827,
-1694,
2558,
6068,
8280,
7960,
7826,
7604,
4204,
-813,
-7146,
-10727,
-10326,
-5698,
95,
3173,
4746,
4468,
4276,
3980,
3391,
101,
-3255,
-4751,
-4006,
-2793,
-1615,
-3138,
-5283,
-3641,
322,
5023,
6795,
5552,
1530,
1000,
2838,
3899,
2006,
-1731,
-5542,
-8376,
-7463,
-3394,
1632,
5670,
6765,
6255,
3854,
-165,
-4392,
-8263,
-7697,
-6052,
-4010,
-1750,
932,
3588,
9178,
14413,
13296,
8357,
1653,
-5303,
-9975,
-12241,
-12687,
-10187,
-6005,
238,
5041,
8509,
10089,
8390,
4239,
1476,
-1536,
-4738,
-7366,
-9158,
-8226,
-3508,
3388,
8064,
11267,
9533,
4606,
-32,
-4317,
-5239,
-4465,
-4470,
-5307,
-5346,
-2063,
2706,
6942,
8588,
8309,
5412,
483,
-4755,
-9204,
-9399,
-7291,
-1724,
3499,
6573,
8920,
7518,
5600,
4683,
2205,
-955,
-4066,
-7465,
-7286,
-7037,
-6438,
-3443,
-1576,
2762,
6017,
6517,
5033,
1792,
-630,
243,
2485,
2670,
2425,
529,
-3198,
-4311,
-2273,
85,
1239,
463,
-1676,
-2665,
-1368,
-1042,
-1596,
-2148,
-2630,
-3139,
-3133,
-994,
2695,
7205,
10050,
10203,
8344,
4903,
-565,
-6891,
-10385,
-10529,
-9981,
-8125,
-5047,
-1055,
4109,
9161,
10743,
8925,
5759,
1945,
-1260,
-4630,
-6779,
-6684,
-5507,
-2668,
1865,
6447,
9150,
7816,
4801,
3132,
1555,
-773,
-3630,
-6029,
-7539,
-6726,
-4244,
-456,
4633,
7038,
6108,
3125,
-786,
-2958,
-3807,
-4447,
-3422,
-1668,
1104,
3390,
4566,
6152,
5275,
5056,
3273,
-856,
-5667,
-9825,
-12170,
-11963,
-7789,
-2861,
2370,
5934,
7382,
8635,
9195,
9493,
7737,
2142,
-2175,
-4185,
-5957,
-6344,
-6151,
-5683,
-3743,
-1154,
100,
2338,
3397,
1940,
1934,
1619,
937,
245,
-1846,
-2966,
-2464,
56,
2111,
3851,
5867,
5937,
4756,
1815,
-1794,
-4084,
-6390,
-7452,
-7496,
-7923,
-6077,
-2227,
1295,
6266,
11212,
11746,
10078,
5284,
-624,
-3746,
-7120,
-8896,
-8535,
-6876,
-4691,
-1834,
3436,
8223,
10323,
10486,
5969,
-1,
-4696,
-7818,
-8404,
-7643,
-6297,
-4362,
-823,
3329,
7951,
9785,
8301,
5361,
686,
-2013,
-4394,
-7043,
-6573,
-5175,
-2634,
1371,
4379,
5989,
4760,
1682,
-2476,
-6296,
-7637,
-7732,
-6552,
-4260,
-692,
5407,
10523,
14568,
14058,
9588,
4638,
-2144,
-7707,
-11888,
-12405,
-11157,
-9200,
-5809,
-2003,
3977,
8297,
9943,
10893,
8555,
4561,
-73,
-4861,
-5325,
-3896,
-2222,
-1222,
-950,
-1182,
-363,
923,
2032,
2521,
1984,
-227,
-2458,
-2590,
-2193,
-726,
-1129,
-1778,
-1223,
-127,
1019,
2557,
4168,
5199,
5093,
4332,
2744,
554,
-2647,
-7220,
-8191,
-8038,
-6262,
-1702,
2221,
5500,
7611,
7461,
6641,
3637,
859,
-1723,
-5183,
-6921,
-8184,
-6123,
-2286,
2282,
7256,
9040,
8537,
5609,
1451,
-2257,
-4875,
-5799,
-6178,
-5561,
-4907,
-2866,
944,
3364,
5387,
5964,
4362,
1433,
-2055,
-4942,
-5616,
-4528,
-2221,
1018,
3975,
6481,
6917,
5823,
2907,
-323,
-4290,
-8442,
-9308,
-9807,
-8923,
-6111,
-2104,
3203,
9355,
14028,
13847,
11656,
7198,
1655,
-3159,
-6935,
-8253,
-8089,
-7061,
-6473,
-3963,
-145,
3919,
7306,
7880,
6712,
4279,
979,
-1679,
-3283,
-3602,
-3548,
-1975,
1133,
3733,
4535,
4095,
2884,
1396,
-438,
-2404,
-4351,
-5966,
-5597,
-4541,
-1955,
814,
1981,
1683,
1592,
1264,
2035,
3357,
1913,
-55,
-612,
-1021,
-1788,
-1719,
-2047,
-2662,
-2457,
-1361,
115,
1565,
1401,
1894,
2301,
2596,
2767,
1635,
-705,
-3214,
-5281,
-6897,
-5942,
-2960,
-65,
2085,
3530,
3998,
4728,
4094,
2327,
526,
-1682,
-2928,
-3982,
-3212,
-726,
988,
2703,
3464,
2998,
1752,
-1105,
-3305,
-4388,
-4141,
-2486,
-93,
3474,
6633,
9894,
11389,
9714,
6700,
785,
-4982,
-9708,
-12819,
-13583,
-12753,
-9351,
-4753,
1384,
7538,
12574,
14668,
13174,
9539,
2981,
-2136,
-5825,
-8991,
-10006,
-9343,
-6347,
-3095,
-284,
2178,
3968,
5505,
5180,
3425,
1006,
-1476,
-3360,
-3980,
-3372,
-1991,
-705,
959,
2548,
3615,
3824,
3062,
1490,
-1023,
-2779,
-3329,
-3422,
-2245,
-311,
1077,
2693,
3532,
4007,
2886,
806,
-364,
-1864,
-2186,
-2920,
-3676,
-3597,
-2502,
-24,
1315,
2319,
2883,
3083,
3809,
3497,
2656,
1312,
-563,
-2180,
-3192,
-3580,
-2885,
-2673,
-2833,
-2147,
-1011,
278,
2099,
3633,
3578,
3276,
2578,
1652,
843,
-344,
-1198,
-1412,
-1450,
-683,
606,
1472,
1012,
-722,
-2444,
-4376,
-5319,
-4945,
-4191,
-3365,
-1505,
1020,
4022,
7421,
10194,
9707,
7181,
3671,
-352,
-3544,
-7265,
-9542,
-10589,
-9201,
-6717,
-3148,
1758,
5208,
8039,
8928,
8566,
6479,
2940,
-977,
-4846,
-7020,
-7431,
-6231,
-3600,
-561,
2382,
4159,
5251,
5279,
4183,
2188,
-684,
-2857,
-4288,
-4691,
-3606,
-2564,
-1239,
353,
1877,
3337,
3355,
2553,
955,
-1093,
-2290,
-2885,
-2688,
-1869,
-661,
1607,
3419,
3885,
3768,
2640,
874,
-1198,
-2979,
-4343,
-4227,
-3807,
-3483,
-1966,
-15,
2241,
4140,
4494,
4320,
3514,
2685,
1472,
-99,
-1074,
-1901,
-2195,
-1826,
-801,
-2,
135,
282,
215,
460,
726,
87,
-750,
-1827,
-2611,
-2566,
-1288,
841,
2345,
3157,
3327,
3105,
3077,
2879,
2016,
-117,
-2161,
-3081,
-4482,
-5878,
-7052,
-6591,
-4768,
-1910,
1300,
5119,
7840,
8521,
8530,
6465,
4037,
804,
-2442,
-4680,
-6492,
-6767,
-6237,
-4642,
-1727,
1250,
3354,
4647,
4826,
3982,
1962,
-160,
-2330,
-3573,
-3394,
-2477,
-1275,
133,
1881,
3209,
4302,
4284,
3035,
1177,
-1395,
-3534,
-4402,
-4410,
-3568,
-2432,
-1023,
287,
1492,
2652,
2778,
2348,
1473,
352,
-736,
-1909,
-2412,
-2037,
-1208,
-254,
730,
2037,
2922,
3675,
3916,
3334,
1976,
-116,
-1975,
-3611,
-4246,
-4108,
-3375,
-1418,
397,
1786,
2508,
2580,
2300,
1787,
1415,
783,
-78,
-717,
-1146,
-854,
-166,
517,
1561,
1979,
1663,
288,
-1692,
-3165,
-4839,
-5404,
-5095,
-4100,
-2260,
-73,
2810,
5118,
6703,
6981,
6519,
5086,
2047,
-848,
-3703,
-5505,
-6437,
-6075,
-4964,
-3694,
-1752,
10,
1495,
2755,
3688,
3584,
2729,
1195,
-502,
-1197,
-838,
-351,
30,
466,
103,
44,
214,
59,
287,
472,
77,
-309,
-1067,
-1752,
-1630,
-1276,
-978,
-490,
150,
953,
1690,
2298,
2606,
2416,
2184,
1575,
717,
132,
-612,
-1823,
-2459,
-2318,
-1557,
-22,
940,
2027,
2569,
2193,
1302,
176,
-820,
-2156,
-3011,
-3261,
-3044,
-1898,
-791,
542,
2126,
2768,
3148,
3160,
2570,
1555,
56,
-1341,
-2217,
-2272,
-2227,
-1944,
-1550,
-1286,
-988,
-744,
-258,
246,
478,
261,
0,
18,
536,
1231,
1897,
2352,
2713,
2702,
1946,
1326,
257,
-1077,
-2596,
-4032,
-4987,
-5293,
-4422,
-2926,
-1016,
1254,
3369,
4906,
5729,
6051,
5160,
3298,
993,
-1542,
-3581,
-4961,
-4934,
-4120,
-2484,
-263,
1340,
2296,
2294,
1649,
460,
-1050,
-2433,
-3295,
-2986,
-2270,
-1393,
50,
1788,
3386,
4242,
4319,
3532,
1822,
-164,
-2141,
-3879,
-4989,
-4863,
-3536,
-2104,
157,
1905,
2791,
3645,
3634,
3043,
2229,
404,
-1109,
-1973,
-2275,
-1896,
-1219,
-321,
745,
1527,
1931,
2382,
2018,
1556,
1068,
321,
-569,
-1801,
-2223,
-2329,
-2133,
-1318,
-693,
-487,
-195,
-258,
103,
685,
1223,
1395,
1406,
1572,
1640,
1803,
1592,
440,
-430,
-945,
-1478,
-1456,
-1693,
-1840,
-1745,
-1594,
-1212,
-651,
-118,
243,
755,
1254,
1920,
2329,
3062,
3437,
3157,
2363,
1157,
-512,
-2187,
-3143,
-3991,
-4249,
-3928,
-3026,
-1298,
94,
1339,
2516,
2736,
2658,
2426,
1925,
868,
-301,
-873,
-1505,
-1495,
-1010,
-261,
798,
1481,
1647,
1265,
429,
-889,
-2240,
-3056,
-3394,
-3205,
-2621,
-1192,
721,
2344,
3596,
4301,
4300,
3694,
1926,
250,
-1482,
-2959,
-3822,
-4345,
-3762,
-2375,
-237,
1640,
3223,
4127,
3769,
2717,
845,
-1091,
-2564,
-3578,
-3854,
-3424,
-2259,
-581,
1048,
2589,
3551,
4020,
3837,
2962,
1610,
106,
-1166,
-2011,
-2553,
-2717,
-2203,
-1730,
-1439,
-874,
-120,
588,
1075,
1199,
820,
406,
198,
217,
522,
1037,
1523,
1940,
1975,
1816,
1463,
216,
-1062,
-2321,
-3308,
-3563,
-3418,
-2838,
-1976,
-796,
625,
1832,
2701,
3131,
3068,
2674,
1778,
873,
93,
-633,
-1284,
-1615,
-1695,
-1473,
-866,
-190,
95,
-28,
-616,
-1198,
-1349,
-1338,
-927,
-680,
-188,
574,
1602,
2442,
2829,
2723,
1825,
1103,
155,
-739,
-1347,
-1662,
-1901,
-2093,
-1959,
-1694,
-1112,
-360,
302,
914,
1191,
1282,
1345,
1450,
1221,
610,
-88,
-539,
-626,
-836,
-912,
-1270,
-1249,
-628,
-130,
644,
1289,
1578,
1732,
1228,
392,
-581,
-1513,
-2318,
-2958,
-2709,
-2130,
-1032,
235,
1474,
2685,
3259,
3205,
2509,
1548,
233,
-932,
-1616,
-2025,
-2147,
-1963,
-1621,
-984,
86,
938,
1524,
1494,
946,
-56,
-1043,
-1619,
-1695,
-1149,
-147,
748,
1792,
2723,
3280,
3231,
2259,
906,
-631,
-2057,
-3133,
-3737,
-3783,
-3239,
-2301,
-1527,
-194,
1224,
2375,
3008,
2832,
2235,
1588,
1048,
597,
312,
182,
125,
59,
-48,
-254,
-560,
-769,
-1196,
-1780,
-1988,
-2145,
-2146,
-1531,
-659,
560,
1861,
2901,
3401,
3244,
2431,
1259,
-38,
-958,
-1855,
-2431,
-2650,
-2372,
-1719,
-995,
358,
1455,
2177,
2411,
2079,
1430,
586,
-251,
-941,
-1770,
-2331,
-2046,
-1257,
54,
1101,
1911,
2048,
1897,
1863,
1841,
1551,
569,
-228,
-982,
-1571,
-2037,
-1838,
-1421,
-1314,
-1138,
-722,
-104,
555,
1208,
1363,
1085,
844,
600,
275,
82,
88,
-47,
32,
65,
137,
592,
858,
611,
15,
-738,
-1630,
-2235,
-2822,
-2779,
-2250,
-1431,
-328,
947,
2188,
2970,
3641,
3772,
3107,
2139,
821,
-830,
-2716,
-3802,
-4027,
-3627,
-2563,
-1390,
-346,
185,
841,
1355,
1469,
1333,
908,
467,
18,
-118,
93,
448,
843,
1004,
790,
524,
165,
-218,
-684,
-1423,
-1949,
-1986,
-1502,
-881,
-146,
801,
1352,
1558,
1681,
1630,
1331,
897,
242,
-487,
-1048,
-1291,
-1168,
-570,
151,
742,
1186,
1551,
1456,
1052,
758,
325,
-293,
-1020,
-1888,
-2268,
-2037,
-1106,
-23,
884,
1534,
1804,
2021,
1859,
1410,
594,
-78,
-831,
-1434,
-1576,
-1467,
-874,
-323,
86,
494,
578,
520,
188,
-385,
-925,
-1525,
-1926,
-2174,
-1823,
-736,
434,
1772,
2826,
3390,
3747,
3202,
2064,
305,
-1432,
-2762,
-3517,
-3778,
-3619,
-2937,
-1902,
-602,
445,
1333,
2148,
2528,
2532,
2146,
1404,
580,
-84,
-369,
-441,
-200,
-174,
-152,
-275,
-515,
-761,
-834,
-856,
-826,
-791,
-804,
-505,
-25,
689,
1319,
1640,
1602,
1296,
917,
597,
290,
32,
-350,
-533,
-633,
-700,
-696,
-819,
-725,
-524,
-384,
-173,
230,
454,
516,
693,
746,
720,
496,
126,
-244,
-533,
-662,
-536,
-381,
-153,
8,
236,
422,
399,
375,
218,
-206,
-661,
-1001,
-995,
-781,
-536,
-212,
40,
183,
314,
298,
240,
119,
-99,
-293,
-320,
57,
565,
969,
1230,
1210,
1040,
649,
29,
-692,
-1338,
-1875,
-2255,
-2173,
-1856,
-1200,
-287,
580,
1442,
2049,
2505,
2551,
2134,
1364,
69,
-1090,
-1864,
-2126,
-1983,
-1576,
-850,
-221,
500,
919,
1087,
1039,
696,
360,
-100,
-480,
-586,
-519,
-132,
375,
786,
1046,
1113,
1094,
891,
430,
-112,
-655,
-1113,
-1464,
-1557,
-1386,
-804,
-38,
511,
894,
1040,
990,
901,
811,
560,
99,
-239,
-571,
-816,
-889,
-719,
-334,
-38,
114,
229,
395,
363,
260,
69,
-125,
-349,
-435,
-523,
-497,
-460,
-241,
-38,
228,
416,
293,
186,
137,
83,
34,
90,
184,
291,
263,
195,
128,
47,
-95,
-283,
-338,
-496,
-539,
-458,
-403,
-325,
-325,
-85,
162,
546,
906,
1017,
1051,
619,
297,
35,
-244,
-460,
-732,
-936,
-1070,
-895,
-648,
-228,
146,
460,
596,
581,
647,
695,
732,
608,
395,
162,
-97,
-362,
-588,
-662,
-618,
-450,
-190,
119,
479,
749,
725,
483,
220,
67,
-51,
-185,
-262,
-305,
-151,
73,
425,
711,
829,
755,
365,
-97,
-528,
-850,
-1016,
-1084,
-938,
-686,
-152,
395,
917,
1275,
1254,
1048,
678,
209,
-276,
-811,
-1104,
-1299,
-1283,
-1003,
-626,
-281,
-78,
245,
514,
692,
804,
660,
404,
159,
112,
146,
66,
-23,
-352,
-714,
-1009,
-962,
-659,
-201,
223,
460,
591,
749,
766,
667,
492,
126,
-240,
-620,
-861,
-918,
-890,
-602,
-348,
-90,
297,
772,
1127,
1154,
1012,
593,
139,
-233,
-463,
-496,
-435,
-345,
-255,
-169,
-102,
36,
198,
338,
378,
263,
263,
333,
356,
249,
79,
-58,
-116,
-50,
-24,
-77,
-89,
-36,
-32,
-10,
52,
-16,
-220,
-631,
-856,
-935,
-599,
-127,
244,
435,
252,
127,
107,
272,
595,
729,
611,
516,
294,
-30,
-258,
-656,
-1098,
-1431,
-1676,
-1583,
-1099,
-344,
514,
1376,
2066,
2458,
2508,
2267,
1660,
440,
-689,
-1583,
-2049,
-2145,
-1974,
-1466,
-1093,
-436,
51,
572,
896,
987,
1246,
751,
522,
247,
-329,
-370,
-481,
-632,
-567,
-192,
168,
552,
580,
-91,
-698,
-850,
-511,
-271,
-223,
10,
439,
723,
901,
590,
509,
489,
96,
-98,
-219,
-452,
-641,
-441,
-327,
-88,
351,
681,
944,
1007,
661,
263,
-184,
-506,
-638,
-868,
-816,
-853,
-692,
-317,
238,
930,
1124,
962,
640,
402,
240,
246,
284,
175,
52,
-156,
-99,
-88,
-175,
-327,
-678,
-863,
-960,
-1013,
-664,
-69,
223,
206,
279,
454,
881,
1064,
759,
225,
-121,
-514,
-856,
-811,
-577,
-141,
246,
380,
288,
37,
-372,
-802,
-1186,
-1485,
-1567,
-1357,
-545,
549,
1476,
2130,
2741,
2680,
2015,
1033,
-57,
-816,
-1569,
-2170,
-2281,
-1881,
-1268,
-838,
-51,
796,
1364,
1510,
1239,
819,
343,
-64,
-395,
-492,
-547,
-470,
-147,
330,
536,
532,
392,
21,
-389,
-799,
-863,
-660,
-513,
-337,
-88,
146,
517,
856,
894,
501,
54,
-276,
-578,
-570,
-131,
511,
661,
521,
410,
348,
422,
472,
106,
-582,
-1243,
-1635,
-1456,
-856,
-449,
64,
629,
1118,
1505,
1534,
1213,
704,
145,
-557,
-1028,
-1075,
-834,
-452,
94,
744,
1150,
1028,
301,
-454,
-935,
-1173,
-1278,
-1165,
-856,
-645,
-29,
733,
1482,
1952,
1790,
1233,
424,
-264,
-896,
-1169,
-1047,
-790,
-577,
-479,
-38,
592,
913,
735,
295,
-143,
-589,
-1014,
-1153,
-920,
-119,
925,
1749,
2078,
1996,
1621,
1023,
321,
-378,
-1053,
-1427,
-1693,
-1515,
-1098,
-597,
29,
524,
749,
589,
327,
216,
260,
293,
357,
372,
466,
665,
731,
568,
-79,
-620,
-807,
-798,
-663,
-446,
-460,
-549,
-397,
83,
436,
660,
589,
108,
-403,
-737,
-631,
73,
826,
1298,
1574,
1715,
1564,
1054,
249,
-828,
-1937,
-2787,
-2859,
-2337,
-1820,
-1018,
-168,
1027,
2194,
2995,
2984,
2054,
868,
-307,
-1055,
-1652,
-1885,
-1735,
-1545,
-1003,
-339,
343,
1148,
1597,
1666,
1268,
535,
-346,
-1169,
-1551,
-1645,
-1423,
-891,
-9,
1048,
1445,
1251,
737,
-21,
-136,
19,
107,
119,
-17,
-205,
-232,
-138,
-200,
-573,
-1002,
-1253,
-1186,
-588,
6,
579,
994,
1314,
1619,
1492,
1082,
487,
-23,
-524,
-974,
-1159,
-1205,
-876,
-351,
379,
981,
1061,
645,
54,
-247,
-415,
-685,
-893,
-980,
-869,
-179,
909,
1933,
2159,
1641,
843,
-59,
-704,
-1203,
-1327,
-1281,
-1015,
-653,
-235,
313,
785,
1074,
782,
75,
-480,
-739,
-668,
-307,
-33,
194,
390,
689,
1068,
1314,
1407,
963,
95,
-719,
-1401,
-1807,
-2169,
-2218,
-1828,
-857,
466,
1447,
2049,
2075,
1773,
1463,
1050,
573,
-261,
-907,
-1297,
-1464,
-1306,
-1083,
-788,
-487,
-36,
292,
366,
499,
714,
784,
671,
476,
397,
340,
253,
58,
-309,
-565,
-803,
-796,
-633,
-334,
-15,
284,
692,
855,
851,
552,
-169,
-742,
-1079,
-1307,
-1159,
-663,
-144,
558,
1351,
1758,
1702,
1265,
489,
-366,
-1070,
-1473,
-1570,
-1238,
-766,
-155,
650,
1332,
1570,
1252,
539,
-275,
-766,
-1006,
-1105,
-1040,
-840,
-402,
336,
1003,
1580,
1679,
1013,
130,
-490,
-772,
-699,
-563,
-563,
-510,
-284,
66,
367,
608,
339,
-88,
-322,
-557,
-627,
-529,
-191,
273,
897,
1448,
1284,
1025,
510,
-34,
-442,
-902,
-1434,
-1764,
-1844,
-1883,
-1309,
-427,
428,
1429,
1867,
1789,
1476,
1131,
1049,
896,
371,
-230,
-645,
-921,
-902,
-835,
-922,
-1028,
-1063,
-967,
-642,
-156,
312,
946,
1398,
1614,
1521,
998,
409,
-151,
-462,
-716,
-912,
-713,
-343,
90,
443,
472,
293,
-107,
-567,
-886,
-1015,
-899,
-636,
-286,
262,
829,
1612,
2165,
2274,
1500,
379,
-517,
-1226,
-1430,
-1504,
-1519,
-1241,
-628,
182,
985,
1490,
1526,
949,
204,
-480,
-807,
-802,
-710,
-397,
70,
536,
806,
806,
427,
-34,
-305,
-408,
-545,
-741,
-775,
-410,
178,
726,
1118,
1079,
582,
154,
-121,
-444,
-692,
-854,
-956,
-862,
-329,
314,
904,
1081,
900,
701,
445,
312,
258,
199,
-98,
-497,
-642,
-660,
-651,
-795,
-957,
-1088,
-974,
-487,
336,
1072,
1737,
2450,
2448,
1883,
763,
-502,
-1380,
-2197,
-2370,
-2207,
-1778,
-951,
-20,
920,
1423,
1626,
1243,
537,
96,
-411,
-686,
-646,
-541,
-93,
504,
972,
1128,
1053,
664,
15,
-634,
-1243,
-1562,
-1672,
-1607,
-1183,
-552,
235,
964,
1528,
1652,
1326,
1034,
583,
63,
-287,
-478,
-417,
-305,
-412,
-423,
-518,
-795,
-811,
-774,
-624,
-363,
-60,
202,
561,
917,
1110,
1138,
659,
136,
-234,
-634,
-699,
-531,
-351,
-157,
31,
-11,
2,
-163,
-376,
-288,
-310,
-271,
-194,
56,
430,
754,
1111,
1149,
883,
241,
-565,
-1218,
-1679,
-1493,
-930,
-462,
228,
960,
1571,
1882,
1900,
1433,
525,
-489,
-1414,
-1881,
-1958,
-1816,
-1247,
-432,
575,
1371,
1788,
1684,
1218,
714,
126,
-285,
-582,
-834,
-822,
-615,
-402,
-186,
106,
92,
105,
77,
-87,
-181,
-327,
-447,
-337,
50,
455,
836,
736,
374,
304,
310,
228,
218,
126,
-239,
-371,
-351,
-325,
-161,
-341,
-680,
-884,
-974,
-752,
-139,
415,
1111,
1730,
1862,
1777,
1442,
662,
-164,
-757,
-1291,
-1474,
-1527,
-1297,
-795,
-141,
612,
1229,
1358,
984,
310,
-122,
-231,
-192,
-118,
-112,
-219,
79,
536,
795,
863,
424,
-183,
-786,
-1215,
-1292,
-1110,
-645,
-242,
359,
932,
1259,
1243,
660,
32,
-421,
-705,
-889,
-1108,
-1203,
-843,
-124,
514,
904,
1041,
893,
687,
395,
204,
108,
-257,
-480,
-733,
-877,
-818,
-735,
-700,
-463,
-131,
208,
553,
618,
904,
1264,
1342,
1142,
470,
-279,
-912,
-1389,
-1422,
-1380,
-859,
317,
1554,
2656,
2871,
2441,
553,
-2258,
-4405,
-5771,
-5465,
-4669,
-2175,
2482,
8264,
12637,
12737,
11004,
6209,
-29,
-5162,
-9431,
-11474,
-12168,
-11241,
-9686,
-6303,
-1213,
4472,
10036,
11075,
10406,
9067,
5645,
2702,
319,
-1910,
-3114,
-2680,
-2532,
-2860,
-3480,
-3886,
-3244,
-2095,
-653,
332,
719,
329,
246,
767,
2610,
4864,
4216,
1585,
-1179,
-3080,
-2440,
-1083,
87,
660,
466,
1370,
1257,
563,
141,
-691,
-1017,
-2026,
-3045,
-3023,
-2343,
-1494,
162,
2030,
3020,
2422,
-58,
-2629,
-3527,
-2609,
-1394,
-408,
233,
1639,
3861,
4859,
5393,
3552,
69,
-2698,
-5785,
-7231,
-7368,
-6597,
-4892,
-2259,
1397,
4893,
7761,
7863,
5589,
3899,
2794,
2019,
456,
-1621,
-3076,
-2580,
-792,
397,
2026,
1349,
-136,
-1189,
-3067,
-4088,
-5334,
-6354,
-5007,
-1688,
2288,
5854,
7437,
7398,
7361,
7484,
5948,
3846,
518,
-3716,
-5820,
-6119,
-6023,
-5272,
-4517,
-5475,
-4380,
-2912,
-1359,
1714,
3589,
5374,
7083,
8332,
7692,
5562,
1572,
-2987,
-4687,
-6811,
-7971,
-7721,
-6411,
-3400,
-188,
4406,
7310,
7544,
5135,
594,
-2495,
-3635,
-4325,
-4288,
-4177,
-3361,
319,
5309,
9780,
12019,
9880,
4627,
-95,
-4725,
-8099,
-9058,
-8875,
-7266,
-3805,
871,
4326,
6751,
6503,
4503,
3052,
876,
-1736,
-4245,
-6459,
-5993,
-2647,
1381,
5292,
6414,
5449,
4137,
2122,
-722,
-3092,
-3796,
-3642,
-3523,
-3898,
-3332,
-870,
-30,
251,
783,
-600,
-2006,
-2936,
-2619,
795,
4943,
7283,
9141,
7459,
3781,
861,
-2891,
-5482,
-7051,
-7583,
-6725,
-4887,
-1797,
261,
2584,
3961,
3975,
4193,
3704,
2436,
312,
-1468,
-1157,
2437,
5724,
6649,
5184,
1621,
-2455,
-4870,
-6834,
-8482,
-8565,
-7582,
-5553,
-2532,
1986,
6002,
9087,
10507,
8934,
6106,
2201,
-1728,
-3983,
-5174,
-4965,
-3557,
-1503,
-30,
560,
1456,
1799,
1626,
831,
-948,
-3184,
-5449,
-5722,
-3195,
646,
4642,
5260,
3820,
2898,
1695,
1429,
640,
-590,
-1621,
-2245,
-2624,
-2900,
-2219,
-1051,
544,
1156,
618,
604,
1303,
1118,
1521,
2545,
2257,
2740,
1712,
-1158,
-2765,
-4766,
-5111,
-3925,
-3098,
-306,
2546,
5477,
8101,
8627,
7137,
4005,
179,
-4352,
-7368,
-9428,
-10752,
-9530,
-6471,
-723,
4727,
7961,
8769,
7626,
6130,
3911,
1692,
-1054,
-3355,
-4351,
-4064,
-2962,
-545,
1996,
2046,
792,
-839,
-2611,
-3995,
-5065,
-5259,
-3923,
-807,
3067,
6109,
7848,
7859,
6569,
4604,
1128,
-3006,
-5820,
-7352,
-6744,
-3819,
-1526,
1139,
3518,
2493,
1473,
-372,
-3130,
-4220,
-3426,
-1365,
875,
3596,
5377,
7510,
7554,
5407,
2358,
-2046,
-6258,
-9067,
-9766,
-9227,
-6108,
-1135,
3781,
7102,
7976,
6422,
4041,
1810,
-820,
-2945,
-4401,
-5117,
-4156,
-1107,
2380,
5714,
6179,
3846,
837,
-3095,
-5344,
-5346,
-3640,
-1604,
-594,
1633,
3446,
6067,
7679,
4935,
2205,
-1200,
-4873,
-7225,
-8475,
-6285,
-2021,
2080,
5067,
7265,
8560,
7581,
5724,
3055,
-558,
-4702,
-7564,
-8968,
-8404,
-5442,
-2159,
2029,
3778,
3054,
2404,
990,
-225,
-744,
-1179,
21,
2625,
3636,
2907,
1750,
-734,
-3013,
-4774,
-5168,
-4433,
-4389,
-2976,
-1462,
617,
3696,
5440,
4817,
2307,
-492,
-2498,
-3322,
-2492,
-151,
2699,
5197,
6684,
6598,
4114,
-213,
-3939,
-6432,
-8590,
-9217,
-8309,
-7305,
-4643,
1076,
8056,
14496,
16989,
13420,
7161,
962,
-3691,
-6235,
-7700,
-8454,
-7905,
-5391,
-2249,
1876,
6153,
8514,
7845,
4204,
-12,
-3812,
-5686,
-5691,
-4230,
-1221,
2177,
4745,
6197,
4953,
2217,
-28,
-3058,
-4754,
-5596,
-6409,
-6564,
-3795,
1364,
5332,
8909,
7838,
3663,
-224,
-4872,
-6333,
-5443,
-3831,
-1456,
1163,
2799,
2995,
3620,
2970,
1149,
98,
-1803,
-3628,
-3803,
-2953,
-389,
2939,
5555,
6552,
4862,
1841,
-2235,
-5228,
-6409,
-7371,
-6351,
-5362,
-3014,
1477,
6350,
11419,
12432,
9672,
4264,
-1559,
-5636,
-7591,
-6911,
-5250,
-3927,
-3226,
-988,
1719,
4018,
5046,
3458,
1821,
-150,
-2659,
-2877,
-575,
2091,
4215,
6225,
6977,
5803,
2980,
-1409,
-5702,
-9203,
-10637,
-9510,
-6158,
-3591,
-6,
4969,
8414,
11381,
10406,
8017,
4616,
-374,
-2621,
-3256,
-3715,
-3923,
-3986,
-4403,
-3584,
-1904,
-1016,
706,
994,
1114,
1566,
1490,
1388,
1869,
2953,
3150,
3949,
834,
-2810,
-4602,
-5841,
-4261,
-914,
1330,
2395,
3358,
2176,
797,
-751,
-2874,
-3525,
-3907,
-4755,
-4037,
-2363,
-150,
3746,
7323,
9079,
8125,
3154,
-2993,
-8109,
-10309,
-9532,
-7426,
-4923,
-1567,
3219,
7756,
10940,
11818,
11320,
7119,
209,
-4777,
-9612,
-12742,
-12139,
-10116,
-5522,
-40,
4960,
9086,
10704,
10240,
9088,
6919,
2313,
-2387,
-6048,
-8592,
-8319,
-5578,
-1582,
2749,
4453,
3109,
949,
-819,
-2032,
-2565,
-2284,
-2258,
-1673,
942,
3740,
5320,
6816,
6062,
3772,
917,
-2801,
-5104,
-6172,
-6422,
-5907,
-3389,
-446,
950,
2552,
1960,
534,
648,
398,
853,
1174,
848,
1088,
1062,
1417,
2454,
2230,
-291,
-3629,
-5374,
-6448,
-6020,
-4126,
-603,
4187,
7777,
9995,
8419,
4340,
-514,
-5431,
-7841,
-7554,
-6275,
-4788,
-3774,
-1584,
2416,
7175,
10327,
8218,
3457,
-1389,
-4933,
-6309,
-5612,
-2978,
-273,
2238,
4609,
4995,
3698,
1503,
-1598,
-4453,
-6516,
-7515,
-8237,
-6986,
-4738,
371,
8708,
13539,
15370,
11961,
5787,
2154,
-1399,
-3486,
-6133,
-8630,
-10073,
-10136,
-7534,
-3346,
783,
2814,
5078,
6111,
5854,
5338,
4412,
2818,
2804,
3980,
3795,
2367,
-1712,
-6445,
-8269,
-8296,
-5748,
-940,
2637,
4954,
4917,
4246,
3401,
1627,
-180,
-1940,
-3596,
-4955,
-4832,
-3102,
-411,
5547,
10843,
12398,
10090,
2341,
-4729,
-9018,
-11001,
-10467,
-8727,
-6573,
-3376,
1810,
7831,
11472,
12795,
10177,
4954,
-941,
-6937,
-10674,
-12831,
-11013,
-6288,
-436,
4466,
7936,
10636,
10990,
9343,
7001,
3174,
-2291,
-7116,
-9832,
-11379,
-10728,
-7266,
-3970,
344,
3963,
6047,
7181,
5998,
4009,
3984,
4810,
4142,
3204,
427,
-2117,
-2383,
-2892,
-3347,
-2936,
-3678,
-3826,
-3975,
-4622,
-3326,
-1772,
1360,
4882,
5054,
3432,
2260,
732,
605,
2264,
3603,
4299,
3909,
2835,
235,
-2430,
-4923,
-7794,
-7835,
-7233,
-6519,
-5559,
-4151,
-888,
3153,
8295,
11652,
12144,
8958,
2950,
-2243,
-5305,
-5433,
-4310,
-4676,
-5141,
-4021,
-849,
2942,
5489,
6457,
4782,
1841,
-1490,
-4479,
-6157,
-6981,
-5936,
-3600,
759,
4817,
7100,
7518,
5043,
3336,
1319,
-628,
-2758,
-4800,
-5069,
-3377,
-591,
2490,
5127,
5162,
3204,
700,
-2215,
-4793,
-6743,
-8300,
-7298,
-4510,
-1088,
1223,
2743,
3694,
5985,
8688,
9811,
8093,
4266,
363,
-2820,
-4454,
-5507,
-6646,
-8405,
-9807,
-10195,
-8236,
-4541,
309,
5756,
10954,
14289,
13801,
10138,
5213,
111,
-2677,
-5385,
-6958,
-7379,
-6979,
-4009,
-1201,
2513,
5477,
5145,
2014,
-1020,
-4298,
-5408,
-5952,
-4896,
-1938,
1635,
5618,
8985,
9855,
7904,
6081,
2548,
-1047,
-5200,
-8640,
-9711,
-9248,
-7072,
-4048,
-595,
3824,
7102,
7819,
5522,
3384,
1143,
-1499,
-3169,
-5575,
-6517,
-5566,
-3101,
160,
3659,
4989,
4708,
3453,
2252,
1343,
319,
-440,
-927,
-698,
-1125,
-860,
-822,
-3391,
-5279,
-5285,
-4138,
-1981,
806,
2885,
3477,
4819,
6327,
8226,
8608,
5605,
1636,
-1964,
-5143,
-5684,
-5247,
-3450,
-425,
-99,
-1118,
-1910,
-3695,
-3858,
-1770,
-273,
857,
1933,
4441,
6221,
9863,
12232,
11151,
7246,
-1491,
-8258,
-11248,
-12173,
-11969,
-10411,
-6106,
-1508,
3804,
8114,
9321,
8595,
5096,
2303,
185,
-1527,
-2728,
-4603,
-5318,
-4134,
1316,
7184,
8473,
7592,
3697,
-1109,
-4071,
-6815,
-8150,
-8491,
-8921,
-6923,
-1795,
3057,
8746,
11552,
9993,
6839,
2242,
-2602,
-5761,
-7215,
-6725,
-4520,
-2592,
-961,
137,
2029,
4667,
6503,
6681,
4502,
130,
-4268,
-6163,
-6788,
-5474,
-2548,
-1657,
-2435,
-3206,
-2476,
-306,
3339,
6908,
8425,
9538,
8705,
5976,
2797,
-2097,
-5647,
-7994,
-10107,
-10456,
-9496,
-5934,
-2426,
3042,
7715,
10184,
9368,
3923,
641,
-1163,
-601,
953,
1258,
1018,
621,
981,
2769,
4429,
4472,
796,
-4695,
-9065,
-12205,
-11807,
-9900,
-5833,
557,
7432,
13258,
14659,
11289,
6885,
3855,
1457,
-2027,
-5455,
-8531,
-9951,
-9126,
-6213,
-711,
3570,
4672,
4145,
1375,
-1888,
-3879,
-5531,
-5310,
-2787,
1332,
4216,
6589,
7502,
6769,
6707,
4148,
191,
-4505,
-8645,
-10502,
-9813,
-4975,
-126,
4243,
6741,
5568,
4785,
3388,
1705,
-703,
-2980,
-4459,
-3797,
-1875,
-646,
1398,
2431,
3233,
3040,
2725,
3841,
4762,
4615,
3450,
2182,
-520,
-3050,
-5314,
-7428,
-8465,
-9049,
-8406,
-5240,
-938,
4538,
10101,
10825,
10576,
9322,
6174,
3536,
67,
-3910,
-7777,
-9895,
-8173,
-3262,
2111,
5517,
4695,
1432,
-3634,
-6889,
-8123,
-7073,
-4435,
-3159,
-1848,
-396,
4225,
10785,
16996,
17332,
10767,
2928,
-4160,
-9433,
-13499,
-15172,
-14050,
-10640,
-5267,
-726,
4212,
8030,
8497,
9513,
7488,
4250,
1182,
-3162,
-5678,
-4575,
-123,
4007,
4742,
3350,
1007,
-1550,
-2034,
-2815,
-3473,
-4305,
-3619,
-2374,
-975,
1085,
197,
478,
1441,
2305,
2629,
99,
-2814,
-2183,
1223,
4516,
5990,
3960,
235,
-1432,
-2525,
-2526,
-570,
679,
-72,
-1445,
-2058,
-1666,
-2102,
-4621,
-5199,
-4826,
-3631,
-1406,
177,
1407,
5805,
14090,
18424,
16052,
8611,
-443,
-7115,
-10323,
-11469,
-10734,
-9017,
-7901,
-4057,
698,
3649,
6782,
6468,
4138,
1069,
-2574,
-3695,
-4047,
-2764,
914,
5708,
9965,
10742,
8902,
4642,
-369,
-5093,
-8705,
-11340,
-13238,
-13315,
-12472,
-7646,
-1859,
5214,
12250,
13762,
13909,
11590,
6994,
1608,
-3896,
-6052,
-7267,
-7430,
-6431,
-5466,
-3139,
-295,
4050,
7863,
8993,
6140,
360,
-3864,
-6111,
-4881,
-3763,
-4533,
-4941,
-5516,
-1068,
4114,
8727,
13817,
13714,
10009,
3674,
-2553,
-7956,
-11388,
-11279,
-9229,
-5152,
-512,
1690,
4281,
6792,
7155,
7868,
3960,
-2525,
-7235,
-8960,
-7773,
-4416,
1151,
7118,
11956,
13198,
11230,
7943,
2183,
-2988,
-6661,
-10615,
-11526,
-12315,
-13291,
-11597,
-4934,
3824,
11954,
14646,
10511,
8435,
4949,
3412,
4474,
2990,
1268,
-2479,
-4777,
-6591,
-7989,
-5850,
-3398,
-1353,
355,
-413,
-1584,
-2353,
-1521,
2246,
5125,
5950,
1851,
-2662,
-3299,
-142,
6087,
9331,
6420,
2095,
-1307,
-5641,
-7129,
-9732,
-11614,
-9850,
-7689,
-2011,
3889,
6987,
9476,
11179,
11286,
8078,
614,
-8024,
-13897,
-13679,
-9866,
-2599,
4860,
8064,
11346,
12286,
11560,
9548,
2041,
-5556,
-13691,
-16552,
-15057,
-13286,
-7425,
-519,
9640,
15432,
16845,
14345,
5847,
225,
-3359,
-5124,
-3336,
-1847,
-2369,
-1813,
624,
4656,
8416,
7179,
432,
-6569,
-10923,
-11908,
-9841,
-6510,
-3023,
1349,
5543,
8452,
9863,
9388,
9040,
8871,
6436,
2509,
-1537,
-8189,
-10796,
-10471,
-9583,
-7498,
-7802,
-7304,
-6465,
-2155,
3211,
8809,
11928,
11225,
8703,
4360,
1515,
-3533,
-6262,
-7306,
-8296,
-5791,
-2354,
2065,
7695,
10142,
8051,
3572,
-4029,
-9747,
-13713,
-14179,
-10211,
-4414,
2530,
8992,
14472,
15723,
16215,
10821,
1059,
-4328,
-9171,
-11736,
-11935,
-11588,
-8119,
-242,
8175,
13332,
13706,
8534,
1531,
-4366,
-9842,
-11721,
-10255,
-8321,
-4705,
364,
5765,
11337,
13567,
12046,
8770,
5242,
565,
-5325,
-10155,
-11324,
-7641,
-3871,
-1463,
-1986,
-3971,
-3569,
-2047,
1192,
4516,
4092,
1900,
3470,
5907,
7513,
8528,
5723,
2258,
-901,
-2590,
-1991,
-3655,
-5118,
-3946,
-2300,
-2945,
-3784,
-6536,
-8943,
-8566,
-4900,
2072,
6990,
11074,
12867,
13908,
12878,
9386,
4339,
-3728,
-12036,
-17285,
-16889,
-13143,
-7812,
-2053,
4784,
10778,
12948,
11639,
5329,
-1796,
-5892,
-8317,
-8984,
-8707,
-7230,
-2042,
5714,
12663,
17187,
14413,
6803,
-1765,
-7639,
-8431,
-8034,
-9069,
-8879,
-6449,
-3414,
4536,
9966,
9768,
8115,
5104,
1435,
-2812,
-5965,
-8368,
-6927,
-1858,
2816,
6926,
9158,
8191,
6896,
6154,
4816,
2416,
-3355,
-8725,
-12754,
-12379,
-8810,
-6632,
-3383,
-838,
3479,
7703,
11053,
11761,
10797,
9977,
7208,
4445,
-2151,
-7919,
-11143,
-13657,
-12325,
-7784,
-3032,
-625,
3938,
6310,
5038,
3713,
93,
-2278,
-2795,
-5171,
-4354,
-215,
3305,
9822,
13031,
10580,
6023,
-2994,
-10785,
-14295,
-15047,
-12519,
-10338,
-7566,
-1904,
5827,
11256,
15510,
15896,
9958,
4909,
-3217,
-8873,
-10595,
-10550,
-6775,
-2960,
2538,
6380,
8810,
9968,
6665,
4210,
1171,
-4660,
-7820,
-10074,
-11136,
-8744,
-4440,
2692,
8773,
9735,
9560,
8205,
4614,
1750,
8,
-2200,
-2287,
-2607,
-2204,
-526,
-36,
3124,
4452,
4327,
2410,
-2016,
-6519,
-9402,
-9513,
-5526,
-1681,
-1899,
-1008,
1264,
5408,
10805,
14532,
14174,
11028,
5554,
-949,
-6351,
-13010,
-15135,
-14322,
-12376,
-7687,
-2279,
3613,
8586,
14764,
15966,
13568,
7309,
-3209,
-7451,
-9665,
-9489,
-6721,
-2693,
3023,
6987,
8635,
9279,
7684,
2695,
-1970,
-7347,
-11594,
-11681,
-10061,
-7789,
-3088,
3285,
10422,
14753,
11420,
6445,
1380,
-3828,
-7195,
-8835,
-7935,
-6905,
-4843,
-3397,
-1356,
3366,
5566,
5687,
1727,
-2669,
-4178,
-5762,
-6091,
-5237,
-1858,
1742,
299,
-2120,
-2753,
-522,
3922,
6709,
8204,
6937,
4799,
462,
-2082,
-3084,
-5328,
-6509,
-8025,
-8994,
-7078,
-2334,
2925,
10801,
13988,
12878,
6841,
-1275,
-4597,
-5473,
-4321,
-2545,
87,
3426,
7925,
10143,
7985,
5209,
-1187,
-8774,
-11657,
-15697,
-14994,
-11644,
-5230,
6335,
15518,
22269,
21006,
13496,
5092,
-2673,
-7353,
-9941,
-13265,
-14351,
-13067,
-7070,
1515,
9858,
16201,
14205,
7482,
779,
-7946,
-11860,
-11446,
-9003,
-3414,
1574,
5116,
6876,
10448,
10215,
7685,
4083,
-1695,
-6834,
-11191,
-12832,
-10538,
-4213,
1155,
5054,
4206,
1304,
52,
919,
4620,
4781,
2471,
-70,
-1285,
-3203,
-2477,
-1759,
-3601,
-3213,
-3650,
-936,
1408,
2461,
5045,
6698,
6718,
4925,
-2524,
-10762,
-14662,
-14969,
-9795,
-1995,
5602,
10553,
13377,
13609,
14026,
12836,
3723,
-4633,
-12280,
-17811,
-14598,
-10824,
-4355,
3940,
9190,
11775,
11386,
8290,
1502,
-4755,
-8247,
-6690,
-3461,
-2022,
-2188,
-960,
7297,
15870,
18460,
12605,
1955,
-7282,
-13850,
-14534,
-12841,
-7583,
-2542,
1987,
5783,
7289,
10268,
9106,
8408,
3685,
-1390,
-3649,
-9181,
-10728,
-6281,
1590,
7008,
8678,
5857,
1949,
-982,
-3230,
-3528,
-3664,
-5848,
-7893,
-8310,
-4403,
2861,
6057,
6706,
5786,
3923,
2917,
1077,
-2301,
-4289,
-2510,
325,
1817,
372,
-3930,
-5171,
-4224,
98,
5058,
8182,
7947,
2726,
-1158,
-3403,
-3779,
-4610,
-4464,
-5901,
-6126,
-1801,
2995,
9579,
16641,
17463,
12516,
4185,
-6355,
-12313,
-14595,
-14850,
-11726,
-8389,
-6911,
-1934,
5618,
11726,
17177,
15699,
7879,
830,
-7105,
-10341,
-10335,
-9232,
-4350,
985,
8376,
8675,
7876,
5631,
2389,
221,
-4442,
-7788,
-11755,
-13611,
-12316,
-5345,
1152,
7894,
10695,
10349,
9133,
4098,
1724,
-1010,
-3723,
-4763,
-5271,
-4986,
-4900,
-4646,
-1294,
1842,
4480,
5643,
3132,
394,
-1975,
-3136,
-2108,
1856,
2227,
-1784,
-4942,
-7033,
-3951,
2164,
7905,
8639,
7235,
5053,
2875,
-310,
-6304,
-8650,
-7507,
-6040,
-2834,
-1161,
-1279,
3361,
7409,
10861,
9994,
3061,
-3470,
-8430,
-11823,
-9301,
-2108,
2625,
5880,
9601,
12509,
12907,
7144,
-1422,
-8217,
-14148,
-17521,
-17294,
-12002,
-5345,
4619,
14120,
21036,
22370,
12775,
1907,
-8094,
-15700,
-12548,
-8574,
-5471,
-1818,
496,
6464,
11028,
13205,
10462,
3561,
-4519,
-10837,
-13809,
-12086,
-9514,
-4038,
2848,
8370,
13606,
11942,
8061,
3938,
859,
-964,
-3204,
-7600,
-8789,
-6716,
-5226,
-1077,
2516,
4456,
3832,
903,
910,
936,
-160,
689,
1259,
1641,
2444,
-2064,
-7227,
-6931,
-4822,
762,
6173,
7382,
9482,
8411,
3777,
1499,
-2336,
-4846,
-8437,
-13272,
-14742,
-11624,
-4305,
5068,
15589,
20881,
19374,
12921,
1382,
-7390,
-11508,
-14578,
-13738,
-10205,
-3664,
4296,
10519,
13078,
15509,
12821,
2432,
-7698,
-14839,
-18880,
-15062,
-8202,
-554,
8051,
13791,
16680,
15591,
10631,
3396,
-1204,
-7807,
-12975,
-15109,
-14376,
-9296,
209,
6931,
11733,
13014,
8118,
4185,
-2240,
-5511,
-7543,
-6155,
-2484,
-1111,
925,
1511,
3729,
5412,
4313,
5124,
3227,
169,
-3689,
-8420,
-7683,
-3166,
144,
1561,
-1123,
-4923,
-3724,
-1355,
2582,
6431,
5690,
4107,
2034,
-762,
-105,
-1294,
-5365,
-5829,
-5039,
-2956,
-246,
3153,
7378,
10455,
10221,
4240,
-3979,
-12421,
-16236,
-16507,
-12715,
-4052,
5047,
11453,
16030,
18261,
17034,
13427,
2546,
-7751,
-14530,
-18634,
-19282,
-15453,
-7214,
1839,
10697,
14880,
15336,
13065,
4014,
-3441,
-7339,
-8319,
-6088,
-6352,
-5436,
-1993,
6725,
15015,
18571,
14092,
3741,
-3991,
-11244,
-12840,
-9988,
-7914,
-4963,
-2649,
-529,
1457,
5132,
8052,
9302,
9442,
5595,
1746,
-3127,
-6788,
-6348,
-3811,
-1736,
-86,
-412,
-2199,
-2343,
587,
3594,
4432,
2412,
-1113,
-2914,
-5597,
-3337,
-2210,
-3184,
-2573,
-3808,
-1865,
550,
4322,
9612,
11834,
10590,
5346,
-1587,
-9073,
-12533,
-12191,
-8859,
-965,
3417,
4311,
4313,
3097,
2555,
1789,
-564,
-3113,
-6688,
-8034,
-6105,
144,
9487,
15156,
18000,
15010,
8148,
-1603,
-11794,
-15546,
-16538,
-14244,
-10346,
-6280,
-348,
6509,
13546,
18874,
17211,
8702,
-76,
-7455,
-11032,
-10106,
-5088,
212,
3655,
6107,
6659,
5320,
4017,
2182,
-401,
-3611,
-7984,
-10157,
-11172,
-8205,
-2733,
4282,
9107,
10776,
10094,
6759,
3809,
1068,
-653,
-2972,
-4103,
-4456,
-4323,
-6668,
-6310,
-2960,
733,
3825,
3737,
1882,
-131,
-427,
-1802,
-201,
-411,
-4202,
-7426,
-8783,
-6612,
-702,
6523,
13934,
19173,
17224,
10915,
-559,
-12291,
-16855,
-16725,
-14433,
-11878,
-8761,
-5396,
2487,
12027,
16078,
18492,
13202,
3837,
-3566,
-11499,
-13928,
-11175,
-4247,
2307,
8286,
12581,
12668,
10823,
4426,
-5171,
-12263,
-15139,
-15620,
-13085,
-10980,
-4210,
4338,
15084,
24038,
18080,
10015,
1946,
-4512,
-5210,
-5874,
-3717,
-3302,
-2345,
554,
979,
2322,
1004,
920,
531,
-888,
-2928,
-5638,
-6357,
-4405,
1981,
9774,
9892,
4704,
1140,
-1631,
185,
3236,
6002,
4932,
397,
-3519,
-5506,
-6051,
-6915,
-6547,
-5662,
-4478,
-1163,
1562,
3548,
5880,
8191,
10181,
5877,
-686,
-7208,
-11738,
-7904,
-1570,
3669,
7301,
9884,
9993,
5701,
2005,
-4342,
-9894,
-14917,
-19260,
-18904,
-14590,
-6127,
6413,
19532,
26498,
26706,
17972,
5213,
-6358,
-13004,
-14280,
-13719,
-11100,
-6822,
167,
5980,
10491,
13339,
11918,
7060,
-746,
-9174,
-14391,
-13370,
-10125,
-1057,
7346,
11348,
13363,
8631,
5020,
4117,
3792,
2852,
-2020,
-6981,
-9088,
-8121,
-4187,
-2372,
-546,
-2376,
-4868,
-2966,
510,
4925,
7206,
7896,
9433,
7698,
3364,
-1664,
-8373,
-9906,
-9063,
-5516,
-1318,
-482,
2682,
6432,
7741,
8628,
3772,
-4283,
-11660,
-17658,
-15805,
-10699,
-3053,
6376,
15262,
19873,
18754,
13481,
3185,
-5724,
-9878,
-12700,
-13607,
-14099,
-12418,
-5544,
4695,
15193,
19060,
13840,
2124,
-8047,
-13292,
-13130,
-9264,
-4435,
323,
5507,
11473,
14428,
15735,
13335,
6480,
-1759,
-9635,
-16051,
-18269,
-15571,
-10251,
-1364,
6647,
10196,
9745,
4836,
2973,
1989,
2336,
3495,
234,
-3394,
-6007,
-6473,
-3158,
2369,
5155,
3840,
423,
36,
564,
-46,
-413,
-349,
-105,
-828,
-3542,
-7922,
-8777,
-5626,
-792,
7068,
11948,
11115,
9630,
5693,
3392,
2440,
-3208,
-10213,
-15564,
-16318,
-10130,
-4011,
4863,
14313,
16790,
13902,
5823,
-4165,
-11562,
-15556,
-14974,
-10637,
-4408,
1981,
7626,
14116,
18178,
20554,
16397,
3818,
-8891,
-18546,
-22012,
-20202,
-14758,
-6204,
540,
7505,
10577,
13777,
15915,
10499,
5390,
-1713,
-7491,
-10232,
-9644,
-6599,
-1945,
3970,
7813,
9364,
6139,
970,
-2434,
-5304,
-6582,
-5391,
-4042,
-3644,
-2084,
-2850,
-282,
4956,
6690,
7558,
6502,
5056,
4604,
4147,
1210,
-785,
-2893,
-2841,
-4716,
-6328,
-6493,
-5955,
-865,
4462,
9904,
8487,
4018,
-888,
-3237,
-3171,
-4335,
-5420,
-5310,
-2555,
3953,
8820,
12161,
14620,
12020,
5900,
-3136,
-9960,
-13320,
-14647,
-14499,
-9916,
-3234,
3969,
10149,
14012,
13902,
10922,
4744,
-2883,
-7630,
-13164,
-13562,
-8735,
-1601,
7119,
12370,
14057,
12673,
7550,
-146,
-9627,
-16153,
-17082,
-14256,
-11551,
-7087,
-484,
6987,
12824,
16819,
18355,
13893,
6936,
-1587,
-8306,
-10410,
-9583,
-8727,
-5620,
-4039,
-1818,
3179,
4632,
6659,
7522,
3582,
-700,
-4285,
-6793,
-5792,
-3892,
-1952,
-313,
207,
1778,
4439,
8008,
10954,
9150,
3892,
-546,
-3944,
-6508,
-6849,
-9525,
-9295,
-5907,
-4051,
250,
4316,
6760,
9363,
12614,
10488,
6404,
-1439,
-9755,
-13529,
-13919,
-8379,
-1075,
4207,
7865,
12967,
15171,
12032,
3959,
-5621,
-12607,
-15323,
-15782,
-13523,
-8813,
-2781,
6122,
14720,
18681,
17488,
9533,
1162,
-3959,
-6719,
-5985,
-7146,
-9480,
-11155,
-5073,
2990,
10124,
13869,
8009,
1507,
-5098,
-9731,
-9448,
-8846,
-7084,
-2189,
4067,
8293,
8865,
7935,
7541,
7757,
3480,
-2423,
-9040,
-13794,
-13633,
-10143,
-3441,
3055,
5467,
3010,
1838,
1586,
2871,
4054,
1881,
-1672,
-2502,
-3034,
-2081,
659,
702,
1315,
973,
2156,
4197,
2998,
98,
-431,
-1296,
-2026,
-3108,
-7302,
-9407,
-7989,
-3427,
3042,
9484,
12116,
13367,
10074,
5592,
3226,
-2713,
-6878,
-11210,
-14565,
-9799,
-2696,
3077,
9347,
14160,
14356,
10717,
3698,
-7285,
-13129,
-15439,
-15088,
-10552,
-5570,
1951,
9824,
17172,
23151,
21142,
11009,
-1577,
-12524,
-18217,
-18892,
-15718,
-11508,
-3959,
2325,
6834,
11660,
12505,
9471,
5288,
-771,
-5147,
-6982,
-7882,
-6687,
-2611,
3118,
6468,
8575,
6525,
3549,
226,
-1810,
-4169,
-5288,
-5558,
-6446,
-6281,
-4296,
-1382,
-1339,
1710,
3375,
5365,
7534,
6417,
4636,
5377,
5301,
3819,
224,
-8632,
-10191,
-9731,
-8632,
-3719,
1454,
6790,
9034,
8404,
5378,
792,
-4376,
-5818,
-6320,
-6726,
-4749,
408,
5489,
13424,
19256,
17059,
9493,
-3684,
-12208,
-16227,
-17904,
-14354,
-10011,
-4949,
4412,
12874,
18202,
18096,
12565,
2815,
-6257,
-12435,
-15894,
-14720,
-9429,
351,
10377,
16237,
17914,
14618,
6612,
-81,
-7988,
-13130,
-15291,
-15495,
-15476,
-10217,
-1437,
6146,
16656,
16455,
13035,
9022,
2928,
-412,
-4588,
-6731,
-5223,
-2872,
-1605,
-1169,
-1516,
-2525,
-2445,
-20,
2189,
2019,
-610,
-2720,
-3718,
-114,
297,
-1955,
-4612,
-6719,
-1347,
4225,
11312,
17633,
18317,
13887,
4226,
-7207,
-14601,
-20432,
-22200,
-18704,
-10545,
-1434,
5997,
13445,
17220,
21180,
17074,
8265,
-192,
-10914,
-16441,
-16948,
-12857,
-2211,
8625,
15168,
15926,
12320,
7590,
262,
-7290,
-12821,
-14943,
-14134,
-11803,
-4883,
2122,
8978,
15488,
14330,
10609,
4658,
-1295,
-4778,
-7264,
-5993,
-1001,
1757,
2531,
2059,
-1147,
-1699,
-2220,
-2587,
-3038,
-6098,
-9415,
-5920,
-676,
5109,
8754,
6517,
2548,
-1210,
-2044,
357,
5275,
5986,
6113,
5973,
1984,
-2624,
-8034,
-12716,
-13645,
-13845,
-10128,
-4738,
-780,
6706,
12700,
16344,
16049,
8832,
347,
-8754,
-14305,
-12353,
-5848,
1464,
5661,
9925,
12678,
13512,
7553,
-3711,
-11633,
-18024,
-20883,
-17949,
-12808,
-2381,
9768,
21644,
28205,
25462,
16674,
2805,
-7339,
-12528,
-14723,
-13206,
-11537,
-8131,
-2429,
4367,
11869,
10771,
7203,
1314,
-6530,
-9006,
-10252,
-8428,
-2057,
3263,
8446,
10503,
6504,
2844,
-170,
-190,
2241,
2262,
-1577,
-1933,
-3144,
-991,
1903,
-1993,
-4112,
-8358,
-11054,
-8387,
-4004,
1497,
8401,
12318,
13074,
10041,
3948,
-555,
-2479,
-4419,
-5590,
-4268,
-322,
6034,
8572,
8426,
4560,
-3423,
-10157,
-15041,
-16697,
-16245,
-11936,
-2541,
7857,
19365,
24691,
23117,
17035,
7233,
-2471,
-11804,
-16680,
-18607,
-17255,
-10349,
-1138,
6647,
11977,
12833,
8659,
1099,
-6123,
-10503,
-11048,
-8498,
-4421,
1827,
8568,
13530,
15201,
12591,
6082,
-57,
-5943,
-9912,
-13169,
-12482,
-8149,
-2770,
4238,
5862,
3788,
-1,
-210,
2222,
4491,
4861,
3022,
1617,
2475,
2051,
-47,
-1032,
-5084,
-4237,
-1816,
1644,
6529,
7638,
6263,
5078,
956,
-3657,
-8793,
-16164,
-16882,
-14426,
-6940,
3763,
14142,
19873,
19518,
14867,
9909,
3613,
-5177,
-11830,
-17859,
-17373,
-11478,
-3826,
2769,
9660,
12953,
8714,
3324,
-4227,
-11377,
-12305,
-10707,
-5374,
1719,
8247,
13901,
15668,
15300,
11681,
5364,
-3487,
-14241,
-20285,
-19733,
-14695,
-6399,
2204,
8483,
7470,
7685,
7833,
5773,
4559,
113,
-2662,
-2927,
-776,
1135,
2609,
1821,
-663,
-2199,
-2122,
-997,
-1471,
-1634,
-477,
978,
3556,
-58,
-7103,
-9474,
-8812,
-3635,
2099,
7863,
12676,
12643,
11287,
9570,
4329,
-1201,
-8147,
-14410,
-17665,
-15583,
-7629,
-279,
7838,
14647,
17200,
13254,
5113,
-3633,
-10716,
-14305,
-15102,
-12244,
-4572,
4435,
13099,
21433,
21531,
14557,
6251,
-4441,
-12658,
-17793,
-18944,
-17661,
-11735,
-3574,
4506,
11623,
12868,
14583,
11983,
6215,
1889,
-2446,
-4724,
-3820,
-1853,
1260,
447,
206,
1987,
738,
-295,
-2143,
-4754,
-5733,
-4046,
-1828,
768,
-2700,
-4992,
-2640,
-165,
3966,
8862,
8822,
8490,
9032,
8338,
5176,
-3188,
-9748,
-14659,
-14841,
-11786,
-6855,
-29,
7130,
11460,
10502,
7689,
2289,
-3288,
-6753,
-11354,
-11344,
-6941,
-1949,
5570,
14731,
18834,
18544,
12460,
1174,
-8440,
-17366,
-21472,
-21583,
-16233,
-9278,
-1177,
7725,
16736,
19685,
16354,
11970,
2264,
-4314,
-7947,
-11682,
-11306,
-6846,
544,
8033,
12485,
12507,
6062,
-1099,
-6312,
-8891,
-9337,
-9352,
-8691,
-7859,
-2726,
2341,
6467,
11131,
11409,
9217,
6269,
1134,
-1297,
-73,
-1860,
-3670,
-5824,
-7727,
-5730,
-4193,
-4213,
-1010,
2806,
4536,
5979,
3231,
2825,
519,
-3815,
-4179,
-7199,
-6255,
-2204,
1535,
10762,
15884,
14834,
12032,
2096,
-7198,
-12977,
-17188,
-18372,
-15291,
-9357,
-2725,
9026,
15472,
17936,
15320,
7437,
2186,
-5123,
-9316,
-12243,
-12132,
-4091,
4989,
13459,
18420,
13226,
6161,
-2474,
-12112,
-16091,
-17762,
-16441,
-13229,
-5490,
5392,
16902,
24236,
23241,
18000,
8702,
-2031,
-11858,
-16696,
-14915,
-11705,
-5871,
1287,
8445,
11844,
9680,
6283,
2216,
-1236,
-3659,
-8861,
-12185,
-9579,
-5249,
1663,
6524,
8790,
8046,
5759,
3606,
4389,
5933,
3655,
3340,
-780,
-6660,
-10686,
-14680,
-14268,
-10570,
-4633,
2786,
9951,
13740,
13565,
8604,
2715,
745,
-3394,
-9167,
-13212,
-12546,
-5015,
7951,
17114,
20860,
16991,
5926,
-4685,
-14197,
-19174,
-19015,
-18302,
-15392,
-6747,
4345,
15873,
21089,
21557,
19034,
11480,
164,
-8713,
-14075,
-15943,
-12281,
-4487,
4658,
8789,
8239,
5444,
2912,
290,
-2533,
-7435,
-11776,
-11731,
-8300,
-972,
7738,
13865,
15319,
11998,
5001,
-2866,
-6363,
-8273,
-7697,
-2300,
1758,
1805,
28,
-2207,
-2176,
1636,
3797,
3584,
1357,
-2236,
-3158,
-3817,
-3947,
-2501,
-3852,
-3267,
-3376,
-781,
10227,
18173,
19928,
14610,
2491,
-6101,
-11504,
-16229,
-19890,
-20592,
-15712,
-6680,
5739,
14346,
19807,
18969,
15215,
10272,
339,
-8179,
-16476,
-19648,
-12194,
-510,
9393,
15333,
15620,
11745,
3987,
-4067,
-11053,
-15811,
-17688,
-15735,
-10264,
-1907,
7701,
12065,
15592,
16435,
13980,
10065,
1673,
-6023,
-9848,
-8500,
-6120,
-5061,
-3665,
-4657,
-4362,
-2869,
584,
4786,
4847,
3922,
2668,
3567,
2518,
-1265,
-3157,
-6558,
-6461,
-6403,
-4660,
4789,
11954,
14718,
13408,
7965,
18,
-7654,
-14191,
-18768,
-16701,
-9674,
-1071,
8639,
14711,
14205,
9227,
3810,
-587,
-6161,
-11545,
-14643,
-12018,
-1076,
12159,
20223,
22271,
16449,
7155,
-3493,
-13888,
-20324,
-24189,
-23834,
-18257,
-7990,
7245,
18746,
24508,
24963,
18299,
11620,
1446,
-8303,
-13707,
-15224,
-10207,
-2717,
3548,
7292,
6121,
2687,
-70,
-2760,
-4723,
-8079,
-9226,
-7207,
-1075,
6013,
7410,
7654,
7715,
5081,
3211,
3396,
1411,
1096,
1762,
2725,
2436,
-4514,
-10355,
-16016,
-16672,
-11324,
-4550,
3382,
10954,
14812,
14737,
14465,
9567,
2224,
-5791,
-14541,
-20613,
-16456,
-6980,
4861,
16040,
21597,
20862,
12241,
2438,
-7627,
-17241,
-22133,
-22464,
-17776,
-7444,
1300,
10882,
19749,
23476,
20141,
10478,
-2346,
-15049,
-16102,
-11557,
-4838,
5675,
9703,
10453,
9055,
4375,
1563,
-3923,
-10179,
-15925,
-19986,
-16073,
-8134,
2792,
14687,
20852,
20849,
15387,
5808,
-1445,
-4321,
-4259,
-4724,
-4240,
-2273,
-2695,
-4401,
-8174,
-8488,
-4573,
-1286,
-514,
1060,
3608,
6691,
7772,
5950,
3642,
-2003,
-6874,
-9585,
-7109,
1473,
12430,
17924,
15552,
5694,
-3233,
-10597,
-17558,
-19421,
-18593,
-13202,
-5313,
5838,
14203,
21677,
23914,
19745,
12861,
271,
-12621,
-20866,
-21121,
-16006,
-4560,
6735,
14008,
15480,
13458,
10831,
3144,
-4500,
-11884,
-18167,
-18412,
-13566,
-5225,
4536,
12029,
14589,
12983,
8116,
3280,
631,
-1157,
-3811,
-2985,
-1054,
-265,
-1487,
-5411,
-5693,
-5903,
-4489,
-2192,
-4228,
-4388,
-2692,
141,
7152,
9834,
8522,
4190,
-819,
-2754,
-2121,
2664,
5095,
6958,
6726,
3261,
-1276,
-7336,
-12141,
-13796,
-13928,
-11378,
-7697,
-878,
9878,
15749,
20167,
17917,
10018,
2627,
-6273,
-12372,
-13507,
-9813,
-2276,
5902,
8802,
9900,
8489,
1518,
-6336,
-11129,
-14707,
-16413,
-14159,
-8925,
1026,
10872,
19935,
24358,
20932,
15022,
5334,
-6249,
-14059,
-18731,
-15961,
-10418,
-5641,
3424,
7397,
7143,
5973,
4602,
2633,
-2613,
-7709,
-10239,
-7970,
-996,
6525,
8959,
6728,
3526,
2215,
1385,
503,
2429,
5244,
5323,
5248,
330,
-7353,
-11616,
-16032,
-14544,
-10200,
-5674,
858,
7217,
12818,
16208,
15719,
12345,
5609,
-3996,
-10757,
-12855,
-9916,
-3991,
3647,
7933,
9962,
8223,
1404,
-4693,
-11461,
-13838,
-13557,
-12740,
-9369,
-4845,
4410,
15374,
24023,
26482,
18434,
6824,
-4621,
-10287,
-10304,
-7250,
-4244,
-5427,
-2781,
-2402,
-2721,
-1399,
-1541,
-110,
-480,
-2339,
-2371,
28,
4732,
10799,
10365,
8003,
4425,
-979,
-2456,
-3057,
-783,
2381,
-481,
-2681,
-4977,
-9588,
-9950,
-9494,
-6099,
-1787,
290,
2611,
5825,
11078,
15173,
11610,
4524,
-3870,
-11876,
-13968,
-11519,
-3812,
3302,
8305,
11193,
10279,
6915,
-1122,
-6685,
-10756,
-14547,
-14002,
-14632,
-10364,
-28,
12809,
22898,
24502,
18915,
9644,
-188,
-4600,
-6511,
-8684,
-9992,
-10129,
-6331,
-2743,
4545,
7382,
7503,
6571,
-331,
-7283,
-12052,
-12476,
-5036,
2465,
5703,
8515,
10042,
12234,
12815,
11328,
3866,
-2877,
-9107,
-12572,
-11146,
-9392,
-8684,
-8792,
-6537,
-4455,
-4843,
-3319,
1292,
5503,
13594,
16299,
14879,
9098,
2251,
-464,
-3420,
-4944,
-4167,
-5464,
-4872,
829,
3881,
3699,
-1675,
-5246,
-6822,
-8427,
-10770,
-8565,
-4073,
3197,
11210,
18178,
21907,
12920,
6355,
-897,
-7415,
-8403,
-10751,
-13102,
-12268,
-5476,
3440,
8207,
9872,
6248,
-324,
-6906,
-10698,
-9479,
-7111,
-3609,
1343,
8451,
15405,
19108,
17778,
13277,
4244,
-4277,
-13023,
-18213,
-18575,
-13771,
-7788,
-1606,
5666,
5244,
7102,
5665,
2000,
-126,
-2916,
-3636,
-2233,
841,
5069,
9358,
9605,
7120,
3662,
-520,
-3503,
-4049,
-3870,
-2115,
-3684,
-4216,
-5997,
-7837,
-5489,
-8051,
-6650,
-1548,
3234,
12460,
19187,
19159,
19047,
13495,
4435,
-2357,
-11073,
-18014,
-21734,
-18878,
-12795,
-1825,
8357,
13338,
14052,
8776,
3133,
-4579,
-8918,
-10748,
-11957,
-8053,
540,
11171,
20515,
22302,
18597,
9336,
-3608,
-10683,
-18713,
-21160,
-20671,
-18688,
-8685,
1071,
13018,
15367,
12990,
9520,
4890,
1874,
-4319,
-6232,
-5297,
772,
6110,
9432,
7666,
1832,
-4153,
-8836,
-9074,
-9169,
-8942,
-5258,
-479,
7101,
11504,
6744,
2043,
-4030,
-6848,
-6052,
-4182,
-1740,
5702,
13129,
14889,
13583,
7772,
455,
-7017,
-11525,
-14580,
-14072,
-10047,
-2137,
3659,
7579,
7848,
2560,
1124,
-2505,
-6274,
-6454,
-4567,
3229,
12096,
16899,
20768,
16962,
7332,
-1607,
-10921,
-19511,
-23665,
-21320,
-16427,
-5892,
4038,
10156,
13808,
12815,
13097,
8482,
387,
-3727,
-7944,
-6577,
-2713,
2767,
9473,
9220,
5245,
1179,
-4371,
-9303,
-11509,
-11776,
-10120,
-6869,
-2037,
1736,
5837,
6359,
5365,
4569,
2884,
4716,
5895,
4125,
4185,
6253,
4528,
559,
-7136,
-15617,
-19263,
-17042,
-9516,
-1743,
6378,
10796,
11417,
12590,
10456,
5059,
-2008,
-9949,
-14404,
-15412,
-9971,
725,
11013,
19382,
20386,
14086,
5002,
-4637,
-10953,
-14176,
-14215,
-11031,
-10029,
-8117,
-2326,
4883,
11692,
15368,
14071,
9173,
600,
-4374,
-1895,
615,
2043,
1183,
74,
-748,
-1259,
-930,
379,
10,
-1817,
-5948,
-10227,
-6771,
-2471,
1568,
5396,
5428,
5859,
4937,
596,
1985,
7741,
9847,
8718,
7319,
3253,
-3427,
-10537,
-15079,
-15453,
-13466,
-9583,
-7549,
-926,
5692,
10075,
14242,
13395,
9541,
3301,
-4856,
-8848,
-4754,
-885,
483,
4129,
5943,
5311,
3018,
-2822,
-4939,
-8053,
-11834,
-12989,
-12643,
-7849,
123,
9036,
19022,
21844,
14807,
7791,
-3583,
-9339,
-9644,
-13468,
-12579,
-7859,
-2005,
4665,
11050,
15875,
13369,
5405,
-2565,
-10336,
-15527,
-17906,
-14924,
-8036,
2189,
11865,
15053,
14160,
11786,
10155,
7234,
2058,
-4503,
-7420,
-8190,
-6042,
-3067,
-2658,
-921,
-1106,
-2822,
-4882,
-5869,
-4087,
1477,
6523,
10281,
9022,
4410,
719,
-2846,
-1606,
-1146,
-162,
3216,
5572,
6851,
5392,
1358,
-4062,
-7922,
-11184,
-15857,
-17034,
-16319,
-7566,
6623,
16031,
23597,
23264,
18163,
12455,
4654,
-3992,
-12977,
-17424,
-17762,
-12652,
-5078,
5262,
15683,
12548,
8292,
3509,
-5287,
-9667,
-13998,
-14531,
-8601,
-23,
10743,
16053,
15358,
12421,
4489,
-1396,
-5547,
-8943,
-9836,
-7203,
-1312,
4747,
6805,
3860,
642,
-5419,
-10043,
-10733,
-9253,
-5355,
2896,
9650,
14541,
16448,
10870,
6440,
-1482,
-8102,
-8490,
-7039,
-5602,
-2303,
469,
2277,
3109,
1251,
-1603,
-9149,
-13260,
-14229,
-11336,
-2951,
7411,
15972,
19569,
17357,
11258,
3851,
-5045,
-12165,
-15999,
-14165,
-8680,
-901,
6448,
9862,
11620,
5860,
-2039,
-8396,
-17293,
-20004,
-16993,
-9709,
4401,
16595,
22620,
24883,
21133,
13026,
1354,
-9626,
-17614,
-21553,
-21744,
-16657,
-6358,
3739,
12418,
14778,
12102,
9043,
1876,
-4341,
-4880,
-4850,
-653,
3889,
5421,
8051,
7178,
3188,
1088,
-1424,
-2606,
-3200,
-3838,
-3652,
-696,
3411,
4501,
-712,
-5746,
-8958,
-9833,
-3940,
2624,
10415,
14123,
14950,
12600,
8623,
2414,
-3155,
-9074,
-14353,
-15965,
-12695,
-7317,
-34,
9674,
14270,
17017,
10089,
925,
-10038,
-15754,
-15094,
-10172,
-3858,
394,
4949,
10466,
18477,
19096,
14235,
5367,
-7476,
-15981,
-16097,
-16902,
-12098,
-6020,
-1039,
5574,
7555,
5551,
2431,
1239,
2292,
1928,
2498,
2472,
782,
3949,
6899,
6182,
2442,
-3389,
-9890,
-12508,
-11073,
-6968,
-2250,
3468,
4805,
6342,
5014,
-190,
-1054,
-640,
-909,
-1318,
2184,
3107,
6186,
9748,
9830,
6402,
596,
-5608,
-12852,
-14598,
-13713,
-9202,
-797,
7861,
13246,
11665,
5144,
-2089,
-3929,
-3573,
-4991,
-4808,
-5622,
-3871,
3171,
10678,
16057,
12731,
3224,
-3767,
-10529,
-14881,
-15354,
-13548,
-8042,
-1717,
7446,
12972,
14659,
14452,
8367,
3125,
-2744,
-10450,
-13071,
-13008,
-5963,
4409,
9894,
13333,
13034,
9196,
2179,
-4038,
-9516,
-11848,
-11243,
-7548,
-3524,
698,
2784,
2309,
3351,
3994,
7220,
8116,
5003,
3676,
3095,
1704,
1336,
-2238,
-5257,
-11247,
-14841,
-14486,
-8719,
-93,
8139,
14938,
12850,
9578,
2300,
-3186,
-4195,
-6305,
-9221,
-9374,
-7654,
-362,
9718,
16789,
18820,
12427,
2421,
-8017,
-16620,
-19933,
-17831,
-13958,
-6334,
2667,
9696,
15079,
17316,
16468,
13173,
5435,
-4845,
-11667,
-14393,
-13962,
-6932,
1173,
8474,
10130,
6123,
2231,
36,
-882,
-2891,
-4623,
-5683,
-2602,
-498,
3575,
5012,
3224,
2795,
-1182,
-2339,
-946,
1317,
3941,
6397,
9008,
9163,
2427,
-6521,
-12629,
-13768,
-9619,
-3532,
-207,
2454,
3896,
4382,
8383,
8144,
6145,
-2146,
-9613,
-10764,
-9724,
-887,
6959,
11048,
12776,
7438,
139,
-6053,
-13122,
-14892,
-13676,
-10534,
-4492,
3806,
9209,
13518,
15665,
12063,
6207,
-2459,
-11268,
-14848,
-12188,
-5624,
3693,
8741,
11274,
10576,
8952,
6361,
-793,
-7648,
-14609,
-17707,
-15976,
-10319,
-948,
7389,
15099,
18934,
15143,
11358,
3202,
-2721,
-5167,
-9936,
-9499,
-7943,
-5781,
-4153,
-2064,
979,
4513,
4162,
1569,
280,
268,
3788,
3790,
5009,
1444,
-5524,
-8051,
-10036,
-6955,
789,
6706,
9831,
12319,
12080,
8585,
863,
-4972,
-8658,
-12492,
-15887,
-15061,
-7319,
520,
8649,
14761,
16430,
13477,
5893,
526,
-4930,
-9854,
-9472,
-9597,
-7042,
-326,
7073,
10760,
12653,
10235,
2296,
-5339,
-12458,
-14511,
-10799,
-8371,
-4352,
3085,
8945,
14284,
12977,
10308,
6471,
-114,
-5358,
-9990,
-9891,
-6042,
-2132,
1367,
1760,
567,
-114,
-990,
628,
-51,
-2695,
-4980,
-4812,
-2107,
2873,
4714,
2844,
3134,
1789,
1378,
3120,
2117,
111,
-370,
-1231,
-530,
-2546,
-8376,
-10460,
-7389,
-413,
3909,
6410,
8664,
10074,
11552,
9815,
4129,
-5075,
-13134,
-17776,
-16113,
-8875,
916,
10177,
16533,
20581,
17755,
9162,
-446,
-9860,
-15437,
-18268,
-18986,
-13997,
-8025,
1251,
12642,
19649,
21191,
15594,
6325,
-2736,
-7007,
-7935,
-9158,
-8570,
-7850,
-5149,
1592,
7393,
11593,
10619,
3277,
-2975,
-7022,
-9308,
-10281,
-6128,
-742,
2067,
5559,
7583,
7880,
9605,
7849,
3125,
743,
-1334,
-4362,
-3309,
-4067,
-7299,
-6135,
-6511,
-3847,
-2355,
1330,
4889,
8659,
11852,
9166,
4623,
-2786,
-6316,
-7375,
-6229,
-3412,
-1309,
552,
5219,
8000,
9010,
5325,
-1985,
-6598,
-10102,
-12141,
-13736,
-10740,
-2824,
7005,
15868,
17870,
13916,
7507,
-1245,
-7437,
-11154,
-13685,
-13664,
-12436,
-4086,
5362,
12867,
18560,
13684,
8482,
641,
-9018,
-13089,
-16332,
-14136,
-10594,
-4621,
3807,
10521,
18818,
21574,
17865,
12543,
3345,
-6104,
-13470,
-16673,
-14100,
-8902,
-1249,
4532,
6149,
3213,
-1386,
-882,
734,
1132,
3158,
2329,
1310,
2567,
-60,
-655,
-543,
-3402,
-4323,
-2169,
2119,
3712,
3967,
3746,
1260,
-2887,
-7993,
-14626,
-16968,
-13070,
-5368,
3235,
11329,
18226,
19038,
19629,
12582,
3445,
-4762,
-15254,
-20489,
-21573,
-16535,
-6747,
5372,
15817,
19078,
13734,
5436,
-3332,
-8827,
-11615,
-13304,
-12314,
-5456,
6268,
15198,
23434,
21494,
12703,
3477,
-8362,
-14499,
-17196,
-16477,
-10395,
-2949,
5109,
11861,
11148,
9232,
4627,
-1804,
-5732,
-9907,
-10074,
-7767,
-2392,
5002,
12184,
14781,
10307,
3245,
-353,
-2181,
-3511,
-7034,
-8970,
-6144,
-3284,
-2437,
-4252,
-5012,
-4985,
-2995,
570,
5508,
8403,
10710,
12535,
13292,
11691,
1137,
-8573,
-16249,
-19327,
-14508,
-8181,
2243,
12035,
14943,
12123,
6417,
-1088,
-7481,
-12354,
-13310,
-11822,
-7062,
1531,
13559,
27013,
29499,
23828,
11364,
-1462,
-12051,
-20787,
-24344,
-24302,
-19156,
-9110,
718,
9443,
16497,
17706,
14686,
8943,
1913,
-4842,
-9826,
-10052,
-4667,
1270,
6657,
8017,
4540,
2066,
140,
-1463,
-3744,
-6345,
-10409,
-8230,
-3622,
-2462,
116,
723,
4000,
7023,
8559,
7363,
3775,
3176,
3342,
3519,
2760,
-3370,
-8961,
-11700,
-10378,
-3693,
2402,
4188,
3726,
4107,
2894,
3775,
-1205,
-5162,
-5491,
-8437,
-7993,
-4193,
3022,
14604,
19969,
17825,
11321,
893,
-6703,
-12546,
-17343,
-18934,
-15991,
-9905,
421,
8304,
13849,
14520,
10174,
7241,
584,
-8104,
-13435,
-15197,
-8823,
1090,
8194,
13702,
15462,
15748,
12198,
4659,
-5515,
-15766,
-21641,
-23241,
-19569,
-11476,
-1658,
7717,
14127,
19210,
19623,
15848,
8490,
532,
-2711,
-4239,
-3525,
-4843,
-6524,
-6859,
-5423,
-2726,
-694,
33,
-1441,
-463,
72,
1154,
308,
-1703,
-735,
-902,
2210,
6446,
8296,
10588,
12566,
11011,
5553,
-2336,
-9815,
-16102,
-19620,
-19079,
-13439,
-5990,
2840,
12891,
15171,
15855,
12355,
5300,
20,
-8930,
-13624,
-15221,
-14658,
-5451,
6622,
16017,
19264,
15007,
8949,
2845,
-4608,
-12041,
-17346,
-19713,
-15786,
-9030,
-1132,
8791,
14828,
17452,
16031,
10984,
4286,
-4658,
-9846,
-8912,
-4787,
844,
5320,
5902,
3793,
3963,
3088,
137,
-4051,
-8896,
-13717,
-13951,
-9322,
-2576,
2857,
5888,
9979,
11938,
11644,
10398,
8977,
6019,
6678,
2834,
-929,
-7595,
-17544,
-19140,
-17822,
-12340,
-6534,
-802,
5130,
9780,
11075,
12975,
11051,
6036,
-1491,
-9678,
-10813,
-5488,
2311,
7818,
10482,
9182,
6149,
-1743,
-9359,
-13875,
-18038,
-18150,
-13181,
-6696,
2758,
11994,
17812,
23395,
20757,
14136,
5706,
-6935,
-15006,
-18829,
-15654,
-8689,
-801,
7273,
10315,
13372,
11654,
5496,
-1501,
-7288,
-9981,
-12927,
-13869,
-9941,
-2198,
9047,
15928,
15615,
13003,
4718,
1853,
-672,
-4999,
-5571,
-5559,
-5276,
-6051,
-3403,
-1557,
580,
3887,
1351,
-2589,
-5556,
-9062,
-6635,
-571,
3926,
5282,
3351,
-1080,
-1683,
3418,
8974,
9591,
7873,
6941,
3405,
1260,
-6557,
-15638,
-18225,
-20290,
-17728,
-10528,
-2764,
7252,
17587,
22914,
24946,
19892,
8421,
-3117,
-11315,
-14249,
-13707,
-8784,
-2634,
1182,
4334,
7302,
6542,
4454,
959,
-6368,
-13624,
-14380,
-12366,
-7940,
1853,
11442,
21485,
23530,
16152,
7161,
-1332,
-7106,
-11142,
-12902,
-12656,
-11119,
-6432,
774,
5746,
8166,
8929,
5098,
-874,
-6432,
-9347,
-5760,
2067,
5263,
5315,
4097,
-283,
644,
4112,
5686,
4129,
1559,
-1271,
-3324,
-1016,
-1932,
-5606,
-7477,
-6241,
-4152,
-3205,
-2502,
-382,
6049,
13010,
14817,
10500,
1097,
-7429,
-9704,
-6711,
-3881,
-1121,
3740,
7925,
13412,
13016,
6418,
-1252,
-9712,
-15324,
-19960,
-21520,
-16515,
-6876,
7104,
18211,
25520,
27137,
18828,
10928,
2319,
-5422,
-12372,
-17699,
-15900,
-12284,
-5223,
2944,
6085,
8920,
7522,
3293,
432,
-4380,
-7949,
-6944,
-3244,
684,
5552,
7682,
8425,
9326,
9184,
4834,
-83,
-5065,
-7398,
-5911,
-4064,
-3093,
-5589,
-7086,
-5913,
-2005,
398,
94,
-719,
4618,
10208,
9665,
7211,
1919,
-2842,
-4954,
-6220,
-5110,
-2318,
2099,
6110,
8491,
7323,
705,
-6959,
-12270,
-14222,
-13739,
-12003,
-7989,
1484,
12468,
21220,
22472,
16320,
7853,
-727,
-7077,
-11417,
-15246,
-13932,
-9699,
-3334,
5734,
11813,
13810,
10825,
5847,
-3133,
-13077,
-20130,
-20651,
-13247,
-2997,
8933,
17504,
19216,
18990,
16729,
12104,
2818,
-6038,
-11103,
-13734,
-12784,
-11580,
-9208,
-5188,
-101,
1567,
1807,
2761,
401,
1412,
7467,
11890,
12651,
5623,
-2322,
-5180,
-2851,
-465,
-1934,
-5192,
-5348,
-1819,
3620,
6279,
2357,
-3324,
-9886,
-13420,
-14990,
-11784,
-7576,
2192,
14378,
19190,
20111,
13101,
4850,
531,
-6014,
-11357,
-14181,
-14318,
-9063,
-2094,
7608,
11624,
8202,
3352,
-4513,
-10563,
-13300,
-13467,
-9186,
-2262,
8374,
15424,
17609,
17644,
14223,
9306,
-686,
-10640,
-14633,
-15284,
-12067,
-6578,
-1440,
3041,
5867,
6956,
4407,
1449,
-2175,
-6527,
-7427,
-2881,
3375,
6864,
8038,
7320,
8999,
8486,
3908,
-119,
-2244,
122,
1869,
1662,
-2227,
-8132,
-10872,
-12870,
-14526,
-11514,
-5277,
-466,
9660,
19979,
25431,
21900,
11978,
1615,
-7549,
-12758,
-15836,
-16365,
-13770,
-5112,
2965,
8741,
10134,
7083,
2110,
-3951,
-9234,
-11235,
-11648,
-9578,
-806,
8783,
18386,
21515,
20046,
14361,
6570,
-3576,
-13098,
-16909,
-17313,
-13378,
-11159,
-4394,
2465,
6469,
8894,
6083,
886,
-3624,
-7079,
-4172,
3989,
8818,
10830,
8201,
6167,
3451,
116,
-2538,
-6188,
-9565,
-9449,
-7011,
-1907,
3135,
2760,
1076,
-1633,
-2952,
-4928,
-5739,
-4176,
3530,
12026,
16462,
14480,
5840,
-502,
-4955,
-6017,
-5272,
-5954,
-6784,
-3104,
2629,
7678,
7677,
3877,
-1362,
-7642,
-13826,
-15223,
-11304,
-2536,
9294,
16654,
22641,
22213,
15628,
7653,
155,
-6193,
-11775,
-16369,
-17827,
-14893,
-7226,
3609,
10395,
14009,
11622,
4002,
-3542,
-8896,
-8953,
-4467,
-155,
4731,
9938,
12504,
13423,
8720,
3220,
-3904,
-12194,
-16396,
-15824,
-10569,
-4240,
3477,
3713,
1722,
511,
-1088,
-239,
1502,
3566,
5294,
9835,
10216,
5857,
1551,
-2999,
-7784,
-10574,
-11848,
-10879,
-7054,
-1016,
4520,
9044,
7531,
1532,
-2822,
-8035,
-10049,
-8499,
-4148,
1846,
11250,
19302,
20465,
15894,
10417,
1592,
-8050,
-14315,
-19164,
-19611,
-17016,
-5817,
5332,
13789,
18150,
12427,
6534,
-181,
-7244,
-9889,
-10135,
-8338,
-4224,
2425,
11040,
16224,
17939,
12942,
4905,
-2716,
-10981,
-13993,
-15383,
-12688,
-9171,
-6636,
-2444,
197,
4873,
6406,
6371,
8194,
7970,
6225,
5843,
5009,
4342,
2790,
-4129,
-8222,
-10537,
-12129,
-9190,
-5424,
-2244,
593,
2070,
2689,
1380,
-736,
-1996,
-2968,
-1455,
685,
1709,
4333,
9543,
13580,
14237,
7647,
-2728,
-10548,
-13773,
-15512,
-14034,
-12399,
-8887,
87,
8390,
14337,
13578,
9223,
3681,
-1142,
-4001,
-5898,
-6505,
-3656,
1247,
6474,
10886,
11644,
7078,
1556,
-4046,
-10730,
-14895,
-15231,
-13773,
-9454,
-1411,
8000,
15614,
14657,
11499,
6476,
2230,
-2973,
-7698,
-10390,
-9499,
-3274,
2467,
8094,
9878,
6931,
2769,
-254,
-4322,
-6974,
-9529,
-9049,
-6368,
-2825,
-506,
-1716,
1306,
5790,
8607,
9743,
9585,
9407,
9063,
7732,
2926,
-2076,
-8081,
-13491,
-14359,
-15086,
-12135,
-6239,
3509,
9563,
12988,
15422,
7799,
2682,
-704,
-4221,
-5554,
-8308,
-6897,
-686,
9361,
16708,
16648,
10739,
837,
-9015,
-16222,
-20117,
-19008,
-15187,
-9005,
1248,
11332,
17837,
18419,
15941,
10720,
3099,
-2632,
-9469,
-13917,
-11246,
-5656,
337,
5252,
5607,
2621,
177,
-2381,
-4501,
-4676,
-4105,
-4715,
-1160,
5064,
6724,
8312,
7471,
3031,
-113,
-2557,
-3982,
-3762,
575,
5336,
5057,
2848,
-707,
-4344,
-7060,
-6604,
-4118,
1475,
6627,
7721,
7784,
3221,
-2192,
-4520,
-6416,
-7225,
-6693,
-5100,
-1052,
10396,
20444,
20579,
14675,
3300,
-7622,
-14242,
-17069,
-18778,
-17935,
-13621,
-5801,
4926,
14480,
18137,
17686,
13379,
5737,
-1553,
-7968,
-11572,
-13219,
-8059,
-785,
6399,
10735,
8499,
4421,
1898,
-952,
-4107,
-9293,
-12686,
-9964,
-5417,
1084,
4544,
7302,
8128,
6098,
5928,
4343,
2387,
2504,
2948,
3522,
-193,
-7597,
-11406,
-13877,
-11298,
-7259,
-3668,
3129,
8563,
12392,
13736,
10336,
5018,
252,
-5477,
-9830,
-10634,
-8835,
-3858,
4470,
11678,
13690,
9760,
2729,
-2252,
-6733,
-9761,
-12547,
-13875,
-9519,
-291,
11434,
17587,
15636,
8496,
1060,
-5252,
-9285,
-10112,
-10443,
-8970,
-3630,
5213,
13186,
16495,
13016,
4556,
-3563,
-9762,
-14844,
-17901,
-17354,
-11226,
-2570,
7920,
13600,
14905,
14036,
11499,
8986,
3065,
-4100,
-9040,
-9971,
-7297,
-2715,
307,
1563,
-1278,
-3775,
-3206,
-3092,
-727,
3384,
4478,
4009,
1477,
-1673,
-2473,
-4126,
-3369,
-1002,
231,
5954,
11710,
12508,
11106,
3017,
-4532,
-11430,
-17663,
-21239,
-20146,
-14339,
-4590,
9539,
19181,
23042,
19048,
12216,
6151,
-1741,
-7624,
-13152,
-17220,
-14075,
-6900,
4577,
10669,
11343,
11467,
4051,
-357,
-5423,
-10222,
-10746,
-10553,
-5823,
-642,
6797,
10423,
10614,
10594,
6081,
2763,
-333,
-4501,
-5717,
-2651,
-908,
630,
538,
-1070,
-2371,
-4363,
-2748,
-752,
-298,
-214,
-1965,
240,
4592,
3710,
1659,
564,
-1472,
-630,
3966,
7926,
9522,
8537,
5049,
-803,
-8927,
-13595,
-15471,
-15554,
-11514,
-7851,
-1626,
7444,
14679,
17707,
16199,
9517,
1413,
-4347,
-9991,
-11211,
-8605,
-2805,
4989,
9137,
9205,
6641,
792,
-4248,
-9192,
-12890,
-14663,
-15326,
-13151,
-5783,
7708,
17890,
23053,
22375,
16000,
7564,
1941,
-4352,
-11512,
-14915,
-16669,
-14805,
-7990,
-731,
4469,
8460,
10144,
10659,
5929,
-15,
-5363,
-6232,
-2601,
-929,
-913,
-10,
-34,
2329,
5357,
9713,
9294,
3657,
2602,
3,
-854,
-5564,
-10496,
-13864,
-13655,
-10017,
-4181,
4075,
10065,
14644,
15505,
11337,
5867,
-799,
-6937,
-10235,
-11855,
-5741,
-2962,
5097,
12510,
14383,
13972,
4385,
-3720,
-10711,
-17989,
-19275,
-17195,
-13457,
-2488,
9871,
18810,
21635,
18955,
13286,
5855,
582,
-4906,
-13144,
-15553,
-12750,
-7269,
58,
5789,
9494,
5908,
485,
-4581,
-7467,
-8185,
-9325,
-6827,
-2256,
6098,
12818,
13555,
13378,
11484,
8110,
3284,
-3903,
-9430,
-10826,
-9171,
-8114,
-8825,
-9484,
-8037,
-5867,
-1130,
6483,
9718,
13953,
15537,
14331,
9898,
1993,
-4723,
-11616,
-15474,
-13472,
-7114,
-1621,
5669,
12316,
13830,
10391,
4705,
-4043,
-9188,
-14352,
-19299,
-16152,
-8513,
5579,
15471,
18790,
19099,
13710,
7801,
427,
-8041,
-11440,
-14493,
-13750,
-7690,
-660,
5207,
8568,
9285,
7998,
4533,
-1651,
-8023,
-13526,
-13861,
-5876,
1219,
6856,
10042,
7400,
9457,
10048,
8738,
6194,
-1517,
-8236,
-10858,
-8890,
-5361,
-3007,
-5019,
-6851,
-5607,
-4298,
573,
4067,
6718,
10185,
9729,
8969,
4417,
-531,
-4355,
-7113,
-4428,
-2927,
-1606,
2325,
3802,
3449,
776,
-4992,
-9073,
-11847,
-13538,
-13296,
-7743,
2448,
11621,
19687,
22440,
19363,
12735,
4997,
-4381,
-13308,
-18273,
-21181,
-18302,
-10514,
-749,
6971,
10938,
13676,
11105,
6407,
188,
-5248,
-6974,
-6858,
-5955,
-3560,
-377,
2883,
7698,
8854,
8353,
5395,
-277,
-4879,
-5386,
-5183,
-3846,
-2897,
-3837,
-4646,
-5613,
-2456,
-725,
1467,
4827,
5262,
4318,
5306,
7021,
7607,
3924,
-1785,
-6459,
-9402,
-7780,
-4403,
95,
4586,
5568,
6511,
3702,
-3348,
-7494,
-10825,
-11082,
-6651,
-542,
4210,
10117,
15697,
17416,
16426,
8840,
-402,
-9722,
-16259,
-17776,
-15015,
-6475,
732,
6194,
9891,
9568,
6342,
2987,
-1972,
-5321,
-5487,
-6817,
-6264,
-3826,
1357,
11566,
16773,
15539,
9451,
1326,
-4071,
-9108,
-10523,
-11130,
-11832,
-9045,
-4594,
107,
6214,
8842,
10556,
9492,
7128,
2387,
-3455,
-5916,
-4083,
-1166,
-639,
-1443,
-2852,
-1004,
502,
5176,
7053,
4677,
2371,
365,
-2826,
-5374,
-8834,
-9800,
-8022,
-5226,
-1341,
2107,
7023,
12317,
17467,
15390,
10187,
1663,
-7075,
-14320,
-16962,
-14852,
-10520,
-4283,
246,
6293,
10940,
11814,
10022,
5375,
60,
-5935,
-11586,
-12733,
-11992,
-4352,
6422,
11912,
17574,
16082,
9280,
2622,
-5999,
-10081,
-11691,
-13228,
-13679,
-10337,
-3740,
5134,
12805,
15247,
12308,
4724,
-2186,
-6073,
-5613,
-3037,
-1411,
202,
3142,
5381,
5690,
5720,
3044,
-876,
-4664,
-8800,
-9886,
-8167,
-2721,
379,
2750,
3956,
1724,
-94,
1378,
5111,
8416,
10955,
7705,
2923,
-3031,
-8352,
-10118,
-11394,
-11300,
-8405,
-4533,
3846,
10379,
13510,
13519,
4018,
-3159,
-7660,
-11188,
-10392,
-9194,
-4607,
3911,
12436,
19080,
18191,
10445,
2384,
-3611,
-9720,
-14592,
-18454,
-18695,
-11375,
-1132,
7659,
14231,
15994,
14102,
8383,
819,
-4895,
-10193,
-10426,
-7793,
-4091,
1877,
7155,
9342,
8635,
7409,
2411,
-4742,
-8730,
-10927,
-9905,
-6858,
-3613,
69,
3437,
5702,
6430,
4928,
3736,
4104,
1460,
-134,
548,
511,
988,
-290,
-1523,
-2659,
-7210,
-8143,
-8034,
-5105,
-707,
1991,
2200,
3545,
4661,
2692,
1621,
-2662,
-2429,
-1813,
1566,
8027,
11643,
10166,
6460,
522,
-6376,
-10041,
-15232,
-15936,
-13730,
-8249,
-1301,
5897,
14580,
18751,
15819,
10097,
2744,
-3403,
-7040,
-10075,
-12437,
-11519,
-2782,
5206,
10626,
14156,
9127,
3946,
-1551,
-8150,
-11170,
-14980,
-15258,
-10162,
-518,
9499,
15481,
14726,
11436,
9266,
5764,
1218,
-4338,
-8247,
-10167,
-7115,
-3766,
-1855,
-1067,
-1741,
-911,
97,
266,
-368,
-364,
2479,
5473,
6536,
4144,
-1560,
-5179,
-5553,
-2950,
1967,
8343,
7497,
6696,
5403,
2378,
2601,
-1467,
-6968,
-13801,
-17717,
-18270,
-12260,
-1340,
10165,
18932,
22354,
22183,
13033,
2963,
-1120,
-6609,
-12065,
-13896,
-12620,
-6401,
919,
6668,
10344,
8887,
4996,
-2266,
-11972,
-15375,
-15340,
-8638,
-1318,
5890,
13611,
16642,
17999,
14834,
9813,
1039,
-8898,
-16306,
-20439,
-17801,
-10416,
-4073,
2214,
8151,
12020,
10116,
3801,
-815,
-3391,
-3561,
-3182,
-925,
886,
2708,
6122,
5456,
3906,
1514,
-1149,
-1160,
-2400,
-2093,
-2031,
-2124,
-1285,
-3353,
-7072,
-8533,
-6728,
-2762,
3665,
8590,
10773,
12764,
12367,
10733,
5739,
-2628,
-11019,
-16317,
-16667,
-12838,
-6163,
2451,
12358,
17027,
16116,
8672,
-1335,
-8708,
-13773,
-16789,
-14428,
-7881,
622,
11248,
17531,
24057,
22924,
12151,
2405,
-8503,
-14804,
-16673,
-16624,
-13915,
-7656,
973,
7940,
11728,
11368,
5700,
34,
-2970,
-4837,
-5140,
-4090,
-1170,
2840,
8341,
13336,
13567,
7552,
461,
-8323,
-12963,
-14586,
-14822,
-10713,
-4982,
286,
5038,
6500,
4820,
4787,
3533,
4510,
3708,
1003,
257,
378,
2097,
2871,
-1572,
-7852,
-11037,
-10659,
-5981,
-2091,
665,
6477,
8177,
7266,
3495,
-4045,
-7134,
-6765,
-5231,
-2071,
85,
2586,
9921,
14152,
16811,
12468,
-418,
-8895,
-15115,
-16678,
-17122,
-13264,
-3226,
6544,
16991,
19929,
14173,
4266,
-2389,
-5427,
-7842,
-12412,
-15295,
-14621,
-3540,
12833,
22650,
28530,
19795,
5423,
-4344,
-13201,
-16941,
-16639,
-14320,
-9796,
-5620,
408,
5839,
11976,
13132,
11277,
7685,
1297,
-4675,
-8479,
-5047,
992,
4880,
8648,
8273,
-868,
-6620,
-9597,
-9679,
-5785,
-3874,
-5371,
-2965,
1736,
5931,
9200,
8410,
4442,
1008,
-1588,
-2435,
1671,
2837,
5257,
5614,
2733,
-1705,
-8537,
-12277,
-13015,
-10865,
-5025,
1348,
4915,
8242,
9510,
11158,
9695,
3118,
-3862,
-12667,
-15154,
-10711,
-3521,
5068,
11991,
15621,
13953,
6933,
-1084,
-8007,
-12821,
-15149,
-16616,
-12110,
-6331,
3156,
12381,
17388,
19303,
12016,
1406,
-8179,
-15579,
-15267,
-9215,
-3870,
4250,
10449,
13095,
14007,
11979,
4825,
-4162,
-11143,
-17096,
-18322,
-15864,
-10215,
-1594,
7750,
16756,
19334,
14963,
8911,
3534,
1125,
-1262,
-3454,
-5831,
-5134,
-1506,
2065,
3216,
422,
-4527,
-7066,
-5605,
-4633,
-3431,
-1306,
758,
4727,
10767,
10368,
5254,
-599,
-2609,
-614,
1718,
2080,
1045,
361,
-1611,
-1211,
-3651,
-7640,
-10587,
-13109,
-10009,
-1695,
4937,
12623,
16685,
15243,
12464,
5775,
-2066,
-10164,
-14258,
-15065,
-11310,
-3144,
6195,
12722,
15793,
14656,
8435,
135,
-7161,
-14916,
-19160,
-18146,
-14349,
-2539,
8293,
16109,
19985,
19057,
13634,
6051,
-1094,
-10053,
-15535,
-14062,
-10179,
-6591,
-613,
4390,
9950,
12466,
10095,
4530,
-5111,
-9897,
-13352,
-13746,
-9635,
-4561,
4257,
10935,
14042,
15263,
15685,
11321,
4849,
-3691,
-11199,
-13373,
-12601,
-8804,
-5846,
-4787,
-4163,
-983,
2698,
5122,
6259,
5981,
5080,
7081,
6380,
3074,
1700,
-1865,
-5237,
-6508,
-4557,
-3027,
-2201,
-108,
1596,
2886,
1041,
-2276,
-5318,
-8519,
-8446,
-8092,
-4469,
1397,
5153,
13353,
18046,
18853,
15613,
4320,
-6761,
-16902,
-22495,
-20225,
-14974,
-8355,
-849,
7068,
15539,
17738,
13322,
4396,
-7197,
-13792,
-14271,
-11991,
-8053,
-1939,
6544,
14614,
20020,
20356,
13322,
4172,
-5495,
-12750,
-17950,
-18539,
-14324,
-7211,
2234,
9868,
12781,
9395,
6010,
3359,
1009,
500,
-1205,
-2879,
-629,
2909,
7186,
7794,
5877,
1028,
-2928,
-4769,
-7420,
-7850,
-4994,
-1758,
-1023,
1264,
-841,
-4174,
-5011,
-2293,
3118,
8506,
10654,
11994,
13096,
11748,
7999,
-1052,
-9544,
-15851,
-20004,
-18988,
-13135,
-4651,
3834,
14999,
18775,
13636,
5809,
-4214,
-8004,
-11167,
-12316,
-9307,
-4826,
1890,
12454,
19739,
21752,
16088,
4652,
-9060,
-19131,
-21218,
-21705,
-18294,
-11422,
-381,
7180,
11995,
16560,
15653,
11042,
6364,
-1137,
-5046,
-7243,
-9058,
-6975,
-2861,
4585,
9130,
6646,
2941,
-966,
-4159,
-2901,
-5878,
-8272,
-8446,
-6546,
-1881,
4913,
8754,
8041,
7051,
4440,
4469,
3380,
2108,
1557,
736,
-1658,
-4144,
-6070,
-10013,
-9283,
-6173,
-2103,
3983,
5385,
4548,
4421,
1852,
2117,
4105,
335,
-2674,
-4737,
-3828,
2857,
9287,
11734,
9320,
4882,
-642,
-3302,
-6260,
-9713,
-11191,
-12524,
-10064,
-4661,
1947,
8996,
12625,
14670,
13982,
8370,
1072,
-4234,
-8928,
-9864,
-6392,
-2039,
2761,
6924,
10012,
8253,
3468,
-3926,
-9703,
-16137,
-18585,
-16340,
-10816,
-2201,
7642,
17929,
23378,
23070,
16213,
6810,
-4605,
-11602,
-16815,
-18179,
-16117,
-10313,
-3125,
2170,
7704,
9708,
10102,
6325,
661,
-4138,
-7359,
-7966,
-4641,
-270,
3942,
5961,
6581,
5116,
3700,
2669,
681,
-429,
-3051,
-1820,
-2288,
-2874,
-696,
-1569,
-4444,
-4705,
-3564,
-439,
2471,
3233,
7848,
9528,
10166,
6728,
-617,
-4993,
-8311,
-6093,
-1551,
-692,
3597,
7171,
6867,
9119,
3047,
-5142,
-10566,
-14673,
-14321,
-13336,
-9426,
190,
11870,
19417,
22067,
16591,
8170,
342,
-6211,
-10016,
-11148,
-12673,
-10968,
-3776,
2112,
7722,
7251,
3517,
1034,
-4668,
-9302,
-10337,
-8413,
-4635,
1653,
9271,
14777,
17124,
15786,
11466,
3318,
-7869,
-17176,
-21342,
-20942,
-13993,
-6424,
404,
6736,
12584,
13783,
11282,
8152,
2464,
-2866,
-8464,
-8664,
-6520,
-3818,
-2154,
1964,
4142,
2930,
2927,
4699,
5694,
2870,
-359,
-4918,
-4280,
-1391,
-1129,
-3788,
-5140,
-3161,
-2972,
-2017,
1599,
5671,
9333,
10913,
9932,
9545,
3459,
-3581,
-5841,
-8723,
-8172,
-8920,
-6369,
2445,
8807,
10786,
6644,
504,
-6133,
-10095,
-11231,
-12041,
-7056,
-1460,
6411,
14934,
20092,
24139,
17584,
7355,
-4500,
-15315,
-19795,
-23273,
-22015,
-16813,
-4736,
7606,
13957,
17202,
13023,
7959,
4386,
333,
-3774,
-6020,
-8815,
-8642,
-2300,
6233,
11694,
8151,
3071,
-1351,
-4408,
-6568,
-8855,
-9073,
-6874,
-1438,
919,
2554,
3723,
3463,
5533,
7332,
6711,
2535,
-4217,
-8628,
-4618,
1330,
5439,
4461,
150,
-1210,
-327,
3008,
5453,
2469,
-336,
-3783,
-6801,
-6012,
-7148,
-7323,
-6219,
-4337,
314,
6558,
12321,
19009,
20500,
18315,
11864,
512,
-10942,
-18790,
-23187,
-22978,
-16912,
-6956,
3191,
9490,
14591,
15750,
13148,
6832,
191,
-7853,
-11164,
-9510,
-4865,
3083,
8188,
13084,
16701,
15394,
6997,
-2656,
-12216,
-20370,
-20517,
-17974,
-13838,
-7306,
-350,
8429,
16751,
21115,
20131,
14249,
6354,
-1159,
-6659,
-10346,
-11978,
-10203,
-6621,
-2275,
1372,
3673,
3535,
3475,
2598,
988,
-2654,
-6983,
-8239,
-5843,
-1908,
771,
4289,
5780,
4757,
5771,
6605,
4303,
4419,
4189,
1030,
-1343,
-4753,
-10450,
-11143,
-8824,
-6389,
-3079,
-676,
1692,
3140,
4344,
5369,
5154,
2805,
21,
-2687,
-2729,
1540,
5711,
8041,
11557,
10648,
6402,
-714,
-11743,
-17072,
-18077,
-16833,
-14294,
-8303,
-1456,
6006,
17376,
23897,
25998,
17358,
4828,
-4404,
-10288,
-10179,
-13060,
-13532,
-9397,
-2288,
6274,
12055,
11233,
6539,
-1064,
-8670,
-12701,
-14439,
-14498,
-11603,
-3721,
6364,
16262,
19715,
18374,
14713,
8807,
2280,
-4454,
-11517,
-13259,
-11305,
-9165,
-6800,
-4799,
-2083,
-1750,
-1502,
238,
2839,
4069,
6163,
6721,
6784,
7488,
3958,
-108,
-3373,
-4950,
-4874,
-1780,
1020,
3926,
6333,
6390,
1988,
-5469,
-9956,
-15579,
-17958,
-15580,
-7234,
1634,
12031,
21545,
23308,
23175,
14105,
4905,
-3243,
-10754,
-15292,
-17441,
-14202,
-7120,
3139,
9941,
12358,
7084,
1108,
-4017,
-9061,
-10382,
-9535,
-6061,
-2359,
6907,
15130,
19115,
18727,
13033,
6736,
-3280,
-10805,
-16125,
-18010,
-13666,
-8699,
-361,
6168,
7677,
7400,
3510,
199,
-3521,
-5798,
-5661,
-6372,
-1446,
6011,
9329,
10567,
9689,
7228,
4656,
730,
-2724,
-5837,
-6689,
-8666,
-8649,
-6827,
-5258,
-4427,
-6784,
-6318,
-3984,
1609,
9563,
14603,
17489,
18522,
15919,
11503,
2099,
-9409,
-17428,
-23337,
-22329,
-14979,
-8270,
2891,
12836,
17198,
17462,
9003,
-1051,
-8054,
-13523,
-13779,
-8353,
-2071,
4488,
10816,
18518,
22064,
19530,
8969,
-6281,
-16591,
-21525,
-23369,
-20344,
-13247,
-3181,
7920,
14960,
18988,
17566,
10733,
2275,
-5633,
-9714,
-8469,
-7685,
-4604,
2110,
8785,
14008,
13652,
6834,
-302,
-6107,
-10662,
-12073,
-11286,
-7022,
-1736,
2039,
2403,
1545,
-356,
522,
2799,
4402,
5935,
6067,
8178,
9260,
7810,
4876,
-1386,
-10394,
-14231,
-14889,
-12965,
-6359,
-15,
4797,
6826,
3877,
1298,
-1197,
-3660,
-2480,
-2302,
-238,
4763,
10460,
15156,
17542,
13294,
7088,
-4865,
-18305,
-24302,
-28571,
-24866,
-16072,
-4802,
7629,
18427,
25122,
26460,
22032,
10654,
-1722,
-11053,
-16961,
-17155,
-13128,
-7576,
-25,
10763,
17258,
16696,
9511,
151,
-6321,
-11868,
-12772,
-12713,
-11619,
-7834,
-1025,
6898,
15034,
16593,
11966,
6183,
1220,
-1947,
-5604,
-6466,
-6313,
-2370,
2017,
1955,
1106,
-75,
-2613,
-1850,
832,
320,
-3512,
-6878,
-7462,
-3882,
2293,
4134,
3418,
1362,
-230,
1839,
8494,
11537,
10748,
7546,
1273,
-2813,
-6933,
-11816,
-14905,
-16455,
-13564,
-7409,
-2259,
4613,
10662,
15000,
18100,
16351,
7870,
-1628,
-10024,
-10807,
-6121,
-2455,
1519,
4610,
7736,
8493,
4441,
-4385,
-12228,
-15563,
-14384,
-11970,
-5194,
260,
7214,
16475,
21629,
22071,
13918,
3864,
-7179,
-13705,
-14882,
-13681,
-11561,
-7350,
-664,
5126,
10327,
12045,
10270,
4434,
-2887,
-7792,
-9979,
-10204,
-7361,
-3100,
2807,
7283,
9571,
9157,
3514,
1662,
3021,
4464,
4442,
710,
-2948,
-3951,
-4845,
-5621,
-6296,
-9490,
-9829,
-7003,
-1213,
4491,
7430,
13009,
14854,
12671,
8573,
-879,
-6473,
-7234,
-7072,
-3986,
-894,
2352,
5558,
5361,
2933,
-2902,
-7802,
-9579,
-13036,
-12623,
-10498,
-4804,
4755,
15768,
24439,
24153,
17779,
4789,
-6252,
-12253,
-14039,
-15191,
-14153,
-11127,
-5378,
1895,
10000,
14513,
12179,
8143,
-2677,
-9804,
-13458,
-12280,
-7200,
-1834,
4881,
9696,
13352,
14579,
10752,
3419,
-2983,
-9018,
-12517,
-13352,
-11646,
-6615,
626,
6092,
7566,
4978,
477,
-1401,
230,
538,
324,
160,
830,
2494,
2951,
3905,
2240,
-20,
-958,
-1653,
198,
-656,
-1256,
-424,
-1069,
783,
-1117,
-8411,
-12971,
-12469,
-9303,
-1656,
6671,
15645,
21849,
19578,
17633,
12220,
2978,
-7296,
-18114,
-23429,
-22794,
-14234,
-6596,
2733,
12819,
16293,
15657,
8630,
-880,
-8202,
-12176,
-12777,
-8043,
-1453,
5455,
12334,
19640,
21794,
16439,
6669,
-7349,
-18068,
-22604,
-21651,
-17568,
-10864,
-416,
7953,
14271,
17820,
14423,
7669,
-91,
-4757,
-6464,
-7765,
-5759,
-2202,
4010,
8000,
8547,
6497,
0,
-4492,
-6974,
-8565,
-8569,
-7656,
-5218,
-422,
2753,
6197,
6216,
3716,
2696,
1145,
3294,
4522,
3886,
3776,
4636,
4968,
3061,
-2433,
-9224,
-13684,
-13607,
-11363,
-5216,
3492,
8826,
12564,
11537,
7179,
147,
-6161,
-10448,
-11720,
-7663,
-1898,
3284,
12898,
21942,
19848,
13443,
269,
-12318,
-18939,
-22805,
-20724,
-15936,
-8023,
2950,
10983,
19260,
22624,
16572,
7532,
-3189,
-8990,
-8750,
-9530,
-8739,
-3858,
3177,
10322,
13679,
13189,
6778,
-1574,
-10281,
-14618,
-15664,
-13164,
-9671,
-6270,
692,
7750,
12702,
12605,
11432,
8331,
6211,
2820,
-585,
-3980,
-4930,
-2268,
-1077,
-2077,
-4726,
-9554,
-11579,
-6597,
485,
5222,
6159,
5364,
4561,
7510,
6427,
828,
-5033,
-8183,
-8180,
-5919,
-290,
6375,
10390,
9271,
8215,
529,
-8692,
-12106,
-15906,
-12441,
-3892,
1577,
7471,
12058,
13539,
13378,
8249,
2323,
-1601,
-8077,
-13180,
-12348,
-5586,
4163,
14781,
19204,
16906,
9142,
-1167,
-8610,
-14854,
-17440,
-17379,
-16038,
-12851,
-3837,
7217,
16536,
21358,
17297,
11011,
3706,
-6498,
-11244,
-11775,
-10552,
-4638,
1654,
6412,
9426,
6533,
1899,
-2305,
-7506,
-8335,
-10033,
-11094,
-8655,
-2310,
4602,
12751,
16606,
14788,
10758,
3719,
1125,
-1646,
-5150,
-8072,
-9705,
-9249,
-7875,
-5847,
-4486,
-1843,
1848,
6261,
10669,
10374,
6457,
2804,
3271,
4036,
2200,
-1923,
-8435,
-11510,
-8621,
-1509,
6734,
10198,
9023,
5741,
1639,
-1541,
-6755,
-9928,
-11248,
-10533,
-5616,
-254,
3919,
9107,
12425,
14092,
11836,
2120,
-7637,
-14012,
-12527,
-7238,
-284,
7292,
9441,
9214,
10079,
7418,
2265,
-5180,
-14186,
-20730,
-21691,
-15800,
-8665,
3995,
13801,
21359,
24622,
16600,
6709,
-2788,
-8753,
-12335,
-12239,
-9609,
-7726,
-4788,
129,
4747,
8980,
10591,
5461,
-2849,
-10872,
-12585,
-9479,
-4947,
252,
5342,
10473,
12706,
14393,
12720,
6587,
-372,
-7514,
-13480,
-16482,
-16144,
-12125,
-7132,
230,
7212,
8769,
9630,
7273,
5189,
4940,
3373,
2914,
899,
-2120,
-4439,
-6843,
-6828,
-4784,
-1639,
1270,
4218,
6524,
6384,
5424,
3912,
1480,
-4220,
-9702,
-12684,
-13058,
-7706,
-1221,
7287,
14095,
17577,
16788,
10485,
4369,
-3016,
-6971,
-11145,
-13398,
-11463,
-7226,
-704,
8378,
14647,
12723,
5651,
-5187,
-11391,
-14250,
-13185,
-7841,
-1762,
3766,
12162,
19089,
21485,
22290,
12401,
-145,
-10621,
-20802,
-22898,
-20920,
-16513,
-8699,
2725,
12994,
18877,
18284,
10576,
3392,
-1831,
-6778,
-10237,
-10409,
-9639,
-5451,
4178,
13750,
16516,
14354,
7108,
-4369,
-12174,
-15165,
-16891,
-14357,
-9386,
-1945,
5229,
9821,
12052,
9852,
11366,
7329,
3149,
-397,
-7062,
-9420,
-9629,
-5299,
-555,
2152,
2322,
1064,
2295,
4683,
5235,
3242,
587,
-1335,
-4797,
-4673,
-5196,
-5373,
-2509,
-1342,
1782,
5854,
8687,
8792,
11335,
11859,
6574,
1086,
-7500,
-16095,
-18926,
-17825,
-9610,
887,
7573,
12965,
12521,
9521,
6327,
1190,
-2584,
-5834,
-7074,
-9240,
-7803,
-1116,
8521,
16111,
15220,
10670,
170,
-10070,
-16267,
-18126,
-15115,
-9430,
-4052,
3211,
7853,
11165,
16660,
16451,
10599,
2130,
-6609,
-13795,
-14971,
-10786,
-3957,
1937,
8197,
9471,
6696,
2920,
1061,
49,
-3287,
-5732,
-8612,
-9162,
-7423,
-3088,
4493,
9595,
9735,
9787,
7864,
4642,
2278,
-1710,
-5044,
-5175,
-3564,
-3463,
-4624,
-3589,
-3588,
67,
5492,
7119,
5080,
1744,
595,
-742,
787,
352,
-2654,
-4931,
-7165,
-6768,
-2745,
4038,
11076,
14886,
13663,
8291,
799,
-7902,
-13043,
-14212,
-13872,
-10311,
-5613,
-1898,
3019,
11417,
15536,
16432,
11562,
1486,
-7536,
-12730,
-13443,
-12270,
-7099,
-2593,
4857,
12458,
15290,
13181,
6127,
-2104,
-7922,
-11135,
-11668,
-10593,
-11084,
-8190,
493,
9506,
17168,
17054,
10001,
3062,
-2895,
-6260,
-8412,
-7270,
-7149,
-3476,
370,
2872,
6203,
4655,
5130,
3974,
312,
-2662,
-9923,
-10779,
-7383,
-1631,
5420,
7375,
5871,
3216,
2387,
3170,
4674,
3495,
-328,
-6495,
-7594,
-7320,
-6347,
-4458,
-1550,
639,
1588,
2130,
5052,
5730,
3610,
2749,
2183,
802,
-7015,
-13235,
-13264,
-6122,
2760,
10790,
13487,
15252,
12240,
8090,
2483,
-5428,
-12063,
-18582,
-21066,
-17645,
-10288,
-1241,
11559,
20376,
24913,
21063,
10996,
-1599,
-6678,
-9367,
-11247,
-11036,
-9087,
-3994,
1282,
7884,
10568,
11972,
6398,
-2638,
-10914,
-15437,
-15859,
-11090,
-4891,
3609,
12387,
14677,
17602,
16138,
12429,
5582,
-2717,
-8594,
-14891,
-15736,
-13706,
-9485,
-4506,
-349,
6379,
10187,
10142,
6421,
884,
-400,
-1932,
-4407,
-4281,
-535,
2089,
3761,
4398,
3354,
3962,
3689,
505,
-3508,
-6907,
-9542,
-6514,
-4394,
-1144,
299,
-1789,
-942,
-1010,
3155,
6906,
5576,
3428,
-374,
-1486,
2185,
2113,
-350,
-872,
-2205,
-1982,
-29,
-653,
660,
3539,
3994,
2353,
-3065,
-10976,
-13410,
-13078,
-9611,
-575,
6929,
11643,
17176,
22887,
22862,
16906,
3648,
-6994,
-16235,
-23017,
-22735,
-21446,
-13207,
-2438,
7763,
14640,
17227,
13977,
7157,
2927,
-1412,
-3155,
-6595,
-8689,
-4648,
4390,
12587,
15551,
13925,
6715,
-2143,
-11935,
-17665,
-18613,
-13860,
-8082,
-3301,
4112,
9026,
13281,
15236,
11143,
6723,
517,
-5063,
-7925,
-8118,
-3588,
469,
3049,
4087,
2374,
-1528,
-3516,
-2158,
-643,
-1138,
-2355,
-4093,
-3199,
-1757,
1289,
3868,
2408,
530,
-2215,
-1564,
1828,
6524,
9164,
9327,
7335,
1936,
-2180,
-8277,
-13250,
-12353,
-10787,
-6184,
1469,
6492,
7336,
6268,
4445,
2785,
-3127,
-5949,
-7425,
-8274,
-3246,
5242,
15432,
19963,
19770,
13145,
1573,
-9434,
-17533,
-23909,
-27152,
-24386,
-14604,
-3142,
8567,
17513,
24521,
27532,
23434,
13890,
-946,
-11903,
-21761,
-22509,
-15502,
-6594,
3413,
8647,
10403,
10775,
6450,
2050,
-3346,
-9825,
-13255,
-13314,
-9656,
-5538,
3906,
12380,
16801,
16450,
12758,
5720,
-344,
-3661,
-5280,
-7691,
-9134,
-8066,
-7459,
-4655,
-1982,
2312,
5116,
6348,
4877,
1340,
-2560,
-3648,
-2735,
2231,
5154,
2979,
40,
-3494,
-2334,
2815,
7041,
6959,
4100,
922,
-3586,
-7244,
-7010,
-7470,
-8159,
-8606,
-6815,
-4224,
1272,
7767,
14878,
18602,
14775,
7150,
-3625,
-10232,
-10880,
-8399,
-5074,
-2355,
509,
4426,
7724,
12503,
8376,
-2710,
-10278,
-15891,
-17675,
-14168,
-7177,
3229,
11682,
20368,
25453,
21897,
12646,
918,
-7279,
-14701,
-17948,
-20501,
-18893,
-11168,
17,
12093,
18518,
19146,
12924,
3211,
-6074,
-13569,
-15934,
-13608,
-9736,
-3300,
6199,
15938,
21623,
21448,
15521,
3528,
-7734,
-14833,
-19341,
-18012,
-15888,
-10022,
-2638,
6197,
13417,
12992,
9468,
5846,
2686,
241,
-2030,
-6260,
-5502,
-1719,
3252,
5765,
1786,
-2475,
-4282,
-3541,
423,
3860,
2046,
-1388,
-2513,
-989,
1897,
-826,
-5410,
-8373,
-8865,
-3662,
3116,
9487,
12455,
14698,
13365,
8550,
-26,
-8857,
-13478,
-16310,
-13417,
-7019,
-531,
6606,
11374,
11939,
9699,
3080,
-3877,
-10299,
-16264,
-15356,
-8147,
4018,
14923,
24203,
27415,
20548,
10188,
-2759,
-12143,
-20649,
-25374,
-25020,
-18940,
-5734,
6118,
15055,
20127,
21538,
14445,
2017,
-6499,
-11317,
-12835,
-8025,
-4568,
1516,
10131,
12567,
14511,
10175,
1161,
-6656,
-14300,
-16956,
-15475,
-12145,
-5337,
2171,
9387,
14110,
13083,
10158,
6896,
3354,
-803,
-3517,
-5534,
-6927,
-5617,
-1709,
1270,
44,
-2036,
-2784,
-1852,
169,
1113,
1339,
-387,
-274,
1534,
331,
-443,
-3047,
-6329,
-6103,
-2875,
1745,
7421,
13290,
14968,
12885,
10135,
2830,
-7260,
-15418,
-20828,
-19735,
-13117,
-5200,
1349,
8111,
11206,
12594,
12487,
6539,
80,
-5564,
-9126,
-8618,
-4755,
1715,
9041,
16376,
16480,
10779,
1333,
-12195,
-21081,
-24979,
-23437,
-15874,
-8479,
3374,
14971,
21647,
28122,
22732,
13380,
2693,
-10903,
-16379,
-18013,
-13750,
-6992,
-323,
5552,
8262,
9594,
7314,
1618,
-3241,
-7276,
-11266,
-11407,
-10397,
-6497,
893,
11138,
16980,
14864,
11230,
3156,
-3218,
-4960,
-6701,
-6494,
-4975,
-5150,
-4140,
-3362,
-1085,
1933,
3543,
3926,
2668,
-25,
-3242,
-3906,
-3190,
669,
1282,
1198,
200,
-2234,
-981,
3046,
12116,
13981,
12852,
7580,
-1063,
-5554,
-10540,
-11882,
-13870,
-16385,
-13569,
-9019,
-2105,
8719,
17517,
23023,
21639,
13269,
2455,
-5755,
-8849,
-9242,
-9588,
-7096,
-2866,
2328,
5767,
6901,
5082,
-176,
-4882,
-10091,
-11395,
-12758,
-10606,
-4283,
7671,
20202,
25782,
23677,
14672,
4879,
-3905,
-12134,
-17642,
-20135,
-20781,
-15118,
-4825,
6669,
15058,
17011,
14579,
8903,
3669,
-4713,
-11723,
-13071,
-13782,
-7813,
-174,
9294,
14893,
15225,
12986,
7241,
1540,
-6085,
-13207,
-15738,
-12976,
-8315,
-3250,
522,
4010,
5599,
5900,
4731,
4031,
1058,
-520,
-115,
719,
1876,
1126,
1469,
21,
-767,
805,
1693,
3795,
5719,
2294,
-2076,
-7821,
-10706,
-10165,
-10515,
-8804,
-7153,
-1993,
6736,
16453,
22176,
22255,
18184,
9829,
2097,
-8883,
-19322,
-23110,
-22224,
-14611,
-3271,
5359,
10011,
13223,
12796,
8316,
1578,
-3110,
-9663,
-13390,
-11025,
-5965,
4092,
10250,
19166,
22367,
13323,
5128,
-7319,
-18030,
-20910,
-22044,
-18613,
-12443,
-1012,
11054,
17260,
20672,
17045,
9835,
-79,
-8837,
-11581,
-12262,
-9860,
-2423,
6989,
14380,
13804,
10137,
5769,
20,
-3651,
-10493,
-15692,
-16123,
-12510,
-4665,
726,
6617,
9643,
10918,
11773,
10210,
7592,
978,
-3434,
-5127,
-4339,
-1628,
-1189,
-3499,
-4400,
-4832,
-3320,
991,
1875,
1230,
1900,
928,
333,
959,
-3343,
-6347,
-7154,
-3283,
2070,
5751,
10578,
12401,
14546,
11954,
4783,
-3616,
-13214,
-19560,
-21177,
-17310,
-10077,
-3189,
6808,
14013,
17636,
18188,
10609,
1274,
-7287,
-12262,
-12344,
-9993,
-7652,
-271,
10042,
19044,
22163,
15346,
1377,
-10488,
-17246,
-21780,
-20754,
-16846,
-8868,
1202,
11167,
19313,
21595,
17722,
9988,
1281,
-7194,
-13004,
-12759,
-11402,
-7304,
1285,
7143,
12031,
10514,
3950,
-2211,
-8100,
-10403,
-10693,
-9922,
-6387,
-2470,
4884,
13045,
16677,
16240,
10336,
4164,
-1069,
-6087,
-9114,
-9709,
-8509,
-5545,
-2312,
-1383,
-48,
1771,
5003,
8304,
8039,
5569,
1585,
-1869,
-2368,
-512,
-1213,
-6207,
-9380,
-8035,
-2407,
5122,
8184,
11595,
11511,
7075,
3502,
-4035,
-11008,
-14362,
-13967,
-11498,
-5880,
-2418,
1212,
9473,
16115,
17881,
13440,
3331,
-5925,
-11128,
-12752,
-9844,
-6138,
795,
9163,
15125,
16592,
9552,
402,
-7426,
-13222,
-15413,
-16673,
-15670,
-11175,
1144,
14690,
25142,
28684,
19732,
7477,
-4492,
-11095,
-14026,
-14979,
-13622,
-11570,
-5204,
1676,
7990,
10851,
8743,
5451,
888,
-5504,
-10565,
-11215,
-8740,
-1156,
6856,
12242,
12099,
6191,
3023,
-201,
-2686,
-4552,
-7424,
-9660,
-10502,
-6650,
-1489,
4028,
6397,
6100,
4037,
964,
-270,
-1213,
-325,
1460,
3731,
1715,
-3761,
-6869,
-6963,
-4257,
2407,
8306,
9843,
8403,
8145,
6556,
1965,
-2885,
-8514,
-12833,
-16254,
-17049,
-12246,
-2319,
9157,
20279,
22648,
19924,
13251,
5743,
-919,
-9297,
-12608,
-14224,
-12821,
-7137,
-500,
6702,
13087,
12293,
6737,
-1199,
-8949,
-13426,
-13480,
-8975,
-1575,
7065,
13962,
19045,
19558,
13680,
3851,
-5518,
-12474,
-19392,
-19856,
-16236,
-12624,
1221,
10853,
15439,
16986,
8453,
1359,
-4688,
-9729,
-10093,
-10112,
-7067,
-516,
5593,
13637,
15423,
11593,
6256,
-2097,
-6898,
-11836,
-14004,
-10864,
-5527,
835,
3898,
5765,
5780,
4336,
5521,
6321,
2845,
-606,
-4764,
-8246,
-5916,
1016,
5035,
3208,
1176,
-424,
903,
3058,
4436,
2828,
872,
237,
-1541,
-4735,
-10391,
-14353,
-13731,
-7961,
785,
7383,
10322,
14369,
19683,
21148,
16136,
5233,
-8776,
-19582,
-24066,
-21099,
-15339,
-7715,
1469,
10081,
14679,
15388,
10777,
3367,
-703,
-5360,
-7004,
-8583,
-8195,
-4236,
5643,
14313,
18592,
15883,
5536,
-3321,
-10279,
-13842,
-14047,
-12154,
-9789,
-3150,
1827,
7769,
10409,
7537,
5557,
2762,
-599,
-2750,
-5240,
-5324,
-3032,
361,
5789,
6313,
4023,
1765,
-815,
-1860,
-2815,
-6802,
-8265,
-8284,
-5812,
-1947,
-308,
-1062,
931,
5314,
5643,
6138,
4379,
2952,
2388,
1131,
2920,
1195,
-4061,
-9584,
-12414,
-8319,
-2895,
3623,
7394,
7330,
6313,
1966,
-3219,
-7670,
-9821,
-9828,
-8519,
-2917,
4462,
12320,
20679,
22412,
20832,
14976,
-1087,
-12573,
-21358,
-24964,
-21556,
-17190,
-8320,
-742,
9258,
17032,
21417,
18723,
10059,
1500,
-5002,
-7926,
-9993,
-9433,
-5674,
1406,
8307,
14167,
13316,
7939,
-738,
-8838,
-12886,
-13453,
-13085,
-15078,
-12094,
-6025,
4012,
14236,
16065,
15986,
12868,
7726,
5206,
-1285,
-6787,
-8401,
-8540,
-7152,
-4424,
-2308,
-2069,
-660,
1850,
2278,
1784,
-376,
-5361,
-5668,
-893,
4585,
6894,
7025,
4367,
2046,
4504,
5484,
3426,
683,
-3321,
-5590,
-4611,
-6428,
-8735,
-7870,
-7886,
-3345,
3014,
5677,
5467,
5875,
8021,
7424,
3660,
-1794,
-6766,
-9103,
-3911,
-795,
4290,
10382,
12460,
11102,
6239,
-1723,
-9457,
-11900,
-15314,
-17158,
-15078,
-9904,
-3288,
8789,
18387,
24274,
23243,
17035,
7832,
-2274,
-8887,
-14464,
-13632,
-11767,
-6135,
-387,
3180,
8244,
8674,
5743,
1026,
-6746,
-10992,
-12522,
-10180,
-2077,
6044,
13272,
18324,
17169,
14404,
7943,
-747,
-6214,
-11477,
-12906,
-13162,
-9938,
-7816,
-3583,
3782,
4620,
4543,
3446,
700,
-1202,
-2891,
-1555,
3597,
8237,
10480,
9662,
3703,
-1292,
-2789,
-3349,
-3878,
-8140,
-12361,
-11154,
-7029,
1058,
7020,
3231,
-498,
-3678,
-2383,
1268,
4223,
5404,
5850,
7867,
6621,
6664,
2476,
-2086,
-4884,
-7722,
-8253,
-6524,
-3768,
-497,
4316,
8333,
6853,
108,
-6332,
-12433,
-15386,
-11565,
-4720,
3575,
12502,
19733,
24841,
25741,
17727,
5906,
-6951,
-21167,
-26991,
-26801,
-21995,
-12916,
-1781,
8238,
14557,
17429,
13468,
6900,
577,
-5424,
-6330,
-5641,
-5539,
-1328,
6899,
15335,
16437,
11571,
2936,
-8066,
-14838,
-19231,
-17689,
-11318,
-6501,
-127,
4284,
8846,
10048,
8821,
9100,
5411,
1529,
-753,
-5244,
-4250,
2823,
5168,
5908,
252,
-6962,
-9571,
-10907,
-5509,
-261,
2605,
4446,
2863,
3856,
3749,
-1535,
-4325,
-4693,
-3792,
-1899,
458,
4710,
9088,
14311,
14261,
7930,
-766,
-11402,
-18294,
-19809,
-17425,
-9279,
-56,
7803,
13559,
14703,
12472,
4330,
-3797,
-9799,
-14286,
-13612,
-10990,
-4012,
10072,
22400,
26152,
21739,
11029,
-3194,
-14767,
-21714,
-26009,
-24359,
-16249,
-8893,
2546,
15056,
23691,
27803,
20234,
10531,
-1104,
-9986,
-12188,
-12010,
-7901,
-2341,
4300,
9921,
9485,
4813,
738,
-5052,
-9513,
-11014,
-10688,
-8722,
-4188,
2186,
8985,
14227,
14058,
9373,
3162,
-1206,
-3044,
-1844,
-2345,
-3996,
-2207,
-1816,
-1636,
-1327,
-4490,
-5927,
-4497,
-610,
2513,
1599,
1721,
990,
3395,
5067,
2041,
-3223,
-6008,
-4173,
-230,
5192,
8433,
12115,
11661,
6181,
195,
-7669,
-15945,
-19841,
-19661,
-13102,
-4298,
4799,
15018,
20302,
22242,
18544,
9322,
-882,
-11333,
-18760,
-18882,
-13870,
-3542,
6327,
14700,
19331,
16538,
10115,
-75,
-10628,
-19281,
-23040,
-20905,
-15257,
-5166,
6479,
16725,
23794,
24016,
18047,
7461,
-132,
-7427,
-12933,
-13591,
-12304,
-7424,
-1520,
2723,
2744,
2054,
288,
-815,
-1578,
-2080,
-3202,
-3062,
1816,
6029,
9112,
8707,
7757,
5286,
930,
-2364,
-4335,
-4361,
-4389,
-3433,
-3840,
-2392,
-2250,
-2424,
-4961,
-6045,
-3802,
-2922,
1079,
5008,
8764,
10867,
10850,
8618,
5168,
-2692,
-9231,
-13012,
-10919,
-4499,
-563,
4790,
7177,
7151,
5726,
-848,
-6351,
-10269,
-14381,
-12411,
-8308,
2541,
10380,
14355,
18728,
18339,
15838,
5457,
-6189,
-13472,
-16195,
-14305,
-11229,
-6196,
-1767,
4594,
12423,
13847,
10889,
1032,
-9493,
-13554,
-11181,
-5204,
-1196,
2013,
4403,
10087,
15058,
15780,
12466,
4286,
-3873,
-8008,
-10005,
-10087,
-9992,
-8846,
-5797,
-6517,
-4536,
-1842,
1172,
5860,
9736,
11464,
10162,
8385,
3151,
815,
1571,
-472,
-2387,
-5208,
-9047,
-9216,
-6795,
-2946,
1113,
4685,
3847,
711,
-2134,
-6041,
-7802,
-7096,
-3894,
768,
5409,
10662,
14966,
16280,
14094,
6657,
-3024,
-11204,
-16919,
-20684,
-20463,
-14097,
-3844,
6548,
12953,
15010,
13771,
8238,
1819,
-1388,
-4947,
-7602,
-9101,
-9091,
-3081,
5713,
14641,
17985,
13419,
4554,
-5315,
-11788,
-13204,
-10338,
-8209,
-7522,
-4407,
333,
6248,
9933,
10077,
9047,
4322,
-2312,
-7599,
-8353,
-2806,
1555,
6433,
8795,
6054,
4020,
1085,
-231,
-1392,
-4212,
-8249,
-13119,
-16160,
-10548,
-3487,
2787,
9100,
10282,
10316,
7713,
6449,
7346,
5465,
3379,
-544,
-3311,
-3365,
-6908,
-10405,
-11609,
-8225,
-2504,
3290,
3476,
1409,
1599,
2211,
7338,
7591,
1694,
-5004,
-8811,
-6421,
2911,
9906,
12352,
12419,
6314,
1483,
-3356,
-8475,
-12235,
-16080,
-17542,
-13907,
-6755,
262,
9809,
16329,
21675,
22335,
10271,
-1446,
-11019,
-15349,
-13854,
-12701,
-7244,
-8,
6742,
13012,
17804,
14499,
7273,
-3667,
-15127,
-19425,
-20722,
-15680,
-7662,
3787,
15203,
19913,
20224,
14776,
7544,
2625,
-5384,
-10247,
-10421,
-10513,
-8656,
-3676,
6437,
12155,
10598,
6303,
-1932,
-8609,
-12586,
-14709,
-9759,
-4241,
1664,
6491,
9903,
13971,
14687,
14153,
9441,
3647,
-1761,
-6864,
-7757,
-6258,
-5518,
-8804,
-10884,
-8687,
-7181,
-3774,
2316,
6370,
12106,
15270,
13378,
10763,
4654,
-222,
-5342,
-9701,
-9434,
-8980,
-7874,
-7,
8783,
12285,
9856,
874,
-5531,
-10984,
-13692,
-14995,
-13323,
-6833,
-32,
10880,
21457,
25872,
22307,
11428,
-1325,
-12255,
-19233,
-19110,
-18203,
-12757,
-1436,
6567,
13282,
16545,
13798,
5759,
-5104,
-11497,
-14328,
-14303,
-10476,
-3365,
4665,
13858,
22825,
21939,
16162,
6105,
-4517,
-10129,
-14222,
-13362,
-12273,
-9017,
-2951,
3016,
8040,
6497,
4048,
527,
-2470,
-3205,
-4457,
-2929,
855,
5383,
10421,
11257,
7502,
2625,
-2169,
-4310,
-5199,
-6384,
-7222,
-5145,
-3622,
-2618,
-1922,
-4879,
-6571,
-6336,
-2614,
3502,
7559,
11725,
13985,
15106,
15676,
9055,
-1764,
-11882,
-20317,
-21470,
-19288,
-14643,
-3771,
8562,
16161,
14699,
9601,
2915,
-2729,
-6095,
-8817,
-10412,
-8803,
-4257,
6462,
19590,
23611,
19936,
10067,
-1597,
-11076,
-18332,
-22609,
-23883,
-17837,
-6016,
5472,
12888,
18279,
17199,
13195,
11405,
1180,
-6259,
-12418,
-16150,
-10805,
-2351,
8462,
14581,
12035,
8262,
4220,
-1688,
-7137,
-12088,
-12077,
-10276,
-5070,
-2340,
-104,
2593,
2671,
4851,
5367,
4641,
3673,
2661,
2832,
6669,
9484,
7161,
253,
-10242,
-13466,
-12497,
-10893,
-4564,
-1943,
-603,
1991,
3910,
7460,
7304,
2642,
-808,
-4742,
-5317,
-3019,
3146,
12085,
16264,
15098,
9957,
563,
-10551,
-16422,
-21022,
-23472,
-17265,
-9684,
-490,
10669,
16547,
22551,
20436,
12307,
2789,
-8707,
-14695,
-14865,
-9276,
-1889,
5677,
10944,
13805,
12775,
5970,
-133,
-8068,
-15609,
-18519,
-19939,
-18123,
-9276,
3479,
15220,
25620,
26845,
20257,
9259,
966,
-5915,
-11972,
-15416,
-15578,
-11263,
-7264,
660,
7541,
11208,
10572,
5390,
-476,
-5504,
-9290,
-9695,
-6082,
1030,
6403,
5621,
1933,
1997,
5565,
8695,
8462,
7134,
4537,
123,
-2504,
-3423,
-2632,
-6274,
-10408,
-12656,
-11239,
-8911,
-2863,
3375,
11026,
17962,
14537,
12152,
5700,
241,
-2696,
-6653,
-5893,
-4827,
-4783,
-2022,
3138,
5938,
6494,
2059,
-6754,
-11698,
-14818,
-14539,
-8263,
-2290,
7356,
18422,
22353,
22085,
16449,
6386,
-3049,
-10005,
-15251,
-20639,
-21246,
-12569,
-100,
11568,
17486,
16368,
9064,
-1281,
-9549,
-13996,
-14428,
-13013,
-9596,
-2918,
8517,
18498,
24691,
22016,
12821,
2800,
-8194,
-16686,
-20908,
-19446,
-15666,
-8483,
1582,
8711,
12122,
11684,
8702,
5610,
2134,
-3636,
-7346,
-7109,
-6593,
-1394,
4000,
8703,
10172,
6660,
2649,
1467,
3019,
2011,
-3535,
-7049,
-8620,
-9561,
-6601,
-6842,
-6984,
-6815,
-3957,
1329,
9062,
13975,
14735,
18911,
18640,
14816,
3397,
-10011,
-18605,
-21033,
-15869,
-8843,
-649,
6305,
9133,
11277,
12179,
7276,
822,
-5688,
-9586,
-11510,
-7634,
-759,
9365,
20458,
20266,
15343,
6538,
-7547,
-17475,
-24392,
-28298,
-25740,
-18003,
-5402,
3887,
14869,
20848,
20864,
16765,
8223,
-1052,
-10937,
-14906,
-12025,
-4913,
2489,
8143,
9164,
11386,
8361,
2258,
-2443,
-9434,
-14792,
-14894,
-11132,
-9103,
-4400,
1541,
7254,
12693,
13109,
10026,
5683,
2797,
-30,
-5620,
-6900,
-4846,
-2661,
-2720,
-3782,
-1146,
1380,
3341,
3702,
3518,
1690,
-3167,
-5222,
-4920,
-2255,
-1621,
-4698,
-3177,
-480,
6232,
13838,
13721,
12959,
11214,
6372,
-107,
-7311,
-13941,
-18367,
-20532,
-15847,
-8977,
-2269,
4876,
12692,
19461,
19843,
13693,
1947,
-4932,
-9093,
-11116,
-9607,
-5391,
-27,
4528,
10559,
14621,
12279,
4666,
-5178,
-16151,
-20386,
-21095,
-19307,
-12653,
-2306,
11552,
22141,
29600,
25866,
15690,
5468,
-5950,
-9788,
-13243,
-16940,
-18221,
-12008,
-1892,
5902,
14146,
12583,
6098,
1810,
-5704,
-9360,
-9765,
-8446,
-5418,
-1872,
6327,
12733,
15447,
15306,
11426,
4308,
-2833,
-10067,
-13572,
-13979,
-11079,
-5426,
-390,
2550,
2704,
3559,
3359,
5409,
6691,
4603,
889,
-248,
-1490,
-427,
1372,
2954,
3438,
1480,
1114,
3097,
3494,
1638,
1057,
-3642,
-5197,
-4857,
-6189,
-10034,
-10331,
-6725,
-1928,
5019,
10010,
14254,
15807,
14126,
12489,
6358,
-3436,
-11523,
-19033,
-18562,
-13247,
-5951,
631,
6189,
8550,
8920,
5831,
-1076,
-4015,
-8181,
-10399,
-8919,
-4478,
3426,
11325,
18345,
22540,
17296,
6411,
-4003,
-13729,
-16805,
-18531,
-20199,
-15118,
-6804,
3823,
10186,
15025,
17754,
14222,
7446,
-669,
-5709,
-8419,
-9347,
-8073,
-2357,
4323,
9548,
8461,
7335,
6386,
2723,
-1812,
-8133,
-10226,
-9555,
-8584,
-8026,
-4586,
543,
3769,
7513,
10582,
9712,
8603,
5048,
2538,
2436,
1587,
-185,
-5532,
-9428,
-10185,
-8575,
-4847,
147,
4347,
6146,
5200,
4493,
3591,
-711,
-5444,
-9872,
-12458,
-9687,
-5326,
5399,
17700,
21065,
22525,
17864,
4508,
-8358,
-19514,
-24810,
-23466,
-18753,
-11624,
-3231,
6021,
13045,
19066,
19566,
15591,
7280,
-5087,
-13438,
-16172,
-11161,
-4616,
2530,
9605,
13090,
13136,
9918,
3856,
-6049,
-13893,
-17346,
-17242,
-16204,
-10024,
-2217,
7666,
18973,
19579,
16771,
8436,
1679,
-1776,
-5850,
-6208,
-5720,
-4445,
-6356,
-3508,
474,
1002,
5022,
4857,
1278,
-1932,
-8233,
-9102,
-6206,
-1730,
1761,
2048,
5241,
5448,
5615,
7574,
8707,
7493,
4298,
-1286,
-6599,
-7712,
-9264,
-9704,
-6062,
-3205,
-915,
1880,
5107,
8740,
11769,
10686,
4935,
-1766,
-7478,
-11758,
-12690,
-6342,
85,
5917,
12361,
16552,
16156,
12343,
3936,
-5177,
-12580,
-20565,
-23088,
-21885,
-13821,
-3744,
6923,
20560,
24326,
23804,
16949,
3600,
-2776,
-8781,
-11849,
-13375,
-13363,
-8254,
-1121,
7275,
12935,
12161,
5447,
-1763,
-9906,
-13108,
-14573,
-13266,
-7798,
-2255,
7717,
14881,
17161,
15880,
11492,
5867,
-1181,
-6813,
-9572,
-12169,
-12154,
-8200,
-3667,
370,
2985,
2042,
2927,
2863,
616,
719,
745,
-464,
344,
3316,
4798,
7043,
5780,
1414,
-1838,
-799,
-1377,
-4215,
-6227,
-6192,
-3311,
898,
3551,
-712,
-4198,
-5690,
-2309,
3542,
7306,
6442,
4116,
1970,
905,
2851,
694,
-1815,
-2836,
-3337,
-3386,
13,
2331,
4417,
6584,
3307,
-1175,
-8147,
-12566,
-11531,
-10969,
-4655,
3126,
6990,
10148,
13438,
19243,
18652,
11150,
2259,
-8034,
-17125,
-21079,
-19806,
-12744,
-5748,
2738,
7316,
8174,
8946,
6292,
5931,
1178,
-2304,
-3394,
-4532,
-5330,
-2591,
5459,
10132,
13389,
11676,
3917,
-2493,
-9554,
-13306,
-13216,
-11789,
-6603,
-2620,
-1441,
3023,
9113,
11018,
11447,
7703,
3560,
-90,
-3300,
-2387,
-1524,
699,
945,
-1357,
-3788,
-5042,
-2765,
22,
782,
823,
1196,
-156,
-1160,
1425,
2892,
-123,
-2473,
-3116,
-719,
1062,
3021,
8151,
8941,
8334,
6042,
626,
-5396,
-10722,
-11632,
-10448,
-7320,
-2224,
3593,
6565,
6189,
7573,
5073,
632,
-3083,
-8161,
-11328,
-10046,
-3250,
6898,
14315,
18752,
20611,
13332,
2750,
-8715,
-18728,
-21587,
-23432,
-20536,
-14564,
-5754,
4981,
14228,
23659,
23811,
17412,
7993,
-2596,
-8373,
-10610,
-10858,
-7358,
-3047,
3227,
7915,
6914,
4087,
-594,
-5209,
-6206,
-8009,
-9675,
-9243,
-7751,
-414,
10372,
15324,
13261,
10936,
6018,
3286,
945,
-1949,
-3633,
-4897,
-6209,
-6186,
-6199,
-8877,
-8142,
-4676,
1313,
5518,
5836,
3864,
2203,
3715,
6379,
4887,
1025,
-2186,
-7157,
-8343,
-2923,
2963,
7525,
6720,
4837,
1793,
-2520,
-5681,
-10112,
-10386,
-10832,
-9337,
-5089,
1204,
10455,
16184,
19070,
16172,
6791,
-3373,
-12297,
-13453,
-11199,
-6200,
11,
4389,
8074,
9963,
11209,
6324,
-974,
-9539,
-18621,
-22676,
-20928,
-13947,
1009,
13858,
24318,
29914,
24045,
15195,
5687,
-2605,
-10863,
-16743,
-20413,
-19973,
-13156,
-3430,
5064,
10687,
11837,
9575,
3631,
-356,
-5258,
-6572,
-3266,
-911,
3496,
6198,
8177,
8031,
8078,
5524,
2761,
-3219,
-9245,
-14274,
-14880,
-8795,
-4031,
-2186,
-850,
-416,
-654,
2860,
6265,
10417,
9550,
9029,
7658,
5477,
4914,
291,
-5540,
-10126,
-12070,
-10710,
-8099,
-1874,
4228,
7790,
9996,
5406,
720,
-5361,
-9484,
-8739,
-6573,
-1331,
3128,
6342,
12379,
14607,
15553,
14045,
4959,
-5495,
-13901,
-16567,
-18142,
-15256,
-8627,
-480,
9253,
13143,
12529,
8451,
872,
-4497,
-6913,
-7060,
-5059,
-2559,
310,
7324,
19983,
24686,
15709,
2040,
-8787,
-15180,
-19319,
-22375,
-20669,
-15770,
-8676,
2322,
11193,
20255,
21300,
17249,
11623,
3228,
-817,
-6333,
-9708,
-9423,
-5392,
698,
4394,
4816,
3064,
-141,
-4123,
-6560,
-7766,
-10571,
-12568,
-7997,
-1416,
6105,
11369,
13172,
14377,
11931,
9909,
7686,
3129,
-3323,
-8238,
-8087,
-8546,
-9007,
-8892,
-9088,
-7602,
-4656,
976,
7186,
9949,
9371,
6346,
4462,
5061,
2197,
-2812,
-6971,
-9903,
-6326,
-1251,
5631,
12254,
14054,
11243,
3957,
-3051,
-10692,
-17702,
-22050,
-20120,
-10233,
-352,
6892,
14943,
19464,
21170,
15541,
6499,
-649,
-9798,
-14918,
-15390,
-9204,
-39,
7785,
11688,
10984,
7494,
990,
-5861,
-13706,
-16689,
-17066,
-15885,
-10459,
789,
13142,
22160,
26677,
21586,
14223,
3122,
-8190,
-12304,
-14441,
-14792,
-10625,
-5655,
-982,
4114,
6551,
5977,
3720,
-581,
-5135,
-10712,
-10731,
-6816,
316,
8141,
12890,
15800,
13666,
10463,
5352,
1529,
-6141,
-13237,
-16562,
-15486,
-10623,
-7272,
-2348,
777,
4703,
8693,
8469,
8284,
5041,
1591,
1073,
242,
1602,
455,
-4875,
-7258,
-5755,
-1322,
2533,
4063,
5000,
3973,
3535,
-844,
-3622,
-6917,
-9345,
-9289,
-8449,
-3456,
375,
5857,
13407,
18620,
17741,
11690,
1221,
-6035,
-9259,
-13466,
-14375,
-10115,
-6481,
-215,
8592,
11025,
11472,
8998,
-507,
-8201,
-14278,
-17995,
-15838,
-8631,
3707,
14298,
22055,
24364,
19820,
12226,
1222,
-9685,
-17164,
-20844,
-18818,
-16198,
-10572,
-363,
9804,
18109,
18614,
12333,
3547,
-4931,
-8186,
-6977,
-6168,
-6536,
-1862,
5185,
10895,
16907,
14497,
8139,
1176,
-8160,
-14514,
-17335,
-16278,
-11954,
-3167,
5109,
11642,
13413,
9200,
8326,
7929,
5878,
3051,
-1928,
-6217,
-8765,
-7449,
-2505,
3106,
6396,
4142,
465,
140,
1783,
1487,
-378,
-2095,
-3931,
-4447,
-6730,
-8118,
-4271,
-79,
3228,
8436,
9141,
6657,
6145,
5339,
5281,
2374,
-5662,
-14399,
-17444,
-13157,
-6029,
1332,
7588,
11975,
9626,
3066,
-1589,
-5478,
-7331,
-8805,
-8931,
-3145,
2194,
11001,
20464,
21782,
20819,
8757,
-7203,
-17929,
-24753,
-24258,
-20953,
-10852,
-465,
7660,
15470,
18259,
19598,
14047,
5134,
-3077,
-11718,
-15774,
-15232,
-8354,
1638,
11383,
15910,
15585,
10628,
3012,
-5030,
-11856,
-13653,
-15117,
-15996,
-13934,
-3714,
6585,
15714,
20973,
17132,
11705,
2220,
-4602,
-6354,
-6125,
-6884,
-8178,
-4052,
-1562,
-924,
1676,
3739,
6645,
3986,
-1001,
-4533,
-6222,
-6297,
-3547,
329,
1236,
1352,
-2027,
-2852,
893,
8933,
12015,
9716,
6783,
3654,
662,
-5297,
-9973,
-13639,
-14068,
-12046,
-7321,
-802,
4282,
7496,
10935,
12465,
7535,
-429,
-7367,
-10236,
-7395,
946,
6375,
10199,
12819,
8741,
6463,
1021,
-6092,
-13358,
-22830,
-24552,
-20366,
-9082,
5206,
17036,
24908,
23927,
18331,
9148,
-330,
-8249,
-14654,
-17298,
-12803,
-5268,
1570,
8944,
14178,
15132,
10184,
2638,
-8684,
-17104,
-18412,
-16268,
-12243,
-5515,
4035,
12761,
20213,
22488,
18261,
11354,
2040,
-7480,
-13181,
-17244,
-16328,
-10137,
-2511,
3983,
7833,
9321,
8644,
6733,
3443,
-1678,
-6687,
-8858,
-6532,
-2594,
255,
1590,
3243,
6015,
6666,
6738,
5934,
4615,
3541,
516,
-2433,
-5105,
-6676,
-8146,
-9368,
-7216,
-5855,
-4786,
-1826,
2936,
8198,
12216,
11327,
8140,
4598,
-1164,
-5666,
-7078,
-4867,
-2227,
1469,
3274,
5266,
3009,
-665,
-4063,
-11524,
-14133,
-17563,
-15667,
-6627,
1720,
12759,
22930,
26230,
23897,
17961,
5779,
-7921,
-15896,
-20785,
-20645,
-16263,
-11013,
339,
11155,
18867,
20197,
10336,
-319,
-10244,
-15077,
-15829,
-13616,
-5439,
4296,
13749,
22482,
27691,
21641,
11217,
-1064,
-13308,
-21113,
-23078,
-21170,
-14972,
-4343,
6158,
15068,
17793,
14331,
8209,
2793,
-3172,
-6929,
-7375,
-7745,
-7028,
-2230,
2690,
10405,
14856,
10783,
5873,
-1103,
-4475,
-5114,
-6456,
-9193,
-9516,
-8837,
-7598,
-4484,
-1669,
2194,
4445,
6585,
8858,
7656,
6333,
6712,
7364,
6855,
2504,
-6366,
-14854,
-15089,
-10825,
-1834,
5114,
3327,
1563,
-1871,
-7178,
-5387,
-3417,
-3861,
-1272,
1076,
5997,
9762,
16050,
20754,
17132,
10171,
-1307,
-12537,
-20695,
-25769,
-24283,
-16269,
-4489,
5777,
12515,
15517,
13576,
11474,
6550,
158,
-5764,
-12999,
-15129,
-10654,
1516,
14819,
21220,
21036,
13561,
3632,
-7410,
-15408,
-18588,
-19684,
-16116,
-11949,
-5515,
4501,
11843,
15595,
19538,
15949,
9392,
-753,
-9747,
-8761,
-7646,
-3911,
694,
2581,
3145,
4188,
5075,
4943,
2063,
-4072,
-10257,
-11290,
-10855,
-9659,
-7569,
-3484,
2326,
8980,
12600,
11698,
13121,
11315,
9471,
6242,
903,
-3957,
-9543,
-14978,
-16851,
-14423,
-7879,
-3342,
-342,
2625,
3493,
3261,
5572,
6732,
3248,
3530,
2200,
1190,
1391,
2048,
3423,
6883,
6781,
4181,
-1099,
-8732,
-12319,
-14505,
-11743,
-8746,
-6642,
-2866,
1864,
7067,
13982,
17917,
16782,
12148,
3919,
-5320,
-8846,
-11081,
-10681,
-4285,
973,
4175,
7149,
5633,
4189,
2933,
-2801,
-6433,
-10204,
-13501,
-14743,
-9473,
-676,
10137,
19971,
22739,
19681,
10380,
3847,
-2472,
-8147,
-9384,
-13352,
-16735,
-16719,
-8503,
3677,
10497,
13621,
9976,
3021,
-2936,
-8465,
-10305,
-7835,
-2918,
1810,
3296,
4007,
8372,
14269,
16721,
13827,
7073,
-3956,
-15073,
-20755,
-20907,
-13316,
-6981,
-3151,
-1382,
680,
3316,
6533,
10874,
12525,
10809,
7871,
4908,
-1431,
-1527,
-2018,
-3799,
-5219,
-7430,
-6370,
-3900,
-704,
546,
3379,
1901,
-685,
-621,
-4317,
-6586,
-5606,
-4457,
826,
6799,
10281,
13250,
11137,
11484,
10108,
93,
-7341,
-14726,
-19199,
-16368,
-11487,
-5212,
4475,
10977,
13429,
12841,
7168,
392,
-4765,
-10183,
-11668,
-4876,
2836,
8650,
12567,
14966,
14104,
7498,
242,
-8334,
-16439,
-19220,
-18853,
-13334,
-5046,
3888,
10849,
13974,
18149,
14497,
7246,
183,
-8033,
-8095,
-8986,
-8273,
-4130,
1102,
8591,
12159,
12589,
7910,
-876,
-9709,
-15681,
-16752,
-11620,
-8544,
-5051,
394,
4651,
6652,
9350,
13713,
13063,
10852,
4823,
-1426,
-8497,
-9483,
-6514,
-5913,
-2943,
-3934,
-3863,
-3144,
-2520,
3448,
8302,
9167,
7675,
875,
-3975,
-4676,
-4078,
-2943,
-3216,
-2146,
2442,
6023,
10430,
14003,
13339,
10477,
1856,
-9473,
-15785,
-19918,
-21312,
-15073,
-5165,
6747,
13644,
14915,
14423,
12523,
8370,
3152,
-3365,
-8330,
-12920,
-14327,
-9391,
-451,
11146,
13726,
11823,
7720,
1021,
-6517,
-11614,
-11620,
-7785,
-6108,
-5998,
-2149,
5159,
13651,
14857,
13329,
9465,
1413,
-5949,
-12001,
-9608,
-3707,
-1535,
-864,
-1773,
-933,
2213,
2587,
4189,
5739,
1898,
-3237,
-8194,
-8975,
-6442,
-1503,
1573,
1467,
1884,
2836,
5018,
7919,
7905,
6968,
4439,
-1345,
-7129,
-13633,
-14651,
-12627,
-8007,
-2661,
2228,
7872,
14130,
14341,
10173,
5324,
-1710,
-7364,
-12665,
-13044,
-8588,
-794,
7367,
15993,
19532,
14466,
5396,
-5260,
-14389,
-16833,
-18380,
-19473,
-13684,
-4084,
6157,
12886,
21269,
25111,
21382,
10700,
-2583,
-9788,
-16053,
-17177,
-15093,
-11041,
-2072,
4407,
10696,
14070,
12614,
9721,
4803,
-1106,
-6658,
-11247,
-11985,
-10178,
-4749,
900,
5455,
9766,
9502,
7177,
4398,
3156,
1264,
268,
-2779,
-6476,
-6911,
-6950,
-6548,
-3797,
-714,
847,
1963,
2137,
625,
-538,
2463,
3482,
1463,
-2770,
-6104,
-8057,
-2853,
6239,
10489,
11093,
7681,
3879,
1311,
-5905,
-13385,
-16282,
-18572,
-14901,
-7855,
698,
7279,
16254,
22580,
19431,
16366,
5775,
-6141,
-12086,
-15189,
-12960,
-8740,
-5811,
-222,
7832,
14705,
16023,
8036,
-462,
-8012,
-13523,
-12738,
-10418,
-8723,
-1284,
9168,
16366,
21389,
18142,
11098,
4711,
-4611,
-11290,
-15423,
-16075,
-13049,
-9873,
-1105,
6617,
14162,
14290,
8551,
3859,
-1474,
-2788,
-3633,
-5198,
-6231,
-5803,
-4932,
-285,
6587,
10213,
8014,
5289,
3216,
1157,
-1628,
-5904,
-7820,
-7236,
-7377,
-8178,
-7536,
-5854,
-2113,
2540,
7714,
12046,
13374,
12054,
8978,
6740,
4057,
-4282,
-12856,
-16819,
-16082,
-8782,
599,
8042,
12212,
9265,
5587,
-1450,
-7601,
-10723,
-14186,
-11323,
-3925,
3137,
12571,
21144,
22335,
20647,
11062,
-1985,
-12576,
-19499,
-23488,
-22682,
-16897,
-7769,
3934,
12668,
19571,
20224,
13442,
5849,
-3139,
-11620,
-14136,
-14642,
-9248,
-1928,
7509,
15502,
17782,
16504,
8165,
-739,
-9705,
-16105,
-18328,
-19500,
-15779,
-6352,
2490,
12565,
17880,
14844,
13444,
10729,
4716,
142,
-7114,
-13184,
-13915,
-10889,
-4489,
2620,
7753,
7853,
7550,
6270,
1998,
-2958,
-6252,
-9045,
-7888,
-6202,
-5841,
-5881,
-3341,
4633,
10781,
15732,
15862,
8298,
4803,
3525,
-74,
-2945,
-9813,
-16295,
-18377,
-15396,
-8314,
1387,
9840,
12740,
12208,
9418,
5504,
-111,
-5002,
-7439,
-9222,
-7233,
-3212,
850,
8003,
13911,
17350,
14679,
4106,
-6788,
-15691,
-20634,
-19108,
-14286,
-6187,
1250,
6764,
14358,
19539,
17424,
13147,
6270,
-4238,
-11689,
-13475,
-10097,
-6005,
-227,
6155,
7129,
7084,
5752,
782,
-2307,
-6860,
-10084,
-9239,
-11034,
-6861,
-372,
6487,
17022,
19380,
16337,
9220,
-574,
-4065,
-5401,
-7771,
-8235,
-8332,
-8594,
-7993,
-4237,
96,
5019,
8981,
8466,
5802,
1900,
174,
-2348,
-1219,
-1629,
-3518,
-3060,
-4452,
-3661,
2912,
9338,
10441,
10596,
7230,
-132,
-5511,
-9944,
-13594,
-11988,
-10449,
-6185,
-2506,
2684,
12778,
16229,
14613,
10699,
2615,
-4615,
-11643,
-14896,
-11361,
-5152,
1713,
6225,
10463,
11609,
11970,
7444,
-2251,
-8866,
-13977,
-17313,
-16387,
-12522,
-4610,
4970,
14031,
20018,
19406,
13513,
6712,
-127,
-5529,
-11842,
-13255,
-12161,
-11982,
-3408,
4378,
11663,
12256,
6779,
1420,
-4620,
-7415,
-8909,
-9585,
-5255,
692,
7634,
14881,
15545,
13373,
6915,
-922,
-5674,
-9283,
-14278,
-16659,
-14615,
-6148,
2194,
7652,
9530,
8477,
7404,
4196,
1872,
-155,
-2236,
-6135,
-6202,
-4113,
-188,
2320,
2018,
1566,
4672,
6106,
3110,
-1337,
-5202,
-3356,
-1641,
97,
-3844,
-7610,
-8935,
-7222,
-3258,
3238,
6226,
7453,
9700,
8534,
8886,
3804,
-2387,
-7862,
-11094,
-11106,
-8533,
-2253,
4720,
8765,
9505,
5581,
66,
-3134,
-7057,
-10128,
-12287,
-7492,
593,
8637,
16004,
19419,
20349,
13665,
4514,
-3678,
-14906,
-20762,
-23682,
-21264,
-10162,
1741,
12524,
17196,
17652,
13289,
5069,
-1964,
-8499,
-11043,
-11587,
-9189,
-3055,
4771,
14359,
18682,
14955,
6420,
-1749,
-9620,
-17179,
-20665,
-16364,
-9547,
-1009,
7456,
11725,
16455,
15609,
13501,
7783,
-1720,
-9594,
-15115,
-16120,
-11781,
-4583,
3167,
10437,
13009,
12436,
9620,
4104,
-1938,
-6712,
-9012,
-11259,
-11750,
-10870,
-9644,
-2992,
5070,
9582,
11826,
12097,
7388,
4397,
3484,
5316,
5773,
2810,
-3578,
-12890,
-15089,
-13299,
-9705,
-2487,
2961,
4094,
6208,
5758,
6104,
6235,
6,
-4352,
-4028,
-6939,
-5924,
-1322,
6535,
15176,
16168,
12730,
3283,
-9251,
-14560,
-18261,
-18852,
-14226,
-8241,
-216,
5888,
14777,
18964,
20872,
16130,
6828,
-3189,
-13948,
-17295,
-14351,
-7948,
647,
7943,
10252,
11812,
5991,
-140,
-2616,
-6320,
-9985,
-11920,
-10514,
-7398,
-1154,
11439,
19220,
21575,
15973,
2947,
-5266,
-9931,
-11648,
-10416,
-6887,
-6313,
-3877,
1633,
7623,
12313,
12203,
6813,
-2213,
-7262,
-9959,
-13121,
-11605,
-4835,
1152,
5710,
7353,
7309,
9718,
12213,
11084,
7594,
1870,
-6935,
-14239,
-15251,
-10009,
-5061,
-4101,
-3693,
-3395,
-500,
3747,
7134,
10480,
11724,
9855,
5255,
-895,
-4497,
-5777,
-6098,
-5626,
-4850,
-2106,
2653,
7567,
8055,
6080,
-66,
-6378,
-8197,
-10914,
-13705,
-11827,
-4104,
6766,
16231,
20454,
18709,
12747,
8554,
-54,
-8340,
-13212,
-18688,
-19593,
-14331,
-4881,
4476,
9315,
12618,
12069,
7766,
2430,
-6278,
-9835,
-8375,
-6247,
-3504,
553,
6339,
13651,
14367,
10061,
5174,
-1429,
-8733,
-13903,
-14305,
-13004,
-9543,
-4553,
1592,
6076,
8278,
9275,
9473,
6746,
1975,
-2260,
-4972,
-4920,
-1065,
2427,
3625,
2727,
1886,
2696,
2770,
-941,
-5360,
-8502,
-10402,
-7093,
-2255,
1125,
-747,
-957,
1411,
4839,
8604,
9448,
7171,
7847,
9761,
5746,
-373,
-8707,
-13628,
-14883,
-13435,
-9750,
-4878,
942,
8110,
11504,
14116,
10143,
1576,
-3489,
-8489,
-10698,
-9808,
-5312,
-462,
7019,
15101,
18306,
14946,
6781,
-2951,
-10846,
-18326,
-22412,
-21788,
-15111,
-4111,
6366,
13672,
18149,
19398,
14530,
6979,
-1482,
-6536,
-9237,
-10020,
-10081,
-3012,
3082,
7817,
12598,
8147,
2653,
-3279,
-9687,
-10848,
-11295,
-9161,
-5031,
-1569,
4217,
10422,
14130,
14056,
11856,
6108,
419,
-6176,
-8531,
-8854,
-6657,
-4439,
-5679,
-4350,
-930,
2658,
5310,
6472,
2173,
-1541,
-3861,
-2773,
876,
1040,
-2481,
-4483,
-3105,
179,
6124,
11295,
11626,
10274,
4531,
-387,
-6059,
-12642,
-12972,
-14554,
-12464,
-7694,
-3770,
3012,
11559,
18337,
18928,
12433,
3801,
-3814,
-9461,
-11492,
-8959,
-4516,
-1909,
1932,
7378,
11214,
11572,
6771,
-383,
-7981,
-13869,
-16081,
-17196,
-11850,
-4433,
4533,
12723,
17111,
18975,
14626,
9299,
3535,
-259,
-4217,
-8231,
-13763,
-15364,
-10485,
-2539,
4966,
4643,
3943,
2188,
1372,
1617,
-163,
-2705,
755,
3973,
5791,
7035,
2531,
-387,
519,
259,
-1442,
-4520,
-6715,
-4697,
-3196,
2213,
2748,
-1325,
-3932,
-4638,
-2592,
2856,
4401,
1605,
1988,
478,
2478,
1460,
-1659,
-4309,
-4842,
-1923,
2227,
6953,
8593,
6838,
4031,
2365,
-3391,
-8126,
-12438,
-17998,
-17283,
-11724,
-3850,
6729,
15359,
20834,
21881,
17122,
9867,
1804,
-5621,
-14597,
-18958,
-15881,
-9835,
-2196,
4492,
9608,
10402,
9167,
3378,
-4818,
-9545,
-11940,
-10773,
-6878,
-631,
7713,
16473,
19130,
18726,
13158,
5363,
-1586,
-9460,
-14221,
-16655,
-16508,
-13230,
-7736,
-491,
6212,
9485,
7789,
6321,
6679,
6822,
6814,
3570,
2422,
2372,
-903,
-6148,
-6950,
-7177,
-5110,
201,
388,
2007,
4717,
5129,
4406,
161,
-5348,
-9923,
-12703,
-11654,
-5609,
2867,
8168,
13263,
13137,
12812,
9953,
2108,
-3108,
-11861,
-16282,
-13787,
-9735,
-2398,
6516,
10756,
12063,
7550,
-324,
-6020,
-14084,
-16360,
-13303,
-6778,
388,
8182,
17483,
24802,
26390,
17841,
6469,
-6081,
-17652,
-23211,
-25308,
-19581,
-10011,
-906,
5560,
9742,
14515,
12089,
8122,
2722,
-2177,
-4401,
-6348,
-5782,
-1025,
6580,
12172,
13771,
9114,
1561,
-4913,
-9539,
-12854,
-14016,
-12468,
-10004,
-7119,
-1168,
4259,
8839,
13035,
13015,
9490,
4731,
-599,
-3118,
-1986,
162,
1153,
-553,
-3916,
-5758,
-5362,
-2413,
910,
1106,
-11,
-1379,
-1243,
-430,
-168,
-2205,
-3361,
-3001,
-2046,
3332,
6995,
11069,
14214,
11300,
7800,
207,
-8939,
-14030,
-17390,
-16102,
-11943,
-5234,
3365,
10175,
14738,
14439,
7645,
-649,
-8071,
-14117,
-13622,
-9626,
-4294,
5140,
16899,
23864,
24614,
18568,
4514,
-5873,
-17127,
-26132,
-26823,
-24470,
-15802,
-5077,
5805,
15802,
21932,
20211,
13481,
5852,
-708,
-5658,
-7790,
-6603,
-5554,
-1753,
2517,
8167,
10330,
4884,
-2731,
-9858,
-11802,
-9954,
-8802,
-8029,
-4209,
1164,
7195,
11842,
10931,
8997,
6228,
5477,
5391,
2261,
241,
179,
-2484,
-3169,
-4837,
-9309,
-10330,
-10006,
-5010,
-247,
2812,
2200,
2915,
6204,
8473,
10139,
7811,
1184,
-3286,
-2584,
-1488,
2154,
2577,
3239,
3042,
676,
-2341,
-8684,
-11807,
-12323,
-11194,
-6315,
-1473,
4687,
12192,
14422,
15458,
12722,
2966,
-5964,
-13767,
-14845,
-10865,
-6388,
1718,
9412,
15327,
18094,
12430,
2377,
-4699,
-12225,
-19802,
-22752,
-21772,
-16994,
-4611,
11088,
23253,
29144,
24229,
15619,
8206,
-293,
-6798,
-11997,
-15352,
-15263,
-11442,
-5280,
480,
5021,
6346,
5285,
2210,
-1658,
-5681,
-7370,
-5664,
-810,
5031,
8738,
9633,
9503,
8230,
6650,
5679,
1013,
-3768,
-9715,
-13458,
-11977,
-9375,
-8437,
-8184,
-5885,
-3624,
2344,
9962,
14768,
14992,
13896,
11038,
7466,
2500,
-4504,
-10952,
-14483,
-12081,
-9067,
-3794,
2010,
7172,
10064,
10397,
4940,
-3380,
-7487,
-12053,
-12159,
-5242,
1733,
8866,
14940,
16818,
16552,
11349,
3190,
-5578,
-13389,
-18453,
-19109,
-13025,
-5115,
3359,
13040,
16181,
15742,
8968,
-621,
-7268,
-13634,
-14773,
-13898,
-11556,
-5461,
7177,
18636,
25408,
24756,
16146,
2793,
-9221,
-16632,
-21537,
-21794,
-19770,
-15309,
-9494,
27,
8757,
16141,
17480,
14335,
8659,
762,
-5017,
-7382,
-3711,
716,
4735,
5576,
3881,
112,
-1762,
-2886,
-3774,
-7493,
-13054,
-12474,
-9499,
-3687,
3195,
6581,
8660,
9920,
9162,
8437,
6434,
6845,
6257,
5048,
3468,
-2627,
-11120,
-15249,
-16524,
-12610,
-4895,
-593,
4564,
6507,
10164,
10532,
8375,
5989,
-1002,
-7901,
-12261,
-10633,
-3899,
3478,
9415,
14032,
11499,
7932,
1918,
-6244,
-10469,
-14848,
-15606,
-13707,
-11211,
-3329,
6293,
14415,
18624,
14232,
5659,
-5136,
-11923,
-12728,
-9467,
-4725,
362,
7895,
14305,
18461,
17201,
9670,
-2386,
-13200,
-19275,
-20738,
-19577,
-15139,
-6822,
5074,
16652,
23176,
21862,
15772,
10008,
5043,
1100,
-5784,
-11614,
-11424,
-8834,
-4602,
1163,
3218,
3042,
868,
-2017,
-4635,
-5551,
-5340,
-3525,
2975,
7524,
7330,
4921,
2757,
3073,
5071,
4873,
1569,
-2761,
-1991,
-2286,
-196,
-866,
-6267,
-8103,
-11668,
-10739,
-5850,
-477,
4482,
10689,
12344,
10738,
6464,
-1478,
-4867,
-7411,
-9274,
-7276,
-3152,
2596,
9490,
13209,
15403,
10474,
-343,
-7803,
-15590,
-18571,
-18241,
-15244,
-6473,
5548,
19262,
24601,
25057,
16777,
4319,
-4571,
-12041,
-12825,
-14095,
-13767,
-6858,
2889,
11010,
14677,
10721,
3849,
-3781,
-10299,
-12514,
-12259,
-7808,
-4562,
-608,
6793,
14617,
17597,
14766,
10452,
3112,
-3489,
-8276,
-14259,
-16217,
-12899,
-7330,
1368,
7855,
7324,
5381,
179,
-2220,
1974,
3051,
1248,
-422,
-1611,
-562,
2012,
2807,
2030,
-149,
-1766,
-289,
1425,
612,
235,
-484,
547,
-132,
-6269,
-10909,
-10626,
-6316,
1088,
6245,
9946,
9902,
8208,
10997,
8159,
2473,
-4373,
-10546,
-14409,
-13167,
-5846,
-394,
7613,
12625,
9884,
4513,
-4582,
-8672,
-12348,
-13591,
-11118,
-6721,
470,
8450,
19929,
22819,
20665,
12982,
2865,
-8527,
-18517,
-22123,
-23775,
-17996,
-8370,
2914,
11124,
16130,
16989,
13318,
10471,
3657,
-4198,
-11844,
-17384,
-14940,
-5513,
4421,
11654,
14659,
11612,
7081,
3545,
-778,
-5179,
-7435,
-10286,
-11584,
-7782,
-4791,
262,
3981,
4954,
7180,
4910,
2723,
257,
196,
3012,
5003,
5585,
2069,
-4365,
-6830,
-5342,
-1641,
675,
-350,
-3053,
-3922,
-2156,
-1209,
244,
-1320,
-2337,
-4826,
-3856,
895,
5416,
10951,
13723,
14573,
11137,
1364,
-7258,
-9761,
-11586,
-14148,
-13516,
-10162,
-4378,
3659,
9582,
12713,
10496,
5291,
-1104,
-6726,
-8783,
-7136,
-2798,
3165,
10733,
14722,
17102,
11513,
2883,
-3977,
-12482,
-18478,
-20333,
-17131,
-14749,
-3943,
7202,
15203,
24419,
22173,
14359,
5579,
-4790,
-10850,
-13947,
-14633,
-11403,
-5419,
1939,
7743,
11557,
11476,
9029,
4720,
-1960,
-8953,
-13942,
-14355,
-12281,
-9165,
-419,
4442,
6467,
9807,
10154,
13007,
12562,
7840,
3948,
1280,
-1067,
-3177,
-7419,
-11312,
-10512,
-8885,
-8025,
-4778,
-1417,
-224,
5113,
9695,
11564,
9642,
4735,
-255,
-3396,
-797,
159,
1418,
4260,
8425,
10145,
8548,
2217,
-8724,
-15635,
-19883,
-21455,
-17962,
-12858,
-4032,
9863,
21909,
29209,
26478,
17325,
5772,
-3799,
-10761,
-16546,
-16941,
-13968,
-7211,
1503,
7543,
11290,
9222,
3075,
-3562,
-12185,
-14595,
-14048,
-10875,
-2891,
4325,
13859,
20061,
19430,
16793,
8070,
-2072,
-7756,
-12365,
-13700,
-11973,
-6936,
-111,
6163,
8038,
4956,
745,
-3060,
-5086,
-6555,
-6508,
-5185,
-371,
6613,
10593,
11952,
11478,
7444,
4676,
1885,
18,
-1661,
-3753,
-4626,
-6511,
-5851,
-6482,
-10354,
-15741,
-15231,
-11212,
-3805,
5757,
14802,
22311,
22820,
20886,
16660,
6160,
-6093,
-16283,
-22891,
-20917,
-12765,
-4868,
3083,
8199,
9360,
6972,
-1508,
-7455,
-10355,
-10213,
-9709,
-5585,
4422,
13968,
21871,
26829,
25029,
13663,
387,
-12548,
-20261,
-22415,
-21846,
-18152,
-12313,
-1567,
7508,
13241,
15669,
11372,
5756,
-141,
-5847,
-7179,
-6767,
-4364,
3311,
9994,
13906,
12732,
7487,
2640,
-2808,
-7143,
-11103,
-15112,
-15139,
-11591,
-4797,
1595,
981,
1262,
1866,
4069,
9474,
9991,
8261,
7181,
7537,
6671,
3173,
-891,
-6894,
-13223,
-12003,
-9503,
-5835,
-532,
199,
1633,
3997,
4418,
650,
-6467,
-10533,
-10012,
-7038,
1516,
10157,
21180,
29062,
25803,
19221,
7439,
-8967,
-20292,
-28221,
-30882,
-27614,
-20449,
-7769,
6761,
17753,
24617,
26793,
18252,
9222,
-1567,
-9356,
-10590,
-9769,
-5844,
-2273,
3451,
9987,
12549,
11376,
5473,
-5700,
-16434,
-23661,
-19745,
-11570,
-5174,
169,
4912,
12931,
15114,
13280,
9540,
3653,
2711,
1951,
-1257,
-2733,
-1281,
-1299,
-1555,
-3371,
-5901,
-8794,
-11511,
-8431,
-4296,
-1547,
367,
1809,
4580,
8448,
7663,
6903,
5341,
3304,
3645,
4846,
4680,
4478,
2292,
-1238,
-5037,
-11026,
-14372,
-16623,
-13264,
-7404,
53,
2748,
8147,
15609,
17104,
16307,
8485,
-682,
-5061,
-8674,
-8335,
-5383,
-3090,
5422,
10324,
13591,
11198,
380,
-9310,
-15421,
-17556,
-16809,
-14517,
-11719,
-4150,
8596,
20526,
29040,
28238,
19930,
8816,
-3586,
-11506,
-15564,
-16451,
-17123,
-13198,
-4387,
3407,
10178,
12861,
10228,
6553,
-551,
-6256,
-11313,
-14189,
-9475,
-2791,
7826,
14977,
15316,
11475,
8801,
7056,
2281,
-3283,
-9117,
-13773,
-14398,
-9529,
-4691,
-3180,
-2423,
-942,
-797,
3469,
6650,
7176,
8261,
9356,
10420,
7819,
2936,
-3227,
-9446,
-12252,
-9805,
-6432,
-2007,
2171,
4150,
4258,
2444,
-541,
-2948,
-7184,
-9028,
-7787,
-3993,
3944,
13930,
20899,
21815,
13852,
3971,
-2632,
-10530,
-15269,
-19738,
-19029,
-13526,
-1557,
9119,
16469,
20460,
13825,
5292,
-826,
-9661,
-14745,
-15609,
-14913,
-5236,
3966,
11504,
16831,
20010,
16829,
8142,
-4453,
-14371,
-16399,
-16416,
-13536,
-7562,
-617,
4665,
9443,
10388,
9588,
4379,
-1615,
-4072,
-6054,
-5228,
-2401,
4,
4324,
6605,
2596,
-684,
-3747,
-1991,
477,
-3055,
-5975,
-5499,
-3290,
405,
1356,
-790,
-3296,
-5161,
-1283,
4415,
8011,
8385,
7435,
6184,
6404,
1990,
-8180,
-13158,
-16394,
-16518,
-10750,
-3854,
5929,
16110,
19337,
19715,
13305,
1742,
-7794,
-15539,
-17820,
-15583,
-7891,
-397,
8444,
17321,
17773,
16278,
9838,
-1536,
-12314,
-20920,
-21673,
-16563,
-6917,
3753,
12620,
21033,
22800,
17878,
8511,
-3500,
-13761,
-19432,
-20794,
-17670,
-11244,
418,
12782,
21737,
26085,
19014,
5690,
-4641,
-12730,
-14810,
-14440,
-13848,
-10924,
-8210,
231,
8152,
13132,
14389,
12846,
7294,
951,
-3548,
-4504,
-3560,
-2901,
-1464,
-2970,
-4164,
-4077,
-1415,
1038,
4341,
4533,
1998,
249,
774,
972,
-335,
-3691,
-6358,
-8507,
-7848,
-3416,
3883,
12666,
15461,
15194,
7374,
-2911,
-10388,
-14478,
-15905,
-14066,
-8494,
-3196,
4866,
15496,
20425,
17945,
12184,
1568,
-9187,
-15509,
-20134,
-17769,
-9293,
-415,
10213,
17302,
22141,
21114,
11477,
1797,
-8640,
-15779,
-18639,
-18572,
-13154,
-4175,
6431,
15020,
18860,
13692,
4084,
-3354,
-9459,
-11584,
-9796,
-7563,
-1675,
6799,
13584,
16823,
14740,
10026,
3763,
-5235,
-12394,
-16748,
-17769,
-17351,
-10960,
-1277,
6243,
13626,
15007,
15863,
11476,
6128,
1725,
-4069,
-5949,
-6101,
-5293,
-1843,
-953,
-4542,
-3908,
-3643,
-396,
6355,
5220,
2793,
539,
-4219,
-2388,
-1872,
-3667,
-5769,
-7433,
-2510,
4409,
12724,
17179,
14675,
11990,
5306,
-5540,
-13418,
-17882,
-20727,
-18877,
-14122,
-6962,
2788,
11982,
19645,
23474,
20932,
10283,
-630,
-9971,
-14440,
-14931,
-11938,
-5124,
1797,
8878,
13331,
14252,
8992,
2525,
-3895,
-12489,
-17718,
-18194,
-16436,
-7440,
3485,
14462,
20717,
16259,
13424,
10023,
4774,
97,
-6185,
-11144,
-13178,
-11201,
-8386,
-4375,
971,
1601,
1669,
1566,
204,
-753,
-2470,
-763,
3349,
5609,
5844,
5271,
4427,
4745,
4881,
3929,
459,
-4081,
-6035,
-7453,
-7527,
-4041,
-3534,
-5713,
-6835,
-6200,
-2447,
1442,
5712,
9753,
10708,
10175,
8788,
6085,
1671,
-4325,
-8725,
-8868,
-7316,
-4179,
176,
2740,
5674,
5271,
1182,
-5241,
-10309,
-13283,
-14632,
-9298,
-2632,
2211,
9684,
18071,
25071,
29654,
20234,
2854,
-10287,
-19567,
-22961,
-22892,
-21299,
-14003,
-3684,
8595,
17843,
20445,
17418,
8272,
222,
-4687,
-7738,
-10431,
-10894,
-8362,
2333,
13580,
18001,
19464,
11812,
2938,
-4138,
-10121,
-16760,
-22447,
-21628,
-16907,
-6325,
7915,
14340,
15315,
15736,
14900,
12441,
6418,
-1240,
-7513,
-7853,
-6621,
-2499,
-388,
-2845,
-2891,
-1713,
387,
371,
-2671,
-5398,
-6489,
-2713,
746,
-632,
-566,
-196,
1952,
5561,
7520,
8989,
10752,
9712,
8251,
3805,
-4986,
-10638,
-14684,
-17796,
-17792,
-14282,
-7179,
2712,
10356,
13055,
13184,
7958,
4045,
2039,
-2114,
-3160,
-3969,
-2295,
2538,
8542,
13211,
11264,
4699,
-4837,
-13157,
-20213,
-23339,
-20607,
-15293,
-5326,
6579,
16912,
24781,
27363,
23436,
14332,
3865,
-7692,
-17666,
-19592,
-18925,
-11087,
613,
6693,
11039,
10364,
6398,
1586,
-3164,
-7057,
-9137,
-10735,
-12043,
-5817,
5106,
13120,
18352,
15456,
11178,
5927,
2032,
94,
-6542,
-10063,
-10471,
-9645,
-6295,
-3740,
-3904,
-2173,
244,
3647,
7676,
7234,
3868,
1297,
3396,
8789,
7110,
707,
-7375,
-13300,
-8682,
-318,
5434,
8571,
6218,
3067,
2982,
-941,
-7069,
-12147,
-15081,
-14867,
-10785,
-2958,
4343,
13780,
21355,
22804,
19974,
9006,
-1624,
-10902,
-14162,
-14238,
-13948,
-9036,
-2542,
4422,
9658,
8530,
3369,
462,
-4479,
-7427,
-8216,
-5909,
-1561,
6262,
15643,
18181,
17194,
10605,
2584,
-2555,
-11665,
-17044,
-20196,
-19196,
-13093,
-4861,
5436,
11914,
16628,
14624,
11430,
5975,
-1145,
-6933,
-10436,
-8263,
-4407,
-2509,
396,
2936,
3327,
5502,
5609,
2251,
-1181,
-4470,
-6332,
-4025,
-3319,
-3891,
-3369,
-6656,
-3987,
2106,
3402,
10670,
14217,
10870,
7162,
2337,
-557,
-5065,
-9857,
-11550,
-12636,
-9582,
-4056,
-1712,
5821,
13337,
15010,
13421,
4237,
-7226,
-13068,
-16818,
-15545,
-6190,
756,
5180,
11376,
18826,
24114,
20325,
7565,
-6234,
-16775,
-21679,
-21932,
-19826,
-14178,
-4905,
7234,
15499,
20003,
19373,
12988,
4696,
-164,
-4476,
-10697,
-14037,
-13441,
-6241,
4991,
12475,
12225,
7222,
21,
-3521,
-6780,
-10166,
-9094,
-7121,
-2172,
3909,
7688,
10773,
8247,
7855,
7418,
1893,
-2144,
-7452,
-10971,
-13135,
-8210,
-2992,
1594,
5681,
6348,
7642,
7679,
6725,
2955,
-339,
-4320,
-7222,
-8078,
-7423,
-5262,
-3158,
-1303,
947,
4601,
6462,
6059,
7338,
9123,
6299,
315,
-8207,
-13513,
-15409,
-13464,
-7170,
783,
9496,
15670,
16571,
11597,
3924,
-4218,
-8881,
-13297,
-16024,
-13535,
-10908,
-5174,
10055,
22875,
27100,
23699,
11845,
-495,
-10574,
-17155,
-19952,
-20111,
-16670,
-9476,
1293,
13720,
20912,
21969,
15643,
6499,
-2115,
-12009,
-19266,
-18733,
-13793,
-4256,
6173,
14072,
18532,
13950,
8980,
3362,
-1836,
-6523,
-11515,
-15237,
-14151,
-8603,
-1441,
7656,
9332,
8540,
5852,
818,
-774,
40,
-1780,
-2167,
1539,
3441,
2133,
-444,
-630,
-1534,
739,
3956,
708,
-4094,
-8716,
-9617,
-3642,
3126,
6505,
2970,
-2912,
-4254,
-938,
7726,
10749,
10742,
7135,
1783,
-384,
-3375,
-7718,
-12518,
-12386,
-10494,
-4185,
513,
5203,
11518,
12938,
15154,
8655,
-3582,
-13641,
-20795,
-16917,
-5107,
4640,
11765,
17191,
20187,
19762,
12070,
1759,
-8879,
-18009,
-23797,
-25788,
-21875,
-12595,
2531,
15760,
24484,
26111,
17243,
5251,
-4278,
-9151,
-7442,
-6560,
-6052,
-4190,
260,
5538,
7582,
7964,
3882,
-597,
-6068,
-11817,
-12668,
-11315,
-6899,
1067,
5598,
7488,
7944,
7227,
7849,
8846,
6679,
3590,
847,
-3535,
-4369,
-2565,
-3361,
-7471,
-10965,
-11278,
-8245,
-2979,
2139,
6055,
8830,
11228,
11387,
7135,
3134,
-3568,
-9648,
-9295,
-6031,
-879,
6401,
7549,
7249,
6088,
2395,
-874,
-8183,
-13923,
-16493,
-13986,
-7903,
6,
7884,
14554,
17376,
16383,
10998,
1670,
-5876,
-10778,
-13236,
-10933,
-5571,
-1719,
4005,
10196,
14063,
13309,
4464,
-6400,
-17108,
-22990,
-20909,
-14546,
-4571,
4152,
13628,
20186,
26998,
27095,
16345,
4676,
-7786,
-15665,
-17041,
-17573,
-16715,
-11985,
-4927,
3056,
9804,
9984,
5171,
2492,
2039,
3071,
4040,
2508,
-1885,
-4034,
554,
5574,
7753,
5276,
-756,
-3325,
-3566,
-3287,
-3263,
-5227,
-7503,
-5141,
-2911,
-1006,
-1441,
-1687,
3154,
7343,
11911,
11609,
5196,
43,
-1060,
-595,
788,
-6803,
-11848,
-11419,
-9631,
-2325,
6056,
10669,
9367,
7789,
2544,
-2765,
-7075,
-8799,
-9324,
-7812,
-2385,
1825,
6996,
13015,
16737,
15168,
8037,
-414,
-7948,
-11696,
-15116,
-15861,
-9089,
-1716,
3912,
8062,
8188,
5608,
3299,
-2766,
-4842,
-6376,
-7709,
-7478,
-1536,
9345,
14851,
18100,
16516,
11645,
2533,
-7034,
-14716,
-21127,
-22623,
-16978,
-12008,
-6672,
2408,
11798,
18559,
19950,
18321,
12212,
4786,
-2737,
-5744,
-9508,
-10043,
-5884,
-4050,
-3164,
-3113,
-3095,
-1184,
2941,
5654,
5707,
736,
-3689,
-4935,
-1697,
1534,
1453,
-553,
-2764,
-128,
5227,
8322,
6639,
5289,
5189,
2241,
-1274,
-6277,
-13649,
-15473,
-10544,
-3174,
1709,
3051,
4901,
7610,
10259,
13036,
9423,
-182,
-8109,
-13712,
-12088,
-4968,
-231,
4038,
7689,
11406,
12191,
7647,
35,
-5437,
-8460,
-12188,
-13223,
-11498,
-10083,
-4040,
7742,
16721,
20759,
14706,
3849,
-2670,
-4998,
-5353,
-5006,
-3740,
-4328,
-3726,
-625,
2488,
6923,
5928,
-157,
-5474,
-9168,
-10259,
-9970,
-4737,
4835,
12836,
11916,
9830,
6841,
4719,
3288,
-950,
-3506,
-6819,
-9650,
-10461,
-5219,
-1025,
1121,
100,
-1066,
839,
769,
704,
2352,
6904,
7692,
5930,
1063,
-4589,
-5233,
-6557,
-6340,
-1690,
973,
4462,
10648,
13492,
12181,
4629,
-6147,
-11797,
-14708,
-17402,
-16791,
-12255,
-3948,
10655,
20571,
24664,
22074,
12710,
3395,
-7439,
-12840,
-15104,
-16474,
-15439,
-9119,
1861,
10522,
15364,
16641,
9728,
393,
-6740,
-12426,
-11672,
-11327,
-9705,
-2316,
5599,
12042,
15942,
15925,
12285,
6197,
299,
-6873,
-12086,
-14155,
-13671,
-7383,
108,
3335,
2815,
-14,
-1670,
-303,
2735,
2576,
2138,
2426,
3155,
7110,
9282,
3584,
-3415,
-6682,
-6723,
-3606,
-3051,
-2414,
-1209,
1318,
2203,
699,
-897,
-5318,
-11022,
-10011,
-4351,
2209,
10246,
13450,
15731,
15435,
9830,
1857,
-5561,
-10733,
-16398,
-16886,
-12817,
-7513,
2785,
11304,
13918,
14875,
8005,
-3702,
-10369,
-13925,
-12613,
-7767,
-19,
7468,
15724,
21641,
21591,
18381,
7922,
-6478,
-17800,
-24098,
-23017,
-19326,
-10880,
944,
10178,
15982,
17861,
15375,
9069,
3122,
-2490,
-6264,
-10817,
-12371,
-11753,
-5511,
4465,
11267,
12136,
7124,
3958,
1685,
-1209,
-7663,
-11165,
-10945,
-10013,
-6973,
-3762,
574,
2191,
5774,
9136,
8760,
8042,
4710,
2896,
3935,
4472,
1595,
-4468,
-10651,
-12414,
-10125,
-4823,
1217,
6907,
5539,
1359,
-75,
-1392,
-470,
-1709,
-4591,
-3793,
-1300,
3002,
6580,
12926,
16466,
12873,
9848,
1,
-9146,
-15597,
-18947,
-18508,
-15869,
-7889,
-3474,
3127,
13254,
16415,
17205,
11678,
2459,
-2746,
-6363,
-6673,
-5086,
-2947,
-2102,
1307,
5820,
7406,
7269,
1229,
-7976,
-12049,
-11754,
-9640,
-7575,
-3036,
2366,
6178,
13842,
20358,
17117,
10441,
690,
-7561,
-11175,
-14063,
-12661,
-8107,
-1322,
5153,
8650,
8507,
6824,
5533,
1302,
-2192,
-4042,
-10116,
-15409,
-14375,
-5659,
6073,
13029,
13717,
10359,
7604,
7726,
5951,
2428,
-2020,
-7413,
-10189,
-10524,
-8083,
-6968,
-4486,
-2362,
-1524,
-11,
624,
783,
2975,
7056,
9308,
9735,
3955,
-3513,
-6636,
-6932,
-4211,
868,
5139,
6404,
5030,
4475,
125,
-6642,
-8372,
-9572,
-12541,
-14902,
-11266,
-3228,
8434,
20915,
27889,
26175,
16223,
5468,
-5753,
-15203,
-17442,
-19339,
-18950,
-14264,
-5831,
5837,
13742,
17658,
17523,
10671,
346,
-9051,
-12960,
-10466,
-6761,
468,
6486,
9706,
10759,
9219,
6689,
641,
-2649,
-8886,
-12225,
-12534,
-8376,
-75,
4218,
7080,
5013,
1915,
-661,
-1060,
-1631,
-1873,
-4018,
-2222,
146,
2082,
6776,
6680,
5672,
2373,
-2013,
-2113,
-3240,
-4350,
-2158,
-1638,
1595,
825,
-3320,
-7232,
-9827,
-8058,
-2489,
3575,
9396,
14837,
15867,
13940,
12804,
7116,
-4063,
-14019,
-20354,
-19825,
-14199,
-7682,
1725,
10458,
13398,
15795,
9573,
255,
-6072,
-11126,
-12937,
-12136,
-6598,
1479,
10654,
20982,
26131,
20382,
9469,
-4775,
-16427,
-24166,
-25975,
-24192,
-17016,
-3431,
8500,
21068,
26009,
22772,
17035,
5647,
-4496,
-11461,
-16183,
-16280,
-13799,
-5154,
2570,
8711,
12021,
10176,
9964,
4777,
-2437,
-7878,
-9086,
-8641,
-5954,
-2155,
-218,
2242,
2746,
4117,
4316,
4092,
3077,
1104,
211,
1659,
2049,
1827,
-415,
-6514,
-9072,
-9288,
-6141,
-1533,
4049,
6968,
7363,
6128,
1610,
-4455,
-9063,
-8415,
-7875,
-6494,
-997,
4262,
11784,
18451,
17834,
16040,
6556,
-6952,
-16419,
-23778,
-22302,
-15644,
-7397,
900,
8685,
16064,
17300,
14626,
9205,
808,
-7549,
-10474,
-10726,
-11628,
-5648,
5587,
15490,
20274,
19252,
8322,
-3706,
-13392,
-19786,
-20595,
-17304,
-10628,
-6212,
2218,
11975,
21306,
25440,
19444,
10982,
2218,
-7785,
-14259,
-15777,
-13497,
-8559,
-5402,
-1735,
3394,
7325,
7881,
7385,
7274,
5223,
-966,
-8723,
-10584,
-8778,
-3312,
2243,
3355,
4786,
2165,
924,
3297,
4737,
4977,
3651,
-334,
-5157,
-5999,
-6099,
-6405,
-5341,
-4395,
-4307,
-2659,
2475,
5616,
6910,
7319,
6268,
3317,
-1106,
-6941,
-9899,
-4630,
733,
5852,
10659,
9290,
4770,
3197,
-408,
-5079,
-6863,
-11636,
-15191,
-13630,
-9030,
-1717,
7805,
16125,
17810,
14402,
9235,
1744,
-2024,
-3798,
-6322,
-7890,
-8684,
-3416,
2209,
5755,
7720,
2378,
-3999,
-8312,
-12003,
-11412,
-9266,
-4659,
3203,
10244,
16339,
20202,
18610,
10775,
5939,
-1809,
-10840,
-15886,
-19519,
-17276,
-12248,
-4982,
3381,
8819,
12723,
13092,
9890,
5505,
-569,
-4098,
-8421,
-8951,
-2619,
1537,
4707,
7867,
6417,
2976,
1925,
1796,
-55,
-4244,
-8431,
-7894,
-4784,
-1204,
359,
-2279,
-2942,
-3126,
112,
4557,
5956,
4905,
3906,
4692,
6279,
4987,
-1029,
-7749,
-9626,
-6453,
-2842,
168,
99,
2261,
3029,
1272,
-50,
-3253,
-7934,
-11833,
-12819,
-5856,
3175,
10191,
17681,
20602,
22520,
16256,
5759,
-5338,
-15988,
-20587,
-22789,
-19302,
-10337,
-2523,
7030,
14010,
16655,
14530,
6488,
-1664,
-8199,
-9371,
-8337,
-5630,
-688,
6046,
15669,
21044,
18796,
10635,
-2003,
-12923,
-22195,
-24996,
-23545,
-17584,
-6224,
3852,
15406,
22722,
22464,
18221,
9793,
-745,
-8654,
-12449,
-13647,
-12715,
-4464,
1992,
6815,
10148,
6899,
3732,
-2524,
-7017,
-6951,
-6945,
-5504,
-3421,
-1064,
742,
2387,
5446,
5927,
4711,
1587,
-2915,
-2125,
2314,
6621,
7628,
5887,
862,
-5367,
-10304,
-12245,
-9592,
-5909,
813,
3725,
5421,
5229,
3003,
4327,
1807,
-1128,
-6307,
-8823,
-3442,
3249,
10330,
17687,
16760,
13653,
3798,
-10087,
-16553,
-21286,
-20500,
-15809,
-7546,
826,
10344,
17784,
21391,
20612,
11499,
-1309,
-11207,
-17250,
-17689,
-10575,
-1161,
8010,
16501,
21289,
19432,
10338,
-1843,
-13958,
-24290,
-25710,
-23005,
-16156,
-8269,
4856,
19055,
28867,
30774,
21004,
6872,
-7550,
-12469,
-15352,
-16909,
-15675,
-12768,
-4833,
5522,
14075,
16240,
11393,
4803,
-1679,
-8080,
-12248,
-12501,
-10400,
-4809,
3151,
8500,
12297,
9175,
7079,
6937,
2466,
-80,
-3776,
-6297,
-5564,
-5864,
-3673,
-1883,
-3202,
-4758,
-6710,
-5484,
275,
4845,
6726,
8211,
9156,
10402,
5899,
-1805,
-5334,
-7705,
-6566,
-3832,
938,
5217,
4644,
2948,
1862,
-52,
-2419,
-6471,
-10212,
-13856,
-13649,
-5388,
3512,
14717,
19795,
15771,
9150,
959,
-3443,
-8302,
-12255,
-12886,
-8630,
140,
8499,
14787,
11993,
6848,
435,
-7683,
-13240,
-20084,
-22381,
-15477,
-4857,
9744,
22379,
27159,
26184,
18229,
7704,
-3697,
-13978,
-21597,
-24197,
-19665,
-11405,
-2127,
11035,
16407,
18295,
17247,
5683,
-3045,
-10629,
-15458,
-12843,
-7036,
-1242,
2998,
6999,
12397,
17149,
16162,
9628,
491,
-7579,
-11260,
-15573,
-14709,
-9805,
-4561,
-1297,
1606,
5786,
6458,
8227,
9664,
6842,
3319,
282,
-5279,
-4296,
-444,
1326,
-631,
-2227,
-1689,
-1815,
-439,
1252,
2721,
2298,
1026,
-2648,
-4687,
-6007,
-8700,
-6558,
-4432,
-1429,
4011,
7106,
11204,
15754,
16967,
11527,
3096,
-5020,
-12755,
-16231,
-16863,
-12696,
-4793,
1259,
8105,
11088,
10132,
6499,
361,
-4590,
-8276,
-11771,
-9779,
-3745,
1075,
10280,
16937,
20578,
19591,
8534,
-2599,
-12367,
-21152,
-22513,
-18993,
-10858,
-2644,
2599,
8431,
15107,
18580,
13500,
5106,
-2186,
-5961,
-6448,
-6458,
-7118,
-5239,
2363,
8232,
11375,
11444,
7096,
-1880,
-9543,
-11416,
-10722,
-9813,
-11320,
-7915,
-2272,
6287,
13301,
15762,
15211,
8508,
3702,
-1441,
-5805,
-7077,
-6466,
-4275,
-3098,
-1782,
-1376,
-1077,
1394,
4176,
4525,
1159,
-3489,
-6743,
-7140,
-3177,
641,
1597,
2775,
2004,
1473,
3358,
8105,
10549,
11003,
8734,
2698,
-4099,
-10118,
-11613,
-12855,
-13196,
-9998,
-4147,
-1639,
1929,
7717,
11945,
13940,
10516,
5654,
308,
-7524,
-11370,
-8915,
-5441,
2255,
10412,
13523,
11252,
4768,
-2026,
-9930,
-14416,
-14489,
-16795,
-15592,
-10375,
1314,
14972,
23431,
26973,
20681,
11000,
43,
-7607,
-13512,
-16296,
-13277,
-9803,
-5922,
-473,
6845,
10505,
10671,
9317,
2682,
-8397,
-13090,
-15353,
-13769,
-6555,
2979,
13387,
17433,
15000,
9834,
6041,
1510,
-3566,
-8431,
-13021,
-14795,
-10262,
-4385,
421,
4186,
5100,
4263,
4016,
2343,
-1833,
-5349,
-5669,
-744,
5124,
6790,
1884,
-3259,
-2256,
2425,
6640,
7740,
3321,
-87,
611,
258,
-1639,
-3575,
-8229,
-14007,
-16163,
-12587,
-7008,
-998,
8259,
17805,
22850,
22620,
14161,
4169,
-1164,
-9615,
-14356,
-14300,
-13447,
-8033,
-536,
4506,
10284,
11824,
7273,
-512,
-6795,
-11163,
-14012,
-10442,
-4191,
4977,
12022,
16232,
19583,
17472,
10107,
1608,
-7000,
-14153,
-18837,
-17419,
-15502,
-9151,
-536,
7341,
14290,
12915,
10080,
3031,
-2507,
-4850,
-3354,
-1627,
-1467,
-980,
758,
4705,
6863,
6710,
1847,
-1911,
-6500,
-8749,
-8799,
-6272,
-1643,
1551,
5078,
4770,
-1,
-2035,
-1560,
174,
3230,
2210,
1336,
962,
2553,
5926,
5222,
1666,
62,
-3253,
-5283,
-5684,
-3296,
1331,
4530,
3698,
-1370,
-7453,
-11377,
-9185,
-6589,
-2038,
1582,
5465,
10220,
16173,
19282,
17691,
11368,
791,
-6575,
-13213,
-18678,
-22279,
-22526,
-11799,
1387,
11710,
15170,
13354,
9823,
4286,
3795,
488,
-5035,
-7821,
-10041,
-8510,
2269,
11566,
17413,
15376,
7905,
-111,
-9434,
-13922,
-15729,
-15091,
-11593,
-5429,
-84,
4239,
10902,
16520,
17891,
15004,
5194,
-2993,
-10659,
-14641,
-11308,
-6198,
-1139,
1716,
4167,
3927,
3257,
5407,
4758,
3171,
-421,
-6074,
-8080,
-6952,
-3313,
-1446,
-1968,
-882,
-251,
234,
2851,
4372,
8000,
11857,
12231,
7938,
1019,
-5996,
-10763,
-13660,
-15013,
-9280,
-4273,
-1016,
3414,
6351,
8663,
5568,
738,
-763,
-3067,
-4586,
-4090,
159,
9259,
15289,
17852,
16823,
8927,
-2133,
-12690,
-20394,
-23742,
-22458,
-18087,
-9867,
821,
10713,
19276,
23203,
21924,
15403,
5439,
-4587,
-12081,
-14472,
-14501,
-8957,
629,
8294,
11235,
8442,
4715,
540,
-5549,
-10394,
-14601,
-15884,
-11513,
-4732,
4220,
12475,
16814,
17368,
13349,
9365,
3676,
-4396,
-11003,
-12518,
-8167,
-6622,
-6140,
-4781,
-1727,
2532,
6570,
6989,
4804,
614,
-1910,
-4972,
-6354,
-3110,
554,
1878,
-501,
924,
964,
4281,
9197,
10841,
9018,
5270,
-231,
-6705,
-10991,
-11908,
-12005,
-12350,
-11129,
-6968,
-2412,
2619,
12432,
17229,
20639,
16120,
5243,
-3603,
-8815,
-7590,
-6302,
-5145,
-3345,
-625,
4784,
7863,
5947,
2346,
-4599,
-10465,
-14253,
-15045,
-13818,
-10107,
690,
13240,
23165,
27001,
20134,
9207,
2635,
-3041,
-10305,
-14057,
-15239,
-16962,
-12481,
-5784,
1024,
8190,
10316,
8950,
6844,
559,
-3933,
-5376,
-4245,
1074,
4704,
7112,
5554,
7411,
7964,
6342,
3523,
-1712,
-6394,
-11869,
-14213,
-10316,
-4283,
341,
2978,
71,
1134,
-113,
1864,
8618,
8691,
5670,
3776,
2124,
130,
1108,
1783,
15,
-1893,
-5019,
-5051,
-941,
-816,
1356,
2164,
249,
-2842,
-6590,
-9830,
-11147,
-7570,
-2912,
5234,
13330,
20084,
21519,
17543,
13251,
2886,
-7591,
-15875,
-24170,
-25315,
-20530,
-10838,
1319,
13246,
18505,
17879,
12595,
5467,
-1541,
-10050,
-13908,
-12880,
-7332,
407,
8233,
14138,
21441,
20710,
12109,
727,
-11208,
-18710,
-24596,
-22375,
-18692,
-12530,
-2925,
6675,
16057,
19339,
18633,
14405,
7971,
2179,
-3559,
-6858,
-8467,
-7781,
-4396,
-4010,
-992,
1781,
1968,
2656,
1870,
-880,
-4315,
-5878,
-5740,
-3242,
-1279,
-208,
-125,
2464,
6027,
8031,
9067,
8221,
5089,
3129,
1023,
-744,
-3950,
-10908,
-13495,
-12459,
-8589,
-3325,
3793,
6591,
6138,
7943,
6572,
3070,
-645,
-3168,
-4814,
-4692,
-982,
3078,
6005,
12170,
13807,
8558,
3022,
-6501,
-15918,
-20453,
-21721,
-16501,
-5666,
3739,
11512,
16801,
17120,
14764,
10722,
1633,
-5970,
-12164,
-16427,
-14835,
-8403,
3910,
12370,
19044,
18604,
13258,
6686,
-4084,
-14828,
-21354,
-21926,
-18379,
-11753,
-3267,
6499,
13827,
22644,
23778,
17660,
10590,
-916,
-9066,
-11907,
-13899,
-13016,
-8685,
-4357,
-441,
4829,
8870,
10255,
7135,
1612,
-1463,
-6451,
-8049,
-9883,
-10459,
-5405,
3497,
11890,
13966,
12459,
8124,
5196,
2201,
-2645,
-6467,
-8835,
-12622,
-13472,
-11274,
-6179,
1189,
5319,
9106,
10122,
9689,
7063,
2897,
1759,
886,
-1073,
-4892,
-8568,
-8273,
-5578,
776,
7159,
9067,
8015,
4504,
-335,
-4382,
-5004,
-6883,
-8767,
-7834,
-5248,
-694,
3656,
9310,
12905,
12114,
9867,
3171,
-6568,
-11388,
-12473,
-9858,
-1819,
3470,
6677,
10321,
10513,
9242,
3733,
-2466,
-9091,
-14819,
-18052,
-18613,
-13482,
-4450,
9608,
22266,
28361,
23880,
11110,
1291,
-5561,
-9213,
-12577,
-16856,
-18859,
-16032,
-5072,
6137,
16487,
19993,
13045,
4875,
-4234,
-11841,
-11255,
-11002,
-6158,
2366,
7186,
11423,
9972,
8860,
7777,
5931,
181,
-7473,
-14494,
-18812,
-15178,
-4836,
3382,
8870,
8844,
6019,
5376,
5435,
7709,
5240,
-250,
-6952,
-9307,
-10338,
-7242,
-2180,
1180,
2949,
2406,
6142,
8985,
7128,
5545,
3839,
-900,
-2930,
-9514,
-14877,
-16179,
-12495,
-3231,
5000,
12341,
14245,
13288,
10543,
8677,
5544,
-2326,
-9970,
-15912,
-14277,
-6911,
443,
10012,
13622,
12404,
8978,
553,
-7432,
-14627,
-18467,
-17069,
-11064,
-632,
5996,
14070,
24002,
25546,
23530,
11790,
-3557,
-14382,
-21120,
-23028,
-22698,
-15615,
-7487,
926,
10197,
17393,
20109,
14540,
6295,
-1179,
-6569,
-8396,
-8136,
-6699,
-5490,
-2353,
4909,
8106,
8477,
7885,
3848,
-709,
-5343,
-7287,
-6144,
-5601,
-1913,
5,
-516,
1062,
535,
1784,
4366,
4606,
3707,
-548,
-7057,
-6501,
-1401,
3338,
4386,
3928,
4278,
3263,
2778,
3084,
2688,
-124,
-2339,
-6945,
-9797,
-10713,
-12171,
-9843,
-2585,
4527,
10621,
15578,
13914,
14366,
13673,
7323,
299,
-8964,
-15978,
-19801,
-17827,
-8673,
-566,
7108,
12853,
9620,
5894,
3706,
-2806,
-5891,
-6005,
-9096,
-7744,
-3266,
2453,
10814,
20737,
23350,
17578,
6378,
-10620,
-19372,
-23016,
-22500,
-16788,
-10342,
-3679,
4706,
13701,
20846,
23799,
16860,
6707,
-2913,
-12931,
-16499,
-16418,
-12298,
-2967,
2857,
8544,
10742,
12157,
13642,
8708,
131,
-7560,
-12942,
-13721,
-13988,
-11248,
-4781,
1839,
10475,
11754,
10005,
6832,
1815,
108,
-428,
-1465,
-2950,
-2613,
-1747,
668,
2575,
528,
-1090,
-2608,
-612,
760,
-5052,
-8408,
-10282,
-7342,
1983,
7177,
5241,
2906,
1820,
2857,
9347,
12891,
10292,
5690,
-2048,
-8738,
-11939,
-12771,
-12554,
-10456,
-6936,
-2968,
2234,
6681,
9624,
13753,
15246,
11200,
4247,
-6381,
-10794,
-13157,
-11076,
-2924,
3354,
9113,
13048,
10967,
5300,
1251,
-4610,
-9899,
-14435,
-17531,
-14906,
-8377,
-219,
12504,
22927,
25224,
19164,
8237,
-3507,
-10245,
-13510,
-12385,
-7882,
-5640,
-4164,
-1264,
6289,
12401,
14859,
10055,
-2391,
-12198,
-16948,
-14692,
-6180,
564,
5281,
8580,
9451,
10407,
11851,
8563,
4088,
-2446,
-8135,
-10168,
-12473,
-9216,
-2940,
2318,
4998,
3791,
502,
-1327,
-1031,
1075,
3584,
3122,
1610,
1337,
-760,
1304,
2617,
1482,
-300,
-3118,
-1568,
2036,
3261,
987,
-380,
-1298,
-3615,
-4736,
-4830,
-8788,
-9057,
-6121,
-351,
7181,
12616,
13081,
9956,
9867,
6822,
2258,
-5153,
-11275,
-11984,
-9625,
-6268,
-1623,
3700,
7407,
8899,
7439,
4499,
-3160,
-10722,
-13776,
-13662,
-7729,
-871,
6142,
11603,
15463,
19463,
16248,
9945,
1152,
-10246,
-16489,
-21218,
-19878,
-14224,
-7533,
1039,
8912,
16121,
16836,
13334,
6273,
1530,
15,
-1651,
-1790,
-5541,
-10315,
-10151,
-5548,
4239,
10439,
8273,
3420,
-3457,
-5684,
-2931,
-729,
-606,
-4379,
-8518,
-8467,
-3588,
7102,
13103,
15259,
14227,
7458,
-1308,
-9136,
-11900,
-11320,
-7226,
-4410,
-3303,
-1536,
2014,
7509,
13318,
16329,
12216,
606,
-13174,
-21216,
-19009,
-10835,
-3002,
963,
2072,
3879,
6994,
13057,
17005,
15746,
7933,
-1146,
-8516,
-13758,
-15074,
-11722,
-5104,
-1103,
1056,
1035,
1065,
1913,
3879,
5316,
7030,
5009,
372,
-1688,
-1498,
1047,
2186,
4710,
3014,
535,
-1044,
-2632,
-4717,
-7854,
-5829,
-3901,
-3724,
-2715,
-1806,
-1126,
2420,
6809,
12697,
14864,
9130,
1702,
-6869,
-11633,
-9890,
-8971,
-7943,
-5809,
-2899,
1571,
5635,
11193,
14071,
13318,
6968,
-2139,
-9026,
-12448,
-12161,
-10346,
-4854,
1434,
6374,
9553,
8412,
7335,
6885,
3412,
88,
-6299,
-9366,
-8501,
-6892,
-355,
3149,
5805,
5911,
3698,
2098,
-2238,
-8230,
-10298,
-5792,
1251,
5799,
4760,
1746,
695,
6566,
11954,
11913,
7028,
-2183,
-5971,
-7569,
-9225,
-7502,
-7394,
-7095,
-5693,
-5268,
-1664,
2077,
7902,
15773,
17291,
14079,
6828,
-5317,
-12020,
-10926,
-8895,
-7811,
-7865,
-5837,
-2963,
2376,
8962,
13472,
14583,
7800,
-1955,
-8532,
-10297,
-8480,
-6239,
-6161,
-2600,
4809,
9491,
10826,
8576,
6336,
3259,
-2247,
-5870,
-7833,
-7434,
-6488,
-4931,
-535,
4189,
6337,
4055,
1628,
817,
-723,
-1575,
-615,
-552,
-946,
-2777,
-3220,
853,
3380,
4203,
3999,
4331,
5016,
2250,
-3227,
-5432,
-3933,
-4502,
-6038,
-7314,
-6680,
-2675,
2185,
7944,
14692,
14977,
8454,
3502,
-1344,
-2472,
-6248,
-10961,
-9705,
-8369,
-2756,
2223,
6672,
10002,
9205,
6382,
-87,
-4416,
-8463,
-11160,
-10109,
-8328,
-2024,
4679,
8782,
14562,
14203,
10757,
8529,
451,
-5642,
-10408,
-13908,
-12583,
-10965,
-5684,
1732,
9057,
12958,
11057,
6331,
502,
-3659,
-5862,
-6270,
-6804,
-5941,
-3218,
-877,
5824,
11799,
14517,
14453,
5505,
-1114,
-5864,
-10697,
-11272,
-11940,
-10766,
-9499,
-6505,
541,
7160,
10974,
14418,
14635,
10191,
3727,
-3178,
-10761,
-12152,
-7524,
-3717,
-761,
614,
2090,
3277,
3729,
3299,
2465,
-1388,
-6498,
-6143,
-5970,
-3685,
1433,
3921,
7606,
8907,
7928,
3961,
-2038,
-4521,
-2909,
-1024,
-344,
-1738,
-4492,
-5365,
-3162,
1308,
4147,
4782,
2892,
-628,
-4578,
-6002,
-5465,
-2599,
452,
1194,
927,
1288,
2931,
8350,
15034,
15593,
11436,
2912,
-7926,
-17296,
-19127,
-14689,
-10610,
-6072,
-4634,
-2649,
3658,
12231,
20505,
19421,
11900,
3115,
-5197,
-8847,
-8684,
-6740,
-2598,
361,
2501,
3494,
3269,
3317,
918,
-766,
-5103,
-10511,
-13727,
-13783,
-8204,
-554,
10069,
17608,
17914,
15462,
9547,
3847,
-746,
-5289,
-9249,
-12857,
-15833,
-15738,
-9893,
-1136,
8261,
13825,
12922,
8796,
4708,
141,
-4455,
-6712,
-5639,
-5191,
-5190,
-2778,
-1863,
2083,
8516,
12102,
13174,
8900,
158,
-5515,
-6514,
-5493,
-4461,
-7302,
-10886,
-14093,
-12381,
-5532,
1739,
8843,
14476,
15933,
11742,
7397,
3904,
3664,
2467,
-1449,
-6693,
-10662,
-11302,
-6189,
1589,
4953,
6147,
748,
-6134,
-7612,
-7543,
-5950,
-2350,
799,
6121,
10730,
14866,
17265,
16103,
11778,
4481,
-4155,
-14114,
-19249,
-20128,
-17079,
-10683,
-1901,
4181,
8031,
9955,
8926,
8442,
6320,
1585,
-2415,
-5950,
-7405,
-4917,
-2500,
4866,
10126,
10159,
8193,
2936,
-2082,
-5147,
-9125,
-11531,
-11555,
-8146,
-3559,
15,
4814,
6998,
9678,
9032,
6480,
2320,
-2413,
-6125,
-6828,
-3312,
1105,
1976,
1844,
3351,
5142,
6799,
5267,
1553,
-4514,
-7203,
-11113,
-10607,
-8632,
-8835,
-5841,
-2463,
2797,
9339,
14712,
15634,
15649,
15819,
11921,
1747,
-7976,
-14444,
-17577,
-17557,
-16694,
-12686,
-4802,
2015,
8991,
13726,
14465,
11410,
5424,
161,
-4995,
-6229,
-5434,
-4245,
-1813,
3853,
7466,
10838,
12671,
6698,
-1177,
-9585,
-16758,
-17949,
-15573,
-9245,
-2456,
3909,
11624,
15505,
17792,
11990,
6720,
1663,
-5704,
-9056,
-8519,
-5882,
-3641,
2145,
5955,
6957,
4897,
341,
-5435,
-7002,
-6613,
-6470,
-5925,
-4574,
-1986,
3404,
8263,
8032,
9122,
6653,
3758,
2145,
859,
832,
106,
122,
-61,
-2433,
-4682,
-7869,
-10152,
-8109,
-4593,
690,
3833,
3128,
2280,
2998,
5073,
6292,
5457,
1705,
-3922,
-6084,
-3079,
2643,
8478,
11618,
7075,
286,
-5598,
-13464,
-15159,
-13927,
-12367,
-7303,
-2003,
3324,
8805,
16278,
20268,
18372,
10814,
-1032,
-9849,
-15710,
-15466,
-10709,
-5148,
851,
6580,
9984,
9702,
8644,
4691,
-1015,
-6297,
-10297,
-11808,
-11000,
-8461,
-3373,
4099,
9584,
13548,
13415,
10274,
7152,
5505,
2985,
-1529,
-5941,
-11107,
-13572,
-12677,
-8452,
-5632,
-2884,
1081,
1944,
3063,
5029,
6580,
7378,
8931,
9789,
5642,
815,
-4635,
-7274,
-6209,
-4307,
-1514,
808,
726,
514,
-321,
-1689,
-948,
-2913,
-5463,
-8822,
-6700,
-1514,
3433,
8325,
12261,
15660,
11686,
5354,
-469,
-6141,
-10464,
-12026,
-9954,
-6759,
-3056,
13,
3485,
8685,
12809,
12242,
4518,
-4592,
-11093,
-13825,
-11645,
-5068,
999,
4118,
6095,
8836,
11065,
11817,
9774,
3953,
-2107,
-7603,
-10595,
-10937,
-9349,
-6369,
-2231,
492,
2471,
2181,
1443,
2209,
3941,
5322,
5073,
395,
-1586,
351,
1110,
4523,
4931,
4914,
2534,
-2087,
-5561,
-6809,
-7932,
-7935,
-7136,
-8857,
-7426,
-3784,
319,
5681,
11884,
16569,
15746,
10961,
6117,
798,
-4105,
-6445,
-7115,
-10689,
-13561,
-13908,
-10018,
-2956,
4265,
10078,
10764,
8545,
5521,
1908,
-287,
159,
-1027,
-3864,
-5648,
-5246,
-2983,
-583,
2849,
7426,
7348,
3817,
-23,
-3559,
-3500,
-1146,
-88,
-1681,
-4941,
-5615,
-1824,
3979,
7985,
5635,
2429,
-80,
-922,
856,
612,
-963,
-2420,
310,
3319,
4806,
6920,
4479,
3082,
1243,
-4000,
-6458,
-11046,
-11158,
-7444,
-5645,
-2570,
4,
4318,
8656,
13808,
17336,
14164,
6076,
-3170,
-9544,
-9819,
-7728,
-5787,
-4041,
-3934,
-4182,
-2756,
951,
6767,
8195,
2542,
-2485,
-5391,
-6096,
-1894,
2506,
5501,
9198,
7858,
5766,
3330,
368,
-2435,
-4751,
-5705,
-8407,
-10255,
-11895,
-10343,
-2199,
6787,
12971,
13455,
9021,
5905,
2520,
559,
-1102,
-3921,
-7151,
-10126,
-11155,
-9889,
-3860,
4003,
10328,
14607,
13979,
8842,
-530,
-8550,
-8908,
-5626,
-4740,
-4895,
-6818,
-8501,
-2954,
3805,
11643,
15700,
11588,
4280,
-3194,
-6656,
-7261,
-3958,
-1822,
-3394,
-2480,
-2805,
-2201,
2286,
5111,
7950,
7562,
1080,
-4495,
-9879,
-9938,
-3515,
675,
4200,
4965,
1544,
2388,
4266,
5051,
5876,
2021,
-1722,
-5346,
-6430,
-6030,
-5107,
-2803,
-325,
1440,
895,
791,
1141,
1213,
2571,
4376,
4908,
4860,
2704,
74,
-3543,
-4948,
-4276,
-2896,
-3419,
-2624,
446,
960,
2064,
2702,
1865,
2781,
2848,
428,
-918,
-5306,
-7041,
-2723,
4037,
9302,
9834,
3446,
-2496,
-4180,
-2906,
-1864,
-5239,
-6271,
-5110,
-1290,
2368,
5561,
9793,
9191,
5280,
2398,
-2944,
-9002,
-11139,
-9978,
-6516,
1322,
6814,
8877,
8825,
4981,
3884,
2350,
-941,
-4387,
-7668,
-9163,
-8432,
-3548,
2594,
7375,
11169,
9916,
5472,
257,
-4740,
-7714,
-8034,
-6390,
-2803,
36,
1173,
2092,
4596,
7991,
9213,
7231,
2294,
-1815,
-5795,
-6734,
-5105,
-1659,
1730,
-184,
-4330,
-5938,
-3373,
236,
3699,
6998,
8556,
7963,
4523,
1796,
-875,
-4484,
-6981,
-9758,
-10879,
-9292,
-5316,
449,
7970,
16155,
16605,
8979,
736,
-4513,
-8698,
-10499,
-9505,
-8274,
-3771,
121,
4899,
7857,
10439,
11972,
5735,
-1457,
-8074,
-11254,
-10259,
-7671,
-1999,
3691,
6049,
7362,
7602,
6845,
2784,
-1883,
-6501,
-9554,
-9498,
-7325,
-5716,
-6034,
1012,
10047,
14698,
13011,
8781,
4608,
-570,
-2653,
-3005,
-3037,
-5283,
-7923,
-6692,
-4040,
-1201,
515,
1791,
2526,
2294,
4105,
3313,
1543,
374,
2590,
4428,
2124,
580,
-2522,
-4196,
-1803,
1030,
3768,
3044,
-1030,
-2772,
-4580,
-5196,
-6449,
-5916,
-3455,
-564,
3723,
5770,
5878,
8005,
9351,
6392,
2065,
-4755,
-9384,
-10118,
-9935,
-5651,
-968,
2430,
6304,
7766,
9006,
8260,
3676,
-3374,
-6297,
-7372,
-8048,
-7573,
-7843,
-5335,
703,
8504,
11981,
12846,
10100,
5429,
2293,
-1443,
-2656,
-3833,
-6408,
-7509,
-9275,
-7496,
-4288,
-29,
3939,
5385,
7464,
5014,
1130,
-1453,
-3083,
-737,
3220,
4192,
4385,
3408,
1839,
1794,
2261,
1621,
-1141,
-6613,
-13314,
-14868,
-12166,
-5702,
876,
3096,
4893,
5600,
6525,
7177,
8207,
9805,
8760,
5046,
-1162,
-5529,
-8793,
-8650,
-6036,
-5228,
-6193,
-5637,
-3290,
-2020,
3012,
6668,
7741,
7945,
5730,
2921,
-1075,
-4223,
-3985,
-2533,
723,
3506,
3705,
2421,
2963,
4873,
2317,
737,
-3118,
-7969,
-10612,
-11761,
-9006,
-3827,
3401,
11278,
14674,
11557,
5973,
1048,
-191,
-303,
-1642,
-4844,
-7866,
-7571,
-2653,
3744,
8377,
8928,
5388,
-202,
-5336,
-7754,
-9343,
-8606,
-6736,
-2384,
1322,
4503,
6609,
7132,
9725,
9927,
8713,
4012,
-2913,
-8043,
-8312,
-6018,
-1527,
56,
-4477,
-5391,
-5253,
-2777,
832,
1519,
302,
-4,
904,
2252,
5610,
5159,
3167,
1103,
-862,
69,
997,
1795,
1383,
1226,
-270,
-3954,
-6889,
-7649,
-9437,
-11017,
-8606,
-6040,
73,
7330,
11465,
14934,
16063,
14582,
8992,
-326,
-6740,
-10827,
-12376,
-12241,
-10988,
-8277,
-3148,
3679,
9356,
12198,
9725,
4787,
-1067,
-6308,
-8131,
-6457,
-4480,
-2460,
737,
4908,
8794,
11533,
11118,
7109,
2907,
-2593,
-8865,
-12639,
-13764,
-10336,
-6778,
-2373,
3287,
7341,
9465,
7289,
7282,
6538,
4911,
1203,
-5001,
-10037,
-9229,
-3005,
1207,
4585,
5604,
5119,
4034,
1788,
22,
-1020,
-2496,
-3481,
-5563,
-5531,
-4841,
-6686,
-3402,
1103,
4832,
6937,
6488,
4674,
3037,
5650,
6790,
3988,
-60,
-4009,
-5546,
-6442,
-5927,
-2822,
-1195,
-1670,
-2069,
-1379,
260,
-248,
-609,
540,
943,
2588,
4819,
5233,
4664,
7559,
9292,
7159,
1839,
-5307,
-9495,
-12577,
-11697,
-8424,
-5887,
-3216,
-1918,
1345,
7064,
11928,
12129,
8022,
3762,
-189,
-2343,
-3085,
-5395,
-6994,
-4353,
-1877,
1664,
4268,
2566,
484,
551,
1782,
1895,
651,
-2316,
-3483,
-3870,
-2716,
143,
2437,
3371,
2496,
2464,
3141,
700,
-1915,
-2126,
-1783,
-1237,
-756,
-97,
-1042,
-1200,
-677,
2463,
5551,
5617,
2846,
-2059,
-5326,
-4974,
-4459,
-5973,
-6326,
-6193,
-4477,
-1417,
4436,
11390,
15073,
14362,
10984,
5973,
-1240,
-8124,
-11604,
-12607,
-12800,
-10057,
-8992,
-8061,
-1636,
5943,
14466,
17343,
13967,
9037,
2211,
-2982,
-4283,
-2832,
-3344,
-4973,
-4954,
-2481,
-587,
-1131,
-519,
2878,
4660,
3891,
-520,
-4782,
-5589,
-3220,
568,
3992,
5429,
4445,
1598,
-476,
1811,
3809,
2944,
-656,
-3445,
-5601,
-6435,
-6479,
-4403,
161,
3673,
4438,
4093,
3877,
2203,
501,
736,
1223,
314,
-3390,
-7772,
-9213,
-8429,
-3858,
962,
4871,
6861,
6602,
5428,
3864,
3054,
2842,
360,
-2750,
-6339,
-8560,
-8134,
-6774,
-3392,
-916,
1401,
2436,
3141,
1714,
868,
2391,
3520,
3632,
2865,
1853,
1535,
2380,
3017,
3076,
-33,
-4367,
-8623,
-9747,
-8958,
-5337,
-596,
1049,
3276,
5924,
8496,
9429,
7935,
6440,
2933,
-1030,
-3547,
-5430,
-5919,
-8238,
-8044,
-3829,
942,
5592,
5356,
2709,
1123,
519,
-347,
-1683,
-1839,
-2902,
-1623,
-854,
232,
2712,
3098,
2834,
2356,
1496,
-1730,
-4032,
-4460,
-2898,
-542,
591,
1625,
1672,
-328,
-1709,
-1541,
368,
1320,
77,
218,
-395,
-82,
1346,
750,
386,
123,
-2529,
-3395,
-1620,
786,
4189,
7312,
7112,
5015,
2998,
-2499,
-6608,
-8837,
-8499,
-7451,
-5396,
-1611,
727,
5373,
10117,
15463,
14825,
7212,
454,
-4404,
-6531,
-6813,
-6907,
-5174,
-3303,
-998,
1491,
3142,
3525,
821,
-101,
-1886,
-3026,
-2068,
-3986,
-5282,
-888,
4501,
7244,
6362,
4786,
3858,
2227,
-16,
-3912,
-6599,
-7799,
-6669,
-4302,
-1150,
987,
52,
-988,
1183,
5031,
7887,
8211,
4676,
1432,
1076,
365,
-1431,
-3506,
-5056,
-5403,
-5301,
-3478,
-843,
3872,
6884,
6965,
5991,
2116,
-3463,
-7167,
-6782,
-5354,
-3004,
-1197,
672,
3669,
7898,
11965,
11553,
6813,
595,
-6794,
-11695,
-11923,
-8847,
-4661,
-1599,
395,
1537,
4634,
6210,
6893,
4733,
1052,
-2518,
-6717,
-9143,
-8036,
-4344,
59,
4622,
5268,
4943,
4262,
2964,
3204,
4965,
3452,
662,
-4011,
-9322,
-11243,
-10760,
-5443,
477,
3675,
4299,
4155,
1814,
3075,
7355,
7852,
7388,
4353,
-327,
-3896,
-5177,
-2755,
79,
910,
1321,
442,
-2832,
-5011,
-5048,
-2935,
810,
2114,
-349,
-1741,
-288,
2273,
6095,
9470,
9765,
6170,
729,
-3731,
-7323,
-8687,
-7941,
-6146,
-4684,
-4759,
-3585,
-2915,
-1210,
3272,
6695,
9065,
9077,
7355,
2892,
-2763,
-4200,
-3930,
-3828,
-5029,
-5939,
-5496,
-4339,
426,
4258,
6883,
7311,
5175,
2880,
-359,
-2884,
-5433,
-5140,
-2208,
293,
1992,
1547,
1333,
2856,
5051,
4225,
1177,
-2620,
-6203,
-7012,
-5846,
-2714,
105,
2389,
3832,
5006,
5176,
4556,
2945,
-288,
-2655,
-5659,
-6882,
-6958,
-7141,
-5232,
-2627,
826,
6239,
9545,
8861,
7630,
5437,
1711,
-288,
-3320,
-6132,
-8391,
-10681,
-10960,
-8654,
-3588,
1886,
7585,
12147,
14387,
12488,
7627,
2823,
-383,
-3000,
-6950,
-9024,
-8831,
-8365,
-4567,
1461,
7014,
9529,
6134,
3956,
1800,
-1996,
-3285,
-3437,
-2054,
1169,
4452,
5633,
4727,
3055,
1744,
141,
-1598,
-4127,
-7964,
-10958,
-10155,
-5093,
972,
5175,
5468,
5316,
5446,
2887,
866,
534,
-217,
239,
141,
-854,
-1457,
-3140,
-3826,
-2779,
-2924,
-3648,
-4542,
-4907,
-1191,
3444,
5886,
5950,
5081,
3528,
1574,
-262,
-1404,
-322,
-228,
-260,
872,
1792,
22,
-1557,
-2394,
-2510,
-1589,
-2441,
-2602,
-807,
2338,
3624,
4343,
5797,
6888,
5759,
2768,
55,
-2153,
-4641,
-6523,
-6653,
-5482,
-2855,
117,
2016,
3972,
5470,
4601,
2903,
522,
-841,
-2794,
-4980,
-5013,
-4063,
-3144,
-3410,
-3454,
-936,
1737,
5009,
6330,
6327,
6302,
3743,
1842,
96,
-2999,
-7393,
-8785,
-9119,
-7687,
-4686,
-1907,
2194,
7029,
10796,
10277,
7684,
4056,
875,
-971,
-3572,
-7253,
-6854,
-5258,
-2471,
3160,
7976,
9868,
6759,
1548,
-2827,
-5169,
-6652,
-7754,
-7156,
-5820,
-3328,
-571,
3907,
11863,
15172,
13157,
9681,
3166,
-3994,
-9504,
-11798,
-11850,
-10792,
-7798,
-5469,
-2854,
603,
5620,
8883,
8445,
6873,
3551,
154,
-2011,
-1469,
1239,
2981,
1039,
-1900,
-3141,
-4244,
-4535,
-1715,
175,
1405,
2938,
2515,
2453,
1409,
994,
1073,
-497,
-3070,
-4557,
-3919,
-2326,
2548,
6624,
7663,
6856,
2134,
-1790,
-4094,
-4966,
-3247,
-2194,
-2754,
-1496,
1879,
4181,
6472,
7065,
4429,
46,
-5051,
-9995,
-11989,
-10133,
-5672,
-1062,
3833,
9133,
12477,
12667,
8239,
3408,
-101,
-5315,
-9606,
-11577,
-12717,
-10458,
-4857,
1102,
4872,
6530,
5835,
3259,
2074,
1547,
534,
-1953,
-3670,
-2775,
525,
3989,
4843,
3505,
648,
-976,
-2020,
-3229,
-4387,
-5248,
-4496,
-2026,
1071,
2231,
2708,
1422,
702,
2416,
2858,
3852,
4070,
4160,
6547,
6991,
4622,
350,
-5592,
-8909,
-10374,
-11583,
-9828,
-6935,
-1538,
4760,
10994,
15575,
13975,
8272,
1702,
-2299,
-6421,
-8556,
-9643,
-10413,
-6416,
-303,
4997,
7973,
8722,
6440,
2916,
-1453,
-4270,
-5520,
-6058,
-5249,
-2673,
953,
2802,
3746,
4223,
3859,
3310,
1702,
-1801,
-4759,
-5704,
-3438,
100,
3757,
5945,
4898,
2198,
-989,
-2375,
-2802,
-2685,
-2336,
-2703,
-2394,
-1430,
-752,
456,
1548,
2113,
2247,
1028,
-335,
-378,
1432,
4425,
6416,
6090,
2336,
-2508,
-5946,
-7801,
-6761,
-5847,
-5807,
-5363,
-3812,
245,
4260,
7819,
9094,
6950,
3152,
-1348,
-2880,
-2702,
-650,
1761,
1779,
1809,
1426,
-446,
-2354,
-3995,
-5755,
-5682,
-6039,
-6042,
-5828,
-3207,
2633,
7548,
11281,
13373,
11908,
6779,
1944,
-752,
-3310,
-5589,
-7834,
-8613,
-7581,
-5063,
-861,
1569,
4134,
5691,
6570,
5264,
2138,
508,
-36,
-511,
-596,
110,
-2067,
-3967,
-4732,
-3121,
499,
2626,
3511,
3701,
2237,
1354,
1988,
2079,
1265,
-1282,
-5309,
-7672,
-7836,
-6788,
-3475,
-313,
2371,
5713,
7651,
7145,
5276,
3766,
1976,
-490,
-2597,
-4907,
-5865,
-5982,
-4828,
-1388,
1483,
2826,
1789,
-201,
-1890,
-2659,
-2117,
-1412,
-1258,
-1231,
-47,
3535,
7490,
9299,
8572,
4850,
1379,
-1739,
-3656,
-3896,
-4797,
-5641,
-5912,
-5106,
-4577,
-3123,
-938,
986,
2009,
2724,
3650,
3976,
5026,
7200,
9880,
10415,
6157,
-212,
-4546,
-7370,
-8154,
-7978,
-7193,
-6664,
-5494,
-2840,
260,
4759,
7333,
6826,
4302,
2075,
562,
-242,
182,
907,
1956,
3382,
3100,
1919,
-316,
-3040,
-4052,
-4796,
-4788,
-4267,
-3378,
-2291,
-68,
2911,
4706,
5584,
4378,
1373,
-1108,
-2355,
-2141,
-1314,
-1345,
-599,
349,
1595,
2850,
2931,
2643,
1259,
-752,
-2926,
-4715,
-5952,
-5822,
-3739,
-1330,
313,
840,
1524,
2962,
3600,
3865,
3685,
2786,
1250,
-398,
107,
1825,
500,
-2010,
-4136,
-6437,
-5660,
-3268,
-648,
1890,
1157,
-333,
-1463,
-1629,
380,
849,
148,
-72,
1449,
3035,
3645,
5313,
7629,
8315,
6201,
551,
-5130,
-9732,
-12254,
-11135,
-9378,
-6947,
-4607,
-1492,
1885,
7598,
12461,
13544,
12249,
8657,
4020,
-540,
-3578,
-4281,
-3907,
-3418,
-2966,
-4276,
-5303,
-4776,
-3166,
-2574,
-2164,
-1614,
-1553,
-678,
1141,
3936,
6861,
9322,
9782,
7618,
2851,
-430,
-1934,
-3526,
-4671,
-5114,
-5841,
-6360,
-5553,
-3451,
83,
1630,
1501,
510,
-748,
-433,
2158,
3424,
2823,
3323,
4120,
4145,
2979,
2428,
1621,
174,
-2506,
-5724,
-6639,
-5901,
-4271,
-2764,
-1320,
-719,
-551,
350,
1196,
2323,
2736,
1401,
332,
326,
517,
1688,
2778,
3593,
3063,
896,
-1123,
-3053,
-3981,
-3810,
-2447,
-1243,
-713,
-1393,
-2816,
-2302,
-917,
1336,
2092,
1279,
1293,
1262,
1637,
2833,
5273,
6363,
5081,
2284,
-622,
-2347,
-2343,
-2111,
-4031,
-5010,
-6050,
-6575,
-5395,
-3337,
583,
3386,
4374,
4656,
4711,
5326,
6055,
6575,
6457,
5642,
3551,
-147,
-4462,
-6973,
-7804,
-8075,
-7410,
-6591,
-4357,
-1998,
-190,
2898,
5007,
6208,
5296,
4560,
4321,
2552,
2260,
1893,
1502,
1065,
-631,
-3164,
-4103,
-4442,
-4091,
-2601,
-3010,
-3116,
-3460,
-4013,
-2599,
-428,
786,
1732,
2685,
3800,
5435,
7486,
8847,
7769,
5933,
2479,
-1914,
-6222,
-10116,
-10867,
-9120,
-6926,
-5123,
-2423,
-61,
2860,
5727,
6646,
6187,
3928,
2082,
978,
855,
1885,
2649,
2349,
1302,
66,
-1820,
-3590,
-5439,
-5884,
-5760,
-5198,
-3383,
-889,
2467,
4599,
5559,
4714,
3400,
1088,
-1514,
-2210,
-934,
942,
2487,
3919,
4627,
3839,
546,
-2214,
-4846,
-7128,
-7539,
-7549,
-5947,
-2291,
1872,
5888,
8138,
8718,
6815,
3648,
432,
-1548,
-2690,
-3777,
-3161,
-1150,
1199,
1849,
2074,
1568,
537,
-963,
-2972,
-4977,
-4903,
-3637,
-1893,
969,
2998,
4338,
4071,
2689,
1845,
1308,
210,
-920,
-1213,
-196,
1183,
2068,
2921,
2909,
1319,
-1112,
-4667,
-6568,
-6870,
-6273,
-4432,
-1498,
1809,
3689,
4887,
5099,
5513,
5459,
3349,
1117,
275,
139,
245,
126,
274,
157,
-1501,
-4494,
-6956,
-8000,
-8169,
-6145,
-2854,
-252,
2797,
5770,
6499,
7179,
8251,
7330,
4462,
1740,
-1509,
-4405,
-6045,
-5831,
-4730,
-3893,
-3197,
-2781,
-1484,
-372,
1158,
3148,
4285,
4213,
3570,
1867,
1158,
1939,
1034,
-1168,
-2577,
-4874,
-3642,
-2414,
-1470,
1349,
1464,
2952,
1553,
-1003,
-1934,
-1031,
-609,
372,
2145,
1842,
3143,
3348,
2861,
2715,
2009,
63,
-3125,
-4920,
-5449,
-4537,
-2610,
-1720,
-2091,
-1800,
207,
1294,
1297,
1465,
2365,
2796,
2485,
1766,
1243,
331,
-2457,
-3868,
-5803,
-7389,
-6901,
-5185,
-1258,
1838,
5141,
7812,
7281,
4874,
3030,
2134,
-1068,
-3889,
-4994,
-5776,
-4888,
-2432,
507,
3747,
5414,
4716,
3072,
784,
-1495,
-2602,
-2873,
-2154,
-710,
645,
2015,
2688,
2438,
1510,
1269,
21,
-1458,
-2297,
-2215,
-203,
2182,
2076,
2288,
2667,
1724,
835,
-1539,
-2765,
-3135,
-2664,
-1894,
136,
1678,
2914,
3467,
3063,
3132,
1568,
-447,
-2607,
-3655,
-3318,
-2060,
-1199,
-169,
277,
331,
70,
-996,
-1226,
-1568,
-2209,
-2478,
-2308,
-1007,
636,
2249,
3922,
5114,
4750,
2612,
854,
-290,
-540,
-1093,
-2036,
-2334,
-2318,
-1754,
-1529,
-1072,
-321,
214,
527,
523,
300,
-393,
-1113,
-687,
576,
1642,
2533,
3700,
3928,
2977,
2286,
1230,
544,
26,
-1625,
-3606,
-5794,
-6600,
-5855,
-4390,
-2316,
-135,
2230,
3701,
4770,
5447,
5447,
5546,
5317,
4045,
1413,
-1783,
-4451,
-5838,
-5692,
-4737,
-4160,
-3725,
-2535,
-1728,
-789,
1059,
2668,
3499,
3437,
2783,
2050,
1109,
1024,
1244,
1154,
1153,
775,
-241,
-1199,
-1465,
-1786,
-2512,
-3184,
-4115,
-4484,
-3840,
-2624,
-446,
1485,
2920,
3923,
4567,
4740,
4384,
3778,
2498,
1740,
816,
-370,
-1266,
-1684,
-2083,
-2837,
-2944,
-2907,
-2580,
-1794,
-1071,
-614,
303,
1535,
2425,
2819,
2805,
2978,
2966,
2941,
2246,
1088,
126,
-704,
-1058,
-1241,
-1467,
-2713,
-3695,
-3855,
-3506,
-2060,
-649,
318,
742,
1201,
1747,
2035,
2087,
2075,
2130,
2017,
1754,
1433,
988,
183,
-595,
-964,
-1633,
-2825,
-3956,
-4174,
-3569,
-2122,
-310,
377,
1129,
1997,
2396,
2512,
2546,
2140,
1097,
-209,
-1364,
-1406,
-747,
61,
399,
178,
-188,
-792,
-1298,
-1787,
-2179,
-1847,
-1634,
-1220,
-132,
351,
1065,
2024,
2368,
1930,
859,
-257,
-593,
-615,
-726,
-238,
84,
-100,
-466,
-798,
-610,
-291,
-222,
-506,
-1245,
-1879,
-1737,
-1163,
-479,
429,
677,
565,
574,
1318,
2389,
2549,
2628,
2231,
1250,
-14,
-1212,
-1880,
-2133,
-2173,
-2238,
-2346,
-2302,
-1092,
708,
2049,
2917,
2872,
2298,
1273,
400,
-9,
-317,
-480,
-967,
-1414,
-1352,
-557,
795,
1856,
1968,
1337,
263,
-639,
-1243,
-1014,
-333,
19,
149,
230,
461,
642,
807,
1248,
1008,
384,
-590,
-1617,
-1944,
-1809,
-869,
67,
833,
862,
491,
254,
351,
518,
526,
566,
-114,
-636,
-649,
-804,
-837,
-488,
-326,
-332,
-809,
-1076,
-917,
-372,
488,
1107,
1156,
1050,
718,
243,
271,
149,
23,
-43,
-339,
-599,
-888,
-1374,
-1448,
-1009,
-777,
-896,
-1092,
-600,
229,
1002,
1784,
2036,
1469,
837,
280,
601,
688,
23,
-868,
-1450,
-1427,
-681,
-182,
-420,
-514,
-507,
-437,
-414,
-402,
-435,
-264,
110,
1050,
1390,
1104,
1086,
981,
1208,
1104,
240,
-772,
-1013,
-688,
-197,
-106,
-424,
-626,
-739,
-319,
515,
647,
207,
326,
861,
1092,
855,
715,
396,
215,
146,
-34,
-66,
-300,
-138,
332,
378,
250,
103,
-39,
-210,
-222,
-246,
-450,
-522,
-420,
-288,
-69,
175,
666,
1140,
1076,
970,
830,
381,
-249,
-513,
-552,
-823,
-886,
-874,
-907,
-990,
-678,
-538,
-563,
-198,
-39,
48,
-15,
171,
346,
367,
213,
84,
-189,
-167,
238,
397,
203,
-428,
-779,
-940,
-889,
-662,
-274,
64,
182,
284,
386,
614,
935,
1040,
1077,
644,
173,
-16,
-205,
-510,
-653,
-218,
57,
101,
67,
145,
266,
550,
309,
-277,
-654,
-535,
-319,
1,
450,
865,
1213,
1047,
572,
235,
115,
-239,
-425,
-534,
-609,
-565,
-266,
178,
578,
1108,
1352,
1044,
527,
-7,
-780,
-1191,
-1304,
-1213,
-1194,
-1340,
-964,
-132,
845,
1399,
1520,
1330,
973,
515,
-214,
-929,
-1441,
-1488,
-1145,
-616,
-289,
-164,
202,
571,
664,
318,
-242,
-744,
-1141,
-1227,
-896,
-233,
268,
543,
460,
431,
664,
814,
723,
202,
-332,
-580,
-774,
-979,
-928,
-734,
-483,
-323,
-288,
-386,
-448,
-323,
-199,
-6,
144,
195,
180,
609,
882,
817,
628,
372,
354,
199,
-96,
-585,
-905,
-851,
-747,
-916,
-1082,
-881,
-502,
56,
952,
1689,
1894,
1850,
1395,
956,
855,
639,
62,
-705,
-1337,
-1714,
-1498,
-1058,
-723,
-335,
364,
723,
851,
972,
905,
591,
294,
236,
159,
279,
207,
205,
343,
424,
299,
-110,
-530,
-792,
-787,
-571,
-440,
-305,
-28,
92,
185,
163,
138,
182,
214,
87,
-54,
-13,
85,
360,
682,
797,
683,
354,
40,
-111,
-447,
-844,
-881,
-648,
-395,
-257,
-143,
-101,
-26,
-188,
-155,
54,
312,
429,
497,
657,
678,
666,
805,
716,
314,
-110,
-511,
-649,
-865,
-795,
-895,
-925,
-704,
-403,
-65,
191,
596,
960,
1293,
1503,
1588,
1375,
889,
207,
-305,
-543,
-759,
-957,
-1092,
-1132,
-943,
-660,
-285,
-2,
211,
628,
834,
1015,
1228,
1161,
902,
538,
286,
10,
-432,
-1081,
-1441,
-1594,
-1477,
-1011,
-494,
-44,
251,
416,
540,
552,
564,
504,
97,
-350,
-554,
-425,
-175,
106,
306,
361,
363,
48,
-251,
-516,
-626,
-704,
-623,
-387,
-79,
189,
304,
368,
397,
344,
227,
27,
-125,
-246,
-224,
-82,
111,
359,
550,
609,
441,
133,
-176,
-437,
-638,
-581,
-474,
-329,
-56,
296,
476,
481,
394,
355,
458,
469,
372,
264,
276,
250,
177,
-36,
-252,
-610,
-809,
-701,
-276,
133,
261,
285,
137,
16,
-45,
-101,
-199,
-220,
-155,
213,
630,
996,
994,
513,
241,
-164,
-673,
-1182,
-1671,
-1793,
-1430,
-704,
91,
737,
1330,
1701,
1685,
1299,
647,
-153,
-784,
-1135,
-1261,
-1104,
-864,
-556,
-165,
162,
342,
415,
395,
235,
-45,
-145,
-148,
-118,
-16,
152,
314,
283,
162,
-45,
-93,
-64,
-48,
-141,
-290,
-429,
-356,
-353,
-335,
-171,
-197,
-248,
-162,
95,
422,
670,
712,
637,
521,
355,
123,
-180,
-486,
-694,
-725,
-525,
-222,
19,
114,
-20,
-31,
36,
-55,
-33,
104,
168,
313,
628,
899,
1067,
731,
182,
-226,
-601,
-796,
-888,
-815,
-513,
-180,
130,
303,
450,
509,
429,
181,
-74,
-247,
-169,
-90,
32,
171,
433,
719,
745,
561,
175,
-191,
-573,
-974,
-1217,
-1223,
-1129,
-840,
-422,
182,
737,
1175,
1320,
1303,
1224,
958,
546,
137,
-161,
-436,
-641,
-686,
-595,
-430,
-235,
-38,
134,
325,
412,
204,
-155,
-207,
-231,
-154,
90,
307,
626,
944,
1009,
943,
770,
299,
-208,
-641,
-1142,
-1145,
-902,
-693,
-465,
-337,
-165,
83,
279,
380,
247,
127,
246,
303,
372,
319,
287,
213,
38,
-113,
-355,
-581,
-676,
-644,
-508,
-420,
-325,
-433,
-420,
-148,
167,
459,
557,
648,
689,
672,
564,
426,
313,
153,
-166,
-504,
-625,
-640,
-631,
-628,
-579,
-483,
-207,
15,
246,
475,
494,
384,
272,
228,
222,
228,
350,
509,
627,
508,
323,
33,
-255,
-526,
-810,
-867,
-781,
-524,
-235,
51,
227,
343,
440,
478,
401,
308,
204,
310,
519,
603,
431,
152,
-146,
-417,
-693,
-759,
-682,
-511,
-415,
-303,
-141,
119,
406,
485,
603,
644,
514,
356,
206,
122,
125,
92,
-76,
-280,
-361,
-248,
-143,
-84,
-21,
29,
-83,
-147,
-197,
-155,
-177,
-201,
-123,
31,
205,
404,
573,
702,
704,
669,
467,
99,
-285,
-673,
-889,
-943,
-812,
-608,
-416,
-61,
203,
356,
561,
637,
537,
317,
161,
2,
-58,
-85,
-113,
-190,
-148,
-81,
-91,
-170,
-268,
-408,
-562,
-456,
-385,
-239,
-16,
153,
368,
425,
424,
239,
65,
-28,
-41,
-22,
12,
99,
160,
178,
34,
-183,
-340,
-366,
-315,
-235,
-226,
-132,
-29,
86,
142,
155,
232,
245,
259,
194,
19,
-56,
-32,
-75,
-200,
-363,
-433,
-433,
-343,
-290,
-227,
-62,
44,
152,
169,
134,
67,
1,
39,
105,
107,
37,
-9,
-10,
36,
106,
109,
-31,
-168,
-305,
-386,
-361,
-202,
-76,
-45,
-21,
167,
348,
347,
312,
264,
135,
-88,
-340,
-437,
-270,
69,
386,
559,
482,
357,
177,
-66,
-246,
-337,
-409,
-438,
-273,
-24,
104,
209,
341,
468,
499,
440,
331,
101,
-7,
-219,
-329,
-337,
-229,
-116,
-81,
-31,
12,
85,
88,
92,
133,
220,
170,
110,
44,
-88,
-190,
-80,
8,
63,
122,
179,
237,
242,
187,
77,
-28,
-164,
-273,
-217,
-21,
214,
353,
348,
344,
247,
142,
39,
-135,
-282,
-265,
-194,
-116,
17,
222,
353,
444,
376,
159,
-72,
-221,
-264,
-220,
-154,
-96,
-1,
151,
314,
378,
346,
225,
28,
-225,
-370,
-366,
-202,
-46,
120,
264,
414,
403,
295,
238,
151,
115,
79,
4,
-106,
-162,
-230,
-204,
-181,
-103,
-16,
6,
-19,
-33,
-76,
-106,
-50,
44,
147,
171,
135,
58,
-21,
-94,
-85,
-98,
-78,
-77,
-143,
-150,
-199,
-243,
-218,
-182,
-161,
-105,
12,
128,
189,
156,
21,
-203,
-365,
-418,
-411,
-340,
-188,
-32,
78,
144,
174,
236,
331,
253,
39,
-162,
-337,
-345,
-350,
-249,
-211,
-180,
-82,
54,
164,
289,
366,
460,
458,
237,
11,
-166,
-285,
-232,
-110,
-3,
33,
41,
21,
-13,
51,
169,
217,
176,
112,
64,
13,
-7,
50,
163,
317,
292,
157,
34,
-152,
-281,
-318,
-359,
-373,
-298,
-182,
2,
180,
319,
311,
262,
109,
-46,
-214,
-257,
-154,
1,
100,
189,
152,
51,
-54,
-122,
-192,
-321,
-424,
-437,
-339,
-124,
98,
290,
391,
434,
403,
318,
207,
90,
-75,
-164,
-226,
-253,
-266,
-209,
-122,
-71,
3,
118,
141,
50,
-19,
-10,
18,
29,
-3,
-49,
-104,
-93,
-68,
-30,
-9,
40,
76,
65,
37,
-5,
-28,
-108,
-291,
-378,
-418,
-398,
-246,
-104,
140,
283,
401,
434,
312,
213,
125,
28,
-93,
-153,
-169,
-193,
-104,
13,
132,
190,
210,
209,
165,
83,
71,
0,
-52,
-19,
34,
66,
99,
152,
215,
173,
107,
4,
-35,
-11,
3,
10,
-43,
-92,
-113,
-110,
-67,
-23,
24,
63,
70,
56,
47,
-29,
-93,
-83,
-34,
27,
48,
27,
76,
109,
93,
59,
42,
14,
-73,
-173,
-217,
-171,
-85,
13,
114,
136,
187,
204,
178,
128,
82,
70,
22,
-1,
-8,
-24,
-9,
-60,
-40,
-48,
-43,
-82,
-98,
-88,
-35,
19,
109,
159,
194,
178,
116,
83,
65,
-7,
-96,
-181,
-173,
-174,
-166,
-190,
-198,
-179,
-119,
-47,
-11,
52,
90,
154,
173,
156,
131,
57,
-38,
-105,
-147,
-134,
-113,
-86,
-66,
-48,
15,
75,
130,
103,
86,
52,
5,
-66,
-66,
-26,
-4,
40,
37,
-1,
-32,
-53,
-44,
-28,
-6,
16,
32,
56,
98,
158,
185,
118,
41,
-5,
-56,
-87,
-67,
-37,
10,
21,
6,
-16,
19,
51,
28,
31,
8,
15,
-23,
-16,
-11,
20,
28,
-4,
-70,
-96,
-98,
-82,
-83,
-47,
14,
73,
62,
84,
134,
151,
174,
136,
68,
-35,
-106,
-139,
-152,
-169,
-166,
-139,
-120,
-38,
23,
93,
120,
171,
172,
149,
125,
50,
-9,
-61,
-75,
-62,
-75,
-121,
-102,
-85,
-58,
-22,
-28,
-123,
-156,
-125,
-9,
91,
150,
199,
239,
182,
125,
56,
-19,
-89,
-127,
-170,
-210,
-198,
-173,
-96,
7,
79,
131,
99,
34,
-25,
-12,
28,
64,
61,
57,
61,
46,
24,
16,
21,
0,
-45,
-87,
-73,
-36,
-3,
12,
-5,
-3,
-10,
-24,
-35,
-49,
-19,
50,
118,
149,
87,
26,
-20,
-35,
-61,
-86,
-110,
-78,
-5,
24,
59,
82,
67,
46,
-3,
-47,
-124,
-152,
-140,
-84,
-3,
72,
100,
105,
106,
104,
58,
-15,
-77,
-127,
-133,
-125,
-91,
-43,
23,
91,
117,
92,
36,
-32,
-98,
-115,
-79,
-20,
42,
81,
108,
103,
76,
36,
-10,
-52,
-77,
-132,
-142,
-109,
-33,
59,
119,
110,
89,
67,
45,
34,
19,
41,
60,
69,
55,
30,
-17,
-35,
-32,
-11,
1,
15,
23,
17,
24,
45,
76,
58,
29,
-19,
-39,
-60,
-40,
-12,
35,
65,
66,
40,
29,
-1,
3,
-17,
-39,
-66,
-70,
-60,
-33,
6,
49,
32,
-17,
-39,
-39,
-37,
-41,
-29,
4,
42,
48,
64,
82,
64,
36,
-24,
-78,
-136,
-133,
-119,
-77,
-31,
18,
44,
29,
-8,
-28,
-41,
-26,
-7,
16,
23,
52,
47,
52,
30,
-22,
-54,
-75,
-65,
-36,
14,
63,
95,
97,
87,
45,
-16,
-29,
-38,
-31,
-47,
-47,
-19,
4,
42,
55,
70,
69,
50,
31,
17,
-9,
-9,
-34,
-25,
-28,
-4,
16,
32,
52,
44,
35,
27,
54,
56,
34,
13,
8,
-8,
-10,
-11,
-5,
-12,
-5,
-7,
-14,
-4,
7,
-2,
-3,
-16,
-32,
-36,
-33,
-5,
16,
24,
22,
25,
29,
41,
37,
6,
-21,
-49,
-73,
-77,
-83,
-86,
-51,
-27,
15,
30,
54,
72,
78,
69,
53,
29,
-27,
-97,
-110,
-117,
-112,
-105,
-64,
5,
45,
83,
80,
74,
44,
22,
-9,
-45,
-56,
-61,
-40,
-29,
-2,
13,
16,
5,
-1,
6,
24,
28,
8,
-1,
-25,
-52,
-71,
-58,
-58,
-47,
-29,
13,
45,
48,
31,
19,
22,
47,
57,
30,
-7,
-50,
-57,
-50,
-12,
24,
56,
72,
57,
25,
-19,
-28,
-39,
-52,
-54,
-55,
-46,
-7,
27,
56,
78,
79,
78,
60,
24,
-19,
-65,
-80,
-78,
-57,
-41,
-12,
0,
10,
18,
27,
15,
34,
42,
44,
54,
71,
83,
46,
-16,
-76,
-83,
-92,
-70,
-61,
-39,
-21,
13,
19,
-8,
-26,
-1,
31,
36,
50,
58,
60,
30,
11,
-9,
-34,
-56,
-57,
-59,
-57,
-42,
-3,
49,
77,
96,
89,
66,
31,
5,
-23,
-43,
-27,
-6,
-21,
-38,
-19,
2,
17,
-2,
-22,
-31,
-2,
14,
22,
20,
18,
21,
35,
33,
16,
29,
27,
23,
24,
22,
0,
-44,
-74,
-80,
-49,
-16,
12,
-27,
-43,
-15,
38,
47,
43,
51,
55,
53,
8,
-28,
-75,
-98,
-73,
-16,
-7,
6,
48,
75,
81,
49,
7,
-17,
-18,
-34,
-24,
-25,
-21,
-6,
15,
-5,
-11,
-6,
0,
27,
48,
93,
82,
47,
-21,
-61,
-116,
-114,
-84,
-80,
-63,
-38,
8,
41,
65,
89,
92,
76,
55,
28,
-23,
-62,
-43,
3,
26,
38,
25,
21,
-10,
-36,
-34,
-48,
-67,
-46,
-21,
3,
59,
106,
122,
96,
71,
48,
17,
-30,
-45,
-31,
-10,
-15,
-41,
-72,
-78,
-30,
-15,
-10,
0,
21,
41,
9,
23,
29,
59,
74,
50,
5,
-24,
-26,
-16,
-11,
-13,
-30,
-56,
-79,
-95,
-90,
-53,
-6,
38,
69,
81,
75,
68,
50,
45,
33,
15,
-23,
-56,
-82,
-102,
-95,
-38,
16,
31,
30,
8,
-7,
-24,
-16,
-12,
-2,
10,
12,
29,
33,
33,
38,
26,
7,
5,
6,
-4,
10,
19,
34,
25,
12,
-7,
-1,
16,
28,
15,
-10,
-19,
-19,
-10,
4,
13,
-3,
-16,
0,
29,
48,
21,
-4,
-21,
-18,
-13,
-27,
-25,
-22,
-3,
9,
-10,
-9,
9,
31,
24,
-8,
-25,
-25,
7,
-1,
-4,
-32,
-28,
-24,
-29,
-26,
-33,
-23,
-25,
-16,
-26,
-35,
-54,
-23,
9,
42,
32,
26,
16,
28,
4,
-18,
-26,
-18,
-20,
-26,
-31,
-5,
21,
36,
20,
-4,
-13,
-27,
-23,
-40,
-42,
-18,
11,
23,
28,
21,
35,
49,
43,
25,
8,
8,
-25,
-27,
-32,
-29,
-47,
-37,
-14,
1,
1,
-11,
1,
39,
61,
62,
48,
60,
45,
11,
-11,
-17,
-31,
-59,
-74,
-79,
-60,
-13,
-6,
-24,
-34,
-30,
3,
21,
38,
39,
51,
82,
101,
95,
50,
-3,
-20,
-38,
-47,
-50,
-45,
-31,
-35,
-50,
-41,
-28,
11,
34,
40,
43,
40,
23,
16,
-4,
4,
10,
52,
39,
25,
-3,
-10,
-22,
-32,
-33,
-24,
-21,
-11,
3,
-1,
17,
29,
47,
37,
23,
12,
-5,
-35,
-58,
-38,
-46,
-39,
-24,
-7,
17,
38,
35,
42,
13,
33,
10,
-7,
-34,
-38,
-16,
8,
35,
53,
52,
12,
-4,
1,
23,
26,
43,
47,
45,
50,
93,
125,
167,
141,
110,
25,
-32,
-99,
-102,
-111,
-85,
-66,
-18,
36,
76,
103,
99,
120,
146,
160,
114,
94,
54,
37,
-22,
-42,
-63,
-57,
-102,
-139,
-133,
-102,
-62,
-28,
24,
70,
102,
108,
108,
69,
64,
77,
59,
31,
33,
40,
24,
7,
2,
-20,
-52,
-89,
-110,
-129,
-161,
-146,
-112,
-49,
1,
53,
112,
165,
167,
128,
69,
35,
16,
-1,
-51,
-92,
-120,
-128,
-94,
-48,
12,
101,
154,
175,
166,
126,
57,
-25,
-73,
-131,
-188,
-214,
-168,
-120,
-49,
13,
119,
239,
291,
308,
265,
194,
91,
-24,
-129,
-215,
-244,
-243,
-172,
-100,
-21,
26,
113,
175,
214,
220,
179,
135,
125,
142,
119,
122,
60,
7,
-56,
-107,
-118,
-130,
-119,
-110,
-114,
-149,
-168,
-136,
-72,
16,
59,
101,
114,
159,
154,
146,
116,
94,
61,
-6,
-111,
-208,
-290,
-292,
-248,
-168,
-120,
-89,
-71,
-24,
41,
127,
178,
169,
140,
98,
21,
-23,
-43,
-12,
2,
42,
20,
-1,
-88,
-127,
-167,
-123,
-80,
-25,
25,
69,
102,
111,
85,
55,
18,
-1,
10,
7,
-39,
-66,
-61,
-24,
12,
14,
17,
63,
133,
172,
164,
115,
89,
37,
-33,
-135,
-196,
-197,
-181,
-123,
-90,
-12,
30,
126,
159,
209,
231,
258,
278,
249,
216,
107,
-27,
-176,
-286,
-356,
-399,
-359,
-309,
-179,
-78,
70,
207,
331,
393,
394,
362,
288,
189,
39,
-120,
-216,
-286,
-241,
-157,
-80,
22,
87,
153,
146,
106,
5,
-117,
-165,
-190,
-174,
-88,
72,
224,
290,
318,
345,
301,
258,
106,
-33,
-204,
-337,
-443,
-390,
-242,
-63,
85,
220,
299,
313,
302,
269,
189,
90,
-27,
-138,
-175,
-221,
-198,
-142,
-54,
13,
71,
98,
99,
153,
163,
123,
68,
4,
-41,
-62,
-88,
-131,
-146,
-135,
-107,
-35,
27,
101,
107,
140,
197,
258,
306,
305,
234,
147,
53,
-52,
-216,
-323,
-400,
-352,
-288,
-177,
-42,
74,
176,
222,
270,
322,
324,
257,
177,
62,
3,
0,
2,
-27,
-98,
-129,
-175,
-214,
-254,
-262,
-197,
-108,
7,
96,
150,
200,
259,
324,
342,
310,
202,
49,
-134,
-231,
-226,
-154,
-99,
-49,
-12,
29,
71,
107,
65,
25,
-69,
-147,
-195,
-151,
-75,
59,
150,
294,
402,
460,
395,
236,
60,
-161,
-312,
-378,
-407,
-330,
-178,
-27,
110,
213,
277,
330,
302,
167,
-26,
-236,
-409,
-470,
-443,
-299,
-107,
100,
289,
425,
532,
548,
471,
250,
-35,
-262,
-464,
-518,
-534,
-471,
-354,
-212,
-27,
121,
273,
362,
371,
344,
250,
163,
74,
28,
-21,
-10,
2,
9,
-72,
-166,
-272,
-304,
-293,
-230,
-173,
-73,
16,
65,
158,
271,
307,
318,
259,
165,
57,
-19,
-60,
-54,
-15,
41,
79,
86,
28,
-74,
-200,
-275,
-302,
-248,
-191,
-75,
67,
251,
406,
528,
564,
483,
314,
65,
-149,
-295,
-385,
-400,
-354,
-259,
-157,
12,
188,
351,
453,
377,
242,
90,
-40,
-126,
-193,
-199,
-187,
-90,
42,
160,
239,
252,
196,
148,
53,
-13,
-69,
-113,
-91,
-89,
-73,
-78,
-31,
-13,
-25,
-82,
-166,
-188,
-178,
-116,
-30,
61,
165,
319,
401,
451,
361,
221,
27,
-140,
-270,
-338,
-382,
-377,
-329,
-191,
-20,
140,
225,
233,
209,
198,
236,
284,
331,
313,
251,
154,
52,
-57,
-156,
-235,
-304,
-321,
-321,
-232,
-127,
2,
132,
275,
371,
441,
425,
252,
77,
-30,
-92,
-61,
47,
139,
164,
189,
134,
29,
-71,
-184,
-296,
-352,
-392,
-341,
-215,
-37,
175,
364,
529,
616,
596,
442,
128,
-111,
-353,
-504,
-551,
-510,
-386,
-163,
102,
358,
517,
555,
447,
265,
16,
-230,
-409,
-477,
-472,
-441,
-363,
-196,
37,
332,
519,
556,
492,
343,
171,
18,
-139,
-247,
-280,
-267,
-240,
-170,
-117,
-106,
-72,
-38,
-23,
-12,
20,
33,
74,
144,
261,
410,
468,
417,
300,
63,
-154,
-311,
-361,
-292,
-263,
-201,
-160,
-21,
86,
170,
129,
80,
23,
-39,
-48,
-3,
83,
238,
387,
453,
444,
340,
85,
-128,
-360,
-471,
-558,
-543,
-460,
-268,
-25,
178,
336,
477,
461,
357,
221,
38,
-115,
-211,
-208,
-130,
-52,
70,
178,
198,
78,
-44,
-135,
-171,
-179,
-163,
-153,
-124,
-36,
176,
318,
413,
334,
90,
-135,
-366,
-497,
-470,
-334,
-163,
80,
324,
955,
2392,
3483,
3441,
2347,
-453,
-3639,
-6084,
-7509,
-7655,
-6987,
-4818,
-2224,
1616,
5798,
7832,
8387,
7231,
5127,
2639,
186,
-1471,
-3095,
-3695,
-2826,
-1503,
243,
1206,
846,
-175,
-1236,
-2162,
-3106,
-3259,
-2869,
-1883,
277,
2800,
5032,
5772,
4954,
3839,
2812,
1437,
135,
-961,
-2541,
-3301,
-2909,
-2316,
-1347,
-251,
-136,
-503,
-1204,
-1578,
-829,
394,
1363,
2526,
3778,
4252,
4203,
3156,
929,
-1358,
-3012,
-4330,
-4780,
-4143,
-2909,
-424,
2493,
4396,
4861,
3848,
1713,
-613,
-1972,
-3205,
-4175,
-4418,
-3606,
-1624,
342,
2288,
3869,
4758,
4299,
2785,
1540,
37,
-662,
-1101,
-1951,
-1948,
-1945,
-713,
616,
914,
332,
-1645,
-3979,
-4911,
-4788,
-4039,
-2542,
-600,
3094,
6866,
10811,
12985,
11552,
7504,
2015,
-3831,
-8710,
-11195,
-11902,
-11186,
-8770,
-3864,
1281,
6218,
8764,
8879,
7496,
5213,
3156,
210,
-2515,
-4138,
-3592,
-1505,
1445,
3875,
3205,
1405,
371,
-1041,
-2056,
-2727,
-3942,
-4527,
-3437,
-1712,
-272,
828,
892,
1337,
2128,
2157,
2670,
3265,
3025,
2513,
1635,
87,
-1175,
-2545,
-5308,
-6796,
-6163,
-4784,
-2168,
427,
2158,
5246,
7944,
7856,
5901,
2433,
-2110,
-5094,
-7722,
-10464,
-9774,
-7147,
-1167,
5479,
10367,
13466,
12384,
8769,
3217,
-1048,
-4844,
-8731,
-11197,
-12226,
-11161,
-8430,
-3403,
2806,
7737,
9563,
8494,
6118,
2856,
221,
-599,
-922,
-1423,
-580,
1346,
2402,
2889,
2103,
280,
-2056,
-4752,
-6886,
-8871,
-8862,
-7314,
-3896,
1268,
6761,
10544,
10690,
8739,
5092,
2298,
1060,
-970,
-4424,
-6803,
-6964,
-6333,
-2818,
1233,
2697,
2763,
827,
-825,
-1374,
-2476,
-3145,
-2554,
-1088,
1091,
2642,
1196,
-373,
-259,
1249,
3047,
3480,
2131,
1595,
2243,
1615,
1464,
-159,
-2782,
-4251,
-5903,
-6434,
-4517,
-2241,
1374,
5977,
9398,
10153,
6927,
2070,
-2995,
-5689,
-5769,
-5691,
-4575,
-2019,
761,
6143,
10187,
13567,
14188,
9178,
1664,
-6936,
-13057,
-16282,
-16308,
-14608,
-9655,
-1211,
7092,
13300,
16671,
16379,
14764,
10656,
4357,
-3063,
-9769,
-12659,
-13097,
-10666,
-7291,
-3364,
1035,
3995,
5517,
5521,
2743,
-504,
-1493,
-1684,
-1107,
-156,
315,
766,
1476,
2768,
3100,
2398,
833,
-353,
-1531,
-771,
677,
712,
-810,
-3802,
-4901,
-5159,
-4299,
-1258,
2110,
4350,
7402,
8545,
5749,
2088,
-1601,
-3418,
-4392,
-5705,
-5934,
-4941,
-2473,
2156,
7284,
10074,
10435,
6061,
-1270,
-6060,
-9358,
-10591,
-8331,
-5389,
-1767,
1740,
4506,
7427,
7988,
7517,
6161,
3262,
-354,
-3453,
-5779,
-7480,
-6720,
-1604,
3137,
6302,
7067,
2341,
-756,
-2858,
-4742,
-4569,
-4888,
-3961,
-1562,
776,
2338,
4523,
6841,
7899,
8106,
5631,
2379,
-1462,
-5996,
-8396,
-8010,
-6520,
-5267,
-5558,
-6321,
-3857,
512,
5577,
10729,
11780,
9146,
6442,
1731,
-899,
-3210,
-6907,
-9635,
-11031,
-8745,
-4061,
1469,
6554,
12207,
14247,
11687,
5673,
-3229,
-9717,
-13369,
-13678,
-10086,
-5180,
-910,
3539,
7179,
9897,
12838,
12459,
6451,
-434,
-6572,
-10185,
-9587,
-9022,
-4843,
323,
5352,
8762,
8512,
7062,
1834,
-3036,
-6596,
-8017,
-6841,
-6402,
-6578,
-5548,
-1012,
8416,
14955,
13388,
9558,
4494,
-660,
-4887,
-7419,
-7770,
-7088,
-5563,
-5638,
-4941,
-2939,
20,
3626,
6330,
8586,
8119,
4068,
-1230,
-4170,
-2280,
1644,
2470,
-385,
-2960,
-3816,
-2827,
-773,
1344,
2054,
257,
-1099,
-2217,
-748,
-391,
-2380,
-717,
708,
2062,
3751,
2307,
2353,
4106,
3733,
2998,
-1819,
-6638,
-7710,
-9795,
-7397,
-1476,
4381,
8964,
10292,
9477,
6677,
4009,
-947,
-5612,
-8058,
-9696,
-10870,
-10837,
-6003,
2260,
11445,
18045,
18772,
13145,
2811,
-6363,
-11930,
-13439,
-10371,
-6844,
-5694,
-5222,
-3001,
2512,
9288,
12683,
12578,
8098,
1677,
-4468,
-8794,
-9118,
-7066,
-2867,
523,
3658,
6818,
7430,
7094,
4763,
2156,
-1238,
-6657,
-9981,
-11524,
-9661,
-5522,
-421,
4329,
7056,
9005,
8457,
6448,
3653,
1389,
1146,
-437,
-2346,
-4676,
-7712,
-8516,
-5941,
-1782,
4444,
8796,
8789,
7460,
4247,
1049,
-1083,
-3645,
-5279,
-5965,
-7737,
-6803,
-3934,
2515,
10778,
15267,
14508,
8112,
-649,
-6894,
-9742,
-10999,
-9124,
-7191,
-4418,
-621,
5090,
9021,
12298,
11586,
4032,
-2428,
-9992,
-12577,
-12742,
-9760,
-2267,
5111,
13561,
16153,
14973,
10309,
1911,
-2979,
-7033,
-10843,
-12905,
-15082,
-15485,
-11260,
-752,
10041,
18440,
20702,
16057,
8520,
-731,
-7272,
-9608,
-10246,
-9562,
-8175,
-5443,
-1170,
2923,
7311,
9872,
11026,
7114,
-206,
-6418,
-11329,
-9751,
-5834,
-1173,
4194,
5077,
5230,
5124,
6779,
9021,
7480,
2166,
-4780,
-9545,
-11702,
-10970,
-9131,
-5338,
-777,
3081,
7074,
8698,
7305,
6705,
5772,
4267,
603,
-5011,
-10518,
-15480,
-13482,
-6401,
1600,
9601,
14830,
16188,
12924,
7502,
-344,
-6418,
-8556,
-11879,
-13159,
-11879,
-8440,
-3816,
4092,
12242,
17304,
17660,
9111,
-1285,
-7551,
-8924,
-8140,
-5589,
-5199,
-3962,
-1679,
2247,
7820,
9532,
9008,
3357,
-3297,
-9296,
-11394,
-10568,
-8379,
-2379,
4419,
10675,
12764,
9785,
5762,
4430,
3417,
225,
-4856,
-9370,
-11874,
-10534,
-7521,
-4340,
52,
2489,
4399,
6699,
8022,
6871,
2883,
472,
-1597,
-3923,
-6539,
-8918,
-8445,
-4710,
3040,
9816,
12680,
12989,
9039,
2905,
-2354,
-7212,
-10829,
-13986,
-13731,
-11054,
-3858,
3650,
12347,
20155,
19778,
16655,
5863,
-5179,
-12807,
-17820,
-15618,
-11475,
-4674,
3451,
8811,
12641,
13895,
12389,
7098,
-1450,
-9205,
-15348,
-18170,
-16267,
-11356,
-3007,
6610,
14519,
18428,
18000,
13373,
5584,
-760,
-5775,
-10378,
-13220,
-13981,
-11844,
-6236,
-375,
5807,
7333,
6796,
6280,
3589,
1414,
-143,
-1372,
-2140,
-735,
-754,
122,
549,
1071,
3160,
2739,
3465,
2448,
-2090,
-5009,
-5277,
-3553,
-2821,
-3250,
-4061,
-2616,
345,
4109,
8887,
10063,
8698,
7030,
2564,
-1160,
-4410,
-8653,
-9995,
-10327,
-6215,
-649,
3918,
9059,
12206,
13276,
8535,
-142,
-8497,
-14761,
-14519,
-12851,
-8261,
891,
5809,
12644,
17345,
15935,
13591,
5644,
-3772,
-11387,
-15879,
-16381,
-14563,
-10105,
-3172,
7561,
15071,
16756,
13832,
6308,
-1167,
-6988,
-10510,
-11472,
-10283,
-7545,
-2429,
5816,
15181,
19729,
17470,
9555,
473,
-6455,
-12644,
-14658,
-15288,
-13776,
-9770,
-5089,
1725,
8308,
12856,
14376,
14903,
11823,
6890,
822,
-6963,
-11663,
-9862,
-4843,
-1441,
1570,
1366,
1121,
2623,
3992,
4022,
1809,
-2180,
-5249,
-4864,
-3670,
-3053,
-1896,
1537,
5006,
7859,
8858,
5697,
3717,
2554,
-1523,
-4219,
-8107,
-11795,
-11847,
-10156,
-4964,
3210,
10635,
13234,
10968,
5464,
953,
-2757,
-8275,
-10686,
-10527,
-9929,
-4522,
733,
8626,
17246,
17489,
14824,
8089,
-2137,
-10900,
-17960,
-21436,
-19084,
-11493,
-2671,
4945,
11268,
15374,
16493,
12904,
6322,
-1069,
-8201,
-13086,
-14567,
-11712,
-3486,
5647,
11453,
13059,
13392,
8601,
49,
-5634,
-12101,
-14240,
-14240,
-13453,
-11090,
-5587,
3124,
12078,
19449,
20484,
14771,
6152,
-1409,
-5611,
-7662,
-9378,
-9146,
-8854,
-7440,
-4865,
-3116,
918,
6109,
8423,
7717,
4745,
497,
-2289,
-2189,
-1590,
-779,
-643,
-531,
-1558,
-355,
2779,
4576,
5342,
4315,
2448,
-398,
-3345,
-7004,
-8269,
-6476,
-3992,
-2356,
-45,
2712,
6238,
9650,
9221,
7127,
2412,
-4902,
-9222,
-11046,
-8075,
-1040,
4254,
9258,
12585,
11317,
7882,
1583,
-6035,
-9645,
-11976,
-14120,
-13564,
-10187,
-3281,
5622,
14431,
21517,
21024,
12950,
3633,
-4747,
-9086,
-10884,
-11601,
-10704,
-8132,
-2706,
2792,
9563,
12812,
10216,
5631,
-2105,
-8931,
-11106,
-12183,
-10704,
-4251,
4180,
11724,
14373,
13782,
12043,
8508,
2846,
-3332,
-9397,
-13897,
-16094,
-14421,
-8539,
-491,
6680,
9296,
9672,
9845,
7617,
4028,
-21,
-2638,
-866,
-913,
-1395,
-4159,
-5509,
-3553,
-1936,
2157,
4423,
3623,
918,
616,
1179,
2132,
1509,
-2848,
-7558,
-9523,
-7571,
-2679,
3538,
8264,
11835,
10514,
7432,
5652,
1611,
-2622,
-6076,
-9886,
-10818,
-8012,
-5108,
1844,
7558,
9787,
10723,
3876,
-4917,
-10026,
-13705,
-12197,
-5940,
273,
8236,
13395,
16128,
18965,
15759,
7230,
-2573,
-12952,
-19051,
-20231,
-19442,
-14049,
-3986,
5303,
13489,
17453,
12408,
6793,
1773,
-3748,
-5760,
-6888,
-6996,
-5605,
-2408,
3482,
8207,
10931,
8508,
1461,
-3750,
-8248,
-11429,
-11325,
-9456,
-4246,
114,
4089,
6807,
5997,
6366,
6354,
6137,
5355,
2764,
-1212,
-3224,
-1839,
-970,
-2373,
-3327,
-5440,
-6313,
-3519,
-661,
2933,
6391,
8985,
7654,
4093,
-329,
-5508,
-8166,
-7839,
-5535,
-2553,
1799,
5773,
11104,
13195,
11625,
6849,
-2647,
-9124,
-16429,
-19533,
-16601,
-10498,
-808,
8682,
14365,
14478,
13844,
6938,
-141,
-4756,
-10446,
-13331,
-12946,
-8167,
1229,
13017,
19470,
20110,
12282,
1839,
-8832,
-17133,
-19975,
-20601,
-15340,
-10627,
-1464,
9428,
16191,
21269,
17919,
13406,
7067,
-1636,
-8518,
-13886,
-13246,
-9572,
-3175,
3273,
5563,
4289,
2774,
-539,
-2095,
-2791,
-4525,
-5837,
-5436,
-1765,
2199,
7035,
8033,
7804,
5817,
3649,
1619,
-964,
-1648,
-2897,
-1646,
-1183,
-3206,
-5224,
-8068,
-7021,
-3063,
2630,
7716,
7440,
5987,
4043,
4034,
3941,
1436,
-2001,
-6967,
-10206,
-11304,
-7069,
2160,
10145,
16337,
16067,
10367,
1939,
-7412,
-12570,
-16092,
-15397,
-10171,
-5688,
780,
8316,
14122,
19196,
17645,
11275,
838,
-9687,
-16234,
-18249,
-11805,
-3944,
4001,
9789,
11003,
10917,
7983,
2850,
-3036,
-9009,
-12349,
-14479,
-13631,
-8526,
-858,
8108,
15641,
18551,
16012,
9505,
938,
-5523,
-9065,
-10020,
-8310,
-5936,
-3889,
-1401,
-444,
447,
3123,
5343,
4738,
2446,
-1474,
-3814,
-3272,
-292,
3286,
2457,
1955,
566,
-1092,
965,
3098,
2800,
2282,
1154,
-1206,
-3711,
-7041,
-9000,
-6781,
-3226,
-202,
4370,
6467,
6376,
8239,
8846,
8496,
4750,
-2727,
-9667,
-15375,
-14166,
-6926,
653,
7654,
13058,
13988,
11214,
5884,
-1814,
-8119,
-11933,
-14168,
-13682,
-9750,
-5899,
1385,
10887,
19206,
22682,
15901,
5254,
-6459,
-13081,
-13080,
-12402,
-10550,
-6776,
-89,
8129,
12849,
13461,
9553,
2731,
-4597,
-9013,
-10931,
-11002,
-9821,
-4481,
4326,
12657,
16061,
13071,
7316,
-48,
-2066,
-4869,
-6243,
-6946,
-7235,
-5634,
-3844,
-1118,
2388,
3270,
2581,
3702,
2896,
760,
368,
1895,
1891,
2746,
-118,
-4327,
-6070,
-4561,
-1456,
2005,
4695,
7028,
5913,
2784,
-1612,
-5876,
-6627,
-7955,
-8067,
-6485,
-3402,
1945,
11389,
16143,
15814,
11078,
735,
-9059,
-14485,
-15866,
-13322,
-8640,
854,
9766,
14648,
17066,
13095,
6690,
-1159,
-6569,
-12179,
-18073,
-18652,
-15164,
-5719,
7308,
17326,
23153,
19924,
11857,
4562,
-2530,
-8937,
-13373,
-14862,
-15503,
-10550,
-3017,
4494,
9952,
11635,
10370,
4202,
-674,
-6573,
-10327,
-9679,
-5732,
187,
4759,
7142,
5101,
4132,
4092,
3974,
2500,
-642,
-4997,
-7876,
-7531,
-5566,
-3143,
-2755,
-3409,
-3635,
-2233,
583,
3718,
7731,
10406,
11894,
9780,
2847,
-4253,
-10353,
-13095,
-11473,
-6190,
-730,
4409,
8263,
10063,
11172,
9425,
3397,
-3792,
-12832,
-18545,
-15615,
-9204,
1337,
12129,
19029,
20347,
14958,
6482,
-2379,
-9284,
-13713,
-15860,
-11901,
-6907,
-617,
7251,
13294,
18678,
16124,
8721,
-3413,
-16311,
-21017,
-20686,
-14008,
-4133,
5187,
13716,
17037,
18661,
17071,
10362,
2237,
-8869,
-15681,
-18408,
-19434,
-14522,
-6637,
5225,
13161,
13591,
10772,
4992,
427,
-2087,
-4904,
-6548,
-3619,
-85,
1280,
985,
2657,
5162,
6949,
7298,
4540,
-707,
-7321,
-8393,
-4771,
-2215,
-3107,
-6413,
-9875,
-8898,
-4536,
2356,
10428,
15260,
17952,
15880,
9706,
768,
-6767,
-13953,
-18292,
-17328,
-13667,
-8102,
-747,
11759,
18904,
21331,
17096,
4367,
-6734,
-15866,
-19809,
-16066,
-12154,
-4927,
5476,
12795,
21473,
23414,
17972,
6291,
-5465,
-12478,
-17150,
-19037,
-18538,
-11044,
-794,
10514,
20204,
19592,
11259,
2722,
-5680,
-9950,
-9893,
-8444,
-7118,
-3647,
4428,
13500,
17283,
14666,
8207,
-304,
-7087,
-12065,
-13461,
-14031,
-8610,
-2414,
1625,
3648,
1854,
3437,
3651,
4515,
6180,
5654,
2682,
375,
1838,
3935,
1857,
-1275,
-4232,
-7220,
-5051,
-2993,
-22,
2573,
4148,
3751,
-506,
-4123,
-8148,
-8768,
-9716,
-6149,
1454,
7479,
14511,
18619,
19848,
13829,
3896,
-5980,
-14745,
-21352,
-23352,
-18574,
-10335,
1634,
13902,
21145,
22333,
16029,
6500,
-3096,
-11302,
-16664,
-19134,
-16115,
-10946,
36,
13271,
21937,
26808,
22076,
9811,
-2763,
-13762,
-20401,
-22109,
-20650,
-14207,
-3578,
6829,
14633,
16645,
14150,
8968,
2971,
-2498,
-7938,
-9819,
-7940,
-2380,
3844,
9548,
11298,
6376,
469,
-3740,
-6777,
-6855,
-6777,
-6075,
-4064,
-2625,
-349,
259,
1530,
1871,
1767,
4177,
6326,
5731,
7008,
6576,
4919,
3148,
-2190,
-7206,
-12968,
-15376,
-14142,
-9002,
-288,
7496,
10127,
10987,
7650,
1778,
-3043,
-8067,
-10628,
-10151,
-4960,
1245,
10733,
15927,
16367,
13118,
2519,
-6573,
-14567,
-21811,
-22761,
-17868,
-7051,
6416,
15996,
21661,
20338,
14473,
7933,
-860,
-10498,
-17132,
-18918,
-15610,
-6288,
7363,
16131,
22428,
21068,
12666,
3876,
-8558,
-15421,
-18433,
-17997,
-15384,
-9146,
-1151,
6887,
13880,
16007,
15438,
10705,
3940,
-2233,
-5740,
-5902,
-2228,
637,
1657,
433,
-3511,
-5355,
-4945,
-3443,
-1409,
-665,
66,
1170,
2853,
4261,
2391,
-501,
-3158,
-3309,
-1147,
578,
5351,
9133,
11341,
11526,
7141,
-498,
-9033,
-16463,
-21192,
-19602,
-12769,
-3846,
4404,
13347,
18393,
20397,
15278,
7054,
-840,
-9305,
-14405,
-16042,
-12499,
-3844,
6582,
13937,
18243,
14090,
6767,
-3074,
-12984,
-16551,
-15470,
-13621,
-9149,
-2612,
5069,
13676,
18476,
18163,
12325,
3065,
-7172,
-13574,
-14103,
-10134,
-4308,
2560,
7971,
10593,
9817,
5996,
146,
-4876,
-8480,
-10743,
-11894,
-10651,
-5583,
119,
4613,
7061,
8292,
7630,
6048,
3626,
4260,
5804,
4555,
2016,
-3206,
-10443,
-14666,
-15763,
-12266,
-5136,
1573,
8392,
10310,
10299,
8701,
7273,
3122,
-1792,
-6512,
-11385,
-10671,
-5623,
3126,
12475,
18811,
18788,
13865,
1254,
-9586,
-18924,
-23168,
-21149,
-16625,
-9069,
-576,
9779,
18033,
23735,
24045,
18296,
6627,
-4161,
-14458,
-17694,
-16955,
-12374,
-3056,
3608,
9062,
10645,
9134,
6455,
1717,
-3258,
-5068,
-10068,
-9798,
-7509,
-4805,
4407,
9750,
11590,
9204,
3820,
-989,
-2478,
-1152,
-51,
1634,
60,
-1767,
-5482,
-6574,
-3417,
-2783,
-938,
-93,
-4,
836,
10,
2449,
5606,
4054,
1135,
-2996,
-5201,
-5528,
-868,
6014,
10763,
10584,
6051,
1330,
-5776,
-10943,
-13728,
-14187,
-12473,
-9232,
-5582,
-667,
7097,
14540,
18196,
15556,
7677,
-908,
-8990,
-14910,
-13841,
-8641,
-1520,
5831,
11035,
12702,
8569,
2587,
-4143,
-10940,
-13790,
-15135,
-14450,
-10698,
-939,
11593,
20734,
26163,
21297,
12079,
2481,
-4999,
-9326,
-13695,
-14193,
-12799,
-8750,
-2070,
6216,
11958,
12568,
10864,
8044,
2213,
-3927,
-9224,
-11852,
-8220,
-1996,
5076,
6751,
6385,
5156,
3507,
4884,
4705,
2714,
134,
-3784,
-4209,
-3195,
-6117,
-7167,
-7822,
-6837,
-3819,
-185,
3817,
7008,
10371,
9938,
7990,
4188,
-2464,
-8554,
-11415,
-7280,
-3421,
496,
5121,
7721,
9387,
8584,
3801,
-3341,
-8126,
-14753,
-17417,
-15651,
-10346,
845,
11110,
18332,
21543,
17306,
9979,
1085,
-6158,
-8852,
-12781,
-13377,
-11230,
-3184,
4726,
9114,
12765,
8744,
2680,
-3529,
-10557,
-13286,
-10836,
-6315,
232,
6582,
11729,
14842,
13240,
10144,
4467,
-3334,
-9701,
-13597,
-14639,
-11568,
-5823,
-222,
5229,
7037,
8272,
6571,
1833,
-1019,
-2968,
-3577,
-1747,
940,
2772,
1780,
-305,
-849,
-1613,
312,
3544,
5844,
5573,
5183,
4078,
-325,
-4444,
-9473,
-14657,
-16343,
-13452,
-6791,
2865,
13632,
19230,
19211,
14924,
6299,
-454,
-5362,
-10475,
-11917,
-11355,
-9020,
-3757,
3200,
11299,
13145,
10346,
3621,
-6161,
-12902,
-16081,
-14347,
-9444,
-2300,
4963,
11148,
16287,
17415,
15084,
8290,
-1293,
-9054,
-15704,
-16245,
-13174,
-7601,
53,
4166,
7140,
6200,
3805,
763,
-2622,
-4680,
-5095,
-2215,
1750,
4920,
6293,
7519,
5934,
3218,
1038,
-1743,
-5326,
-7324,
-6449,
-3703,
-452,
671,
-214,
-3212,
-3217,
-4273,
-2518,
1009,
4350,
9873,
10137,
8268,
3147,
-2380,
-6856,
-9728,
-8240,
-5869,
-3792,
1712,
9139,
13602,
13136,
5645,
-3747,
-10681,
-14919,
-16454,
-14381,
-8976,
-1236,
9654,
17706,
21161,
19563,
12325,
5093,
-2142,
-9154,
-15779,
-18810,
-16659,
-9507,
667,
8646,
13398,
10721,
5782,
-1733,
-8338,
-9311,
-8470,
-5341,
-1410,
5054,
10156,
14983,
15912,
12366,
4746,
-3086,
-8800,
-14167,
-13060,
-10008,
-6086,
-930,
2097,
1819,
1575,
364,
298,
2573,
4118,
5495,
5776,
6340,
6398,
4130,
563,
-4285,
-8452,
-8380,
-5905,
-2829,
181,
3363,
4639,
4349,
1512,
-2477,
-6221,
-10025,
-8015,
-3922,
3595,
10332,
13551,
14638,
13587,
8102,
-904,
-7671,
-14495,
-16922,
-14398,
-8128,
899,
10582,
14633,
14825,
9930,
2277,
-4218,
-10213,
-14191,
-14198,
-10655,
-5397,
5185,
13462,
21707,
23883,
16889,
8409,
-2617,
-12150,
-17561,
-20067,
-17445,
-9934,
-1701,
7206,
10479,
9614,
6739,
1173,
-1181,
-3299,
-4677,
-4469,
-1605,
3630,
10225,
12781,
9148,
3967,
-1653,
-5006,
-7963,
-9919,
-10067,
-7774,
-3670,
851,
1742,
48,
-2093,
-2035,
1942,
6755,
9313,
8158,
6857,
6431,
7001,
3886,
-2461,
-8932,
-13453,
-14083,
-11449,
-2800,
3618,
7475,
10031,
7375,
4907,
-204,
-4986,
-8187,
-8589,
-4229,
1532,
5962,
11422,
14518,
14060,
10067,
1002,
-6332,
-16795,
-21633,
-19870,
-13140,
-1710,
8147,
15120,
15348,
13666,
7821,
-663,
-7757,
-13778,
-16447,
-14152,
-8370,
1261,
12214,
20035,
22373,
15906,
6544,
-4738,
-13835,
-18516,
-19372,
-14640,
-8532,
-2482,
2036,
7043,
9369,
9415,
8208,
4120,
-166,
-2449,
-4372,
-2825,
2906,
5857,
6755,
4086,
144,
-3734,
-7834,
-8865,
-7626,
-5472,
-2302,
493,
1930,
2927,
493,
-1734,
518,
2406,
4622,
6174,
3555,
4402,
6496,
7713,
7116,
-707,
-9455,
-17498,
-18921,
-14211,
-6151,
4121,
9760,
12266,
12612,
10194,
3537,
-2771,
-7381,
-11324,
-11237,
-7562,
-3065,
5146,
13933,
17542,
17322,
9181,
-2354,
-11788,
-19995,
-21305,
-16416,
-8977,
-882,
7238,
13862,
17155,
15757,
8872,
2185,
-6211,
-12822,
-13687,
-13067,
-5881,
4363,
11876,
18282,
16613,
10158,
1579,
-9180,
-14718,
-15703,
-13474,
-10472,
-7551,
-1996,
5101,
12876,
15605,
14141,
10602,
3944,
-404,
-3338,
-3238,
-2288,
-811,
834,
-1864,
-4078,
-7225,
-8902,
-7169,
-4284,
-1051,
1275,
2286,
2566,
5055,
3980,
2889,
370,
-4227,
-5368,
-3223,
282,
7309,
12714,
12426,
10350,
258,
-8507,
-13518,
-15626,
-14443,
-8795,
-3369,
2943,
12072,
16549,
18591,
15221,
6654,
-1204,
-8538,
-15273,
-15161,
-12038,
-3963,
5182,
11974,
17091,
14895,
9289,
1879,
-6316,
-11337,
-13328,
-14247,
-14537,
-9040,
611,
10485,
19093,
18835,
14280,
5655,
-2950,
-7315,
-10472,
-6941,
-3324,
190,
5178,
6242,
5633,
2696,
845,
-1401,
-4474,
-5083,
-7801,
-7603,
-4560,
-130,
4549,
5693,
4342,
1926,
1076,
1991,
4163,
5097,
6539,
5974,
3514,
1038,
-5443,
-11280,
-14516,
-15305,
-10776,
-3277,
3170,
8815,
12313,
15277,
14784,
8933,
2525,
-7510,
-14015,
-14015,
-9494,
-1307,
5598,
12220,
13455,
9708,
2775,
-6175,
-10799,
-13969,
-14397,
-12146,
-8593,
-19,
6920,
14059,
18530,
16052,
11423,
1212,
-10143,
-16294,
-17278,
-12401,
-5008,
2448,
9079,
11708,
12311,
8725,
810,
-5666,
-10480,
-13817,
-15449,
-12976,
-8136,
-131,
10092,
14112,
15313,
12379,
6489,
1333,
-1794,
-2717,
-3917,
-2776,
-2075,
-2369,
-5944,
-7028,
-5415,
-2389,
3775,
5534,
2354,
313,
-505,
331,
3698,
2508,
-64,
-3033,
-4154,
-2929,
924,
7776,
11651,
13839,
11055,
3276,
-6214,
-15284,
-20891,
-21702,
-17760,
-9011,
-2096,
7014,
16297,
21183,
22554,
16167,
8358,
-2591,
-11823,
-17661,
-19540,
-15578,
-7830,
1916,
8608,
13052,
12662,
8255,
1996,
-3843,
-7497,
-9131,
-12353,
-13370,
-9447,
-2763,
8131,
15393,
16130,
12664,
5202,
-1506,
-5079,
-5261,
-5293,
-3664,
-1901,
-1452,
-79,
-195,
-2064,
-1204,
-370,
-758,
-853,
-3783,
-3285,
-1977,
3265,
6081,
5377,
3373,
493,
111,
1810,
6066,
8614,
9317,
5693,
1042,
-3810,
-9245,
-13373,
-14038,
-11750,
-5639,
-1662,
5222,
11036,
12932,
15936,
13605,
8331,
849,
-7156,
-13769,
-14770,
-7917,
910,
8980,
12842,
11182,
7419,
-888,
-8005,
-11545,
-13907,
-13834,
-12637,
-7279,
1930,
10689,
18437,
22636,
18725,
10899,
1780,
-10480,
-16941,
-18597,
-16907,
-9606,
-2499,
4532,
10910,
12089,
12052,
9901,
4795,
-628,
-8985,
-13135,
-14876,
-11423,
-3985,
3204,
10161,
10934,
9912,
7450,
4809,
5853,
3943,
1309,
-1400,
-4474,
-6333,
-8710,
-10427,
-8141,
-3499,
-270,
2436,
2312,
3840,
6102,
9096,
9924,
7891,
2139,
-4090,
-8141,
-8819,
-3522,
90,
5221,
7084,
7147,
4070,
-1409,
-5467,
-9259,
-10496,
-12544,
-11988,
-7354,
-1617,
7480,
17293,
23004,
23470,
14284,
1011,
-8822,
-14078,
-15993,
-14777,
-12334,
-7862,
-494,
5838,
11899,
13672,
8465,
4020,
-1682,
-7776,
-10263,
-12070,
-8630,
-3237,
6212,
13947,
15861,
14137,
7892,
1279,
-5018,
-8298,
-11795,
-11399,
-9770,
-6973,
416,
6626,
8954,
8285,
6733,
2445,
-479,
-4574,
-7913,
-7139,
-4393,
-437,
1783,
2728,
4576,
7543,
8325,
9353,
6890,
1101,
-4589,
-10751,
-10854,
-8888,
-8589,
-7966,
-8307,
-6409,
-1980,
4990,
12282,
15299,
16954,
14854,
8980,
263,
-8715,
-12926,
-15406,
-13579,
-8403,
-3355,
3145,
7896,
10106,
11020,
6449,
-556,
-5907,
-13040,
-14036,
-11037,
-5470,
3238,
10661,
16904,
19200,
17064,
9966,
671,
-9159,
-15310,
-18526,
-18121,
-13143,
-7512,
2000,
10579,
16509,
17652,
11736,
4396,
-4899,
-10675,
-10989,
-9313,
-6864,
-2598,
1431,
5082,
9088,
8930,
7900,
5092,
-277,
-4932,
-8525,
-10790,
-9161,
-4497,
-423,
2245,
2881,
472,
-687,
1060,
3236,
3533,
2165,
1901,
2546,
4793,
5082,
2025,
-105,
-2834,
-4207,
-3436,
-2908,
-2098,
-2020,
-1382,
-1990,
-1769,
-2293,
-5828,
-6800,
-5047,
-17,
7631,
13227,
16558,
15023,
10534,
7187,
568,
-8344,
-15313,
-20468,
-20582,
-14573,
-8910,
3837,
15112,
20176,
21436,
12146,
1832,
-6986,
-13543,
-15158,
-11622,
-7806,
-2698,
4687,
11256,
17720,
17544,
10881,
2624,
-6972,
-15693,
-19073,
-17818,
-11267,
-1987,
4881,
10788,
12766,
10380,
8171,
4027,
-347,
-4315,
-8754,
-9789,
-8749,
-2193,
6206,
8978,
9083,
6642,
2690,
279,
-3581,
-7081,
-6062,
-3489,
-792,
397,
-1603,
-4944,
-3649,
-1862,
2981,
7622,
7423,
6891,
5469,
6094,
8659,
7909,
544,
-7405,
-12035,
-12721,
-11771,
-7090,
-397,
6661,
10560,
9154,
4736,
-1543,
-4462,
-6097,
-4284,
129,
2431,
3977,
7070,
11870,
14709,
12790,
3626,
-7916,
-15245,
-21346,
-20308,
-13178,
-5043,
5828,
13657,
16282,
15764,
11062,
4505,
-1855,
-6854,
-9002,
-12761,
-13595,
-9981,
1070,
14140,
20096,
21421,
13194,
3349,
-5191,
-12455,
-13698,
-12389,
-11862,
-10289,
-6795,
-8,
7276,
11910,
14075,
12898,
8720,
2196,
-5049,
-10921,
-9623,
-4150,
1271,
3473,
4477,
1531,
-2257,
-2463,
-196,
1966,
-75,
-3632,
-7191,
-8007,
-5627,
-1827,
-570,
1975,
3955,
6196,
8452,
7241,
6721,
8992,
6485,
1536,
-3357,
-12895,
-19180,
-20778,
-17124,
-7429,
2363,
7837,
10784,
11555,
11621,
10194,
6190,
1844,
-6110,
-12465,
-14012,
-11847,
-3601,
5933,
13820,
16287,
12782,
6127,
-3412,
-11676,
-14252,
-11295,
-9039,
-6936,
-4282,
885,
8647,
15299,
17006,
12096,
4902,
-4673,
-10757,
-14618,
-13054,
-7210,
258,
8271,
10191,
12589,
10917,
5517,
785,
-4676,
-9366,
-13057,
-16241,
-14416,
-8359,
399,
10775,
15779,
17412,
13272,
6687,
2002,
-1931,
-2297,
-3564,
-5314,
-7060,
-8007,
-7894,
-6489,
-1911,
2687,
6152,
4527,
235,
-2731,
-3741,
-1389,
1404,
2110,
1764,
-230,
-714,
1557,
5785,
11140,
11497,
8185,
1155,
-6041,
-12415,
-17510,
-17843,
-14413,
-9338,
-2955,
3316,
9925,
17386,
19454,
19784,
14277,
3161,
-6796,
-15078,
-20045,
-18360,
-12208,
-2273,
7716,
14137,
17391,
13819,
9487,
2742,
-3667,
-8364,
-13600,
-16159,
-16943,
-12522,
-1142,
9874,
18327,
20099,
15776,
10167,
1439,
-3730,
-4757,
-7015,
-7416,
-6254,
-5339,
-1002,
2841,
4220,
5578,
4129,
-172,
-5275,
-10618,
-11385,
-7834,
-2703,
3001,
7155,
8913,
9440,
10244,
11721,
10278,
5077,
-2964,
-9744,
-12407,
-13116,
-11636,
-12057,
-6802,
-1476,
1276,
5097,
6176,
7423,
8608,
9806,
8513,
6036,
-972,
-8710,
-12176,
-10134,
-3160,
1901,
7272,
8526,
7142,
5972,
491,
-5611,
-8118,
-10427,
-11239,
-9307,
-7189,
-817,
6794,
16023,
21488,
19838,
10908,
-631,
-8621,
-14137,
-15870,
-14341,
-10234,
-3792,
5461,
11363,
17308,
18720,
12661,
3418,
-6320,
-13788,
-17715,
-18398,
-16438,
-8933,
2853,
13780,
20869,
22146,
18284,
14403,
6933,
247,
-6815,
-13093,
-17176,
-18815,
-12901,
-6621,
652,
5721,
6172,
5585,
4162,
2018,
161,
-283,
902,
3253,
3949,
4872,
4265,
4083,
3983,
1262,
68,
-3163,
-7827,
-10423,
-8512,
-6310,
-2928,
-1103,
-2810,
-2079,
-2408,
319,
5520,
10004,
11415,
10850,
7135,
2414,
-1115,
-6490,
-8592,
-10877,
-11298,
-8517,
-4715,
957,
6953,
10506,
11029,
8073,
180,
-7627,
-13497,
-15870,
-12823,
-6142,
1692,
9876,
16541,
18930,
17596,
10827,
126,
-9036,
-16559,
-19599,
-17918,
-13523,
-4883,
5592,
14008,
18289,
16831,
8966,
-1166,
-9804,
-14372,
-13501,
-11687,
-8007,
-111,
9485,
19816,
24353,
22164,
14018,
1030,
-10119,
-17023,
-20657,
-20908,
-18194,
-11672,
-3787,
4660,
11883,
13082,
13185,
11580,
11161,
7315,
2236,
-3007,
-5380,
-4585,
-6174,
-3403,
-3982,
-5510,
-4956,
-3040,
-337,
3707,
4106,
1897,
-485,
-2429,
-1926,
-4675,
-4960,
-3437,
-1148,
3213,
6931,
10008,
12571,
12745,
7987,
2249,
-5080,
-15011,
-20794,
-21620,
-15434,
-5592,
2849,
11720,
15751,
16546,
13543,
5155,
-1763,
-6910,
-11010,
-13749,
-12893,
-10117,
236,
12500,
19322,
22377,
15683,
4835,
-5683,
-13909,
-16993,
-16071,
-12698,
-6349,
-2021,
2466,
7366,
12192,
13291,
9552,
4558,
-2969,
-6579,
-7425,
-5256,
182,
6529,
9928,
9298,
4706,
1828,
-70,
-4423,
-6713,
-10661,
-13223,
-13554,
-10309,
-1819,
6689,
13949,
17475,
16223,
12572,
6616,
928,
-1552,
-3952,
-4687,
-5111,
-8527,
-8683,
-8907,
-7470,
-460,
5792,
10789,
10781,
6556,
3027,
-110,
-779,
-491,
-3668,
-7077,
-8569,
-9189,
-4816,
3587,
10390,
15912,
17911,
11420,
3520,
-4892,
-13496,
-15627,
-17083,
-15023,
-10974,
-6315,
2478,
10920,
17680,
19645,
16584,
7949,
-2370,
-10770,
-15877,
-13831,
-7017,
790,
7762,
10507,
10580,
8641,
3080,
-1733,
-6604,
-11752,
-14079,
-16234,
-15660,
-10782,
-1029,
10837,
20378,
23366,
16069,
8836,
615,
-4413,
-3909,
-5559,
-7587,
-7507,
-6021,
-3896,
-866,
484,
2497,
2074,
-216,
-2630,
-3855,
-3986,
-923,
5163,
9320,
8107,
4243,
747,
-1206,
593,
-18,
-160,
-1001,
-2781,
-2517,
-2548,
-3286,
-3537,
-3086,
-2949,
-2994,
-1740,
544,
3203,
6515,
10053,
10318,
3986,
-4786,
-11351,
-14470,
-11385,
-2939,
4618,
12654,
17578,
16853,
12072,
3700,
-4816,
-12481,
-18288,
-23318,
-25156,
-19287,
-9022,
6536,
20364,
28915,
29595,
18830,
8174,
-2425,
-7832,
-11069,
-14018,
-13525,
-12626,
-6098,
804,
7376,
12219,
10097,
3496,
-5057,
-12893,
-15909,
-13773,
-7741,
1358,
10121,
16925,
18384,
15655,
10229,
6573,
1479,
-6362,
-11775,
-16447,
-13605,
-9271,
-5702,
-1081,
1625,
2984,
1300,
1418,
2963,
4026,
7372,
9653,
10218,
8795,
1726,
-6096,
-12943,
-13222,
-9218,
-3899,
919,
5706,
9967,
10412,
9126,
4156,
-41,
-6856,
-15326,
-18816,
-16907,
-10115,
1323,
11886,
19717,
19682,
12608,
4635,
-3326,
-6515,
-8394,
-9125,
-7980,
-3535,
2195,
6290,
10974,
11183,
5990,
-1014,
-11976,
-19242,
-19076,
-16551,
-6874,
5012,
15589,
23406,
23917,
21196,
14574,
7570,
-1467,
-10965,
-18674,
-22482,
-18953,
-13158,
-3353,
6666,
10040,
11028,
9245,
4415,
340,
-3376,
-3889,
-961,
3017,
6021,
6891,
4242,
1887,
1520,
349,
-110,
-3079,
-7901,
-6898,
-5049,
-1864,
925,
-830,
-3503,
-5945,
-6077,
-4295,
2284,
9111,
14799,
17146,
13714,
7552,
-1720,
-8774,
-12590,
-15801,
-13516,
-9732,
-4236,
4432,
11770,
16422,
14750,
7665,
-1811,
-10502,
-16874,
-19552,
-17437,
-10762,
-2789,
9018,
18089,
23426,
24934,
19140,
11843,
1088,
-9488,
-18170,
-23547,
-25405,
-20179,
-8615,
3371,
11992,
12375,
9852,
6464,
2560,
64,
-2130,
-2013,
-910,
1990,
4222,
8800,
11214,
8698,
3697,
-3130,
-8298,
-12993,
-14768,
-14733,
-8028,
-750,
4159,
5496,
3696,
1699,
2936,
6454,
8217,
7895,
5315,
3500,
948,
1855,
-806,
-6704,
-10292,
-12456,
-11974,
-7075,
-1447,
5414,
12085,
12824,
11089,
2946,
-5148,
-9986,
-12872,
-10570,
-5157,
1178,
7619,
13536,
15999,
17641,
14544,
5263,
-4891,
-14881,
-22876,
-22757,
-15313,
-6386,
3381,
12656,
17284,
17579,
10179,
-183,
-7288,
-13307,
-14763,
-14504,
-10991,
-4417,
8248,
20665,
27605,
27695,
16188,
2038,
-11561,
-21461,
-25192,
-26730,
-23138,
-14769,
-3585,
5852,
13815,
19503,
18796,
17555,
11377,
4929,
-1255,
-8028,
-9532,
-6119,
-1931,
2296,
1638,
-3439,
-6447,
-6909,
-3591,
146,
3561,
1810,
518,
83,
-515,
205,
-926,
-726,
587,
3188,
6892,
7354,
8486,
8878,
6554,
4530,
-2001,
-11302,
-18675,
-19921,
-15687,
-4956,
5470,
11175,
14636,
12322,
9058,
5715,
-126,
-5902,
-10564,
-12678,
-12181,
-7221,
885,
11731,
21371,
22472,
17508,
5870,
-7632,
-16348,
-22054,
-22947,
-16996,
-9071,
-573,
6820,
12193,
17227,
16632,
9770,
2783,
-5685,
-11751,
-10819,
-6795,
965,
7890,
12555,
12439,
8190,
2710,
-6808,
-12997,
-15082,
-14404,
-11697,
-9430,
-5036,
1278,
9700,
16408,
18826,
15999,
8645,
2044,
-3002,
-4440,
-4832,
-6084,
-5441,
-7329,
-7888,
-5995,
-4084,
765,
3317,
4407,
6062,
4987,
2758,
1640,
2597,
3758,
748,
-3578,
-7351,
-8708,
-2919,
4345,
11711,
14335,
12936,
8235,
268,
-5179,
-10544,
-14435,
-16129,
-14763,
-10009,
-3334,
4980,
15433,
21532,
21796,
15361,
4851,
-5872,
-14538,
-17796,
-14227,
-5102,
3357,
10202,
13505,
13498,
9335,
3261,
-3453,
-9457,
-15058,
-18042,
-18057,
-14338,
-5122,
4489,
14173,
20733,
19651,
14352,
7463,
505,
-3243,
-6525,
-10247,
-12165,
-10011,
-7423,
-4140,
-2238,
-645,
1007,
-25,
547,
-1772,
-2011,
-1781,
-828,
4436,
6620,
5298,
1646,
-213,
-889,
-799,
463,
435,
-1246,
-3085,
-2363,
-1542,
-1339,
-2732,
-4424,
-3709,
-4123,
-3205,
-545,
1843,
5518,
10267,
11122,
7895,
2276,
-5690,
-9403,
-9152,
-4687,
1207,
4683,
8927,
11093,
10003,
7440,
-264,
-8725,
-14219,
-18257,
-17930,
-14936,
-5449,
4054,
14090,
23394,
24070,
20547,
9359,
-1651,
-8892,
-13017,
-14011,
-12716,
-10897,
-5574,
2626,
9852,
15334,
13520,
4155,
-5912,
-13158,
-16683,
-15711,
-11877,
-3791,
6497,
15762,
20366,
20759,
15998,
10110,
2993,
-4940,
-13134,
-17974,
-18069,
-17359,
-10484,
-1429,
8129,
12464,
11545,
8269,
4424,
1883,
-1224,
-2386,
-2504,
-254,
1833,
1946,
611,
-706,
15,
131,
547,
1233,
123,
-1580,
-787,
356,
1206,
-847,
-6067,
-9473,
-10049,
-6041,
-428,
4989,
9030,
11653,
12160,
6920,
3175,
-1518,
-5208,
-6199,
-8074,
-5296,
-2021,
-80,
3518,
7620,
8400,
5235,
-2758,
-11908,
-15575,
-14739,
-10407,
-1652,
6806,
13789,
18784,
19849,
18724,
15311,
5606,
-6342,
-15379,
-20408,
-21118,
-16879,
-10259,
-694,
9502,
12986,
13845,
10214,
3096,
-3347,
-6641,
-7010,
-3512,
-1821,
-669,
1781,
7337,
14772,
16453,
10634,
-569,
-10409,
-16391,
-17690,
-15868,
-9653,
-4291,
153,
4559,
7955,
11735,
12263,
10417,
8010,
3758,
-1915,
-7930,
-12532,
-12059,
-5620,
-1159,
2820,
5805,
5934,
6366,
6259,
4411,
1432,
-1595,
-7095,
-9749,
-10400,
-7984,
-5290,
-2682,
1390,
5559,
8711,
10539,
9954,
8984,
8707,
5516,
3655,
-1774,
-11034,
-15904,
-16925,
-13656,
-4942,
865,
4189,
6584,
5367,
5301,
4139,
487,
-1087,
-3308,
-4094,
-1960,
522,
3904,
8695,
11670,
10410,
6667,
-2246,
-10882,
-15342,
-17095,
-14122,
-8423,
-3278,
1625,
6886,
12003,
15870,
15784,
10448,
2616,
-5983,
-10966,
-12914,
-11539,
-5019,
2507,
8366,
8719,
9907,
6807,
10,
-2551,
-5645,
-8677,
-9073,
-9220,
-9678,
-5719,
1337,
10182,
16083,
15231,
10748,
3212,
-4801,
-7047,
-6565,
-5626,
-5651,
-3908,
-1156,
2428,
4683,
4486,
5576,
3245,
154,
-4242,
-9780,
-13623,
-12095,
-6403,
-171,
6101,
7599,
7328,
7302,
8277,
11519,
10182,
4423,
-1604,
-7358,
-10386,
-12226,
-13479,
-11766,
-9561,
-3826,
1304,
5010,
7822,
10050,
13607,
12400,
9682,
2714,
-5592,
-10037,
-13132,
-8231,
203,
4295,
8287,
8050,
6131,
3877,
-1101,
-5538,
-8491,
-11545,
-13499,
-10294,
-3909,
4438,
14064,
19531,
19245,
14213,
3840,
-5881,
-11059,
-12493,
-11112,
-8741,
-6093,
-917,
4560,
11256,
14218,
11820,
6437,
-4399,
-12034,
-15737,
-15247,
-11364,
-4178,
4595,
11063,
16378,
14406,
9189,
5084,
562,
-3075,
-6477,
-9149,
-12384,
-10938,
-4762,
2064,
9639,
11412,
7419,
299,
-6655,
-9342,
-10066,
-9362,
-4396,
925,
4556,
7645,
9935,
12469,
13059,
11335,
5605,
-283,
-7832,
-14029,
-15375,
-12439,
-7427,
-4511,
-2369,
-1985,
-14,
4387,
9651,
11470,
11498,
9775,
5634,
1784,
-3772,
-6332,
-7987,
-9163,
-6887,
-5074,
-1689,
2295,
6911,
10023,
9589,
6951,
-1134,
-7960,
-11860,
-13067,
-8398,
-2960,
3430,
10072,
13532,
14917,
13544,
8258,
1020,
-4625,
-10181,
-14144,
-14308,
-11416,
-3737,
6048,
12820,
15239,
10117,
2484,
-3759,
-8363,
-8921,
-8200,
-6531,
-4093,
-2120,
3387,
11010,
16308,
17264,
12207,
4389,
-5626,
-11782,
-15797,
-15746,
-12331,
-8595,
-1599,
2991,
6340,
7978,
6849,
4825,
2656,
563,
-1942,
-4572,
-4139,
-922,
4717,
6779,
6591,
4768,
797,
-2381,
-5737,
-8708,
-9588,
-7867,
-6759,
-5604,
-5290,
-2164,
3031,
7806,
10838,
13527,
12970,
7477,
2388,
-584,
-2032,
-3264,
-5781,
-12460,
-14466,
-11956,
-6418,
3457,
11047,
13754,
13289,
9964,
4989,
-1692,
-8326,
-10462,
-10793,
-9431,
-6920,
-2983,
3168,
12997,
18826,
18513,
13765,
1321,
-8327,
-14291,
-18606,
-15229,
-10483,
-5376,
1363,
6479,
11554,
13318,
11158,
5500,
-855,
-6621,
-9305,
-10155,
-7520,
-1703,
4628,
11231,
14068,
13264,
5665,
-1415,
-6854,
-10948,
-11283,
-10860,
-9847,
-9247,
-5608,
-359,
6793,
11283,
10346,
8766,
5204,
2845,
1742,
286,
-1005,
-1909,
-1255,
-4388,
-7097,
-8264,
-8384,
-5252,
-2221,
1189,
1626,
1313,
1612,
3769,
6071,
3826,
663,
-1943,
-3666,
-2718,
1629,
4689,
5479,
6298,
3508,
-2072,
-6422,
-10924,
-13013,
-12369,
-7305,
498,
5822,
10601,
12660,
10198,
8958,
4849,
-1888,
-7211,
-14672,
-16643,
-14118,
-4806,
7233,
14980,
20851,
20018,
14923,
6115,
-4474,
-11821,
-16210,
-17857,
-15125,
-12552,
-5805,
3463,
11682,
18640,
19151,
16157,
8764,
307,
-7256,
-9656,
-7318,
-6140,
-4337,
-3917,
-1967,
2690,
4470,
5563,
4482,
452,
-3483,
-7005,
-7773,
-7621,
-4499,
1061,
6196,
10400,
10121,
7529,
4233,
2785,
3614,
740,
-4433,
-9053,
-11552,
-11256,
-9121,
-4336,
1267,
2687,
3555,
4861,
6998,
6550,
3435,
2622,
1308,
1431,
-640,
-4688,
-6309,
-3841,
874,
5066,
6096,
4305,
2513,
-491,
-3183,
-2559,
-2111,
-3116,
-4443,
-5090,
-2430,
1477,
7593,
11285,
10676,
8154,
3119,
-3596,
-8292,
-8792,
-6404,
-4298,
-465,
3977,
6479,
8814,
8069,
5924,
3639,
-2074,
-8925,
-13925,
-17101,
-14812,
-7408,
812,
8271,
14726,
17544,
16109,
10894,
4852,
355,
-6218,
-11269,
-15057,
-14929,
-11896,
-7913,
572,
5975,
8774,
9939,
5529,
604,
-2307,
-4647,
-4069,
-1148,
-1059,
-147,
1691,
4240,
10275,
11435,
9168,
5050,
-3089,
-8353,
-12569,
-15965,
-12898,
-9008,
-4710,
79,
3518,
7667,
10561,
12459,
11605,
8786,
2899,
-4545,
-8793,
-9027,
-7269,
-3702,
-568,
-82,
490,
907,
-854,
-866,
1024,
1393,
2622,
748,
-1292,
-2523,
-4769,
-3229,
-1681,
1707,
3727,
3253,
2131,
2865,
5423,
5766,
6156,
1661,
-3080,
-6368,
-9471,
-8736,
-5859,
-2317,
1646,
3048,
2028,
2511,
1319,
-26,
1312,
685,
-1721,
-2200,
-2376,
393,
8136,
13029,
11597,
6189,
-2187,
-7857,
-11186,
-12905,
-12551,
-11544,
-8985,
-5087,
796,
7657,
13023,
13747,
12077,
9007,
3932,
-2207,
-6859,
-8390,
-6908,
-3389,
921,
4760,
5580,
5325,
2275,
-2316,
-4489,
-6566,
-8109,
-8705,
-9634,
-5301,
174,
6609,
12938,
14268,
12330,
8220,
3582,
-1165,
-4881,
-9375,
-9722,
-8826,
-7360,
-4363,
-1502,
2876,
7392,
9885,
8090,
3813,
-306,
-4529,
-5177,
-2211,
-364,
-1315,
-2297,
-1694,
-625,
4005,
7158,
8600,
7618,
4185,
51,
-3978,
-7262,
-8999,
-8307,
-5923,
-4706,
-4181,
-2429,
-541,
2677,
7214,
10310,
9841,
6676,
2522,
-821,
-3097,
-3238,
-3928,
-3718,
-2828,
-1131,
1267,
2422,
2241,
479,
-2364,
-5136,
-6504,
-6706,
-4938,
-2340,
-528,
3904,
10989,
15095,
15911,
9945,
2131,
-2143,
-6129,
-8611,
-10825,
-13050,
-12591,
-9000,
-3581,
3366,
10272,
11689,
9833,
6216,
546,
-3233,
-6243,
-7070,
-4889,
-2102,
1339,
4199,
7565,
8959,
7738,
5647,
346,
-4092,
-7905,
-10812,
-9967,
-6991,
-1831,
2620,
4756,
5654,
6096,
5241,
3909,
2375,
-851,
-3856,
-4248,
-2673,
-1068,
1278,
2371,
2655,
2567,
1761,
1467,
295,
-1790,
-3450,
-2475,
-1406,
489,
662,
-1472,
-2400,
-2998,
-1610,
1332,
4099,
5430,
6274,
5643,
5491,
5914,
2659,
-1075,
-4300,
-6715,
-7579,
-9079,
-8224,
-5344,
-788,
5043,
7280,
7602,
5397,
2150,
-695,
-2246,
-3078,
-3655,
-3233,
-2666,
-323,
3188,
6260,
7052,
4908,
168,
-3646,
-6514,
-8293,
-8533,
-6957,
-2921,
1354,
5878,
8954,
9342,
6301,
2160,
-214,
-1721,
-3062,
-4732,
-5945,
-5602,
-3636,
813,
4980,
7538,
7809,
5685,
1695,
-2002,
-4542,
-6396,
-5508,
-4386,
-2254,
596,
3483,
4742,
5038,
4740,
3422,
1427,
-1244,
-3779,
-6389,
-5865,
-3196,
-283,
1052,
1341,
836,
1571,
2366,
2479,
1419,
-1506,
-3317,
-4092,
-3621,
-2490,
-1040,
-800,
-1324,
-679,
988,
2829,
4176,
3907,
3648,
3770,
2684,
998,
-1667,
-4614,
-6238,
-7469,
-7729,
-6281,
-3304,
415,
3777,
7019,
7828,
7768,
5344,
1756,
-1104,
-3780,
-4505,
-4770,
-4837,
-3793,
-1693,
518,
2611,
3440,
3029,
2124,
78,
-1516,
-2529,
-3674,
-3360,
-2211,
-419,
2325,
4427,
5351,
5255,
3718,
1894,
-553,
-2876,
-4798,
-6311,
-5267,
-3497,
-1175,
1824,
4584,
5896,
5813,
4560,
1922,
-1128,
-3576,
-4759,
-4841,
-3567,
-1992,
-82,
2293,
3970,
5186,
5288,
4049,
1329,
-1592,
-4021,
-4966,
-4301,
-3400,
-978,
1231,
2884,
4035,
3749,
2719,
794,
-912,
-1983,
-3030,
-2837,
-1931,
-519,
1679,
2870,
3345,
2815,
1772,
1161,
609,
-153,
-1265,
-3008,
-4828,
-4563,
-3292,
-1243,
936,
1723,
2027,
1516,
1573,
2223,
2605,
3198,
3086,
1715,
671,
62,
-946,
-1925,
-3572,
-4538,
-4309,
-3766,
-1887,
281,
2438,
4294,
4824,
4774,
4035,
1403,
-1143,
-2542,
-3483,
-3442,
-3075,
-2322,
-1112,
46,
1305,
2342,
2437,
1565,
552,
-787,
-1810,
-2184,
-2320,
-1467,
-664,
539,
1608,
1646,
1988,
1599,
541,
-902,
-1879,
-1912,
-1476,
-1069,
-83,
455,
817,
1125,
930,
880,
612,
165,
-734,
-1132,
-1640,
-1507,
-981,
-850,
-436,
-175,
740,
1363,
1604,
1774,
1125,
790,
30,
-604,
-920,
-1020,
-638,
-53,
464,
354,
574,
866,
1096,
826,
657,
297,
-61,
-599,
-1151,
-1369,
-893,
173,
1195,
2133,
2144,
2148,
1653,
689,
-134,
-1197,
-1912,
-2330,
-2327,
-2063,
-1487,
-967,
-89,
1033,
1654,
2311,
2374,
2341,
1952,
956,
251,
-600,
-1246,
-2040,
-2789,
-2644,
-2299,
-1753,
-985,
-60,
1146,
2158,
2353,
1659,
1497,
878,
-102,
-1308,
-2167,
-2252,
-2076,
-1310,
-230,
807,
1403,
1255,
909,
572,
158,
-206,
-532,
-303,
-93,
-198,
-118,
-154,
-241,
-260,
-194,
-248,
-334,
-653,
-939,
-533,
-404,
-160,
413,
652,
1213,
1387,
926,
429,
201,
68,
-94,
-408,
-890,
-1149,
-838,
-1055,
-1094,
-522,
-347,
-251,
264,
876,
1244,
1218,
1126,
1132,
791,
351,
-170,
-715,
-809,
-872,
-916,
-710,
-290,
210,
321,
360,
304,
137,
-211,
-786,
-840,
-567,
-165,
454,
1145,
1392,
1541,
1556,
1388,
616,
-193,
-758,
-1160,
-1373,
-1494,
-1639,
-1545,
-965,
-3,
617,
1062,
1158,
960,
988,
633,
173,
-442,
-863,
-991,
-814,
-725,
-588,
-293,
66,
552,
624,
708,
771,
678,
551,
353,
47,
-16,
-275,
-627,
-727,
-688,
-783,
-633,
-442,
-201,
132,
368,
432,
654,
976,
1034,
1175,
1038,
713,
345,
53,
-206,
-404,
-550,
-949,
-1120,
-873,
-621,
-368,
-97,
36,
164,
380,
608,
825,
930,
676,
426,
74,
-156,
-239,
-325,
-321,
-380,
-381,
-474,
-542,
-559,
-508,
-504,
-371,
-204,
-271,
-283,
51,
452,
748,
839,
813,
823,
637,
464,
379,
76,
-382,
-698,
-1036,
-1104,
-1082,
-755,
-406,
-252,
47,
428,
557,
742,
839,
479,
126,
-123,
-315,
-264,
-101,
189,
444,
438,
322,
177,
175,
216,
186,
122,
66,
-33,
-83,
-153,
-74,
143,
128,
32,
-109,
-150,
-150,
-163,
-119,
75,
106,
96,
166,
226,
94,
-94,
-174,
-61,
65,
136,
50,
-72,
17,
-29,
-417,
-666,
-659,
-472,
-255,
-58,
181,
331,
436,
542,
757,
739,
329,
-38,
-195,
-187,
-136,
-245,
-189,
-139,
-150,
-210,
-318,
-224,
-239,
-259,
-210,
-107,
-2,
20,
11,
154,
305,
361,
283,
84,
-46,
-30,
-148,
-151,
-127,
-62,
-172,
-424,
-632,
-553,
-364,
-55,
81,
-197,
-403,
-250,
270,
677,
861,
705,
319,
9,
-74,
-74,
-54,
-188,
-331,
-321,
-308,
-233,
-116,
-90,
-166,
-174,
-31,
130,
400,
519,
381,
156,
62,
115,
72,
-12,
-145,
-151,
-64,
81,
184,
316,
216,
-1,
-232,
-411,
-376,
-328,
-213,
-113,
-59,
-18,
121,
297,
413,
427,
209,
-38,
-120,
-154,
-81,
-7,
79,
72,
17,
23,
29,
-8,
-122,
-329,
-381,
-299,
-136,
6,
111,
294,
501,
494,
374,
269,
107,
34,
-51,
-94,
-140,
-146,
-82,
-43,
-143,
-294,
-431,
-285,
-12,
97,
159,
91,
57,
162,
247,
267,
230,
126,
54,
-2,
-16,
-33,
-39,
-105,
-100,
-36,
-49,
-94,
-121,
-106,
-186,
-161,
-29,
10,
30,
66,
-5,
-31,
-2,
99,
107,
41,
-21,
-140,
-197,
-151,
2,
113,
32,
-72,
-134,
-149,
-88,
18,
112,
149,
148,
100,
110,
156,
176,
89,
33,
-10,
-55,
-51,
-47,
-14,
-39,
-5,
-13,
-47,
-45,
-78,
-82,
-45,
27,
58,
37,
-56,
-123,
-102,
3,
-6,
-8,
-19,
-83,
-138,
-130,
-86,
-49,
-16,
48,
60,
37,
8,
-54,
-49,
-11,
31,
25,
-36,
32,
108,
121,
63,
46,
58,
-47,
-155,
-191,
-107,
-46,
-46,
-28,
50,
132,
87,
60,
52,
95,
77,
15,
-16,
36,
69,
20,
-72,
-53,
-42,
-64,
-64,
-80,
-33,
4,
24,
10,
-23,
-61,
-46,
22,
64,
108,
118,
118,
68,
20,
-75,
-111,
-143,
-154,
-79,
-31,
1,
-3,
11,
24,
6,
14,
33,
37,
22,
26,
67,
83,
108,
66,
50,
22,
-48,
-83,
-101,
-66,
-19,
22,
0,
-31,
-41,
-38,
-9,
4,
24,
33,
19,
20,
7,
6,
19,
43,
49,
7,
-39,
-69,
-70,
-26,
-3,
17,
-18,
-33,
-40,
-38,
-16,
-19,
-14,
-23,
-5,
34,
49,
57,
44,
46,
27,
-5,
-15,
-36,
-60,
-58,
-50,
-27,
-10,
-1,
15,
16,
27,
25,
16,
24,
4,
4,
-3,
11,
0,
33,
8,
6,
-13,
-26,
-35,
-31,
-36,
-17,
-32,
-16,
-20,
4,
13,
19,
16,
23,
19,
29,
12,
17,
-16,
8,
-8,
-6,
-12,
-6,
-15,
0,
-12,
-1,
-10,
1,
-6,
12,
1,
21,
5,
27,
1,
12,
3,
3,
5,
-1,
-1,
-6,
1,
-6,
0,
-11,
-4,
-5,
1,
3,
-5,
8,
-10,
2,
-7,
-5,
3,
-8,
4,
-6,
-2,
2,
-4
};
| 322,527
|
C++
|
.cxx
| 50,227
| 5.421367
| 41
| 0.722147
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,191
|
diesel.cxx
|
w1hkj_fldigi/src/soundcard/diesel.cxx
|
#define DIESEL_SIZE 7621
int int_audio_diesel[DIESEL_SIZE] = {
-1556,
-594,
-3297,
-4007,
-3029,
-2668,
-1282,
-1432,
-615,
-841,
-1989,
-1587,
-1985,
-1423,
-2066,
-2257,
-1630,
-1906,
-2242,
-848,
2031,
1619,
2520,
2703,
2144,
1447,
2108,
2767,
1488,
1866,
2604,
2398,
1802,
1724,
2145,
2034,
1407,
2703,
3012,
3546,
2611,
3072,
2911,
2392,
3402,
2498,
3559,
2929,
3036,
2349,
2281,
2277,
236,
899,
1209,
654,
113,
575,
1633,
1333,
565,
1720,
1912,
2883,
3117,
1447,
890,
-443,
-171,
-416,
-268,
1998,
1066,
-1711,
-4346,
-6440,
-7462,
-4192,
-1446,
-115,
3224,
98,
-1360,
-551,
2340,
4792,
2344,
-421,
-6521,
-11091,
-12809,
-9595,
-4677,
-4157,
-5461,
-1192,
5111,
5467,
2461,
-840,
-4078,
-6382,
-5641,
-4193,
-2654,
-494,
1089,
7518,
14612,
11258,
4916,
1255,
-2881,
-10444,
-16913,
-14517,
-9980,
-9701,
-9259,
-4948,
3963,
10100,
15864,
18029,
9065,
-242,
-1903,
2475,
457,
-7816,
-10585,
-6749,
-1041,
1792,
-1440,
-9037,
-14310,
-9679,
-2422,
1702,
3245,
4597,
9446,
17931,
22048,
18266,
12642,
7875,
714,
-9549,
-13794,
-17073,
-15171,
-10174,
-7600,
-6192,
-3186,
8222,
22598,
27969,
23145,
18219,
17774,
17979,
7061,
-9297,
-19575,
-22125,
-16869,
-7695,
-1994,
-5627,
-10844,
-6984,
2016,
6637,
3012,
2202,
7818,
12689,
15117,
15791,
12961,
11141,
13479,
13476,
4462,
-12353,
-22296,
-21900,
-19561,
-20846,
-18859,
-15136,
-7151,
1844,
3741,
5062,
8508,
12443,
13807,
12119,
4293,
-2720,
41,
6254,
5275,
-55,
-8499,
-16093,
-16879,
-12863,
-11824,
-12028,
-10513,
-10163,
-6576,
-191,
-583,
-3241,
2541,
11289,
19760,
21880,
17055,
11385,
2837,
-11459,
-23125,
-20481,
-12913,
-6486,
5309,
7929,
4556,
2861,
4528,
4442,
-1675,
-4690,
-7459,
-6890,
-2700,
-3770,
-6395,
-3445,
-3808,
-1562,
7080,
14333,
10011,
8670,
16552,
17990,
13408,
5871,
-2529,
-10225,
-11285,
-11432,
-10814,
-6088,
2598,
11583,
9452,
-6058,
-14994,
-10039,
-1349,
3306,
5986,
13208,
22715,
24436,
13696,
-2649,
-12412,
-14594,
-11005,
-2024,
1915,
320,
-2687,
-2503,
680,
9820,
14981,
15097,
14223,
9558,
-835,
-8095,
-13916,
-18567,
-15921,
-11442,
-7552,
-8894,
-7700,
-3265,
11788,
20256,
13620,
10990,
18190,
20325,
11814,
696,
-7622,
-7466,
-1230,
3096,
-3921,
-13264,
-17551,
-12974,
-11049,
-17693,
-18218,
-14145,
-10474,
-5812,
513,
4917,
11458,
27868,
31738,
27212,
23035,
17124,
7519,
-8065,
-17706,
-20534,
-20514,
-16686,
-11491,
-11893,
-11478,
-17904,
-16986,
-12639,
-3928,
10830,
15704,
18136,
19510,
22156,
20656,
15427,
7754,
4535,
8201,
6106,
-9412,
-22166,
-25149,
-22840,
-21845,
-21159,
-16918,
-13243,
-987,
19321,
28225,
23173,
17333,
12351,
3131,
-9263,
-16349,
-20045,
-18271,
-14706,
-6339,
1831,
1897,
382,
678,
2861,
2048,
1782,
6510,
14288,
17594,
13743,
8169,
1279,
-4333,
363,
4227,
-5656,
-17988,
-17917,
-12851,
-9821,
-8054,
-7983,
-4782,
8417,
13353,
18573,
31863,
30229,
25426,
19697,
12479,
-1205,
-13769,
-15339,
-11004,
-8117,
-7219,
-7726,
-9802,
-9154,
-10259,
-8432,
-9049,
-8491,
-7190,
2267,
12413,
11339,
20471,
29969,
30062,
25842,
19558,
12267,
5634,
-6387,
-24845,
-30995,
-24988,
-20519,
-16534,
-4842,
420,
-2038,
-2973,
-585,
8117,
6339,
1374,
3623,
3716,
-2659,
-5341,
2701,
4181,
-1934,
1631,
12718,
9024,
-5464,
-11419,
-7079,
-4081,
-5813,
-9765,
-14048,
-7750,
-648,
596,
3513,
3306,
3227,
7062,
2467,
-7160,
-13513,
-12627,
1396,
15559,
13787,
15851,
23245,
21791,
11364,
-6565,
-19097,
-23366,
-17858,
-8877,
-2387,
-5496,
-6881,
-3678,
2645,
9848,
10099,
5743,
4572,
4948,
-7825,
-14518,
-15920,
-14936,
-7165,
4329,
8251,
2392,
5916,
16616,
22042,
16110,
2083,
-10018,
-11762,
-7294,
-8422,
-8416,
-6096,
-2831,
3088,
9987,
4476,
-6572,
-5708,
-5051,
-2204,
-10174,
-8957,
2660,
12567,
18954,
18860,
21951,
20236,
15945,
13389,
12293,
-3944,
-17288,
-20598,
-18135,
-13667,
-10464,
-8825,
-8084,
-1115,
2783,
-1313,
-5396,
-9036,
-10962,
399,
20022,
24056,
16661,
21355,
25510,
23423,
17067,
8959,
-6500,
-15856,
-20843,
-26480,
-22604,
-19926,
-18508,
-16425,
-12724,
-9179,
-2034,
13453,
29208,
28651,
22476,
15470,
6391,
2619,
-3672,
-13748,
-12231,
-9797,
-5445,
3860,
7941,
-881,
-14275,
-16988,
-17274,
-10430,
-5870,
1937,
7607,
13946,
20941,
17426,
12392,
9590,
5837,
2220,
-4657,
-21058,
-22178,
-12973,
-6618,
-4565,
-3470,
3170,
6590,
6737,
9906,
7822,
4037,
1285,
-410,
3356,
366,
-10400,
-11291,
-7226,
-5952,
1160,
5850,
5508,
-1575,
-10763,
-16035,
-13583,
-9654,
-8832,
2836,
25623,
28161,
17740,
18256,
19298,
18813,
10186,
-3174,
-15873,
-21957,
-22320,
-19674,
-19195,
-17191,
-11605,
-694,
11858,
11470,
1695,
-4863,
3464,
7115,
8173,
13081,
17715,
19070,
10113,
3378,
-662,
-6699,
-13482,
-16851,
-12640,
-12578,
-13863,
-7087,
-980,
698,
2472,
5408,
7565,
13782,
18904,
14339,
6075,
7274,
7682,
3425,
-507,
-8939,
-13875,
-7813,
1058,
4945,
9084,
11602,
10509,
2455,
-9385,
-22699,
-23579,
-14615,
-9893,
505,
8798,
9554,
10830,
15011,
11597,
1250,
-3661,
-2440,
-3281,
-3072,
-2711,
-2064,
1378,
-492,
-6138,
-6685,
-6619,
-10586,
-6065,
1505,
4166,
1446,
-2545,
-4709,
-5219,
-2510,
-1468,
-16,
4910,
8362,
8196,
6239,
2342,
-5149,
-8596,
-3334,
-3848,
-3870,
1241,
4021,
8296,
7417,
-21,
1277,
1874,
-872,
-896,
-3609,
-6325,
-8707,
-5325,
559,
5711,
8222,
7212,
695,
-3206,
-6432,
-8387,
-4263,
-1674,
2784,
11749,
17113,
11006,
8492,
8422,
5974,
7343,
5191,
-5407,
-12027,
-14834,
-14188,
-15327,
-14846,
-10235,
-8880,
-4403,
-2611,
2090,
14202,
25005,
28035,
25877,
22630,
17849,
8498,
-1370,
-14177,
-20218,
-15689,
-12256,
-10172,
-4619,
-4272,
-11613,
-17960,
-17557,
-11351,
-5043,
8672,
20157,
23875,
21795,
19754,
15174,
11301,
2209,
-7770,
-5618,
-6389,
-14600,
-16079,
-12492,
-9450,
-7770,
-9307,
-6960,
-7451,
-272,
2303,
4962,
10335,
7031,
8435,
10401,
5132,
-4202,
-4179,
-3291,
1216,
11040,
6329,
-2729,
-4593,
-7347,
-12843,
-14789,
-12528,
-12047,
-1598,
13948,
19924,
17411,
15906,
6992,
226,
-1665,
-9047,
-11040,
-11856,
-8029,
-11757,
-12438,
-8397,
-4532,
6309,
10194,
5713,
2589,
7318,
10815,
11944,
13015,
9391,
3285,
1057,
-996,
-4404,
-2192,
-5775,
-16641,
-17107,
-13440,
-9973,
-5832,
2509,
2924,
3588,
9360,
5010,
10833,
16741,
19660,
20459,
14105,
8199,
-3083,
-9034,
-9223,
-17466,
-19650,
-12359,
-4275,
3286,
5819,
3724,
-2735,
-4493,
-5427,
-9793,
-6398,
-3578,
-1054,
8677,
14815,
20058,
19718,
16856,
10806,
646,
-3705,
-7915,
-8651,
-7014,
-9024,
-8903,
-937,
-3951,
-10649,
-8900,
-7357,
-8632,
-4862,
3791,
10930,
15140,
9418,
2836,
-4749,
-3599,
3605,
4907,
10014,
13862,
5605,
-1113,
-2599,
-10468,
-14625,
-14647,
-13810,
-10904,
-1935,
5877,
4963,
7594,
5050,
-1471,
-2333,
-3266,
-3451,
-2361,
-117,
-2038,
-2362,
903,
1925,
7683,
14699,
5688,
-4309,
-6920,
-11292,
-9906,
-8156,
-6096,
-4936,
3465,
11124,
8155,
7214,
5437,
2208,
4769,
5437,
-2418,
-8395,
-7730,
-9400,
-12899,
-4970,
-858,
425,
7877,
12963,
14662,
16527,
16143,
14036,
13856,
5892,
-2956,
-6942,
-9882,
-10412,
-8588,
-8576,
-9789,
-9368,
-3864,
-2281,
-8021,
-9818,
-9780,
-3249,
13607,
27918,
31610,
29297,
25639,
19627,
12219,
-857,
-18376,
-22128,
-17848,
-17194,
-16037,
-14407,
-11273,
-7153,
-3702,
-2589,
-4905,
-471,
10437,
15084,
14572,
8502,
2046,
4248,
5510,
5083,
5553,
3507,
5041,
594,
-4810,
-11660,
-18757,
-16669,
-15577,
-13718,
-11939,
-11300,
-7900,
4814,
16113,
22377,
20564,
14465,
7481,
1510,
-3212,
-12437,
-11847,
-7944,
78,
2022,
-930,
-781,
-1214,
-1284,
-3659,
-3126,
-5700,
-2757,
5928,
6128,
4362,
5409,
4161,
3644,
5765,
3905,
-598,
-5069,
-11148,
-16257,
-13920,
-9120,
-3240,
8869,
14773,
18211,
18157,
13205,
9488,
6942,
7365,
149,
-6190,
-8547,
-13964,
-15886,
-14064,
-11301,
-7694,
-1340,
6471,
10308,
10678,
7797,
1040,
-2703,
-4022,
-7439,
-1832,
7575,
15705,
22025,
19995,
17400,
8145,
-3582,
-11185,
-16338,
-14487,
-11841,
-10374,
-8680,
-5325,
-2619,
1207,
5474,
4303,
-550,
-4105,
-2917,
-3227,
2803,
11220,
17342,
15875,
8403,
4737,
3458,
6051,
-1328,
-5233,
-6438,
-12264,
-13906,
-16678,
-17700,
-15507,
-10588,
-6156,
25,
11730,
20518,
19861,
14794,
3167,
-10740,
-11365,
-7671,
-4124,
3065,
7334,
9021,
6512,
4139,
426,
-2791,
-5354,
-11875,
-12927,
-12297,
-12208,
-11988,
-8624,
-4208,
3001,
15944,
20387,
16074,
10947,
7833,
4136,
-1356,
-4365,
-5947,
-6215,
2167,
2686,
1463,
1155,
-3143,
-4059,
-8563,
-7981,
-7405,
-2577,
643,
2112,
4024,
4473,
5985,
10066,
13163,
6295,
-1868,
-6055,
-9264,
-15025,
-11266,
-6607,
-4786,
-1332,
1719,
10627,
18807,
18035,
17932,
17221,
13241,
476,
-12777,
-16876,
-18029,
-14586,
-14075,
-9512,
-4084,
2380,
5065,
6115,
3801,
-3013,
-7434,
-3811,
8657,
12041,
14989,
16565,
17513,
10700,
1254,
-1815,
-5362,
-4011,
-6453,
-8750,
-13805,
-19275,
-16404,
-13247,
-6281,
-1545,
-577,
1628,
8179,
14360,
10950,
6427,
8864,
11099,
8226,
10939,
7319,
5166,
3233,
-4226,
-5942,
-13391,
-18153,
-17067,
-14133,
-13302,
-12478,
-9574,
-5033,
2721,
12375,
20645,
20524,
15774,
13407,
9066,
1930,
-1609,
-5897,
-10103,
-9548,
-10705,
-11157,
-8730,
-6964,
2259,
7004,
9707,
6033,
-3136,
-3891,
-3396,
-506,
-1203,
-1415,
2931,
5376,
2242,
-801,
-2451,
-4255,
-3735,
-2526,
2041,
4909,
4822,
7926,
8574,
6627,
-1034,
-8809,
-6850,
-1177,
161,
-708,
246,
-3989,
-4925,
-6768,
-8189,
-3231,
546,
4693,
8907,
7779,
3366,
312,
1046,
3659,
-1326,
-4555,
-679,
5239,
11762,
11277,
5741,
1665,
-225,
-3652,
-4027,
-5712,
-11562,
-8042,
-6449,
-8245,
-7263,
-4058,
-1266,
2948,
6290,
6100,
3510,
4874,
13411,
12066,
12012,
5753,
-2726,
-351,
-1991,
-5390,
-6261,
-5099,
-4254,
-1254,
-1705,
-5868,
-6041,
-6231,
-3610,
-1786,
-521,
-975,
-2387,
748,
1061,
1010,
2747,
13761,
19768,
17707,
13645,
8424,
5714,
-4898,
-11595,
-13167,
-12115,
-9024,
-8735,
-7889,
-7514,
-11973,
-17097,
-13400,
-6030,
4192,
15603,
20701,
19878,
14182,
9349,
5789,
6500,
4349,
-5146,
-6741,
-6208,
-9808,
-13389,
-11953,
-9962,
-9737,
-8314,
-6814,
1144,
6033,
9640,
13442,
13029,
10730,
5208,
170,
-2859,
-5745,
-11303,
-9171,
-5428,
1246,
5496,
4825,
5809,
-2405,
-5575,
-5021,
-3279,
1515,
4733,
7364,
7663,
8542,
177,
-5679,
-1144,
-1460,
-2487,
-3157,
-3478,
-7331,
-6233,
-6206,
-5965,
-2320,
273,
7037,
7268,
8255,
8167,
10862,
14460,
14642,
10623,
3729,
-1873,
-5530,
-4667,
-8563,
-10399,
-8802,
-11242,
-13272,
-10888,
-4788,
-1905,
1581,
6465,
3714,
9491,
15494,
18998,
21689,
18202,
15465,
10100,
2277,
-8795,
-14726,
-16318,
-16060,
-17203,
-15384,
-10702,
-5158,
3667,
7120,
6111,
1148,
290,
4840,
4978,
7586,
8353,
4560,
2444,
12,
-1809,
-722,
371,
-2010,
415,
265,
-493,
-1086,
-1871,
1160,
-1226,
-4228,
-7202,
-8487,
-3728,
3843,
2807,
4873,
8098,
4390,
1795,
-3994,
-5147,
-5188,
-2331,
5580,
11902,
8567,
3691,
2996,
39,
-1848,
-10976,
-15508,
-8690,
-3979,
-251,
2570,
3708,
2848,
2128,
869,
-2317,
1492,
638,
-833,
-955,
-3674,
-7248,
-9569,
-1706,
5666,
10789,
9572,
4889,
1472,
2443,
1457,
-1485,
-1804,
-7221,
-8739,
-6078,
-3625,
-732,
-1251,
3,
3181,
7101,
3310,
-3614,
-2894,
-4786,
-3736,
-5079,
-7866,
-3771,
8084,
10433,
12845,
12990,
7314,
10875,
4235,
815,
-1970,
-5612,
-10005,
-11232,
-6474,
-5492,
-3705,
-2744,
-1479,
-2559,
-3109,
-7131,
-10112,
-2196,
6067,
15708,
24427,
24931,
19299,
15619,
15446,
6476,
-4256,
-14625,
-17675,
-17515,
-18874,
-18599,
-16208,
-12917,
-7857,
-3668,
-3876,
6844,
14540,
20909,
21015,
11301,
4799,
-1875,
-7387,
-6333,
-254,
-1188,
-4442,
-1862,
-752,
-2420,
-4203,
-8255,
-11957,
-12576,
-9619,
-7755,
-3050,
3147,
11792,
17382,
18293,
15953,
4033,
-1998,
-4073,
-6285,
-9456,
-14086,
-12487,
-6581,
524,
2684,
3660,
5913,
4628,
1495,
1488,
1056,
-2254,
622,
1695,
1133,
2682,
2697,
2282,
-227,
2714,
2117,
-5507,
-8759,
-13250,
-14236,
-6957,
-2093,
-344,
7065,
9588,
16277,
25672,
19875,
12446,
3984,
5041,
-369,
-15536,
-19995,
-18774,
-15877,
-13433,
-11834,
-9176,
-551,
6608,
12560,
12525,
4682,
-558,
1033,
1732,
1511,
10096,
14443,
12461,
12683,
7408,
-120,
-9984,
-15530,
-14398,
-13325,
-9056,
-6284,
-6309,
-2121,
6741,
9834,
9649,
5380,
3665,
4470,
4345,
173,
-5783,
-3791,
-1223,
3173,
5730,
4001,
3558,
4022,
6247,
4075,
-2793,
-5186,
-7656,
-9403,
-11107,
-14340,
-14849,
-6731,
2791,
11485,
16398,
14704,
8696,
1190,
-939,
-5509,
-4278,
-5315,
-2983,
534,
4250,
3970,
-2559,
-117,
-633,
1247,
-2848,
-8913,
-11591,
-8704,
-4882,
-3916,
-128,
3695,
8346,
10902,
9779,
2317,
-1565,
-2655,
-1133,
-3019,
-8043,
-3886,
1313,
3998,
4750,
275,
722,
591,
573,
-392,
-3191,
-3673,
-3437,
1960,
1445,
6463,
6233,
4609,
2119,
-1427,
1664,
453,
84,
-4949,
-9182,
-10036,
-6621,
-8238,
-2534,
6423,
15321,
26484,
21755,
16989,
9886,
1525,
-4200,
-13500,
-16282,
-14720,
-13491,
-11707,
-7592,
-5524,
-4192,
3719,
3549,
1821,
2480,
1259,
5542,
13030,
16856,
16099,
14785,
8805,
1325,
-5342,
-7163,
-11393,
-14432,
-14451,
-15794,
-12534,
-9010,
-7117,
-5462,
-816,
1816,
7092,
14862,
20327,
20260,
15034,
7765,
-4932,
-10741,
-4440,
-3019,
-1749,
-1489,
-5099,
-4435,
-6904,
-4108,
-3691,
-3922,
-4691,
-8327,
-7701,
-2956,
-1767,
4837,
13911,
11328,
15479,
13172,
5065,
-1809,
-8639,
-10683,
-11454,
-10407,
-9779,
-9240,
-1847,
5317,
5600,
1286,
4107,
5588,
4060,
5251,
207,
-187,
2637,
2878,
-4053,
-6801,
-6839,
-5805,
-4102,
-4323,
-7072,
-6899,
922,
4795,
9663,
13209,
10627,
3749,
986,
3039,
6214,
8090,
6880,
4062,
-3954,
-11291,
-14570,
-15968,
-11742,
-6872,
1394,
5162,
7952,
9051,
8715,
13664,
8641,
1048,
-7533,
-6737,
1122,
3669,
1608,
4531,
6705,
273,
-2625,
-2648,
-1886,
-3314,
-2239,
-2064,
-1110,
-162,
-2116,
-1005,
-3234,
-4014,
-5927,
-4094,
6099,
9259,
9495,
10766,
7754,
351,
54,
2974,
4897,
3958,
-4584,
-8871,
-6474,
-4615,
-12018,
-11956,
-6497,
-4315,
-835,
-4931,
-5138,
-175,
4189,
8066,
9104,
9188,
7620,
2963,
3686,
1916,
-5471,
-1749,
372,
875,
384,
-6253,
-4779,
-3730,
-4863,
-5635,
-7104,
-5218,
-6779,
-8150,
-2975,
5268,
6334,
8856,
8861,
6286,
10305,
7215,
29,
-7253,
-5669,
-1335,
-2138,
-2480,
-4442,
-7655,
-9100,
-11492,
-12136,
-2217,
8250,
16972,
19037,
13231,
7612,
2375,
159,
-1627,
-5406,
-6674,
-8026,
-10006,
-7384,
-6655,
-4459,
277,
1055,
225,
4592,
12377,
15347,
12333,
10218,
11273,
9039,
4312,
-3648,
-8133,
-7572,
-10622,
-15011,
-12624,
-8432,
-4187,
1384,
3106,
1106,
1258,
5969,
8376,
13222,
14886,
13905,
12554,
9083,
2007,
-9105,
-10356,
-7427,
-7199,
-8903,
-10152,
-8500,
-8955,
-9092,
-5571,
-128,
2752,
-561,
-2680,
3454,
5738,
6257,
11400,
8013,
11347,
16018,
7562,
841,
-5498,
-7460,
-9103,
-15398,
-17219,
-14929,
-9733,
-1682,
2565,
-2335,
-552,
3078,
5031,
11036,
8894,
8417,
8022,
3846,
-1951,
-5523,
-5817,
-4997,
-5750,
-7327,
-5497,
-5508,
2948,
9358,
8666,
7490,
3275,
-1567,
-4471,
-418,
3598,
4670,
1372,
-1492,
-2324,
-5182,
-7153,
-9107,
-7548,
-4051,
2321,
5906,
7013,
9226,
10802,
12573,
7518,
716,
-4463,
-7906,
-6208,
-2589,
-5274,
-6847,
864,
1144,
-705,
71,
-1032,
320,
839,
3312,
2677,
1973,
-1282,
-3966,
-1928,
-159,
-991,
-4364,
2640,
8761,
10323,
9288,
3081,
-3049,
-3876,
-1359,
-1681,
-3080,
-5416,
-8592,
-4724,
1431,
-4225,
-8552,
-635,
5349,
4968,
-912,
-7366,
-2375,
2598,
5530,
8306,
9455,
10056,
7949,
8814,
7340,
-2842,
-12089,
-9527,
-5914,
-5384,
-4619,
-4529,
-3675,
-2357,
-2302,
-6135,
-5024,
-757,
-775,
1938,
6550,
5363,
2689,
7384,
13536,
14623,
10173,
1217,
-5250,
-5423,
-3345,
-8431,
-10988,
-8641,
-11338,
-11623,
-11806,
-12318,
-6799,
6288,
17325,
21768,
21125,
14826,
5750,
593,
780,
-5777,
-11922,
-10232,
-7166,
-5899,
-967,
-528,
-4827,
-3612,
-5807,
-4897,
1959,
4474,
5147,
5031,
7851,
11408,
8460,
3464,
-1697,
-2819,
-4723,
-9058,
-14903,
-11372,
-6744,
-6906,
351,
3705,
4562,
6683,
10232,
8810,
9550,
9149,
8308,
7059,
804,
-6798,
-14512,
-8645,
-4985,
-4474,
-4173,
-3177,
-2090,
-4265,
-1716,
2500,
5200,
756,
-3889,
-3480,
6844,
14217,
13258,
15637,
12301,
11651,
7195,
-3560,
-9900,
-14582,
-13874,
-15320,
-15148,
-12803,
-8823,
1061,
11660,
9914,
-164,
3020,
7054,
8161,
7347,
2260,
2127,
7042,
8827,
2673,
1146,
-1567,
-8873,
-12507,
-11331,
-8783,
-8398,
-4222,
-221,
3620,
5079,
1445,
-2261,
2879,
11724,
12319,
9694,
2047,
-4365,
-7717,
-10185,
-13356,
-12886,
-3345,
3562,
10126,
11321,
4879,
4116,
7976,
7343,
-1447,
-12273,
-15411,
-11291,
-5484,
-833,
-516,
2032,
8125,
5926,
1284,
1028,
-1621,
-2204,
-2437,
-4317,
-414,
5507,
6495,
5778,
5558,
3241,
-3387,
-7147,
-3864,
-1266,
1458,
-1089,
-7511,
-8594,
-2394,
3972,
8444,
7454,
2180,
399,
3807,
3866,
-8806,
-9916,
-3547,
-140,
1858,
224,
1080,
5983,
9106,
8925,
6713,
4682,
3672,
-4057,
-7449,
-7608,
-10781,
-11096,
-4219,
1506,
5714,
7478,
8284,
4603,
-2745,
-3825,
-4224,
-6464,
-9533,
-3383,
7987,
16766,
14137,
9187,
7115,
8091,
9347,
2095,
-9084,
-15328,
-12456,
-9198,
-8951,
-6283,
-1968,
-2235,
-1130,
-1263,
-2149,
-121,
9526,
14583,
12264,
7395,
3437,
4815,
5506,
6223,
-79,
-5156,
-5416,
-5369,
-6508,
-5705,
-11926,
-16969,
-14503,
-9987,
-2564,
5041,
12412,
13848,
20306,
21391,
15020,
3083,
-8546,
-10716,
-13230,
-11846,
-12791,
-13577,
-4315,
2426,
5318,
4833,
1356,
-1074,
-1645,
-83,
-2130,
-1248,
2412,
5468,
5599,
5117,
-1345,
-3960,
15,
-722,
-3268,
-7139,
-8149,
-12459,
-9204,
395,
7440,
8363,
5591,
787,
6764,
17093,
8956,
3812,
4548,
208,
-3558,
-5389,
-10031,
-11759,
-7809,
-3000,
-2365,
-2048,
-391,
2079,
6495,
8115,
-2388,
-7743,
322,
8128,
13064,
12080,
12512,
9162,
8669,
5220,
-4109,
-10314,
-16747,
-18852,
-14769,
-10714,
-11248,
-5672,
5328,
11664,
14902,
11641,
2283,
-560,
2891,
3952,
2400,
1585,
-973,
-2003,
-941,
2056,
-6318,
-10449,
-1369,
2068,
7715,
2419,
-4658,
-70,
5031,
2520,
-2041,
-3598,
-2491,
3441,
8453,
10281,
3311,
-2653,
-3454,
-6464,
-4501,
-41,
-241,
-993,
4639,
11041,
7699,
4431,
1943,
245,
-4547,
-12390,
-15836,
-13909,
-5694,
822,
7950,
4775,
1489,
1329,
1361,
7523,
7178,
-2016,
-7765,
-4113,
-272,
-1065,
-7844,
-1046,
5770,
4145,
833,
-4115,
-2587,
-1570,
-2279,
-3119,
-3118,
-1085,
709,
-2579,
803,
2998,
-2657,
-3624,
3162,
7104,
3150,
-850,
-2944,
-4185,
-3315,
-2572,
-2815,
-299,
-1319,
2243,
6753,
8951,
6485,
-4639,
-3306,
2889,
2494,
-4392,
-9694,
-5713,
-958,
2850,
1944,
1049,
3025,
789,
-7022,
-10196,
-5001,
4491,
16989,
20424,
20064,
16517,
7627,
2187,
-611,
-1338,
-7786,
-11516,
-10958,
-10387,
-9128,
-6665,
-6856,
-9085,
-2743,
-590,
9371,
16461,
14529,
11241,
10119,
15117,
6416,
-1654,
-5059,
-5058,
-3774,
-11570,
-17376,
-10204,
-2891,
-3270,
-2347,
-2879,
-6757,
-4893,
-2261,
1130,
6322,
13981,
15740,
7365,
4883,
2489,
-8065,
-9253,
-1401,
-7450,
-6329,
-1090,
-2378,
-7416,
-5089,
7253,
3917,
-2599,
-1906,
-901,
3235,
7226,
1569,
-3892,
559,
6347,
2646,
-5733,
-5545,
-2694,
-4553,
-3273,
-7527,
-7907,
-1385,
7541,
11999,
6001,
-967,
-1875,
4694,
3606,
8375,
11254,
4369,
1583,
2821,
-4335,
-11249,
-9606,
-12499,
-13272,
-4066,
4472,
-720,
2065,
13290,
12023,
10330,
6540,
-2181,
1507,
7748,
10830,
3291,
-5129,
-2370,
-4922,
-8664,
-10096,
-13413,
-12885,
-3815,
3173,
4401,
160,
4387,
11528,
5393,
-806,
-774,
-4389,
-8920,
3898,
12764,
5905,
-1512,
-1576,
-1125,
-6528,
-1462,
1933,
-2382,
-637,
5213,
6228,
372,
402,
-1468,
-8227,
-7580,
-5336,
-9318,
-3998,
6943,
7939,
2932,
-1036,
2832,
2889,
9240,
16461,
4628,
-5782,
-1330,
330,
-5716,
-7041,
-4649,
-6671,
-7729,
-1889,
-1453,
-6933,
-5404,
-1228,
743,
4958,
6359,
5584,
-796,
1765,
4566,
-1584,
-1423,
1186,
3911,
2101,
2959,
3137,
-4782,
-5721,
-3110,
-5834,
-8887,
-7943,
-3997,
-764,
11164,
13166,
1657,
-1189,
7269,
8906,
-64,
-5958,
-3112,
-1889,
-5075,
4032,
6657,
-1726,
-2257,
-3501,
-7504,
-2395,
249,
3779,
11321,
14923,
13029,
4240,
2863,
4618,
-2066,
-4932,
-5548,
-10273,
-12118,
-7000,
-1473,
-2395,
-11100,
-10410,
-551,
6169,
18070,
17796,
13208,
16746,
20289,
13085,
-6580,
-14962,
-10119,
-10506,
-12666,
-10297,
-11731,
-12450,
-5252,
-2971,
-4587,
-444,
593,
1154,
6517,
13162,
7453,
4269,
12759,
12864,
5505,
-370,
-2989,
-5443,
-8241,
-6745,
-8828,
-15047,
-15280,
-6792,
-232,
1038,
3983,
1597,
-5578,
-725,
11853,
8851,
13,
-1086,
7891,
4004,
-877,
791,
-2250,
1558,
2877,
-7,
-9003,
-7327,
-2737,
-2541,
1061,
625,
-6437,
-9333,
4606,
10945,
4692,
3519,
6847,
4776,
758,
809,
-7780,
-15344,
-13200,
-8530,
-3178,
1478,
4003,
9344,
16503,
15409,
11713,
-2465,
-12157,
-4250,
1220,
2844,
-847,
-5692,
-4826,
-602,
-948,
-9861,
-12371,
-1518,
6812,
6379,
7812,
5429,
820,
3292,
9898,
6653,
-1039,
2321,
7005,
4834,
2171,
669,
-8236,
-9241,
-4949,
-3051,
-1347,
1326,
1484,
3276,
8540,
10376,
4130,
-5981,
-3779,
-6436,
-7156,
-8642,
-11364,
-798,
13051,
20939,
15172,
1485,
3351,
8567,
1541,
-482,
-3693,
-9755,
-10892,
-7843,
-8024,
-8478,
-10500,
-2542,
4088,
-2319,
-2156,
520,
-498,
-871,
2563,
6220,
9942,
11304,
9519,
7200,
9071,
4265,
-9692,
-11712,
-4443,
-7781,
-11394,
-11370,
-11829,
-12184,
-7680,
-139,
-1968,
-289,
5877,
14284,
13499,
5746,
1531,
-751,
-322,
1021,
2954,
305,
99,
3702,
4237,
838,
-3105,
-6888,
-13255,
-15925,
-12090,
-6694,
-2666,
8054,
17383,
18355,
19347,
11541,
-1142,
-5871,
-2540,
-2662,
-7903,
-12426,
-11357,
-7019,
-751,
3400,
-2884,
-3673,
5892,
15724,
13777,
7505,
9262,
6903,
929,
-265,
-5007,
-8663,
-7262,
-6014,
-1272,
-5736,
-10508,
-6571,
-3067,
1639,
-543,
-2129,
3705,
7354,
11589,
23403,
22155,
16682,
9189,
-1375,
-3170,
-15518,
-22370,
-16558,
-10305,
-7692,
-4720,
-6734,
-6033,
-1181,
8443,
13596,
3476,
-631,
1706,
1312,
-534,
4414,
1172,
4642,
14609,
11853,
3958,
-1114,
-4398,
-10626,
-14853,
-14425,
-12220,
-9261,
-4406,
255,
1272,
1142,
-546,
3218,
11189,
11873,
13988,
3265,
-3611,
-5220,
-5966,
-1361,
-2225,
-841,
-2001,
887,
7019,
3849,
-6435,
-4325,
398,
-1791,
-5541,
-8387,
-8291,
-3197,
6246,
8334,
5956,
6913,
5828,
-970,
-2737,
-7373,
-14494,
-7031,
8556,
13222,
8641,
9843,
11362,
5476,
252,
-1467,
-10268,
-15040,
-9728,
-5918,
-4337,
-6284,
-5540,
-2391,
2303,
10350,
14833,
10267,
6857,
4881,
1506,
-3621,
-9854,
-5941,
-4750,
-4681,
3063,
-356,
-4408,
6401,
10720,
5751,
1976,
-1805,
-6617,
-2213,
3508,
2873,
-4021,
-3909,
2708,
-2522,
-282,
2504,
-4510,
-10022,
-6323,
-3705,
-5002,
118,
8302,
13894,
17106,
18415,
13874,
7253,
3725,
1414,
-5954,
-14333,
-18315,
-16316,
-12213,
-5989,
110,
-4966,
-5435,
5544,
7048,
1986,
622,
831,
640,
6809,
15907,
11013,
3296,
11024,
11558,
859,
-4022,
-8227,
-10610,
-12566,
-10323,
-9760,
-13672,
-11522,
-7689,
-8912,
-1952,
10925,
13675,
17769,
20479,
16498,
7591,
-4202,
-7801,
-7110,
-4434,
-808,
-4198,
-9542,
-6773,
-194,
58,
-5526,
-11263,
-12271,
-7068,
4234,
10559,
5195,
8042,
16040,
14513,
7994,
-542,
-2387,
-3739,
-8328,
-11548,
-13994,
-13232,
-5552,
3259,
7488,
9185,
2875,
-424,
2390,
10428,
13309,
3317,
-1928,
-3430,
-6868,
-8226,
-8705,
-12417,
-9075,
1590,
7848,
1850,
-4312,
-965,
438,
4432,
7419,
3110,
-1686,
5798,
15203,
8474,
647,
-1947,
1217,
2523,
-1622,
-5453,
-9156,
-12054,
-10531,
-5803,
-2069,
1827,
5302,
10605,
8385,
7831,
6793,
-8879,
-8964,
5184,
9238,
10672,
8566,
5147,
1044,
-410,
2993,
-6761,
-11406,
-8244,
-7041,
-3125,
-3573,
-8557,
-6037,
5415,
7516,
4534,
-2904,
-1013,
5980,
7001,
6862,
415,
2132,
2527,
308,
1123,
-1118,
-4846,
-1537,
2914,
2607,
6057,
3182,
-6256,
-9699,
-7242,
-9923,
-15086,
-8136,
-474,
4197,
11749,
10340,
-19,
-2813,
4372,
4062,
6789,
6162,
1582,
3616,
5604,
3752,
-6264,
-9703,
-6653,
-7602,
-12884,
-11929,
-10729,
-7376,
1736,
5154,
6302,
7602,
10583,
9973,
5275,
6851,
5502,
-3958,
-7687,
-4923,
-469,
-5077,
-9753,
-5012,
-2756,
-2793,
-5,
2719,
-448,
3080,
9869,
9508,
6061,
2309,
-825,
-1499,
2353,
-1972,
-12922,
-11524,
106,
-411,
-2083,
-665,
-1224,
-470,
-457,
3808,
3164,
7811,
17043,
13549,
8907,
6419,
-2031,
-10351,
-9127,
-4172,
-8041,
-11439,
-9915,
-3387,
473,
-798,
-434,
-2091,
-5190,
-4138,
2505,
8996,
14313,
18059,
21343,
18422,
15538,
3174,
-9961,
-7581,
-7740,
-10267,
-13281,
-13109,
-9528,
-9454,
-4488,
-3245,
-10125,
-7637,
2635,
14234,
19386,
16413,
12686,
8493,
4484,
4114,
-2704,
-7304,
-3756,
-1419,
-5768,
-7229,
-9788,
-14884,
-6910,
-4836,
-2157,
-2012,
-1349,
2365,
5482,
13274,
13424,
6037,
2817,
4042,
-4358,
-7912,
-9735,
-10230,
-3831,
4665,
5163,
-2543,
-496,
4704,
10943,
6232,
-1935,
-6643,
-7043,
-63,
-2852,
-2884,
-2899,
-2115,
5255,
2857,
-1399,
-2370,
-3523,
-5351,
-2371,
2854,
-1816,
-855,
9305,
9721,
4617,
4586,
-4567,
-7230,
740,
3088,
5813,
-585,
-2932,
-4583,
-7274,
67,
612,
-6701,
-3754,
3258,
4092,
6571,
179,
-3546,
3037,
654,
-3552,
-2836,
3688,
12191,
15019,
14407,
8790,
2168,
-6141,
-11402,
-11933,
-8081,
-9194,
-8817,
3016,
6082,
5331,
3940,
-222,
-5088,
-5492,
-2763,
-2377,
-1857,
1005,
2900,
5185,
8240,
2783,
-1642,
7541,
15571,
10954,
3761,
-5231,
-8725,
-7541,
-8785,
-12407,
-11544,
-6099,
-4498,
-6369,
-2775,
1229,
1583,
9214,
9153,
5170,
4755,
2481,
4559,
7738,
8041,
5787,
901,
-2528,
-7000,
-8634,
-9238,
-14903,
-17276,
-11191,
-6308,
-2091,
3165,
1641,
7443,
16156,
20129,
12342,
2189,
1213,
-2008,
-6642,
-11073,
-14736,
-10803,
2847,
6926,
8122,
4677,
-4060,
-3748,
-6220,
-2814,
2227,
4527,
7900,
5117,
6260,
4771,
-1708,
-1585,
1471,
1198,
-213,
-4408,
-7757,
-4993,
-3779,
-3238,
-2743,
-552,
-623,
8879,
20044,
15854,
10401,
5387,
7166,
416,
-9577,
-11018,
-11069,
-6732,
-6670,
-4143,
-3003,
-3523,
-1990,
-3024,
-4540,
-4720,
-5124,
-3278,
6125,
16177,
20513,
17289,
13434,
12209,
8628,
-1506,
-10251,
-11940,
-14434,
-16466,
-16552,
-14670,
-14678,
-11382,
-1366,
7983,
11297,
4729,
3201,
8407,
11993,
9778,
214,
-3956,
-2481,
-991,
2107,
2980,
29,
-4019,
-2771,
-2786,
-7647,
-8534,
-5311,
-3541,
-2206,
1814,
-2867,
-3554,
4581,
9951,
10544,
9674,
544,
-3600,
941,
-4807,
-5467,
-8334,
-7306,
-996,
4043,
11638,
10001,
4812,
2871,
-726,
-3471,
-9872,
-16792,
-11769,
-1545,
2251,
4203,
8467,
4361,
2211,
5308,
2209,
-5254,
-5352,
-659,
-1252,
-4209,
-2235,
588,
3386,
12247,
12466,
3387,
2731,
3921,
412,
1980,
-2627,
-9516,
-9341,
-8391,
-3516,
873,
4672,
5094,
4046,
7480,
6190,
1429,
-3674,
-7430,
-9920,
-7037,
110,
4311,
9011,
11365,
11554,
8085,
-511,
-12853,
-10030,
-349,
-1958,
-4390,
-6157,
-3499,
-2255,
1805,
3508,
885,
721,
-2216,
-6943,
-5080,
-3103,
-9735,
-3008,
8301,
12353,
14807,
16166,
13237,
6797,
2531,
-2946,
-9254,
-12875,
-14720,
-16947,
-13114,
-8858,
-8947,
-3732,
4837,
9495,
10987,
6191,
5462,
8908,
8427,
2625,
-4673,
-1114,
2438,
2551,
2276,
611,
-6049,
-8454,
-2510,
-3181,
-5828,
-9820,
-13216,
-10924,
-4000,
2572,
5741,
14759,
17553,
13282,
7365,
1338,
-2693,
-9306,
-6637,
-4711,
-5850,
-4418,
-2117,
1714,
6601,
5709,
-2516,
-2789,
-4719,
-2360,
697,
-1002,
-1034,
-500,
7029,
8706,
10417,
3060,
511,
1842,
-1090,
-162,
-9228,
-8556,
-7856,
-7962,
-2984,
4119,
2666,
6312,
19646,
17462,
15368,
12102,
3149,
-3828,
-8681,
-11472,
-11227,
-10140,
-7768,
-3359,
-983,
-3094,
-4434,
-2702,
5992,
7124,
4410,
-537,
-5044,
4064,
11665,
11192,
8145,
7398,
3746,
354,
-6000,
-7731,
-12090,
-16875,
-13519,
-8871,
-5339,
-1619,
4712,
7378,
6591,
5138,
5073,
4100,
5015,
2796,
-1298,
-6634,
-5557,
-392,
3217,
5046,
5770,
417,
-5170,
-4035,
-2081,
-15,
-6710,
-9573,
-2872,
-603,
-2467,
-2033,
-3944,
2586,
10961,
12490,
7661,
5573,
1862,
-6438,
-9589,
-8077,
-2746,
-1016,
4649,
5055,
4709,
3498,
924,
-2314,
-3346,
-3719,
-8889,
-7398,
-3044,
1938,
4054,
4648,
3791,
-718,
-1780,
-9,
4365,
5721,
-1571,
-6663,
-2947,
5447,
5062,
4156,
3772,
2674,
346,
-1202,
-787,
-2042,
167,
-2013,
-3937,
-6666,
-6420,
-3215,
5234,
9765,
6437,
4716,
2081,
2624,
2834,
1374,
-6108,
-10242,
-7029,
-5537,
-2120,
4505,
4967,
2561,
6634,
9370,
6198,
624,
-1763,
-1867,
-1788,
-1838,
-7349,
-7190,
-5373,
-6033,
-71,
420,
-2647,
-3382,
1942,
1237,
-306,
3303,
6183,
15123,
14687,
10680,
1798,
-179,
3420,
-3902,
-8918,
-10885,
-16081,
-16156,
-5160,
-3584,
-2945,
-3992,
-7780,
-2991,
7251,
12776,
10102,
12034,
9179,
3567,
586,
31,
-3717,
-4664,
1403,
406,
-329,
-5084,
-9664,
-5608,
-822,
-2610,
-9187,
-9868,
-7053,
-316,
6899,
9196,
7117,
7824,
13079,
7052,
1083,
-1388,
-6597,
-7971,
-2548,
-1636,
-6926,
-2711,
308,
-1405,
-1582,
-2342,
-6748,
-1756,
5759,
10290,
13731,
6347,
-630,
-3898,
-1611,
-764,
-2549,
-4210,
-3336,
-1914,
-270,
-4846,
-12793,
-5244,
4262,
10165,
11699,
4465,
2144,
9351,
11328,
8977,
2135,
-5357,
-4482,
-4674,
-5005,
-7519,
-14725,
-14677,
-7637,
-1677,
4599,
7419,
6291,
7225,
4585,
3392,
2295,
-1197,
2661,
7686,
10629,
7030,
-1514,
-8035,
-6710,
1226,
-1153,
-8063,
-8710,
-6348,
-2332,
1156,
2223,
-2287,
-2003,
3111,
2085,
-1842,
-4322,
-3450,
3014,
14147,
11464,
2323,
-1802,
-2409,
-1745,
-3667,
-3632,
-1300,
1048,
-2092,
-951,
2201,
-4034,
-9358,
-8048,
-5154,
-976,
2721,
6184,
8176,
8078,
6709,
-1843,
-7253,
-1387,
2292,
6118,
8750,
828,
-1307,
4964,
6540,
1370,
-6948,
-7510,
-5811,
-5865,
92,
-232,
-1367,
933,
-1190,
-2877,
-963,
-229,
3236,
7398,
6884,
5631,
2950,
3126,
345,
1943,
1208,
-3561,
-4174,
-7360,
-8268,
-6281,
463,
-4166,
-7494,
3337,
8820,
14078,
8814,
-1998,
-717,
3926,
6840,
623,
-7450,
-6457,
-5100,
-5750,
-1789,
-4946,
-7323,
-251,
3575,
7637,
6442,
7845,
6833,
5629,
3783,
-2906,
-1750,
-2371,
-4159,
-7717,
-9647,
-12205,
-9720,
-919,
1381,
-767,
-2216,
-5626,
-7189,
7090,
21506,
18464,
13221,
11739,
8250,
3799,
-3123,
-13285,
-14139,
-7584,
-5419,
-2994,
-7731,
-7216,
-4040,
-4108,
-5540,
-8916,
-4050,
7362,
9511,
8624,
9649,
-1422,
4779,
15381,
10831,
7180,
3128,
-2651,
-1762,
-3195,
-7588,
-11199,
-12627,
-10589,
-8852,
-6124,
-1527,
-1097,
-23,
9085,
10980,
17583,
12000,
2380,
-3370,
-4400,
-2844,
-4530,
-1878,
-2473,
814,
-1090,
-4739,
-10006,
-4791,
579,
2272,
772,
-2742,
-1487,
2058,
8962,
9273,
5007,
302,
-2395,
-5055,
-4940,
-8168,
-13783,
-12690,
-5683,
-4378,
3430,
10101,
10801,
13505,
8534,
4442,
3324,
666,
-3326,
-3289,
-6708,
-5518,
-8800,
-9773,
-706,
1702,
2089,
-3519,
-2083,
3477,
4856,
4761,
1372,
-2834,
-3759,
2347,
3008,
3688,
5763,
8839,
14021,
11689,
8316,
-4026,
-11396,
-9642,
-8672,
-6182,
-3844,
1876,
2216,
2006,
-1157,
120,
-2172,
-8081,
-3012,
-2648,
-156,
-437,
2800,
10639,
12059,
11041,
9291,
1025,
-1758,
2808,
-3452,
-3375,
-9325,
-14413,
-6181,
-1107,
1609,
-1095,
-899,
758,
3247,
4355,
1513,
2901,
1293,
-3095,
-7879,
-5378,
3333,
8315,
14841,
15835,
12708,
6017,
-1403,
-6929,
-9237,
-8830,
-13791,
-14097,
-12324,
-10604,
-5432,
-804,
614,
3707,
7918,
10285,
12667,
5860,
-716,
-494,
-1363,
1152,
-1379,
-5389,
-13,
4186,
752,
-2821,
-9695,
-13314,
-7520,
-7958,
-4707,
979,
5814,
11547,
12114,
9888,
8144,
3908,
-1801,
-2353,
-9281,
-13055,
-14426,
-15096,
-6748,
-1564,
3877,
7170,
6036,
6351,
12416,
16631,
13685,
7664,
486,
-4592,
-10123,
-8955,
-10007,
-9235,
-1018,
4113,
1873,
-3167,
-830,
-2556,
-4782,
-2898,
-3963,
-4323,
2128,
9877,
15679,
20056,
16058,
10390,
8649,
-1151,
-4223,
-4894,
-11831,
-16716,
-16477,
-10301,
-9560,
-6169,
-3701,
895,
1890,
4308,
1318,
-2112,
8652,
12125,
8370,
4583,
5660,
3069,
6416,
12336,
7159,
-2908,
-8840,
-10955,
-14747,
-16326,
-18689,
-13684,
-1864,
1124,
3322,
4948,
9563,
12887,
13920,
11782,
2010,
-738,
-6386,
-14003,
-12034,
-3741,
-7875,
-5055,
4497,
5975,
8762,
8283,
6205,
870,
-2226,
-6754,
-10135,
-7143,
-3125,
-10,
4018,
3405,
-2823,
-2166,
4950,
5649,
-189,
-6419,
-6658,
-2870,
5928,
9469,
5963,
12687,
10946,
4327,
336,
-3285,
-8196,
-7630,
-3532,
-5423,
-2195,
-5101,
-4852,
880,
3284,
7429,
7122,
5711,
5053,
-559,
-2767,
-6938,
-15011,
-8334,
-2042,
1999,
13260,
12550,
9839,
12227,
9083,
2365,
-11470,
-14457,
-9131,
-8081,
-7412,
-7520,
-9583,
-3786,
6725,
7058,
6822,
3424,
632,
-4176,
-4952,
-3728,
-2647,
4104,
6002,
9203,
10041,
8744,
5344,
5371,
3999,
-1958,
-5756,
-13333,
-13291,
-9041,
-3847,
-2625,
-5317,
-4901,
-2307,
7009,
11669,
7464,
-4164,
-4914,
5130,
11041,
10644,
4999,
4407,
8991,
7742,
851,
-7328,
-11100,
-8223,
-10493,
-13729,
-15421,
-15266,
-9680,
-3115,
1766,
11250,
14222,
18937,
20436,
14024,
6017,
-5057,
-10524,
-13782,
-10890,
-8530,
-7378,
-7420,
611,
6646,
7080,
2967,
-6141,
-7036,
-3833,
2439,
8024,
4764,
1378,
5346,
5503,
2769,
-583,
-5249,
-4112,
1516,
651,
-4547,
-10608,
-2042,
5945,
5919,
5542,
3525,
9062,
11586,
13364,
11336,
4665,
-5407,
-8673,
-4464,
-5611,
-7298,
-8723,
-7590,
-5283,
-1003,
5141,
4881,
846,
-978,
-3848,
-7024,
-5973,
-3894,
7325,
20540,
23229,
16308,
4067,
-475,
-2863,
-1974,
-7931,
-19558,
-18090,
-12326,
-12340,
-10833,
-8030,
-4192,
6434,
12813,
11945,
7488,
7377,
7423,
2541,
2323,
3706,
860,
433,
-204,
-3591,
-3988,
-7454,
-13653,
-9100,
-3370,
1,
3958,
-1754,
-4922,
-2783,
962,
2290,
2770,
6186,
9146,
8476,
6411,
-2646,
-15378,
-7669,
1703,
-906,
2045,
4510,
5461,
7662,
7548,
8048,
-442,
-3273,
-5870,
-12237,
-11189,
-11567,
-9031,
1347,
11232,
11596,
9067,
744,
-1304,
244,
4562,
1579,
-2688,
1389,
-356,
2980,
6751,
473,
-12040,
-7232,
915,
4583,
2564,
-1626,
3364,
3358,
2026,
-5436,
-8686,
-2982,
1358,
6262,
6856,
2208,
-3404,
2555,
4973,
-8,
-1828,
-7225,
-4209,
1110,
6055,
7624,
3876,
4707,
4089,
-1516,
-4619,
-6355,
-8949,
-4265,
-1946,
510,
3690,
-3610,
-4078,
2300,
5263,
335,
-4470,
-5166,
-1577,
3677,
1487,
4031,
1283,
13082,
17255,
7277,
4329,
-4426,
-2400,
-4296,
-6189,
-10556,
-14885,
-13666,
-10521,
-7833,
-5456,
-4755,
-5626,
2789,
9209,
14999,
15418,
13452,
12483,
7735,
3246,
621,
-1705,
-6399,
-9827,
-7393,
-7922,
-11377,
-14128,
-8197,
-2833,
-3482,
-4904,
-10996,
-739,
12823,
20366,
20879,
13833,
6825,
4134,
-580,
-8007,
-9609,
-10150,
-5541,
1261,
4187,
480,
-3990,
-3734,
-1542,
-2066,
-1428,
-3714,
-60,
5650,
7958,
7454,
3084,
-2099,
-5568,
-1013,
4758,
3889,
-3135,
152,
-2537,
413,
4077,
-5707,
-4456,
1074,
4623,
3993,
-59,
-2405,
5944,
16074,
10250,
1037,
-8200,
-10429,
-4435,
-2019,
-2024,
-6950,
-2837,
874,
-881,
-2231,
-1604,
-5161,
4038,
13320,
5247,
6103,
5126,
8080,
8693,
5365,
-242,
-7455,
-10528,
-10453,
-8366,
-7168,
-9558,
-11364,
-4433,
5226,
11269,
8824,
3412,
2897,
6682,
6244,
-291,
-3111,
6916,
7344,
4200,
1061,
-9193,
-10556,
-4021,
-1325,
-1436,
-2482,
-3703,
-1903,
-1663,
2703,
1069,
-45,
-2822,
-5906,
-2122,
5273,
2041,
1321,
7137,
3840,
5027,
1251,
-5039,
-3371,
3676,
6424,
8874,
-457,
-3574,
-4044,
-6362,
-5142,
-14780,
-16097,
-7588,
2571,
7043,
4541,
2284,
6182,
5472,
5841,
-823,
-3940,
2334,
4044,
2903,
3173,
-2341,
-5818,
-443,
1728,
4225,
-994,
-6664,
-11148,
-4080,
1741,
650,
-1333,
-144,
214,
965,
4307,
-670,
-330,
5488,
12104,
9341,
288,
-11103,
-6690,
5466,
3620,
-3731,
-3654,
25,
2448,
4501,
901,
-7009,
-5459,
2952,
5300,
5637,
2831,
1412,
-1402,
1382,
496,
-4250,
-2417,
-2063,
-5687,
-3467,
-3083,
-7901,
-3864,
4657,
15697,
22100,
16351,
5753,
5565,
1232,
-3793,
-7343,
-12852,
-13575,
-10859,
-8102,
-8789,
-10886,
-7054,
-655,
1574,
7724,
3043,
1890,
9265,
11376,
8695,
6107,
4027,
4120,
5486,
813,
-3990,
-9750,
-11583,
-9161,
-7928,
-9255,
-9256,
-4910,
-2356,
-1750,
3370,
5241,
9150,
9036,
10188,
11715,
1781,
-6058,
-11134,
-5536,
3398,
6280,
650,
-2492,
-352,
-1640,
-1732,
-4422,
-7753,
-5303,
-4187,
-2611,
-3089,
-4548,
4043,
9904,
13626,
11684,
1877,
-825,
0,
-2512,
-4415,
-7863,
-10215,
-5704,
-2709,
-1363,
7008,
7501,
6395,
6768,
5461,
7088,
-1971,
-4791,
-4514,
-2379,
913,
-1223,
-2541,
-1068,
1108,
-70,
-2999,
-8259,
-4805,
4544,
9187,
4201,
-970,
3250,
6400,
8301,
8754,
2632,
1543,
1857,
-3523,
-9204,
-13588,
-13805,
-5966,
-1550,
386,
3753,
4285,
7047,
7377,
7640,
6593,
2125,
-2145,
-6000,
-10303,
-3479,
1838,
1042,
5128,
10713,
11662,
5194,
-3579,
-7008,
-3595,
-2614,
-4328,
-9509,
-6414,
-2523,
1706,
3054,
-423,
-2346,
614,
6721,
7178,
6507,
-2187,
-6638,
-2851,
1807,
4736,
4238,
10050,
11863,
3161,
-31,
-6433,
-14071,
-12790,
-9309,
-5689,
-2860,
-3665,
-4389,
-1298,
5978,
11206,
6079,
2220,
2682,
3904,
192,
-4789,
-9629,
-6978,
3908,
6264,
6257,
1500,
-2892,
4527,
4333,
-5143,
-11720,
-13567,
-10675,
-7110,
-5212,
-2816,
1682,
10077,
19161,
15390,
10271,
3216,
-2241,
-6428,
-10047,
-10278,
-11530,
-2543,
-279,
3509,
8895,
3199,
-3940,
-3535,
-938,
4224,
5833,
-2689,
-3064,
-1002,
4287,
3422,
-1704,
-2058,
637,
2805,
1045,
-3166,
-7287,
-3363,
-2565,
382,
828,
-385,
7767,
16209,
17928,
12575,
9326,
5238,
-3166,
-9939,
-14505,
-16197,
-15937,
-11401,
-5082,
1717,
8293,
6959,
5810,
7964,
5615,
-1519,
-698,
-4279,
-5426,
3458,
5064,
5579,
3165,
3870,
7100,
7611,
1347,
-9009,
-10129,
-10992,
-12702,
-7821,
-4805,
-804,
3890,
5697,
6622,
5343,
7364,
9877,
8494,
5451,
-1041,
-6227,
-6686,
-4087,
-215,
-192,
1623,
874,
-1382,
-3153,
-919,
-435,
-6993,
-9695,
-6958,
-804,
-124,
-1271,
4250,
11336,
13609,
15923,
6439,
-3808,
-4686,
-7133,
-11223,
-15143,
-10759,
-3751,
7044,
17299,
15348,
7049,
5004,
3340,
-3538,
-9274,
-13404,
-9085,
-3379,
-4533,
-2747,
-2978,
-2041,
3921,
6912,
8541,
6957,
-747,
-686,
-300,
-2706,
1398,
-1609,
-3043,
-244,
3644,
3728,
3485,
3648,
2207,
2416,
-2875,
-9595,
-13716,
-7902,
-637,
2048,
4793,
3457,
7809,
12132,
7176,
91,
-6502,
-11325,
-11680,
-2615,
911,
3041,
6582,
9838,
9250,
5137,
3682,
2704,
2724,
-4122,
-11219,
-14085,
-9564,
-9000,
-3634,
4162,
7512,
10294,
4959,
1989,
585,
1886,
2736,
-6510,
-7047,
-575,
-726,
1457,
3125,
673,
1828,
8382,
4580,
-1481,
-8407,
-8589,
-6423,
-8126,
-7213,
-9064,
-6328,
-833,
4798,
6543,
10338,
7355,
8138,
8928,
-993,
-4312,
-4465,
-5333,
-4219,
843,
1753,
4120,
8747,
3662,
-3913,
-5964,
-9477,
-17159,
-12354,
-354,
8426,
13815,
10083,
8765,
6650,
8010,
6840,
-104,
-4376,
-6571,
-8596,
-10570,
-7002,
-4398,
1875,
4088,
3862,
1824,
2009,
5439,
8602,
7628,
-1444,
-358,
-160,
-5212,
-7332,
-3001,
-2050,
-2251,
4554,
6475,
6783,
3351,
-4005,
-9879,
-6569,
-3573,
-1998,
3846,
8132,
13558,
12875,
8420,
-1770,
-7859,
-8405,
-6942,
-1583,
-7151,
-11089,
-6512,
-1093,
2370,
955,
2146,
6912,
5121,
705,
-5744,
-7901,
-1007,
4970,
5952,
5127,
6318,
2863,
1578,
1531,
-2577,
-3944,
-7248,
-7320,
-6060,
-9774,
-6841,
-4071,
-3013,
-508,
1943,
10716,
15017,
8269,
5149,
4740,
-1012,
590,
-4078,
-7061,
-1980,
-1994,
-1665,
-6560,
-6109,
-216,
6186,
3776,
-1389,
-2687,
-5696,
-4801,
-3632,
307,
6408,
10737,
8546,
5019,
368,
-5066,
-7575,
-7819,
-3461,
1006,
3883,
2956,
4403,
6312,
6170,
3832,
-1565,
-3033,
-3283,
-2218,
-2418,
-3832,
-3248,
-2846,
390,
4218,
3138,
-1401,
4968,
10355,
7430,
4603,
-4298,
-3902,
-10,
-2122,
-6828,
-5663,
-4753,
657,
5385,
6611,
12133,
1704,
-1130,
-3660,
-6431,
-2261,
-751,
299,
1360,
1421,
-1049,
3211,
-1567,
-6605,
-1687,
-2075,
-77,
-1845,
-2355,
2833,
7138,
8524,
2080,
-1034,
265,
4279,
-3663,
-3192,
-4802,
-8624,
-916,
-159,
-1846,
-6529,
-2210,
443,
871,
-206,
-1075,
-974,
1911,
-1203,
-2825,
1356,
-1536,
4377,
7797,
7110,
5815,
2462,
113,
-1981,
-1185,
-7545,
-11755,
-6765,
-5615,
-4097,
-5257,
-7367,
-6766,
5059,
13614,
13635,
10439,
2147,
2106,
4158,
7329,
3694,
-1118,
-1246,
1152,
-1916,
-8451,
-9821,
-10745,
-6655,
-5708,
-4054,
-1773,
346,
9205,
13281,
12990,
9070,
7376,
6344,
-1455,
-847,
-1993,
-7298,
-8452,
-2047,
-705,
-2645,
98,
-4333,
-517,
3780,
4156,
1883,
3833,
1615,
1177,
4885,
170,
1281,
-5720,
-4368,
3920,
7893,
3092,
-3784,
-3443,
-3900,
-5523,
-8699,
-2485,
1618,
3890,
5088,
-1087,
1080,
6253,
5417,
2034,
988,
1257,
-6548,
-5282,
2035,
4959,
-636,
-4538,
-4035,
-6346,
-3420,
-2324,
-2661,
-4015,
-3518,
-1844,
6835,
10421,
4271,
7509,
10932,
7882,
7877,
-4986,
-8704,
-2996,
-7307,
-11797,
-14585,
-10910,
-5413,
1487,
1527,
4122,
2843,
4399,
5191,
3358,
1318,
-1580,
-1388,
53,
5637,
-1003,
-2159,
-1279,
-1331,
3157,
1365,
2417,
-2919,
-9077,
-4220,
-1917,
3099,
-614,
-745,
901,
1868,
4546,
-1107,
1866,
2850,
2172,
-2078,
-4610,
-3386,
9079,
13004,
7121,
5626,
-549,
3300,
1297,
-2760,
-6125,
-11813,
-11518,
-8305,
-2018,
2487,
5958,
7265,
7748,
8491,
4105,
4755,
6390,
2432,
-4366,
-6609,
-7181,
-6638,
-6144,
-3778,
4392,
5826,
9179,
447,
-1135,
2869,
-1953,
-3078,
-5618,
-794,
4232,
4362,
733,
1583,
-427,
-1025,
1582,
-1563,
-4562,
-9920,
-6789,
-4724,
-3508,
5134,
814,
1770,
7825,
4200,
4405,
6150,
1866,
-3700,
-4831,
-3018,
3439,
-1910,
-5621,
-1772,
-458,
-112,
-2333,
-2519,
-3538,
-2614,
-4862,
-9925,
-12436,
-745,
12638,
16142,
14409,
13311,
15705,
12805,
10147,
562,
-11206,
-14763,
-15845,
-17140,
-16090,
-11198,
-7294,
-2505,
-336,
2450,
7811,
7378,
6676,
6237,
7781,
6403,
862,
1430,
2692,
-114,
3297,
1031,
-8225,
-6127,
-7260,
-6645,
-3955,
-8416,
-8569,
-2583,
664,
2283,
4489,
8796,
14131,
16056,
10316,
-109,
-7258,
-8905,
-3803,
-5908,
-3854,
-85,
-553,
1816,
2518,
6001,
9967,
5505,
-796,
-6838,
-8363,
-3950,
-5631,
-578,
4617,
8350,
11873,
7270,
616,
2899,
2333,
-5666,
-11712,
-11592,
-10438,
-10732,
-337,
1444,
1539,
7201,
8785,
11231,
13566,
3845,
590,
2721,
-4099,
-7946,
-9575,
-2635,
-584,
-5475,
-7006,
-5278,
-4906,
-2513,
1854,
2250,
3475,
566,
-5628,
-3825,
3204,
9227,
9585,
14565,
17849,
7907,
1936,
-8095,
-13711,
-14625,
-14625,
-9802,
-2336,
986,
-1533,
5975,
7208,
6165,
3461,
-3930,
-5848,
-3434,
-3181,
-5989,
-3067,
4315,
8047,
7125,
12349,
10937,
6333,
4313,
525,
-6035,
-11032,
-11506,
-10337,
-9610,
-10049,
-5545,
-6687,
-4320,
5903,
12232,
12560,
9750,
2673,
-1076,
-4317,
-3054,
2790,
3750,
2325,
3106,
5404,
-916,
-4693,
-6303,
-6679,
-8427,
-8309,
-9993,
-6286,
319,
4201,
8992,
9315,
12491,
13362,
7508,
2787,
-1868,
-10902,
-9773,
-9840,
-7675,
-1753,
-701,
3639,
9082,
8171,
4256,
297,
-1309,
-3148,
-9475,
-8059,
-234,
1378,
88,
3199,
5479,
11334,
6912,
-3493,
-3015,
-125,
-4980,
-6991,
-10047,
-10104,
-2291,
-3377,
-2937,
1951,
11712,
17601,
20186,
18045,
7182,
-1430,
-6429,
-8108,
-9781,
-11950,
-10761,
-5836,
-1989,
-2993,
-2607,
-776,
-3112,
-5022,
-4997,
-3564,
3087,
10354,
14626,
18275,
20347,
14587,
6328,
3357,
-2825,
-11382,
-16006,
-19719,
-17405,
-8902,
-7352,
-6161,
-5433,
2279,
7057,
6112,
10176,
8104,
7142,
10613,
2646,
-7541,
-6102,
-6872,
367,
5864,
4287,
2333,
1506,
-198,
-3038,
-8840,
-11740,
-7390,
-6016,
-3334,
-5775,
-3936,
5882,
8238,
12130,
16791,
9282,
8349,
1798,
-8321,
-8110,
-6162,
-6158,
-4752,
-1052,
928,
4555,
6974,
5688,
-3083,
-5747,
-5912,
-5094,
-2145,
-853,
1276,
5568,
7775,
4313,
-484,
2748,
5003,
-3606,
-9605,
-9315,
-9346,
-7373,
518,
1982,
6484,
8185,
6507,
5773,
9257,
8706,
2634,
3541,
-2053,
-4689,
-9485,
-11342,
-12760,
-10163,
-913,
4833,
14765,
9447,
2447,
3884,
2712,
-4065,
-13050,
-7504,
-286,
4189,
7236,
9048,
9504,
11316,
7932,
-5648,
-5163,
-6097,
-6814,
-4636,
-4982,
-4154,
-5211,
-1903,
-2974,
-2437,
-399,
666,
-4833,
-3801,
3518,
1544,
9258,
8644,
3268,
7235,
7784,
10697,
6041,
2232,
-909,
-4719,
-7407,
-16187,
-18375,
-14078,
-7856,
-7115,
-893,
2381,
7635,
13356,
11458,
8541,
5059,
5898,
1024,
-231,
-3218,
-2893,
-3227,
1024,
5727,
-507,
1017,
-2959,
-5673,
-5933,
-8764,
-7683,
-8798,
-4536,
-4645,
1530,
13222,
12247,
9715,
6117,
5609,
4614,
3595,
-5336,
-5986,
-3758,
-5071,
-2534,
-1223,
6041,
1211,
-3099,
-2532,
-4326,
-6608,
-1788,
5342,
9083,
10400,
2883,
-2604,
1380,
3158,
1132,
-1541,
-4366,
-2592,
-6458,
-10893,
-8572,
-8232,
-8596,
-1786,
4668,
15984,
17313,
13718,
16241,
11081,
4663,
-4521,
-12410,
-14001,
-9897,
-12711,
-11422,
-8819,
-5773,
93,
1338,
2189,
374,
-433,
1742,
5541,
3654,
4332,
9437,
15618,
16365,
6617,
-3496,
-7413,
-7803,
-2664,
-5562,
-10541,
-9313,
-9778,
-10743,
-9874,
-234,
876,
5114,
7481,
3646,
5173,
7003,
3127,
1558,
5959,
6231,
4843,
1713,
4111,
3077,
701,
-2596,
-8901,
-10286,
-9206,
-8661,
-5359,
-4834,
-6498,
-2975,
3565,
7370,
13029,
13996,
13163,
11720,
3611,
-284,
-7901,
-3886,
-1355,
-4112,
-4226,
-585,
1115,
264,
4358,
252,
726,
889,
-5623,
-5370,
629,
1793,
2285,
3611,
4133,
1437,
-2694,
-4718,
-3890,
-3457,
2595,
1518,
1433,
3566,
-124,
4503,
3808,
4331,
2184,
1078,
-1224,
-300,
-2078,
-4950,
-3804,
-6651,
-6341,
-5994,
1162,
6210,
7010,
5794,
4320,
-437,
-4679,
-4951,
-11080,
-10837,
-496,
26,
29,
5880,
10728,
11396,
9022,
3628,
-4482,
-5195,
-4097,
-1423,
-4208,
-6882,
-6896,
-6715,
-5924,
-6490,
-7920,
-3357,
1358,
-1223,
3841,
-627,
-1864,
5426,
7223,
10544,
10193,
11664,
8993,
3450,
479,
-5275,
-10656,
-14411,
-12125,
-9801,
-6549,
-1507,
-1896,
-129,
1135,
1306,
4368,
3570,
1362,
5942,
5670,
2963,
2618,
4923,
12409,
11192,
7734,
4477,
-1798,
-3429,
-8389,
-10983,
-9875,
-9774,
-7254,
-7263,
-3833,
-2458,
3087,
11412,
17134,
19300,
14456,
6958,
-288,
-1180,
-4272,
-3212,
-100,
-207,
-3928,
-2946,
310,
327,
-4647,
-12689,
-7940,
-1724,
4243,
2644,
1609,
8077,
9623,
8168,
1526,
532,
2296,
-2198,
-7207,
-11522,
-12531,
-13437,
-8751,
-1346,
5616,
7874,
10059,
15437,
11487,
9409,
1924,
-1301,
-4871,
-9535,
-11724,
-11447,
-3586,
-6253,
-1324,
-493,
1544,
1707,
-7084,
-5031,
-1409,
3015,
-1125,
-2684,
1896,
5226,
6545,
9825,
10798,
8013,
9766,
1694,
-4448,
-6434,
-11147,
-12702,
-11684,
-8697,
-9150,
-5992,
664,
5416,
7164,
4131,
1500,
-3590,
-1634,
-1273,
1422,
11039,
10454,
10164,
12092,
12398,
7648,
2130,
-10936,
-14134,
-11001,
-13091,
-13233,
-9927,
-72,
680,
8049,
7819,
6238,
8438,
6072,
8841,
1415,
-580,
-3235,
-6848,
-4046,
-2285,
-1529,
2013,
13119,
14003,
9573,
1280,
-5153,
-4680,
-8899,
-11577,
-9520,
-4791,
-3159,
298,
4358,
10015,
7732,
479,
916,
1538,
5169,
2202,
-3625,
-4376,
-1688,
2518,
4590,
7682,
9107,
3720,
-2416,
-5686,
-12253,
-13618,
-11169,
-6474,
-273,
2817,
5909,
9598,
16879,
11153,
886,
-1062,
-5915,
-8658,
-10453,
-12538,
-11789,
-5046,
2669,
7597,
13223,
13066,
9713,
3367,
364,
434,
-3024,
-4529,
-8947,
-9988,
-8060,
-4946,
-7741,
-6555,
852,
2089,
6615,
3092,
-2599,
-5079,
-3160,
-5575,
-9273,
786,
9123,
16102,
21867,
17069,
7008,
261,
-5687,
-11380,
-13537,
-14290,
-14385,
-10292,
-7500,
-1023,
4789,
4428,
2462,
-1031,
-2769,
-804,
1085,
1856,
3668,
4038,
12054,
14353,
11615,
12068,
11333,
5160,
-4307,
-8820,
-14576,
-15968,
-13610,
-13222,
-11362,
-8368,
-1963,
6450,
14468,
16982,
15108,
17176,
11381,
4522,
-2316,
-7831,
-9684,
-9967,
-6539,
-3768,
1690,
2222,
2346,
4994,
4771,
535,
-3623,
-6628,
-7833,
-3490,
-2029,
3264,
11366,
9541,
10127,
4827,
-3086,
-5641,
-7732,
-8276,
-8315,
-7418,
-5673,
601,
8307,
15080,
12315,
11200,
7156,
-57,
-4521,
-8763,
-8179,
-10353,
-6942,
-4349,
-1855,
3720,
1727,
2397,
1083,
-103,
306,
-1428,
1340,
-1304,
-6576,
-7263,
-4084,
-3327,
4087,
9532,
14129,
20812,
13058,
3218,
-5062,
-9755,
-13276,
-14487,
-13922,
-11190,
-4987,
-2201,
2312,
3458,
5774,
7011,
3958,
2668,
-2952,
-3807,
-4189,
2247,
6963,
7697,
8279,
6803,
6741,
-2302,
-7144,
-10262,
-9069,
-9380,
-8213,
-2643,
604,
974,
269,
3887,
3791,
4371,
3330,
4108,
4112,
2734,
-3232,
-10499,
-1887,
3298,
5220,
10153,
11632,
10968,
4270,
1265,
-2740,
-8558,
-11422,
-16041,
-14447,
-8719,
-9006,
-6920,
4902,
10559,
15486,
17716,
11213,
8791,
2741,
-1944,
-6756,
-7148,
-1721,
-3438,
-4510,
3015,
6494,
-2054,
-1979,
-2010,
-2999,
-4249,
-7886,
-3585,
3862,
8205,
3537,
6491,
7592,
3041,
3496,
2293,
-2038,
-9607,
-7959,
-7006,
-4171,
1610,
-304,
1140,
5606,
6565,
1298,
5093,
6643,
2412,
673,
-6011,
-9067,
-8621,
-5861,
-3103,
-1552,
-639,
1866,
1908,
4648,
5459,
-2736,
-3326,
-3705,
-10079,
-8945,
-1974,
4090,
11487,
16090,
13995,
12639,
12267,
249,
-8486,
-8221,
-12207,
-12289,
-9380,
-6996,
-4700,
-4129,
-2811,
-2430,
-1870,
2421,
5180,
10437,
12104,
7709,
8562,
6633,
6464,
4950,
251,
-491,
-1859,
-2827,
-9419,
-12433,
-11140,
-11617,
-8335,
-6269,
-338,
1145,
-918,
3926,
10077,
14058,
14627,
9839,
2367,
749,
-6546,
-10789,
-7261,
-5463,
2176,
4056,
2752,
1452,
1515,
3370,
241,
-3237,
-8732,
-6958,
-3770,
-2351,
-1320,
-447,
2163,
3427,
6627,
4279,
4502,
4761,
2614,
-4390,
-9513,
-4693,
177,
4516,
1891,
592,
3865,
600,
-5679,
-4805,
-1127,
2483,
3063,
2129,
3854,
-785,
-1523,
208,
-2699,
-1268,
1685,
4125,
1719,
1037,
-2599,
-5775,
-912,
274,
3385,
3914,
3651,
7718,
9612,
5116,
1749,
-1181,
-8041,
-11286,
-8762,
-4765,
-6992,
-4991,
-147,
3896,
6736,
3024,
3590,
546,
886,
-248,
-9458,
-2403,
5099,
8400,
8127,
1966,
-993,
-926,
46,
2464,
3057,
-1472,
-6153,
-5536,
-1900,
-6664,
-8522,
-7289,
-6173,
-2972,
-648,
2801,
4217,
7284,
4846,
2219,
6450,
7247,
6899,
6354,
5067,
3704,
-2437,
-6133,
-7630,
-9521,
-8574,
-9360,
-10315,
-6982,
-1109,
512,
1728,
3297,
7360,
12961,
14461,
12448,
6149,
3089,
-2860,
-6661,
-3035,
-4703,
-7178,
-6279,
-2250,
356,
-1200,
-3476,
-2579,
-943,
-4399,
-2865,
-1194,
2057,
7807,
5199,
2745,
2381,
972,
-1407,
655,
2173,
932,
-4944,
-6531,
-572,
2833,
625,
-3722,
-682,
213,
-76,
2638,
6100,
4880,
4443,
2931,
2543,
1786,
-995,
-4054,
-6194,
-564,
-1273,
-2971,
-1974,
-465,
-2277,
-4972,
-5525,
-1345,
2330,
5490,
8492,
10754,
11000,
6475,
1208,
-1302,
513,
-4193,
-5766,
-7722,
-8528,
-5826,
-5035,
-9704,
-6909,
-2658,
1894,
8899,
9333,
6367,
1411,
3360,
4970,
8721,
2773,
771,
5,
-2216,
-638,
-2289,
-4874,
-7100,
-4952,
-4976,
-6398,
-3830,
721,
-661,
-441,
-1167,
-249,
1655,
7089,
8539,
6366,
1735,
-83,
2435,
4028,
5744,
3286,
1618,
-6129,
-5271,
-3300,
-2458,
406,
-2834,
-3334,
-2368,
-3127,
-5214,
-4844,
992,
3148,
6906,
8369,
6476,
3575,
-895,
845,
-496,
-1303,
-337,
1026,
1655,
1010,
-6390,
-5881,
-1567,
-998,
-26,
-978,
3825,
2865,
-69,
-300,
-361,
-692,
-1293,
-2559,
1875,
4990,
916,
-2123,
-2696,
-1847,
-2398,
-2858,
-1256,
687,
639,
-2944,
-1902,
3338,
750,
161,
2791,
4916,
-383,
-4488,
-331,
1761,
2074,
-5550,
-6672,
-2984,
-4903,
-5196,
-5525,
-2471,
1653,
3010,
1399,
4135,
9612,
5509,
1720,
2180,
4898,
7862,
4197,
1781,
1257,
-3065,
-7982,
-9322,
-7324,
-5208,
-4483,
762,
1788,
-1281,
330,
888,
4410,
6153,
7340,
6512,
5238,
6748,
3520,
-222,
-908,
-2768,
-5565,
-5035,
-5080,
-3679,
-4327,
-4968,
-4146,
-1902,
2213,
2737,
873,
2846,
4175,
3922,
5519,
2244,
2257,
3008,
425,
-1517,
-50,
-1859,
-1702,
-559,
-2024,
-3747,
-5005,
-1650,
-862,
558,
1541,
2172,
1759,
4709,
4777,
2682,
2375,
768,
545,
786,
-90,
-2250,
-4019,
-5583,
-2761,
1018,
852,
-416,
567,
4001,
4385,
433,
4100,
2125,
755,
-759,
-4128,
-5129,
-4829,
880,
-713,
-1908,
-3408,
-3915,
-4848,
-3133,
-3035,
-2350,
-1093,
256,
6342,
5736,
1838,
-2270,
-1759,
935,
-353,
394,
-489,
-1587,
-1043,
-2804,
-2653,
-4839,
-1758,
-769,
175,
2531,
276,
119,
35,
-1705,
-3311,
-1420,
2262,
5671,
5925,
7208,
2624,
919,
3689,
2135,
2294,
-816,
-2448,
-3324,
-7141,
-4746,
-761,
172,
1101,
2568,
3685,
2862,
-322,
214,
2847,
1148,
2175,
3792,
3985,
3578,
2606,
-784,
-3012,
-2010,
-369,
984,
-449,
-994,
-2053,
-6019,
-3850,
-140,
4256,
5590,
2523,
3995,
777,
630,
593,
386,
-536,
-597,
850,
549,
-1046,
-6046,
-5377,
-4585,
-488,
1208,
873,
-163,
-1493,
13,
-3376,
-2736,
585,
4352,
6370,
1519,
770,
-923,
-3126,
-1599,
-5340,
-8797,
-5311,
-2958,
-3045,
1082,
-104,
-1708,
458,
1059,
4224,
6713,
4798,
1045,
-1237,
-1287,
-2924,
-3014,
0,
-1591,
-5531,
-6491,
-6869,
-5158,
-1525,
-711,
-833,
2694,
4733,
1268,
2772,
4833,
3877,
1452,
2316,
3467,
2507,
1276,
-2187,
-4000,
-4989,
-3657,
-4231,
-23,
63,
-1329,
1819,
1691,
1568,
2646,
4090,
624,
3563,
5084,
1098,
3076,
2994,
208,
-2139,
406,
3294,
1129,
-2464,
-3317,
-590,
-1585,
-553,
-1008,
2786,
4620,
-250,
162,
578,
3070,
3741,
3789,
649,
84,
-387,
-1321,
490,
-876,
-1627,
-2659,
-1878,
-1788,
-1875,
-907,
2012,
1515,
-391,
-1036,
-545,
3667,
1066,
-1467,
-1166,
-470,
863,
-1589,
-1043,
-2114,
-1530,
-1583,
-2764,
-1276,
-2350,
-1409,
-3317,
-3429,
511,
184,
-794,
779,
149,
-196,
};
| 65,633
|
C++
|
.cxx
| 7,624
| 5.609391
| 37
| 0.537288
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,192
|
audio_alert.cxx
|
w1hkj_fldigi/src/soundcard/audio_alert.cxx
|
// Class Caudio_alert
//
// play various canned play_sounds or wav file using port audio interface
#include "audio_alert.h"
#include "configuration.h"
#include "confdialog.h"
#include "rxmon.h"
#define SC_RATE 8000
#define PHONERING 15000
int Caudio_alert::int_phone_ring[PHONERING];
#define BEEBOO 48000
int Caudio_alert::int_audio_beeboo[BEEBOO];
void Caudio_alert::bark()
{
try {
sc_audio->play_sound(int_audio_bark, BARK_SIZE, SC_RATE);
sc_audio->silence(0.5, SC_RATE);
sc_audio->play_sound(int_audio_bark, BARK_SIZE, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::checkout()
{
try {
sc_audio->play_sound(int_audio_checkout, CHECKOUT_SIZE, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::doesnot()
{
try {
sc_audio->play_sound(int_audio_doesnot, DOESNOT_SIZE, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::diesel()
{
try {
sc_audio->play_sound(int_audio_diesel, DIESEL_SIZE, SC_RATE);
sc_audio->silence(0.5, SC_RATE);
sc_audio->play_sound(int_audio_diesel, DIESEL_SIZE, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::steam_train()
{
try {
sc_audio->play_sound(int_steam_train, STEAM_TRAIN_SIZE, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::beeboo()
{
try {
sc_audio->play_sound(int_audio_beeboo, BEEBOO, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::phone()
{
try {
sc_audio->play_sound(int_phone_ring, PHONERING, SC_RATE);
sc_audio->silence(1.0, SC_RATE);
sc_audio->play_sound(int_phone_ring, PHONERING, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::dinner_bell()
{
try {
sc_audio->play_sound(int_dinner_bell, DINNER_BELL, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::tty_bell()
{
try {
sc_audio->play_sound(int_tty_bell, TTY_BELL, SC_RATE);
} catch (...) {
throw;
}
}
void Caudio_alert::standard_tone()
{
try{
float st[16000];
float mod;
for (int i = 0; i < 16000; i++) {
mod = i < 800 ? sin(M_PI*i/1600.0) :
i > 15200 ? (cos(M_PI*(i - 15200)/1600.0)) : 1.0;
st[i] = 0.9 * mod * sin(2.0*M_PI*i*440.0/8000.0);
}
sc_audio->play_sound(st, 16000, 8000.0);
} catch (...) {
throw;
}
}
void Caudio_alert::file(std::string sndfile)
{
try {
sc_audio->play_file(sndfile);
} catch (...) {
throw;
}
}
void Caudio_alert::create_beeboo()
{
float bee = 800;
float boo = 500;
float val;
float sr = 8000;
for (int i = 0; i < BEEBOO; i++) {
val = sin( (2.0 * M_PI * i / sr) *
(i / 2000 % 2 == 0 ? bee : boo));
if (i < 500) val *= 1.0 * i / 500;
if (i > (BEEBOO-500)) val *= 1.0 * (BEEBOO - i) / 500;
int_audio_beeboo[i] = 32500 * val;
}
}
void Caudio_alert::create_phonering()
{
int ntones = 60;
float freq = 500;
float sr = 8000;
int mod = PHONERING/ntones;
memset(int_phone_ring, 0, sizeof(int_phone_ring));
for (int i = 0; i <= (PHONERING - mod); i++)
int_phone_ring[i] = 32000 * fabs(sin(M_PI * i / mod)) * sin(2.0 * M_PI * freq * i / sr);;
}
void Caudio_alert::alert(std::string s)
{
if (s.empty()) return;
if (s == "bark") bark();
else if (s == "checkout") checkout();
else if (s == "doesnot" ) doesnot();
else if (s == "diesel" ) diesel();
else if (s == "steam_train") steam_train();
else if (s == "beeboo") beeboo();
else if (s == "phone") phone();
else if (s == "dinner_bell") dinner_bell();
else if (s == "rtty_bell") tty_bell();
else if (s == "standard_tone") standard_tone();
else file(s);
}
void Caudio_alert::monitor(double *buffer, int len, int _sr)
{
if (progdefaults.mon_xcvr_audio)
sc_audio->mon_write(buffer, len, _sr);
}
Caudio_alert::Caudio_alert()
{
try {
sc_audio = new c_portaudio;
create_phonering();
create_beeboo();
} catch (...) {
throw;
}
}
Caudio_alert::~Caudio_alert()
{
delete sc_audio;
}
Caudio_alert *audio_alert = 0;
void center_rxfilt_at_track()
{
progdefaults.RxFilt_mid = active_modem->get_freq();
int bw2 = progdefaults.RxFilt_bw / 2;
progdefaults.RxFilt_low = progdefaults.RxFilt_mid - bw2;
if (progdefaults.RxFilt_low < 100) progdefaults.RxFilt_low = 100;
progdefaults.RxFilt_high = progdefaults.RxFilt_mid + bw2;
if (progdefaults.RxFilt_high > 4000) progdefaults.RxFilt_high = 4000;
sldrRxFilt_mid->value(progdefaults.RxFilt_mid);
sldrRxFilt_mid->redraw();
sldrRxFilt_low->value(progdefaults.RxFilt_low);
sldrRxFilt_low->redraw();
sldrRxFilt_high->value(progdefaults.RxFilt_high);
sldrRxFilt_high->redraw();
progdefaults.changed = true;
if (audio_alert)
audio_alert->init_filter();
}
void reset_audio_alerts()
{
if (!audio_alert) return;
if (progdefaults.enable_audio_alerts && audio_alert) {
if (audio_alert->open())
LOG_INFO("Opened audio alert stream on %s", progdefaults.AlertDevice.c_str());
else {
progdefaults.enable_audio_alerts = 0;
btn_enable_audio_alerts->value(0);
LOG_ERROR("Open audio device %s FAILED", progdefaults.AlertDevice.c_str());
}
} else {
audio_alert->close();
LOG_INFO("Closed audio alert device %s", progdefaults.AlertDevice.c_str());
}
}
| 5,011
|
C++
|
.cxx
| 206
| 22.174757
| 91
| 0.662476
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.