Skip to content

[FEATURE] Add Command to cdh.py to Reset the Satellite with a New Initial Code File #216

@Mikefly123

Description

@Mikefly123

Story

  • As a mission operator
  • I want to change what is the first code file executed on startup
  • So that over the air updates can be commanded.

Acceptance Criteria

  • Adds a command to cdh.py
  • New command function in cdh.py that wraps a supervisor.set_next_code_file(str agrs) call
  • Demo of command being accepted by software and changing to a temp file that starts petting the watchdog at a 1s interval.

Technical Details

When we upload new code to the satellite, one of the safer ways to try running that update is to use the built in CircuitPython supervisor module. This module allows you to define what code file will execute after a reset (instead of the default code.py or main.py.

In this feature request, we want to just demo some barebones functionality of using this module, where we add a command to cdh.py that will accept a string augment that is then passed to a supervisor.set_next_code_file() call.

See the API docs at this link:
https://docs.circuitpython.org/en/latest/shared-bindings/supervisor/index.html#supervisor.set_next_code_file

The original PR that introduced this feature to the supervisor module might be helpful as well!
adafruit/circuitpython#3454

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions