/************************** Copyright (c) **********************************
|
** FUZHOU FUGUANG ELECTRONICS Co.,LTD.
|
** ¸£Öݸ£¹âµç×ÓÓÐÏÞ¹«Ë¾
|
** http://www.fuguang.com
|
**
|
**-------------- File Info -------------------------------------------------
|
** File name: SelectForm.c
|
** Last modified Date: 2008-11-16
|
** Last Version: 1.0
|
** Descriptions: SelectForm functions
|
**
|
**--------------------------------------------------------------------------
|
** Created by: mxpopstar
|
** Created date: 2008-11-16
|
** Version: 1.0
|
** Descriptions: The original version
|
**
|
**--------------------------------------------------------------------------
|
** Modified by: mxpopstar
|
** Modified date: 2008-11-20
|
** Version:
|
** Descriptions: SelectForm functions
|
**
|
***************************************************************************/
|
//
|
#include "SelectForm.h"
|
#include "Define.h"
|
#include "AD7843_Driver.h"
|
#include "MainMenu.h"
|
#include "Buzzer_Driver.h"
|
#include <avr/pgmspace.h>
|
#include "WorkingPage.h"
|
#include "ChargePage.h"
|
#include "SYSSetPage.h"
|
#include "TFT_Driver.h"
|
|
extern SYS_State GB_SYS_State;
|
extern unsigned int GB_TestingParm[13];
|
|
#if(SoftLanguage == CN)
|
const prog_uchar SelFCaption[2][4] =
|
{
|
{54, 56, 73, 74}, //·Åµçģʽ
|
{101,101,101,101},//
|
};
|
//
|
const prog_uchar SelFText[2][4] =
|
{
|
{25, 26, 0, 2},//ÔÚÏ߷ŵç
|
{34, 26, 0, 2},//ÀëÏ߷ŵç
|
};
|
//
|
#else
|
const prog_uchar SelFCaption[2][12] =
|
{
|
|
"WorkMode",//·Åµçģʽ
|
" ",//
|
};
|
//
|
const prog_uchar SelFText[2][10] =
|
{
|
"Online",//ÔÚÏ߷ŵç
|
"Offline",//ÀëÏ߷ŵç
|
};
|
//
|
#endif
|
//
|
|
|
unsigned char DSPSelectForm(void)
|
{
|
DisableCustomInput();
|
GB_SYS_State.CurrentPage = DSPSelectForm;
|
GB_SYS_State.GetInput = GetSelectFormButtonDown;
|
|
DSP24x24Str(SelFCaption[0], 4, 24, 24, 16, blue, yellow); //·Åµçģʽ
|
#if(SoftLanguage == CN)
|
DrawLine(24, 42, 12, 0, blue, white, linebold, 2);
|
#else
|
DrawLine(24, 42, 13, 0, blue, white, linebold, 2);
|
#endif
|
|
|
DrawButtonH48(4, SelFCaption[1], 2, 30, 23, 72, 192, gray1, gray2);
|
#if(SoftLanguage == CN)
|
DSP32x32Str(SelFText[0], 4, 48, 80, 200, gray1, white); //ÔÚÏ߷ŵç
|
#else
|
DSP24x24Str(SelFText[0], 4, 48, 130, 204, gray1, white); //ÔÚÏ߷ŵç
|
#endif
|
|
DrawButtonH48(4, SelFCaption[1], 2, 30, 23, 368, 192, gray1, gray2);
|
#if(SoftLanguage == CN)
|
DSP32x32Str(SelFText[1], 4, 48, 376, 200, gray1, white); //ÀëÏ߷ŵç
|
#else
|
DSP24x24Str(SelFText[1], 4, 48, 420, 204, gray1, white); //ÀëÏ߷ŵç
|
#endif
|
|
return 0;
|
}
|
//
|
|
void GetSelectFormButtonDown(void)
|
{
|
unsigned char touched_item;
|
|
touched_item = GetTouchLocal();
|
|
if((touched_item==MenuItem2) || (touched_item==Button1))//ÔÚÏ߷ŵç
|
{
|
if(GetButtonIsBeep(0) == BeepIsWork)
|
BuzzerBeep(100);
|
GB_TestingParm[0] = 0;
|
GB_TestingParm[1] = 0;
|
GB_SYS_State.CurrentPage = DSPMainMenu;
|
BackColorCH();
|
DSPWorkingPage();
|
}
|
else if((touched_item==MenuItem3) || (touched_item==Button3))//ÀëÏ߷ŵç
|
{
|
if(GetButtonIsBeep(0) == BeepIsWork)
|
BuzzerBeep(100);
|
GB_TestingParm[0] = 1;
|
GB_TestingParm[1] = 1;
|
GB_SYS_State.CurrentPage = DSPMainMenu;
|
BackColorCH();
|
DSPWorkingPage();
|
}
|
}
|
//
|