mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 04:03:59 -04:00
AP_HAL: board: linux: Add default CAN interface name
This commit is contained in:
parent
b6665f7e58
commit
a50e6c6dd7
@ -430,3 +430,7 @@
|
||||
#ifndef HAL_BOARD_STORAGE_DIRECTORY
|
||||
#define HAL_BOARD_STORAGE_DIRECTORY "/var/lib/ardupilot"
|
||||
#endif
|
||||
|
||||
#ifndef HAL_BOARD_CAN_IFACE_NAME
|
||||
#define HAL_BOARD_CAN_IFACE_NAME "can0"
|
||||
#endif
|
||||
|
@ -68,7 +68,7 @@ bool LinuxCAN::begin(uint32_t bitrate)
|
||||
{
|
||||
if (_initialized) return _initialized;
|
||||
// TODO: Add possibility change bitrate
|
||||
_fd = openSocket("can0");
|
||||
_fd = openSocket(HAL_BOARD_CAN_IFACE_NAME);
|
||||
if (_fd > 0) {
|
||||
_bitrate = bitrate;
|
||||
_initialized = true;
|
||||
|
Loading…
Reference in New Issue
Block a user