whycyhl
2022-05-05 683c912f9ac1935a7b109fb402bb276dba450f6b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/************************** Copyright (c) **********************************
**                 FUZHOU FUGUANG ELECTRONICS Co.,LTD.
**                        ¸£Öݸ£¹âµç×ÓÓÐÏÞ¹«Ë¾
**                       http://www.fuguang.com
**
**-------------- File Info -------------------------------------------------
** File name:            ProgressForm.c
** Last modified Date:  2008-11-16
** Last Version:        1.0
** Descriptions:        Display a progress box when outport the tested data
**
**--------------------------------------------------------------------------
** 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:        Display a progress box when outport the tested data
**
***************************************************************************/
//
#include "ProgressForm.h"
#include "Define.h"
#include "TFT_Driver.h"
 
#if(SoftLanguage == CN)
const prog_uchar PBText[2][13] = 
{
    {138,83,44,41,36,37,108,30,139,153,59,101,101},//ÕýÔÚת´æÊý¾Ýµ½UÅÌÖÐ
    {138,83,44,41,36,37,108,27, 28,  2, 3,  2, 59},//ÕýÔÚת´æÊý¾Ýµ½RS232
};
//
 
const prog_uchar PBPos[2][16] = 
{
    {154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154},
    {101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101},
};
//
#else
const prog_uchar PBText[2][26] = 
{
    {100,59,75,68,77,88,0,63,59,73,73,87,81,0,73,59,0,53,51,34,0,63,68,77,70},
    //"Sending data to U disk",ÕýÔÚת´æÊý¾Ýµ½UÅÌÖР25
    {107,78,75,76,59,61,70,59,0,63,59,73,73,87,81,0,73,59,0,108,103,0,0,0,0},
    //"Sending data to RS232 ",ÕýÔÚת´æÊý¾Ýµ½RS232 21
};
//
 
const prog_uchar PBPos[2][16] = 
{
    {31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
};
//
#endif
//
 
void DSPProgressBar(unsigned char devicetype)
{
    unsigned char n;
        
    DrawLine(64, 144, 64, 0, gray0, gray0, linebold, 192);
    for(n=0; n<4; n++)
        DrawLine(576+n, 144+n+1, 24, 1, gray2, gray2, linebold, 1);
    for(n=0; n<4; n++)
        DrawLine(64+n+1, 336+n, 64, 0, gray2, gray2, linebold, 1);
 
    DSP16x24Str(PBText[devicetype], 25, 14, 148, 176, gray0, yellow);
    DrawLine(128, 264, 4, 1, gray0, gray2, linebold, 2);
    DrawLine(510, 264, 4, 1, gray0, gray2, linebold, 2);
    
    #if(SoftLanguage == CN)
    DSP24x24Str(PBPos[1], 16, 23, 135, 268, gray0, white);
    #else
    DSP24x24Graph(PBPos[1], 16, 23, 135, 268, gray0, white);
    #endif
    
    DrawLine(128, 264, 48, 0, gray0, gray2, linebold, 2);
    DrawLine(128, 296, 48, 0, gray0, gray2, linebold, 2);    
}
//
 
void UpdateProgessBar(unsigned char pos)
{
    #if(SoftLanguage == CN)
    DSP24x24Str(PBPos[0], pos, 23, 135, 268, gray0, green5);
    #else
    DSP24x24Graph(PBPos[0], pos, 23, 135, 268, gray0, green5);
    #endif
}
//
 
/********************** END OF FILE (ProgressForm.c)***********************/