Changeset 4 in pacpussensors for trunk/CanGateway/CanGateway.cpp


Ignore:
Timestamp:
Jun 7, 2013, 12:10:00 AM (11 years ago)
Author:
guyardro
Message:

add igep can driver for CanGateway and add support for igep compilation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CanGateway/CanGateway.cpp

    r2 r4  
    8585      qFatal("Failed to open the CAN interface port %s in %s mode",port_, accessMode_);
    8686  }
     87  else if (source_ == "igep")
     88  {
     89    canIf_.setSource(Win32CanInterface::igepCard);
     90    // open interface
     91    if (canIf_.openInterface(port_, accessMode_)==0)
     92      qFatal("Failed to open the CAN interface port %s in %s mode",port_, accessMode_);
     93  }
    8794  else
    8895  {
     
    107114  counter_ = 0;
    108115  canIf_.stop();
    109   if ((source_ == "vector")||(source_=="peak")||(source_=="vectorXL"))
     116  if ((source_ == "vector")||(source_=="peak")||(source_=="vectorXL")||(source_=="igep"))
    110117    canIf_.closeInterface(channel_);
    111118  canIf_.wait();
     
    182189    setState(ComponentBase::MONITOR_OK);
    183190
    184         //printf("id:%x\n",incomingCanFrames_[counter_].frame.id);
     191//      printf("id:%x\n",incomingCanFrames_[counter_].frame.id);
    185192
    186193   /* switch (incomingCanFrames_[counter_].frame.id)
Note: See TracChangeset for help on using the changeset viewer.