Skip to content

Commit 2612f20

Browse files
committed
Fixed docs build
1 parent 8caf665 commit 2612f20

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

XRPLib/imu.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .imu_defs import *
88
from uctypes import struct, addressof
99
except (TypeError, ModuleNotFoundError):
10+
LSM_ADDR_PRIMARY = 0x6A
1011
# Import wrapped in a try/except so that autodoc generation can process properly
1112
pass
1213
from machine import I2C, Pin, Timer, disable_irq, enable_irq

docs/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
with open("../package.json", "r") as read_file:
1515
__version__ = json.load(read_file)["version"]
16-
16+
from unittest.mock import MagicMock
1717
# -- General configuration ------------------------------------------------
1818

1919
# Add any Sphinx extension module names here, as strings. They can be
@@ -26,6 +26,11 @@
2626
"sphinx.ext.todo",
2727
]
2828

29+
import sys
30+
31+
sys.implementation._machine = "XRP mocked-machine"
32+
33+
2934
# Uncomment the below if you use native CircuitPython modules such as
3035
# digitalio, micropython and busio. List the modules you use. Without it, the
3136
# autodoc module docs will fail to generate with a warning.
@@ -35,6 +40,7 @@
3540
'machine',
3641
'board',
3742
'network',
43+
'neopixel',
3844
'esp',
3945
'uos',
4046
'btree',

docs/installation_check.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Installation Verification
33

44
Ensure your device works with this simple test.
55

6-
.. literalinclude:: ../Examples/installation_verification.py
7-
:caption: Examples/installation_verification.py
6+
.. literalinclude:: ../XRPExamples/installation_verification.py
7+
:caption: XRPExamples/installation_verification.py
88
:linenos:
99

0 commit comments

Comments
 (0)