AP_Periph: Restore setting node_id from CAN_NODE parameter
Reverts part of commit: 584bcbac0d
This commit is contained in:
parent
ef505df78a
commit
2e85ba6f51
@ -1016,6 +1016,10 @@ void AP_Periph_FW::can_start()
|
|||||||
node_status.mode = UAVCAN_PROTOCOL_NODESTATUS_MODE_INITIALIZATION;
|
node_status.mode = UAVCAN_PROTOCOL_NODESTATUS_MODE_INITIALIZATION;
|
||||||
node_status.uptime_sec = AP_HAL::millis() / 1000U;
|
node_status.uptime_sec = AP_HAL::millis() / 1000U;
|
||||||
|
|
||||||
|
if (g.can_node >= 0 && g.can_node < 128) {
|
||||||
|
PreferredNodeID = g.can_node;
|
||||||
|
}
|
||||||
|
|
||||||
can_iface.init(1000000, AP_HAL::CANIface::NormalMode);
|
can_iface.init(1000000, AP_HAL::CANIface::NormalMode);
|
||||||
|
|
||||||
canardInit(&canard, (uint8_t *)canard_memory_pool, sizeof(canard_memory_pool),
|
canardInit(&canard, (uint8_t *)canard_memory_pool, sizeof(canard_memory_pool),
|
||||||
|
Loading…
Reference in New Issue
Block a user