More cleanup.
1.1 --- a/Display.h Thu Feb 05 14:02:27 2015 +0100
1.2 +++ b/Display.h Thu Feb 05 14:26:29 2015 +0100
1.3 @@ -29,6 +29,7 @@
1.4 virtual int MinBrightness() const=0;
1.5 virtual int MaxBrightness() const=0;
1.6 virtual void SetBrightness(int aBrightness)=0;
1.7 + //
1.8 virtual void Clear()=0;
1.9 virtual void Fill()=0;
1.10 //
1.11 @@ -36,7 +37,7 @@
1.12
1.13 //Request management
1.14 virtual void Request(TMiniDisplayRequest /*aRequest*/){ /*No request supported by default*/ };
1.15 - virtual TMiniDisplayRequest AttemptRequestCompletion()=0;
1.16 + virtual TMiniDisplayRequest AttemptRequestCompletion(){return EMiniDisplayRequestNone;};
1.17
1.18 virtual TMiniDisplayRequest CurrentRequest(){return iRequest;}
1.19 virtual void CancelRequest(){iRequest=EMiniDisplayRequestNone;}
2.1 --- a/FutabaGP1212.h Thu Feb 05 14:02:27 2015 +0100
2.2 +++ b/FutabaGP1212.h Thu Feb 05 14:26:29 2015 +0100
2.3 @@ -20,7 +20,7 @@
2.4 class GP1212XXXX : public FutabaGraphicDisplay
2.5 {
2.6 public:
2.7 - //From FutabaVfd
2.8 + //From GraphicDisplay
2.9 virtual int MinBrightness() const {return 0;}
2.10 virtual int MaxBrightness() const {return 5;}
2.11 virtual int WidthInPixels() const {return KGP12xWidthInPixels;}
3.1 --- a/FutabaGP1212A02.cpp Thu Feb 05 14:02:27 2015 +0100
3.2 +++ b/FutabaGP1212A02.cpp Thu Feb 05 14:26:29 2015 +0100
3.3 @@ -31,8 +31,7 @@
3.4 iFrameAlpha(NULL),
3.5 iFrameBeta(NULL),
3.6 iFrameGamma(NULL),
3.7 - iNeedFullFrameUpdate(0),
3.8 - iPowerOn(false)
3.9 + iNeedFullFrameUpdate(0)
3.10 {
3.11 iDeviceId[0]=0;
3.12 iFirmwareRevision[0]=0;
3.13 @@ -721,27 +720,6 @@
3.14 }
3.15
3.16 /**
3.17 -*/
3.18 -bool GP1212A02A::IsPowerOn()
3.19 - {
3.20 - return iPowerOn;
3.21 - }
3.22 -
3.23 -/**
3.24 -*/
3.25 -char* GP1212A02A::DeviceId()
3.26 - {
3.27 - return iDeviceId;
3.28 - }
3.29 -
3.30 -/**
3.31 -*/
3.32 -char* GP1212A02A::FirmwareRevision()
3.33 - {
3.34 - return iFirmwareRevision;
3.35 - }
3.36 -
3.37 -/**
3.38 VFD Power ON/OFF
3.39 [Code]1BH,4AH,42H,Ps
3.40 [Function]Control of the power supply for VFD
4.1 --- a/FutabaGP1212A02.h Thu Feb 05 14:02:27 2015 +0100
4.2 +++ b/FutabaGP1212A02.h Thu Feb 05 14:26:29 2015 +0100
4.3 @@ -26,7 +26,7 @@
4.4 ~GP1212A02A();
4.5
4.6 //From DisplayBase
4.7 - int Open();
4.8 + virtual int Open();
4.9 virtual void SwapBuffers();
4.10 virtual void TurnPowerOn();
4.11 virtual void TurnPowerOff();
4.12 @@ -34,6 +34,11 @@
4.13 virtual void ShowClock();
4.14 virtual void HideClock();
4.15 virtual bool SupportClock(){return true;}
4.16 + virtual void SetBrightness(int aBrightness);
4.17 + virtual void Clear();
4.18 + virtual void Fill();
4.19 + virtual TMiniDisplayRequest AttemptRequestCompletion();
4.20 + virtual void Request(TMiniDisplayRequest aRequest);
4.21
4.22
4.23
4.24 @@ -41,12 +46,8 @@
4.25 virtual void SetPixel(unsigned char aX, unsigned char aY, unsigned int aPixel);
4.26 virtual void SetAllPixels(unsigned char aPattern);
4.27 virtual int FrameBufferSizeInBytes() const {return KGP12xFrameBufferSizeInBytes;}
4.28 - virtual void SetBrightness(int aBrightness);
4.29 - virtual void Clear();
4.30 - virtual void Fill();
4.31 - virtual void Request(TMiniDisplayRequest aRequest);
4.32 +
4.33
4.34 -
4.35
4.36 //
4.37 void ToggleOffScreenMode();
4.38 @@ -55,12 +56,7 @@
4.39 //
4.40 void SetFrameDifferencing(bool aOn){iUseFrameDifferencing=aOn;}
4.41 bool FrameDifferencing() const {return iUseFrameDifferencing;}
4.42 - //
4.43 - TMiniDisplayRequest AttemptRequestCompletion();
4.44 FutabaVfdReport& InputReport() {return iInputReport;}
4.45 - bool IsPowerOn();
4.46 - char* DeviceId();
4.47 - char* FirmwareRevision();
4.48
4.49 private:
4.50
4.51 @@ -203,15 +199,9 @@
4.52 BitArrayLow* iFrameGamma;
4.53 //
4.54 int iNeedFullFrameUpdate;
4.55 - //unsigned char iFrameBeta[256*64];
4.56 - //unsigned char *iFrontBuffer;
4.57 - //unsigned char *iBackBuffer;
4.58 + //
4.59 FutabaVfdReport iInputReport;
4.60 //
4.61 - char iDeviceId[KFutabaMaxHidReportSize];
4.62 - char iFirmwareRevision[KFutabaMaxHidReportSize];
4.63 - bool iPowerOn;
4.64 - //
4.65 unsigned short iNextFrameAddress;
4.66 };
4.67
5.1 --- a/FutabaMDM166AA.cpp Thu Feb 05 14:02:27 2015 +0100
5.2 +++ b/FutabaMDM166AA.cpp Thu Feb 05 14:26:29 2015 +0100
5.3 @@ -318,15 +318,6 @@
5.4 }
5.5
5.6 /**
5.7 -Tries to complete our current request if we have one pending.
5.8 - */
5.9 -TMiniDisplayRequest MDM166AA::AttemptRequestCompletion()
5.10 - {
5.11 - return EMiniDisplayRequestNone;
5.12 - }
5.13 -
5.14 -
5.15 -/**
5.16 Set our screen brightness.
5.17 @param The desired brightness level. Must be between MinBrightness and MaxBrightness.
5.18 */
6.1 --- a/FutabaMDM166AA.h Thu Feb 05 14:02:27 2015 +0100
6.2 +++ b/FutabaMDM166AA.h Thu Feb 05 14:26:29 2015 +0100
6.3 @@ -51,9 +51,6 @@
6.4 void ToggleOffScreenMode();
6.5 void SetOffScreenMode(bool aOn);
6.6 bool OffScreenMode() const {return iOffScreenMode;}
6.7 - //
6.8 - TMiniDisplayRequest AttemptRequestCompletion();
6.9 -
6.10
6.11 private:
6.12