mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
AP_HAL_Linux: add option to use vitual CAN in linux
This commit is contained in:
parent
10fb5d6b21
commit
ee310433e5
@ -462,8 +462,11 @@ void CANIface::_updateDownStatusFromPollResult(const pollfd& pfd)
|
||||
bool CANIface::init(const uint32_t bitrate, const OperatingMode mode)
|
||||
{
|
||||
char iface_name[16];
|
||||
#if HAL_LINUX_USE_VIRTUAL_CAN
|
||||
sprintf(iface_name, "vcan%u", _self_index);
|
||||
#else
|
||||
sprintf(iface_name, "can%u", _self_index);
|
||||
|
||||
#endif
|
||||
if (_initialized) {
|
||||
return _initialized;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user