More work on supporting swcan - it's there now! Untested as of yet.
This commit is contained in:
@@ -31,6 +31,7 @@ void SocketCan::piStarted()
|
||||
mTimer.setInterval(1000);
|
||||
mTimer.setSingleShot(false); //keep ticking
|
||||
mTimer.start();
|
||||
mBusData[0].mBus.setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +60,7 @@ bool SocketCan::piGetBusSettings(int pBusIdx, CANBus& pBus)
|
||||
|
||||
void SocketCan::piSetBusSettings(int pBusIdx, CANBus bus)
|
||||
{
|
||||
CANConStatus stats;
|
||||
/* sanity checks */
|
||||
if(0 != pBusIdx)
|
||||
return;
|
||||
@@ -109,7 +111,6 @@ bool SocketCan::piSendFrame(const CANFrame& pFrame)
|
||||
/* sanity checks */
|
||||
if(0 != pFrame.bus || pFrame.len>8)
|
||||
return false;
|
||||
|
||||
if (!mDev_p) return false;
|
||||
|
||||
/* fill frame */
|
||||
@@ -232,7 +233,10 @@ void SocketCan::testConnection() {
|
||||
/* try to reconnect */
|
||||
CANBus bus;
|
||||
if(getBusConfig(0, bus))
|
||||
{
|
||||
bus.setEnabled(true);
|
||||
setBusSettings(0, bus);
|
||||
}
|
||||
}
|
||||
/* disconnect test instance */
|
||||
dev_p->disconnectDevice();
|
||||
|
||||
Reference in New Issue
Block a user