From 964d6abcf849a3759d422db485fce78f270a45ce Mon Sep 17 00:00:00 2001 From: thetazero Date: Mon, 1 Aug 2022 12:33:53 -0400 Subject: [PATCH 1/2] Initial framework docs --- docs/source/conf.py | 2 ++ docs/source/index.rst | 1 + docs/source/overview/frame.rst | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 docs/source/overview/frame.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index ed837ef..c55f29f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,6 +3,8 @@ # -- Path Setup import sys sys.path.insert(0, '../flight_software/state_machine/applications/flight/') +sys.path.insert(0, '../flight_software/state_machine/frame') +sys.path.insert(0, '../flight_software/state_machine/drivers/emulation') # -- Project information diff --git a/docs/source/index.rst b/docs/source/index.rst index e498fac..84171f6 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -12,6 +12,7 @@ Overview overview/software_arch building hardware + overview/frame Applications ------------ diff --git a/docs/source/overview/frame.rst b/docs/source/overview/frame.rst new file mode 100644 index 0000000..e7484f4 --- /dev/null +++ b/docs/source/overview/frame.rst @@ -0,0 +1,33 @@ +Framework +========= + +How the framework works +----------------------- + +Using tasko (now called `CircuitPyton Async `_) a set of tasks read from a config file are run at set intervals. +This means while a certain task is waiting for a response from something like the radio, other tasks are run. + +A state machine is also defined in the config file. Each state has its own set of tasks to run (and their coresponding intervals). +All the details for transitions are handled by the state machine. + +One can also define exit and enter functions for each state. + +State Machine +------------- + +.. automodule:: state_machine + :members: + +Tasko +----- + +.. automodule:: tasko + :members: + +.. autofunction:: tasko.add_task +.. autofunction:: tasko.run_later +.. autofunction:: tasko.schedule +.. autofunction:: tasko.schedule_later +.. autofunction:: tasko.sleep +.. autofunction:: tasko.suspend +.. autofunction:: tasko.run \ No newline at end of file From 148cc8ff3d23df5e008a27df0d1965ef658041c8 Mon Sep 17 00:00:00 2001 From: thetazero Date: Tue, 2 Aug 2022 13:40:34 -0400 Subject: [PATCH 2/2] Add firmware updates docs --- docs/source/index.rst | 5 +++-- docs/source/overview/firmware.rst | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 docs/source/overview/firmware.rst diff --git a/docs/source/index.rst b/docs/source/index.rst index 84171f6..89cbacc 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,10 +9,11 @@ Overview .. toctree:: :caption: Overview - overview/software_arch building - hardware + overview/software_arch overview/frame + overview/firmware + hardware Applications ------------ diff --git a/docs/source/overview/firmware.rst b/docs/source/overview/firmware.rst new file mode 100644 index 0000000..122ed6b --- /dev/null +++ b/docs/source/overview/firmware.rst @@ -0,0 +1,20 @@ +Firmware +================================= + +Updating PyCubedMini Firmware +----------------------------- + +Based on `these instructions `_. +Instructions written for PycubedMiniV02. + +#. Connect the PyCubed-Mini board to your computer via USB. +#. Quickly double click the "RESET" button on the board (only small black button on the board). + When the board boots into BOOTLOADER mode, the LED should be bright and white. + The board should also mount as `PYCUBEDBOOT`. +#. Then drag and drop the `update_bootloader.uf2 `_ into the the `PYCUBEDBOOT` drive (do this). + However, renaming it to `CURRENT.uf2` and replacing the current `CURRENT.uf2` file in the drive also worked. + The board should automatically reboot and update. +#. Wait for the board to unmount, then remount in bootloader mode again. +#. Copy over `firmware.uf2 `_ +#. The board should automatically reboot, and remount as `CIRCUITPY` +#. If the libraries/code require updating also update the `lib` directory and the relevant python files.