[chirp_devel] [PATCH] [GT-5R] Fix TX-Inhibit Outside of Legal Limits

Dan Smith
Fri Jun 11 16:21:35 PDT 2021


> [GT-5R] Fix TX-Inhibit Outside of Legal Limits
> 
> The current enforcement only allows TX on the following frequencies.
> 144.000, 148.000, 420.000 and 450.000 MHz.
> 
> This patch corrects the logic to allow TX on frequencies within the
> 144.000-148.000 MHz and 420.000-450.000 MHz ranges. Frequencies outside of
> these ranges are set to Duplex = "off" (TX disabled).

Ouch, thanks for fixing this!

> -        if mem.freq not in self.vhftx and mem.freq not in self.uhftx:
> +        if not (mem.freq >= self.vhftx[0] and mem.freq < self.vhftx[1]) and \
> +           not (mem.freq >= self.uhftx[0] and mem.freq < self.uhftx[1]):

I was thinking "if freq not in range(*self.vhftx)" but clearly screwed that up! Your range check is more verbose but more efficient anyway, so...thanks!

--Dan




More information about the chirp_devel mailing list