Commit Graph

12 Commits

Author SHA1 Message Date
Brian S. Stephan 2a40c70b56
cover a bit more TUI in tests, and remove dead branches
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:20 -05:00
Brian S. Stephan 3a55cad86f
implement Save As... in the TUI
this allows for loading an existing GP2040-CE dump or board in BOOTSEL
over USB and saving the parsed configuration to a new .bin/.uf2 file.
might be useful for making quick backups or variants of configs

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-03-26 13:47:30 -05:00
Brian S. Stephan b900e1dd04
relicense as GPLv3
prior MIT-licensed versions can be obtained from the Git history; this
does not revoke those versions

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-03-08 00:02:43 -06:00
Brian S. Stephan df875a5d99
rename GUI Save button as Confirm
more idiomatic this way, since it's really just "set the value", not
actually saving the config

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-02-17 23:05:51 -06:00
Brian S. Stephan f2ed281053
test parsing config as JSON into a message
this also bumps the proto files in the test directory as a matter of
convenience, so some tests got updated accordingly

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-03 12:20:54 -06:00
Brian S. Stephan 23cb5c9e5a
add SPDX-FileCopyrightText
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-02 15:15:55 -06:00
Brian S. Stephan b2bf7984b0
add SPDX-License-Identifier: MIT to all source
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-18 10:17:35 -06:00
Brian S. Stephan fcb1297139
test with 0.7.5 files, which has an expanded config section 2023-11-06 23:55:01 -06: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 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 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