From c25632495071a21d82d938a0953e9b9e047d100b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Mon, 15 Sep 2008 22:15:50 +0000 Subject: [PATCH] disable confusing width setting in ft100_set_mode for now git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2386 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- yaesu/ft100.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/yaesu/ft100.c b/yaesu/ft100.c index f7672198d..6695b81cb 100644 --- a/yaesu/ft100.c +++ b/yaesu/ft100.c @@ -8,7 +8,7 @@ * The starting point for this code was Frank's ft847 implementation. * * - * $Id: ft100.c,v 1.21 2008-09-15 18:32:10 fillods Exp $ + * $Id: ft100.c,v 1.22 2008-09-15 22:15:50 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -474,8 +474,9 @@ int ft100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { int ft100_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { unsigned char cmd_index; /* index of sequence to send */ + int ret; - rig_debug(RIG_DEBUG_VERBOSE,"ft100: generic mode = %x \n", mode); + rig_debug(RIG_DEBUG_VERBOSE,"ft100: generic mode = %x, width %d\n", mode, width); switch(mode) { case RIG_MODE_AM: @@ -484,6 +485,9 @@ int ft100_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { case RIG_MODE_CW: cmd_index = FT100_NATIVE_CAT_SET_MODE_CW; break; + case RIG_MODE_CWR: + cmd_index = FT100_NATIVE_CAT_SET_MODE_CWR; + break; case RIG_MODE_USB: cmd_index = FT100_NATIVE_CAT_SET_MODE_USB; break; @@ -503,14 +507,21 @@ int ft100_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { return -RIG_EINVAL; } + ret = ft100_send_priv_cmd(rig,cmd_index); + if (ret != RIG_OK) + return ret; + +#if 0 + /* ignore width for now. Should be Opcode 0x8C */ switch(width) { case RIG_PASSBAND_NORMAL: return ft100_send_priv_cmd(rig,cmd_index); default: return -RIG_EINVAL; } +#endif - return ft100_send_priv_cmd(rig,cmd_index); + return RIG_OK; }