Page 1 of 2

New channel from VFO

Posted: Sun Feb 02, 2020 4:40 pm
by ea3ihi
I have been working in the feature to add new channels. There is a new option "VFO --> NEW CHAN" when in vfo mode. This is the strategy in the implementation:

* Find a "free" channel and set it as current channel
* Flag that the channel is in use in the eeprom/flash
* Copy the vfo channel data to the new channel. The name is set to "New chan X", where X is its global channel index.
* Set the current zone to the "all channels" zone, the new channel will remain selected

Please take a look at the code and let me know if it is looking good or we should take another implementation path. Some new language texts should be added for the quickmenu entry and also the "New chan" channel name.

I have not tested using channels >128 yet, and the new flash write function (derived from the channel save code) is not tested either.

The code can be fount in my newChannel branch:
https://github.com/ea3ihi/OpenGD77/tree/newChannel

Or if you prefer in this commit:
https://github.com/ea3ihi/OpenGD77/comm ... 5f67678d2d

David

Re: New channel from VFO

Posted: Sun Feb 02, 2020 5:50 pm
by ea3ihi
I have created channels up to 131 and it looks good.

Re: New channel from VFO

Posted: Sun Feb 02, 2020 9:52 pm
by EA5SW
Good idea.

i download a copy and test.

Re: New channel from VFO

Posted: Sun Feb 02, 2020 10:34 pm
by VK3KYY
I created a PR for this to make it easier to check the code.

Re: New channel from VFO

Posted: Sun Feb 02, 2020 10:54 pm
by EA5SW
Compiled and appears to work fine...i created some channels.. my codeplug have 476 channels now...

Re: New channel from VFO

Posted: Mon Feb 03, 2020 6:18 pm
by ea3ihi
Thanks for testing, EA5SW.

What about the "VFO --> NEW CHAN" menu position? maybe if we move it bellow the "VFO: A" option it will look better.

David

Re: New channel from VFO

Posted: Mon Feb 03, 2020 7:59 pm
by EA5SW
For my best below VFO:A and a question... it's possible save also the TG in DMR mode or CTSS etc in Analog mode ??

Re: New channel from VFO

Posted: Mon Feb 03, 2020 9:55 pm
by ea3ihi
I am going through the code to find out why the contact is not saved when in DMR mode. I still have to learn a lot about how things are layed out, so any help will be appreciated.

David

Re: New channel from VFO

Posted: Mon Feb 03, 2020 10:04 pm
by VK3KYY
ea3ihi wrote:
Mon Feb 03, 2020 9:55 pm
I am going through the code to find out why the contact is not saved when in DMR mode. I still have to learn a lot about how things are layed out, so any help will be appreciated.

David
Even if you save the Contact, the firmware will not use it by default unless you set the Rx Group to none (0)

Normal operation is that the Contact is only used if the Rx Group is empty.

We may need to change this, but everyone would then need to change their codeplug, and set the Contact to None if they wanted to be able to select from the Rx Group list (TG List)

Re: New channel from VFO

Posted: Tue Feb 04, 2020 7:04 am
by ea3ihi
Thanks for the details. I have tested setting the rxGroup to 0 but I am not sure this is the behaviour we need, as it seems than then the contact is fixed and you can not change the TG after adding the channel and going to channel mode.

It might be enough if we copy the contact that is used when you are in VFO mode to the contact in the channel mode.

This is what happens now:

1. In channel mode you have active the TG 9
2. You go into VFO mode, set a frequency, set DMR mode...
3. You select TG 91
4 You use the VFO to new channel feature
5 Now you are in channel mode, with the new channel selected, and you are in TG 9

The expected behaviour at step 5 is that you are in TG 91, which is the one that was selected in VFO mode when you added the channel.

As part of the add channel creation process, the information from the VFO is copied to channelScreenChannelData, but seems that the contact information is not there. Maybe it is set in the channelScreenChannelData structure itself and we need to save it and restore it later?

Code: Select all

memcpy(&channelScreenChannelData.rxFreq,&settingsVFOChannel[nonVolatileSettings.currentVFONumber].rxFreq,sizeof(struct_codeplugChannel_t)- 16);