pull/1847/head
Nate Bargmann 2025-08-14 08:11:27 -05:00
commit ee03370cdf
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: FB2C5130D55A8819
12 zmienionych plików z 793 dodań i 588 usunięć

Wyświetl plik

@ -1908,17 +1908,18 @@ struct rig_spectrum_line
/**
* Config item for deferred processing
* (Funky names to avoid clash with perl keywords. Sheesh.)
**/
struct deferred_config_item {
struct deferred_config_item *next;
struct deferred_config_item *nextt;
hamlib_token_t token;
char *value; // strdup'ed, must be freed
};
typedef struct deferred_config_item deferred_config_item_t;
struct deferred_config_header {
struct deferred_config_item *first; // NULL if none
struct deferred_config_item *last;
struct deferred_config_item *firstt; // NULL if none
struct deferred_config_item *lastt;
};
typedef struct deferred_config_header deferred_config_header_t;

Wyświetl plik

@ -1443,7 +1443,7 @@ const char *aor_get_info(RIG *rig)
static char infobuf[BUFSZ];
int id_len, frm_len, retval;
char idbuf[BUFSZ];
char frmbuf[32]; // only expect 6 chars...please check
char frmbuf[BUFSZ];
retval = aor_transaction(rig, "\001" EOM, 2, idbuf, &id_len);

Wyświetl plik

@ -115,7 +115,7 @@ static void set_timeout(int fd, int sec, int usec)
}
}
void readPacket(int sockfd, char *buf, int buf_len, int expected)
static void readPacket(int sockfd, char *buf, int buf_len, int expected)
{
struct sockaddr_in serverAddr;
socklen_t addrLen = sizeof(serverAddr);

Wyświetl plik

@ -51,7 +51,7 @@ typedef struct pstrotator_handler_priv_data_s
{
pthread_t thread_id;
pstrotator_handler_args args;
int pstrotator_handler_thread_run;
volatile int pstrotator_handler_thread_run;
int sockfd2;
} pstrotator_handler_priv_data;

Wyświetl plik

@ -137,7 +137,7 @@ int lowe_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
int lowe_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{
char mdbuf[16], ackbuf[16];
char *mode_sel;
const char *mode_sel;
int ack_len, retval;
switch (mode)

Wyświetl plik

@ -132,7 +132,7 @@ void frameParse(int fd, unsigned char *frame, int len)
dump_hex(frame2, 11);
n = write(fd, frame2, 11);
dump_hex(frame, 11);
n = write(fd, frame, 11);
n += write(fd, frame, 11);
}
break;

Wyświetl plik

@ -96,11 +96,6 @@ void frameParse(int fd, unsigned char *frame, int len)
}
//dumphex(frame, len);
if (len == 0)
{
printf("%s: len==0\n", __func__);
return;
}
if (frame[0] != 0xfe && frame[1] != 0xfe)
{

Wyświetl plik

@ -59,19 +59,19 @@ int main(int argc, char *argv[])
}
else if (strncmp(buf, "FO", 2) == 0)
{
char vfo = buf[3];
char vfon = buf[3];
int frequency;
char tone_frequency[] = "10"; // 94.8
char ctcss_frequency[] = "05"; // 79,7
char dcs_frequency[] = "016"; // 114
const char tone_frequency[] = "10"; // 94.8
const char ctcss_frequency[] = "05"; // 79,7
const char dcs_frequency[] = "016"; // 114
if (vfo == '0') {
if (vfon == '0') {
frequency = (int)freqA;
} else {
frequency = (int)freqB;
}
SNPRINTF(buf, sizeof(buf), "FO %c,%.10d,0,0,0,0,0,0,%.2s,%.2s,%.3s,00000000,0%c",
vfo, frequency, tone_frequency, ctcss_frequency, dcs_frequency, 0x0d);
vfon, frequency, tone_frequency, ctcss_frequency, dcs_frequency, 0x0d);
printf("R:%s\n", buf);
write(fd, buf, strlen(buf));

Wyświetl plik

@ -3151,18 +3151,18 @@ int queue_deferred_config(deferred_config_header_t *head, hamlib_token_t token,
}
item->token = token;
item->next = NULL;
item->nextt = NULL;
if (!head->first)
if (!head->firstt)
{
head->first = item;
head->firstt = item;
}
else
{
head->last->next = item;
head->lastt->nextt = item;
}
head->last = item;
head->lastt = item;
return RIG_OK;
}

Wyświetl plik

@ -557,9 +557,9 @@ int HAMLIB_API rot_open(ROT *rot)
* Now that the rotator port is officially opened, we can
* send the deferred configuration info.
*/
while ((item = rs->config_queue.first))
while ((item = rs->config_queue.firstt))
{
rs->config_queue.first = item->next;
rs->config_queue.firstt = item->nextt;
status = rot_set_conf(rot, item->token, item->value);
free(item->value);
free(item);

Wyświetl plik

@ -130,7 +130,7 @@ int is_uh_radio_fd(int fd)
#include <windows.h>
#include <strsafe.h>
void WinErrorShow(LPCTSTR lpszFunction, DWORD dw)
static void WinErrorShow(LPCTSTR lpszFunction, DWORD dw)
{
// Retrieve the system error message for the last-error code
@ -145,6 +145,7 @@ void WinErrorShow(LPCTSTR lpszFunction, DWORD dw)
NULL,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
// cppcheck-suppress uninitvar
(LPTSTR) &lpMsgBuf,
0, NULL);
@ -172,7 +173,7 @@ enum serial_status
SER_AVAILABLE
};
int check_com_port_in_use(const char *port)
static int check_com_port_in_use(const char *port)
{
char device[1024];
snprintf(device, sizeof(device), "\\\\.\\%s", port);
@ -570,7 +571,6 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp)
"%s: unsupported rate specified: %d\n",
__func__,
rp->parm.serial.rate);
CLOSE(fd);
return (-RIG_ECONF);
}
@ -617,10 +617,8 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp)
"%s: unsupported serial_data_bits specified: %d\n",
__func__,
rp->parm.serial.data_bits);
CLOSE(fd);
return (-RIG_ECONF);
break;
}
/*
@ -645,10 +643,8 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp)
"%s: unsupported serial_stop_bits specified: %d\n",
__func__,
rp->parm.serial.stop_bits);
CLOSE(fd);
return (-RIG_ECONF);
break;
}
/*
@ -691,10 +687,8 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp)
"%s: unsupported serial_parity specified: %d\n",
__func__,
rp->parm.serial.parity);
CLOSE(fd);
return (-RIG_ECONF);
break;
}
@ -727,10 +721,8 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp)
"%s: unsupported flow_control specified: %d\n",
__func__,
rp->parm.serial.handshake);
CLOSE(fd);
return (-RIG_ECONF);
break;
}
/*
@ -772,7 +764,6 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp)
"%s: tcsetattr failed: %s\n",
__func__,
strerror(errno));
CLOSE(fd);
return (-RIG_ECONF); /* arg, so close! */
}
@ -787,7 +778,6 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp)
"%s: ioctl(TCSETA) failed: %s\n",
__func__,
strerror(errno));
CLOSE(fd);
return (-RIG_ECONF); /* arg, so close! */
}
@ -803,7 +793,6 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp)
"%s: ioctl(TIOCSETP) failed: %s\n",
__func__,
strerror(errno));
CLOSE(fd);
return (-RIG_ECONF); /* arg, so close! */
}

Plik diff jest za duży Load Diff