From c202d9cdac47b4983dd8deef32a03fdf2a549864 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Sat, 12 Dec 2020 12:40:04 -0600 Subject: [PATCH] Fix icom filter value, not ASCII!!! https://github.com/Hamlib/Hamlib/issues/448 (cherry picked from commit 3061a5f8b2354b14e226fc1cddcbaffce3bde159) --- rigs/icom/icom.c | 2 +- rigs/icom/icom.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 0e32becad..74ddda8ea 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1868,7 +1868,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) if (mode_len == 3) { - priv_data->filter = modebuf[2] - '0'; + priv_data->filter = modebuf[2]; rig_debug(RIG_DEBUG_TRACE, "%s: modebuf[0]=0x%02x, modebuf[1]=0x%02x, modebuf[2]=0x%02x, mode_len=%d, filter=%d\n", __func__, modebuf[0], diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 9120c3643..b93aab6c1 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -203,7 +203,7 @@ struct icom_priv_data int x25cmdfails; // This will get set if the 0x25 command fails so we try just once int x1cx03cmdfails; // This will get set if the 0x1c 0x03 command fails so we try just once int poweron; // to prevent powering on more than once - int filter; // Current filter selected + unsigned char filter; // Current filter selected }; extern const struct ts_sc_list r8500_ts_sc_list[];