]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Fail hard when board cannot be determined. Feather Huzzah Red LED is inverted. Typo...
authorCefn Hoile <github.com@cefn.com>
Mon, 19 Feb 2018 22:14:46 +0000 (22:14 +0000)
committerCefn Hoile <github.com@cefn.com>
Mon, 19 Feb 2018 22:14:46 +0000 (22:14 +0000)
python/board/__init__.py
python/microcontroller/__init__.py
python/testing/board/__init__.py
python/testing/implementation/all/digitalio.py
python/testing/microcontroller/__init__.py

index f41e27d95b7ef7ceb7ea1b215fbc27ea63ab7cc3..b5d65c7fb960621a6cf4048fe93a4ae572fd22d1 100644 (file)
@@ -43,3 +43,5 @@ elif board == "nodemcu":
     from board.nodemcu import *
 elif board == "pyboard":
     from board.pyboard import *
+else:
+    raise NotImplementedError("Board not supported")
\ No newline at end of file
index 9d25685fd023f4ce8b4710494f08b3ab75e5108a..d9653ed2d7d4f3307030a3aa49d2c8e1fe1a67bb 100644 (file)
@@ -11,3 +11,5 @@ if agnostic.microcontroller == "esp8266":
     from microcontroller.esp8266 import pin
 elif agnostic.microcontroller == "stm32":
     from microcontroller.stm32 import pin
+else:
+    raise NotImplementedError("Microcontroller not supported")
\ No newline at end of file
index a961969657df2e9a8439e2ba420f3e9a27b72908..c38abc6e23c34f180a6a8be549901f6f3885f274 100644 (file)
@@ -12,10 +12,12 @@ elif agnostic.board == "feather_huzzah":
     default_pin = feather_huzzah.GPIO4
     led_pin = feather_huzzah.GPIO0 # red led
     led_hardwired = True
-    led_inverted = False
+    led_inverted = True
 elif agnostic.board == "pyboard":
     from board import pyboard
     default_pin = pyboard.X1
     led_pin = board.pyboard.LED_BLUE
     led_hardwired = True
     led_inverted = False
+else:
+    raise NotImplementedError("Board not supported")
index f4426058ed685210aedfa36e2e35dae9bf084674..6b813979dfed1d182c10c0a55e5097e63cabbc48 100644 (file)
@@ -62,7 +62,7 @@ class TestDigitalInOutInteractive(unittest.TestCase):
                 print()
                 print(e)
                 return  # test trivially passed
-            if yes_no("Is Button wired to {} to GND".format(default_pin)):
+            if yes_no("Is Button wired from {} to GND".format(default_pin)):
                 self.assertTrue(button.value == 1)
                 self.assertTrue(await_true("button pressed", lambda: button.value == 0))
 
index 401f6db8b6f61dec30596514f4584a32969b0000..f8dc6f5c418b067a9a82147360fec35cc1cde389 100644 (file)
@@ -5,4 +5,4 @@ if microcontroller == "esp8266":
 elif microcontroller == "samd21":
     pin_count = 38
 else:
-    raise NotImplementedError
\ No newline at end of file
+    raise NotImplementedError("Microcontroller not supported")