From c81f4cd1395e09bc1295bedcbbe75e2d999f6838 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Tue, 17 Dec 2024 13:30:25 -0600 Subject: [PATCH] properly test protobuf structure packaging options this should all be tested now: 1. invoking against precompiled _pb2.py files provided by user 2. invoking against .proto files provided by user which must be compiled 3. invoking with a special option to use shipped (by us) .proto files which must be compiled 4. erroring because none of the above occurred this took some reorganization, but this should finally give me stability in using this in GP2040-CE's build process Signed-off-by: Brian S. Stephan --- gp2040ce_bintools/__init__.py | 7 +- pyproject.toml | 4 + tests/test-files/pb2-files/config_pb2.py | 296 +++++++++++++++++++++++ tests/test-files/pb2-files/enums_pb2.py | 133 ++++++++++ tests/test-files/pb2-files/nanopb_pb2.py | 46 ++++ tests/test_builder.py | 4 +- tests/test_commands.py | 4 +- tests/test_gui.py | 4 +- tests/test_package.py | 68 ++++-- tests/test_rp2040.py | 4 +- tests/test_storage.py | 4 +- 11 files changed, 547 insertions(+), 27 deletions(-) create mode 100644 tests/test-files/pb2-files/config_pb2.py create mode 100644 tests/test-files/pb2-files/enums_pb2.py create mode 100644 tests/test-files/pb2-files/nanopb_pb2.py diff --git a/gp2040ce_bintools/__init__.py b/gp2040ce_bintools/__init__.py index 43db636..fd26b63 100644 --- a/gp2040ce_bintools/__init__.py +++ b/gp2040ce_bintools/__init__.py @@ -40,6 +40,8 @@ core_parser.add_argument('-d', '--debug', action='store_true', help="enable debu core_parser.add_argument('-P', '--proto-files-path', type=pathlib.Path, default=list(), action='append', help="path to .proto files to read, including dependencies; you will likely need " "to supply this twice, once for GP2040-CE's .proto files and once for nanopb's") +core_parser.add_argument('-S', '--use-shipped-fallback', action='store_true', + help="utilize shipped (potentially stale) .proto files because you can't supply your own") args, _ = core_parser.parse_known_args() for path in args.proto_files_path: sys.path.append(os.path.abspath(os.path.expanduser(path))) @@ -50,7 +52,7 @@ else: handler.setLevel(logging.WARNING) -def get_config_pb2(): +def get_config_pb2(with_fallback: bool = args.use_shipped_fallback): """Retrieve prebuilt _pb2 file or attempt to compile it live.""" # try to just import a precompiled module if we have been given it in our path # (perhaps someone already compiled it for us for whatever reason) @@ -65,6 +67,9 @@ def get_config_pb2(): return grpc.protos('config.proto') except (ModuleNotFoundError, TypeError): # (TypeError could be the windows bug https://github.com/protocolbuffers/protobuf/issues/14345) + if not with_fallback: + raise + # that failed, import the snapshot (may be lagging what's in GP2040-CE) logger.warning("using the fallback .proto files! please supply your files with -P if you can!") sys.path.append(os.path.join(pathlib.Path(__file__).parent.resolve(), 'proto_snapshot')) diff --git a/pyproject.toml b/pyproject.toml index ff209a0..fda0f8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,10 @@ ignore_errors = true [tool.pytest] python_files = ["*_tests.py", "tests.py", "test_*.py"] +[tool.pytest.ini_options] +log_cli = 0 +log_cli_level = "WARNING" + [tool.setuptools] packages = [ "gp2040ce_bintools", diff --git a/tests/test-files/pb2-files/config_pb2.py b/tests/test-files/pb2-files/config_pb2.py new file mode 100644 index 0000000..84abd4a --- /dev/null +++ b/tests/test-files/pb2-files/config_pb2.py @@ -0,0 +1,296 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: config.proto +# Protobuf Python Version: 5.27.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'config.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import nanopb_pb2 as nanopb__pb2 +import enums_pb2 as enums__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63onfig.proto\x1a\x0cnanopb.proto\x1a\x0b\x65nums.proto\"\xab\x05\n\x0eGamepadOptions\x12\x1d\n\tinputMode\x18\x01 \x01(\x0e\x32\n.InputMode\x12\x1b\n\x08\x64padMode\x18\x02 \x01(\x0e\x32\t.DpadMode\x12\x1b\n\x08socdMode\x18\x03 \x01(\x0e\x32\t.SOCDMode\x12\x13\n\x0binvertXAxis\x18\x04 \x01(\x08\x12\x13\n\x0binvertYAxis\x18\x05 \x01(\x08\x12\x1b\n\x13switchTpShareForDs4\x18\x06 \x01(\x08\x12\x13\n\x0blockHotkeys\x18\x07 \x01(\x08\x12\x13\n\x0b\x66ourWayMode\x18\x08 \x01(\x08\x12\x15\n\rprofileNumber\x18\t \x01(\r\x12-\n\x11ps4ControllerType\x18\n \x01(\x0e\x32\x12.PS4ControllerType\x12\x15\n\rdebounceDelay\x18\x0b \x01(\r\x12\x13\n\x0binputModeB1\x18\x0c \x01(\x05\x12\x13\n\x0binputModeB2\x18\r \x01(\x05\x12\x13\n\x0binputModeB3\x18\x0e \x01(\x05\x12\x13\n\x0binputModeB4\x18\x0f \x01(\x05\x12\x13\n\x0binputModeL1\x18\x10 \x01(\x05\x12\x13\n\x0binputModeL2\x18\x11 \x01(\x05\x12\x13\n\x0binputModeR1\x18\x12 \x01(\x05\x12\x13\n\x0binputModeR2\x18\x13 \x01(\x05\x12\x19\n\rps4ReportHack\x18\x14 \x01(\x08\x42\x02\x18\x01\x12\'\n\x0bps4AuthType\x18\x15 \x01(\x0e\x32\x12.InputModeAuthType\x12\'\n\x0bps5AuthType\x18\x16 \x01(\x0e\x32\x12.InputModeAuthType\x12*\n\x0exinputAuthType\x18\x17 \x01(\x0e\x32\x12.InputModeAuthType\x12\x31\n\x13ps4ControllerIDMode\x18\x18 \x01(\x0e\x32\x14.PS4ControllerIDMode\"\xb3\x05\n\x0fKeyboardMapping\x12\x11\n\tkeyDpadUp\x18\x01 \x01(\r\x12\x13\n\x0bkeyDpadDown\x18\x02 \x01(\r\x12\x13\n\x0bkeyDpadLeft\x18\x03 \x01(\r\x12\x14\n\x0ckeyDpadRight\x18\x04 \x01(\r\x12\x13\n\x0bkeyButtonB1\x18\x05 \x01(\r\x12\x13\n\x0bkeyButtonB2\x18\x06 \x01(\r\x12\x13\n\x0bkeyButtonB3\x18\x07 \x01(\r\x12\x13\n\x0bkeyButtonB4\x18\x08 \x01(\r\x12\x13\n\x0bkeyButtonL1\x18\t \x01(\r\x12\x13\n\x0bkeyButtonR1\x18\n \x01(\r\x12\x13\n\x0bkeyButtonL2\x18\x0b \x01(\r\x12\x13\n\x0bkeyButtonR2\x18\x0c \x01(\r\x12\x13\n\x0bkeyButtonS1\x18\r \x01(\r\x12\x13\n\x0bkeyButtonS2\x18\x0e \x01(\r\x12\x13\n\x0bkeyButtonL3\x18\x0f \x01(\r\x12\x13\n\x0bkeyButtonR3\x18\x10 \x01(\r\x12\x13\n\x0bkeyButtonA1\x18\x11 \x01(\r\x12\x13\n\x0bkeyButtonA2\x18\x12 \x01(\r\x12\x13\n\x0bkeyButtonA3\x18\x13 \x01(\r\x12\x13\n\x0bkeyButtonA4\x18\x14 \x01(\r\x12\x13\n\x0bkeyButtonE1\x18\x15 \x01(\r\x12\x13\n\x0bkeyButtonE2\x18\x16 \x01(\r\x12\x13\n\x0bkeyButtonE3\x18\x17 \x01(\r\x12\x13\n\x0bkeyButtonE4\x18\x18 \x01(\r\x12\x13\n\x0bkeyButtonE5\x18\x19 \x01(\r\x12\x13\n\x0bkeyButtonE6\x18\x1a \x01(\r\x12\x13\n\x0bkeyButtonE7\x18\x1b \x01(\r\x12\x13\n\x0bkeyButtonE8\x18\x1c \x01(\r\x12\x13\n\x0bkeyButtonE9\x18\x1d \x01(\r\x12\x14\n\x0ckeyButtonE10\x18\x1e \x01(\r\x12\x14\n\x0ckeyButtonE11\x18\x1f \x01(\r\x12\x14\n\x0ckeyButtonE12\x18 \x01(\r\"e\n\x0bHotkeyEntry\x12\x10\n\x08\x64padMask\x18\x01 \x01(\r\x12\x1e\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\x0e.GamepadHotkey\x12\x13\n\x0b\x62uttonsMask\x18\x03 \x01(\r\x12\x0f\n\x07\x61uxMask\x18\x04 \x01(\r\"\x8f\x04\n\rHotkeyOptions\x12\x1e\n\x08hotkey01\x18\x01 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey02\x18\x02 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey03\x18\x03 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey04\x18\x04 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey05\x18\x05 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey06\x18\x06 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey07\x18\x07 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey08\x18\x08 \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey09\x18\t \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey10\x18\n \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey11\x18\x0b \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey12\x18\x0c \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey13\x18\r \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey14\x18\x0e \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey15\x18\x0f \x01(\x0b\x32\x0c.HotkeyEntry\x12\x1e\n\x08hotkey16\x18\x10 \x01(\x0b\x32\x0c.HotkeyEntry\"\xf1\x03\n\x11PeripheralOptions\x12\x30\n\tblockI2C0\x18\x01 \x01(\x0b\x32\x1d.PeripheralOptions.I2COptions\x12\x30\n\tblockI2C1\x18\x02 \x01(\x0b\x32\x1d.PeripheralOptions.I2COptions\x12\x30\n\tblockSPI0\x18\x03 \x01(\x0b\x32\x1d.PeripheralOptions.SPIOptions\x12\x30\n\tblockSPI1\x18\x04 \x01(\x0b\x32\x1d.PeripheralOptions.SPIOptions\x12\x30\n\tblockUSB0\x18\x05 \x01(\x0b\x32\x1d.PeripheralOptions.USBOptions\x1a\x46\n\nI2COptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03sda\x18\x02 \x01(\x05\x12\x0b\n\x03scl\x18\x03 \x01(\x05\x12\r\n\x05speed\x18\x04 \x01(\r\x1aN\n\nSPIOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\n\n\x02rx\x18\x02 \x01(\x05\x12\n\n\x02\x63s\x18\x03 \x01(\x05\x12\x0b\n\x03sck\x18\x04 \x01(\x05\x12\n\n\x02tx\x18\x05 \x01(\x05\x1aJ\n\nUSBOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\n\n\x02\x64p\x18\x02 \x01(\x05\x12\x10\n\x08\x65nable5v\x18\x03 \x01(\x05\x12\r\n\x05order\x18\x04 \x01(\r\"4\n\x12\x46orcedSetupOptions\x12\x1e\n\x04mode\x18\x01 \x01(\x0e\x32\x10.ForcedSetupMode\"g\n\x18\x42uttonLayoutParamsCommon\x12\x0e\n\x06startX\x18\x01 \x01(\x05\x12\x0e\n\x06startY\x18\x02 \x01(\x05\x12\x14\n\x0c\x62uttonRadius\x18\x03 \x01(\x05\x12\x15\n\rbuttonPadding\x18\x04 \x01(\x05\"b\n\x16\x42uttonLayoutParamsLeft\x12\x1d\n\x06layout\x18\x01 \x01(\x0e\x32\r.ButtonLayout\x12)\n\x06\x63ommon\x18\x02 \x01(\x0b\x32\x19.ButtonLayoutParamsCommon\"h\n\x17\x42uttonLayoutParamsRight\x12\"\n\x06layout\x18\x01 \x01(\x0e\x32\x12.ButtonLayoutRight\x12)\n\x06\x63ommon\x18\x02 \x01(\x0b\x32\x19.ButtonLayoutParamsCommon\"w\n\x19\x42uttonLayoutCustomOptions\x12+\n\nparamsLeft\x18\x01 \x01(\x0b\x32\x17.ButtonLayoutParamsLeft\x12-\n\x0bparamsRight\x18\x02 \x01(\x0b\x32\x18.ButtonLayoutParamsRight\"\x9b\x03\n\x0bPinMappings\x12\x11\n\tpinDpadUp\x18\x01 \x01(\x05\x12\x13\n\x0bpinDpadDown\x18\x02 \x01(\x05\x12\x13\n\x0bpinDpadLeft\x18\x03 \x01(\x05\x12\x14\n\x0cpinDpadRight\x18\x04 \x01(\x05\x12\x13\n\x0bpinButtonB1\x18\x05 \x01(\x05\x12\x13\n\x0bpinButtonB2\x18\x06 \x01(\x05\x12\x13\n\x0bpinButtonB3\x18\x07 \x01(\x05\x12\x13\n\x0bpinButtonB4\x18\x08 \x01(\x05\x12\x13\n\x0bpinButtonL1\x18\t \x01(\x05\x12\x13\n\x0bpinButtonR1\x18\n \x01(\x05\x12\x13\n\x0bpinButtonL2\x18\x0b \x01(\x05\x12\x13\n\x0bpinButtonR2\x18\x0c \x01(\x05\x12\x13\n\x0bpinButtonS1\x18\r \x01(\x05\x12\x13\n\x0bpinButtonS2\x18\x0e \x01(\x05\x12\x13\n\x0bpinButtonL3\x18\x0f \x01(\x05\x12\x13\n\x0bpinButtonR3\x18\x10 \x01(\x05\x12\x13\n\x0bpinButtonA1\x18\x11 \x01(\x05\x12\x13\n\x0bpinButtonA2\x18\x12 \x01(\x05\x12\x13\n\x0bpinButtonFn\x18\x13 \x01(\x05\"\x83\x01\n\x0fGpioMappingInfo\x12\x1b\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x0b.GpioAction\x12!\n\tdirection\x18\x02 \x01(\x0e\x32\x0e.GpioDirection\x12\x16\n\x0e\x63ustomDpadMask\x18\x03 \x01(\r\x12\x18\n\x10\x63ustomButtonMask\x18\x04 \x01(\r\"j\n\x0cGpioMappings\x12%\n\x04pins\x18\x01 \x03(\x0b\x32\x10.GpioMappingInfoB\x05\x92?\x02\x10\x1e\x12\x1b\n\x0cprofileLabel\x18\x02 \x01(\tB\x05\x92?\x02p\x10\x12\x16\n\x07\x65nabled\x18\x03 \x01(\x08:\x05\x66\x61lse\"\x93\x02\n\x16\x41lternativePinMappings\x12\x13\n\x0bpinButtonB1\x18\x01 \x01(\x05\x12\x13\n\x0bpinButtonB2\x18\x02 \x01(\x05\x12\x13\n\x0bpinButtonB3\x18\x03 \x01(\x05\x12\x13\n\x0bpinButtonB4\x18\x04 \x01(\x05\x12\x13\n\x0bpinButtonL1\x18\x05 \x01(\x05\x12\x13\n\x0bpinButtonR1\x18\x06 \x01(\x05\x12\x13\n\x0bpinButtonL2\x18\x07 \x01(\x05\x12\x13\n\x0bpinButtonR2\x18\x08 \x01(\x05\x12\x11\n\tpinDpadUp\x18\t \x01(\x05\x12\x13\n\x0bpinDpadDown\x18\n \x01(\x05\x12\x13\n\x0bpinDpadLeft\x18\x0b \x01(\x05\x12\x14\n\x0cpinDpadRight\x18\x0c \x01(\x05\"\x8c\x01\n\x0eProfileOptions\x12J\n deprecatedAlternativePinMappings\x18\x01 \x03(\x0b\x32\x17.AlternativePinMappingsB\x07\x18\x01\x92?\x02\x10\x03\x12.\n\x10gpioMappingsSets\x18\x02 \x03(\x0b\x32\r.GpioMappingsB\x05\x92?\x02\x10\x03\"\xba\x04\n\x0e\x44isplayOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x12\x64\x65precatedI2cBlock\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSDAPin\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSCLPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12 \n\x14\x64\x65precatedI2cAddress\x18\x05 \x01(\x05\x42\x02\x18\x01\x12\x1e\n\x12\x64\x65precatedI2cSpeed\x18\x06 \x01(\x05\x42\x02\x18\x01\x12#\n\x0c\x62uttonLayout\x18\x07 \x01(\x0e\x32\r.ButtonLayout\x12-\n\x11\x62uttonLayoutRight\x18\x08 \x01(\x0e\x32\x12.ButtonLayoutRight\x12=\n\x19\x62uttonLayoutCustomOptions\x18\t \x01(\x0b\x32\x1a.ButtonLayoutCustomOptions\x12\x1f\n\nsplashMode\x18\n \x01(\x0e\x32\x0b.SplashMode\x12#\n\x0csplashChoice\x18\x0b \x01(\x0e\x32\r.SplashChoice\x12\x16\n\x0esplashDuration\x18\x0c \x01(\x05\x12\x1b\n\x0bsplashImage\x18\r \x01(\x0c\x42\x06\x92?\x03\x08\x80\x08\x12\x0c\n\x04size\x18\x0e \x01(\x05\x12\x0c\n\x04\x66lip\x18\x0f \x01(\x05\x12\x0e\n\x06invert\x18\x10 \x01(\x08\x12\x1b\n\x13\x64isplaySaverTimeout\x18\x11 \x01(\x05\x12\x1c\n\x14turnOffWhenSuspended\x18\x12 \x01(\x08\"\xce\x05\n\nLEDOptions\x12\x0f\n\x07\x64\x61taPin\x18\x01 \x01(\x05\x12#\n\tledFormat\x18\x02 \x01(\x0e\x32\x10.LEDFormat_Proto\x12 \n\tledLayout\x18\x03 \x01(\x0e\x32\r.ButtonLayout\x12\x15\n\rledsPerButton\x18\x04 \x01(\r\x12\x19\n\x11\x62rightnessMaximum\x18\x05 \x01(\r\x12\x17\n\x0f\x62rightnessSteps\x18\x06 \x01(\r\x12\x0f\n\x07indexUp\x18\x07 \x01(\x05\x12\x11\n\tindexDown\x18\x08 \x01(\x05\x12\x11\n\tindexLeft\x18\t \x01(\x05\x12\x12\n\nindexRight\x18\n \x01(\x05\x12\x0f\n\x07indexB1\x18\x0b \x01(\x05\x12\x0f\n\x07indexB2\x18\x0c \x01(\x05\x12\x0f\n\x07indexB3\x18\r \x01(\x05\x12\x0f\n\x07indexB4\x18\x0e \x01(\x05\x12\x0f\n\x07indexL1\x18\x0f \x01(\x05\x12\x0f\n\x07indexR1\x18\x10 \x01(\x05\x12\x0f\n\x07indexL2\x18\x11 \x01(\x05\x12\x0f\n\x07indexR2\x18\x12 \x01(\x05\x12\x0f\n\x07indexS1\x18\x13 \x01(\x05\x12\x0f\n\x07indexS2\x18\x14 \x01(\x05\x12\x0f\n\x07indexL3\x18\x15 \x01(\x05\x12\x0f\n\x07indexR3\x18\x16 \x01(\x05\x12\x0f\n\x07indexA1\x18\x17 \x01(\x05\x12\x0f\n\x07indexA2\x18\x18 \x01(\x05\x12\x1b\n\x08pledType\x18\x19 \x01(\x0e\x32\t.PLEDType\x12\x10\n\x08pledPin1\x18\x1a \x01(\x05\x12\x10\n\x08pledPin2\x18\x1b \x01(\x05\x12\x10\n\x08pledPin3\x18\x1c \x01(\x05\x12\x10\n\x08pledPin4\x18\x1d \x01(\x05\x12\x11\n\tpledColor\x18\x1e \x01(\r\x12\x1c\n\x14turnOffWhenSuspended\x18\x1f \x01(\x08\x12\x12\n\npledIndex1\x18 \x01(\x05\x12\x12\n\npledIndex2\x18! \x01(\x05\x12\x12\n\npledIndex3\x18\" \x01(\x05\x12\x12\n\npledIndex4\x18# \x01(\x05\"\xcc\t\n\x16\x41nimationOptions_Proto\x12\x1a\n\x12\x62\x61seAnimationIndex\x18\x01 \x01(\r\x12\x12\n\nbrightness\x18\x02 \x01(\r\x12\x18\n\x10staticColorIndex\x18\x03 \x01(\r\x12\x18\n\x10\x62uttonColorIndex\x18\x04 \x01(\r\x12\x16\n\x0e\x63haseCycleTime\x18\x05 \x01(\x05\x12\x18\n\x10rainbowCycleTime\x18\x06 \x01(\x05\x12\x12\n\nthemeIndex\x18\x07 \x01(\r\x12\x16\n\x0ehasCustomTheme\x18\x08 \x01(\x08\x12\x15\n\rcustomThemeUp\x18\t \x01(\r\x12\x17\n\x0f\x63ustomThemeDown\x18\n \x01(\r\x12\x17\n\x0f\x63ustomThemeLeft\x18\x0b \x01(\r\x12\x18\n\x10\x63ustomThemeRight\x18\x0c \x01(\r\x12\x15\n\rcustomThemeB1\x18\r \x01(\r\x12\x15\n\rcustomThemeB2\x18\x0e \x01(\r\x12\x15\n\rcustomThemeB3\x18\x0f \x01(\r\x12\x15\n\rcustomThemeB4\x18\x10 \x01(\r\x12\x15\n\rcustomThemeL1\x18\x11 \x01(\r\x12\x15\n\rcustomThemeR1\x18\x12 \x01(\r\x12\x15\n\rcustomThemeL2\x18\x13 \x01(\r\x12\x15\n\rcustomThemeR2\x18\x14 \x01(\r\x12\x15\n\rcustomThemeS1\x18\x15 \x01(\r\x12\x15\n\rcustomThemeS2\x18\x16 \x01(\r\x12\x15\n\rcustomThemeL3\x18\x17 \x01(\r\x12\x15\n\rcustomThemeR3\x18\x18 \x01(\r\x12\x15\n\rcustomThemeA1\x18\x19 \x01(\r\x12\x15\n\rcustomThemeA2\x18\x1a \x01(\r\x12\x1c\n\x14\x63ustomThemeUpPressed\x18\x1b \x01(\r\x12\x1e\n\x16\x63ustomThemeDownPressed\x18\x1c \x01(\r\x12\x1e\n\x16\x63ustomThemeLeftPressed\x18\x1d \x01(\r\x12\x1f\n\x17\x63ustomThemeRightPressed\x18\x1e \x01(\r\x12\x1c\n\x14\x63ustomThemeB1Pressed\x18\x1f \x01(\r\x12\x1c\n\x14\x63ustomThemeB2Pressed\x18 \x01(\r\x12\x1c\n\x14\x63ustomThemeB3Pressed\x18! \x01(\r\x12\x1c\n\x14\x63ustomThemeB4Pressed\x18\" \x01(\r\x12\x1c\n\x14\x63ustomThemeL1Pressed\x18# \x01(\r\x12\x1c\n\x14\x63ustomThemeR1Pressed\x18$ \x01(\r\x12\x1c\n\x14\x63ustomThemeL2Pressed\x18% \x01(\r\x12\x1c\n\x14\x63ustomThemeR2Pressed\x18& \x01(\r\x12\x1c\n\x14\x63ustomThemeS1Pressed\x18\' \x01(\r\x12\x1c\n\x14\x63ustomThemeS2Pressed\x18( \x01(\r\x12\x1c\n\x14\x63ustomThemeL3Pressed\x18) \x01(\r\x12\x1c\n\x14\x63ustomThemeR3Pressed\x18* \x01(\r\x12\x1c\n\x14\x63ustomThemeA1Pressed\x18+ \x01(\r\x12\x1c\n\x14\x63ustomThemeA2Pressed\x18, \x01(\r\x12(\n buttonPressColorCooldownTimeInMs\x18- \x01(\r\":\n\x14\x42ootselButtonOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\tbuttonMap\x18\x02 \x01(\r\"C\n\x11OnBoardLedOptions\x12\x1d\n\x04mode\x18\x01 \x01(\x0e\x32\x0f.OnBoardLedMode\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"\xc2\x03\n\rAnalogOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0e\x61nalogAdc1PinX\x18\x02 \x01(\x05\x12\x16\n\x0e\x61nalogAdc1PinY\x18\x03 \x01(\x05\x12\x1a\n\x12\x66orced_circularity\x18\x04 \x01(\x08\x12\x16\n\x0einner_deadzone\x18\x05 \x01(\r\x12\x16\n\x0e\x61nalogAdc2PinX\x18\x06 \x01(\x05\x12\x16\n\x0e\x61nalogAdc2PinY\x18\x07 \x01(\x05\x12!\n\x0e\x61nalogAdc1Mode\x18\x08 \x01(\x0e\x32\t.DpadMode\x12!\n\x0e\x61nalogAdc2Mode\x18\t \x01(\x0e\x32\t.DpadMode\x12%\n\x10\x61nalogAdc1Invert\x18\n \x01(\x0e\x32\x0b.InvertMode\x12%\n\x10\x61nalogAdc2Invert\x18\x0b \x01(\x0e\x32\x0b.InvertMode\x12\x16\n\x0e\x61uto_calibrate\x18\x0c \x01(\x08\x12\x16\n\x0eouter_deadzone\x18\r \x01(\r\x12\x18\n\x10\x61nalog_smoothing\x18\x0e \x01(\x08\x12\x18\n\x10smoothing_factor\x18\x0f \x01(\x02\x12\x14\n\x0c\x61nalog_error\x18\x10 \x01(\r\"\xcc\x03\n\x0cTurboOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1f\n\x13\x64\x65precatedButtonPin\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x0e\n\x06ledPin\x18\x03 \x01(\x05\x12\x11\n\tshotCount\x18\x04 \x01(\r\x12\x14\n\x0cshmupDialPin\x18\x05 \x01(\x05\x12\x18\n\x10shmupModeEnabled\x18\x06 \x01(\x08\x12\x16\n\x0eshmupAlwaysOn1\x18\x07 \x01(\r\x12\x16\n\x0eshmupAlwaysOn2\x18\x08 \x01(\r\x12\x16\n\x0eshmupAlwaysOn3\x18\t \x01(\r\x12\x16\n\x0eshmupAlwaysOn4\x18\n \x01(\r\x12\x14\n\x0cshmupBtn1Pin\x18\x0b \x01(\x05\x12\x14\n\x0cshmupBtn2Pin\x18\x0c \x01(\x05\x12\x14\n\x0cshmupBtn3Pin\x18\r \x01(\x05\x12\x14\n\x0cshmupBtn4Pin\x18\x0e \x01(\x05\x12\x15\n\rshmupBtnMask1\x18\x0f \x01(\r\x12\x15\n\rshmupBtnMask2\x18\x10 \x01(\r\x12\x15\n\rshmupBtnMask3\x18\x11 \x01(\r\x12\x15\n\rshmupBtnMask4\x18\x12 \x01(\r\x12#\n\x0cshmupMixMode\x18\x13 \x01(\x0e\x32\r.ShmupMixMode\"\xe6\x01\n\rSliderOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\"\n\x16\x64\x65precatedPinSliderOne\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\"\n\x16\x64\x65precatedPinSliderTwo\x18\x03 \x01(\x05\x42\x02\x18\x01\x12(\n\x11\x64\x65precatedModeOne\x18\x04 \x01(\x0e\x32\t.DpadModeB\x02\x18\x01\x12(\n\x11\x64\x65precatedModeTwo\x18\x05 \x01(\x0e\x32\t.DpadModeB\x02\x18\x01\x12(\n\x15\x64\x65precatedModeDefault\x18\x06 \x01(\x0e\x32\t.DpadMode\"\xd4\x01\n\x11SOCDSliderOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1c\n\x10\x64\x65precatedPinOne\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1c\n\x10\x64\x65precatedPinTwo\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1e\n\x0bmodeDefault\x18\x04 \x01(\x0e\x32\t.SOCDMode\x12(\n\x11\x64\x65precatedModeOne\x18\x05 \x01(\x0e\x32\t.SOCDModeB\x02\x18\x01\x12(\n\x11\x64\x65precatedModeTwo\x18\x06 \x01(\x0e\x32\t.SOCDModeB\x02\x18\x01\"\x93\x01\n\x0eReverseOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x11\n\tbuttonPin\x18\x02 \x01(\x05\x12\x0e\n\x06ledPin\x18\x03 \x01(\x05\x12\x10\n\x08\x61\x63tionUp\x18\x04 \x01(\r\x12\x12\n\nactionDown\x18\x05 \x01(\r\x12\x12\n\nactionLeft\x18\x06 \x01(\r\x12\x13\n\x0b\x61\x63tionRight\x18\x07 \x01(\r\"\xcb\x01\n\x14\x41nalogADS1219Options\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x12\x64\x65precatedI2cBlock\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSDAPin\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSCLPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12 \n\x14\x64\x65precatedI2cAddress\x18\x05 \x01(\x05\x42\x02\x18\x01\x12\x1e\n\x12\x64\x65precatedI2cSpeed\x18\x06 \x01(\x05\x42\x02\x18\x01\"\x7f\n\x14\x41nalogADS1256Options\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x10\n\x08spiBlock\x18\x02 \x01(\x05\x12\r\n\x05\x63sPin\x18\x03 \x01(\x05\x12\x0f\n\x07\x64rdyPin\x18\x04 \x01(\x05\x12\x0c\n\x04\x61vdd\x18\x05 \x01(\x02\x12\x16\n\x0e\x65nableTriggers\x18\x06 \x01(\x08\"\x8c\x02\n\x16\x44ualDirectionalOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\x0f\x64\x65precatedUpPin\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1d\n\x11\x64\x65precatedDownPin\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1d\n\x11\x64\x65precatedLeftPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x1e\n\x12\x64\x65precatedRightPin\x18\x05 \x01(\x05\x42\x02\x18\x01\x12\x1b\n\x08\x64padMode\x18\x06 \x01(\x0e\x32\t.DpadMode\x12\x34\n\x0b\x63ombineMode\x18\x07 \x01(\x0e\x32\x1f.DualDirectionalCombinationMode\x12\x13\n\x0b\x66ourWayMode\x18\x08 \x01(\x08\"\xd8\x04\n\x0bTiltOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x10\n\x08tilt1Pin\x18\x02 \x01(\x05\x12\x10\n\x08tilt2Pin\x18\x03 \x01(\x05\x12%\n\x19\x64\x65precatedTiltFunctionPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x1b\n\x13tiltLeftAnalogUpPin\x18\x05 \x01(\x05\x12\x1d\n\x15tiltLeftAnalogDownPin\x18\x06 \x01(\x05\x12\x1d\n\x15tiltLeftAnalogLeftPin\x18\x07 \x01(\x05\x12\x1e\n\x16tiltLeftAnalogRightPin\x18\x08 \x01(\x05\x12\x1c\n\x14tiltRightAnalogUpPin\x18\t \x01(\x05\x12\x1e\n\x16tiltRightAnalogDownPin\x18\n \x01(\x05\x12\x1e\n\x16tiltRightAnalogLeftPin\x18\x0b \x01(\x05\x12\x1f\n\x17tiltRightAnalogRightPin\x18\x0c \x01(\x05\x12\x1f\n\x0ctiltSOCDMode\x18\r \x01(\x0e\x32\t.SOCDMode\x12\x18\n\x10\x66\x61\x63torTilt1LeftX\x18\x0e \x01(\x05\x12\x18\n\x10\x66\x61\x63torTilt1LeftY\x18\x0f \x01(\x05\x12\x19\n\x11\x66\x61\x63torTilt1RightX\x18\x10 \x01(\x05\x12\x19\n\x11\x66\x61\x63torTilt1RightY\x18\x11 \x01(\x05\x12\x18\n\x10\x66\x61\x63torTilt2LeftX\x18\x12 \x01(\x05\x12\x18\n\x10\x66\x61\x63torTilt2LeftY\x18\x13 \x01(\x05\x12\x19\n\x11\x66\x61\x63torTilt2RightX\x18\x14 \x01(\x05\x12\x19\n\x11\x66\x61\x63torTilt2RightY\x18\x15 \x01(\x05\"P\n\rBuzzerOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x0e\n\x06volume\x18\x03 \x01(\r\x12\x11\n\tenablePin\x18\x04 \x01(\x05\"E\n\x12\x45xtraButtonOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x11\n\tbuttonMap\x18\x03 \x01(\r\"6\n\x13PlayerNumberOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0e\n\x06number\x18\x02 \x01(\r\"\x98\x02\n\nPS4Options\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x15\n\x06serial\x18\x02 \x01(\x0c\x42\x05\x92?\x02\x08\x10\x12\x19\n\tsignature\x18\x03 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x02\x12\x14\n\x04rsaN\x18\x04 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x02\x12\x13\n\x04rsaE\x18\x05 \x01(\x0c\x42\x05\x92?\x02\x08\x04\x12\x14\n\x04rsaD\x18\x06 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x02\x12\x14\n\x04rsaP\x18\x07 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x14\n\x04rsaQ\x18\x08 \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x15\n\x05rsaDP\x18\t \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x15\n\x05rsaDQ\x18\n \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x15\n\x05rsaQP\x18\x0b \x01(\x0c\x42\x06\x92?\x03\x08\x80\x01\x12\x15\n\x05rsaRN\x18\x0c \x01(\x0c\x42\x06\x92?\x03\x08\x80\x02\"h\n\x14PSPassthroughOptions\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\x12\x1e\n\x12\x64\x65precatedPinDplus\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1b\n\x0f\x64\x65precatedPin5V\x18\x03 \x01(\x05\x42\x02\x18\x01\".\n\x17XBOnePassthroughOptions\x12\x13\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x02\x18\x01\"\x83\x12\n\nWiiOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x12\x64\x65precatedI2cBlock\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSDAPin\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x1f\n\x13\x64\x65precatedI2cSCLPin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x1e\n\x12\x64\x65precatedI2cSpeed\x18\x05 \x01(\x05\x42\x02\x18\x01\x12\x32\n\x0b\x63ontrollers\x18\x06 \x01(\x0b\x32\x1d.WiiOptions.ControllerOptions\x1a\x42\n\nAnalogAxis\x12\x10\n\x08\x61xisType\x18\x01 \x01(\x05\x12\x10\n\x08minRange\x18\x02 \x01(\x05\x12\x10\n\x08maxRange\x18\x03 \x01(\x05\x1aT\n\x0cStickOptions\x12!\n\x01x\x18\x01 \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12!\n\x01y\x18\x02 \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x1a[\n\x0eNunchukOptions\x12\x0f\n\x07\x62uttonC\x18\x01 \x01(\x05\x12\x0f\n\x07\x62uttonZ\x18\x02 \x01(\x05\x12\'\n\x05stick\x18\x03 \x01(\x0b\x32\x18.WiiOptions.StickOptions\x1a\xdc\x03\n\x0e\x43lassicOptions\x12\x0f\n\x07\x62uttonA\x18\x01 \x01(\x05\x12\x0f\n\x07\x62uttonB\x18\x02 \x01(\x05\x12\x0f\n\x07\x62uttonX\x18\x03 \x01(\x05\x12\x0f\n\x07\x62uttonY\x18\x04 \x01(\x05\x12\x0f\n\x07\x62uttonL\x18\x05 \x01(\x05\x12\x10\n\x08\x62uttonZL\x18\x06 \x01(\x05\x12\x0f\n\x07\x62uttonR\x18\x07 \x01(\x05\x12\x10\n\x08\x62uttonZR\x18\x08 \x01(\x05\x12\x13\n\x0b\x62uttonMinus\x18\t \x01(\x05\x12\x12\n\nbuttonPlus\x18\n \x01(\x05\x12\x12\n\nbuttonHome\x18\x0b \x01(\x05\x12\x10\n\x08\x62uttonUp\x18\x0c \x01(\x05\x12\x12\n\nbuttonDown\x18\r \x01(\x05\x12\x12\n\nbuttonLeft\x18\x0e \x01(\x05\x12\x13\n\x0b\x62uttonRight\x18\x0f \x01(\x05\x12,\n\nrightStick\x18\x11 \x01(\x0b\x32\x18.WiiOptions.StickOptions\x12+\n\tleftStick\x18\x10 \x01(\x0b\x32\x18.WiiOptions.StickOptions\x12+\n\x0bleftTrigger\x18\x12 \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12,\n\x0crightTrigger\x18\x13 \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x1al\n\x0cTaikoOptions\x12\x15\n\rbuttonKatLeft\x18\x01 \x01(\x05\x12\x16\n\x0e\x62uttonKatRight\x18\x02 \x01(\x05\x12\x15\n\rbuttonDonLeft\x18\x03 \x01(\x05\x12\x16\n\x0e\x62uttonDonRight\x18\x04 \x01(\x05\x1a\xad\x02\n\rGuitarOptions\x12\x11\n\tbuttonRed\x18\x01 \x01(\x05\x12\x13\n\x0b\x62uttonGreen\x18\x02 \x01(\x05\x12\x14\n\x0c\x62uttonYellow\x18\x03 \x01(\x05\x12\x12\n\nbuttonBlue\x18\x04 \x01(\x05\x12\x14\n\x0c\x62uttonOrange\x18\x05 \x01(\x05\x12\x13\n\x0b\x62uttonPedal\x18\x06 \x01(\x05\x12\x13\n\x0b\x62uttonMinus\x18\x07 \x01(\x05\x12\x12\n\nbuttonPlus\x18\x08 \x01(\x05\x12\x0f\n\x07strumUp\x18\t \x01(\x05\x12\x11\n\tstrumDown\x18\n \x01(\x05\x12\'\n\x05stick\x18\x0b \x01(\x0b\x32\x18.WiiOptions.StickOptions\x12)\n\twhammyBar\x18\x0c \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x1a\xdc\x01\n\x0b\x44rumOptions\x12\x11\n\tbuttonRed\x18\x01 \x01(\x05\x12\x13\n\x0b\x62uttonGreen\x18\x02 \x01(\x05\x12\x14\n\x0c\x62uttonYellow\x18\x03 \x01(\x05\x12\x12\n\nbuttonBlue\x18\x04 \x01(\x05\x12\x14\n\x0c\x62uttonOrange\x18\x05 \x01(\x05\x12\x13\n\x0b\x62uttonPedal\x18\x06 \x01(\x05\x12\x13\n\x0b\x62uttonMinus\x18\x07 \x01(\x05\x12\x12\n\nbuttonPlus\x18\x08 \x01(\x05\x12\'\n\x05stick\x18\t \x01(\x0b\x32\x18.WiiOptions.StickOptions\x1a\xbe\x03\n\x10TurntableOptions\x12\x15\n\rbuttonLeftRed\x18\x01 \x01(\x05\x12\x17\n\x0f\x62uttonLeftGreen\x18\x02 \x01(\x05\x12\x16\n\x0e\x62uttonLeftBlue\x18\x03 \x01(\x05\x12\x16\n\x0e\x62uttonRightRed\x18\x04 \x01(\x05\x12\x18\n\x10\x62uttonRightGreen\x18\x05 \x01(\x05\x12\x17\n\x0f\x62uttonRightBlue\x18\x06 \x01(\x05\x12\x13\n\x0b\x62uttonMinus\x18\x07 \x01(\x05\x12\x12\n\nbuttonPlus\x18\x08 \x01(\x05\x12\x16\n\x0e\x62uttonEuphoria\x18\t \x01(\x05\x12\'\n\x05stick\x18\n \x01(\x0b\x32\x18.WiiOptions.StickOptions\x12-\n\rleftTurntable\x18\x0b \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12.\n\x0erightTurntable\x18\x0c \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12\'\n\x07\x65\x66\x66\x65\x63ts\x18\r \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x12%\n\x05\x66\x61\x64\x65r\x18\x0e \x01(\x0b\x32\x16.WiiOptions.AnalogAxis\x1a\x99\x02\n\x11\x43ontrollerOptions\x12+\n\x07nunchuk\x18\x01 \x01(\x0b\x32\x1a.WiiOptions.NunchukOptions\x12+\n\x07\x63lassic\x18\x02 \x01(\x0b\x32\x1a.WiiOptions.ClassicOptions\x12\'\n\x05taiko\x18\x03 \x01(\x0b\x32\x18.WiiOptions.TaikoOptions\x12)\n\x06guitar\x18\x04 \x01(\x0b\x32\x19.WiiOptions.GuitarOptions\x12%\n\x04\x64rum\x18\x05 \x01(\x0b\x32\x17.WiiOptions.DrumOptions\x12/\n\tturntable\x18\x06 \x01(\x0b\x32\x1c.WiiOptions.TurntableOptions\"S\n\x0bSNESOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x10\n\x08\x63lockPin\x18\x02 \x01(\x05\x12\x10\n\x08latchPin\x18\x03 \x01(\x05\x12\x0f\n\x07\x64\x61taPin\x18\x04 \x01(\x05\"\xc2\x01\n\x13KeyboardHostOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x12\x64\x65precatedPinDplus\x18\x02 \x01(\x05\x42\x02\x18\x01\x12!\n\x07mapping\x18\x03 \x01(\x0b\x32\x10.KeyboardMapping\x12\x1b\n\x0f\x64\x65precatedPin5V\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\x11\n\tmouseLeft\x18\x05 \x01(\r\x12\x13\n\x0bmouseMiddle\x18\x06 \x01(\r\x12\x12\n\nmouseRight\x18\x07 \x01(\r\"\xae\x01\n\x10\x46ocusModeOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x16\n\x0e\x62uttonLockMask\x18\x03 \x01(\x05\x12\x17\n\x0foledLockEnabled\x18\x04 \x01(\x08\x12\x16\n\x0ergbLockEnabled\x18\x05 \x01(\x08\x12\x19\n\x11\x62uttonLockEnabled\x18\x06 \x01(\x08\x12\x18\n\x10macroLockEnabled\x18\x07 \x01(\x08\"K\n\nMacroInput\x12\x12\n\nbuttonMask\x18\x01 \x01(\r\x12\x10\n\x08\x64uration\x18\x02 \x01(\r\x12\x17\n\x0cwaitDuration\x18\x03 \x01(\r:\x01\x30\"\xae\x02\n\x05Macro\x12\x1d\n\tmacroType\x18\x01 \x01(\x0e\x32\n.MacroType\x12\x19\n\nmacroLabel\x18\x02 \x01(\tB\x05\x92?\x02p@\x12\'\n\x0bmacroInputs\x18\x03 \x03(\x0b\x32\x0b.MacroInputB\x05\x92?\x02\x10\x1e\x12\x0f\n\x07\x65nabled\x18\x04 \x01(\x08\x12\x1d\n\x15useMacroTriggerButton\x18\x05 \x01(\x08\x12%\n\x19\x64\x65precatedMacroTriggerPin\x18\x06 \x01(\x05\x42\x02\x18\x01\x12\x1a\n\x12macroTriggerButton\x18\x07 \x01(\r\x12\x17\n\texclusive\x18\x08 \x01(\x08:\x04true\x12\x1b\n\rinterruptible\x18\t \x01(\x08:\x04true\x12\x19\n\nshowFrames\x18\n \x01(\x08:\x05\x66\x61lse\"z\n\x0cMacroOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x19\n\rdeprecatedPin\x18\x02 \x01(\x05\x42\x02\x18\x01\x12 \n\tmacroList\x18\x03 \x03(\x0b\x32\x06.MacroB\x05\x92?\x02\x10\x06\x12\x1c\n\x14macroBoardLedEnabled\x18\x04 \x01(\x08\"P\n\x13InputHistoryOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0e\n\x06length\x18\x02 \x01(\r\x12\x0b\n\x03\x63ol\x18\x03 \x01(\r\x12\x0b\n\x03row\x18\x04 \x01(\r\"\xc2\x01\n\x10RotaryPinOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0c\n\x04pinA\x18\x02 \x01(\x05\x12\x0c\n\x04pinB\x18\x03 \x01(\x05\x12#\n\x04mode\x18\x04 \x01(\x0e\x32\x15.RotaryEncoderPinMode\x12\x1b\n\x13pulsesPerRevolution\x18\x05 \x01(\r\x12\x12\n\nresetAfter\x18\x06 \x01(\r\x12\x17\n\x0f\x61llowWrapAround\x18\x07 \x01(\x08\x12\x12\n\nmultiplier\x18\x08 \x01(\x02\"n\n\rRotaryOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12%\n\nencoderOne\x18\x02 \x01(\x0b\x32\x11.RotaryPinOptions\x12%\n\nencoderTwo\x18\x03 \x01(\x0b\x32\x11.RotaryPinOptions\"h\n\x0ePCF8575Options\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x12\x64\x65precatedI2cBlock\x18\x02 \x01(\x05\x42\x02\x18\x01\x12%\n\x04pins\x18\x03 \x03(\x0b\x32\x10.GpioMappingInfoB\x05\x92?\x02\x10\x10\"\xa3\x01\n\x14\x44RV8833RumbleOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x14\n\x0cleftMotorPin\x18\x02 \x01(\x05\x12\x15\n\rrightMotorPin\x18\x03 \x01(\x05\x12\x15\n\rmotorSleepPin\x18\x04 \x01(\x05\x12\x14\n\x0cpwmFrequency\x18\x05 \x01(\r\x12\x0f\n\x07\x64utyMin\x18\x06 \x01(\x02\x12\x0f\n\x07\x64utyMax\x18\x07 \x01(\x02\"\x81\x01\n\x0fReactiveLEDInfo\x12\x0b\n\x03pin\x18\x01 \x01(\x05\x12\x1b\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\x0b.GpioAction\x12\"\n\x08modeDown\x18\x03 \x01(\x0e\x32\x10.ReactiveLEDMode\x12 \n\x06modeUp\x18\x04 \x01(\x0e\x32\x10.ReactiveLEDMode\"L\n\x12ReactiveLEDOptions\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12%\n\x04leds\x18\x02 \x03(\x0b\x32\x10.ReactiveLEDInfoB\x05\x92?\x02\x10\n\"\xf9\t\n\x0c\x41\x64\x64onOptions\x12\x33\n\x14\x62ootselButtonOptions\x18\x01 \x01(\x0b\x32\x15.BootselButtonOptions\x12-\n\x11onBoardLedOptions\x18\x02 \x01(\x0b\x32\x12.OnBoardLedOptions\x12%\n\ranalogOptions\x18\x03 \x01(\x0b\x32\x0e.AnalogOptions\x12#\n\x0cturboOptions\x18\x04 \x01(\x0b\x32\r.TurboOptions\x12/\n\x17\x64\x65precatedSliderOptions\x18\x05 \x01(\x0b\x32\x0e.SliderOptions\x12\'\n\x0ereverseOptions\x18\x06 \x01(\x0b\x32\x0f.ReverseOptions\x12\x33\n\x14\x61nalogADS1219Options\x18\x07 \x01(\x0b\x32\x15.AnalogADS1219Options\x12\x37\n\x16\x64ualDirectionalOptions\x18\x08 \x01(\x0b\x32\x17.DualDirectionalOptions\x12%\n\rbuzzerOptions\x18\t \x01(\x0b\x32\x0e.BuzzerOptions\x12=\n\x1c\x64\x65precatedExtraButtonOptions\x18\n \x01(\x0b\x32\x13.ExtraButtonOptionsB\x02\x18\x01\x12\x31\n\x13playerNumberOptions\x18\x0b \x01(\x0b\x32\x14.PlayerNumberOptions\x12\'\n\nps4Options\x18\x0c \x01(\x0b\x32\x0b.PS4OptionsB\x06\x92?\x03\xf0\x01\x01\x12\x1f\n\nwiiOptions\x18\r \x01(\x0b\x32\x0b.WiiOptions\x12-\n\x11socdSliderOptions\x18\x0e \x01(\x0b\x32\x12.SOCDSliderOptions\x12!\n\x0bsnesOptions\x18\x0f \x01(\x0b\x32\x0c.SNESOptions\x12+\n\x10\x66ocusModeOptions\x18\x10 \x01(\x0b\x32\x11.FocusModeOptions\x12\x31\n\x13keyboardHostOptions\x18\x11 \x01(\x0b\x32\x14.KeyboardHostOptions\x12!\n\x0btiltOptions\x18\x12 \x01(\x0b\x32\x0c.TiltOptions\x12\x37\n\x14psPassthroughOptions\x18\x13 \x01(\x0b\x32\x15.PSPassthroughOptionsB\x02\x18\x01\x12#\n\x0cmacroOptions\x18\x14 \x01(\x0b\x32\r.MacroOptions\x12\x31\n\x13inputHistoryOptions\x18\x15 \x01(\x0b\x32\x14.InputHistoryOptions\x12=\n\x17xbonePassthroughOptions\x18\x16 \x01(\x0b\x32\x18.XBOnePassthroughOptionsB\x02\x18\x01\x12\x33\n\x14\x61nalogADS1256Options\x18\x17 \x01(\x0b\x32\x15.AnalogADS1256Options\x12%\n\rrotaryOptions\x18\x18 \x01(\x0b\x32\x0e.RotaryOptions\x12\'\n\x0epcf8575Options\x18\x19 \x01(\x0b\x32\x0f.PCF8575Options\x12\x33\n\x14\x64rv8833RumbleOptions\x18\x1a \x01(\x0b\x32\x15.DRV8833RumbleOptions\x12/\n\x12reactiveLEDOptions\x18\x1b \x01(\x0b\x32\x13.ReactiveLEDOptions\"\xaa\x01\n\x10MigrationHistory\x12\x1e\n\x0fhotkeysMigrated\x18\x01 \x01(\x08:\x05\x66\x61lse\x12#\n\x14gpioMappingsMigrated\x18\x02 \x01(\x08:\x05\x66\x61lse\x12%\n\x16\x62uttonProfilesMigrated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12*\n\x1bprofileEnabledFlagsMigrated\x18\x04 \x01(\x08:\x05\x66\x61lse\"\xe4\x04\n\x06\x43onfig\x12\x1b\n\x0c\x62oardVersion\x18\x01 \x01(\tB\x05\x92?\x02p\x1f\x12\'\n\x0egamepadOptions\x18\x02 \x01(\x0b\x32\x0f.GamepadOptions\x12%\n\rhotkeyOptions\x18\x03 \x01(\x0b\x32\x0e.HotkeyOptions\x12/\n\x15\x64\x65precatedPinMappings\x18\x04 \x01(\x0b\x32\x0c.PinMappingsB\x02\x18\x01\x12)\n\x0fkeyboardMapping\x18\x05 \x01(\x0b\x32\x10.KeyboardMapping\x12\'\n\x0e\x64isplayOptions\x18\x06 \x01(\x0b\x32\x0f.DisplayOptions\x12\x1f\n\nledOptions\x18\x07 \x01(\x0b\x32\x0b.LEDOptions\x12\x31\n\x10\x61nimationOptions\x18\x08 \x01(\x0b\x32\x17.AnimationOptions_Proto\x12#\n\x0c\x61\x64\x64onOptions\x18\t \x01(\x0b\x32\r.AddonOptions\x12/\n\x12\x66orcedSetupOptions\x18\n \x01(\x0b\x32\x13.ForcedSetupOptions\x12\'\n\x0eprofileOptions\x18\x0b \x01(\x0b\x32\x0f.ProfileOptions\x12\x1a\n\x0b\x62oardConfig\x18\x0c \x01(\tB\x05\x92?\x02p?\x12#\n\x0cgpioMappings\x18\r \x01(\x0b\x32\r.GpioMappings\x12%\n\nmigrations\x18\x0e \x01(\x0b\x32\x11.MigrationHistory\x12-\n\x11peripheralOptions\x18\x0f \x01(\x0b\x32\x12.PeripheralOptions') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'config_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None + _globals['_GAMEPADOPTIONS'].fields_by_name['ps4ReportHack']._loaded_options = None + _globals['_GAMEPADOPTIONS'].fields_by_name['ps4ReportHack']._serialized_options = b'\030\001' + _globals['_GPIOMAPPINGS'].fields_by_name['pins']._loaded_options = None + _globals['_GPIOMAPPINGS'].fields_by_name['pins']._serialized_options = b'\222?\002\020\036' + _globals['_GPIOMAPPINGS'].fields_by_name['profileLabel']._loaded_options = None + _globals['_GPIOMAPPINGS'].fields_by_name['profileLabel']._serialized_options = b'\222?\002p\020' + _globals['_PROFILEOPTIONS'].fields_by_name['deprecatedAlternativePinMappings']._loaded_options = None + _globals['_PROFILEOPTIONS'].fields_by_name['deprecatedAlternativePinMappings']._serialized_options = b'\030\001\222?\002\020\003' + _globals['_PROFILEOPTIONS'].fields_by_name['gpioMappingsSets']._loaded_options = None + _globals['_PROFILEOPTIONS'].fields_by_name['gpioMappingsSets']._serialized_options = b'\222?\002\020\003' + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cBlock']._loaded_options = None + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cBlock']._serialized_options = b'\030\001' + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cSDAPin']._loaded_options = None + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cSDAPin']._serialized_options = b'\030\001' + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cSCLPin']._loaded_options = None + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cSCLPin']._serialized_options = b'\030\001' + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cAddress']._loaded_options = None + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cAddress']._serialized_options = b'\030\001' + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cSpeed']._loaded_options = None + _globals['_DISPLAYOPTIONS'].fields_by_name['deprecatedI2cSpeed']._serialized_options = b'\030\001' + _globals['_DISPLAYOPTIONS'].fields_by_name['splashImage']._loaded_options = None + _globals['_DISPLAYOPTIONS'].fields_by_name['splashImage']._serialized_options = b'\222?\003\010\200\010' + _globals['_TURBOOPTIONS'].fields_by_name['deprecatedButtonPin']._loaded_options = None + _globals['_TURBOOPTIONS'].fields_by_name['deprecatedButtonPin']._serialized_options = b'\030\001' + _globals['_SLIDEROPTIONS'].fields_by_name['deprecatedPinSliderOne']._loaded_options = None + _globals['_SLIDEROPTIONS'].fields_by_name['deprecatedPinSliderOne']._serialized_options = b'\030\001' + _globals['_SLIDEROPTIONS'].fields_by_name['deprecatedPinSliderTwo']._loaded_options = None + _globals['_SLIDEROPTIONS'].fields_by_name['deprecatedPinSliderTwo']._serialized_options = b'\030\001' + _globals['_SLIDEROPTIONS'].fields_by_name['deprecatedModeOne']._loaded_options = None + _globals['_SLIDEROPTIONS'].fields_by_name['deprecatedModeOne']._serialized_options = b'\030\001' + _globals['_SLIDEROPTIONS'].fields_by_name['deprecatedModeTwo']._loaded_options = None + _globals['_SLIDEROPTIONS'].fields_by_name['deprecatedModeTwo']._serialized_options = b'\030\001' + _globals['_SOCDSLIDEROPTIONS'].fields_by_name['deprecatedPinOne']._loaded_options = None + _globals['_SOCDSLIDEROPTIONS'].fields_by_name['deprecatedPinOne']._serialized_options = b'\030\001' + _globals['_SOCDSLIDEROPTIONS'].fields_by_name['deprecatedPinTwo']._loaded_options = None + _globals['_SOCDSLIDEROPTIONS'].fields_by_name['deprecatedPinTwo']._serialized_options = b'\030\001' + _globals['_SOCDSLIDEROPTIONS'].fields_by_name['deprecatedModeOne']._loaded_options = None + _globals['_SOCDSLIDEROPTIONS'].fields_by_name['deprecatedModeOne']._serialized_options = b'\030\001' + _globals['_SOCDSLIDEROPTIONS'].fields_by_name['deprecatedModeTwo']._loaded_options = None + _globals['_SOCDSLIDEROPTIONS'].fields_by_name['deprecatedModeTwo']._serialized_options = b'\030\001' + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cBlock']._loaded_options = None + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cBlock']._serialized_options = b'\030\001' + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cSDAPin']._loaded_options = None + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cSDAPin']._serialized_options = b'\030\001' + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cSCLPin']._loaded_options = None + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cSCLPin']._serialized_options = b'\030\001' + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cAddress']._loaded_options = None + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cAddress']._serialized_options = b'\030\001' + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cSpeed']._loaded_options = None + _globals['_ANALOGADS1219OPTIONS'].fields_by_name['deprecatedI2cSpeed']._serialized_options = b'\030\001' + _globals['_DUALDIRECTIONALOPTIONS'].fields_by_name['deprecatedUpPin']._loaded_options = None + _globals['_DUALDIRECTIONALOPTIONS'].fields_by_name['deprecatedUpPin']._serialized_options = b'\030\001' + _globals['_DUALDIRECTIONALOPTIONS'].fields_by_name['deprecatedDownPin']._loaded_options = None + _globals['_DUALDIRECTIONALOPTIONS'].fields_by_name['deprecatedDownPin']._serialized_options = b'\030\001' + _globals['_DUALDIRECTIONALOPTIONS'].fields_by_name['deprecatedLeftPin']._loaded_options = None + _globals['_DUALDIRECTIONALOPTIONS'].fields_by_name['deprecatedLeftPin']._serialized_options = b'\030\001' + _globals['_DUALDIRECTIONALOPTIONS'].fields_by_name['deprecatedRightPin']._loaded_options = None + _globals['_DUALDIRECTIONALOPTIONS'].fields_by_name['deprecatedRightPin']._serialized_options = b'\030\001' + _globals['_TILTOPTIONS'].fields_by_name['deprecatedTiltFunctionPin']._loaded_options = None + _globals['_TILTOPTIONS'].fields_by_name['deprecatedTiltFunctionPin']._serialized_options = b'\030\001' + _globals['_PS4OPTIONS'].fields_by_name['serial']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['serial']._serialized_options = b'\222?\002\010\020' + _globals['_PS4OPTIONS'].fields_by_name['signature']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['signature']._serialized_options = b'\222?\003\010\200\002' + _globals['_PS4OPTIONS'].fields_by_name['rsaN']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaN']._serialized_options = b'\222?\003\010\200\002' + _globals['_PS4OPTIONS'].fields_by_name['rsaE']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaE']._serialized_options = b'\222?\002\010\004' + _globals['_PS4OPTIONS'].fields_by_name['rsaD']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaD']._serialized_options = b'\222?\003\010\200\002' + _globals['_PS4OPTIONS'].fields_by_name['rsaP']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaP']._serialized_options = b'\222?\003\010\200\001' + _globals['_PS4OPTIONS'].fields_by_name['rsaQ']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaQ']._serialized_options = b'\222?\003\010\200\001' + _globals['_PS4OPTIONS'].fields_by_name['rsaDP']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaDP']._serialized_options = b'\222?\003\010\200\001' + _globals['_PS4OPTIONS'].fields_by_name['rsaDQ']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaDQ']._serialized_options = b'\222?\003\010\200\001' + _globals['_PS4OPTIONS'].fields_by_name['rsaQP']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaQP']._serialized_options = b'\222?\003\010\200\001' + _globals['_PS4OPTIONS'].fields_by_name['rsaRN']._loaded_options = None + _globals['_PS4OPTIONS'].fields_by_name['rsaRN']._serialized_options = b'\222?\003\010\200\002' + _globals['_PSPASSTHROUGHOPTIONS'].fields_by_name['enabled']._loaded_options = None + _globals['_PSPASSTHROUGHOPTIONS'].fields_by_name['enabled']._serialized_options = b'\030\001' + _globals['_PSPASSTHROUGHOPTIONS'].fields_by_name['deprecatedPinDplus']._loaded_options = None + _globals['_PSPASSTHROUGHOPTIONS'].fields_by_name['deprecatedPinDplus']._serialized_options = b'\030\001' + _globals['_PSPASSTHROUGHOPTIONS'].fields_by_name['deprecatedPin5V']._loaded_options = None + _globals['_PSPASSTHROUGHOPTIONS'].fields_by_name['deprecatedPin5V']._serialized_options = b'\030\001' + _globals['_XBONEPASSTHROUGHOPTIONS'].fields_by_name['enabled']._loaded_options = None + _globals['_XBONEPASSTHROUGHOPTIONS'].fields_by_name['enabled']._serialized_options = b'\030\001' + _globals['_WIIOPTIONS'].fields_by_name['deprecatedI2cBlock']._loaded_options = None + _globals['_WIIOPTIONS'].fields_by_name['deprecatedI2cBlock']._serialized_options = b'\030\001' + _globals['_WIIOPTIONS'].fields_by_name['deprecatedI2cSDAPin']._loaded_options = None + _globals['_WIIOPTIONS'].fields_by_name['deprecatedI2cSDAPin']._serialized_options = b'\030\001' + _globals['_WIIOPTIONS'].fields_by_name['deprecatedI2cSCLPin']._loaded_options = None + _globals['_WIIOPTIONS'].fields_by_name['deprecatedI2cSCLPin']._serialized_options = b'\030\001' + _globals['_WIIOPTIONS'].fields_by_name['deprecatedI2cSpeed']._loaded_options = None + _globals['_WIIOPTIONS'].fields_by_name['deprecatedI2cSpeed']._serialized_options = b'\030\001' + _globals['_KEYBOARDHOSTOPTIONS'].fields_by_name['deprecatedPinDplus']._loaded_options = None + _globals['_KEYBOARDHOSTOPTIONS'].fields_by_name['deprecatedPinDplus']._serialized_options = b'\030\001' + _globals['_KEYBOARDHOSTOPTIONS'].fields_by_name['deprecatedPin5V']._loaded_options = None + _globals['_KEYBOARDHOSTOPTIONS'].fields_by_name['deprecatedPin5V']._serialized_options = b'\030\001' + _globals['_MACRO'].fields_by_name['macroLabel']._loaded_options = None + _globals['_MACRO'].fields_by_name['macroLabel']._serialized_options = b'\222?\002p@' + _globals['_MACRO'].fields_by_name['macroInputs']._loaded_options = None + _globals['_MACRO'].fields_by_name['macroInputs']._serialized_options = b'\222?\002\020\036' + _globals['_MACRO'].fields_by_name['deprecatedMacroTriggerPin']._loaded_options = None + _globals['_MACRO'].fields_by_name['deprecatedMacroTriggerPin']._serialized_options = b'\030\001' + _globals['_MACROOPTIONS'].fields_by_name['deprecatedPin']._loaded_options = None + _globals['_MACROOPTIONS'].fields_by_name['deprecatedPin']._serialized_options = b'\030\001' + _globals['_MACROOPTIONS'].fields_by_name['macroList']._loaded_options = None + _globals['_MACROOPTIONS'].fields_by_name['macroList']._serialized_options = b'\222?\002\020\006' + _globals['_PCF8575OPTIONS'].fields_by_name['deprecatedI2cBlock']._loaded_options = None + _globals['_PCF8575OPTIONS'].fields_by_name['deprecatedI2cBlock']._serialized_options = b'\030\001' + _globals['_PCF8575OPTIONS'].fields_by_name['pins']._loaded_options = None + _globals['_PCF8575OPTIONS'].fields_by_name['pins']._serialized_options = b'\222?\002\020\020' + _globals['_REACTIVELEDOPTIONS'].fields_by_name['leds']._loaded_options = None + _globals['_REACTIVELEDOPTIONS'].fields_by_name['leds']._serialized_options = b'\222?\002\020\n' + _globals['_ADDONOPTIONS'].fields_by_name['deprecatedExtraButtonOptions']._loaded_options = None + _globals['_ADDONOPTIONS'].fields_by_name['deprecatedExtraButtonOptions']._serialized_options = b'\030\001' + _globals['_ADDONOPTIONS'].fields_by_name['ps4Options']._loaded_options = None + _globals['_ADDONOPTIONS'].fields_by_name['ps4Options']._serialized_options = b'\222?\003\360\001\001' + _globals['_ADDONOPTIONS'].fields_by_name['psPassthroughOptions']._loaded_options = None + _globals['_ADDONOPTIONS'].fields_by_name['psPassthroughOptions']._serialized_options = b'\030\001' + _globals['_ADDONOPTIONS'].fields_by_name['xbonePassthroughOptions']._loaded_options = None + _globals['_ADDONOPTIONS'].fields_by_name['xbonePassthroughOptions']._serialized_options = b'\030\001' + _globals['_CONFIG'].fields_by_name['boardVersion']._loaded_options = None + _globals['_CONFIG'].fields_by_name['boardVersion']._serialized_options = b'\222?\002p\037' + _globals['_CONFIG'].fields_by_name['deprecatedPinMappings']._loaded_options = None + _globals['_CONFIG'].fields_by_name['deprecatedPinMappings']._serialized_options = b'\030\001' + _globals['_CONFIG'].fields_by_name['boardConfig']._loaded_options = None + _globals['_CONFIG'].fields_by_name['boardConfig']._serialized_options = b'\222?\002p?' + _globals['_GAMEPADOPTIONS']._serialized_start=44 + _globals['_GAMEPADOPTIONS']._serialized_end=727 + _globals['_KEYBOARDMAPPING']._serialized_start=730 + _globals['_KEYBOARDMAPPING']._serialized_end=1421 + _globals['_HOTKEYENTRY']._serialized_start=1423 + _globals['_HOTKEYENTRY']._serialized_end=1524 + _globals['_HOTKEYOPTIONS']._serialized_start=1527 + _globals['_HOTKEYOPTIONS']._serialized_end=2054 + _globals['_PERIPHERALOPTIONS']._serialized_start=2057 + _globals['_PERIPHERALOPTIONS']._serialized_end=2554 + _globals['_PERIPHERALOPTIONS_I2COPTIONS']._serialized_start=2328 + _globals['_PERIPHERALOPTIONS_I2COPTIONS']._serialized_end=2398 + _globals['_PERIPHERALOPTIONS_SPIOPTIONS']._serialized_start=2400 + _globals['_PERIPHERALOPTIONS_SPIOPTIONS']._serialized_end=2478 + _globals['_PERIPHERALOPTIONS_USBOPTIONS']._serialized_start=2480 + _globals['_PERIPHERALOPTIONS_USBOPTIONS']._serialized_end=2554 + _globals['_FORCEDSETUPOPTIONS']._serialized_start=2556 + _globals['_FORCEDSETUPOPTIONS']._serialized_end=2608 + _globals['_BUTTONLAYOUTPARAMSCOMMON']._serialized_start=2610 + _globals['_BUTTONLAYOUTPARAMSCOMMON']._serialized_end=2713 + _globals['_BUTTONLAYOUTPARAMSLEFT']._serialized_start=2715 + _globals['_BUTTONLAYOUTPARAMSLEFT']._serialized_end=2813 + _globals['_BUTTONLAYOUTPARAMSRIGHT']._serialized_start=2815 + _globals['_BUTTONLAYOUTPARAMSRIGHT']._serialized_end=2919 + _globals['_BUTTONLAYOUTCUSTOMOPTIONS']._serialized_start=2921 + _globals['_BUTTONLAYOUTCUSTOMOPTIONS']._serialized_end=3040 + _globals['_PINMAPPINGS']._serialized_start=3043 + _globals['_PINMAPPINGS']._serialized_end=3454 + _globals['_GPIOMAPPINGINFO']._serialized_start=3457 + _globals['_GPIOMAPPINGINFO']._serialized_end=3588 + _globals['_GPIOMAPPINGS']._serialized_start=3590 + _globals['_GPIOMAPPINGS']._serialized_end=3696 + _globals['_ALTERNATIVEPINMAPPINGS']._serialized_start=3699 + _globals['_ALTERNATIVEPINMAPPINGS']._serialized_end=3974 + _globals['_PROFILEOPTIONS']._serialized_start=3977 + _globals['_PROFILEOPTIONS']._serialized_end=4117 + _globals['_DISPLAYOPTIONS']._serialized_start=4120 + _globals['_DISPLAYOPTIONS']._serialized_end=4690 + _globals['_LEDOPTIONS']._serialized_start=4693 + _globals['_LEDOPTIONS']._serialized_end=5411 + _globals['_ANIMATIONOPTIONS_PROTO']._serialized_start=5414 + _globals['_ANIMATIONOPTIONS_PROTO']._serialized_end=6642 + _globals['_BOOTSELBUTTONOPTIONS']._serialized_start=6644 + _globals['_BOOTSELBUTTONOPTIONS']._serialized_end=6702 + _globals['_ONBOARDLEDOPTIONS']._serialized_start=6704 + _globals['_ONBOARDLEDOPTIONS']._serialized_end=6771 + _globals['_ANALOGOPTIONS']._serialized_start=6774 + _globals['_ANALOGOPTIONS']._serialized_end=7224 + _globals['_TURBOOPTIONS']._serialized_start=7227 + _globals['_TURBOOPTIONS']._serialized_end=7687 + _globals['_SLIDEROPTIONS']._serialized_start=7690 + _globals['_SLIDEROPTIONS']._serialized_end=7920 + _globals['_SOCDSLIDEROPTIONS']._serialized_start=7923 + _globals['_SOCDSLIDEROPTIONS']._serialized_end=8135 + _globals['_REVERSEOPTIONS']._serialized_start=8138 + _globals['_REVERSEOPTIONS']._serialized_end=8285 + _globals['_ANALOGADS1219OPTIONS']._serialized_start=8288 + _globals['_ANALOGADS1219OPTIONS']._serialized_end=8491 + _globals['_ANALOGADS1256OPTIONS']._serialized_start=8493 + _globals['_ANALOGADS1256OPTIONS']._serialized_end=8620 + _globals['_DUALDIRECTIONALOPTIONS']._serialized_start=8623 + _globals['_DUALDIRECTIONALOPTIONS']._serialized_end=8891 + _globals['_TILTOPTIONS']._serialized_start=8894 + _globals['_TILTOPTIONS']._serialized_end=9494 + _globals['_BUZZEROPTIONS']._serialized_start=9496 + _globals['_BUZZEROPTIONS']._serialized_end=9576 + _globals['_EXTRABUTTONOPTIONS']._serialized_start=9578 + _globals['_EXTRABUTTONOPTIONS']._serialized_end=9647 + _globals['_PLAYERNUMBEROPTIONS']._serialized_start=9649 + _globals['_PLAYERNUMBEROPTIONS']._serialized_end=9703 + _globals['_PS4OPTIONS']._serialized_start=9706 + _globals['_PS4OPTIONS']._serialized_end=9986 + _globals['_PSPASSTHROUGHOPTIONS']._serialized_start=9988 + _globals['_PSPASSTHROUGHOPTIONS']._serialized_end=10092 + _globals['_XBONEPASSTHROUGHOPTIONS']._serialized_start=10094 + _globals['_XBONEPASSTHROUGHOPTIONS']._serialized_end=10140 + _globals['_WIIOPTIONS']._serialized_start=10143 + _globals['_WIIOPTIONS']._serialized_end=12450 + _globals['_WIIOPTIONS_ANALOGAXIS']._serialized_start=10356 + _globals['_WIIOPTIONS_ANALOGAXIS']._serialized_end=10422 + _globals['_WIIOPTIONS_STICKOPTIONS']._serialized_start=10424 + _globals['_WIIOPTIONS_STICKOPTIONS']._serialized_end=10508 + _globals['_WIIOPTIONS_NUNCHUKOPTIONS']._serialized_start=10510 + _globals['_WIIOPTIONS_NUNCHUKOPTIONS']._serialized_end=10601 + _globals['_WIIOPTIONS_CLASSICOPTIONS']._serialized_start=10604 + _globals['_WIIOPTIONS_CLASSICOPTIONS']._serialized_end=11080 + _globals['_WIIOPTIONS_TAIKOOPTIONS']._serialized_start=11082 + _globals['_WIIOPTIONS_TAIKOOPTIONS']._serialized_end=11190 + _globals['_WIIOPTIONS_GUITAROPTIONS']._serialized_start=11193 + _globals['_WIIOPTIONS_GUITAROPTIONS']._serialized_end=11494 + _globals['_WIIOPTIONS_DRUMOPTIONS']._serialized_start=11497 + _globals['_WIIOPTIONS_DRUMOPTIONS']._serialized_end=11717 + _globals['_WIIOPTIONS_TURNTABLEOPTIONS']._serialized_start=11720 + _globals['_WIIOPTIONS_TURNTABLEOPTIONS']._serialized_end=12166 + _globals['_WIIOPTIONS_CONTROLLEROPTIONS']._serialized_start=12169 + _globals['_WIIOPTIONS_CONTROLLEROPTIONS']._serialized_end=12450 + _globals['_SNESOPTIONS']._serialized_start=12452 + _globals['_SNESOPTIONS']._serialized_end=12535 + _globals['_KEYBOARDHOSTOPTIONS']._serialized_start=12538 + _globals['_KEYBOARDHOSTOPTIONS']._serialized_end=12732 + _globals['_FOCUSMODEOPTIONS']._serialized_start=12735 + _globals['_FOCUSMODEOPTIONS']._serialized_end=12909 + _globals['_MACROINPUT']._serialized_start=12911 + _globals['_MACROINPUT']._serialized_end=12986 + _globals['_MACRO']._serialized_start=12989 + _globals['_MACRO']._serialized_end=13291 + _globals['_MACROOPTIONS']._serialized_start=13293 + _globals['_MACROOPTIONS']._serialized_end=13415 + _globals['_INPUTHISTORYOPTIONS']._serialized_start=13417 + _globals['_INPUTHISTORYOPTIONS']._serialized_end=13497 + _globals['_ROTARYPINOPTIONS']._serialized_start=13500 + _globals['_ROTARYPINOPTIONS']._serialized_end=13694 + _globals['_ROTARYOPTIONS']._serialized_start=13696 + _globals['_ROTARYOPTIONS']._serialized_end=13806 + _globals['_PCF8575OPTIONS']._serialized_start=13808 + _globals['_PCF8575OPTIONS']._serialized_end=13912 + _globals['_DRV8833RUMBLEOPTIONS']._serialized_start=13915 + _globals['_DRV8833RUMBLEOPTIONS']._serialized_end=14078 + _globals['_REACTIVELEDINFO']._serialized_start=14081 + _globals['_REACTIVELEDINFO']._serialized_end=14210 + _globals['_REACTIVELEDOPTIONS']._serialized_start=14212 + _globals['_REACTIVELEDOPTIONS']._serialized_end=14288 + _globals['_ADDONOPTIONS']._serialized_start=14291 + _globals['_ADDONOPTIONS']._serialized_end=15564 + _globals['_MIGRATIONHISTORY']._serialized_start=15567 + _globals['_MIGRATIONHISTORY']._serialized_end=15737 + _globals['_CONFIG']._serialized_start=15740 + _globals['_CONFIG']._serialized_end=16352 +# @@protoc_insertion_point(module_scope) diff --git a/tests/test-files/pb2-files/enums_pb2.py b/tests/test-files/pb2-files/enums_pb2.py new file mode 100644 index 0000000..0b5290d --- /dev/null +++ b/tests/test-files/pb2-files/enums_pb2.py @@ -0,0 +1,133 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: enums.proto +# Protobuf Python Version: 5.27.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'enums.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import nanopb_pb2 as nanopb__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x65nums.proto\x1a\x0cnanopb.proto*\xde\x08\n\x0c\x42uttonLayout\x12\x17\n\x13\x42UTTON_LAYOUT_STICK\x10\x00\x12\x1b\n\x17\x42UTTON_LAYOUT_STICKLESS\x10\x01\x12 \n\x1c\x42UTTON_LAYOUT_BUTTONS_ANGLED\x10\x02\x12\x1f\n\x1b\x42UTTON_LAYOUT_BUTTONS_BASIC\x10\x03\x12!\n\x1d\x42UTTON_LAYOUT_KEYBOARD_ANGLED\x10\x04\x12\x1b\n\x17\x42UTTON_LAYOUT_KEYBOARDA\x10\x05\x12\x1b\n\x17\x42UTTON_LAYOUT_DANCEPADA\x10\x06\x12\x1c\n\x18\x42UTTON_LAYOUT_TWINSTICKA\x10\x07\x12\x18\n\x14\x42UTTON_LAYOUT_BLANKA\x10\x08\x12\x16\n\x12\x42UTTON_LAYOUT_VLXA\x10\t\x12\"\n\x1e\x42UTTON_LAYOUT_FIGHTBOARD_STICK\x10\n\x12%\n!BUTTON_LAYOUT_FIGHTBOARD_MIRRORED\x10\x0b\x12\x19\n\x15\x42UTTON_LAYOUT_CUSTOMA\x10\x0c\x12 \n\x1c\x42UTTON_LAYOUT_OPENCORE0WASDA\x10\r\x12\x1e\n\x1a\x42UTTON_LAYOUT_STICKLESS_13\x10\x0e\x12\x1e\n\x1a\x42UTTON_LAYOUT_STICKLESS_16\x10\x0f\x12\x1e\n\x1a\x42UTTON_LAYOUT_STICKLESS_14\x10\x10\x12#\n\x1f\x42UTTON_LAYOUT_DANCEPAD_DDR_LEFT\x10\x11\x12#\n\x1f\x42UTTON_LAYOUT_DANCEPAD_DDR_SOLO\x10\x12\x12#\n\x1f\x42UTTON_LAYOUT_DANCEPAD_PIU_LEFT\x10\x13\x12\x18\n\x14\x42UTTON_LAYOUT_POPN_A\x10\x14\x12\x19\n\x15\x42UTTON_LAYOUT_TAIKO_A\x10\x15\x12 \n\x1c\x42UTTON_LAYOUT_BM_TURNTABLE_A\x10\x16\x12\x1b\n\x17\x42UTTON_LAYOUT_BM_5KEY_A\x10\x17\x12\x1b\n\x17\x42UTTON_LAYOUT_BM_7KEY_A\x10\x18\x12!\n\x1d\x42UTTON_LAYOUT_GITADORA_FRET_A\x10\x19\x12\"\n\x1e\x42UTTON_LAYOUT_GITADORA_STRUM_A\x10\x1a\x12!\n\x1d\x42UTTON_LAYOUT_BOARD_DEFINED_A\x10\x1b\x12!\n\x1d\x42UTTON_LAYOUT_BANDHERO_FRET_A\x10\x1c\x12\"\n\x1e\x42UTTON_LAYOUT_BANDHERO_STRUM_A\x10\x1d\x12\x19\n\x15\x42UTTON_LAYOUT_6GAWD_A\x10\x1e\x12#\n\x1f\x42UTTON_LAYOUT_6GAWD_ALLBUTTON_A\x10\x1f\x12\'\n#BUTTON_LAYOUT_6GAWD_ALLBUTTONPLUS_A\x10 \x12\x1f\n\x1b\x42UTTON_LAYOUT_STICKLESS_R16\x10!\x1a\x05\x92?\x02 \x00*\xbe\t\n\x11\x42uttonLayoutRight\x12\x18\n\x14\x42UTTON_LAYOUT_ARCADE\x10\x00\x12\x1c\n\x18\x42UTTON_LAYOUT_STICKLESSB\x10\x01\x12!\n\x1d\x42UTTON_LAYOUT_BUTTONS_ANGLEDB\x10\x02\x12\x18\n\x14\x42UTTON_LAYOUT_VEWLIX\x10\x03\x12\x19\n\x15\x42UTTON_LAYOUT_VEWLIX7\x10\x04\x12\x18\n\x14\x42UTTON_LAYOUT_CAPCOM\x10\x05\x12\x19\n\x15\x42UTTON_LAYOUT_CAPCOM6\x10\x06\x12\x18\n\x14\x42UTTON_LAYOUT_SEGA2P\x10\x07\x12\x17\n\x13\x42UTTON_LAYOUT_NOIR8\x10\x08\x12\x1b\n\x17\x42UTTON_LAYOUT_KEYBOARDB\x10\t\x12\x1b\n\x17\x42UTTON_LAYOUT_DANCEPADB\x10\n\x12\x1c\n\x18\x42UTTON_LAYOUT_TWINSTICKB\x10\x0b\x12\x18\n\x14\x42UTTON_LAYOUT_BLANKB\x10\x0c\x12\x16\n\x12\x42UTTON_LAYOUT_VLXB\x10\r\x12\x1c\n\x18\x42UTTON_LAYOUT_FIGHTBOARD\x10\x0e\x12+\n\'BUTTON_LAYOUT_FIGHTBOARD_STICK_MIRRORED\x10\x0f\x12\x19\n\x15\x42UTTON_LAYOUT_CUSTOMB\x10\x10\x12\x1c\n\x18\x42UTTON_LAYOUT_KEYBOARD8B\x10\x11\x12 \n\x1c\x42UTTON_LAYOUT_OPENCORE0WASDB\x10\x12\x12\x1f\n\x1b\x42UTTON_LAYOUT_STICKLESS_13B\x10\x13\x12\x1f\n\x1b\x42UTTON_LAYOUT_STICKLESS_16B\x10\x14\x12\x1f\n\x1b\x42UTTON_LAYOUT_STICKLESS_14B\x10\x15\x12$\n BUTTON_LAYOUT_DANCEPAD_DDR_RIGHT\x10\x16\x12$\n BUTTON_LAYOUT_DANCEPAD_PIU_RIGHT\x10\x17\x12\x18\n\x14\x42UTTON_LAYOUT_POPN_B\x10\x18\x12\x19\n\x15\x42UTTON_LAYOUT_TAIKO_B\x10\x19\x12 \n\x1c\x42UTTON_LAYOUT_BM_TURNTABLE_B\x10\x1a\x12\x1b\n\x17\x42UTTON_LAYOUT_BM_5KEY_B\x10\x1b\x12\x1b\n\x17\x42UTTON_LAYOUT_BM_7KEY_B\x10\x1c\x12!\n\x1d\x42UTTON_LAYOUT_GITADORA_FRET_B\x10\x1d\x12\"\n\x1e\x42UTTON_LAYOUT_GITADORA_STRUM_B\x10\x1e\x12!\n\x1d\x42UTTON_LAYOUT_BOARD_DEFINED_B\x10\x1f\x12!\n\x1d\x42UTTON_LAYOUT_BANDHERO_FRET_B\x10 \x12\"\n\x1e\x42UTTON_LAYOUT_BANDHERO_STRUM_B\x10!\x12\x19\n\x15\x42UTTON_LAYOUT_6GAWD_B\x10\"\x12#\n\x1f\x42UTTON_LAYOUT_6GAWD_ALLBUTTON_B\x10#\x12\'\n#BUTTON_LAYOUT_6GAWD_ALLBUTTONPLUS_B\x10$\x12 \n\x1c\x42UTTON_LAYOUT_STICKLESS_R16B\x10%\x1a\x05\x92?\x02 \x00*y\n\nSplashMode\x12\x16\n\x12SPLASH_MODE_STATIC\x10\x00\x12\x17\n\x13SPLASH_MODE_CLOSEIN\x10\x01\x12\x1d\n\x19SPLASH_MODE_CLOSEINCUSTOM\x10\x02\x12\x14\n\x10SPLASH_MODE_NONE\x10\x03\x1a\x05\x92?\x02 \x00*\xa0\x01\n\x0cSplashChoice\x12\x16\n\x12SPLASH_CHOICE_MAIN\x10\x00\x12\x13\n\x0fSPLASH_CHOICE_X\x10\x01\x12\x13\n\x0fSPLASH_CHOICE_Y\x10\x02\x12\x13\n\x0fSPLASH_CHOICE_Z\x10\x03\x12\x18\n\x14SPLASH_CHOICE_CUSTOM\x10\x04\x12\x18\n\x14SPLASH_CHOICE_LEGACY\x10\x05\x1a\x05\x92?\x02 \x00*\x99\x01\n\x0eOnBoardLedMode\x12\x19\n\x15ON_BOARD_LED_MODE_OFF\x10\x00\x12$\n ON_BOARD_LED_MODE_MODE_INDICATOR\x10\x01\x12 \n\x1cON_BOARD_LED_MODE_INPUT_TEST\x10\x02\x12\x1d\n\x19ON_BOARD_LED_MODE_PS_AUTH\x10\x03\x1a\x05\x92?\x02 \x00*\x84\x03\n\tInputMode\x12\x15\n\x11INPUT_MODE_XINPUT\x10\x00\x12\x15\n\x11INPUT_MODE_SWITCH\x10\x01\x12\x12\n\x0eINPUT_MODE_PS3\x10\x02\x12\x17\n\x13INPUT_MODE_KEYBOARD\x10\x03\x12\x12\n\x0eINPUT_MODE_PS4\x10\x04\x12\x14\n\x10INPUT_MODE_XBONE\x10\x05\x12\x15\n\x11INPUT_MODE_MDMINI\x10\x06\x12\x15\n\x11INPUT_MODE_NEOGEO\x10\x07\x12\x16\n\x12INPUT_MODE_PCEMINI\x10\x08\x12\x14\n\x10INPUT_MODE_EGRET\x10\t\x12\x14\n\x10INPUT_MODE_ASTRO\x10\n\x12\x18\n\x14INPUT_MODE_PSCLASSIC\x10\x0b\x12\x1b\n\x17INPUT_MODE_XBOXORIGINAL\x10\x0c\x12\x12\n\x0eINPUT_MODE_PS5\x10\r\x12\x16\n\x12INPUT_MODE_GENERIC\x10\x0e\x12\x16\n\x11INPUT_MODE_CONFIG\x10\xff\x01\x1a\x05\x92?\x02 \x00*\x94\x01\n\x11InputModeAuthType\x12\x1d\n\x19INPUT_MODE_AUTH_TYPE_NONE\x10\x00\x12\x1d\n\x19INPUT_MODE_AUTH_TYPE_KEYS\x10\x01\x12\x1c\n\x18INPUT_MODE_AUTH_TYPE_USB\x10\x02\x12\x1c\n\x18INPUT_MODE_AUTH_TYPE_I2C\x10\x03\x1a\x05\x92?\x02 \x00*_\n\x08\x44padMode\x12\x15\n\x11\x44PAD_MODE_DIGITAL\x10\x00\x12\x19\n\x15\x44PAD_MODE_LEFT_ANALOG\x10\x01\x12\x1a\n\x16\x44PAD_MODE_RIGHT_ANALOG\x10\x02\x1a\x05\x92?\x02 \x00*O\n\nInvertMode\x12\x0f\n\x0bINVERT_NONE\x10\x00\x12\x0c\n\x08INVERT_X\x10\x01\x12\x0c\n\x08INVERT_Y\x10\x02\x12\r\n\tINVERT_XY\x10\x03\x1a\x05\x92?\x02 \x00*\xa2\x01\n\x08SOCDMode\x12\x19\n\x15SOCD_MODE_UP_PRIORITY\x10\x00\x12\x15\n\x11SOCD_MODE_NEUTRAL\x10\x01\x12#\n\x1fSOCD_MODE_SECOND_INPUT_PRIORITY\x10\x02\x12\"\n\x1eSOCD_MODE_FIRST_INPUT_PRIORITY\x10\x03\x12\x14\n\x10SOCD_MODE_BYPASS\x10\x04\x1a\x05\x92?\x02 \x00*\xca\n\n\nGpioAction\x12\x11\n\x04NONE\x10\xf6\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x15\n\x08RESERVED\x10\xfb\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x15\n\x11\x41SSIGNED_TO_ADDON\x10\x00\x12\x13\n\x0f\x42UTTON_PRESS_UP\x10\x01\x12\x15\n\x11\x42UTTON_PRESS_DOWN\x10\x02\x12\x15\n\x11\x42UTTON_PRESS_LEFT\x10\x03\x12\x16\n\x12\x42UTTON_PRESS_RIGHT\x10\x04\x12\x13\n\x0f\x42UTTON_PRESS_B1\x10\x05\x12\x13\n\x0f\x42UTTON_PRESS_B2\x10\x06\x12\x13\n\x0f\x42UTTON_PRESS_B3\x10\x07\x12\x13\n\x0f\x42UTTON_PRESS_B4\x10\x08\x12\x13\n\x0f\x42UTTON_PRESS_L1\x10\t\x12\x13\n\x0f\x42UTTON_PRESS_R1\x10\n\x12\x13\n\x0f\x42UTTON_PRESS_L2\x10\x0b\x12\x13\n\x0f\x42UTTON_PRESS_R2\x10\x0c\x12\x13\n\x0f\x42UTTON_PRESS_S1\x10\r\x12\x13\n\x0f\x42UTTON_PRESS_S2\x10\x0e\x12\x13\n\x0f\x42UTTON_PRESS_A1\x10\x0f\x12\x13\n\x0f\x42UTTON_PRESS_A2\x10\x10\x12\x13\n\x0f\x42UTTON_PRESS_L3\x10\x11\x12\x13\n\x0f\x42UTTON_PRESS_R3\x10\x12\x12\x13\n\x0f\x42UTTON_PRESS_FN\x10\x13\x12\x17\n\x13\x42UTTON_PRESS_DDI_UP\x10\x14\x12\x19\n\x15\x42UTTON_PRESS_DDI_DOWN\x10\x15\x12\x19\n\x15\x42UTTON_PRESS_DDI_LEFT\x10\x16\x12\x1a\n\x16\x42UTTON_PRESS_DDI_RIGHT\x10\x17\x12\x16\n\x12SUSTAIN_DP_MODE_DP\x10\x18\x12\x16\n\x12SUSTAIN_DP_MODE_LS\x10\x19\x12\x16\n\x12SUSTAIN_DP_MODE_RS\x10\x1a\x12\x1d\n\x19SUSTAIN_SOCD_MODE_UP_PRIO\x10\x1b\x12\x1d\n\x19SUSTAIN_SOCD_MODE_NEUTRAL\x10\x1c\x12 \n\x1cSUSTAIN_SOCD_MODE_SECOND_WIN\x10\x1d\x12\x1f\n\x1bSUSTAIN_SOCD_MODE_FIRST_WIN\x10\x1e\x12\x1c\n\x18SUSTAIN_SOCD_MODE_BYPASS\x10\x1f\x12\x16\n\x12\x42UTTON_PRESS_TURBO\x10 \x12\x16\n\x12\x42UTTON_PRESS_MACRO\x10!\x12\x18\n\x14\x42UTTON_PRESS_MACRO_1\x10\"\x12\x18\n\x14\x42UTTON_PRESS_MACRO_2\x10#\x12\x18\n\x14\x42UTTON_PRESS_MACRO_3\x10$\x12\x18\n\x14\x42UTTON_PRESS_MACRO_4\x10%\x12\x18\n\x14\x42UTTON_PRESS_MACRO_5\x10&\x12\x18\n\x14\x42UTTON_PRESS_MACRO_6\x10\'\x12\x17\n\x13\x43USTOM_BUTTON_COMBO\x10(\x12\x13\n\x0f\x42UTTON_PRESS_A3\x10)\x12\x13\n\x0f\x42UTTON_PRESS_A4\x10*\x12\x13\n\x0f\x42UTTON_PRESS_E1\x10+\x12\x13\n\x0f\x42UTTON_PRESS_E2\x10,\x12\x13\n\x0f\x42UTTON_PRESS_E3\x10-\x12\x13\n\x0f\x42UTTON_PRESS_E4\x10.\x12\x13\n\x0f\x42UTTON_PRESS_E5\x10/\x12\x13\n\x0f\x42UTTON_PRESS_E6\x10\x30\x12\x13\n\x0f\x42UTTON_PRESS_E7\x10\x31\x12\x13\n\x0f\x42UTTON_PRESS_E8\x10\x32\x12\x13\n\x0f\x42UTTON_PRESS_E9\x10\x33\x12\x14\n\x10\x42UTTON_PRESS_E10\x10\x34\x12\x14\n\x10\x42UTTON_PRESS_E11\x10\x35\x12\x14\n\x10\x42UTTON_PRESS_E12\x10\x36\x1a\x05\x92?\x02 \x00*K\n\rGpioDirection\x12\x18\n\x14GPIO_DIRECTION_INPUT\x10\x00\x12\x19\n\x15GPIO_DIRECTION_OUTPUT\x10\x01\x1a\x05\x92?\x02 \x00*\xb9\x08\n\rGamepadHotkey\x12\x0f\n\x0bHOTKEY_NONE\x10\x00\x12\x17\n\x13HOTKEY_DPAD_DIGITAL\x10\x01\x12\x1b\n\x17HOTKEY_DPAD_LEFT_ANALOG\x10\x02\x12\x1c\n\x18HOTKEY_DPAD_RIGHT_ANALOG\x10\x03\x12\x16\n\x12HOTKEY_HOME_BUTTON\x10\x04\x12\x19\n\x15HOTKEY_CAPTURE_BUTTON\x10\x05\x12\x1b\n\x17HOTKEY_SOCD_UP_PRIORITY\x10\x06\x12\x17\n\x13HOTKEY_SOCD_NEUTRAL\x10\x07\x12\x1a\n\x16HOTKEY_SOCD_LAST_INPUT\x10\x08\x12\x18\n\x14HOTKEY_INVERT_X_AXIS\x10\t\x12\x18\n\x14HOTKEY_INVERT_Y_AXIS\x10\n\x12\x1b\n\x17HOTKEY_SOCD_FIRST_INPUT\x10\x0b\x12\x16\n\x12HOTKEY_SOCD_BYPASS\x10\x0c\x12\x1c\n\x18HOTKEY_TOGGLE_4_WAY_MODE\x10\r\x12 \n\x1cHOTKEY_TOGGLE_DDI_4_WAY_MODE\x10\x0e\x12\x19\n\x15HOTKEY_LOAD_PROFILE_1\x10\x0f\x12\x19\n\x15HOTKEY_LOAD_PROFILE_2\x10\x10\x12\x19\n\x15HOTKEY_LOAD_PROFILE_3\x10\x11\x12\x19\n\x15HOTKEY_LOAD_PROFILE_4\x10\x12\x12\x14\n\x10HOTKEY_L3_BUTTON\x10\x13\x12\x14\n\x10HOTKEY_R3_BUTTON\x10\x14\x12\x1a\n\x16HOTKEY_TOUCHPAD_BUTTON\x10\x15\x12\x19\n\x15HOTKEY_REBOOT_DEFAULT\x10\x16\x12\x14\n\x10HOTKEY_B1_BUTTON\x10\x17\x12\x14\n\x10HOTKEY_B2_BUTTON\x10\x18\x12\x14\n\x10HOTKEY_B3_BUTTON\x10\x19\x12\x14\n\x10HOTKEY_B4_BUTTON\x10\x1a\x12\x14\n\x10HOTKEY_L1_BUTTON\x10\x1b\x12\x14\n\x10HOTKEY_R1_BUTTON\x10\x1c\x12\x14\n\x10HOTKEY_L2_BUTTON\x10\x1d\x12\x14\n\x10HOTKEY_R2_BUTTON\x10\x1e\x12\x14\n\x10HOTKEY_S1_BUTTON\x10\x1f\x12\x14\n\x10HOTKEY_S2_BUTTON\x10 \x12\x14\n\x10HOTKEY_A1_BUTTON\x10!\x12\x14\n\x10HOTKEY_A2_BUTTON\x10\"\x12\x17\n\x13HOTKEY_NEXT_PROFILE\x10#\x12\x14\n\x10HOTKEY_A3_BUTTON\x10$\x12\x14\n\x10HOTKEY_A4_BUTTON\x10%\x12\x12\n\x0eHOTKEY_DPAD_UP\x10&\x12\x14\n\x10HOTKEY_DPAD_DOWN\x10\'\x12\x14\n\x10HOTKEY_DPAD_LEFT\x10(\x12\x15\n\x11HOTKEY_DPAD_RIGHT\x10)\x12\x1b\n\x17HOTKEY_PREVIOUS_PROFILE\x10*\x1a\x05\x92?\x02 \x00*c\n\x0fLEDFormat_Proto\x12\x12\n\x0eLED_FORMAT_GRB\x10\x00\x12\x12\n\x0eLED_FORMAT_RGB\x10\x01\x12\x13\n\x0fLED_FORMAT_GRBW\x10\x02\x12\x13\n\x0fLED_FORMAT_RGBW\x10\x03*\\\n\x0cShmupMixMode\x12!\n\x1dSHMUP_MIX_MODE_TURBO_PRIORITY\x10\x00\x12\"\n\x1eSHMUP_MIX_MODE_CHARGE_PRIORITY\x10\x01\x1a\x05\x92?\x02 \x00*T\n\x08PLEDType\x12\x1b\n\x0ePLED_TYPE_NONE\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x11\n\rPLED_TYPE_PWM\x10\x00\x12\x11\n\rPLED_TYPE_RGB\x10\x01\x1a\x05\x92?\x02 \x00*\xa3\x01\n\x0f\x46orcedSetupMode\x12\x19\n\x15\x46ORCED_SETUP_MODE_OFF\x10\x00\x12&\n\"FORCED_SETUP_MODE_LOCK_MODE_SWITCH\x10\x01\x12%\n!FORCED_SETUP_MODE_LOCK_WEB_CONFIG\x10\x02\x12\x1f\n\x1b\x46ORCED_SETUP_MODE_LOCK_BOTH\x10\x03\x1a\x05\x92?\x02 \x00*g\n\x1e\x44ualDirectionalCombinationMode\x12\x0e\n\nMIXED_MODE\x10\x00\x12\x10\n\x0cGAMEPAD_MODE\x10\x01\x12\r\n\tDUAL_MODE\x10\x02\x12\r\n\tNONE_MODE\x10\x03\x1a\x05\x92?\x02 \x00*C\n\x11PS4ControllerType\x12\x12\n\x0ePS4_CONTROLLER\x10\x00\x12\x13\n\x0fPS4_ARCADESTICK\x10\x07\x1a\x05\x92?\x02 \x00*C\n\tMacroType\x12\x0c\n\x08ON_PRESS\x10\x01\x12\x12\n\x0eON_HOLD_REPEAT\x10\x02\x12\r\n\tON_TOGGLE\x10\x03\x1a\x05\x92?\x02 \x00*\xea\x01\n\tGPElement\x12\x15\n\x11GP_ELEMENT_WIDGET\x10\x00\x12\x15\n\x11GP_ELEMENT_SCREEN\x10\x01\x12\x19\n\x15GP_ELEMENT_BTN_BUTTON\x10\x02\x12\x19\n\x15GP_ELEMENT_DIR_BUTTON\x10\x03\x12\x19\n\x15GP_ELEMENT_PIN_BUTTON\x10\x04\x12\x14\n\x10GP_ELEMENT_LEVER\x10\x05\x12\x14\n\x10GP_ELEMENT_LABEL\x10\x06\x12\x15\n\x11GP_ELEMENT_SPRITE\x10\x07\x12\x14\n\x10GP_ELEMENT_SHAPE\x10\x08\x1a\x05\x92?\x02 \x00*{\n\x0cGPShape_Type\x12\x14\n\x10GP_SHAPE_ELLIPSE\x10\x00\x12\x13\n\x0fGP_SHAPE_SQUARE\x10\x01\x12\x11\n\rGP_SHAPE_LINE\x10\x02\x12\x14\n\x10GP_SHAPE_POLYGON\x10\x03\x12\x10\n\x0cGP_SHAPE_ARC\x10\x04\x1a\x05\x92?\x02 \x00*\xa7\x02\n\x14RotaryEncoderPinMode\x12\x15\n\x11\x45NCODER_MODE_NONE\x10\x00\x12\x1e\n\x1a\x45NCODER_MODE_LEFT_ANALOG_X\x10\x01\x12\x1e\n\x1a\x45NCODER_MODE_LEFT_ANALOG_Y\x10\x02\x12\x1f\n\x1b\x45NCODER_MODE_RIGHT_ANALOG_X\x10\x03\x12\x1f\n\x1b\x45NCODER_MODE_RIGHT_ANALOG_Y\x10\x04\x12\x1d\n\x19\x45NCODER_MODE_LEFT_TRIGGER\x10\x05\x12\x1e\n\x1a\x45NCODER_MODE_RIGHT_TRIGGER\x10\x06\x12\x17\n\x13\x45NCODER_MODE_DPAD_X\x10\x07\x12\x17\n\x13\x45NCODER_MODE_DPAD_Y\x10\x08\x1a\x05\x92?\x02 \x00*\x86\x01\n\x0fReactiveLEDMode\x12\x1b\n\x17REACTIVE_LED_STATIC_OFF\x10\x00\x12\x1a\n\x16REACTIVE_LED_STATIC_ON\x10\x01\x12\x18\n\x14REACTIVE_LED_FADE_IN\x10\x02\x12\x19\n\x15REACTIVE_LED_FADE_OUT\x10\x03\x1a\x05\x92?\x02 \x00*F\n\x13PS4ControllerIDMode\x12\x12\n\x0ePS4_ID_CONSOLE\x10\x00\x12\x14\n\x10PS4_ID_EMULATION\x10\x01\x1a\x05\x92?\x02 \x00') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'enums_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None + _globals['_BUTTONLAYOUT']._loaded_options = None + _globals['_BUTTONLAYOUT']._serialized_options = b'\222?\002 \000' + _globals['_BUTTONLAYOUTRIGHT']._loaded_options = None + _globals['_BUTTONLAYOUTRIGHT']._serialized_options = b'\222?\002 \000' + _globals['_SPLASHMODE']._loaded_options = None + _globals['_SPLASHMODE']._serialized_options = b'\222?\002 \000' + _globals['_SPLASHCHOICE']._loaded_options = None + _globals['_SPLASHCHOICE']._serialized_options = b'\222?\002 \000' + _globals['_ONBOARDLEDMODE']._loaded_options = None + _globals['_ONBOARDLEDMODE']._serialized_options = b'\222?\002 \000' + _globals['_INPUTMODE']._loaded_options = None + _globals['_INPUTMODE']._serialized_options = b'\222?\002 \000' + _globals['_INPUTMODEAUTHTYPE']._loaded_options = None + _globals['_INPUTMODEAUTHTYPE']._serialized_options = b'\222?\002 \000' + _globals['_DPADMODE']._loaded_options = None + _globals['_DPADMODE']._serialized_options = b'\222?\002 \000' + _globals['_INVERTMODE']._loaded_options = None + _globals['_INVERTMODE']._serialized_options = b'\222?\002 \000' + _globals['_SOCDMODE']._loaded_options = None + _globals['_SOCDMODE']._serialized_options = b'\222?\002 \000' + _globals['_GPIOACTION']._loaded_options = None + _globals['_GPIOACTION']._serialized_options = b'\222?\002 \000' + _globals['_GPIODIRECTION']._loaded_options = None + _globals['_GPIODIRECTION']._serialized_options = b'\222?\002 \000' + _globals['_GAMEPADHOTKEY']._loaded_options = None + _globals['_GAMEPADHOTKEY']._serialized_options = b'\222?\002 \000' + _globals['_SHMUPMIXMODE']._loaded_options = None + _globals['_SHMUPMIXMODE']._serialized_options = b'\222?\002 \000' + _globals['_PLEDTYPE']._loaded_options = None + _globals['_PLEDTYPE']._serialized_options = b'\222?\002 \000' + _globals['_FORCEDSETUPMODE']._loaded_options = None + _globals['_FORCEDSETUPMODE']._serialized_options = b'\222?\002 \000' + _globals['_DUALDIRECTIONALCOMBINATIONMODE']._loaded_options = None + _globals['_DUALDIRECTIONALCOMBINATIONMODE']._serialized_options = b'\222?\002 \000' + _globals['_PS4CONTROLLERTYPE']._loaded_options = None + _globals['_PS4CONTROLLERTYPE']._serialized_options = b'\222?\002 \000' + _globals['_MACROTYPE']._loaded_options = None + _globals['_MACROTYPE']._serialized_options = b'\222?\002 \000' + _globals['_GPELEMENT']._loaded_options = None + _globals['_GPELEMENT']._serialized_options = b'\222?\002 \000' + _globals['_GPSHAPE_TYPE']._loaded_options = None + _globals['_GPSHAPE_TYPE']._serialized_options = b'\222?\002 \000' + _globals['_ROTARYENCODERPINMODE']._loaded_options = None + _globals['_ROTARYENCODERPINMODE']._serialized_options = b'\222?\002 \000' + _globals['_REACTIVELEDMODE']._loaded_options = None + _globals['_REACTIVELEDMODE']._serialized_options = b'\222?\002 \000' + _globals['_PS4CONTROLLERIDMODE']._loaded_options = None + _globals['_PS4CONTROLLERIDMODE']._serialized_options = b'\222?\002 \000' + _globals['_BUTTONLAYOUT']._serialized_start=30 + _globals['_BUTTONLAYOUT']._serialized_end=1148 + _globals['_BUTTONLAYOUTRIGHT']._serialized_start=1151 + _globals['_BUTTONLAYOUTRIGHT']._serialized_end=2365 + _globals['_SPLASHMODE']._serialized_start=2367 + _globals['_SPLASHMODE']._serialized_end=2488 + _globals['_SPLASHCHOICE']._serialized_start=2491 + _globals['_SPLASHCHOICE']._serialized_end=2651 + _globals['_ONBOARDLEDMODE']._serialized_start=2654 + _globals['_ONBOARDLEDMODE']._serialized_end=2807 + _globals['_INPUTMODE']._serialized_start=2810 + _globals['_INPUTMODE']._serialized_end=3198 + _globals['_INPUTMODEAUTHTYPE']._serialized_start=3201 + _globals['_INPUTMODEAUTHTYPE']._serialized_end=3349 + _globals['_DPADMODE']._serialized_start=3351 + _globals['_DPADMODE']._serialized_end=3446 + _globals['_INVERTMODE']._serialized_start=3448 + _globals['_INVERTMODE']._serialized_end=3527 + _globals['_SOCDMODE']._serialized_start=3530 + _globals['_SOCDMODE']._serialized_end=3692 + _globals['_GPIOACTION']._serialized_start=3695 + _globals['_GPIOACTION']._serialized_end=5049 + _globals['_GPIODIRECTION']._serialized_start=5051 + _globals['_GPIODIRECTION']._serialized_end=5126 + _globals['_GAMEPADHOTKEY']._serialized_start=5129 + _globals['_GAMEPADHOTKEY']._serialized_end=6210 + _globals['_LEDFORMAT_PROTO']._serialized_start=6212 + _globals['_LEDFORMAT_PROTO']._serialized_end=6311 + _globals['_SHMUPMIXMODE']._serialized_start=6313 + _globals['_SHMUPMIXMODE']._serialized_end=6405 + _globals['_PLEDTYPE']._serialized_start=6407 + _globals['_PLEDTYPE']._serialized_end=6491 + _globals['_FORCEDSETUPMODE']._serialized_start=6494 + _globals['_FORCEDSETUPMODE']._serialized_end=6657 + _globals['_DUALDIRECTIONALCOMBINATIONMODE']._serialized_start=6659 + _globals['_DUALDIRECTIONALCOMBINATIONMODE']._serialized_end=6762 + _globals['_PS4CONTROLLERTYPE']._serialized_start=6764 + _globals['_PS4CONTROLLERTYPE']._serialized_end=6831 + _globals['_MACROTYPE']._serialized_start=6833 + _globals['_MACROTYPE']._serialized_end=6900 + _globals['_GPELEMENT']._serialized_start=6903 + _globals['_GPELEMENT']._serialized_end=7137 + _globals['_GPSHAPE_TYPE']._serialized_start=7139 + _globals['_GPSHAPE_TYPE']._serialized_end=7262 + _globals['_ROTARYENCODERPINMODE']._serialized_start=7265 + _globals['_ROTARYENCODERPINMODE']._serialized_end=7560 + _globals['_REACTIVELEDMODE']._serialized_start=7563 + _globals['_REACTIVELEDMODE']._serialized_end=7697 + _globals['_PS4CONTROLLERIDMODE']._serialized_start=7699 + _globals['_PS4CONTROLLERIDMODE']._serialized_end=7769 +# @@protoc_insertion_point(module_scope) diff --git a/tests/test-files/pb2-files/nanopb_pb2.py b/tests/test-files/pb2-files/nanopb_pb2.py new file mode 100644 index 0000000..e78665a --- /dev/null +++ b/tests/test-files/pb2-files/nanopb_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: nanopb.proto +# Protobuf Python Version: 5.27.2 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'nanopb.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cnanopb.proto\x1a google/protobuf/descriptor.proto\"\xc4\x07\n\rNanoPBOptions\x12\x10\n\x08max_size\x18\x01 \x01(\x05\x12\x12\n\nmax_length\x18\x0e \x01(\x05\x12\x11\n\tmax_count\x18\x02 \x01(\x05\x12&\n\x08int_size\x18\x07 \x01(\x0e\x32\x08.IntSize:\nIS_DEFAULT\x12$\n\x04type\x18\x03 \x01(\x0e\x32\n.FieldType:\nFT_DEFAULT\x12\x18\n\nlong_names\x18\x04 \x01(\x08:\x04true\x12\x1c\n\rpacked_struct\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0bpacked_enum\x18\n \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0cskip_message\x18\x06 \x01(\x08:\x05\x66\x61lse\x12\x18\n\tno_unions\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\r\n\x05msgid\x18\t \x01(\r\x12\x1e\n\x0f\x61nonymous_oneof\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x15\n\x06proto3\x18\x0c \x01(\x08:\x05\x66\x61lse\x12#\n\x14proto3_singular_msgs\x18\x15 \x01(\x08:\x05\x66\x61lse\x12\x1d\n\x0e\x65num_to_string\x18\r \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0c\x66ixed_length\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0b\x66ixed_count\x18\x10 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0fsubmsg_callback\x18\x16 \x01(\x08:\x05\x66\x61lse\x12/\n\x0cmangle_names\x18\x11 \x01(\x0e\x32\x11.TypenameMangling:\x06M_NONE\x12(\n\x11\x63\x61llback_datatype\x18\x12 \x01(\t:\rpb_callback_t\x12\x34\n\x11\x63\x61llback_function\x18\x13 \x01(\t:\x19pb_default_field_callback\x12\x30\n\x0e\x64\x65scriptorsize\x18\x14 \x01(\x0e\x32\x0f.DescriptorSize:\x07\x44S_AUTO\x12\x1a\n\x0b\x64\x65\x66\x61ult_has\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x0f\n\x07include\x18\x18 \x03(\t\x12\x0f\n\x07\x65xclude\x18\x1a \x03(\t\x12\x0f\n\x07package\x18\x19 \x01(\t\x12\x41\n\rtype_override\x18\x1b \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type\x12\x19\n\x0bsort_by_tag\x18\x1c \x01(\x08:\x04true\x12.\n\rfallback_type\x18\x1d \x01(\x0e\x32\n.FieldType:\x0b\x46T_CALLBACK\x12\x1e\n\x0f\x64isallow_export\x18\x1e \x01(\x08:\x05\x66\x61lse*i\n\tFieldType\x12\x0e\n\nFT_DEFAULT\x10\x00\x12\x0f\n\x0b\x46T_CALLBACK\x10\x01\x12\x0e\n\nFT_POINTER\x10\x04\x12\r\n\tFT_STATIC\x10\x02\x12\r\n\tFT_IGNORE\x10\x03\x12\r\n\tFT_INLINE\x10\x05*D\n\x07IntSize\x12\x0e\n\nIS_DEFAULT\x10\x00\x12\x08\n\x04IS_8\x10\x08\x12\t\n\x05IS_16\x10\x10\x12\t\n\x05IS_32\x10 \x12\t\n\x05IS_64\x10@*Z\n\x10TypenameMangling\x12\n\n\x06M_NONE\x10\x00\x12\x13\n\x0fM_STRIP_PACKAGE\x10\x01\x12\r\n\tM_FLATTEN\x10\x02\x12\x16\n\x12M_PACKAGE_INITIALS\x10\x03*E\n\x0e\x44\x65scriptorSize\x12\x0b\n\x07\x44S_AUTO\x10\x00\x12\x08\n\x04\x44S_1\x10\x01\x12\x08\n\x04\x44S_2\x10\x02\x12\x08\n\x04\x44S_4\x10\x04\x12\x08\n\x04\x44S_8\x10\x08:E\n\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:G\n\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:E\n\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:>\n\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptionsB\x1a\n\x18\x66i.kapsi.koti.jpa.nanopb') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nanopb_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\030fi.kapsi.koti.jpa.nanopb' + _globals['_FIELDTYPE']._serialized_start=1017 + _globals['_FIELDTYPE']._serialized_end=1122 + _globals['_INTSIZE']._serialized_start=1124 + _globals['_INTSIZE']._serialized_end=1192 + _globals['_TYPENAMEMANGLING']._serialized_start=1194 + _globals['_TYPENAMEMANGLING']._serialized_end=1284 + _globals['_DESCRIPTORSIZE']._serialized_start=1286 + _globals['_DESCRIPTORSIZE']._serialized_end=1355 + _globals['_NANOPBOPTIONS']._serialized_start=51 + _globals['_NANOPBOPTIONS']._serialized_end=1015 +# @@protoc_insertion_point(module_scope) diff --git a/tests/test_builder.py b/tests/test_builder.py index 9217d6c..0d135c6 100644 --- a/tests/test_builder.py +++ b/tests/test_builder.py @@ -25,13 +25,15 @@ logger = logging.getLogger(__name__) @decorator def with_pb2s(test, *args, **kwargs): """Wrap a test with precompiled pb2 files on the path.""" - proto_path = os.path.join(HERE, 'test-files') + proto_path = os.path.join(HERE, 'test-files', 'pb2-files') sys.path.append(proto_path) test(*args, **kwargs) sys.path.pop() del sys.modules['config_pb2'] + del sys.modules['enums_pb2'] + del sys.modules['nanopb_pb2'] def test_concatenate_to_file(tmp_path): diff --git a/tests/test_commands.py b/tests/test_commands.py index e24d680..a0d45aa 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -18,13 +18,15 @@ HERE = os.path.dirname(os.path.abspath(__file__)) @decorator def with_pb2s(test, *args, **kwargs): """Wrap a test with precompiled pb2 files on the path.""" - proto_path = os.path.join(HERE, 'test-files') + proto_path = os.path.join(HERE, 'test-files', 'pb2-files') sys.path.append(proto_path) test(*args, **kwargs) sys.path.pop() del sys.modules['config_pb2'] + del sys.modules['enums_pb2'] + del sys.modules['nanopb_pb2'] def test_version_flag(): diff --git a/tests/test_gui.py b/tests/test_gui.py index ebb556c..2cc04b8 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -21,13 +21,15 @@ HERE = os.path.dirname(os.path.abspath(__file__)) @decorator async def with_pb2s(test, *args, **kwargs): """Wrap a test with precompiled pb2 files on the path.""" - proto_path = os.path.join(HERE, 'test-files') + proto_path = os.path.join(HERE, 'test-files', 'pb2-files') sys.path.append(proto_path) await test(*args, **kwargs) sys.path.pop() del sys.modules['config_pb2'] + del sys.modules['enums_pb2'] + del sys.modules['nanopb_pb2'] @pytest.mark.asyncio diff --git a/tests/test_package.py b/tests/test_package.py index 328102e..da3184e 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -6,43 +6,69 @@ SPDX-License-Identifier: GPL-3.0-or-later import os import sys +import pytest +from decorator import decorator + from gp2040ce_bintools import get_config_pb2 HERE = os.path.dirname(os.path.abspath(__file__)) -def test_get_config_pb2_compile(): - """Without any precompiled files on the path, test we can read proto files and compile them.""" - # append to path as -P would +@decorator +def with_pb2s(test, *args, **kwargs): + """Wrap a test with precompiled pb2 files on the path.""" + proto_path = os.path.join(HERE, 'test-files', 'pb2-files') + sys.path.append(proto_path) + + test(*args, **kwargs) + + sys.path.pop() + del sys.modules['config_pb2'] + del sys.modules['enums_pb2'] + del sys.modules['nanopb_pb2'] + + +@decorator +def with_protos(test, *args, **kwargs): + """Wrap a test with .proto files on the path.""" proto_path = os.path.join(HERE, 'test-files', 'proto-files') sys.path.append(proto_path) - # let grpc tools compile the proto files on demand and give us the module - config_pb2 = get_config_pb2() - _ = config_pb2.Config() + test(*args, **kwargs) - # clean up the path and unload config_pb2 - sys.path.pop() sys.path.pop() del sys.modules['config_pb2'] + del sys.modules['enums_pb2'] + del sys.modules['nanopb_pb2'] + + +@with_pb2s +def test_get_config_pb2_precompiled(): + """With precompiled files on the path, test we can read and use them.""" + # get the module from the provided files + config_pb2 = get_config_pb2() + _ = config_pb2.Config() def test_get_config_pb2_exception(): + """Test that we fail if no config .proto files are available.""" + with pytest.raises(ModuleNotFoundError): + _ = get_config_pb2() + + +def test_get_config_pb2_shipped_config_files(): """Without any precompiled files or proto files on the path, test we DO NOT raise an exception.""" - # this used to raise ModuleNotFoundError, but with our snapshot included now, - # we should always have a config to import - _ = get_config_pb2() + # use the shipped .proto files to generate the config + config_pb2 = get_config_pb2(with_fallback=True) + _ = config_pb2.Config() + del sys.modules['config_pb2'] + del sys.modules['enums_pb2'] + del sys.modules['nanopb_pb2'] -def test_get_config_pb2_precompile(): - """Test we can import precompiled protobuf files.""" - proto_path = os.path.join(HERE, 'test-files') - sys.path.append(proto_path) - - # let grpc tools import the proto files normally +@with_protos +def test_get_config_pb2_compile(): + """Without any precompiled files on the path, test we can read proto files and compile them.""" + # let grpc tools compile the proto files on demand and give us the module config_pb2 = get_config_pb2() _ = config_pb2.Config() - - # clean up the path and unload config_pb2 - sys.path.pop() - del sys.modules['config_pb2'] diff --git a/tests/test_rp2040.py b/tests/test_rp2040.py index 590b070..be0a4bf 100644 --- a/tests/test_rp2040.py +++ b/tests/test_rp2040.py @@ -20,13 +20,15 @@ HERE = os.path.dirname(os.path.abspath(__file__)) @decorator def with_pb2s(test, *args, **kwargs): """Wrap a test with precompiled pb2 files on the path.""" - proto_path = os.path.join(HERE, 'test-files') + proto_path = os.path.join(HERE, 'test-files', 'pb2-files') sys.path.append(proto_path) test(*args, **kwargs) sys.path.pop() del sys.modules['config_pb2'] + del sys.modules['enums_pb2'] + del sys.modules['nanopb_pb2'] def test_get_bootsel_endpoints(): diff --git a/tests/test_storage.py b/tests/test_storage.py index 63f5394..f49dc0e 100644 --- a/tests/test_storage.py +++ b/tests/test_storage.py @@ -20,13 +20,15 @@ HERE = os.path.dirname(os.path.abspath(__file__)) @decorator def with_pb2s(test, *args, **kwargs): """Wrap a test with precompiled pb2 files on the path.""" - proto_path = os.path.join(HERE, 'test-files') + proto_path = os.path.join(HERE, 'test-files', 'pb2-files') sys.path.append(proto_path) test(*args, **kwargs) sys.path.pop() del sys.modules['config_pb2'] + del sys.modules['enums_pb2'] + del sys.modules['nanopb_pb2'] def test_config_footer(storage_dump):