test.cpp
changeset 9 e6c42e1e2a96
parent 8 631f53604811
child 10 4c3d32f38c09
     1.1 --- a/test.cpp	Wed May 21 10:19:22 2014 +0200
     1.2 +++ b/test.cpp	Wed May 21 16:11:09 2014 +0200
     1.3 @@ -574,6 +574,12 @@
     1.4  	}
     1.5  
     1.6  /**
     1.7 +Set the defined pixel block to the given value.
     1.8 +@param X coordinate of our pixel block starting point.
     1.9 +@param Y coordinate of our pixel block starting point.
    1.10 +@param The height of our pixel block.
    1.11 +@param The size of our pixel data. Number of pixels divided by 8.
    1.12 +@param The value set to 8 pixels.
    1.13  */
    1.14  void MainWindow::SetPixelBlock(int aX, int aY, int aHeight, int aSize, unsigned char aValue)
    1.15  	{
    1.16 @@ -594,6 +600,30 @@
    1.17  	int res = hid_write(connected_device, iOutputReportBuffer, KFutabaOutputReportLength);
    1.18  	}
    1.19  
    1.20 +/**
    1.21 +Send an output report to a Futaba VFD device.
    1.22 +*/
    1.23 +/*
    1.24 +void MainWindow::SendFutabaOutputReport(unsigned char* aReportData, unsigned char aSize)
    1.25 +    {
    1.26 +    //
    1.27 +    memset(iOutputReportBuffer, 0x0, KFutabaOutputReportLength);
    1.28 +    iOutputReportBuffer[0]=0x00; //Report ID is always null
    1.29 +    iOutputReportBuffer[1]=0x08+aSize; //Report length
    1.30 +    iOutputReportBuffer[2]=0x1B; //
    1.31 +    iOutputReportBuffer[3]=0x5B; //
    1.32 +    iOutputReportBuffer[4]=0xF0; //
    1.33 +    iOutputReportBuffer[5]=aX; //X
    1.34 +    iOutputReportBuffer[6]=aY; //Y
    1.35 +    iOutputReportBuffer[7]=aHeight; //Y length before return. Though outside the specs, setting this to zero apparently allows us to modify a single pixel without touching any other.
    1.36 +    iOutputReportBuffer[8]=0x00; //Size of pixel data in bytes (MSB)
    1.37 +    iOutputReportBuffer[9]=aSize; //Size of pixel data in bytes (LSB)
    1.38 +    memset(iOutputReportBuffer+10, aValue, KFutabaOutputReportLength);
    1.39 +    //iOutputReportBuffer[10]=aValue; //Pixel data
    1.40 +    int res = hid_write(connected_device, iOutputReportBuffer, KFutabaOutputReportLength);
    1.41 +    }
    1.42 +*/
    1.43 +
    1.44  
    1.45  /**
    1.46  */