Changeset 91 in pacpussensors for trunk/CanGateway/CanGateway.cpp
- Timestamp:
- Jul 28, 2015, 4:28:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CanGateway/CanGateway.cpp
r44 r91 91 91 qFatal("Failed to open the CAN interface port %s in %s mode",port_, accessMode_); 92 92 } 93 else if (source_ == "kvaser") 94 { 95 canIf_.setSource(Win32CanInterface::KvaserCard); 96 // open interface 97 if (canIf_.openInterface(channel_,speed_)==0) 98 qFatal("Failed to open the CAN interface num %d at speed %d",channel_,speed_); 99 } 93 100 else 94 101 { … … 112 119 canIf_.stop(); 113 120 114 if ((source_ == "vector")||(source_=="peak")||(source_=="vectorXL")||(source_=="igep") )121 if ((source_ == "vector")||(source_=="peak")||(source_=="vectorXL")||(source_=="igep")||(source_=="kvaser")) 115 122 canIf_.closeInterface(channel_); 116 123 … … 151 158 } 152 159 setRecording( config.getProperty("recording") == "true" ? true : false ); 160 161 verbose_ = config.getProperty("verbose") == "true" ? true : false; 153 162 154 163 return ComponentBase::CONFIGURED_OK; … … 193 202 } 194 203 195 //displayData(incomingCanFrames_[counter_].frame.data, incomingCanFrames_[counter_].frame.dlc, incomingCanFrames_[counter_].frame.id);204 if (verbose_) displayData(incomingCanFrames_[counter_].frame.data, incomingCanFrames_[counter_].frame.dlc, incomingCanFrames_[counter_].frame.id); 196 205 if (isRecording()) 197 206 {
Note:
See TracChangeset
for help on using the changeset viewer.