Commits

iorodeo  committed 7ba1086 Draft

Modified led controller udev rules to work with controllers which show
up with "FT232R USB UART" as the product name.

Modified ip address query in form_tools so that it will default to the lo
of the specified network interface (eth0, eth1, etc) isn't found.

  • Participants
  • Parent commits ffa74b7

Comments (0)

Files changed (2)

File lia_web_interface/src/lia_web_interface/form_tools.py

         # Get hostaddr use ip address if possible
         try:
             hostaddr= iface_tools.get_ip_addr('eth0')
-        except KeyError, NameError:
-            print 'unable to get ip - using localhost'
-            hostaddr = 'localhost'
+        except (KeyError, NameError, ValueError) as e:
+            print 'unable to get ip - using lo'
+            hostaddr= iface_tools.get_ip_addr('lo')
+
 
         base_kwargs = {
                 'page_header': config.page_header,

File udev/99-led-controller.rules

 SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{product}=="ARDUINO NANO", SYMLINK+="ledcontrol"
+SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{product}=="FT232R USB UART", SYMLINK+="ledcontrol"