New channel from VFO

Discussions related to the firmware code development
ea3ihi
Posts: 54
Joined: Fri Jan 10, 2020 9:28 pm
Location: Barcelona, Spain

New channel from VFO

Post by ea3ihi » Sun Feb 02, 2020 4:40 pm

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
EA3IHI - David

ea3ihi
Posts: 54
Joined: Fri Jan 10, 2020 9:28 pm
Location: Barcelona, Spain

Re: New channel from VFO

Post by ea3ihi » Sun Feb 02, 2020 5:50 pm

I have created channels up to 131 and it looks good.
EA3IHI - David

User avatar
EA5SW
Posts: 46
Joined: Sat Nov 16, 2019 9:45 am
Location: Valencia, Spain
Contact:

Re: New channel from VFO

Post by EA5SW » Sun Feb 02, 2020 9:52 pm

Good idea.

i download a copy and test.
Jose - EA5SW - Valencia

VK3KYY
Posts: 1541
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: New channel from VFO

Post by VK3KYY » Sun Feb 02, 2020 10:34 pm

I created a PR for this to make it easier to check the code.

User avatar
EA5SW
Posts: 46
Joined: Sat Nov 16, 2019 9:45 am
Location: Valencia, Spain
Contact:

Re: New channel from VFO

Post by EA5SW » Sun Feb 02, 2020 10:54 pm

Compiled and appears to work fine...i created some channels.. my codeplug have 476 channels now...
Jose - EA5SW - Valencia

ea3ihi
Posts: 54
Joined: Fri Jan 10, 2020 9:28 pm
Location: Barcelona, Spain

Re: New channel from VFO

Post by ea3ihi » Mon Feb 03, 2020 6:18 pm

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
EA3IHI - David

User avatar
EA5SW
Posts: 46
Joined: Sat Nov 16, 2019 9:45 am
Location: Valencia, Spain
Contact:

Re: New channel from VFO

Post by EA5SW » Mon Feb 03, 2020 7:59 pm

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 ??
Jose - EA5SW - Valencia

ea3ihi
Posts: 54
Joined: Fri Jan 10, 2020 9:28 pm
Location: Barcelona, Spain

Re: New channel from VFO

Post by ea3ihi » 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
EA3IHI - David

VK3KYY
Posts: 1541
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: New channel from VFO

Post by VK3KYY » Mon Feb 03, 2020 10:04 pm

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)

ea3ihi
Posts: 54
Joined: Fri Jan 10, 2020 9:28 pm
Location: Barcelona, Spain

Re: New channel from VFO

Post by ea3ihi » Tue Feb 04, 2020 7:04 am

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);
EA3IHI - David

Post Reply