Set max_usb_current=1 in /boot/config.txt from installer #103
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Wed, 14 Feb 2018 01:50:18 +0000 (17:50 -0800)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Wed, 14 Feb 2018 01:50:18 +0000 (17:50 -0800)
CHANGELOG.md
package.json
scripts/install.sh

index 00c77195831f5affe0f7543eb2deca2861d592ca..6a2516eb1c0fb69ea9a0ac9f08e2a9bdceee28d6 100644 (file)
@@ -1,6 +1,9 @@
 Buildbotics CNC Controller Firmware Change Log
 ==============================================
 
+## v0.3.6
+ - Set max_usb_current=1 in /boot/config.txt from installer #103
+
 ## v0.3.5
  - Fixed dwell (G4)
  - Always show limit switch indicators regardless of motor enable
index fc0d42f2d9ede1323cfd14d4df1a17e9f53652f7..ef0b0a36e4cf0568fc1c4e87d20e88565ecdfba5 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "bbctrl",
-  "version": "0.3.5",
+  "version": "0.3.6",
   "homepage": "http://buildbotics.com/",
   "repository": "https://github.com/buildbotics/bbctrl-firmware",
   "license": "GPL-3.0+",
index 026d368d809bdce4d62d2911b3e99afd1cf0f383..563d8602efe92ec9db53dafa0554a1395ed9ad30 100755 (executable)
@@ -22,6 +22,14 @@ if $UPDATE_AVR; then
     ./scripts/avr109-flash.py src/avr/bbctrl-avr-firmware.hex
 fi
 
+# Increase USB current
+grep max_usb_current /boot/config.txt >/dev/null
+if [ $? -ne 0 ]; then
+    mount -o remount,rw /boot &&
+    echo max_usb_current=1 >> /boot/config.txt
+    mount -o remount,ro /boot
+fi
+
 if $UPDATE_PY; then
     rm -rf /usr/local/lib/python*/dist-packages/bbctrl-*
     ./setup.py install --force