Esempio n. 1
0
int main() {
  uint8_t error;

  /* Initialise the hardware */ 
  bspInit();
  interfaceInit(NO_DEVICE);

  /* Initialise the OS */
  OSInit();                                                   

  /* Create Tasks */
  OSTaskCreate(appTaskCanReceive,                               
               (void *)0,
               (OS_STK *)&appTaskCanReceiveStk[APP_TASK_CAN_RECEIVE_STK_SIZE - 1],
               APP_TASK_CAN_RECEIVE_PRIO);
 
  OSTaskCreate(appTaskCanMonitor,                               
               (void *)0,
               (OS_STK *)&appTaskCanMonitorStk[APP_TASK_CAN_MONITOR_STK_SIZE - 1],
               APP_TASK_CAN_MONITOR_PRIO);

  /* Create Semaphores and Mutexes */
  can1RxSem = OSSemCreate(0);
  displayMutex = OSMutexCreate(DISPLAY_MUTEX_PRIO, &error);
      
  /* Start the OS */
  OSStart();                                                  
  
  /* Should never arrive here */ 
  return 0;      
}
Esempio n. 2
0
Dialog::Dialog(QWidget *parent) :
    QDialog(parent)
{
     /*界面初始化*/
    globalData = GlobalData::getGlobalData();//初始化数据,防止多线程危险(暂时方法)
   // fingergather = new Finger_Gather;
   // QFont font;
    interfaceInit();
    int a = 0;
    for(; a<10;a++){
         qDebug() << "test *****777777777************";
    }

    // picture_send_test *test = new picture_send_test();
  //  test->start();
    //paintInit();
     /*定义定时器,定时刷新显示*/
    //QTimer *timer1 = new QTimer(this);
   // DataProcess *dataProcess = new DataProcess(this);                        //数据采集与处理线程
    //dataProcess->start();

   // GprsConnect *gprs_start = GprsConnect::Instance();
    //gprs_start->start();
//    VoicePlay *voicePlay = new VoicePlay(this);                                  //语音播放处理线程
//    voicePlay->start();
    /*2014.03.02 先关闭zigbee配置功能*/
   //ZigbeeReceive *zigbeeReceive = new ZigbeeReceive(this);
    //zigbeeReceive->start();

   // DataGather *datagather = new DataGather;
  // datagather->start();

   // voicePlay.start();
    //QTimer *timer2 = new QTimer(this);
    //connect(dataProcess,SIGNAL(paintSignal()),this,SLOT(timer1UpDate()),Qt::DirectConnection);//定时器1做图像更新
    //connect(timer1,SIGNAL(timeout()),this,SLOT(timer1UpDate()));//定时器1做图像更新
    //connect(timer2,SIGNAL(timeout()),this,SLOT(timer2UpDate()));
    //timer1->start(500);//100毫秒定时
    connect(setButton , SIGNAL( clicked() ) , this , SLOT(setButtonClicked()));
    connect(ChangeTab , SIGNAL( clicked() ),this,SLOT(ChangeTabButtonClicked()));
   // connect(fingerButton , SIGNAL( clicked() ) , fingergather , SLOT(finger_data_process()),Qt::DirectConnection);
    connect(fingerButton , SIGNAL( clicked() ) , this,SLOT(fingerButtonClicked()));

    /*2014.03.02 先关闭SerialSendData功能*/
    //2014.01.16
    //qDebug()<<"angle"<<globalData->craneList.at(0).angle;
   // SerialSendData *serialSendData = new SerialSendData();//串口发送线程实例化
    //serialSendData->start();

    /*2014.03.02 先关闭zigbee配置功能*/
   // connect(zigbeeReceive,SIGNAL(reqest_Info(quint8,quint32)),serialSendData,SLOT(sendInfo_afterRequest(quint8,quint32)));
  //  connect(zigbeeReceive,SIGNAL(transimit_Info(quint8,quint32,quint32)),serialSendData,SLOT(storeInfo_afterRecv(quint8,quint32,quint32)));
  //  connect(zigbeeReceive,SIGNAL(resetDevice()),serialSendData,SLOT(ResetDevice()));//重启设备

    ////////////////////////

}