-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protobuf Config #263
Merged
Protobuf Config #263
Changes from all commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
dc3236e
Build makefsdata for Linux w/ MUSL
mthiesen 4659a97
Restored deflate support to makefsdata
mthiesen 2136666
Merge remote-tracking branch 'upstream/main' into main
mthiesen 4291b69
Added nanopb library
mthiesen 96f74b6
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen aff0e9d
Initial version of Proto config
mthiesen ca0b3f0
Added AnimationOptions_Proto
mthiesen 05dbb21
Storage::toJSON() WIP
mthiesen 8672790
Pretty JSON output
mthiesen 3e97571
Use std::string instead of std::ostringstream
mthiesen ee64ab4
Simplify ToJSON() and implented repeated support
mthiesen 5e84afe
Default initialization
mthiesen 69ac593
Fixed issue in nanopb_generator.py
mthiesen e25bbbd
Moved Config functions to separate file
mthiesen 3b8e79e
Restored StorageManager to its pristine state
mthiesen beb3dea
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen c8c8c88
Config loading and saving
mthiesen 9051bc8
Make FlashPROM cache public for the time being
mthiesen 0c195bd
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen 8b3dc35
Implemented api/getConfig and api/setConfig endpoints
mthiesen db2dd98
Moved most Gamepad enums to enums.proto
mthiesen 70ca17e
Use DEFAULT_INPUT_MODE and DEFAULT_DPAD_MODE
mthiesen 058b66d
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen 4f71763
Renamed generic/short enum values
mthiesen 7fd2058
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen eb50f9a
Moved bulk of config structs to the ConfigLegacy namespace
mthiesen c2362f0
Moved GamepadOptions and GamepadHotkeyEntry to ConfigLegacy
mthiesen 0ac40ee
FlashPROM::start() is no longer needed
mthiesen dc93eb2
Added more settings to config.proto
mthiesen 4206e2e
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen a9a5b55
Support for the latest config changes from main
mthiesen 6b8a46d
Store config struct on the heap to avoid stack overflow
mthiesen 7aca51b
Increase LWIP_HTTPD_POST_MAX_PAYLOAD_LEN to 8kb
mthiesen bd9fbf0
Further stack optimizations
mthiesen ad809af
Removed template to reduce code bloat
mthiesen 774b50c
Update config.boardVersion and save after ConfigUtils::load()
mthiesen 3dfb3c4
Config instance in StorageManager
mthiesen 9d7aeaf
Renamed getAddonOptions() -> getLegacyAddonOptions()
mthiesen 4e387cd
Added getters for sub-configs
mthiesen c678a85
Migrate PinMappings to Protobuf
mthiesen 90a5508
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen b35f8bd
Fixed wrong name caused by overeager renaming
mthiesen 6fbe453
Migrated reverse addon to Protobuf storage
mthiesen 3929a4e
Mirrored latest version of AnimationOptions in Protobuf
mthiesen 72729df
Fixed compatibility with arm-none-eabi-gcc 11.3.1
mthiesen 716e2c6
Fixed crash issue in Release builds
mthiesen fcd6c7b
Fixed board configs
mthiesen ecd97c3
Added commented out PICO_DEOPTIMIZED_DEBUG to CMakeList.txt
mthiesen 2731948
Added support for byte arrays to base64 encoder / decoder
mthiesen 1a78e3d
Store binary data as byte arrays, convert to Base64 in JSON
mthiesen 43ec7d9
Migrated api/getSplashImage and api/setSplashImage
mthiesen cdca2b0
Change footer magic to invalidate incompatible stored data
mthiesen 537c180
Refactor pin assignment from JSON
deeebug 5cbd6d3
Add bool to int workaround for web-config
deeebug 56a91ba
Migrate SOCD Slider addon to ProtoBuf
deeebug 1e5048a
Migrate On-Board LED addon to ProtoBuf
deeebug c0f11dd
Migrate Analog Input addon to ProtoBuf
deeebug a5713bb
Migrate BOOTSEL button addon to ProtoBuf
deeebug 6a86ffb
Migrate Buzzer Speaker addon to ProtoBuf
deeebug a42ac3b
Migrate Dual Directional Input addon to ProtoBuf
deeebug beabf91
Migrate Extra Button addon to ProtoBuf
deeebug 5ae66c5
Migrate I2C Analog ADS1219 addon to ProtoBuf
deeebug 5a04091
Migrate Joystick Selection Slider addon to ProtoBuf
deeebug ecc7bb0
Migrate Player Number addon to ProtoBuf
deeebug f3f9d16
Migrate Turbo addon to ProtoBuf
deeebug 18044ef
Migrate Wii Extension addon to ProtoBuf
deeebug 6959755
Migrate PS4 Mode addon to ProtoBuf
deeebug e10bad1
Check writeCache when determining whether to save
mthiesen 7bdd74f
We only allow saves from core0. Saves from core1 have to be marshalle…
mthiesen 2f35339
Migrate AnimationOptions
mthiesen aabf57a
Merge remote-tracking branch 'upstream/ProtoBuf' into ProtobufSettings
mthiesen 64e4127
Check serial and signature for size as well
mthiesen 16e29de
Removed unncessary cast
mthiesen eb636f6
Moved PS4Options to config_legacy.cpp
mthiesen a0a9b83
Migrate Display addon to ProtoBuf
deeebug 3a2953e
Removed old code related to SplashImage
mthiesen 055f233
Removed old code related to AddonOptions
mthiesen a249338
Removed stale functions from ConfigManager
mthiesen f77a5b3
Moved OnBoardLedMode to config_legacy.cpp
mthiesen 8eb33a6
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen d0795c0
Fixed issues caused by the merge
mthiesen 3128989
Added new player LED properties to LEDOptions
mthiesen 915e1fc
No more usage of ConfigLegacy::GamepadOptions
mthiesen 3739fe2
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen b78010b
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen 85d6398
Added switchTpShareForDs4 to config.proto
mthiesen 4258fca
Conversion from legacy storage to Protobuf
mthiesen 983281a
Return -1 for invalid pins from webconfig
mthiesen b806be9
More conversion from legacy storage to Protobuf
mthiesen 1c3b2c0
Validate enums when converting from legacy config
mthiesen 949a9cb
Remove switchTpShareForDs4 from legacy conversion
mthiesen 41f5720
More conversion from legacy storage to Protobuf
mthiesen 9505d57
Removed references to ConfigLegacy::BoardOptions
mthiesen 2e0ca64
Fixed compilation of KB2040
mthiesen 72fa060
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen 0bbf552
Re-added /api/getConfig function entry
mthiesen f0d92d3
Fixed issue where JSLider addon fails to change dpadMode
mthiesen baf7832
Merge remote-tracking branch 'upstream/main' into ProtobufSettings
mthiesen f87dfb2
Migrated SNES options to Protobuf
mthiesen 05b265a
Fixed saving of AnimationOptions
mthiesen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
function (compile_proto) | ||
find_package(Python3 REQUIRED COMPONENTS Interpreter) | ||
|
||
set(VENV ${CMAKE_CURRENT_BINARY_DIR}/venv) | ||
set(VENV_FILE ${VENV}/environment.txt) | ||
if(CMAKE_HOST_WIN32) | ||
set(VENV_BIN_DIR ${VENV}/Scripts) | ||
else() | ||
set(VENV_BIN_DIR ${VENV}/bin) | ||
endif() | ||
|
||
add_custom_command( | ||
DEPENDS ${CMAKE_SOURCE_DIR}/lib/nanopb/extra/requirements.txt | ||
COMMAND ${Python3_EXECUTABLE} -m venv ${VENV} | ||
COMMAND ${VENV_BIN_DIR}/pip --disable-pip-version-check install -r ${CMAKE_SOURCE_DIR}/lib/nanopb/extra/requirements.txt | ||
COMMAND ${VENV_BIN_DIR}/pip freeze > ${VENV_FILE} | ||
OUTPUT ${VENV_FILE} | ||
COMMENT "Setting up Python Virtual Environment" | ||
) | ||
|
||
set(NANOPB_GENERATOR ${CMAKE_SOURCE_DIR}/lib/nanopb/generator/nanopb_generator.py) | ||
set(PROTO_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/proto) | ||
set(PROTO_OUTPUT_DIR ${PROTO_OUTPUT_DIR} PARENT_SCOPE) | ||
|
||
add_custom_command( | ||
DEPENDS ${VENV_FILE} ${NANOPB_GENERATOR} ${CMAKE_SOURCE_DIR}/proto/enums.proto ${CMAKE_SOURCE_DIR}/lib/nanopb/generator/proto/nanopb.proto | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROTO_OUTPUT_DIR} | ||
COMMAND ${VENV_BIN_DIR}/python ${NANOPB_GENERATOR} | ||
-q | ||
-D ${PROTO_OUTPUT_DIR} | ||
-I ${CMAKE_SOURCE_DIR}/proto | ||
-I ${CMAKE_SOURCE_DIR}/lib/nanopb/generator/proto | ||
${CMAKE_SOURCE_DIR}/proto/enums.proto | ||
OUTPUT ${PROTO_OUTPUT_DIR}/enums.pb.c ${PROTO_OUTPUT_DIR}/enums.pb.h | ||
COMMENT "Compiling enums.proto" | ||
) | ||
|
||
add_custom_command( | ||
DEPENDS ${VENV_FILE} ${NANOPB_GENERATOR} ${CMAKE_SOURCE_DIR}/proto/enums.proto ${CMAKE_SOURCE_DIR}/proto/config.proto ${CMAKE_SOURCE_DIR}/lib/nanopb/generator/proto/nanopb.proto | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROTO_OUTPUT_DIR} | ||
COMMAND ${VENV_BIN_DIR}/python ${NANOPB_GENERATOR} | ||
-q | ||
-D ${PROTO_OUTPUT_DIR} | ||
-I ${CMAKE_SOURCE_DIR}/proto | ||
-I ${CMAKE_SOURCE_DIR}/lib/nanopb/generator/proto | ||
${CMAKE_SOURCE_DIR}/proto/config.proto | ||
OUTPUT ${PROTO_OUTPUT_DIR}/config.pb.c ${PROTO_OUTPUT_DIR}/config.pb.h | ||
COMMENT "Compiling config.proto" | ||
) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to make a note that we require Python again for protobuf since we removed that previously.