Add SoftRF udev rules and "ping" code hack (temporary).

pull/749/head
cyoung 2018-09-12 10:09:08 -04:00
rodzic c612444a79
commit d0b447dc7a
2 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -29,3 +29,11 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="
# --set-bus-powered=no
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"

Wyświetl plik

@ -40,6 +40,9 @@ func initPingSerial() bool {
if _, err := os.Stat("/dev/ping"); err == nil {
device = "/dev/ping"
} else if _, err := os.Stat("/dev/softrf"); err == nil {
device = "/dev/softrf"
baudrate = int(38400)
} else {
log.Printf("No suitable Ping device found.\n")
return false