Changeset 23 in pacpussensors for trunk/CanGateway/driver/PeakCanDriver.cpp
- Timestamp:
- Aug 11, 2013, 11:19:01 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CanGateway/driver/PeakCanDriver.cpp
r1 r23 144 144 short PeakCanDriver::sendFrame (struct CanFrame frame) 145 145 { 146 TPCANMsg msg; 147 msg.MSGTYPE = 0; //normal message 148 //msg.MSGTYPE |= MSGTYPE_EXTENDED; //extended ? 149 msg.ID = frame.id; 150 msg.LEN = frame.dlc; 151 memcpy(msg.DATA, frame.data, frame.dlc); 152 if(CAN_Write(canDeviceHandle_, &msg)) { 153 perror("application: CAN_Write()"); 154 return errno; 155 } 146 156 return PSUCCESS; 147 157 } … … 164 174 if ((errno = LINUX_CAN_Read_Timeout(canDeviceHandle_, &message, READ_TIMEOUT))) 165 175 { 166 perror("application: CAN_Read()"); 176 //Timeout: 177 //perror("application: CAN_Read()"); 167 178 return errno; 168 179 }
Note:
See TracChangeset
for help on using the changeset viewer.