-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update configurations for new jetson orin nx (#334)
- Loading branch information
Showing
5 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
#!/bin/bash | ||
|
||
CAN_BITRATE="${CAN_BITRATE:-125000}" | ||
CAN_DBITRATE="${CAN_DBITRATE:-500000}" | ||
CAN_DBITRATE="${CAN_DBITRATE:-125000}" | ||
|
||
sudo modprobe can | ||
sudo modprobe can_raw | ||
sudo modprobe mttcan | ||
|
||
sudo ip link set can0 type can bitrate "${CAN_BITRATE}" dbitrate "${CAN_DBITRATE}" \ | ||
berr-reporting on fd on | ||
sudo ip link set can1 type can bitrate "${CAN_BITRATE}" dbitrate "${CAN_DBITRATE}" \ | ||
berr-reporting on fd on | ||
berr-reporting on fd on restart-ms 100 | ||
sudo ip link set up can0 | ||
sudo ip link set up can1 | ||
|
||
if [[ $? != 0 ]]; then | ||
echo "Could not enable hardware CAN interface; using virtual CAN instead." | ||
sudo ip link add type vcan | ||
sudo ip link set dev vcan0 up | ||
echo "Error enabling can0 interface!" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters