bool Ccl1000::init(void) { Cce515p::init(); pCONNECTOR = new Cconnector(this,20,0,Cconnector::General_20, "20 pins Connector",true,QPoint(135,498)); publish(pCONNECTOR); pSavedCONNECTOR = new Cconnector(this,20,1,Cconnector::General_20,"Saved Connector",false,QPoint(631,468)); QHash<int,QString> lbl; lbl[1] = "STROBE"; lbl[2] = "D1"; lbl[3] = "D2"; lbl[4] = "D3"; lbl[5] = "D4"; lbl[6] = "D5"; lbl[7] = "D6"; lbl[8] = "D7"; lbl[9] = "D8"; lbl[10]= "ACK"; lbl[11]= "BUSY"; lbl[31]= "INIT"; lbl[32]= "ERROR"; WatchPoint.add(&pCONNECTOR_value,64,36,this,"// 36pins connector",lbl); paperWidget->hide(); PaperFeed(); PaperFeed(); charSize = 1; return true; }
bool Ccl1000::run(void) { if (pKEYB->LastKey == K_PFEED) { PaperFeed(); } // Si strobe change de status et passe bas vers haut, alors prelever les data // mettre le busy // quint8 c = pCONNECTOR->Get_values(); if ( c>0 && c != 0xff && c !=0x0a) { AddLog(LOG_PRINTER,QString("Recieve:%1 = (%2)").arg(c,2,16,QChar('0')).arg(QChar(c))); SET_PIN(9,1); Command(c); } pCONNECTOR_value = pCONNECTOR->Get_values(); pSavedCONNECTOR->Set_values(pCONNECTOR->Get_values()); pCONNECTOR_value = pCONNECTOR->Get_values(); Draw(); return true; }
bool Cx710::run(void) { if (pKEYB->LastKey == K_PFEED) { PaperFeed();} // Si strobe change de status et passe bas vers haut, alors prelever les data // mettre le busy // if (GoUp(1)) { UINT8 car = (pCONNECTOR->Get_values() >> 1) & 0xFF; AddLog(LOG_PRINTER,tr("RECIEVED CHAR : %1").arg(car,2,16,QChar('0'))); if (car != 0xff && car !=0x0a) Command( car ); }