Nevermind. The effect I'm seeing was from parent class get_memory actions.
Looks like there is just too much work to attempt inheriting from anything but YaesuCloneModeRadio, and working from there ;)

Anyhow, now trying to wrap my head around how the banks work ;)


From: Jens J. <kd4tjx@yahoo.com>
To: "chirp_devel@intrepid.danplanet.com" <chirp_devel@intrepid.danplanet.com>
Sent: Friday, September 6, 2013 9:12 AM
Subject: [chirp_devel] problem with class inheritance, calling parent method w/ super

This may be a general python understanding problem, but I am working on a VX2 driver, and subclassing from VX3.
I am then overriding get_features, trying to call super get_features, modify that a bit and return it. The problem is that my change to rf.valid_tuning_steps do not seem to be changing at all. I must be missing some nuance of python here.

class VX2Radio(vx3.VX3Radio):
....
    def get_features(self):
        rf = super(VX2Radio, self).get_features()
        rf.has_bank = False
        rf.has_bank_names = False
        rf.valid_modes = list(set(VX2_MODES))
        rf.valid_tuning_steps = list(VX2_STEPS)
        rf.memory_bounds = (1, 1000)
        return rf
....


Note, the mutation of rf.memory_bounds does take effect, but it's as if the valid_tuning_steps list in the UI is the original one (wrong order) from VX2Radio, not the one I'm assigning from VX2_STEPS list.

Any ideas or pointers for a pynewb

-Jens


_______________________________________________
chirp_devel mailing list
chirp_devel@intrepid.danplanet.com
http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers