Beispiel #1
0
/**
 * Callbacks
 */
static void modeButton_Click(GL_PageControls_TypeDef* pThis)
{
	uint16_t userMode = pThis->ID - ID_MODEBTN_START;
	assert(userMode >= 0 && userMode <= USERMODE_NUM_MODES);

	Mode_SetCurrentMode(userMode);
	Screen_ShowMainScreen();
}
Beispiel #2
0
/*
 * Work with preset bands:
 */
void FrequencyManager_SetSelectedBand(BandPreset newBand)
{
	debug(GUI, "FrequencyManager_SetSelectedBand:\n");
	assert(newBand >= 0 && newBand <= FREQBAND_NUMBER_OF_BANDS); //Includes blank band
	s_selectedBand = newBand;
	uint32_t newFreq = s_bandsData[newBand].Setpoint;
	UserModeType newMode = s_bandsData[newBand].Mode;
	FrequencyManager_SetCurrentFrequency(newFreq);
	Mode_SetCurrentMode(newMode);
	FrequencyManager_Check_FilterBand(newFreq);
}