Changeset 91 in pacpussensors for trunk/CanGateway/driver/KVaserCanDriver.cpp


Ignore:
Timestamp:
07/28/15 16:28:08 (9 years ago)
Author:
DHERBOMEZ Gérald
Message:

Small corrections during tests: CAN reading OK under Windows with Kvaser Leaf Light.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CanGateway/driver/KVaserCanDriver.cpp

    r89 r91  
    248248                        memcpy(frame.data, msg, frame.dlc);
    249249                        return 0;
    250                 } else if (stat == canERR_NOMSG ) {
     250                }
     251        }
     252        else if (stat == canERR_NOMSG ) {
    251253                        // timeout occurs
    252254                        LOG_WARN("Kvaser card - receiveFrame() method - TIMEOUT");
    253255                        return 1;
    254                 } else {
     256        }
     257        else {
    255258                        // An error frame.
    256259                        LOG_WARN("Kvaser card, error frame");
    257260                        return 1;
    258                 }
    259         }
    260 
    261         return 0;
     261        }
     262
     263
     264        return 1;
    262265}
    263266
Note: See TracChangeset for help on using the changeset viewer.