diff --git a/docs/source/conf.py b/docs/source/conf.py index 5259aa7..4edbd60 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -5,6 +5,7 @@ import os sys.path.insert(0, os.path.abspath('../../flight_software/state_machine/applications/flight/')) sys.path.insert(0, os.path.abspath('../../flight_software/state_machine/frame/')) +sys.path.insert(0, os.path.abspath('../../flight_software/state_machine/drivers/emulation')) # -- Project information diff --git a/docs/source/index.rst b/docs/source/index.rst index dace4b7..366215c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,8 +9,10 @@ Overview .. toctree:: :caption: Overview - overview/software_arch building + 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. 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