1.1 --- a/FutabaGP1212A02.cpp Mon Aug 25 00:07:01 2014 +0200
1.2 +++ b/FutabaGP1212A02.cpp Mon Aug 25 22:05:30 2014 +0200
1.3 @@ -22,7 +22,7 @@
1.4 iFrameBeta(NULL),
1.5 iFrameGamma(NULL),
1.6 iNeedFullFrameUpdate(0),
1.7 - iRequest(EMiniDisplayRequestNone),iPowerOn(false)
1.8 + iPowerOn(false)
1.9 {
1.10 iDeviceId[0]=0;
1.11 iFirmwareRevision[0]=0;
1.12 @@ -480,77 +480,21 @@
1.13 */
1.14 void GP1212A02A::RequestDeviceId()
1.15 {
1.16 - if (RequestPending())
1.17 - {
1.18 - //Abort silently for now
1.19 - return;
1.20 - }
1.21 -
1.22 - //1BH,5BH,63H,49H,44H
1.23 - //Send Read ID command
1.24 - FutabaVfdReport report;
1.25 - report[0]=0x00; //Report ID
1.26 - report[1]=0x05; //Report length
1.27 - report[2]=0x1B; //Command ID
1.28 - report[3]=0x5B; //Command ID
1.29 - report[4]=0x63; //Command ID
1.30 - report[5]=0x49; //Command ID
1.31 - report[6]=0x44; //Command ID
1.32 - if (Write(report)==report.Size())
1.33 - {
1.34 - iRequest=EMiniDisplayRequestDeviceId;
1.35 - }
1.36 + //Not supported
1.37 }
1.38
1.39 /**
1.40 */
1.41 void GP1212A02A::RequestFirmwareRevision()
1.42 {
1.43 - if (RequestPending())
1.44 - {
1.45 - //Abort silently for now
1.46 - return;
1.47 - }
1.48 -
1.49 - //1BH,5BH,63H,46H,52H
1.50 - //Send Software Revision Read Command
1.51 - FutabaVfdReport report;
1.52 - report[0]=0x00; //Report ID
1.53 - report[1]=0x05; //Report length
1.54 - report[2]=0x1B; //Command ID
1.55 - report[3]=0x5B; //Command ID
1.56 - report[4]=0x63; //Command ID
1.57 - report[5]=0x46; //Command ID
1.58 - report[6]=0x52; //Command ID
1.59 - if (Write(report)==report.Size())
1.60 - {
1.61 - iRequest=EMiniDisplayRequestFirmwareRevision;
1.62 - }
1.63 + //Not supported
1.64 }
1.65
1.66 /**
1.67 */
1.68 void GP1212A02A::RequestPowerSupplyStatus()
1.69 {
1.70 - if (RequestPending())
1.71 - {
1.72 - //Abort silently for now
1.73 - return;
1.74 - }
1.75 - //1BH,5BH,63H,50H,4DH
1.76 - //Send Power Suppply Monitor Command
1.77 - FutabaVfdReport report;
1.78 - report[0]=0x00; //Report ID
1.79 - report[1]=0x05; //Report length
1.80 - report[2]=0x1B; //Command ID
1.81 - report[3]=0x5B; //Command ID
1.82 - report[4]=0x63; //Command ID
1.83 - report[5]=0x50; //Command ID
1.84 - report[6]=0x4D; //Command ID
1.85 - if (Write(report)==report.Size())
1.86 - {
1.87 - iRequest=EMiniDisplayRequestPowerSupplyStatus;
1.88 - }
1.89 + //Not supported
1.90 }
1.91
1.92
1.93 @@ -590,47 +534,9 @@
1.94 */
1.95 TMiniDisplayRequest GP1212A02A::AttemptRequestCompletion()
1.96 {
1.97 - if (!RequestPending())
1.98 - {
1.99 - return EMiniDisplayRequestNone;
1.100 - }
1.101 -
1.102 - int res=Read(iInputReport);
1.103 -
1.104 - if (!res)
1.105 - {
1.106 - return EMiniDisplayRequestNone;
1.107 - }
1.108 -
1.109 - //Process our request
1.110 - if (CurrentRequest()==EMiniDisplayRequestPowerSupplyStatus)
1.111 - {
1.112 - if (iInputReport[1]==0x4F && iInputReport[2]==0x4E)
1.113 - {
1.114 - iPowerOn = true;
1.115 - }
1.116 - else if (iInputReport[1]==0x4F && iInputReport[2]==0x46 && iInputReport[3]==0x46)
1.117 - {
1.118 - iPowerOn = false;
1.119 - }
1.120 - }
1.121 - else if (CurrentRequest()==EMiniDisplayRequestDeviceId)
1.122 - {
1.123 - unsigned char* ptr=&iInputReport[1];
1.124 - strcpy(iDeviceId,(const char*)ptr);
1.125 - }
1.126 - else if (CurrentRequest()==EMiniDisplayRequestFirmwareRevision)
1.127 - {
1.128 - unsigned char* ptr=&iInputReport[1];
1.129 - strcpy(iFirmwareRevision,(const char*)ptr);
1.130 - }
1.131 -
1.132 - TMiniDisplayRequest completed=iRequest;
1.133 - //Our request was completed
1.134 - iRequest=EMiniDisplayRequestNone;
1.135 -
1.136 - return completed;
1.137 - }
1.138 + //That display does not support any requests
1.139 + return EMiniDisplayRequestNone;
1.140 + }
1.141
1.142
1.143 /**