aboutsummaryrefslogtreecommitdiff
path: root/pi_configs/etc
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-05-14 17:41:30 -0700
committerXiao Pan <xyz@flylightning.xyz>2025-05-14 17:41:30 -0700
commiteafcc516f75bf7b3d71d1058663dc85cb08d4944 (patch)
tree9d244154cd9b18e3b25b2e5ac8ef4bc6b43578c9 /pi_configs/etc
parent9f960f2ef4257ffc0bf367a858d10a58f6ceaf45 (diff)
add pi config files
Diffstat (limited to 'pi_configs/etc')
-rw-r--r--pi_configs/etc/home/Spartan_Racing_Charger/.config/systemd/user/mycan.service11
-rw-r--r--pi_configs/etc/systemd/system/can0.service11
2 files changed, 22 insertions, 0 deletions
diff --git a/pi_configs/etc/home/Spartan_Racing_Charger/.config/systemd/user/mycan.service b/pi_configs/etc/home/Spartan_Racing_Charger/.config/systemd/user/mycan.service
new file mode 100644
index 0000000..1282f7d
--- /dev/null
+++ b/pi_configs/etc/home/Spartan_Racing_Charger/.config/systemd/user/mycan.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Start mycan to process CAN
+After=can0.service
+
+[Service]
+Type=simple
+ExecStart=/usr/local/bin/mycan
+
+[Install]
+WantedBy=default.target
+
diff --git a/pi_configs/etc/systemd/system/can0.service b/pi_configs/etc/systemd/system/can0.service
new file mode 100644
index 0000000..70b59df
--- /dev/null
+++ b/pi_configs/etc/systemd/system/can0.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Setup can0 CAN bus
+After=network.target
+
+[Service]
+Type=oneshot
+ExecStart=sh -c 'ip link set can0 up type can bitrate 500000; \
+ ifconfig can0 txqueuelen 65536'
+
+[Install]
+WantedBy=multi-user.target