Compare commits

...

2 Commits

Author SHA1 Message Date
dace99b9e0
fix comparison of configs in Save As test
newer config structures will convert old configs to the new fields'
defaults, meaning the after won't be the same as the before once there's
a proto change not present in the original file (such as with this proto
bump for 0.7.9), so just do a more rudimentary compare

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-06-05 11:39:17 -05:00
a64ae256a0
update protobuf snapshot files for GP2040-CE v0.7.9
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-06-05 11:38:52 -05:00
10 changed files with 288 additions and 234 deletions

View File

@ -168,6 +168,7 @@ message PinMappings
message GpioMappingInfo
{
optional GpioAction action = 1;
optional GpioDirection direction = 2;
}
message GpioMappings
@ -339,7 +340,7 @@ message AnalogOptions
optional int32 analogAdc1PinX = 2;
optional int32 analogAdc1PinY = 3;
optional bool forced_circularity = 4;
optional uint32 analog_deadzone = 5;
optional uint32 inner_deadzone = 5;
optional int32 analogAdc2PinX = 6;
optional int32 analogAdc2PinY = 7;
optional DpadMode analogAdc1Mode = 8;
@ -347,6 +348,7 @@ message AnalogOptions
optional InvertMode analogAdc1Invert = 10;
optional InvertMode analogAdc2Invert = 11;
optional bool auto_calibrate = 12;
optional uint32 outer_deadzone = 13;
}
message TurboOptions
@ -727,6 +729,13 @@ message RotaryOptions
optional RotaryPinOptions encoderTwo = 3;
}
message PCF8575Options
{
optional bool enabled = 1;
optional int32 i2cBlock = 2;
repeated GpioMappingInfo pins = 3 [(nanopb).max_count = 16];
}
message AddonOptions
{
optional BootselButtonOptions bootselButtonOptions = 1;
@ -753,6 +762,7 @@ message AddonOptions
optional XBOnePassthroughOptions xbonePassthroughOptions = 22 [deprecated = true];
optional AnalogADS1256Options analogADS1256Options = 23;
optional RotaryOptions rotaryOptions = 24;
optional PCF8575Options pcf8575Options = 25;
}
message MigrationHistory

File diff suppressed because one or more lines are too long

View File

@ -227,6 +227,14 @@ enum GpioAction
BUTTON_PRESS_MACRO_6 = 39;
}
enum GpioDirection
{
option (nanopb_enumopt).long_names = false;
GPIO_DIRECTION_INPUT = 0;
GPIO_DIRECTION_OUTPUT = 1;
}
enum GamepadHotkey
{
option (nanopb_enumopt).long_names = false;
@ -266,6 +274,7 @@ enum GamepadHotkey
HOTKEY_S2_BUTTON = 32;
HOTKEY_A1_BUTTON = 33;
HOTKEY_A2_BUTTON = 34;
HOTKEY_NEXT_PROFILE = 35;
}
// This has to be kept in sync with LEDFormat in NeoPico.hpp

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -168,6 +168,7 @@ message PinMappings
message GpioMappingInfo
{
optional GpioAction action = 1;
optional GpioDirection direction = 2;
}
message GpioMappings
@ -339,7 +340,7 @@ message AnalogOptions
optional int32 analogAdc1PinX = 2;
optional int32 analogAdc1PinY = 3;
optional bool forced_circularity = 4;
optional uint32 analog_deadzone = 5;
optional uint32 inner_deadzone = 5;
optional int32 analogAdc2PinX = 6;
optional int32 analogAdc2PinY = 7;
optional DpadMode analogAdc1Mode = 8;
@ -347,6 +348,7 @@ message AnalogOptions
optional InvertMode analogAdc1Invert = 10;
optional InvertMode analogAdc2Invert = 11;
optional bool auto_calibrate = 12;
optional uint32 outer_deadzone = 13;
}
message TurboOptions
@ -727,6 +729,13 @@ message RotaryOptions
optional RotaryPinOptions encoderTwo = 3;
}
message PCF8575Options
{
optional bool enabled = 1;
optional int32 i2cBlock = 2;
repeated GpioMappingInfo pins = 3 [(nanopb).max_count = 16];
}
message AddonOptions
{
optional BootselButtonOptions bootselButtonOptions = 1;
@ -753,6 +762,7 @@ message AddonOptions
optional XBOnePassthroughOptions xbonePassthroughOptions = 22 [deprecated = true];
optional AnalogADS1256Options analogADS1256Options = 23;
optional RotaryOptions rotaryOptions = 24;
optional PCF8575Options pcf8575Options = 25;
}
message MigrationHistory

View File

@ -227,6 +227,14 @@ enum GpioAction
BUTTON_PRESS_MACRO_6 = 39;
}
enum GpioDirection
{
option (nanopb_enumopt).long_names = false;
GPIO_DIRECTION_INPUT = 0;
GPIO_DIRECTION_OUTPUT = 1;
}
enum GamepadHotkey
{
option (nanopb_enumopt).long_names = false;
@ -266,6 +274,7 @@ enum GamepadHotkey
HOTKEY_S2_BUTTON = 32;
HOTKEY_A1_BUTTON = 33;
HOTKEY_A2_BUTTON = 34;
HOTKEY_NEXT_PROFILE = 35;
}
// This has to be kept in sync with LEDFormat in NeoPico.hpp

View File

@ -297,7 +297,7 @@
"analogAdc1PinX": -1,
"analogAdc1PinY": -1,
"forcedCircularity": false,
"analogDeadzone": 5,
"innerDeadzone": 5,
"analogAdc2PinX": -1,
"analogAdc2PinY": -1,
"analogAdc1Mode": "DPAD_MODE_LEFT_ANALOG",

View File

@ -275,4 +275,4 @@ async def test_save_as(config_binary, tmp_path):
with open('/tmp/gptest', 'rb') as new_file:
test_config_binary = new_file.read()
test_config = get_config(test_config_binary)
assert original_config == test_config
assert original_config.boardVersion == test_config.boardVersion