Commit Graph

11 Commits

Author SHA1 Message Date
Brian S. Stephan fc022452f5
replace most references to pico with RP2040 2023-11-07 00:26:51 -06:00
Brian S. Stephan d2ef3efa3b
trivial reordering of command line flags 2023-07-12 18:32:05 -05:00
Brian S. Stephan 8c5bd4397f
allow edit-config to fallback to new config if old doesn't exist 2023-07-12 00:08:55 -05:00
Brian S. Stephan 2f5a99b695
use proper field descriptor when checking missing children 2023-07-10 16:00:26 -05:00
Brian S. Stephan 853283e69c
edit-config over USB 2023-07-09 10:47:27 -05:00
Brian S. Stephan e2ad75371e
DRY: convenience method to get config from USB 2023-07-07 20:03:41 -05:00
Brian S. Stephan 0378269a00
--usb flag to edit-config direct off the board 2023-07-07 18:58:25 -05:00
Brian S. Stephan 221f45557e
support the adding of new repeated elements
take for instance:
repeated AlternativePinMappings alternativePinMappings = 1 [(nanopb).max_count = 3];

this, in C, creates a three-struct-sized array alternativePinMappings[].
in python, this is the same idea, where profileOptions' field is a
special container to which AlternativePinMappings can be added. this
allows adding elements via the UI. it does *NOT* implement limits (yet?)
so you can add more (and I think the board will just ignore them and
drop them on write)
2023-07-01 17:05:19 -05:00
Brian S. Stephan c60a5e784d
refactor to retain field_value in case it is a message
we can save some config lookups in this case (in particular in the case
where we are working with repeateds and the lookup against an iterable
won't work)
2023-07-01 13:00:48 -05:00
Brian S. Stephan 71f6af624e
refactor to add a node outside of the main tree builder 2023-07-01 12:24:31 -05:00
Brian S. Stephan 7d5052e811
add edit-config, a Textual TUI for editing a configuration
this tree UI allows for viewing and basic editing of a configuration
section from a board. it does a decent job of displaying most of the
settings, and editing is equally convenient, as in it tries to handle
enums correctly, but doesn't validate pins or handle long binary strings
well.

saving is done in place --- if a config/storage section was opened, a
config section (no padding) is what results. if a whole board was
opened, the whole binary is rewritten with the new offset config
section. this way, a whole board dump can be changed in place, or a new
config can be made for use in e.g. concatenate to build an image

many enhancements to come over time
2023-06-30 02:01:01 -05:00