kopia lustrzana https://github.com/cyoung/stratux
Add SoftRF udev rules and "ping" code hack (temporary).
rodzic
c612444a79
commit
d0b447dc7a
|
@ -29,3 +29,11 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="
|
||||||
# --set-bus-powered=no
|
# --set-bus-powered=no
|
||||||
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{interface}=="Stratux Serialout", SYMLINK+="serialout%n"
|
SUBSYSTEMS=="usb", ATTRS{interface}=="Stratux Serialout", SYMLINK+="serialout%n"
|
||||||
|
|
||||||
|
|
||||||
|
# SoftRF.
|
||||||
|
|
||||||
|
# SoftRF Standalone (NodeMCU or DoIt ESP32 devkit with CP2102 chip)
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{product}=="DIY SoftRF", SYMLINK+="softrf"
|
||||||
|
# TTGO T-Beam (ESP32 with OTP CP2104 chip)
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{product}=="CP2104 USB to UART Bridge Controller", SYMLINK+="softrf"
|
||||||
|
|
|
@ -40,6 +40,9 @@ func initPingSerial() bool {
|
||||||
|
|
||||||
if _, err := os.Stat("/dev/ping"); err == nil {
|
if _, err := os.Stat("/dev/ping"); err == nil {
|
||||||
device = "/dev/ping"
|
device = "/dev/ping"
|
||||||
|
} else if _, err := os.Stat("/dev/softrf"); err == nil {
|
||||||
|
device = "/dev/softrf"
|
||||||
|
baudrate = int(38400)
|
||||||
} else {
|
} else {
|
||||||
log.Printf("No suitable Ping device found.\n")
|
log.Printf("No suitable Ping device found.\n")
|
||||||
return false
|
return false
|
||||||
|
|
Ładowanie…
Reference in New Issue