[chirp_devel] [PATCH] [FT1D] Add support for setting backtrack targets - issue #4877
Angus Ainslie
Sat Jun 3 18:13:00 PDT 2017
On 2017-06-03 18:14, Jim Unroe wrote:
>>
>> So I'd like to fix this but the tests are doing something I don't
>> understand. Why is the test trying to program an out of bounds value ?
>>
>> ERROR: Failed to parse settings: Traceback (most recent call last):
>> File "../chirp/drivers/ft1d.py", line 1702, in get_settings
>> return self._get_settings()
>> File "../chirp/drivers/ft1d.py", line 1697, in _get_settings
>> self._get_backtrack_settings())
>> File "../chirp/drivers/ft1d.py", line 1505, in
>> _get_backtrack_settings
>> val = RadioSettingValueInteger(0, 99, bt.year)
>> File "../chirp/settings.py", line 83, in __init__
>> self.set_value(current)
>> File "../chirp/settings.py", line 92, in set_value
>> (value, self._min, self._max))
>> InvalidValueError: Value 165 not in range 0-99
>>
>> Yaesu FT-1D R Settings FAILED: Invalid Radio Settings
>>
>
> This is because "year" can only contain values from 0 through 99 and
> the test image has a value of 165 which is out-of-tange.
>
OK I made the assumption the test would only try valid values.
> + if bt.status == 1 :
> + val = RadioSettingValueInteger(0, 99, bt.year)
> + else :
> + val = RadioSettingValueInteger(0, 99, 0)
> + rs = RadioSetting("%s.year" % bt_idx,
> + prefix + "year", val)
> + menu.append(rs)
> +
>
> You can do something here to trap values that are over 99 and do
> something else.
Is there some way to have a popup or some message to the user that I
could trigger when this happens ?
More information about the chirp_devel
mailing list