2121# documentation root, use os.path.abspath to make it absolute, like shown here.
2222sys .path .insert (0 , os .path .abspath ("." ))
2323
24- # The MICROPY_VERSION env var should be "vX.Y.Z" (or unset).
25- micropy_version = os .getenv ("MICROPY_VERSION" ) or "latest"
26- micropy_all_versions = (os .getenv ("MICROPY_ALL_VERSIONS" ) or "latest" ).split ("," )
27- url_pattern = "%s/en/%%s" % (os .getenv ("MICROPY_URL_PREFIX" ) or "/" ,)
28-
2924# =============================================================================
3025# Documentation versions and build date — bump these for each release.
3126# =============================================================================
4136# Build date is computed automatically each time Sphinx runs.
4237build_date = _dt .date .today ().strftime ("%d %b %Y" )
4338
44- # The members of the html_context dict are available inside topindex.html
39+ # Values exposed to topindex.html and footer templates.
4540html_context = {
46- "cur_version" : micropy_version ,
47- "all_versions" : [(ver , url_pattern % ver ) for ver in micropy_all_versions ],
48- "downloads" : [
49- ("PDF" , url_pattern % micropy_version + "/micropython-docs.pdf" ),
50- ],
51- "is_release" : micropy_version != "latest" ,
5241 "openmv_version" : openmv_version ,
5342 "micropython_version" : micropython_version ,
5443 "build_date" : build_date ,
7059csi0.reset()
7160csi0.pixformat(csi.RGB565)
7261csi0.framesize(csi.VGA)
62+ csi0.snapshot(time=2000) # let AWB/AGC stabilize
7363
7464# Built-in single-class person detector model.
7565model = ml.Model("/rom/yolov8n_192.tflite",
9484csi0.reset()
9585csi0.pixformat(csi.RGB565)
9686csi0.framesize(csi.QVGA)
87+ csi0.snapshot(time=2000) # let AWB/AGC stabilize
9788csi0.auto_gain(False)
9889csi0.auto_whitebal(False)
9990
119110csi0.pixformat(csi.RGB565)
120111csi0.framesize(csi.VGA)
121112csi0.window((400, 400)) # square window for best results
113+ csi0.snapshot(time=2000) # let AWB/AGC stabilize
122114
123115model = ml.Model("/rom/blazeface_front_128.tflite",
124116 postprocess=BlazeFace(threshold=0.4))
140132csi0.reset()
141133csi0.pixformat(csi.RGB565)
142134csi0.framesize(csi.QVGA)
135+ csi0.snapshot(time=2000) # let AWB/AGC stabilize
143136csi0.auto_gain(False)
144137
145138clock = time.clock()
160153csi0.reset()
161154csi0.pixformat(csi.RGB565)
162155csi0.framesize(csi.QVGA)
156+ csi0.snapshot(time=2000) # let AWB/AGC stabilize
163157csi0.auto_gain(False)
164158csi0.auto_whitebal(False)
165159
188182csi0.pixformat(csi.GRAYSCALE)
189183csi0.framesize(csi.VGA)
190184csi0.window((640, 80)) # narrow strip for fast linear scanning
185+ csi0.snapshot(time=2000) # let AWB/AGC stabilize
191186csi0.auto_gain(False)
192187csi0.auto_whitebal(False)
193188
212207csi0.pixformat(csi.RGB565)
213208csi0.framesize(csi.VGA)
214209csi0.window((400, 400)) # square window for the model
210+ csi0.snapshot(time=2000) # let AWB/AGC stabilize
215211
216212# Connections between the 21 keypoints — palm + 5 fingers.
217213hand_lines = ((0, 1), (1, 2), (2, 3), (3, 4), (0, 5), (5, 6),
@@ -246,9 +242,6 @@ def _render_landing_code(src):
246242 k : _render_landing_code (v ) for k , v in _landing_examples_src .items ()
247243}
248244
249- # Authors used in various parts of the documentation.
250- micropy_authors = "MicroPython authors and contributors"
251-
252245
253246# -- General configuration ------------------------------------------------
254247
@@ -279,7 +272,7 @@ def _render_landing_code(src):
279272master_doc = "index"
280273
281274# General information about the project.
282- project = "MicroPython"
275+ project = "OpenMV MicroPython"
283276copyright = "The OpenMV MicroPython Documentation is Copyright © 2014-2026 by OpenMV, Damien P. George, and others."
284277
285278# The version info for the project you're documenting, acts as replacement for
@@ -393,8 +386,9 @@ def _render_landing_code(src):
393386# output. They are ignored by default.
394387# show_authors = False
395388
396- # The name of the Pygments (syntax highlighting) style to use.
397- pygments_style = "sphinx"
389+ # Note: Shibuya overrides the Pygments style via its own theme.conf
390+ # (`github-light-default` / `github-dark-default`), so we don't set
391+ # ``pygments_style`` here.
398392
399393# A list of ignored prefixes for module index sorting.
400394# modindex_common_prefix = []
@@ -509,10 +503,6 @@ def _render_landing_code(src):
509503# This is the file name suffix for HTML files (e.g. ".xhtml").
510504# html_file_suffix = None
511505
512- # Output file base name for HTML help builder.
513- htmlhelp_basename = "MicroPythondoc"
514-
515-
516506# -- Options for LaTeX output ---------------------------------------------
517507
518508latex_elements = {
@@ -532,8 +522,8 @@ def _render_landing_code(src):
532522latex_documents = [
533523 (
534524 master_doc ,
535- "MicroPython.tex" ,
536- "MicroPython Documentation" ,
525+ "OpenMV- MicroPython.tex" ,
526+ "OpenMV MicroPython Documentation" ,
537527 "OpenMV, Damien P. George, and others" ,
538528 "manual" ,
539529 ),
@@ -569,8 +559,8 @@ def _render_landing_code(src):
569559man_pages = [
570560 (
571561 "index" ,
572- "micropython" ,
573- "MicroPython Documentation" ,
562+ "openmv- micropython" ,
563+ "OpenMV MicroPython Documentation" ,
574564 ["OpenMV, Damien P. George, and others" ],
575565 1 ,
576566 ),
@@ -588,11 +578,11 @@ def _render_landing_code(src):
588578texinfo_documents = [
589579 (
590580 master_doc ,
591- "MicroPython" ,
592- "MicroPython Documentation" ,
581+ "OpenMV- MicroPython" ,
582+ "OpenMV MicroPython Documentation" ,
593583 "OpenMV, Damien P. George, and others" ,
594- "MicroPython" ,
595- "One line description of project ." ,
584+ "OpenMV- MicroPython" ,
585+ "OpenMV firmware documentation, built on MicroPython ." ,
596586 "Miscellaneous" ,
597587 ),
598588]
@@ -611,4 +601,4 @@ def _render_landing_code(src):
611601
612602
613603# Example configuration for intersphinx: refer to the Python standard library.
614- intersphinx_mapping = {"python" : ("https://docs.python.org/3.5 " , None )}
604+ intersphinx_mapping = {"python" : ("https://docs.python.org/3" , None )}
0 commit comments