#ifndef DEVICE_DYM_PRM_H_ #define DEVICE_DYM_PRM_H_ #include "gType.h" #include "GraphLow.h" #include "GraphBase.h" #include "stdio.h" #include "stdlib.h" #include "string.h" #include "my_string.h" #include "MainCtl.h" #include "Device.h" #include "EpDevice.h" #include "StaticText.h" //have two list to View Root device and Endpoing device's Dynamics Analog Value Parameter class TBasePercentBar{ public: int x0,y0,x1,y1; int Len, Width,Height; unsigned int BgColor; unsigned int Color; public: void SetSize(short aX0, short aY0, short aX1, short aY1){ x0 = aX0; y0 = aY0; x1 = aX1; y1 = aY1; Width = x1 - x0; Height = y1 - y0; } void SetColor(u32 aColor, u32 aBgColor){ Color = aColor; BgColor = aBgColor; } void PercentRender(float da, float tt, unsigned char aGotUpdata){ int i, ax; float f1 = da / tt * static_cast(Width); Len = static_cast(f1); if(Len < 1)Len = 1; if(aGotUpdata == 0) Len = 0; ax = x0; for(i=0; i