FutabaVfd.h
author sl
Wed, 21 May 2014 16:11:09 +0200
changeset 9 e6c42e1e2a96
child 10 4c3d32f38c09
permissions -rw-r--r--
Drafting new Futaba class.
     1 
     2 
     3 #ifndef FUTABA_VFD_H
     4 #define FUTABA_VFD_H
     5 
     6 #include "hidapi.h"
     7 
     8 //This was computed from our number of pixels as follow 256x64/8/64 = 32 + 1 = 33
     9 //+1 was added for our header
    10 const int KFutabaMaxCommandOutputReport = 33;
    11 //TODO: Get ride of that constant once we figure out a way to get it from hidapi
    12 const int KFutabaOutputReportLength = 65;
    13 
    14 
    15 /**
    16 Define a generic Futaba VFD command.
    17 */
    18 class FutabaVfdCommand
    19     {
    20 public:
    21     FutabaVfdCommand();
    22     ~FutabaVfdCommand();
    23     //
    24     //void Create(int aMaxSize);
    25     //void Delete();
    26 
    27     //inline unsigned char& operator[](int aIndex){return iBuffer[aIndex];}
    28 
    29     void Reset();
    30 
    31 private:
    32     //unsigned char* iBuffer;
    33     unsigned char iReports[KFutabaMaxCommandOutputReport][KFutabaOutputReportLength];
    34     int iSize;
    35     int iMaxSize;
    36     };
    37 
    38 
    39 #endif