kopia lustrzana https://github.com/Hamlib/Hamlib
Reverted CW Pitch value<->knob conversion for non-ICR75 radios. Apparently R75 is the only one using the set mode command.
Edited out all non-essential code commenting that was done during local testing.pull/1776/head
rodzic
82dd540d3a
commit
ef0b7e30bd
|
@ -3683,8 +3683,15 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
icom_val = 900;
|
||||
}
|
||||
else
|
||||
{
|
||||
icom_val = val.i;
|
||||
//icom_val = (int) lroundf(((float) icom_val - 300) * (255.0f / 600.0f));
|
||||
}
|
||||
|
||||
if (!RIG_IS_ICR75)
|
||||
{
|
||||
//interpolate to return knob value
|
||||
icom_val = (int) lroundf(((float) icom_val - 300) * (255.0f / 600.0f));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -3877,7 +3884,6 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
}
|
||||
else
|
||||
{
|
||||
// Legacy mapping that does not apply to all rigs
|
||||
switch (val.i)
|
||||
{
|
||||
case RIG_AGC_OFF:
|
||||
|
@ -4686,8 +4692,15 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_CWPITCH:
|
||||
//val->i = (int) lroundf(300.0f + ((float) icom_val * 600.0f / 255.0f));
|
||||
val->i = icom_val;
|
||||
if (!RIG_IS_ICR75)
|
||||
{
|
||||
//use knob value and interpolate
|
||||
val->i = (int) lroundf(300.0f + ((float) icom_val * 600.0f / 255.0f));
|
||||
}
|
||||
else
|
||||
{
|
||||
val->i = icom_val;
|
||||
}
|
||||
break;
|
||||
|
||||
case RIG_LEVEL_KEYSPD:
|
||||
|
|
|
@ -19,25 +19,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
//#include <stdlib.h>
|
||||
//#include <string.h> /* String function definitions */
|
||||
//#include <unistd.h> /* UNIX standard function definitions */
|
||||
//#include <math.h>
|
||||
|
||||
//#include <hamlib/rig.h>
|
||||
//#include <serial.h>
|
||||
//#include <cal.h>
|
||||
//#include <token.h>
|
||||
//#include <register.h>
|
||||
|
||||
#include "icom.h"
|
||||
#include "icom_defs.h"
|
||||
#include "icom_alt_agc.h"
|
||||
#include "frame.h"
|
||||
#include "misc.h"
|
||||
//#include "event.h"
|
||||
//#include "cache.h"
|
||||
|
||||
|
||||
/*
|
||||
* Note:
|
||||
|
@ -259,7 +245,6 @@ int icom_rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
}
|
||||
else
|
||||
{
|
||||
//struct rig_state *rs = STATE(rig);
|
||||
unsigned char cmdbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
|
||||
int cmd_len, ack_len = sizeof(ackbuf);
|
||||
int lvl_cn, lvl_sc; /* Command Number, Subcommand */
|
||||
|
@ -387,7 +372,6 @@ int icom_rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
}
|
||||
else
|
||||
{
|
||||
//struct rig_state *rs;
|
||||
unsigned char cmdbuf[MAXFRAMELEN], respbuf[MAXFRAMELEN];
|
||||
int cmd_len, resp_len;
|
||||
int lvl_cn, lvl_sc; /* Command Number, Subcommand */
|
||||
|
@ -413,8 +397,6 @@ int icom_rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: no extcmd found\n", __func__);
|
||||
|
||||
//rs = STATE(rig);
|
||||
|
||||
cmd_len = 0;
|
||||
|
||||
lvl_cn = C_CTL_FUNC;
|
||||
|
|
|
@ -233,11 +233,11 @@
|
|||
* Set AGC (S_FUNC_AGC) data
|
||||
*/
|
||||
#define D_AGC_OFF 0x00
|
||||
#define D_AGC_SUPERFAST 0x01 //was 0x03 /* IC746 pro */
|
||||
#define D_AGC_FAST 0x02 //was 0x00
|
||||
#define D_AGC_SLOW 0x03 //was 0x02
|
||||
#define D_AGC_SUPERFAST 0x01
|
||||
#define D_AGC_FAST 0x02
|
||||
#define D_AGC_SLOW 0x03
|
||||
#define D_AGC_USER 0x04
|
||||
#define D_AGC_MID 0x05 //was 0x01
|
||||
#define D_AGC_MID 0x05
|
||||
#define D_AGC_AUTO 0x06
|
||||
|
||||
/*
|
||||
|
|
Ładowanie…
Reference in New Issue