Giter VIP home page Giter VIP logo

Comments (6)

ResqIT avatar ResqIT commented on June 22, 2024

in [chirp] (https://github.com/kk7ds/chirp/tree/master/chirp/drivers/uvk5.py):
in line 686:
rf.valid_duplexes = ["", "-", "+", "off"]

lines 730-757:
def validate_memory(self, mem):
msgs = super().validate_memory(mem)

    if mem.duplex == 'off':
        return msgs

    # find tx frequency
    if mem.duplex == '-':
        txfreq = mem.freq - mem.offset
    elif mem.duplex == '+':
        txfreq = mem.freq + mem.offset
    else:
        txfreq = mem.freq

    # find band
    band = _find_band(self._expanded_limits, txfreq)
    if band is False:
        msg = "Transmit frequency %.4f MHz is not supported by this radio"\
               % (txfreq/1000000.0)
        msgs.append(chirp_common.ValidationError(msg))

    band = _find_band(self._expanded_limits, mem.freq)
    if band is False:
        msg = "The frequency %.4f MHz is not supported by this radio" \
               % (mem.freq/1000000.0)
        msgs.append(chirp_common.ValidationError(msg))

    return msgs

in lines 921-934:
if (mem.offset == 0):
mem.duplex = ''
else:
if _mem.shift == FLAGS1_OFFSET_MINUS:
if _mem.freq == _mem.offset:
# fake tx disable by setting tx to 0 MHz
mem.duplex = 'off'
mem.offset = 0
else:
mem.duplex = '-'
elif _mem.shift == FLAGS1_OFFSET_PLUS:
mem.duplex = '+'
else:
mem.duplex = ''

in 1994-2004:
if mem.duplex == "":
_mem.offset = 0
_mem.shift = 0
elif mem.duplex == '-':
_mem.shift = FLAGS1_OFFSET_MINUS
elif mem.duplex == '+':
_mem.shift = FLAGS1_OFFSET_PLUS
elif mem.duplex == 'off':
# we fake tx disable by setting the tx freq to 0 MHz
_mem.shift = FLAGS1_OFFSET_MINUS
_mem.offset = _mem.freq

from uvk5-chirp-driver.

egzumer avatar egzumer commented on June 22, 2024

I don't like the concept. What duplex has to do with TX disable, and what duplex==OFF mean? I would rather add that to TX power, but that is for another day.

For now I changed it so it will accept offset to 0 MHz.

from uvk5-chirp-driver.

egzumer avatar egzumer commented on June 22, 2024

Although is duplex OFF a standard way in CHIRP to disable TX or is it K5 driver creator invention?

from uvk5-chirp-driver.

egzumer avatar egzumer commented on June 22, 2024

It looks like it is CHIRP standard way...

from uvk5-chirp-driver.

ResqIT avatar ResqIT commented on June 22, 2024

based on https://www.miklor.com/COM/UV_CHIRP_Examples.php and https://chirp.danplanet.com/projects/chirp/wiki/FAQ there were options of "(None)","+","-","split","off" described... I know it might not be the best way to achive tx block, nevertheless thanks very much for taking it into account.

from uvk5-chirp-driver.

egzumer avatar egzumer commented on June 22, 2024

In case you didn't notice I added what you asked for, if that is how the CHIRP intends to do it then I'm not gonna argue.

from uvk5-chirp-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.