/************************** Copyright (c) **********************************
|
** FUZHOU FUGUANG ELECTRONICS Co.,LTD.
|
** ¸£Öݸ£¹âµç×ÓÓÐÏÞ¹«Ë¾
|
** http://www.fuguang.com
|
**
|
**-------------- File Info -------------------------------------------------
|
** File name: SingleVol.c
|
** Last modified Date: 2008-11-16
|
** Last Version: 1.0
|
** Descriptions: Display the monomer voltage data and graphy
|
**
|
**--------------------------------------------------------------------------
|
** 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 the monomer voltage data and graphy
|
**
|
***************************************************************************/
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
#include <avr/pgmspace.h>
|
#include "SingleVol.h"
|
#include "MainMenu.h"
|
#include "TFT_Driver.h"
|
#include "Buzzer_Driver.h"
|
#include "AD7843_Driver.h"
|
#include "SYSSetPage.h"
|
#include "NRF905_Driver.h"
|
#include "WorkingPage.h"
|
#include "ChargePage.h"
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
#if(SoftLanguage == CN)
|
extern const prog_uchar _16_24[59][48];
|
#else
|
extern const prog_uchar _16_24[126][48];
|
extern const prog_uchar _12_16[126][24];
|
#endif
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
extern FBO_Data GB_FBO_Data;
|
extern SYS_State GB_SYS_State;
|
extern unsigned int GB_TestingParm[13];
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
const prog_uchar SPBMP[2][1] =
|
{
|
{26},//¡ü
|
{27},//¡ú
|
};
|
//
|
|
#if(SoftLanguage==CN)
|
const prog_uchar STextItem[4][4] =
|
{
|
{70, 71, 56, 86},//"µ¥Ìåµçѹ"
|
{91, 93, 59,156},//×î¸ß£º#
|
{91, 92, 59,156},//×îµÍ£º#
|
{56, 201,68, 59},//µç³Ø×飺
|
};
|
|
const prog_uchar SButtonItem[5][2] =
|
{
|
{ 48, 49},//ÏÂÒ³
|
{ 47, 49},//ÉÏÒ³
|
{ 36, 37},//Êý¾Ý
|
{110, 111},//ͼÐÎ
|
{ 52, 53},//Í˳ö
|
};
|
#elif(SoftLanguage==EN)
|
const prog_uchar STextItem[4][10] =
|
{
|
{0},//"µ¥Ìåµçѹ"
|
{105,59,70,77,26,125}, //×î¸ß#6
|
{105,68,73,26,125}, //×îµÍ£º#5
|
{95,76,79,75,75,59,26}, //µç³Ø×飺7
|
};
|
const prog_uchar SButtonItem[5][8] =
|
{
|
{94,75,64,76,64,63}, //ÏÂÒ³6
|
{106,59,67,59,63}, //ÉÏÒ³5
|
{111,59,60,71,68,82,59},//Êý¾Ý7
|
{95,76,59,80,68,70},//ͼÐÎ6
|
{94,87,81,74,63}, //Í˳ö5
|
};
|
const prog_uchar SVPNumber[] =
|
{
|
"#",//No
|
};
|
#endif
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
static unsigned char (*SVPParentPage)(void) = DSPSingleVolData;
|
static unsigned char (*SVPChildPage)(void) = DSPSingleVolData;
|
static unsigned char SVDspMode = mode_data;
|
static unsigned int OringinMonomerVol[500] = {0};
|
static unsigned int MonomerIndex = 0;
|
static unsigned int PageMonomerSum = 24;
|
static unsigned int MonomerSum = 250;
|
static unsigned int MonomervolType = 200;
|
static unsigned int monomerlowvol1 = 180;
|
static unsigned int monomerhighvol1 = 220;
|
static unsigned int monomerlowvol2 = 180;
|
static unsigned int monomerhighvol2 = 220;
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
unsigned char DSPSingleVolData(void)
|
{
|
DisableCustomInput();
|
|
if(SVPChildPage != GB_SYS_State.CurrentPage)
|
{
|
SVPParentPage = GB_SYS_State.CurrentPage;//±£´æ¸¸Ò³ÃæÖ¸Õë
|
MonomerIndex = 0;
|
}
|
SVPChildPage = DSPSingleVolData;
|
GB_SYS_State.CurrentPage = DSPSingleVolData; //½«µ¥ÌåÒ³ÃæÉèΪµ±Ç°Ò³Ãæ
|
GB_SYS_State.GetInput = GetSingleVolMenuSelected;
|
|
if(MonomerIndex >= MonomerSum)
|
{
|
MonomerIndex = 0;
|
}
|
|
if(SVPParentPage == DSPMainMenu)
|
{
|
EnableMonomerVolGether();
|
}
|
|
if((GB_SYS_State.WorkState==Stopped) && (GetMonomerVolGetherState()==1))
|
{
|
ClearOringinMonomerVol();
|
}
|
|
DSP16x24Str(STextItem[1], 6, 14, 24, 12, blue, green7);//×î¸ßµ¥Ìå
|
DSP16x24Str(STextItem[2], 5, 16, 368, 12, blue, red); //×îµÍµ¥Ìå
|
DSP16x24Str(STextItem[3], 7, 14, 24, 360, blue, white);//µç³Ø×飺
|
|
if(SVDspMode == mode_data)
|
{
|
UpdateSingleVolData(GB_FBO_Data.SingleVol);
|
DrawLine(24, 42, 75, 0, blue, white, linebold, 2);
|
}
|
else
|
{
|
DrawRects();
|
}
|
|
DrawSingleVolPageButton();
|
|
return 0;
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void DrawSingleVolPageButton(void)
|
{
|
unsigned char fcl1,fcl2,fcl3;
|
if((GB_FBO_Data.BattGroup>1)||(GB_FBO_Data.BattSum>24))
|
fcl1 = white;
|
else fcl1 = gray2;
|
|
if(SVDspMode == mode_data)
|
{
|
fcl2 = gray2;
|
fcl3 = white;
|
}
|
else
|
{
|
fcl2 = white;
|
fcl3 = gray2;
|
}
|
|
DrawButtonH48(2, SButtonItem[0], 6, 14, 3, 24, 400, gray1, fcl1); //ÏÂÒ³
|
DrawButtonH48(2, SButtonItem[1], 5, 14, 10, 24+125*1, 400, gray1, fcl1); //ÉÏÒ³
|
DrawButtonH481(2, SButtonItem[2], 7, 12, 3, 24+125*2, 400, gray1, fcl2); //Êý¾Ý
|
DrawButtonH48(2, SButtonItem[3], 6, 14, 3, 24+125*3, 400, gray1, fcl3); //ͼÐÎ
|
DrawButtonH48(2, SButtonItem[4], 5, 14, 10, 24+125*4, 400, gray1, red); //Í˳ö
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void UpdateMaxMinVol(void)
|
{
|
unsigned char index = MonomerIndex/GetEachGroupBattSum();
|
PrintValue(2, 0, GetMonomerMaxIndex(index)+1, "-", 16, 112, 12, blue, green7); //×î¸ßµ¥ÌåË÷Òý
|
PrintValue(0, 3, GetMonomerMaxVol(index), "B", 16, 176, 12, blue, green7); //×î¸ßµ¥Ìåµçѹֵ
|
PrintValue(2, 0, GetMonomerMinIndex(index)+1, "-", 16, 448, 12, blue, red); //×îµÍµ¥ÌåË÷Òý
|
PrintValue(0, 3, GetMonomerMinVol(index), "B", 16, 512, 12, blue, red); //×îµÍµ¥Ìåµçѹֵ
|
#if(SoftLanguage == CN)
|
PrintValueEx(4, 0, index+1, 16, 120, 360, blue, white);
|
#else
|
PrintValue(4, 0, index+1, "", 16, 120, 360, blue, white);
|
#endif
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void SetMonomerSum(const unsigned int eachgroupbattsum, const unsigned char group)
|
{
|
MonomerSum = eachgroupbattsum*group;
|
SetModuleSum(eachgroupbattsum, group);
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void SetMonomerVolType(void)
|
{
|
unsigned char index = MonomerIndex/GetEachGroupBattSum();
|
if(GetMonomerMaxVol(index) < 1800)//¼ÓÈë1.2Vµç³Øµ²
|
{
|
monomerhighvol2 = 160;
|
monomerhighvol1 = 140;
|
MonomervolType = 120; //¼ÓÈë1.2Vµç³Øµ²
|
monomerlowvol1 = 100;
|
monomerlowvol2 = 80;
|
}
|
else if(GetMonomerMaxVol(index) < 3000)
|
{
|
monomerhighvol2 = 240;
|
monomerhighvol1 = 220;
|
MonomervolType = 200;
|
monomerlowvol1 = 180;
|
monomerlowvol2 = 160;
|
}
|
else if(GetMonomerMaxVol(index) > 9000)
|
{
|
monomerhighvol2 = 1440;
|
monomerhighvol1 = 1320;
|
MonomervolType = 1200;
|
monomerlowvol1 = 1080;
|
monomerlowvol2 = 960;
|
}
|
else
|
{
|
monomerhighvol2 = 720;
|
monomerhighvol1 = 660;
|
MonomervolType = 600;
|
monomerlowvol1 = 540;
|
monomerlowvol2 = 480;
|
}
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void SetOringinMonomerVol(const unsigned int *voldata)
|
{
|
unsigned int n = 0;
|
for(n=0; n<MonomerSum; n++)
|
{
|
OringinMonomerVol[n] = voldata[n];
|
}
|
}
|
void ClearOringinMonomerVol(void)
|
{
|
unsigned int n = 0;
|
for(n=0; n<MonomerSum; n++)
|
{
|
OringinMonomerVol[n] = 0;
|
}
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void UpdateSingleVolData(const unsigned int *voldata)
|
{
|
unsigned int index,x,y;
|
unsigned int from_index = MonomerIndex;
|
unsigned char Fcolor;//ǰ¾°É«
|
unsigned char group = MonomerIndex/GetEachGroupBattSum();
|
|
PageMonomerSum = GetEachGroupBattSum() - (MonomerIndex%GetEachGroupBattSum());
|
if(PageMonomerSum > 24)
|
PageMonomerSum = 24;
|
|
UpdateMaxMinVol();
|
SetMonomerVolType();
|
|
Write_CMD(0x04);//ÉèÖñ³¾°É«
|
Write_TFT_Data(blue);
|
|
for(x=0; x<3; x++)
|
{
|
for(y=0; y<8; y++)
|
{
|
index = from_index+y+x*8;
|
|
if(voldata[index] <= GetMonomerMinVol(group))
|
Fcolor = red;
|
else if(voldata[index] >= GetMonomerMaxVol(group))
|
Fcolor = green7;
|
else if((voldata[index]<=monomerlowvol1*10) && (voldata[index]>GetMonomerMinVol(group)))
|
Fcolor = purple;
|
else Fcolor = yellow;
|
|
Write_CMD(0x02);//ÉèÖÃǰ¾°É«
|
Write_TFT_Data(Fcolor);
|
Write_CMD(0x01);//Ö¸ÕëÑØxÖá·½ÏòÒÆ¶¯,8µãдģʽ
|
|
if(y+x*8 >= PageMonomerSum)
|
{
|
DSP16x24( 24+213*x, 60+38*y, _16_24[0]); //"#"
|
DSP16x24( 40+213*x, 60+38*y, _16_24[0]);
|
DSP16x24( 56+213*x, 60+38*y, _16_24[0]);
|
DSP16x24( 72+213*x, 60+38*y, _16_24[0]);
|
DSP16x24( 88+213*x, 60+38*y, _16_24[0]); //"-"
|
DSP16x24(104+213*x, 60+38*y, _16_24[0]);
|
DSP16x24(120+213*x, 60+38*y, _16_24[0]);
|
DSP16x24(136+213*x, 60+38*y, _16_24[0]);//"."
|
DSP16x24(152+213*x, 60+38*y, _16_24[0]);
|
DSP16x24(168+213*x, 60+38*y, _16_24[0]);
|
DSP16x24(184+213*x, 60+38*y, _16_24[0]);
|
}
|
else
|
{
|
unsigned int go = index+1-group*24;
|
index = from_index+y+x*8;
|
go = (index % GetEachGroupBattSum()) + 1;
|
|
DSP16x24( 24+213*x, 60+38*y, _16_24[' '-0x20]); //"#"
|
DSP16x24( 24+213*x, 60+38*y, _16_24[125]); //"#"
|
DSP16x24( 40+213*x, 60+38*y, _16_24[(go)/100+0x10]);
|
DSP16x24( 56+213*x, 60+38*y, _16_24[((go)%100)/10+0x10]);
|
DSP16x24( 72+213*x, 60+38*y, _16_24[(go)%10+0x10]);
|
DSP16x24( 88+213*x, 60+38*y, _16_24['-'-0x20]); //"-"
|
DSP16x24(104+213*x, 60+38*y, _16_24[voldata[index]/10000+0x10]);
|
DSP16x24(120+213*x, 60+38*y, _16_24[(voldata[index]%10000)/1000+0x10]);
|
DSP16x24(136+213*x, 60+38*y, _16_24['.'-0x20]);//"."
|
DSP16x24(152+213*x, 60+38*y, _16_24[(voldata[index]%1000)/100+0x10]);
|
DSP16x24(168+213*x, 60+38*y, _16_24[(voldata[index]%100)/10+0x10]);
|
DSP16x24(184+213*x, 60+38*y, _16_24[voldata[index]%10+0x10]);
|
}
|
}
|
}
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void QuitSingleVolPage(void)
|
{
|
BackColorCH();
|
SVPParentPage();
|
SVPParentPage = DSPSingleVolData; //»Ö¸´¸¸Ò³ÃæÖ¸ÕëΪ×Ô¼ºµÄÒ³Ãæ;
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void GetSingleVolMenuSelected(void)
|
{
|
static unsigned int count = 0;
|
unsigned char touched_item = ButtonNull;
|
|
if(count++ % 256 == 0)
|
{
|
if(SVDspMode == mode_data)
|
UpdateSingleVolData(GB_FBO_Data.SingleVol);
|
else
|
UpdateSVGraph(GB_FBO_Data.SingleVol);
|
}
|
|
touched_item = GetTouchLocal();
|
|
if(touched_item == Button4) //Í˳ö
|
{
|
if(GetButtonIsBeep(0) == BeepIsWork)
|
BuzzerBeep(100);
|
BackColorCH();
|
SVPParentPage();
|
SVPParentPage = DSPSingleVolData; //»Ö¸´¸¸Ò³ÃæÖ¸ÕëΪ×Ô¼ºµÄÒ³Ãæ;
|
}
|
else if((touched_item==Button3) && (SVDspMode==mode_data)) //ͼÐÎ
|
{
|
if(GetButtonIsBeep(0) == BeepIsWork)
|
BuzzerBeep(100);
|
SVDspMode = mode_graph;
|
BackColorCH();
|
DSPSingleVolData();
|
_delay_ms(100);
|
}
|
else if((touched_item==Button2) && (SVDspMode==mode_graph)) //Êý¾Ý
|
{
|
if(GetButtonIsBeep(0) == BeepIsWork)
|
BuzzerBeep(100);
|
SVDspMode = mode_data;
|
BackColorCH();
|
DSPSingleVolData();
|
_delay_ms(100);
|
}
|
else if((touched_item==Button1) && ((GB_FBO_Data.BattGroup>1)||(GB_FBO_Data.BattSum>24))) //ÉÏÒ³
|
{
|
if(GetButtonIsBeep(0) == BeepIsWork)
|
BuzzerBeep(100);
|
if(MonomerIndex == 0)
|
{
|
if((GetEachGroupBattSum()>0) && (GetEachGroupBattSum()<=24))
|
MonomerIndex = MonomerSum-GetEachGroupBattSum();
|
else if((GetEachGroupBattSum()%24) > 0)
|
MonomerIndex = MonomerSum-(GetEachGroupBattSum()%24);
|
else MonomerIndex = MonomerSum-24;
|
}
|
else
|
{
|
if(((MonomerIndex%GetEachGroupBattSum())>=24) || ((GetEachGroupBattSum()%24)==0))
|
MonomerIndex -= 24;
|
else MonomerIndex -= GetEachGroupBattSum()%24;
|
}
|
|
if(SVDspMode == mode_data)
|
UpdateSingleVolData(GB_FBO_Data.SingleVol);
|
else
|
UpdateSVGraph(GB_FBO_Data.SingleVol);
|
|
_delay_ms(100);
|
}
|
else if((touched_item==Button0) && ((GB_FBO_Data.BattGroup>1)||(GB_FBO_Data.BattSum>24))) //ÏÂÒ³
|
{
|
if(GetButtonIsBeep(0) == BeepIsWork)
|
BuzzerBeep(100);
|
|
MonomerIndex += PageMonomerSum;
|
if(MonomerIndex < PageMonomerSum)
|
MonomerIndex = 0;
|
if(MonomerIndex >= MonomerSum)
|
MonomerIndex = 0;
|
|
if(SVDspMode == mode_data)
|
UpdateSingleVolData(GB_FBO_Data.SingleVol);
|
else
|
UpdateSVGraph(GB_FBO_Data.SingleVol);
|
|
_delay_ms(100);
|
}
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void DrawRects(void)
|
{
|
unsigned char n;
|
|
for(n=0; n<5; n++)
|
{
|
if(n < 4)
|
DrawButtonH48(2, SButtonItem[n], 2, 30, 23, 24+125*n, 400, gray1, white);//4¸ö°´Å¥
|
else
|
DrawButtonH48(2, SButtonItem[n], 2, 30, 23, 24+125*n, 400, gray1, red);//Í˳ö
|
}
|
|
DSP8x11Str(SPBMP[0], 1, 8, 60, 44, blue, white);//¡ü
|
DrawLine(63, 49, 35, 1, blue, white, linebold, 2); //»×Ý×ø±ê
|
DSP8x11Str(SPBMP[1], 1, 8, 625, 324, blue, white);//¡ú
|
DrawLine(63, 329, 71, 0, blue, white, linebold, 2);//»ºá×ø±ê
|
|
for(n=1; n<5; n++)
|
DrawLine(80+23*(n*5-1), 329, 1, 1, blue, white, linebold, 1); //»ºá×ø±ê¿Ì¶È
|
for(n=1; n<5; n++)
|
DSP8x11Value(2, 0, n*5+MonomerIndex, "", 8, 76+23*(n*5-1), 340, blue, white); //»ºá×ø±ê¿Ì¶ÈÖµ
|
|
DrawLine(56, 54, 1, 0, blue, green7, linebold, 1); //»×Ý×ø±ê¿Ì¶È:ÉÏÏÞÖµ
|
DrawLine(56, 121, 1, 0, blue, green7, linebold, 1); //»×Ý×ø±ê¿Ì¶È:ÉÏÏÞÖµ
|
DrawLine(56, 188, 1, 0, blue, yellow, linebold, 1); //»×Ý×ø±ê¿Ì¶È:±ê×¼Öµ
|
DrawLine(56, 255, 1, 0, blue, red, linebold, 1); //»×Ý×ø±ê¿Ì¶È:ÏÂÏÞÖµ
|
DrawLine(56, 322, 1, 0, blue, red, linebold, 1); //»×Ý×ø±ê¿Ì¶È:ÏÂÏÞÖµ
|
|
DrawLine(64, 54, 71, 0, blue, green7, linedot, 1); //»×Ý×ø±êÐéÏß:ÉÏÏÞÖµ
|
DrawLine(64, 121, 71, 0, blue, green7, linedot, 1); //»×Ý×ø±êÐéÏß:ÉÏÏÞÖµ
|
DrawLine(64, 188, 71, 0, blue, yellow, linedot, 1); //»×Ý×ø±êÐéÏß:±ê×¼Öµ
|
DrawLine(64, 255, 71, 0, blue, red, linedot, 1); //»×Ý×ø±êÐéÏß:ÏÂÏÞÖµ
|
DrawLine(64, 322, 71, 0, blue, red, linedot, 1); //»×Ý×ø±êÐéÏß:ÏÂÏÞÖµ
|
|
SetMonomerVolType();
|
|
DSP8x11Value(1, 2, monomerhighvol2, "", 8, 12, 50, blue, green7);//»×Ý×ø±ê¿Ì¶È:ÉÏÏÞÖµ
|
DSP8x11Value(1, 2, monomerhighvol1, "", 8, 12, 117, blue, green7);//»×Ý×ø±ê¿Ì¶È:ÉÏÏÞÖµ
|
DSP8x11Value(1, 2, MonomervolType, "", 8, 12, 184, blue, yellow); //»×Ý×ø±ê¿Ì¶È:±ê×¼Öµ
|
DSP8x11Value(1, 2, monomerlowvol1, "", 8, 12, 251, blue, red); //»×Ý×ø±ê¿Ì¶È:ÏÂÏÞÖµ
|
DSP8x11Value(1, 2, monomerlowvol2, "", 8, 12, 318, blue, red); //»×Ý×ø±ê¿Ì¶È:ÏÂÏÞÖµ
|
|
UpdateSVGraph(GB_FBO_Data.SingleVol);
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
unsigned int GetRectValue(const unsigned int vol, const unsigned int voltype)
|
{
|
unsigned int res = 0;
|
//------------ ͼÐÎ×î´ó¸ß¶È280 -----------
|
switch(voltype)
|
{
|
case 1: if(vol >= 779)//¼ÓÈë1.2Vµç³Øµ²
|
{
|
res = (vol-779) / 3;
|
}
|
break;
|
case 2: if(vol >= 1579)
|
{
|
res = (vol-1579) / 3;
|
}
|
break;
|
case 6: if(vol >= 4737)
|
{
|
res = (vol-4737) / 9;
|
}
|
break;
|
case 12:if(vol >= 9474)
|
{
|
res = (vol-9474) / 18;
|
}
|
break;
|
default:break;
|
}
|
|
if(res > 280)
|
res = 280;
|
|
return res;
|
}
|
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
void UpdateSVGraph(const unsigned int *voldata)
|
{
|
unsigned char Fcolor;
|
unsigned int from_index = MonomerIndex;
|
unsigned char group = MonomerIndex/GetEachGroupBattSum();
|
|
PageMonomerSum = GetEachGroupBattSum() - (MonomerIndex%GetEachGroupBattSum());
|
if(PageMonomerSum > 24)
|
PageMonomerSum = 24;
|
|
UpdateMaxMinVol();
|
|
for(unsigned char n=0; n<24; n++)
|
{
|
unsigned int res;
|
unsigned int oringinres;
|
if(n < PageMonomerSum)
|
{
|
res = GetRectValue(voldata[from_index+n], MonomervolType/100);
|
if(voldata[from_index+n] <= GetMonomerMinVol(group))
|
Fcolor = red;
|
else if(voldata[from_index+n] >= GetMonomerMaxVol(group))
|
Fcolor = green7;
|
else Fcolor = yellow;
|
|
oringinres = GetRectValue(OringinMonomerVol[from_index+n], MonomervolType/100);
|
|
if(GB_SYS_State.TestType == TestTypeDischarge)
|
{
|
DrawARect(72+23*n, 328, res, blue, Fcolor);
|
if(res <= oringinres)
|
{
|
DrawARect(72+23*n, 328-res, oringinres-res, blue, purple);
|
DrawARect(72+23*n, 328-oringinres, 280-oringinres, blue, blue);
|
}
|
else DrawARect(72+23*n, 328-res, 280-res, blue, blue);
|
}
|
else
|
{
|
DrawARect(72+23*n, 328, oringinres, blue, purple);
|
if(res >= oringinres)
|
{
|
DrawARect(72+23*n, 328-oringinres, res-oringinres, blue, Fcolor);
|
DrawARect(72+23*n, 328-res, 280-res, blue, blue);
|
}
|
else DrawARect(72+23*n, 328-oringinres, 280-oringinres, blue, blue);
|
}
|
}
|
else DrawARect(72+23*n, 328, 280, blue, blue);
|
}
|
|
for(unsigned char n=1; n<5; n++)
|
{
|
DSP24x24StrS(SVPNumber, 10, 16, 59+23*(n*5-1), 339, blue, white);//NO
|
DSP8x11Value(2, 0, n*5+(MonomerIndex%GetEachGroupBattSum()), " ", 8, 76+23*(n*5-1), 340, blue, white); //»ºá×ø±ê¿Ì¶ÈÖµ
|
}
|
}
|
//--------------------------------------------------------------------------------------------------
|
/********************************* END OF FILE (SingleVol.c)***************************************/
|
//--------------------------------------------------------------------------------------------------
|