Exemplo n.º 1
0
// Transition to the correct main screen, based on the mode.
void Screen_ShowMainScreen(void)
{
	debug(GUI, "Screen_ShowMainScreen:\n");
	switch(Mode_GetCurrentMode()) {
	case MODE_PSK:
		Screen_ShowScreen(&g_screenMainPSK);
		break;
	case MODE_CW:
		Screen_ShowScreen(&g_screenMainCW);
		break;
	case MODE_SSB:
		Screen_ShowScreen(&g_screenMainSSB);
		break;
	default:
		assert(0);
	}
}
Exemplo n.º 2
0
void DMA1_Stream0_IRQHandler(void)
{
	uint8_t Key_Down;

	//Check to see which set of buffers are currently in use
	DMA_RX_Memory = DMA_GetCurrentMemoryTarget(DMA1_Stream0 );
	DMA_TX_Memory = DMA_GetCurrentMemoryTarget(DMA1_Stream5 );

	if (Tx_Flag == 0) {
		Rcvr_DSP();
	}
	else {
		switch (Mode_GetCurrentMode()) {
		case MODE_SSB:
			Xmit_SSB();
			break;

		case MODE_CW:
			Key_Down = GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_9 );
			if (Key_Down == 0)
				key = Amp0;
			else
				key = 0.0;
			Xmit_CW();
			break;

		case MODE_PSK:
			Xmit_PSK();
			break;
		}  //End of Mode Switch
	}



	DSP_Flag = 1;

	//Clear the DMA buffer full interrupt flag
	DMA_ClearITPendingBit(DMA1_Stream0, DMA_IT_TCIF0 );
}
Exemplo n.º 3
0
static void tx_Click(GL_PageControls_TypeDef* pThis)
{
	assert(Mode_GetCurrentMode() == MODE_CW);
	Xmit_CW_Sequence();
}
Exemplo n.º 4
0
void Options_SetValue(int optionIdx, int16_t newValue)
{
	assert(optionIdx >= 0 && optionIdx < NUM_OPTIONS);
	s_optionsData[optionIdx].CurrentValue = newValue;

	/*
	 * Process each option individually as needed.
	 */
	switch (optionIdx) {
	case OPTION_RX_AUDIO:
		if (RxTx_InRxMode())
		{
			dac_gain = newValue;
			Old_dac_gain = -200;  //Set to an outrageous value for change testing in AGC_Processsing.c
		}
		break;

	case OPTION_RX_RF:
		if (RxTx_InRxMode())
		{
			PGAGAIN0 = newValue;
			Old_PGAGAIN0 = -200; //Set to an outrageous value for change testing in AGC_Processsing.c
		}
			break;


	case OPTION_Mic_Gain:
		if (RxTx_InTxMode() && (Mode_GetCurrentMode() == MODE_SSB))
			Set_PGA_Gain(newValue);
		break;

	case OPTION_Tx_LEVEL:
		if (RxTx_InTxMode())
			Set_LO_Gain(newValue);
		break;

	case OPTION_ST_LEVEL:  //Side Tone Level
		if (RxTx_InTxMode())
			Set_HP_Gain(newValue);
		break;

	case OPTION_RX_AMP:
		R_lgain = ((float) newValue) / 10000.0;
		break;

	case OPTION_RX_PHASE:
		R_xgain = ((float) newValue) / 10000.0;
		break;

	case OPTION_TX_AMP:
		T_lgain = ((float) newValue) / 10000.0;
		break;

	case OPTION_TX_PHASE:
		T_xgain = ((float) newValue) / 10000.0;
		break;

	case OPTION_MIC_BIAS:
		if (newValue == 0) {
			Turn_Off_Bias();
		} else {
			Turn_On_Bias();
		}
		break;

	case OPTION_AGC_Mode:
		if (RxTx_InRxMode())
		{
		AGC_Mode = newValue;
		Init_AGC();
		}
		break;

	case OPTION_AGC_THRSH:
		if (RxTx_InRxMode())
			Init_AGC();
		break;

	case OPTION__RSL_CAL:
		if (RxTx_InRxMode())
			Init_AGC();
		break;



	case OPTION_SI570_MULT:
		FrequencyManager_SetFreqMultiplier(newValue);
		break;

	default:
		// Handle any programming errors where we forget to update this switch statement.
		assert(0);
	}

}
Exemplo n.º 5
0
static _Bool showAFOffsetOnScreen(void)
{
    ModeType currentMode = Mode_GetCurrentMode();
    return (currentMode != MODE_SSB);
}