Skip to content

Conversation

@ANTodorov
Copy link

and changes to enable more than 230 channels
rename FREQ_ to VFO_ - thinking in VFO context is less confusing

and changes to enable more than 230 channels
rename *FREQ_* to *VFO_* - thinking in VFO context is less confusing
#endif

#define IS_MR_CHANNEL(x) ((x) <= MR_CHANNEL_LAST)
#define IS_FREQ_CHANNEL(x) ((x) >= FREQ_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 2 (emulated) VFOs (variable frequency oscillator) in this radio.

There is a memory mode, and frequency mode, so MR_CHANNEL or FREQ_CHANNEL

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!
Will revert to FREQ in the next commit. Just need to finish the chirp driver to be sure everything is in sync and working as expected.


#define EEPROM_SIZE 0xFFFF //Exact size is 0x10000 but the ckecs are "gret or equal" so a bit off to fit in 2 bytes looks like ok
#define VFO_CHANNELS_COUNT 7 // VFO in each freq band is like a "system channel"
#define FM_CHANNELS_COUNT 20 // are these NOAA? no clue, but let's define them in a constant here
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not NOAA, these are FM broadcast radio channels. You don't need that for your modification.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Entire NOAA is confusing me, but I think with hints from the chirp driver more pieces fit in place.

#define FM_CHANNELS_COUNT 20
#define MR_CHANNELS_COUNT 200
#define MAX_CHANNEL 0xff
#define ALL_CHANNELS_COUNT (VFO_CHANNELS_COUNT + FM_CHANNELS_COUNT + MR_CHANNELS_COUNT)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, you add FM channels, together you get 227, should be 207

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!
The FM channels are counted elsewhere.

#define EEPROM_WELCOME_STR2_LEN 0x0010

#define EEPROM_CODE_OPTIONS_OFF 0x0ED0
#define EEPROM_CODE_OPTIONS_LEN 0x000B
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lengths in this section are not needed, they are not use anywhere

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intentions is to have hints for the expected size, even not used in the code...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definitions are seen everywhere in the code and shown in IDE hints, it doesn't help.

@egzumer
Copy link
Owner

egzumer commented Feb 20, 2024

#485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants