Skip to content

Commit

Permalink
Fix 1-Wire multi-platform support again
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Nov 9, 2019
1 parent 7330d65 commit bfc1fad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Expand Up @@ -75,6 +75,7 @@ Development
- Improve platform switch for system sensors
- Acquire ``onewire.py`` drivers for both Vanilla MicroPython and Pycom MicroPython
as ``onewire_native.py`` vs. ``onewire_python.py``.
- Fix 1-Wire multi-platform support again. Thanks, @poesel!


2019-08-19 0.6.0
Expand Down
2 changes: 1 addition & 1 deletion terkin/sensor/core.py
Expand Up @@ -278,7 +278,7 @@ def start(self):
try:
# Vanilla MicroPython 1.11
if platform_info.vendor == platform_info.MICROPYTHON.Vanilla:
from onewire_native import OneWire
from onewire import OneWire
pin = Pin(int(self.pins['data'][1:]))

# Pycom MicroPython 1.9.4
Expand Down
4 changes: 2 additions & 2 deletions tools/setup.mk
Expand Up @@ -81,8 +81,8 @@ download-requirements:

# Genuine MicroPython driver for Pycom MicroPython 1.11.
# https://github.com/micropython/micropython/tree/v1.11/drivers/onewire
$(fetch) $(target_dir) --output-document=$(target_dir)/onewire_native.py https://raw.githubusercontent.com/micropython/micropython/v1.11/drivers/onewire/onewire.py
$(fetch) $(target_dir) https://raw.githubusercontent.com/micropython/micropython/v1.11/drivers/onewire/ds18x20.py
#$(fetch) $(target_dir) --output-document=$(target_dir)/onewire_native.py https://raw.githubusercontent.com/micropython/micropython/v1.11/drivers/onewire/onewire.py
#$(fetch) $(target_dir) https://raw.githubusercontent.com/micropython/micropython/v1.11/drivers/onewire/ds18x20.py

# Pycom MicroPython driver for Pycom MicroPython 1.11.
# https://github.com/pycom/pycom-micropython-sigfox/tree/v1.20.1.r1/drivers/onewire
Expand Down

0 comments on commit bfc1fad

Please sign in to comment.