added usb-racemode, database needs to be reconfigured and colors in timemodel needs to be adapted
This commit is contained in:
@@ -169,7 +169,7 @@ void HardwareSetup::run(){
|
||||
while(!this->stop){
|
||||
usleep(100000); // 100ms
|
||||
|
||||
while(1){
|
||||
//while(1){
|
||||
nBytes = usb_control_msg(this->handle,
|
||||
USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_ENDPOINT_IN,
|
||||
USB_DATA_OUT, 0, 0, (char *)buffer, sizeof(buffer), 5000);
|
||||
@@ -203,46 +203,11 @@ void HardwareSetup::run(){
|
||||
// if(buffer[0].update != 0){
|
||||
// cout << "Got " << nBytes << " bytes: " << (int)buffer[2].time << ", " << (int)buffer[2].id << endl;
|
||||
// }
|
||||
|
||||
// if((int)buffer->update == 1){
|
||||
// //if((int) buffer->id)
|
||||
// emit Dea((int)buffer->time, 1);
|
||||
// }
|
||||
}
|
||||
//}
|
||||
|
||||
if(nBytes < 0)
|
||||
fprintf(stderr, "USB error: %sn", usb_strerror());
|
||||
|
||||
//if(getDea()){
|
||||
if(1){
|
||||
|
||||
// if(!deaBefore){
|
||||
if(1){
|
||||
index = 1;
|
||||
deaBefore = true;
|
||||
//emit Dea(5);
|
||||
}
|
||||
else{
|
||||
index += 1;
|
||||
//Debug
|
||||
//std::cout << index << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
deaBefore = false;
|
||||
}
|
||||
|
||||
// if(getShell()){
|
||||
if(1){
|
||||
if(!shellBefore){
|
||||
shellBefore = true;
|
||||
//emit Shell();
|
||||
}
|
||||
}
|
||||
else{
|
||||
shellBefore = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user