kopia lustrzana https://github.com/Hamlib/Hamlib
Fix gain controls in simts890.c
And a couple of other hiccups found by cppcheckpull/1749/head
rodzic
a4b6ef4fd7
commit
9f43659831
|
@ -180,9 +180,9 @@ const int stepvalues[4][10] = // Step sizes in Hz
|
||||||
int stepsize[4] = { 1000, 500, 10000, 5000}; // Defaults by modeclass
|
int stepsize[4] = { 1000, 500, 10000, 5000}; // Defaults by modeclass
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
int freq2band(int freq);
|
static int freq2band(int freq);
|
||||||
kvfop_t newvfo(kvfop_t ovfo, int band);
|
static kvfop_t newvfo(kvfop_t ovfo, int band);
|
||||||
void swapvfos(kvfop_t *vfoset[]);
|
static void swapvfos(kvfop_t *vfoset[]);
|
||||||
// Extracted from rig.h
|
// Extracted from rig.h
|
||||||
int hl_usleep(unsigned long usec); // Until it's replaced
|
int hl_usleep(unsigned long usec); // Until it's replaced
|
||||||
|
|
||||||
|
@ -410,24 +410,6 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
sscanf(buf, "RA%d", &ra);
|
sscanf(buf, "RA%d", &ra);
|
||||||
}
|
}
|
||||||
else if (strcmp(buf, "RG;") == 0)
|
|
||||||
{
|
|
||||||
hl_usleep(mysleep * 000);
|
|
||||||
pbuf = "RG255;";
|
|
||||||
OUTPUT(pbuf);
|
|
||||||
}
|
|
||||||
else if (strcmp(buf, "MG;") == 0)
|
|
||||||
{
|
|
||||||
hl_usleep(mysleep * 1000);
|
|
||||||
pbuf = "MG050;";
|
|
||||||
OUTPUT(pbuf);
|
|
||||||
}
|
|
||||||
else if (strcmp(buf, "AG;") == 0)
|
|
||||||
{
|
|
||||||
hl_usleep(mysleep * 1000);
|
|
||||||
pbuf = "AG100;";
|
|
||||||
OUTPUT(pbuf);
|
|
||||||
}
|
|
||||||
else if (strcmp(buf, "FV;") == 0)
|
else if (strcmp(buf, "FV;") == 0)
|
||||||
{
|
{
|
||||||
hl_usleep(mysleep * 1000);
|
hl_usleep(mysleep * 1000);
|
||||||
|
@ -1529,7 +1511,7 @@ int main(int argc, char *argv[])
|
||||||
*
|
*
|
||||||
* Returns band # or negative if invalid input
|
* Returns band # or negative if invalid input
|
||||||
*/
|
*/
|
||||||
int freq2band(int freq)
|
static int freq2band(int freq)
|
||||||
{
|
{
|
||||||
int i, retval = -1; // Assume the worst
|
int i, retval = -1; // Assume the worst
|
||||||
|
|
||||||
|
@ -1553,7 +1535,7 @@ int freq2band(int freq)
|
||||||
* new band
|
* new band
|
||||||
* Return: new vfo pointer
|
* Return: new vfo pointer
|
||||||
*/
|
*/
|
||||||
kvfop_t newvfo(kvfop_t ovfo, int band)
|
static kvfop_t newvfo(kvfop_t ovfo, int band)
|
||||||
{
|
{
|
||||||
int vfonum, slot;
|
int vfonum, slot;
|
||||||
|
|
||||||
|
@ -1566,7 +1548,7 @@ kvfop_t newvfo(kvfop_t ovfo, int band)
|
||||||
/* Reverse the function of vfoA and vfoB
|
/* Reverse the function of vfoA and vfoB
|
||||||
* No status returned
|
* No status returned
|
||||||
*/
|
*/
|
||||||
void swapvfos(kvfop_t *vfoset[])
|
static void swapvfos(kvfop_t *vfoset[])
|
||||||
{
|
{
|
||||||
kvfop_t *temp;
|
kvfop_t *temp;
|
||||||
|
|
||||||
|
|
|
@ -197,13 +197,6 @@ int main(int argc, char *argv[])
|
||||||
write(fd, pbuf, strlen(pbuf));
|
write(fd, pbuf, strlen(pbuf));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (strcmp(buf, "MG;") == 0)
|
|
||||||
{
|
|
||||||
hl_usleep(mysleep * 1000);
|
|
||||||
pbuf = "MG050;";
|
|
||||||
write(fd, pbuf, strlen(pbuf));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (strcmp(buf, "AG;") == 0)
|
else if (strcmp(buf, "AG;") == 0)
|
||||||
{
|
{
|
||||||
hl_usleep(mysleep * 1000);
|
hl_usleep(mysleep * 1000);
|
||||||
|
|
Ładowanie…
Reference in New Issue