1.1 --- a/FutabaMDM166AA.h Thu Feb 05 11:41:19 2015 +0100
1.2 +++ b/FutabaMDM166AA.h Thu Feb 05 14:02:27 2015 +0100
1.3 @@ -21,7 +21,6 @@
1.4 class MDM166AA : public FutabaGraphicDisplay
1.5 {
1.6 public:
1.7 -
1.8 MDM166AA();
1.9 ~MDM166AA();
1.10
1.11 @@ -52,29 +51,23 @@
1.12 void ToggleOffScreenMode();
1.13 void SetOffScreenMode(bool aOn);
1.14 bool OffScreenMode() const {return iOffScreenMode;}
1.15 - //
1.16 - void SetFrameDifferencing(bool aOn){iUseFrameDifferencing=aOn;}
1.17 - bool FrameDifferencing() const {return iUseFrameDifferencing;}
1.18 //
1.19 TMiniDisplayRequest AttemptRequestCompletion();
1.20 - FutabaVfdReport& InputReport() {return iInputReport;}
1.21 - bool IsPowerOn();
1.22 - char* DeviceId();
1.23 - char* FirmwareRevision();
1.24 +
1.25
1.26 private:
1.27
1.28 enum TClockFormat
1.29 - {
1.30 + {
1.31 EClock12 = 0x00,
1.32 EClock24 = 0x01,
1.33 - };
1.34 + };
1.35
1.36 enum TClockSize
1.37 - {
1.38 + {
1.39 EClockSmall = 0x01,
1.40 EClockLarge = 0x02
1.41 - };
1.42 + };
1.43
1.44
1.45 private:
1.46 @@ -84,56 +77,35 @@
1.47 void SendCommandReset();
1.48 //
1.49 //Clock commands
1.50 - void SendCommandClockSetting(unsigned char aHour, unsigned char aMinute);
1.51 + void SendCommandSetClockData(unsigned char aHour, unsigned char aMinute);
1.52 void SendCommandClockDisplay(TClockSize aClockSize, TClockFormat aClockFormat);
1.53
1.54 //Graphics commands
1.55 void SendCommandSetAddressCounter(unsigned char aAddressCounter);
1.56 void SendCommandWriteGraphicData(int aSize, unsigned char* aPixels);
1.57
1.58 -
1.59 private:
1.60 void RequestDeviceId();
1.61 void RequestFirmwareRevision();
1.62 void RequestPowerSupplyStatus();
1.63 //
1.64 - void SetClockSetting();
1.65 -
1.66 + void SetClockData();
1.67
1.68 private:
1.69 - unsigned char OffScreenY() const;
1.70 - void OffScreenTranslation(unsigned char& aX, unsigned char& aY);
1.71 void ResetBuffers();
1.72
1.73 private:
1.74 - unsigned char iDisplayPositionX;
1.75 - unsigned char iDisplayPositionY;
1.76 ///Off screen mode is the recommended default settings to avoid tearing.
1.77 ///Though turning it off can be useful for debugging
1.78 bool iOffScreenMode;
1.79 - ///Frame differences algo is used to reduce USB bus traffic and improve frame rate in typical use case
1.80 - bool iUseFrameDifferencing;
1.81 - ///
1.82 - //FutabaVfdReport iReport;
1.83 - ///
1.84 - //unsigned char iFrameBuffer[256*64];
1.85 - BitArrayLow* iFrameNext;
1.86 + //
1.87 + BitArrayLow* iFrameNext;
1.88 BitArrayLow* iFrameCurrent;
1.89 BitArrayLow* iFramePrevious;
1.90 //
1.91 - BitArrayLow* iFrameAlpha;
1.92 - BitArrayLow* iFrameBeta;
1.93 - BitArrayLow* iFrameGamma;
1.94 - //
1.95 - int iNeedFullFrameUpdate;
1.96 - //unsigned char iFrameBeta[256*64];
1.97 - //unsigned char *iFrontBuffer;
1.98 - //unsigned char *iBackBuffer;
1.99 - FutabaVfdReport iInputReport;
1.100 - //
1.101 - char iDeviceId[KFutabaMaxHidReportSize];
1.102 - char iFirmwareRevision[KFutabaMaxHidReportSize];
1.103 - bool iPowerOn;
1.104 + BitArrayLow* iFrameAlpha; //owned
1.105 + BitArrayLow* iFrameBeta; //owned
1.106 + BitArrayLow* iFrameGamma; //owned
1.107 };
1.108
1.109