Example #1
0
static void done_Click(GL_PageControls_TypeDef* pThis) {
	// Change text back to normal for next time.
	clearLabel();
	resetLabel();
	set_kybd_mode(0);
	Screen_ShowScreen(&g_screenMainPSK);
}
Example #2
0
static void programEditButton_Click(GL_PageControls_TypeDef* pThis) {
	debug (GUI, "programEditButton_Click:1");
	Screen_SetScreenMode(FUNCTION);
	debug (GUI, "programEditButton_Click:2");
	Screen_ShowScreen(&g_screenEditProgText);
	debug (GUI, "programEditButton_Click: end");
}
Example #3
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);
	}
}
Example #4
0
static void calibration_Click(GL_PageControls_TypeDef* pThis)
{
	// Done?
	if (currentTouchPoint >= TS_NUM_CALIBRATION_POINTS) {
		currentTouchPoint = 0;
		Screen_ShowScreen(&g_screenCalibrationTest);
		return;
	}

	// Get raw touched location
	uint16_t x, y;
	TS_GetUncalibratedTouchEvent(&x, &y);
	xprintf("Touch screen calibration event: Uncalibrated touch at X=%6d, Y=%6d.\n", x, y);

	// Store touch:
	assert(currentTouchPoint >= 0);
	assert(currentTouchPoint < TS_NUM_CALIBRATION_POINTS);
	s_touchedReadings[currentTouchPoint].X = x;
	s_touchedReadings[currentTouchPoint].Y = y;

	// Move on:
	currentTouchPoint++;

	// Calibrate if that was the last point:
	if (currentTouchPoint >= TS_NUM_CALIBRATION_POINTS) {
		TS_SetCalibrationData(s_touchedReadings);

		// Advance to next screen immediately.
		// (Comment this out to show a "done" message after calibration).
		currentTouchPoint = 0;
		Screen_ShowScreen(&g_screenCalibrationTest);
		return;
	}

	calibration_Draw(pThis, 1);
}
/*
 * Private interface
 */
static void insideEventHandler(GL_PageControls_TypeDef* pThis, int relX, int relY)
{
	if (Screen_GetScreenMode() == FILTER)
	{

	_Bool touchLeftHalf = relX < INSIDE_WIDTH / 2;
	if (touchLeftHalf) {
		FrequencyManager_IncreaseFreqStepSize();
	}
	else {
		FrequencyManager_DecreaseFreqStepSize();
	}
	}
	else
		Screen_ShowScreen(&g_screenFrequencies);
}
/*
 * Private interface
 */
static void insideEventHandler(GL_PageControls_TypeDef* pThis, int relX, int relY)
{
	Screen_ShowScreen(&g_screenMode);
}
Example #7
0
static void calibrate_Click(GL_PageControls_TypeDef* pThis) {
	Screen_ButtonAnimate(pThis);
	Screen_ShowScreen(&g_screenCalibrate);
}
Example #8
0
static void tagEditButton_Click(GL_PageControls_TypeDef* pThis) {
	Screen_SetScreenMode(FUNCTION);
	Screen_ShowScreen(&g_screenEditTagText);

}
Example #9
0
void advanced_Click(GL_PageControls_TypeDef* pThis) {
	Screen_SetScreenMode(ADVANCED);
//	Options_SetSelectedOption(START_ADVANCED_OPTIONS);
	Screen_ShowScreen(&g_screenAdvanced);
}