Logo Search packages:      
Sourcecode: marote version File versions  Download package

k2_thr.cpp

#include "k2_thr.h"

using namespace std;

void k2_thr::run()
{
    while(1){
 rd = ""; // Flush old data
 rd = read_k2();
 if(!rd.isEmpty()){
     emit rxdata(rd);
 }else{ 
 //pause briefly since there is no data
 // And to keep the cpu from pegging out
   msleep(50);  // XXms delay.  Tune this to keep cpu from overloading
   }
 }
}

Generated by  Doxygen 1.6.0   Back to index